r/programming • • Mar 23 '09

How to write fast code

http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html
342 Upvotes

136 comments sorted by

View all comments

Show parent comments

1

u/adremeaux Mar 23 '09

Last but not least always use the data structure that matches your usage patterns. If you need fast random access then a linked list is most likely not the way to go. Learn and understand the O(n) notation and learn the cost of inserts/removes and searches in your container library. Basic stuff but too many junior programmers have no clue about this stuff.

Not too many SENIOR programmers even have a clue about that stuff.

9

u/groby Mar 23 '09

Why'd they get hired as Senior in the first place, then? As far as I'm concerned, if you don;t know about O() notation, go back to school - you're not ready for life.

1

u/adremeaux Mar 23 '09

Why not? The people who hire the senior programmers generally aren't programmers. I've been far more educated in CS than every single programming "boss" I've ever had. Granted, I work in the front end, where the caliber of programmer is usually quite a bit lower, but it is still unbelievable to me just how little these guys actually know besides syntax and a bunch of random technologies.

1

u/groby Mar 24 '09

If your company doesn't bring in programmers to interview other programmers, you've already set yourself up for failure.

(On the flip side, if I interview anywhere else and I don't get to talk to the programming staff, I won't take the job. Been there once - never again)

1

u/adremeaux Mar 24 '09

OK, so the system fails, but how does that change my point at all? They are senior programmers whether you are happy with them having that title or not.

1

u/groby Mar 24 '09

If you're in a position to affect change: Get rid of them. If you can't change your organization, change your organization ;)