Hacker News new | ask | show | jobs
by Too 4468 days ago
Watch programmers who don't Google how they code, it usually ends up complicated, slow and worst of all insecure. If the only tool you have is a hammer everything starts to look like a nail. Using string.join instead of paremetherized SQL queries is a typically example of this! Any tutorial on top of Google will show you the correct solution to this but if you are too smart for this and reinvent your own way of creating queries then this will bite you in the ass one day.

Even if you think you know how to do something, spend 5 minutes on google to see if this is the defacto optimal solution for your problem and if there are any gotchas you have to consider. I'm not advocating blindly copy pasting code from random stackoverflow answers but at least look at them and understand what they do, then you can copy them.

2 comments

Kind of. A lot of the time the answer is on Stack Overflow, and good ones get voted up. Sometimes I find myself on Ubuntu forums and the more mainstream nature of the users often provides quite poor hacks to get things working.
Totally agree. If I didn't google, I'd still be storing passwords as plain text, or thinking I'm smart, inventing my own encryption algorithm.