Linked by Thom Holwerda on Wed 27th Mar 2013 10:45 UTC
General Development "Programming is hard. Don't ever feel bad because you aren't as good at 'just googling it' as the person next to you. Don't ever let hackathon snobs talk you out of creating the next Twitter for cats or Yelp for public washrooms. Even the dumbest ideas (like trying to make animated polygons disappear and reappear) will help you improve as a programmer. Learning to program is largely about learning to learn - and the best way to learn is to do." For some reason, I love this short story.
Thread beginning with comment 556829
To read all comments associated with this story, please click here.
Programmers
by Deviate_X on Wed 27th Mar 2013 13:15 UTC
Deviate_X
Member since:
2005-07-11

(1) The best type of code is code that does what was intended to do. (2) The seconds best type of code is code that is written nicely. (3) Hardly anyone remembers the guy who wins silver.

Reply Score: 2

RE: Programmers
by AndyB on Wed 27th Mar 2013 13:28 in reply to "Programmers"
AndyB Member since:
2013-03-22

(1) The best type of code is code that does what was intended to do. (2) The seconds best type of code is code that is written nicely. (3) Hardly anyone remembers the guy who wins silver.

It is possible to be both (1) and (2), it just takes patience, time, practice and more patience!

Reply Parent Score: 3

RE: Programmers
by Alfman on Wed 27th Mar 2013 14:18 in reply to "Programmers"
Alfman Member since:
2011-01-28

Deviate_X,

"(1) The best type of code is code that does what was intended to do. (2) The seconds best type of code is code that is written nicely. (3) Hardly anyone remembers the guy who wins silver."

For one-off coding jobs, maybe. But not in larger long term projects. Writing ugly code often reflects a difficulty in handling complexity. The worst kind of developer is one who's code lacks modularity and solves problems by hacking in changes everywhere instead of solving the problem abstractly. Their code inevitably creates problems that will compound over time, increasing complexity and creating a long term maintenance problem. I've seen it so many times it's not funny.


But on the other hand, to my disappointment, horrible code can still become remarkably successful. One example deserving public shame is OSCommerce, which many of my clients use because it was bundled by their hosting providers and they didn't know any better. The modules were never abstracted properly, which results in horrendous overlapping hacks everywhere with to integrate new features. Functions that do the same thing are copied to different files, it's truly awful code, yet there's no denying it's a successful project.

Another example is the HomeSeer automation software API. It has an absolutely brain dead COM API, which they kept as is when they moved to a dot net version instead of taking the opportunity to actually fix it. In some cases the caller is actually responsible for encoding/decoding raw device point values, which homeseer maps into x10 values even for non-x10 devices, pathetic. The API is so terribly convoluted that I ended up writing a genuine .net wrapper for it to gain intelisense and write drivers much more easily.

There are probably hundreds of thousands of other devs who've experienced this somewhere or other, and I can only imagine how many millions of man hours have been wasted in maintaining software that wasn't written by someone who cared about (or couldn't produce) nice code in the first place. For all my gripes about poor code, there's very little any of us can actually do to eliminate it's existence, so we all just have to learn to live with it.

Reply Parent Score: 2

RE[2]: Programmers
by lucas_maximus on Wed 27th Mar 2013 15:52 in reply to "RE: Programmers"
lucas_maximus Member since:
2009-08-18

Just go to the DailyWTF.com.

Most obscenities are usually committed with Java, VB and PHP (which is a language I absolutely despise).

It is a shame because VB.NET while it can be coded badly you can actually do a good job if you actually understand what you are doing and you can code quite quickly.

Reply Parent Score: 2

RE[2]: Programmers
by progormre on Wed 27th Mar 2013 16:39 in reply to "RE: Programmers"
progormre Member since:
2012-05-20

I've seen tasks countless of times that could be solved elegantly or quick with a nasty hack. Management always goes for the later as long that is a possibility. I don't see any problems with that. Don't see any problem with nasty code either, if I can add another hack and I'm told to do so, I'll do it, if I can not then I'll just tell them that it must be rewritten. Of course I would have explained that eventually the code must be rewritten when the amount of hacks gets to hard to grasp. Then it's up to them to judge whether they can foot the bill now or gamble on paying through their nose later. This is a lot more professional compared to a difficult to deal with programmer who refuses anything but an elegant solution, to me such guys have no place in a business.

So, I understand sloppy commercial code, I do not understand sloppy open source code though, in fact it makes me blush. How can you possibly justify that?

Edited 2013-03-27 16:47 UTC

Reply Parent Score: 2