Live data from Hacker News

Ask HN: How does one have the mindset to study for coding interviews?

news.ycombinator.com

41–50 of 55 posts

Re: Ask HN: How does one have the mindset to study for coding interviews?

#41
Leetcode interviews are more of a sadistic entrance ritual than anything approximating a fair gauge of skill or experience. I see no other reason to make proven developers study textbook problems during their free time (they sure aren't implementing knapsack algorithms from memory at work).

It often goes unmentioned that these interviews test the wrong skills for software development and even instill bad practices. To wit, those artificially handicapped online IDEs force you to memorize language APIs which any real IDE would handle for you -- forget that the JS lowercase string call is "toLowerCase"? Too bad. Also, since time is of the essence, and no debugging tools are provided, you better be using an interpreted language (read: JS and Python -- and really only the former unless you can import the correct libraries) and littering your code with print statements.

Other companies opt for the ostensibly fairer "take home CRUD app assignment" but this too is a facade to lend credence to a preselected candidate pool. No matter how well you complete the assignment with all enterprise grade best practices, you'll still playing the lottery (and this time with a five hour time sink).

Bottom line is don't interpret a lack of success in this draconian system to a personal defect. Ideally, seek employers who assess candidates fairly and qualitatively.

Re: Ask HN: How does one have the mindset to study for coding interviews?

#43

Why are you so motivated by high pay, that you fear harming yourself? Just go for companies with a simpler interview process and attempt FANG after a couple of years of practice

I currently work at a FANG.

I don't think it's so much the high pay as much as it is that my peers look down on me because of the FANG I work at. I've practiced for years already (to fairly mediocre results).

Re: Ask HN: How does one have the mindset to study for coding interviews?

#44
post #22

Earlier quoted context omitted.

If I'm supposed to feel dumber, it's working.

Looks like an (unusual) abbreviation for 'asshole'

I thought it meant like 7 anonymous companies (‘a’ being a function that takes in a param) that he/she had to go through. We’re dealing with a real weirdo here (or a real a(7)) :p

Sometimes you gotta take the good with the bad.

Re: Ask HN: How does one have the mindset to study for coding interviews?

#46
post #16

You need to spend some time on mental health. if you need help, get help. either stay at your current job or take a new job that you can get now. in either case you need to figure out how to deal with stress and how to value yourself. if you really are going to self harm when you struggle on a freaking leetcode problem, how do you think it’s going to be if you actually get the job you’re aiming for and it’s hard ever…

weirdly i'm usually fine on the job, I don't feel the same way at all. I'm generally at ease even. It's tough, it's like I feel attacked by the fact that I can't solve these in 5 minutes like the other folks I see on Linkedin.

And when I'm on Facebook looking at the best part of other people's lives, I compare it to the worst of my life, and get depressed and discouraged. Thing is, other's aren't usually sharing the worst of their lives, so I'm making a comparison that's unfair to me.

It sounds like you are tying up a lot of your self-worth in solving these problems "in 5 minutes", and there a few things to unpack. First off is that "5 minutes" is a drastic exaggeration, and even if it isn't, standard interviews length is either 45 minutes or an hour - you get the full time, to work through the problem. So don't sweat the timing.

Even if you can't solve the problem, no one but you sees your leetcode performance, so just because you feel like you're failing, that's a feeling which is all in your head and it's trying to trick you into giving up. Don't let it. No one is getting hired solely on the basis of their leetcode profile.

(If you've already shared your leetcode profile with all of your friends, and/or feel like having a strong leetcode profile is going to make you a more attractive interview candidate, then make a new username not related to anything else you do online using an anon mail service (eg mailinator.com). Then, if you still feel the need to show off your speed on your leetcode profile, copy and paste the working solution from that username into your 'official' leetcode account.)

Instead of trying to rush through and do 100 problems per day, sit with one problem, for a whole month. Use different algorithms, do different languages, go for runtime speed efficiency, go for memory size efficiency. Use leetcode as a tool to help you.

Another thing to understand is that a large component of interviews is simply luck. There are only so many permutations of sum/sort/median/topN/bottomN/count possible, so during a real interview, if you get a question that's similar to one you've solved before, then a solution comes naturally. What leetcode really is then, is a gameified playground to see a bunch of variations on a theme, in order to raise the chances you see a similar problem during an interview.

Echoing other commenters about the subject of mental health - find a therapist to talk through this and other things with. My life's been better for it, and it absolutely helped me to get my life in the shape it needed to be, in order to get a job at a FAANG company.

Re: Ask HN: How does one have the mindset to study for coding interviews?

#47
post #16

You need to spend some time on mental health. if you need help, get help. either stay at your current job or take a new job that you can get now. in either case you need to figure out how to deal with stress and how to value yourself. if you really are going to self harm when you struggle on a freaking leetcode problem, how do you think it’s going to be if you actually get the job you’re aiming for and it’s hard ever…

weirdly i'm usually fine on the job, I don't feel the same way at all. I'm generally at ease even. It's tough, it's like I feel attacked by the fact that I can't solve these in 5 minutes like the other folks I see on Linkedin.

> It's tough, it's like I feel attacked by the fact that I can't solve these in 5 minutes like the other folks I see on Linkedin.

Honestly, I'd recommend avoiding LinkedIn. It's completely devoid of any personal aspect to the work people do -- it's all business-this, company-that. There's no such thing as a post that's not spun in some positive manner.

As others have mentioned, in short, it's idealized. Plus, the skills that other people have are not necessarily the same skills YOU need to succeed. That includes Leetcode problems. Which, by the way: if the company cares about that kind of thing at an interview, they probably have that same sort of mindset during the job. Not guaranteed, but keep that in mind.

I struggled with impostor syndrome for a good three or four years, despite objective successes in my programming "career" as a student. I think that finding your own value, and distinguishing that from the skills you need to succeed, AND convincing yourself that you can get those skills, is the golden ("growth") mindset.

For example: math. (undergrad CS: calc, etc.) I tell myself I'm not good at math, I struggle adding basic numbers. but I've either 4.0'd or got 90%+ on midterms or just _passed_ enough math classes that I know this isn't true. How? I realized that math is literally just practice. That's it. Work in = work out, and if you get stuck, it's about correcting false assumptions.

That particular realization allowed me to embrace the (honestly terrifying) interview process a bit easier. Leetcode isn't about "grr get this problem perfect otherwise you're trash". Leetcode is about "okay, look, we have 20 minutes to see how good of a programmer you are, here's an intentionally hard problem. how clever are you. how fast are you. and do you fit our mold". THATS IT.

So, what could you do?

First, mindset. I've been doing iOS programming for a good 4 years now, but allll that work makes me worse at Leetcode, because I over-optimize for cases that don't matter. Realizing this made me slightly better at Leetcode. Only slightly.

Remember, Leetcode is just tiny, intentionally hard problems. It doesn't represent your skill as a programmer, just your ability to express a small subset of programming skills. And honestly,getting those skills is hard. I don't have an answer for that. Maybe try to analyze each problem, figure out what it's trying to test you on, then learn that topic from scratch.

Sorry for the ramble lol, hope it was helpful

Re: Ask HN: How does one have the mindset to study for coding interviews?

#48

Earlier quoted context omitted.

weirdly i'm usually fine on the job, I don't feel the same way at all. I'm generally at ease even. It's tough, it's like I feel attacked by the fact that I can't solve these in 5 minutes like the other folks I see on Linkedin.

People always show their best side on social media sites, especially LinkedIn. Trying to measure up to an image that someone has crafted of themselves to get a job is somewhat like believing that the pictures people post on Instagram match their daily reality. You are walking into a well-known trap. Trust me - as someone who listens to coding candidates on occasion, the majority do not just come in and whip out answe…

The genius candidate is one with the quick answer but gives a slow answer :-)

Re: Ask HN: How does one have the mindset to study for coding interviews?

#49
Honestly I would suggest stop looking at LinkedIn or CSCQ subreddit most people are just sharing there wins not losses and theres nothing wrong with that what is not okay is that it makes some people depressed that because we start comparing ourselves and that leads to depression. Honestly just focus on your goal keep motivating yourself

Re: Ask HN: How does one have the mindset to study for coding interviews?

#50

Honestly I would suggest stop looking at LinkedIn or CSCQ subreddit most people are just sharing there wins not losses and theres nothing wrong with that what is not okay is that it makes some people depressed that because we start comparing ourselves and that leads to depression. Honestly just focus on your goal keep motivating yourself

Yeah, I stopped going on CSCQ years ago because I knew it was just making me more depressed. Still, I know a lot of successful people personally who privately believe I'm a failure for working at the FANG i work at so the net effect is the same unfortunately.
Post reply on HN