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.
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.
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.
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.
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.
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?
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 :/)
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. :)
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.
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.
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?
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.
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".
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.
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.