Sponsored by Travelzoo
Take Advantage of Ridiculously Low Holiday Airfares view!
travelzoo.com - Flights $52 and up for Thanksgiving, Christmas & New Year. But move on it now.
121 Comments
- novaworks, on 10/12/2007, -1/+80Sheesh - thats how I code anyway, and I thought I was a good coder.
- Lososaurus, on 10/12/2007, -3/+68"How to code like a total *****."
Fixed. - Albaster, on 10/12/2007, -1/+51I've been using similar methods when naming my layers, channels and actions in Photoshop, as well as linking and blocking layers incoherently, rasterizing every path or text (while keeping a non-rasterized version somewhere not in my workplace's server), etc...
Graphic design is a thankless job, so I might as well make my files as useless for other people as I can so I grant myself a long, long stay at my crappy but well-enough-paid job.
I'm a bastard. - Kaioshin, on 10/12/2007, -0/+46I showed this to my programming teacher some time ago. He actually begged me not to give this link to any of my schoolmates, as they might have taken it seriously.
...come to think of it, I didn't. I should do it now. - inactive, on 10/12/2007, -1/+46int AirSpeedVelocityOfAnUnladenSwallow = AFRICAN || EUROPEAN;
- compu73rg33k, on 10/12/2007, -2/+44Try to stay away from the technology section then, especially the programming sub-section.
- championchap, on 10/12/2007, -0/+30haha, what do you think Digg is?!
first and foremost, its a social, technology news site.. so what, programming isn't relevant?
or maybe.. just maybe, your the kind of ***** we were all worried would show up when they added the funny videos section?
***** off. - dh8r, on 10/12/2007, -0/+29Except when you come back the next day and *gasp* find that you yourself cannot read it.
- polymorp, on 10/12/2007, -3/+31An oldie but still instructive.
- forgetfulca, on 10/12/2007, -1/+27They aren't decimals. Clearly AFRICAN and EUROPEAN are prefined integer constants.
- chris9902, on 10/12/2007, -3/+28you are because now they can't fire you as you're the only person who can fix it.
- MioTheGreat, on 10/12/2007, -4/+27Tisk tisk. You can't implicity cast decimals to ints. What is this, vb?
- headzoo, on 10/12/2007, -1/+22For a minute there I was worried that someone tracked down some of my source code. Man was I going to be embarrassed.
- chris9902, on 10/12/2007, -0/+21look above your head.
did you see this post going over it? - markormesher, on 10/12/2007, -0/+16You know, back when I was learning to code, I got yelled at by my teacher for being too tidy. My code used to look like a actual dialog... maybe he would have wanted me to code like this...
- tolbs, on 10/12/2007, -1/+17As part of my job I maintain old code, translating it for newer libraries, or implementing existing server code on new machines, making changes as neccessary.
That said I see this kind of stuff every now and then. I really can't tell you if it's intentional or not, but it really makes life a living hell at times. You can't blame a person for wanting to keep his job secure, but if he/she were to be let go for this very reason, you can bet they wont be getting any good references from previous employers.
The article rings true, a maintainer rarely ever can look or understand the just of the code they are working with due to time alloted, they can only hope to make it work and turn a blind eye and hope nothing bad happens.
There are people who see what they do as an art or a way of life, as others see it as just a paycheck. I prefer to work with the former. - jim99, on 10/12/2007, -1/+17No need for any of these techniques, just code in COBOL ;-)
- rebz, on 10/12/2007, -0/+15Not only that, but for those of us who work in groups, at work or in programming projects at college/university, this method is such a hindrance. I understand this article is intentionally humorous, but it opens up so much sore wounds from hours lost due to horrifingly ugly programming code. Not only does programming in a ledgible manner make you a better programmer, its going to make you more efficient, and really helps debugging in the long run.
Please, code responsibly. - kodek, on 10/12/2007, -0/+14Clearly they aren't even integers, that's a boolean expression.
- masterofshadows, on 10/12/2007, -0/+14you really wanna ***** with the maintainer? code in whitespace.
http://en.wikipedia.org/wiki/Whitespace_programming_language - p1p3, on 10/12/2007, -0/+13My programming teacher handed this out to the whole class.
- inactive, on 10/12/2007, -7/+20I greatly appreciate the subtle humor inherent in the fact that this article, while universally applicable, is specifically directed at Java programmers.
- ChrisSennRox, on 10/12/2007, -0/+12just to let everyone bitching know:
"This essay is a joke! I apologise if anyone took this literally. Canadians think it gauche to label jokes with a :-). People paid no attention when I harped about how to write __maintainable code. I found people were more receptive hearing all the goofy things people often do to muck it up. Checking for unmaintainable design patterns is a rapid way to defend against malicious or inadvertent sloppiness.
The original was published on Roedy Green's Mindproducts site. "
that's on the very very bottom - micro506, on 10/12/2007, -0/+11Code perl.
Just kidding, I use perl myself. - compu73rg33k, on 10/12/2007, -4/+15Not really. It's more like encoding your code without actually buying software to encode it for you. Check out microsoft.com and view the source. They use new lines sparingly...
- takeda, on 10/12/2007, -2/+13Strangely no one mentioned perl....
- cody50, on 10/12/2007, -0/+11Neither are Migratory.
- hypnotizd, on 10/12/2007, -2/+12Yeah, I've had this page bookmarked for awhile and stumbled on it again. Thought I'd share.
- eplawless, on 10/12/2007, -7/+16*****
- dracula7, on 10/12/2007, -1/+10for the front end stuff, like the source of a webpage, this is perfectly understandable. the javascript in most google apps use one letter variables, but this is to reduce file sizes and can be automatically done.
- JK1150, on 10/12/2007, -0/+9It will also guarantee that you will be on-call for every time something goes wrong...
- forgetfulca, on 10/12/2007, -0/+9It's easy to create the kind of code this article talked about. about half of the people I did my degree with don't look beyond the moment, beyond getting this or that section of code working. If you think like that while writing, this kind of stuff is exactly what will result without ever intending it. Also, it's hard for the original writer to see anything wrong, after all the whole thing is currently floating in their head, it makes perfect sense. It takes effort to create nice clean code.
I often, if given the time, will re-write working code simply because the result the second time will almost always be cleaner. Same for tracking down that hard to find bug. Re-writing rarely takes more time than bug fixing, over all, and the result is _always_ cleaner. In both cases, better product and you look like a pro. - chris9902, on 10/12/2007, -0/+8we call you unemployed.
- afx1, on 10/12/2007, -1/+8I follow most of those principles already. Don't see why it's on a humor page...
- speezer, on 10/12/2007, -0/+7Stuff I have seen:
Link to code libraries from companies likely to go out of business and will never update them for new platforms/operating systems.
Create a maintainable code base that is so huge it takes too long to compile to be useful for new projects. - inactive, on 10/12/2007, -2/+9Well, they could be decimals if you strung a creeper between the pointers...
- Bob042, on 10/12/2007, -1/+7I think I finally found how Sony must code games.
- diggmeup, on 10/12/2007, -2/+8i am going to learn from this article
- tegulizard13, on 10/12/2007, -4/+9I feel the same, I started reading this and realized a few minutes in that i was going "hey, i do that" waaaay too much.
- drakethegreat, on 10/12/2007, -0/+5The scariest part of this article isn't the article itself but that people commenting here act as if they deal with a lot of this stuff. I thought most of this really didn't happen or I at least wanted to believe that. Please for the love of god don't experiment with this. If you do you better leave your name no where the code cause I will find your number and call you so that I can waste your time as well.
- marthaphoebe, on 10/12/2007, -1/+6This is also known as STO.
- DigitAl56K, on 10/12/2007, -2/+7These days I bet a lot of us who do write code frequently use version control systems like SVN or CVS. For most projects there is more than one developer on the CC list who receives a diff when something gets committed to a repository. Version control aside, most businesses who rely on their software development will do code reviews periodically.
Coding like this is sure to get you fired, not help you keep your position. - buckrogers1965, on 10/12/2007, -0/+5I have an example of the "transparent interfaces" or "No Secrets" technique.
The worst thing from my last job, a C programming shop, was sharing the data structures in .h files to every other modules so that any code module could access any data structure from anywhere. And they did. This made making any change to the data structure of something like a string module have a thousand side effects over the entire code base.
The slightest change to any header made everything have to be rebuilt, or the compiler would get fooled and not rebuild everything and then the program would just crash in bizarre places with the data all chewed up for no reason.
Please, please, never share data structures in .h files unless there is an actual real need. Just define the function calls and enumerations to the code module and keep all the data structures private inside the module. If only C name spaces were a little more robust then we could do full object oriented coding. *sighs* - Xiata, on 10/12/2007, -0/+4microsoft's site is pretty much generated through many, many different files when they do a 'release' of the page for static content. This will under most circumstances generate blocks of code depending on the entrances and exits of the dynamic generation unless the developer adds line breaks and formatting.
- jefree, on 10/12/2007, -0/+4Yeah, but coding in some sort of intelligent manner makes it easier for you the coder to design, debug and upgrade. Still, very funny! However, It would probably be easier to rewrite the entire project code rather than the cost and head ache to maintain such code.
- frogpelt, on 10/12/2007, -0/+4There's another side to this: What if you want to move on?
I had a professor who worked at Oracle for about 7 years and he wrote all kinds of code without doing any documentation or commenting. He left that job several years ago and he still gets calls from people asking how to fix certain parts of the code. - trogdoor, on 10/12/2007, -3/+7@compu73rg33k You weren't kidding look at this http://trogdoor.googlepages.com/Microsoft.com_view_source.png
That is an actual screenshot and notice there is STILL a scroll bar at the bottom. - hackershandbook, on 10/12/2007, -0/+4Use lower case l to indicate long constants. e.g. 10l is more likely to be mistaken for 101 that 10L is. Ban any fonts that clearly disambiguate uvw wW gq9 2z 5s il17|!j oO08 `'" ;,. m nn rn {[()]}. Be creative.
//LOL - jesusisapervert, on 10/12/2007, -0/+4@forgetfulca: Excellent points. I've noticed this myself, rewriting is the best way to squash bugs and make the code MUCH easier to read. As almost always, when you write the first bit of code it's kind of like a draft just to get the ideas out of your head. You could leave it at that, or you could come back in a few hours or days and rewrite it and end up with much better code.
- nicku, on 10/12/2007, -1/+5I like to call it job security.
-
Show 51 - 100 of 121 discussions



What is Digg?