Ask HN: 30s and “senior” software engineer, but I suck at programming

69 points by yamisobad ↗ HN
No I don't think its imposter syndrome. I got into tech a few years ago because I find building cool stuff, especially clone apps, to be really fun. It's like legos for me, and I build a bunch of projects using various technologies so I keep learning some new frameworks and languages. I feel good working on all sorts of applications, from backend to web and mobile apps.

Unfortunately I tried to do some mock interviews (leetcode) and got demolished. I have been practicing for the last couple of months, but I just cannot solve a single medium problem on my own without looking at some help and even then it is hard for me. I think that I'm hitting my limits because I'm finding that I am not that good at actually "programming". I have a hard time thinking about some of these problems, because I can't comprehend the question itself.

I can build UIs, or build a backend api application deployed on some cloud provider, but I don't know I just can't seem to do actual programming like the stuff you do with leetcode. This has made me really question myself and my abilities, and I'm not sure how I'm supposed to find a better job when I can't get past the technical screening.

I'm depressed because I make a decent base salary but I don't really know how to solve some of these tough algorithmic questions. I'm feeling stuck and I don't know how to get out, because I just feel overwhelmed. I want to do something interesting and hopefully make more money, but I've hit a wall. Help!

59 comments

[ 0.80 ms ] story [ 147 ms ] thread
Take an algorithms course, or read an algorithms textbook.

You'll probably be surprised at how much better at everyday programming you'll seem.

In my mind this is the only answer (at my time of reading this thread) that hits the nail on the head. Algorithms and Data Structures is something you learn.

And disregard everyone who says "I don't actually need this in my job". They may have just forgotten how trivial it is for them to implement a binary search instead of a linear scan at the proper place with a second thought. Or they really don't... and have code out there that does in 15 seconds (or much worse) what could have been happening in the fraction of a millisecond.

But, like most "mathy" subjects, this is not something that you usually pick up on the go. At the very least you need a solid foundation, and that only comes through serious studying. Taking a textbook, opening it at the first page, and starting to work through it is one of the better ways to achieve that.

"Mathematics, you see, is not a spectator sport." - George Pólya

My experience lines up with your position that these things can’t be learned passively. An alarming number of new grads I’ve interviewed have a tenuous grasp of the fundamentals (the less likely the material is to show up in an interview the shakier the understanding - looking at you computer org).

And a lot of these are graduates of their state’s flagship public university. I can only assume the schools are more than willing to just let students go through the motions. Every new grad filling their electives with AI/ML classes probably doesn’t help either

