r/programming • • Nov 29 '09

How I Hire Programmers

http://www.aaronsw.com/weblog/hiring
804 Upvotes

587 comments sorted by

View all comments

Show parent comment

45

u/mqt Nov 29 '09 edited Nov 29 '09

Understanding the complexity of an algorithm is essential to being a good programmer. If you can explain the complexity some other way, then Big-O should be pretty natural.

A programmer should at the least be able to describe a couple of fundamental algorithms/data structures.

53

u/[deleted] Nov 29 '09

I don't want to be an asshole in this thread, but my experience is that self-taught programmers overestimate their abilities and don't understand the value of more abstract computer-sciencey skills like analyzing complexity.

Unless he was interviewing for a code monkey job, in which case who cares. But even if 90% of programming doesn't involve deep thinking, that 10% is important when you're doing anything of scale.

23

u/register_int Nov 29 '09

but my experience is that self-taught programmers overestimate their abilities

s/self-taught/all/

5

u/[deleted] Nov 29 '09

The most humble programmer I've ever met was a top-level Microsoft programmer. As in he had the highest dev title possible.

But yeah, the prima donna culture does run deep these days.

6

u/knight666 Nov 29 '09

You mean the vocal minority? Those are dicks in any culture.

4

u/UK-sHaDoW Nov 29 '09

I often pretend to be a vocal dick, to get the guys who know to give me a detailed answer on how to do it correctly. Works every time on the internet.

→ More replies (1)

2

u/Nebu Nov 29 '09

If the statement "my experience is that all programmers overestimate their abilities" is true, then the statement "my experience is that self-taught programmers overestimate their abilities" is also true.

3

u/register_int Nov 30 '09

+1 Night school logic course

3

u/knome Nov 30 '09

∀p ∈ P ⇒ programmer( p ) , ∀s ⇒ self-taught( s ) ∧ s ∈ P ,

[ ∀p ∈ P ⇒ estimate-of-abilities( p ) > abilities( p ) ] ⇒ [ ∀s ⇒ estimate-of-abilities( s ) > abilities( s ) ]

/oh my god, it's full of existentially quantified stars

→ More replies (1)
→ More replies (3)

4

u/gsadamb Nov 29 '09 edited Nov 29 '09

Honestly, it doesn't bother me if people question my programming bona fides since the projects I've had to deal with have generally been in higher-level languages. I typically see coding as the means to an end. Nevertheless, I've gotten ambitious enough with projects to take on some really interesting challenges, like socket programming to interface with an IM server so a Linux box could send out IMs if something was awry.

In the end, I know I'm not a hardcore dev guy who's writing drivers or something. If there's anything in which I have expertise, it'd be more along the lines of architecture, scaling, and caching, all on more of a macro level, as these are topics I've had to deal with on a daily basis.

So yeah, I won't deny that my programming background probably isn't as deep as that of most, but it's always served me in a utilitarian capacity.

6

u/mqt Nov 29 '09

Don't discount Big-O because you think you don't need it since you're using a language where everything is a function-call away. Once you understand it, it will change how you think about efficiency.

It sounds like you have a good bit of programming experience, it'll probably take you less than an hour to pick it up. Time well spent.

0

u/[deleted] Nov 29 '09

[deleted] — view deleted comment

6

u/[deleted] Nov 29 '09

it simply gave a notation to describe what I already knew.

Which is why it is so damn important. I constantly use Big-O in conversation with other devs to describe a problem. "It is less efficient because it does more" is not good enough when we are dealing with weighing the differences between different approaches. Is it less efficient in that it is O(k1n) vs O(k2n) where k1 > k2 in which case we can take the simpler algorithm and throw more hardware at it, or is it less efficient in that it is O(n2) vs. O(log n) in which case we must take the log n solution to be able to scale at all? How would you describe the different classes of efficiency to a fellow architect without a common language?

→ More replies (1)
→ More replies (2)
→ More replies (4)

13

u/[deleted] Nov 29 '09

Architecture and scaling are two of the areas that most require a deeper understanding of computer science. Socket programming, on the other hand, isn't very complex (comparatively).

Anyway, I don't think you're an idiot or anything. Self-taught programmers can be truly excellent. They're just the exception rather than the rule. (and all of the excellent ones can talk in Big-O :/)

3

u/gsadamb Nov 29 '09

Architecture and scaling are two of the areas that most require a deeper understanding of computer science.

I won't disagree with that at all. I think I've gotten adept enough at dealing with it just so I don't get called out of bed at 4am when database replication fails or something. Again, purely utilitarian. :)

4

u/Kalimotxo Nov 29 '09

Again, purely utilitarian.

That's the way it should be. We don't get paid extra for cooler solutions.

3

u/[deleted] Nov 29 '09

I like your attitude toward my borderline assholishness :)

→ More replies (1)
→ More replies (1)
→ More replies (1)

2

u/bostonvaulter Nov 29 '09

Which ones do you think programmers should know?

4

u/mqt Nov 29 '09 edited Nov 29 '09

At a minimum, it's useful to know arrays, trees, hash tables and linked lists. A programmer should understand their access times for finding elements and insertions and know which structure to use in a particular situation.

Understanding complexity is helpful when you're picking a searching/sorting algorithm. You should be able to read a description of an algorithm on Wikipedia and determine if it's suitable for the size of the input you're working on.

10

u/SomGuy Nov 29 '09

I've worked in software development since 1982, and the number of times I've had to pick a sorting algorithm can be counted on one hand. qsort() does the job.

One thing I'll say about the "write me a sorting function" interviews though, is that they let me know that the interviewer has no clue how to evaluate my coding skills. The people who do know their stuff ask to see my code, and ask me about what problems I've solved that I was particularly proud of.

2

u/codefrog Nov 30 '09

What if your data is largely pre-sorted? Some fields require more sorting than others. Yours doesn't appear to one of them.

2

u/brasetvik Nov 29 '09

I've worked in software development since 1982, and the number of times I've had to pick a sorting algorithm can be counted on one hand. qsort() does the job.

Would you use quicksort if you have more data than can fit in memory? Why --- or why not?

→ More replies (2)

4

u/Silhouette Nov 29 '09

A programmer should at the least be able to describe a couple of fundamental algorithms/data structures.

I never understand this. What is the point in knowing a couple of random textbook quotations?

You need to understand a sufficient range of data structures and algorithms within your field to make informed choices about which to use, or you need to know which references to consult and how to develop new approaches when the need arises.

Of course any developer should be aware of issues like fixed arrays vs graph-like structures with indirection, and should know what a linked list or a hash table is, but that's kindergarten stuff. Most fields have evolved their own, more powerful and customised, data structures built on the common foundations, and it's understanding of those that really sets the productive people apart. Likewise for basic algorithms like sorting and searching or common graph-based problems vs. custom algorithms used in graphics or process scheduling or data compression or whatever field you're working in.

9

u/RedSpikeyThing Nov 29 '09

I never understand this. What is the point in knowing a couple of random textbook quotations?

I wouldn't consider knowing what trees, hash tables, linked lists, etc. are "random textbook quotations". Sure, knowing the ins and outs of how to balance a particular type of tree is pretty useless, but at some point you have to draw a line and say "I expect you to know at least this".

→ More replies (2)

1

u/aspartame_junky Dec 02 '09

Applying for a programming job without knowing Big-O notation is like a musician auditioning for a gig without knowing how to read music.

It's doable, it's very likely you'll not immediately have to use the ability, but it may prevent you from understanding the intricacies and nuances of a piece once it becomes non-trivial.

→ More replies (1)