What you need to get by
Here’s a genre of tweet I think about a lot:
My sister (freshman in college) texted me for Big-O proof help for her Algorithms class saying she’s scared CS isn’t for her because she doesn’t love this class. RT if you don’t think about Big-O proofs at your CS job. 🤓💻
@petecheslock @mattstratton Big O Notation. Totally useless in my day to day.
Pretty much all the runtime complexity knowledge you need is “don’t nest loops”
There’s a growing perception that a lot of what constitutes a Computer Science education is formalism and academia rather than pragmatic knowledge that improves your ability to write code.
I have two takes about this:
- There’s a lot of stuff you learn in a CS curriculum that an average software developer will not use over the course of their career.
- Being able to quickly and correctly analyze the run-time and space-time complexity of a piece of code is extremely important, and not just in the realm of theory!
I’ve had two very different jobs (Big Tech Company, Tiny Startup) and in both of them I’ve written and analyzed code that is just, uh, unperformant. There are scores of reasons for this: poor use of searching and caching mechanisms, improper ORM / relational algebra interactions, poor use of lazy data structures, and yes — nested loops.
None of these things are theoretical! They’re all germane to my day to day work as an engineer (or as a developer or as a programmer or whatever noun you care to assign to the practice of transforming business logic into an executable program). And so I get a little queasy when I see people wave off entire sections of fundamental computer science as “not a thing you need”.
This points to a bigger issue with how we teach things like runtime complexity: in the form of proofs, rather than examples. I didn’t truly understand the terrible nature of O(2^n)
until I profiled a script and saw the multi-minute runtimes; I didn’t truly understand the nuance of making trade-offs until I got to pair them with actual data and actual results. And, sure, the proofs are important — but they should augment the real-world understanding of these issues, rather than replace it.
The mistaken belief that “software engineering” is a discipline distinct from “computer science” comes not from a failure of CS concepts to map neatly to real-world use, but from a failure to teach how those concepts map to real-world use.
Yeah, proofs can be lame. But they’re also important. And disliking them doesn’t mean CS isn’t for you — but disliking something doesn’t mean you still don’t need to know it, either.
(PS: There is an alternate version of this email, a more embarrassing and personal one, centered around my conviction that Finite Automata was a waste of a semester until I got to Amazon and my Literal First Project Ever was building out a distributed workflow. As far as I can tell, the only truly useless course I had as a student was “Software Engineering”, which of course was billed as a pragmatic introduction into the software industry.)
Happy Sunday.
I hope you get to mess around with profiling some code. I did a couple days ago and it’s so much fun.