Leetcode has taught me that I'm a bad engineer
408 pointsI've been at it intensively for a couple months and my mind simply refuses to cooperate. If anything, after having done 400+ problems I seem to be worse at them than when I started.
Since your time is more valuable than mine, let me summarize:
7+ YoE, MSc. in some science (like it matters)
Last 4 years been mostly ETL with Spark and some backend thrown into the mix with a "senior" title for devops and mentoring noobs.
I used to think this job was a creative one, since writing frameworks and libraries for further use, documenting code and extreme programming made me think that I was building something new and useful.
In fact, due to having extreme ADHD the only thing that kept me distracted during all my overtime was the ability to pursue fun and challenging things. MPP and all the cool stuff you can do with modern tools is fun, interesting and challenging.
Leetcode isn't about fun and challenging things, it's about thinking in one particular way, spitting out solutions using the same exact data structures and jumping through hoops on command without philosophizing or creating anything that can be reused/extended.
This is also what Software Engineering has become: you memorize, regurgitate and participate in agile the masquerade. Creativity is shunned. Tried architectures/patterns are what is expected.
I wish I had practiced law for the past 7ish years instead, because at least all of my skills would still be relevant.
Comments (456) 108 threads
Show all comments
Showing thread 15 of 108
How do you feel about puzzles in general?
I have a really strong antipathy towards 'solving' anything that I know is (a) already solved and (b) where the solution process is not interesting in and of itself. So I hate, hate, hate puzzles.
Your post made me wonder if there's a link between ADHD and finding explicitly pointless challenges unbearable. It feels kind of intuitively true that ADHD predisposes one to cut a lot of mental chaff in order to focus on stuff that's engaging and interesting; a puzzle is kind of explicitly chaff, it's something you have to manipulate in some way to get some predefined result.
The normal trick if you're up against this kind of intense, adhd-driven disinterest in something is to see if you can twist it in some way until it's interesting for you again. So instead of seeing the puzzle itself as the challenge, turn it into a training process for something for something you consider worthwhile.
I love puzzles though. They're short, they have a right and wrong answer. Optimization problems are especially satisfying because you can get a score, and improve on it over time when you come up with clever ideas.
I've never done any problems on leetcode, but thats absolutely my wheelhouse and I love that stuff. A few weeks ago I invented a new String (Rope[1]) class by combining skip lists and gap buffers. I don't know if anyone else has ever done that before. Its 3x faster than the next fastest library I could find. There's probably an academic paper in that, but that sounds really boring.
Maybe its useful for other people, but I think if you said "leetcode is a training process" to me, that'd make it more boring. For me the fun part is finding those puzzles in regular code. ("Sure this algorithm is simple but its n^2. I wonder if there's an O(n log n) approach out there somewhere..?")
[1] A rope is a "fat string" for text editors and things, where you want to insert / delete characters at arbitrary positions. My library is here - https://crates.io/crates/jumprope
But plenty of algorithmic ideas are broadly applicable and useful. Eg, b-trees, bloom filters and priority queues have some wild uses across a host of problems. Those tools strike my fancy.
I also find it unbearable to "solve" something I see the solution to, or can describe how to solve it. In fact, if I see the solution, I find myself unable to go through the steps to actually do it, especially if there is a time constraint involved.
The trick you have described was my way to do the problems in my spare time back when I hadn't seen them before, but the whole problem is that leetcode problems are designed for an incredibly narrow range of solutions.
Analytical solutions that have poor worst case run times, but incredibly good average case run times are not allowed and a lot of mathematical approaches involving matrices and exploiting vectorization aren't allowed either.
Leetcode-style problems force you to put your mind in a very narrow box and I simply can't do that. I've always had a very great need of orthogonalization in how I think and operate; i.e. if something doesn't stimulate me enough, I need another concurrent activity that is completely different to keep me motivated.