Live data from Hacker News

Ask HN: How do you make time for side projects and Leetcode grinding

news.ycombinator.com

61–70 of 98 posts

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#61
Wow, that sounds exhausting!

I've been doing development work professionally since 2000. In that capacity, I've been self-employed and worked for a number of firms providing work-for-hire development services. I worked full time for one mid-sized company (1,000's of employees) and it was not for me. I am now self employed again working on a second startup. At this point, I have enough savings to continue my current lifestyle in perpetuity whether I ever make a penny from my startup or not.

I've never heard the term "leetcode grinding" before but I assume you mean completing programming puzzle type interview questions. These types of questions might be prevalent at certain kinds of companies but I can count on one hand the number of times they were asked to me. I haven't interviewed as a candidate since 2013, though the hiring process I put in place at that company is still being used. There are some easy weeder type questions, but the process is largely practical.

It took me too long to realize this, but my time is my most precious resource. Investing a lot of time to get hired by a certain company is not a great investment of time. Recruiters will happily brief you on a firm's hiring process and share as much with you as possible to help you prepare successful. No need to do it if you're not looking. The more important part is to keep up on the new tech. If you're not getting it where you work, it's time to move on. Move on to the right company, one that provides opportunities for growth and needs and appreciates the skills you bring to the table. Find a place that's not going to expect you to work extra hours all the time. I regret working lots of extra hours when I was in my 20's. It did not help my career in any way.

In your free time, if you want to work on a project - at least pick something that you enjoy! If it could make you some income, that's even better.

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#62
post #54

Earlier quoted context omitted.

engineering is about creativity and practice and not about memorizing standard solutions. leetcode does not test the skills that matter.

Pattern recognition is pretty much at the core of creative work in an engineering context, of which memorizing existing patterns is the first half.

if you just need to apply standard patterns than you are not actually inventing but just doing code monkey stuff, and you can’t really call that engineering

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#63

My career was typically 60-80 hours a week, and I managed to do a Bachelors degree during it (military). My example is to say it’s POSSIBLE; I do not recommend it however. Here’s how I did it: First, a supportive spouse. They need to have 100% buy-in on what you are doing and why. Second, an solid goal. Why are you doing this? Without this, you won’t make it far. Third, a healthy mind and body to hold up to the strai…

So, I did this too, but would not recommend it in general. I was a commissioned officer, so possibly even more busy, and went back to school for Applied Mathematics at first and then ended up switching to Computer Science in order to reskill and get out of the military to go into software instead. I was up at 3 most mornings spending a few hours on studying and homework, took another hour at lunch, then whatever it t…

I don't recommend it (and I said as much in my post) by any means. I'm retired now and make more than enough to be comfortable at 40 (more than my last CO, who was an O6), and am deciding if I even want a second career.

I personally managed to balance it all and stay happily married (20 years this year), but I'm an outlier.

I didn't want to get into the weeds of what my career path was here; I've alluded to it elsewhere on HN. However, due to my skillset I held a post that was normally an O-3 to O-4 my last few years in; it made for an interesting dynamic. I was offered that seat as a civ as a GS-13 but elected to retire and figure the rest of my life out as far away from the military as I could.

I can say your more detailed schedule sounds much like mine was; trying to hold my position while doing any college at all was difficult due to the factors you alluded to. My branch (Navy) had much of the JO duties that the AF/Army assigns put on the Senior Enlisted (along with all of the normal stuff), especially in my area (Aviation; pilots tend to be pretty focused on their duties).

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#64
post #62

Earlier quoted context omitted.

Pattern recognition is pretty much at the core of creative work in an engineering context, of which memorizing existing patterns is the first half.

if you just need to apply standard patterns than you are not actually inventing but just doing code monkey stuff, and you can’t really call that engineering

The flaw in your argument is that you assume people are hired to do "real engineering" instead of "code monkeying".

As you implicitly admitted, "code monkeying" is a skill. Whether this skill "matters" is really the hiring company/team's business, and none of yours.

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#65
It's incredibly difficult, honestly.

You're gonna have to prioritize which projects are important to you and cut corners/make sacrifices to dedicate a very small amount of time to them.

By "cutting corners," I mean things like settling for lower test coverage than you're comfortable with, hacky CI (if you do CI), more tightly-coupled code than your happy with; i.e. all of the things that startups do to ship stuff fast.

As for leetcode, I'd recommend doing that during downtime at work (if you can) and focusing on one problem a day, especially given your years of experience.

Many of the medium/hard problems are basically puzzles; you either have that kind of mind or you don't. In my opinion, this is why side projects matter way more: you can bullshit Leetcode problems (by memorization), but you can't bullshit _things that actually fucking work_.

(#338, "Counting Bits", is a great example. The trivial solution is O(n) time, but getting to the O(log n) time solution requires you to think about the pattern in which the 1's in the bit sequence typically generate. I would've never thought of that had I not read the solution.)

Like some other posters have said, you'd be much better off (re)learning foundational data structures and algorithms and, if you can, implementing them from scratch. No, you'll never actually implement a hashtable library or quicksort, but knowing how to do those things will help when you get asked a leetcode-like question.

Good luck!

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#66

You shouldn't need to spend a lot of time on leetcode as a senior engineer. I do one leetcode problem every week from lists of recommend problems. You will realistically have 40 min of time to work on the problem, and you will go slower during the interview, so if I don't get an optimal solution in 30 min I give up and look at a solution. I'll spend at most another 30 min filling the gaps in my knowledge that will le…

I'm a newer dev... just under a year and feel I've made decent progress in that time. I hear about leetcode a lot but honestly am not really sure what it is, why it's talked about so much, why people 'grind' leetcode... and why do you specifically do a leetcode problem each week? Is it specific to just a certain small set of languages? Are the specific types of questions asked by FAANG companies in interviews? What's…

innocent little lamb

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#67
post #15

I must have had very different experiences from everyone as I can't imagine how grinding leetcode is a worthwhile activity. Do you want to do leetcode because you find it helpful or because the hive mind of the internet says you should?

You have to do leetcode if you want any hope of being able to find a different job. You have to be ready for that kind of question. I’m a software engineer with 20+ years of experience in a bunch of different industries. I know what I’m doing. I did 3 interviews with 3 different companies in the past couple months and utterly failed at the leetcode style coding interviews. The last one was to “print out the contents…

> You have to do leetcode if you want any hope of being able to find a different job.

It's funny how much perspective can differ between people. I have 15 years and was asked to do leetcode type of question twice, both times I was interviewed by person with significantly less experience.

I was also on the other side of hiring table and was never, not even once, asking people to do leetcode stuff during interview. I had way more practical approach which was giving me all signals I needed.

Having said all of this, my hobby is codingame and I enjoy competetive programming myself, it's pure fun and I enjoy it a lot.

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#68
post #15

I must have had very different experiences from everyone as I can't imagine how grinding leetcode is a worthwhile activity. Do you want to do leetcode because you find it helpful or because the hive mind of the internet says you should?

You have to do leetcode if you want any hope of being able to find a different job. You have to be ready for that kind of question. I’m a software engineer with 20+ years of experience in a bunch of different industries. I know what I’m doing. I did 3 interviews with 3 different companies in the past couple months and utterly failed at the leetcode style coding interviews. The last one was to “print out the contents…

> You have to do leetcode if you want any hope of being able to find a different job. You have to be ready for that kind of question.

I disagree with that statement. You don't have to do leetcode, though it can be helpful if they have leetcode-style problems to get timed practice (not everyone is good at the 30-minute challenge under pressure; for some reason my general test anxiety, which interviews can bring out, doesn't apply to code tasks).

Learning and maintaining the fundamentals is sufficient (again, modulo the benefit of timed practice). Even for your problem, there are only three places that an action can be applied to a node when traversing a binary tree: before traversing the children, between traversing the children, and after traversing the children. The traversal code is otherwise the same (this also applies generally to any tree structure, it's not just a binary tree thing though "in-order" is ambiguous when you have more than two child nodes).

  def traverse(node):
    if not node: return # alternatively, this test can be applied to left/right before the recursive calls but requires also testing before the initial call
    # pre-order
    traverse(node.left)
    # in-order
    traverse(node.right)
    # post-order
I've named them here, but those are the three positions you can put a print statement. Even if you don't have the time to work out which one is which, you only have three things to try. An important aspect of focusing on the fundamentals is recognizing why this traversal code is the same regardless of where the action will be placed: You're traversing a recursive data structure (`Node = None | (data: T, left: Node, right: Node)`), that in itself determines the fundamental recursive structure of the traversal code. This same approach can work with any recursive data type which mitigates the need to memorize any particular algorithm on specific recursive data types.

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#69
post #54
post #45

Earlier quoted context omitted.

If learning how to solve problems by reading a book is "memorizing solutions by heart" then yes, that's how most people do things. Look, as much as you might want to believe you (and everyone else in the industry) are geniuses, the fact is that we memorize a lot of stuff that were painstakingly invented or discovered by great minds in the past. If that is "don't need any actual skill" according to your dictionary, th…

engineering is about creativity and practice and not about memorizing standard solutions. leetcode does not test the skills that matter.

Leetcode is not for engineering on the job though, it's purely a test for getting hired. You wouldn't expect lawyers to take an LSAT while on the job.

A lot of people, especially those who don't do Leetcode or work in a company that asks such questions, think Leetcode should somehow relate to the work and are annoyed, but it's just a test like any other.

Re: Ask HN: How do you make time for side projects and Leetcode grinding

#70

Grinding leetcode is inefficient. What you should be doing is familiarizing yourself with the common patterns you might expect to see in an interview. Look at the blind 75 and https://seanprashad.com/leetcode-patterns/ . Initially, you don’t need to solve any of the problems from scratch. Look up the problem on YouTube and someone will walk you through it. This will build your intuition of when to reach for a heap or…

Working 40 hours a week with two small children does not leave "10-20 hours for personal projects".

Spend that time with your family!

Post reply on HN