Thank you. Do you have any suggestions? I bought a book that was recommended to me, CLRS intro to algorithms. I've tried going through the book, but maybe I'm too dumb (I didn't go to college for engineering) and I find a lot of the math concepts in there confusing.
I very strongly recommend an actual course. As a senior dev, you should be able to afford a bit of travel, and most universities allow walk-ins at no cost. Georgia Tech also has a critically-acclaimed online MS program, which might be worth looking into.

That said, if you're not wanting to do an actual course, I'd recommend Sedgewick's book. The trick when reading an algorithms book if you're not presently at its mathematical level is to skip all of the math you can't currently understand. You'll eventually pick up on it, but in the meantime, you'll also get a lot from just reimplementing the algorithms from the book in whatever your favorite language is, and doing whatever exercises you're capable of handling with a bit of effort.

As an alternative, you could pick up “Algorithms Illuminated” by Tim Roughgarden. Get the Part 1 book, read it casually a few times to get a sense of what’s in there, then go back to the beginning and start slogging through the exercises. Don’t hesitate to look for stuff on Google and YouTube when you’re stuck, but keep reviewing as much as necessary until you’ve legit learned the material.

This is the approach I’m taking. Too soon to say if it’s working out yet. I’m thinking long term rather than getting a job offer at X company in Y months. There might be other books that work better for you than the one I recommended. I’m also in my 30s and have a job I’m more or less satisfied with currently.

I have this book. I found it to be very unnecessary in my leetcode journey. What worked for me is repetition. It’s mostly just pattern matching. I got into three faangs recently so my strategy worked for me.
which book do you recommend ? and can you describe preparation process
Sure. I don’t recommend books or courses because they go deep into theory whereas this is a different endeavor.

I recommend coming up with templates for the finite amount of problems.

Recursive Graph/Tree Linked List Array

The array problems can be the most unique, which means a template isn’t always possible.

Practice timing yourself. This is harder than it looks.

Stop problems that take you too long or they’ll wear you out. Come back and solve them again.

CLRS is definitely not a good self study book. it is a great textbook if you have a professor teaching from it, because it is pretty thorough and covers a lot, but I would not feel bad if you couldn't reach yourself algorithms from it.
Well, being a good engineer is about more than knowing all the leetcode algo ins and outs. If you're bound and determined to work someplace that interviews primarily on that basis, treat the leetcode like an entrance exam- cram cram cram and you won't need the leetisms very much after you pass.

Do you understand how to set up testing for the right things, how to design for testability? Do you understand the ins and outs of HTTP and object API design? How to review code for the right characteristics per PR? How to distribute and scale computations, how to build for economical operation as well as CPU and memory performance? How to write a spec or an onboarding doc?

Leetcode is a do-it-the-way-prominent-companies-did-it meme. It's not wrong on its own, but it's one dimension out of many, and the best leetcode problem solver I ever interviewed was a terrible senior engineer.

People want to pay for backend api apps deployed on a cloud provider.

Some people are autodidactic, it doesn't mean you 'suck' at programming, just canned quizzes don't align with what you are good at.

95% of developers don't have to solve actual algorithm problems in their daily jobs and very few of us actually do leadcode style of programing. I'd agree that an algorithm book/course will help, but solving people's problems is not always the same as solving algo problems. So, yes, read on the theory, but also look for companies who are just looking for people with practical skills. Good communication and diligent work are diferentiators as well.
This. "What customers want" is not for you to solve a leetcode problem. Never. You may have to solve such a problem to get them what they want, but what they want is something else - some problem solved, or to be entertained, or some such.

If you can deliver that, then who cares about leetcode? (I know, some interviewer did. And the FAANGs really do, because a small improvement can add up to a huge number of machines for them. But for most employers, it really doesn't matter. You can find ones that don't interview that way, too.)

(comment deleted)
Two options are to either continue studying Leetcode questions until you just know how to answer Leetcode questions, or apply at jobs with a more sane technical screening process.

They do exist: I just talked to a friend who was expecting an offer from a large company. He said: "They didn't ask me a single whiteboard question, they just sat down and talked to me about programming. It was weird."

I know this dead horse has been beaten a lot already, but isn't it funny how so many companies evaluate people for a job by asking them to answer questions that actually doing that job will not make you signifcantly better at answering?

The best boss I ever had asked me to whiteboard factorial recursively. I don't think it needs to be much harder than that to see if someone can solve a basic problem and knows—at least basic—CS stuff.

I won't work at a company that goes crazy with the leetcoding

"When I'm not working, I sometimes think I know something. When I am working I realize I don't" - John Cage

Programming is not a hard science, it isn't a bunch of Engineering tables, there is no equation that returns an app. Donald Knuth said it then, and it is just as true today, Programming is an ART. You have techniques, usually they mean nothing, or need real massaging, you have experience, but the conditions have changed, you have a reputation, but you don't 'paint' like that anymore.

and those tests HR hands out. Man, don't make me laugh. You want to be a journalist? Ok, let's test your typing speed, oh, fine, ok, you're hired. It is not only madness, but I suspect it is a contributing factor to the horrors my industry has unleashed over the past 50 years. My teachers didn't call themselves "computer engineers" unless they built chips, no one said "software engineer" except maybe NASA; I think we could do better as computer /scientists/ but industry doesn't /do/ science, there's no money in it.

#end of curmudgeon rant

what you have is the ability to see the problem to be solved, the facilities and resources that may be available, maybe not, and a mind that folds, and sifts, and tucks and whittles and reforms that chaos into something no one has ever seen before, nor will see again (competitors legally can't replicate your experiment!) and that, I would say, defines a software program more than it describes yet another condominium or suspension bridge clone.

So, now, what is it about the reality of the situation that makes you think you suck at it? Right: EVERYTHING. We /all/ suck at it, every last one of us to the end of our days, because it is like music, or painting, or writing plays, no matter how many times you try, it always falls just a little short, and somewhere, painfully known to you, someone else does that bit a bit better. John Coltrane admired John Gilmore of the Sun Ra Arkestra, he said, "John has it."

That feeling is not going to go away, sorry.

So ... what needs doing now?

(comment deleted)
Leetcode isn't programming. Leetcode is pattern-matching which rote-memorized algorithm will solve a problem in the expected time/space. If you want to get better at programming, find some side projects you're passionate about and make time to work on them (if you can). If you want to get better at leetcode, force yourself to do them N hours per day. If you find both of these distasteful, you'll have trouble in your dev career, and might find management more enjoyable.
Thank you, I'm definitely not giving up on the LC I just need to figure out how to build a solid foundation for it.

As for career, I really enjoy building products. At work I've been the lead on a few end to end full stack projects that I'm very proud of. I like to set up projects and then get a lot of pride feeling knowing that in the future other developers will be extending this base project as it grows.

I am trying really hard to find a job where it involves understanding the customer and business needs (I really like to get on calls with our product manager/designer, and then work together to develop and test the solution), and building the best product. My favorite feeling is shipping something that people find useful, so idk which companies or what roles would really let me shine best there. One of my goals is to get better at networking, to see if I can get some job like a technical co-founder of a startup I think that would be a dream for me.

If you know anything let me know, I'll check it out. Sorry for blurting out a lot of details I guess I'm just feeling defensive still after that mock interview lol. I feel like how can I be a co founder when I cannot even pass a Leetcode?

Have you taken an algorithms course?

Working through Skiena's Algorithm Design Manual [0] would be a good start and/or watching his lecture series on Youtube [1].

Other great books include Elements of Programming Interviews [2] which comes in Java, C++, and Python flavors.

It can help to focus on a smaller subset of Leetcode problems to learn the tricks that underlie most of them. Neetcode [3] is a good collection of those problems on which you could focus your time and efforts.

I don't think it's realistic to expect to do well on Leetcode without practicing the above skills to some degree, so I wouldn't be hard on yourself if it's been years since you even looked at the material.

[0] https://www.amazon.com/Algorithm-Design-Manual-Computer-Scie...

[1] https://www.youtube.com/watch?v=dphSwq5jP1A&list=PLOtl7M3yp-...

[2] https://elementsofprogramminginterviews.com/

[3] https://neetcode.io/

Don’t give up. The parent comment is very much inline with how I feel. I was in your shoes a couple months ago and passed interviews at 3 faangs. Just grind the leetcodes. Course are not the right way imo. Repetition and pattern matching will take you there.
Leetcode is programming.

It's not sprint planning, 1 on 1s, backlog grooming, jira tickets, slack support, gathering requirements, making estimates, negotiating features with management, responding to alerts, or the million other things you get sucked into as a nominal "software engineer".

But it's definitely programming.

It's a specific style of working, not entirely unlike TDD, with a specific theme of problems which aligns well with the content of undergraduate algorithms and data structures courses.

Is there a degree of pattern matching and rote memorization? Most certainly!

And does pattern matching and rote memorization play a significant part in real world programming? Definitely! If there's not as much memorization happening it's because the art of copy and pasting from stackoverflow supplants the need.

And presented with wishing to learn the content of a university course, what's one rather effective technique to achieve it? To do exercises, a lot of them, and when you're stuck look at how other people solved them.

That's all leetcode is.

Perhaps others think that undergrad course in algorithms and data structures is useless material but I do not. I think it makes you a better programmer.

I think a better way to phrase what the parent is saying is that Leetcode is not software engineering. You can be awful at solving leetcodes and still be a great software engineer.

Now, do I think algorithms and data structures make people better programmers? Absolutely. But I feel like most people work on in an area like web development where the usefulness of it is severely reduced when you are working at such a high level of abstraction.

I agree. Memorizing algorithms to answer leetcode questions have their benefits but it’s extremely rare that a front end web developer would need those skills. If they did, that would mean the backend engineers aren’t using the right approach to organize and serve data to the client.
The point is if you know the basic algorithms and can apply them you don't need to memorize the answers to leetcode. You can (Gasp) come up with them.
Perhaps "leetcode isn't programming" is hyperbolic, and philosophically arguable, but what's 100% clear is leetcode uses a different skillset from real-world programming, and if you want to get better at one, doing the other won't help.
Spring planning, backlog grooming, etc. are not the examples I would use if I wanted to support the opinion that leetcode is not a real programming. (I definitely agree that some knowledge of algorithms and data structures can be very beneficial.)

My examples would be activities like building complex systems, maintaining and extending them, making them modular and flexible enough, doing performance analysis, identifying risks, and addressing technical depts, considering and implementing different architecture patterns, creating efficient CI/CD pipelines, automating routine.

you are wrong. it's not. it's simply memorizing optimal solutions to obscure programming challenges. the goal is to reproduce the optimal solution within a few minutes. nobody can do that, unless you memorize what the optimal solution is. the reason leetcode has become popular is because that gayle woman lobbied herself into a position of power at google and then wrote a book so she could profit from a "problem" tech companies think they have.
Try to break into Haskelling - leetcode doesn't apply + it's a lot more fun that normal programming. I don't normal program anything large anymore. Waste of consciousness-seconds :)
Sounds like you can do a bit of everything. Time to become a manager and make leetcode someone else's problem!
I'd recommend doing some of the free Stanford or MIT CS courses online and really trying as if you needed the credits to graduate. Don't quit when it gets hard because ultimately you want to be compensated for not quitting when problems get hard.
You know, I used to feel the same way, "good at my job bad at leetcode", but after asking around a bit, now I'm genuinely wondering how many people out there actually can get optimal solutions on leetcode problems without any practice - which seems to be the real insecurity that gets under people's skin when they write another lamentation on the state of tech hiring.

It sounds to me like the primary purpose of these difficult DSA questions seems less about accurately gauging one's ability to do the job and more about paring down a veritable tidal wave of applicants that big-name companies like FAANG routinely get. As such I don't think it's so unreasonable to get demolished by these kinds of problems if you haven't done any practice at all on them. Rather than looking at it as an indictment of your programming skill, it's probably more indicative of you not having trained enough for the "FAANG-lympics". They're all basically competitive programming problems. Of course you're going to get demolished if you haven't trained for a competition.

With that in mind I think if you look at smaller shops, they may not give you these academic-tier math questions (I know we sure as hell don't), more stuff like fizzbuzz or recursive factorial or any other very trivial whiteboard style question. At least where I work I know we don't get people beating the door down, and if we just cargo-culted Google's process on the comparative trickle of applicants, we wouldn't get any asses in the seats at all. Of course we also can't afford to pay FAANG-tier wages.

I guess you can look at it like this: the highest paying jobs all have the most difficult interviews. Almost everyone I talked to literally practiced to do them, it's not a talent thing, or might not be anyway. This can be avoided by applying to smaller, less-paying shops, so I guess it's ultimately a question of how much you're willing to practice and for what salary.

What's a few example problems that you'd be surprised people can solve?
It's not a LeetCode problem but I'd be impressed if someone can come up with the 4-liner recursive solution for the Tower of Hanoi problem.

https://cses.fi/problemset/task/2165

https://www.mathsisfun.com/games/towerofhanoi.html

https://www.geeksforgeeks.org/c-program-for-tower-of-hanoi/

Yeah it is a weird problem. I actually got asked a similar problem about seven or eight years ago (but was not presented as a tower of hanoi problem) - and the interviewer asked if I could come up with a closed-form solution.

I think one does exist and is not too crazy to understand but that was a trip.

You can use the the recursive solution to generate the closed form solution. The interviewer was asking you for the closed form solution to see if you could exactly compute the complexity of a recursion.
(comment deleted)
Just keep leetcoding. I couldn’t imagine solving a medium on my own a year ago and now I’ve done 450+ mediums and have one of those jobs that I thought only “geniuses” could get.

After enough practice, it’s just becomes muscle memory.

I'm not sure what to make of this. Does it mean Google, Amazon, whatever companies do all this leetcode stuff in interviews are just full of people who have superhuman motivation to memorize stuff but perhaps don't really understand it on a deep level? (no offense) If so it all seems a bit ludicrous.
A "few years" might be considered a long time in software development terms but in the rest of the world, not so much. To be proficient you need to put in your 10,000 hours which translates into 10 - 20 years depending on how much time you actually spend coding in your current job. In many jobs, the work required of you is mundane and may not provide the practice or challenge you need to progress to the next level, so it may be helpful to take on a side project or other means of building your skills. 30 is still pretty young, and "senior" software engineer is in fact a mid-level position, most senior software engineers have not achieved true expertise. So keep plugging ahead, if you want to get better, otherwise you can always switch roles and go into management if you don't want to put in the time.
Saw the 10K hour thing and just want to give a counter to it. I've been reading Steve Kotlers book, Art of the Impossible and it's been a great read so far.

One of the take aways is that mental flow state can really shortcut certain mental processes. This including picking up new skills in a much shorter time span.

Would recommend the book and just as a disclaimer, I'm still in the process of implementing some of the ideas in the book. Seems promising though.

I'm also on my thirties and having some difficulty with leetcode. Something that has really helped me is Grokking the Coding Interview. It goes through a few patterns for solving algos. I'm not smart enough to figure these patterns on my own and the patterns I have learned have given me a really good place to start from.
Fuck leetcode. It's a good exercise for the math inclined. It's useful to do a few to learn how to pattern match. It's not the be-all-end-all of programming. I ask a leetcode question, ask people about approaches, and I'm more concerned that they can write any code and that they can figure out how to problem solve than any particular problem. A good train of thought is as valid as a working solution, though I do expect to see some code (and will ask fizzbuzz if there's not any algorithm for my problem in the first 15 minutes)

Code. Practice Coding, in both leetcode and real forms for an interview. It's an unfortunate necessity that you study a little for an interview, and sometimes a lot.

math inclined? it has nothing to do with math, but more with memorizing certain optimal solutions to obscure programming problems.
I also had that problem, I grinded through 200+ problems but I felt like I was just memorising leetcode solutions. I dont wanna be a shill but if you can pay, then check out a site called structy.net, it's a hidden gem. Nevertheless you dont need to pay as 50% of its content is free. Compared to famous paid interview prep resources like algoexpert, it's way cheaper, explanations are more succinct, and personally I find it explains things better.

I worked through it and I'm confident I can smash leetcode mediums, especially trees and graphs. Arrays and Strings I found to be the hardest at leetcode hard level as there are a ton more corner cases to handle and there's almost no problem solving patterns in solving many of them, unless it's the "easy-hard" type (usually backtracking types like Sudoku Solver are manageable). Most leetcode hard array problems are just pure manipulation and observational/ad hoc types and it's hard to get good at them as there's little practice available in leetcode to ease you to such problems. One has to go to sites like codeforces to practice these ad hoc types, and it's annoying as codeforces problems are mathy. Luckily, those hard array problems dont appear in leetcode style interviews.

Anyhow, structy and the "top interview questions" from https://leetcode.com/explore/interview/ were enough for me to go from "forgot everything from algorithms class" to interview ready.

Only one way to get better, keep at it. Eventually you’ll learn it, who cares if it takes you longer than what you would consider normal. It would be a shame if you gave up just because it is hard. It’s a worthwhile challenge.

Try not to be in a rush too much, and just spend some time on a particular class of problems that you’re struggling with. Watch videos, look at the solution and try to understand it. Sketch out the given solution on paper if you need to. Implement the solution a couple times until you can do it without looking, perhaps in different ways.

If you just get in a habit of practicing (and do without stressing yourself) and you’re patient, you’ll get there. At first it will seem like you’re not moving anywhere but eventually the work will pay off and you’ll have gained a cool skill, and probably improve your thinking skills in general.

I just watched a video today that I think may help a bit https://youtu.be/hIJdFxYlEKE.

Besides the advice he gives in that video, I’d highly suggest trying out Anki if you haven’t. Memory is related to how often you encounter something and with code interview type topics you rarely actually encounter those on a daily basis so it is hard to actually memorize it “naturally”.

But using something like Anki allows you to choose what you want to remember.

You shouldn’t even want to work as a dev in a position that is screened by leetcode. Not because the interview sucks, but because you’re going to hate the job. You won’t be using legos, you’ll be building lego bricks.

It’s not the same job. low level engineering is nerdy and often tedious, and is not for everybody.

You may like cooking, but don’t necessarily enjoy building the oven.

There is a place for people like you in tech. Just do your thing, stop worrying and let the leetcoders be.

On one hand you don’t have to be algorithm-smart to handle many real world challenges, since software engineering nowadays is mostly business, architecture, product, not math.

On the other - you can and should learn some fundamental CS ideas and algorithms until it’s in your fingers, otherwise you’ll find yourself often missing crucial details and making not optimal decisions in your work.

You don’t have to be a genious to learn most of it. It’s a matter of time, practice and perseverance usually. Not many people i know who get these things quickly and naturally.

If your job is to solve Leetcode type of problems and it is under threat, then by all means feel free to depress yourself.

If your job is to put out functional products within a team to the consumer so that the company can make money to pay your salary, then you have nothing to worry about.

LC is a bad measurement for your abilities as a software engineer since it only measures a very small subset of what software engineering is, heck, of what programming is!

You spend a lot more time in plumbing and debugging than implementing algorithms, and if you ever have to use one, it’s very likely that your manager would prefer you use a well tested library and move on to the next story in Jira.

Saying that LC is “actual programming” is a bit narrow. Actual programming takes into consideration architecture, code maintainability and readability, judgement calls between using external libraries vs building in-house, proper use of tools (IDE, cli tools, etc…) and a bunch of other stuff.

I’ve suffered working with code written by individual that are good at LC but wrote such unreadable spaghetti code that I wonder if they thought they had a 40m timer like in LC that they couldn’t bother writing a complete word as a variable name.

So no, don’t measure your worth by the fang sieve of LC and the likes of it. I actively avoid companies that use those as their measure to assess technical abilities because it makes me question what type of coworkers would I have.

You can try and get into non programming roles. Those usually pay on the lower end but depending on the visibility, can offer a faster growth path. There are roles like Business Analyst, Data Analyst, Scrum Master, Project Manager, Product Manager. You could also do non-programming certs like AWS, Salesforce etc if you want to get out of programming.
> I'm depressed because I make a decent base salary but I don't really know how to solve some of these tough algorithmic questions.

Talk to a therapist. You're tying your ability to solve fucking Leetcode to your self-worth.