The path of software development craftsmanship
rainsoft.io
rainsoft.io
I saw the title and thought the article would be about how to write code that is easy for anyone to maintain. Code that scales well horizontally and across multiple processors. Code that is documented well and tests itself to let you know when a change breaks something.
I was expecting notes about architecture and how to ensure the security of your software. To always keep your end users in mind and to make everything easier for them--even if it means more work for you.
I was expecting to see examples of such craftsmanship. Best practices and praise for working tools that seem to stand the test of time.
Instead I found an article about Computer Science fundamentals and math.
Computer science isn't about craftsmanship. If it were the courses would involve code reviews and students would be marked down for lacking tests, not using source control, insufficient comments & documentation, and using conventions that don't fit with the language (e.g. camelCase variables instead_of_underscores in Python).
If it were, there would be a lot less frustrated hiring directors and despairing grads discovering that four years of comp sci doesn't qualify you for anything except teaching comp sci.
I wish to God my courses had included any of that stuff you mentioned.
In any craft, watching a craftsman work displays a large amount of vision and foresight right from the very start, knowing what parts to do first, and what rough sketches need to be completed up front. All of these decisions feed both into making the craftsman's job easier through the process, and are tuned around envisioning what the end user wants from the product and might try to do with it even if it's not part of the explicit requirements.
It looks like black magic to the uninitiated, with a bunch of random seemingly non-essential stuff happening, with all of a sudden a great product being birthed at the end.
There's no good way to bring all that experiential knowledge into a simple curriculum. Apprenticeship is the primary way to accelerate bring somebody up to a level of craftsman, after the basic fundamentals are known. This is a primary failing of modern companies; they don't allow for such internal paths of progression. Everybody's expected to be an expert craftsman straight out of university. (cue my rant about university & academia NOT being about job training)
Aka abstraction!
Quoting SICP, abstraction is the means "by which compound elements can be named and manipulated as units"
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.
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.
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.
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).
You do NOT need to know how to write a sort algorithm in order to be a great developer.
Just like you don't need to know processor architecture to design a website.
Encouraging beginners to study implementations of sort algorithms is a waste of time because they've got no context for it. They should write tons of really bad code first, like we all did. Then they'll get better and maybe some of that is studying the work of masters (depending on their learning style).
If we are talking "great _Wordpress_ developer", maybe.
a great developer absolutely must know how to write a sorting algorithm, or three, and has to have a good idea how to start writing another five. great developers are building the infrastructure that good developers use to solve business problems. (not that great developers aren't doing that, too.)
There are great developers scattered in all sorts of roles in the community. Not just building infrastructure or contributing to open source projects.
Besides, how many people need to write sorting algorithms before we say "enough! We know how to sort things now!"? I'd say that point was about 5 years ago. I think we can move on to other challenges now, eh?
This doesn't even cover security issues such as side-channel timing or entropy attacks (hard to believe?) or handling of denormal numbers (which will reduce your processing speed by upto 100x). Ever heard of using Fast Fourier Transform to achieve asymptotically faster sorting under certain conditions? All of the above have practical applications.
As you yourself said, there are interesting challenges in all communities. Let's not be dismissive of the algorithm design community.
And yes, developers need to know the fundamentals. And algorithms are one of them.
We are living in an age where we have hundreds of languages and tens of thousands of frameworks and libraries.
The only way to become pro-efficient with all of these if you know the basics and know it well.
We are past the times where you learned one or two languages in school and at home and was enough to land a decent job. No it's the time for the 'Jack of all Trades'.
And please don't write tons of bad code. We already have tons of it in legacy systems and loads of libraries around the world.
I can see a case being made for studying basic architecture patterns on the other hand...
A functional prototype is software that implements all features, but none of non-functional requirements: configuration, security, testing, deployment, monitoring, scalability, performance.
"Product people" emphasize functional requirements, aka features.
You can sell features, but it is harder to sell non-functional requirements. Non-functional requirements are EXPECTED, and rarely verified.
Software craftmanship is a movement that seeks to make developers care about what they do, in the form of functional AND non-functional requirements.
People that do not care about error handling, logging, formatting and coding standards, profiling, scalability... are prototype engineers.
Prototypes can be used to market a product, but it's unethical to sell a prototype.
I changed jobs in 2008 started using C# and realized that I was a good programmer, but a piss poor "engineer". I didn't know many of the fundamentals that he discussed, or unit testing, domain driven design, various frameworks (IOC, ORM's, MVC...) and didn't know how to manage a large project or even CI.
My algorithmic knowledge, and low level bit twiddling knowlege didn't mean anything in 2008 when it came to delivering real world business value.
I still like knowing the nuts and bolts, but it is secondary to getting stuff done.
Algorithms and data structures are tools, not products.
No. It's like using your blacksmith skills to construct your own hammer for forging. Woodworkers call most of such shop-made tools "jigs" and it's a very important part of craftsmanship.
And for the other points knowing sorting algorithms (and btw the author doesn't even mention TimSort) is completely unrelated to the software craftsmanship as others already pointed out.
I'd argue though that it isn't enough to be a good programmer! Come on, do you want to be the one hammering nails in to a piece of wood, or do you want to be the one orchestrating the building of an elegant building.
You should strive to be a Software Engineer. To me, this is what being a Software Craftsman really means. Its about the entire process of writing Software, not just the drinking coffee and banging on keys part. Its past time we start taking ourselves more seriously, and gain the respect we deserve! Lets move beyond bit flipping!
We are at a point in software development where algorithms in particular are commodities. Knowing WHEN/IF to apply them is much more critical. Just like knowing when or more importantly when not to optimize is critical.
It basically seems to just be a short list of tautologies. No one in their right mind would disagree on what is on the list, but they leave off basically anything about software that might actually help you achieve anything or improve the way you do it.
It seems to be some zen-like meditation based method of improvement, completely devoid of substance.
To be clear I need to not know bubblesort. And Fibonacci is not an algorithm.
Fibonacci was a man. The Fibonacci sequence is a mathematical sequence. The various ways to calculate the Fibonacci sequence absolutely are algorithms.
Bubble sort's arguably useful as a first learning point and as a stepping-off point to learning more practical sort algorithms...but probably not something that you'll need after that.
Will it help in this project (or any other)? Almost impossible. But it provides a nice jumping off point during education, and really, you're not likely to actually forget it, right?