4 ms·
After some years, it seems that the most fundamental thing in programming is not Bubble or Quick Sort, but naming and organization.
by rileymat2 10y ago
After some years, it seems that the most fundamental thing in programming is not Bubble or Quick Sort, but naming and organization.
- xingmu33 10y agoAgree. Depends on your domain. But for web development as I am working on right now, it is never relevant. Fundamental for me is, testing, oop design, distributed systems design.
- riskable 10y agoI'd argue that the most fundamental thing in programming is usefulness but that's just me :)
- santaclaus 10y ago> but naming and organization Aka abstraction! Quoting SICP, abstraction is the means "by which compound elements can be named and manipulated as units"
- vinceguidry 10y agoThank you for that. After five solid years of professional web development, I have to say that I only have to implement or think about algorithms exceedingly rarely, while naming and organization consume the lion's share of my time. My view on coders who insist so vehemently that "performance ALWAYS matters!!" dims more and more every year. At this point they sound more like basement trolls than real craftsmen.
- deleted 10y ago[deleted]
- Cthulhu_ 10y agoPerformance does always matter, but for practical software development, everyone should realize that someone else did it better. The most optimal data structures and sorting algorithms have already been implemented numerous times in all programming languages; a good craftsman only needs to know when to use them and why. On the other side, the person implementing said most optimal sort should know why it's most optimal and be able to explain to others every property of their implementation.
- legedemon 10y agoWhile agreeing to the fact that performance does always matter, I think the idea that "someone else did it better" is not always a good one. One should always understand the limitations of standard implementations and see if hand-crafting something of their own would benefit their application. For example, consider the case of sorting. Even though asymptotically efficient algorithms have been known for about 70 years now, Timsort - the currently standard implementation found in Python, Java and probably other languages - was invented as recently as in 2002. This is not all. What if you have multiple cores available to run your code? What if your dataset is large and locality of reference matters? What if your dataset has certain special properties which the standard implementation doesn't exploit? I agree that maybe 99% of the time, we can get away using the standard implementation but that 1% is what differentiates great from the merely good.
- Cthulhu_ 10y agoPerformance does always matter, but for practical software development, everyone should realize that someone else did it better. The most optimal data structures and sorting algorithms have already been implemented numerous times in all programming languages; a good craftsman only needs to know when to use them and why. On the other side, the person implementing said most optimal sort should know why it's most optimal and be able to explain to others every property of their implementation.
- plgs 10y agoPerformance always matters. People often tend to shut that argument down quoting "Premature optimization is the root of all evil". My opinion is that this quote was never meant to say "Performance/Optimization as a whole is the root of all evil". If you don't have to care about it, it's because someone else did it for you. And if everyone cared a little, the web would be better place for the users(40MB for a single website maybe ?). (Not talking about other areas than web development here...) Just think about it twice before dismissing that argument.
- collyw 10y agoIt doesn't always matter if your application only has a handful of users (plenty of internal applications) and defaults works at a reasonable speed. Also there are plenty of scripts that need to be run once and once only to get data from one place to another. Optimizing for performance then is pretty pointless.
- legedemon 10y agoNope. I happen to be a product manager for one of such internal applications with around 60 users. This can be considered as a handful of users when compared to the internet scale. Getting the product adopted even for such a small group was a big pain. The primary complaint - it is slow! After two rounds of performance optimizations, the adoption velocity for new features has increased 10x.
- matt4077 10y agoI think the impression may come about because algorithmic problems have mostly been solved for you. But programming languages, frameworks and libraries don't magically appear, so advocating for a more "practical" CS curriculum may lead to stagnation if it means a lack of people knowing the fundamentals. There's also the argument frequently made about math in schools that it's not so much about the specifics, but a way to teach people to think. I believe algorithms are excellent to teach abstraction and naming & organization are fundamentally about abstraction: what do these five functions have in common? what _is_ this thing? I'd add that it's quite difficult to teach "naming & organization". It requires working on a large code base because the problems & benefits just aren't obvious in a typical 200-line student program. So students will have no experience of the problems you have and consequently be rather unmotivated, whereas I still remember the fascination at the genius that is the Smith=Waterman algorithm, watching it solve a problem in 10sec compared to the 1h+ that my naive solution took. Algorithms just don't go out of style, either. If you had been taught "practical skills" in the 2000's, you'd know a lot about svn and java spring and php's $_GLOBAL, but the stuff you learnt sophomore year would have been old by graduation. (Except svn, because Linus wouldn't have had a chance to implement git without a solid understanding of data structures and algorithms).
- deleted 10y ago[deleted]