Live data from Hacker News

Ask HN: Should I quit the field of software development?

news.ycombinator.com

81–90 of 159 posts

Re: Ask HN: Should I quit the field of software development?

#81
post #23

Most interviews unfortunately have little to do with the actual work and require significant practice to do well. > One question I was asked was "How do you make sure that a celebrity's tweet reaches all of her followers in less than 3 seconds?". I had no idea, I have never handled that kinda scale. If you're technically competent overall, you should be able to learn enough to make your way through this from a few ho…

The biggest hurdle for me to get the resume selected. How do people do that!?

It's easiest when the recruiter contacts you. So Linkedin profile, email on Github, etc.

Starting out is hard, the first job really is the hardest, and I doubt recruiters are looking that hard.

Once you have several recognizable, well-regarded companies on your resume (or Linkedin profile), even sending in your resume through an online submission will normally get you a callback. That, and you'll meet at these places, so the next time you're looking for a job, you check with friends to see if they're happy where they're at and if they'll refer you.

Re: Ask HN: Should I quit the field of software development?

#83
I don't know if you should quit or not, but I do think you're mostly just psyching yourself out here. I can't see your actual interviews, but I'm just guessing a little based on your example.

On the 3 second tweet time question, I think you're just getting anxious at the thought that they might expect you to replicate thousands of engineer-months of work in a 20-min interview session. Nobody sane expects you to do that. If I was asking that question, I know nobody's gonna build Twitter in 20 minutes - what I want to know is how you think about and attack the problem.

I've never worked with anything Twitter-scale, but I might attack it like: How many followers are we talking about here? Okay, let's just start with a simple, dumb system and build it up. Simplest thing I can think of is a basic CRUD application backed by a Relational DB. SQL joins to get the tweets from your followers. You'd have to make a new request and new query manually to load new tweets. You could auto-poll, but that'll get real hard on the DB with even a modest number of users trying to refresh semi-rapidly. Maybe we can have a system where a single DB is still the source of truth, but there's a parallel system to load new tweets faster for those watching. Could maybe use websockets or long-polling for web clients. Let's build some separate servers for that websockets traffic. I'm pretty sure that as long as there isn't that much overall traffic to any one watcher, we can handle a good number of connections on one server, so we don't need a ton of them. Maybe creating a new tweet still adds it to the DB normally, but also triggers a background job, so the tweeter still sees fast response time. So we've got a background job going, and a bunch of realtime connection servers that are maintaining connections for specific users. We've gotta connect them somehow, send a message from the background worker to the realtime servers to send the tweet to connected clients that are following that user. Now let's think about how that would work...

Basically, show that you can examine the problem and come up with a few possible solutions and think about the trade-offs of them. I want to hire the engineer who can do that for any problem set in front of them. It's much harder to justify hiring the one who just has a blank stare for anything they don't have experience with already.

And for the record, that question isn't inherently bad IMO. But it would be a bad interviewer to just ask it and stare at the poor nervous candidate who has no idea what you want. A better interviewer would make it more clear what they're looking for, and help them down the first few steps of what I just went through above until they get the idea. Ex: So let's say Twitter 1.0 is a basic CRUD DB app. What might the DB schema look like? What's going to happen in terms of DB queries when we try to render a timeline for a user? What's going to happen if they all start hitting refresh every 10 seconds? If we want users to be able to see tweets faster than that, what might we do?

Re: Ask HN: Should I quit the field of software development?

#84

Earlier quoted context omitted.

> You can also say what you think would be the number of followers (millions+), what would be the time needed for a write you a database (~millisecond each) and why that won't match 3 seconds, so you know how much time you have per follower. While we are on the topic I am really curious to know how they solve it actually.

Twitter has changed this approach few times I guess, earlier it used to be simply insert tweet into a collection of tweets, and then when you load use timeline, look up the people they follow and find/merge those tweets. But it's going to create a lots of load on systems. Another approach is to maintain a cache of user's timeline(mailbox of tweets), when user posts a tweet, lookup all the people who follow that user,…

> Both approaches fails when you have folks with lots of followers

The traditional mailbox architectural model can be improved via a few methods though to increase scale.

1. The entire tweet doesn’t need to be duplicated for each follower, only a lookup reference (“ID”) to the tweet.

2. Unlike in a traditional mailbox sense, each user’s timeline is a bounded collection. So rather than maintaining every tweet for every followed user in the timeline, it’s capped to the X most recent.

Re: Ask HN: Should I quit the field of software development?

#86

It took me a long time to understand that interviewers are often less competent and giving them than they are at coding. Typically an interview question should be hard enough to test the limits of any candidate. The goal is to see how someone thinks and how honest they are when faced with a technical challenge, not what they were able to memorize. With that in mind, take heart if the interviews have been sometimes of…

I've seen no evidence that most interviewers would be any better at coding.

Re: Ask HN: Should I quit the field of software development?

#87
post #56

Earlier quoted context omitted.

I can’t speak to how it’s actually solved, but I can give a sketch from my experience. The game is generally to (1) consider denormalizing data and (2) rethink when you have the computer do work. Denormalizing data refers to moving away from a model where you store one and only one copy of each ‘tweet’ in something like a relational database, to a model where you might actually store a separate copy of each tweet for…

The other requirement worth thinking about is the 3 seconds. How many followers are going to be watching for that 3 seconds to matter. And how much slack can be in that? Could 1.5 million followers be sleeping and not need the tweet for a few hours or only when they next sync.

If it's a pub/sub model, you wouldn't care at all about how many were watching right? You'd just publish.

And for something like Twitter, you'd probably Publish but then also log to some kind of "Notifications" store, so if a user did care but was not actively watching, on their next subscription they'd receive the messages they'd missed.

Re: Ask HN: Should I quit the field of software development?

#88

Earlier quoted context omitted.

Right. Seems very doable to verbally sketch it if you have ever seen something like a fan out. If you only worked in single Wordpress servers, I could see it a big leap.

To be fair, having worked in a twitter-like domain is a valid selection criterion for any internet company planning to handle lots of traffic. It is possible that working on wordpress servers would not prepare you very well for such a job. Being unable to even articulate a basic strategy for handling a problem like this would be something I would consider a yellow flag for a potential teammate. It would make me quest…

If someone's resume was only wordpress sites, and they somehow made it into a technical interview for a team that managed twitter-like systems, I'd consider that a critical failure of the selection process. As an interviewer, I would try and make that experience as painless as possible for the candidate, and if not totally shocked by their abilities, have very direct conversations about the shortcomings of the selection process with whoever brought them in in the first place.

Re: Ask HN: Should I quit the field of software development?

#89
post #10

I wonder if you’re suffering with imposter syndrome - the feeling you’re not cut out for the job and everyone else is so much better. I see you’ve asked similar questions to this since 2016. It’s something most of us face in our careers and really sucks when it happens. Look at some positives. You’ve been working in the field for a few years so you can clearly do the job. You’re applying during a pandemic and the mar…

> I see you’ve asked similar questions to this since 2016 That's good context. And to OP's point, > I have been in the field for a few years...this field has never been my passion, just a profession I like. I've been programming professionally for 10+ years, 20+ when you add in college and what I did growing up. That, and computers are a hobby of mine, and I definitely have a passion for them, and I know a lot of stu…

> We're not a majority, but it's hard to compete with us, it's not helpful to compare yourself to us, but it's hard because that's what interviewers compare you against.

This makes me so sad. I've prepped hard on leetcode for 6 years (since freshman year of college) and I haven't had much to show for it but a total compensation less than Stanford new grads despite two years of tenure. I wonder if there's any point of even living most days.

Post reply on HN