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
Earlier commentsa formal 400-level course in algorithms will go a long way, preferably at a good university with a good professor, but if you can't get that right now: https://ocw.mit.edu/courses/electrical-engineering-and-compu...
computer science is a discipline where people seem to think the education doesn't matter that much, but the truth is once you start to get even a little mathy it matters big time
I think when people say that education doesn't matter that much in our field; they are talking about formal education as offered in academia.
This is not to say that university education isn't valuable. But SE is unique among engineering disciplines because a) it is possible to learn everything relevant in self study and b) a lot of formal education in the area still teaches CS, when most people who attend the courses want to be engineers, not scientists.
On a personal note, I do believe LC has made me a better programmer. In my 3rd year of BTech, I was given a task to figure out splitwise (a bill splitting app) algorithm. I was quite proud to have written a modified version of Kruskal's which solved the problem. Last year, I saw the same problem on LC and it had a much cleaner and nicer solution to it. The solution opened up ways for me to think in different terms all together.
Similarly when I was in my 1st year, we used to play `Chain Reaction` a lot and I wanted to write a brute force A.I. for it. I had not been introduced to graphs, DFS or BFS algorithms. Hence, I had basically produced a recursion hell but working solution. Later when I had discovered DFS/BFS, I was ecstatic to say the least.
Thus, I believe LC helps/prepares/arms you with various techniques which you could leverage to solve certain problems in a more efficient (and also as a result, cleaner code) fashion.
Also, SWE is a highly movable profession, where being more than 5 years on the same place is unusual. So every ~5 years you have to polish your CV, grind LC and basically restart learning all computer science concepts you haven't used in those ~5 years, without feeling burnout or dismay.
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.
> 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.
Compare https://sockpuppet.org/blog/2015/03/06/the-hiring-post/
See https://hn.algolia.com/?q=https%3A%2F%2Fsockpuppet.org%2Fblo...
All comments shown.
Couldn't load more comments. Check your connection and try again.