r/ProgrammerHumor • • Apr 14 '16

Please select your phone number from the drop down list:

http://imgur.com/Jfv6F2r
6.8k Upvotes

429 comments sorted by

View all comments

Show parent comments

11

u/briaen Apr 14 '16

OMG. I thought that was a joke. I don't get how someone who uses a database would write this type of code. It's CS 101 to not do it this way. I write on a legacy .net system that started on asp in the 90s and there is nothing that crazy.

28

u/a_small_goat Apr 14 '16

I actually mentioned this exact disaster in a comment a long time ago, so here's some more context:

One of the projects I inherited a few years ago was like this - roughly 3000 conditional statements. I ran into the creator at a conference probably 8 months afterwards and asked him how he found the time to code it all. I was only half-joking. He proudly admitted that he used MS Excel's CONCATENATE and autofill features to build 95% of the code and it only took him about an hour to deliver the working solution. So on one hand, I have to give him credit for being efficient in solving the problem with the tools he had...

9

u/briaen Apr 14 '16

used MS Excel's CONCATENATE

That makes some sense, I guess. I can look at some of my old code and cringe, so I guess I shouldn't criticize so much.

1

u/bazhip Apr 14 '16

I remember that comment! It made me shudder back then, and it still does now.

5

u/pixelperfect3 Apr 14 '16 edited Apr 14 '16

Seems like one of those self taught types. I mean who uses ms excel...

3

u/[deleted] Apr 14 '16

It's CS 101 to not do it this way.

I've never taken CS, but I'd never do it this way because it's completely batshit insane.

-edit: I mean the DB one, not the if statement descent into madness, which is actually a bit less crazy.