|
You should suggest more vertical whitespace. An extra line break for every line or it's not readable
|
# ¿ Apr 12, 2008 20:18 |
|
|
# ¿ May 9, 2024 06:29 |
|
Zakalwe posted:3000 lines is , but there's nothing wrong with using the occasional goto. "Never ever use goto" is generally promulgated by people who've heard of Dijkstra's article but never read the drat thing. I'm skeptical that goto has a valid place outside of perhaps some simple scripting. I challenge you to show me a valid example of goto use in modern object oriented code.
|
# ¿ Jun 15, 2008 01:31 |
|
subreality posted:The same guy also wrote a login.php that went a little something like this:
|
# ¿ Dec 5, 2008 05:30 |
|
code:
|
# ¿ Jan 1, 2009 07:15 |
|
Zakalwe posted:
Perfect for the thread right here
|
# ¿ Jan 5, 2009 03:51 |
|
The Evan posted:"I've set up a massive switch statement that consists of all the prime numbers up to 271" Whoooosh
|
# ¿ Apr 28, 2009 17:58 |
|
Lexical Unit posted:Exhibit 3 I do not understand how even the most novice day 1 programmer could look at this and think it is okay.
|
# ¿ Jun 3, 2009 02:32 |
|
dancavallaro posted:The Something Awful Forums > Discussion > Serious Hardware / Software Crap > The Cavern of COBOL > WOW6432 Megathread?
|
# ¿ Jul 31, 2009 16:54 |
|
It's indicative of 1:1 mental modelling to code, and shows that to him the code only makes sense if it explicit returns "true" somewhere and "false" somewhere else. There's no jump to the higher order of thinking where the return value of the call can be returned, or once you've achieved that, possibly scrapping the helper function altogether because you realize the inner call does everything you need.
|
# ¿ Nov 14, 2009 19:31 |
|
I just figured it was the worlds only example of good php code.
|
# ¿ Feb 5, 2010 01:39 |
|
MrMoo posted:while (0) is used to allow a semicolon after the macro call, it's pretty much the only place it should be used. Another piece of ammunition for my next anti macro rant.
|
# ¿ Feb 28, 2010 07:04 |
|
Avenging Dentist posted:Congrats on being ignorant. lol defending macros quote:Who is this hexadecimal you all keep implying I am, which I am not?
|
# ¿ Feb 28, 2010 19:43 |
|
Why not execute it in a loop as a single dynamic sql statement that uses string concatenation to specify the correct variable
|
# ¿ Jul 10, 2010 04:06 |
|
Argue posted:Okay, here comes another wonderful piece of architecture from our client, incidentally a very large company that's well-known in my country. This is wonderful
|
# ¿ Nov 9, 2010 03:53 |
|
yaoi prophet posted:If I ever write a language this will be a compile-time error. I have discovered exactly one useful case for an empty exception handler: on Windows when you attempt to launch a process with elevated privileges (such as, relaunching yourself from standard user -> admin with some state parameters) and the user hits cancel, the C# process class throws an exception. But it's very possible you don't want to do anything if they hit cancel. So just swallow. ~~~TMYK~~~
|
# ¿ May 13, 2011 23:04 |
|
Wheany posted:
This is just someone who's not used to version control and/or wants the logic of those functions readily available for some reason.
|
# ¿ Jul 7, 2011 13:46 |
|
NotShadowStar posted:And that's why you always, always, always use equals equals equals in javascript! Then you're be writing is_feature_supported[i] === "true" which would be a worse horror. If you're going to play along with that array of features business then just use actual bools.
|
# ¿ Jul 13, 2011 16:32 |
|
this whole page is the horror
|
# ¿ Jul 31, 2011 05:35 |
|
What? No it doesn't, at least circa 2008. Are you running an addin that's doing it for you like something from RedGate?
|
# ¿ Aug 1, 2011 00:52 |
|
TRex EaterofCars posted:Yeah it does. In both 2005 and 2008 R2 at least. I stand corrected. It doesn't do that for drop/create script creation though, which is what I checked when I read your post. Anyway, gross. Add that to the unending list of SSMS failures I intend to solve with my SQL IDE.
|
# ¿ Aug 1, 2011 15:17 |
|
angrytech posted:Wait, there's supposed to be a turtle in that gif? haha
|
# ¿ Sep 27, 2011 16:32 |
|
w00tz0r posted:"Forward compatibility is easy, all Microsoft products are completely forward compatible. I can write a program on Windows Vista and have it run on Windows 95. The only thing that broke forwards compatibility is UAC."
|
# ¿ Oct 19, 2011 22:23 |
|
tef posted:also, 'ruby is written in c so it's fast' ruby + mysql via orm, the fastest way to write your web three point blah apps for
|
# ¿ Dec 10, 2011 22:58 |
|
I'm guessing you can't update any other records besides your own though, right? They probably didn't have time/care to write a web service interface just to show you high scores in the game. I hope.
|
# ¿ Dec 24, 2011 00:26 |
|
Threep posted:Welp. You know what, "write a bit of sane database interface code" should replace FizzBuzz as the idiot filter.
|
# ¿ Dec 24, 2011 03:42 |
|
Dicky B posted:
|
# ¿ Dec 24, 2011 19:49 |
|
Zombywuf posted:Aside from that, what the hell are you doing in that other 95ms? Seriously? Factoring the user's IP address? The jig is up, Zombywuf, your trolling has now become obvious
|
# ¿ May 7, 2012 00:38 |
|
From redditquote:Javascript thinks that 64.99 * 100 is 6498.999999... Go ahead, try it any way you like. If someone can explain this, I'll be eternally grateful. Nope, just floating point. And this is pointed out: quote:I don't think you understand how floats are stored in memory. Click on any of the links posted and read up on it. But then, redditor collin_ph posted:I'm wondering who's bright idea it was to do this. It's funny after programming for nearly 30 years, I run into this TODAY. Makes me feel kind of dumb-- however, I wonder how people avoid this type of thing with MONEY. Uhhh...
|
# ¿ May 22, 2012 01:18 |
|
Golbez posted:God help you if you order the same amount of something twice in one day. Well, not to excuse the godawful design, but assuming that DATETIME has a time component as I assume it ought, then you're probably ok.
|
# ¿ Jun 12, 2012 20:50 |
|
|
# ¿ Jun 28, 2012 16:23 |
|
This must be what the nosql revolution looks like
|
# ¿ Aug 20, 2012 02:29 |
|
plushpuffin posted:Just got this gem the other day from the senior developer / project lead: Haha this is so precious, I love it
|
# ¿ Oct 5, 2012 18:41 |
|
The next time that "everyone should learn to code" meme sweeps through hacker news, remember how!! exists and shudder.
|
# ¿ Jan 17, 2013 05:50 |
|
Zhentar posted:I don't know about faster, but it's definitely easier to use a dummy date and write SQL code:
|
# ¿ Feb 4, 2013 20:16 |
|
Bunny Cuddlin posted:I have a Kinect sensor attached to my computer and I wrote an app that sits between my PC and the database server and it only allows me to run destructive commands if I do a little voodoo dance and say a magic word can we get off this please https://www.youtube.com/watch?v=Mx-Y8KFFHpE
|
# ¿ Feb 13, 2013 04:08 |
|
Aleksei Vasiliev posted:I've never seen this in a Java library, but .NET loves it and I loving despise it. As I'm sure I've posted before in this thread, there's certain cases where "what makes good sense" for the situation and Hungarian notation overlap. Naming Windows Forms buttons "btCancel" isn't a horror, and neither is naming your interfaces I*, especially because it matches the standard .NET naming convention for interfaces: quote:*Name interfaces with nouns or noun phrases, or adjectives that describe behavior. For example, the interface name IComponent uses a descriptive noun. The interface name ICustomAttributeProvider uses a noun phrase. The name IPersistable uses an adjective.
|
# ¿ Mar 29, 2013 20:17 |
|
DAT NIGGA HOW posted:If this guy is as smart about crypography as he makes himself out to be with his tone in the article, they why is he spending his time writing blog posts? Why should I trust this guy's assessment at all? Maybe if he had an alternative that other experts can either agree is done right, then I'll listen to him. Otherwise its just blogspam. Welcome back how!!
|
# ¿ Jul 7, 2013 01:15 |
|
Pilsner posted:Heh, I thought of that too. Other annoying variations are "exc". Or naming it when it's not even used is bad. All of my exception variable names are either "e", "ex", or an acronym for the exception like NullReferenceException becomes "nre". How else are you supposed to do it?
|
# ¿ Aug 5, 2013 19:25 |
|
Shinku ABOOKEN posted:I am guilty of using PROGRA~1 more than once. Escaping paths is mklink /d "c:\program files (x86)" c:\bin32 mklink /d "c:\program files" c:\bin
|
# ¿ Aug 26, 2013 22:12 |
|
|
# ¿ May 9, 2024 06:29 |
|
Monkeyseesaw posted:This may be unpopular but I think git is a bit of a coding horror in the fact that it fails to really hide any details of its implementation and makes source control more complicated than it should be. I really didn't grok git until I realized my branches were pointers and my commits were nodes in a graph. I've never had to understand the internals of any source control system like that before. This is why, I continue to believe there's an opportunity for a killer git UI out there. It doesn't exist yet, but there are several okay ones like Github's clients, and Sourcetree.
|
# ¿ Sep 6, 2013 22:11 |