I offered free advice as a 6+ year Senior Developer, here are my answers to the top questions I got

I have learned so much online over the last decade from others, here is my best shot at giving back!

Last week I made a post on /r/cscareerquestions titled “Anyone here need advice/mentorship from a Senior Software Developer with 6+ years?”.

Over the course of 7 days, I spent 15+ hours responding to over 200 questions from folks with varying backgrounds and experience levels:

  • 97 comments
  • 82 DMs on Reddit
  • 27 DMs on Twitter

My 5-second resume:

  • Graduated with a CS degree in 2014
  • Worked 2 years at a Software Consulting Company
  • Have been working at a 1,000+ employee Enterprise SaaS Company for the past 4+ years
  • Been interviewing candidates regularly over the past 2 years
  • Promoted to Senior SDE in 2019
  • Tech lead for a team of 10 devs, successfully launched our product earlier this year
  • Recently became dev manager for that same team

On to the questions!

1. What are your interviews like? What do you look for in a candidate?
I do both phone screens and on-site interviews.

My interviews are generally 1 hr and consist of:

  • 5-10 min on candidate’s resume/projects
  • 40-50 minutes on 1 or 2 coding questions
  • 5 minutes for candidate questions

For on-site interviews, we normally have 4 total technical interviews and the hiring manager is usually one of them.

When it comes to questions, I have about 8 different questions I personally like to ask that very in terms of topic (data structures, system design, OO programming, databases) and difficulty (SDE 1, SDE 2, Senior SDE).

I like to start questions out pretty vague and see how the candidate handles the ambiguity (do they ask good clarifying questions?).

My favorite question that I ask SDE 1 and SDE 2 candidates, is for them to implement a function that takes in a tic-tac-toe game state as an input and can determine if a player has won the game yet. I like the question because there are many ways to solve it, the most straightforward being a nested loop for rows and columns and then the diagonals. The best candidates will think of things like reducing code duplication and also notice areas where they can gain small optimizations. I don’t expect candidates to have a perfect, ultra-efficient solution in 30 minutes, but I do expect them to take feedback and guidance from me well and also have a good approach in terms of problem solving.

An example of good problem solving would be a candidate that is able to cycle through their knowledge of data structures to brainstorm potential solutions. They would also identify when a certain path they took is might need to be revisited (or at least talk through their concerns).

2. What is the difference between junior and senior developers? How do I advance to the senior level?

Junior developers generally require a decent amount of help to get their work done. I expect them to ask questions and require some upfront guidance when I assign them work. Good junior developers will be eager to quickly grow out of needed help. They will learn quickly and even though mistakes are definitely going to happen, they will learn from them and not repeat them often.

Senior developers are two steps above junior devs (there is a general “experienced developer” that falls in between them in my mind). They lead other developers and can take business requirements (non-technical specs on what needs to be built) and single-handedly figure out what needs to be done and how to implement it. Not to say that they don’t still get feedback and help from other devs, but the key is that they can work independently if needed. The other part is that they are able to mentor and guide other developers. They can help a junior developer become independent – not simply just tell them what to do, but actually help them to no longer need their help too.

If you want to progress from junior to senior developer, then I would recommend you follow these steps:

  • Talk to your manager about what they would like to see you do to advance to the next level. Make it clear you are wanting to work towards a promotion.
  • Learn from the awesome devs at your company. Ideally, get their advice and pick their brains. But if not, you can still learn from them by watching their code reviews and also seeing how they do code reviews for other devs.
  • Take on challenges and new opportunities that come up. The best way to grow is to be slightly outside your comfort zone. If your manager asks you if you’d like to take on a new project that sounds scary and difficult, I encourage you to take it on. It will be hard and stressful, but you will grow so much in the process.
  • Look for opportunities to mentor newer devs. Not only will this prove that you are able to coach and lead other devs, it will also teach you a lot about how to work with others effectively.

3. How can I improve my resume?
There are two main goals of your resume:

  • Appeal to recruiters so they pass you through their screening process
  • Help to set expectations for your interviewers, in some ways it sculpts your first impression with them

Each company and person will vary in terms of what they look for, so I will just share what I find are steps to making your resume more effective:

  • Get relevant work experience on there! Software jobs are of course the best to have. But after that, internship experience is excellent as well. If you don’t have those, then working on a good side project is the next best option. Check out some of the following questions for guidance on picking a good side project.
  • Update your resume so it appeals to the company you are applying for. Make your experience reverberate with items that are very relevant to the company your are applying for. Is their product a web application? Then make sure you clearly layout all the web technologies you have worked with. Make it easy for recruiters and interviewers to find the information they are looking for.
  • Education is important, especially early in your career. CS degrees are definitely still ideal, but companies are becoming more open to non-CS degree candidates. If you are going the non-CS degree route, I do recommend making sure you have a strong understanding of data structures, algorithms, and object-oriented programming if you are looking to apply to more traditional software companies.

4. How to prep for the coding interview?
First off, it is very important to just practice for the coding questions. I personally used “Crack the Coding Interview” and it was a fantastic resource, the most useful information for me was everything before the practice problems. Leetcode.com is a newer resource that I think is a great way to practice coding questions.

Dealing with nerves is another thing I was asked about a lot. I personally had trouble with nerves when I started interviewing for the first time after my first job. I completely bombed my first phone interview, as I was super nervous and under-prepared. I then set aside about 4 months to study and prepare. This helped a ton when it came to my next set of interviews, as I felt confident in my approach to most of the questions.

I also encourage you to do some live mock interviews to practice. Practicing problems by yourself or online is not the same as working on a problem on a whiteboard and with someone judging you. It is a lot harder and there is a lot more pressure.

Lastly, I want to remind you that there is a lot more than just getting the most efficient and most “correct” solution to the problem. Interviewers are looking to test how you approach problem solving and how enjoyable you are to work with. Keep that in mind as you practice!

5. How do I select a good side project?
Pick a technology or stack you are interested in working with (iOS apps, web app with ReactJS, etc). If this is your first project, then I recommend finding a good tutorial to get started. From there, you can expand upon it to make it your own.

Pick a hobby or interest you have and build an app or website for it. This is so important because your motivation to continue working on the project is key. Don’t underestimate how hard it is to push yourself to work on projects in your free time, make it as easy and low-friction as possible.

For example, I was really into Magic: the Gathering in college, so my side projects involved building apps and websites for that community. My first project was a simple iOS app that worked as a life counter that could be used during the game. I expanded it to store past games and to generate some basic stats and charts. My second project was a website where players could post and share their decklists.

I launched both of them with Reddit posts (please be kind haha):

Let’s say you love movies, you could build an app or website that helps people discover movies that they might like. This could start out super simple as a simple list of movies and their Rotten Tomatoes scores and then some other info (length, director, etc). Then you could expand it to recommend movies with some simple rules (latest movies with the same director/same genre/etc). Then you could add user accounts and further customizations of settings and recommendations. Each step of this process will make your project even more interesting to potential employers.

Another idea is to find a website or app that you use, but you wish had an extra feature that you want. Try to build a limited version of that app, but with the feature that you want. The key is to keep it simple, avoid complex things like user authentication or super fancy UI animations. Start small and expand from there!

6. Do you get burnt out? How do I keep my motivation up?
I have definitely run into burnout or developer fatigue. Sometimes you work too much or too hard and you just need a break. Talk with your manager about that, it is totally normal.

Sometimes it is due to the fact that you aren’t happy on your current project or team. That can be due to the work not being interesting anymore or your team not being a good fit. Either way, you should make actions to make your work more interesting and exciting, either by talking to your manager or switching teams, or starting to look for a new job opportunity (what I did earlier in my career)

7. I am a current CS student, what can I do now to prepare for getting my first job?
For me, I felt that the computer science classes did not prepare me fully for the work environment. I learned a lot of great foundational knowledge, but it took me a while to connect the dots between how “merge-sort” might actually help me build an application that customers use. So I think it is crucial to get as close to “real-world” experience as you can, as it really helps to put your learning from class into perspective.

The way I tackled it was:

Do some extra learning on your own; follow tutorials to build a fun little app that can be deployed somewhere. There are tons of great resources for this, and it is really great to see your code being applied to a tangible product/app.
Really try to get an internship. This means you should look as early as possible. Definitely go to your school’s engineering career fair if they have one. The better companies start looking for summer interns early in the school year. I think as early as October/November for some schools/companies.

If you are having trouble getting an internship, be sure not to get discouraged and give up! My first internship was at a cabinet company for $10 an hour. I didn’t even have a real desk. But I learned a ton still. Other than that, start side projects that map to your interests so you are motivated to continue working on them. Pick something small and easy and work your way up!

8. What kind of projects/experience do you look for in a candidate?
In rough rank order:

Relevant work projects – the best case scenario is to see that the candidate has already worked on similar projects at a company; that they have skills that will apply to the role they are interviewing for. This is ideal because it means: a) the candidate will require less time to ramp-up (this can be expensive) b) the candidate will probably have valuable insights on the project that will help improve the perspective of the team they are joining.

Professional software projects – The fact that the candidate has worked on software projects with a team in a professional setting allows employers to assume they know how to work with others and understand basic team dynamics. I also like to ask candidates about some of the more complex problems they worked on, so I can get a feel for how well they might be able to tackle the common types of problems we deal with on our team.

Intern projects – Intern projects can easily be ranked up with the above two cases if the company had the interns work on actual features that were shipped (my current company makes sure to do this). Sometimes, companies have interns work on internal projects instead. Even though projects that actually ship to customers may look better on your resume, both types of projects will teach candidates a lot and are very valuable experiences.

Completed personal projects – I am maybe a bit biased on these, as I think side projects that are actually launched show a ton of initiative and self motivation towards growth. Candidates with these are usually able to think through the business behind software requirements, which isn’t a necessity, but is definitely a nice to have. It also makes me more confident that the candidate will be able to learn new things with less guidance from other devs.

9. Are certifications worth it?
Software consulting companies will highly value certificates, but less so for software companies. Learning AWS is a very, very valuable skill, but I would personally pick working on a side project that I deploy using AWS vs studying for a certificate test. Mostly because it is way more fun to build something.

10. Is it better to have a specialization or to be a “jack of all trades”?
I’ve seen people be successful at both. Earlier in your career, I’d recommend exposing yourself to more stuff, mainly because you won’t know what you want to specialize in long term until you try out more stuff. Once you find a domain that you know you really enjoy and find fascinating, then stick with it. I prioritize my day-to-day happiness at work very much, so pick a path that will make you happy and excited to go to work everyday. And it’s totally fine if that changes over time, that is totally normal!

11. How important is it to have a mentor? Any tips on finding a good mentor?
It will always be helpful to have a mentor, even later in your career. Growing and sustaining a career is hard work and having people around you that you look up to will make that easier.

View it as a two-way street. They will help you with their experience and guidance, but they will also be practicing their mentoring skills more and gaining new perspective from teaching you.

I think it is easiest to find a mentor within your same company, as you can build trust by working with them. But understand that not everyone wants to be a mentor. Let it happen naturally but don’t be afraid of asking them if they have time for a 15-30 minute meeting, or try to pick their brain over a coffee run.

It feels good to help others, so as long as you are truly learning from them and not asking too much of them, I think you’d be surprised that it is not as daunting as it seems.

That’s it!

I hope some of you find this helpful! Please feel free to reach out to me here or on Twitter (@jstnchu)

Announcing beta launch of Siege the Castle – a new digital game great for virtual hangouts

I’ve been working on Mobo Games (https://gomobo.app) steadily for the past 4 years. It actually started as a side project to learn a new tech stack, but it evolved into a fleshed out business idea as I got more into the “indie-hacking” mindset.

I drew my original inspiration for Mobo Games from playing Jackbox games. When I first discovered one of their games (Drawful), I thought their use of phones as “controllers” for their games was such an innovative and creative idea. I also loved how easy it was for anyone (even non-gamers) to pick up and have fun playing their games.

There were two things that I found lacking in Jackbox games:

  1. Lack of portability – Jackbox games work great in your living room, but they are difficult to play in other settings.
  2. Deeper gameplay – Most Jackbox games are more on the simple side – which is great for larger groups of mostly casual gamers, but tends to limit the replay value for some of their games.

I made the goal to build out a collection of games and follow through with launching this as my first true indie hacker business. I have really enjoyed the creative process of designing new games and also developing a business strategy for these games, but I’d be lying if I said it was all easy. There have been many weeks of either beating myself up for not getting as much done over a weekend or just feeling super burnt out after a stressful day at my full-time job followed by even more coding on the side project.

And as much as I have enjoyed getting to this launch milestone, I have tried to make it a priority to make sure I was enjoying the journey as well. I love wearing multiple hats and having sound understanding of both the business and technical sides of building and running an internet business. All of the small wins and learning along the way have been extremely rewarding on their own. Deploying my application in AWS for the first time, playtesting my game with friends, or even just shipping incremental features have all be smaller steps of the journey that made the next steps easier to push towards.

So far the launch has been pretty successful, we were able to get nearly 300 signups mostly from a single post to a small (12k member) community on Reddit. Our next steps will be to roll out our next games to our beat and then to start taking pre-orders for our games!

Join our beta:

  • More info at https://gomobo.app
  • Message me directly on Indie Hackers (and I will send you an invite!)
  • Email me at justin@gomobo.app

A simple guide to proper state management in React

A common problem developers are faced when working on a React application is figuring out the best way to manage state between all their components. I am not saying that it is difficult to manage state in React, I mean to say that it isn’t always easy to figure out which way is the best way to manage state in your application. I will go over three common ways to manage state in your app, and help guide your design decisions around each one.

1) React Component Props

This is the most basic way to manage state for your components, you simply pass the state via props. Of course things can get pretty complicated as you add more and more components that rely on the same shared state. For most use cases, this will probably be the best solution – it’s clean, simple, and keeps your components reusable. If your component is a “dumb” UI component, then it ideally should take in state as props and render it.

function ButtonWithText(buttonText) {
	return <button>{buttonText}</button>
}
// Usage
<ButtonWithText buttonText={“save”}></ButtonWithText>

Probably the most common issue I have seen with managing state this way is prop drilling (Kent C. Dobbs has a great post on prop drilling). In my experience, prop drilling is not an issue that surfaces immediately, but happens over time as components are gradually refactored and split into multiple components. For example, imagine a not-too-uncommon scenario where you have a single component, but then later on you realize that part of the component would be useful elsewhere in your application, so then you do the reasonable thing and split out the reusable stuff into a separate component. One or two of these refactors and we end up with textbook prop drilling. This leads to cluttered components that are aware of state that they don’t actually care about, causing hits to both the maintainability and readability of your code.

(The following code example is from Kent C. Dobbs aforementioned article, it was more concise than anything I could come up with)

function Toggle() {
  const [on, setOn] = React.useState(false)
  const toggle = () => setOn(o => !o)
  return <Switch on={on} onToggle={toggle} />
}

function Switch({on, onToggle}) {
  return (
    <>
      <SwitchMessage on={on} />
      <SwitchButton onToggle={onToggle} />
    </>
  )
}

function DisableOnSubmit({on}) {
  return <>The button is {on ? ‘on’ : ‘off’}</>
}

function SwitchButton({onToggle}) {
  return <button onClick={onToggle}>Toggle</button>
}

In these code examples, we are using function components and React Hooks. If you have not yet tried out React Hooks, I would highly recommend it (it’s surprisingly easy to convert class components to instead use Hooks).

Prop drilling only really becomes an issue once your app grows and your component hierarchy becomes cumbersome. In some cases you can prevent deep prop-drilling by re-combining components that didn’t really need to be split in the first place. In other cases, you might want to consider trying one of the next two options.

2) React Context

React Context was added to React to help solve the problem of sharing state between multiple components, especially between ones that are not close in the component hierarchy. React Context is a great option because it is very straight forward to use and has native support, as it is part of React itself.

function ParentComponent() {
    [text, setText] = useState("");
    // Create a Context
    const TextContext = React.createContext(null);
    return (
        <TextContext.Provider
            value = {{
                displayText: text,
                updateText: setText,
            }}
        >
          <ChildComponent />  
          <AnotherChildComponent />
        </TextContext.Provider>
	)
}

function ChildComponent() {
    // With React Hooks, 'useContext' will cause your component to re-render everytime
	// the context value changes
	const textContext = useContext(TextContext);
    return (
    	<FancyButton onClick={() => textContext.updateText("clicked!")} />
	);
}

function AnotherChildComponent() {
    const textContext = useContext(TextContext);
    return (
    	<p>{textContext.text}</p>
    );
}

In a more fleshed out real world example, you could really see how this could simplify things by allowing you to just cut out all the extraneous prop passing. However, the major downside to using React Context is that it reduces the reusability of the components that use it. A simple component takes state in via props, this allows it to be reused in any location that is able to provide it the state it needs to properly render – including an entirely different application. When your component now depends React Contexts, your component may still be reusable in parts of your app (depending on the use case), it will be much less likely to be reusable outside of your specific use case.

3) Redux state management

Redux is a separate library that allows you to maintain a centralized store for your app’s shared state while also providing a unidirectional data flow for the state managed by your Redux store. There other libraries that achieve similar results (MobX, Relay + GraphQL, Jumpsuit), but Redux is the most popular one.

(If you haven’t yet worked with Redux before, I would highly recommend going through Redux’s Getting Started guide, I found it to be a good starting point when I was first learning Redux.)

Rather than diving into the more technical details of how to implement Redux into your application, I want to outline the various pros and cons of it, so you can have a better idea if it is the right tool for your app.

The Cons:

  • Decent amount of boilerplate code — when switching to Redux, you will need to create quite a few more classes to achieve arguably the same functionality that you had before. In the long run it will be worth it, but I found it frustrating at first.
  • Non-trivial learning curve — Redux has a steep enough learning curve where it is not uncommon for some developers to make mistakes that can counteract the benefits of using the library in the first place. Mistakes like using Redux unnecessarily (when props could suffice) is not uncommon, especially with more junior developers.

The Pros:

  • Structured solution to a complex problem — before utilizing Redux (and React), our application tried to maintain a form of consistent shared state in a truly complex mess that became unmanageable due to mutations to that state being difficult to properly track and sync across all components. Redux greatly simplified this for us with its well-defined and structured approach.
  • Easy to test and debug — with Redux, state in your application becomes predictable because of changes to the store are limited to the reducer functions. There is great tooling for Redux that allow you to go back in time and see how your app looked with "old" state (redux-devtools).

Redux is a fantastic tool for helping manage state in larger React applications, however, it can be a bit heavy-handed for simpler use cases.

Closing Thoughts

My general process is that I default to using simple props for my state management until I find a compelling reason not to. Of course there are cases where the component I am building will clearly need to use state that is already managed in either an existing Context or in the Redux store. I would encourage you to spend some time thinking about how state will be managed for the next component you create, even before you start writing any code!

If you want updates from me on my future blog posts or on my future projects, please sign up for my email list below!

Processing…
Success! You're on the list.

Designing and Implementing a Ranking Algorithm

I recently had the desire and need to create a ranking algorithm for a side project I was working on. I wanted to keep both the design and implementation fairly simple for my project, so I think this post will be great for people wanting to get their toes wet.

The ranking algorithm I ended up building is used for ranking user-created content – similar to the ranking of posts on sites like Reddit or Hacker News. So one might describe it as a ‘hotness ranking‘ opposed to a ‘relevancy ranking’ used in search engines.

My goal is to walk through the basics of designing a ranking algorithm and then sharing my experiences and findings from implementing my algorithm. My implementation was done for a web application using Node.js and MongoDB.

Designing the ranking algorithm

When starting to design my algorithm, I naturally wanted to understand how other sites’ ranking algorithms worked, fortunately I found a couple of blog posts that provided great introductions for ranking algorithms used by both Reddit and HackerNews. I would also recommend reading this blog post that describes the design process around Reddit’s ‘best’ comment ranking algorithm.

Continue reading “Designing and Implementing a Ranking Algorithm”

Real-world programming interview question #1

As programmers, we like to solve problems. In school, we thoroughly enjoy working through solutions for our homework problems. When interviewing for a developer job, we have to solve some complex programming problems (on the spot). As software developers, we still work through complex problems, but suddenly our solutions have more weight because they are solving real business problems. I enjoy solving problems that come from real-world business context; I find that my motivation to solve these problems is greater. Today at work, I came across a problem and worked through a solution that reminded me of a challenging problem one might see at school or in an interview.

Here is the problem:

You are processing potentially thousands of units of inventory and you are writing code to take inventory data from a supplier and syncing it with a distributor. The inventory is comprised of rental properties which have restrictions on specific days that are ‘closed to arrival’ and days that are ‘closed to departure’. Unfortunately, the format that the supplier stores this information is very different from the format that the distributor’s API expects. It is your job to transform this data to be in the proper format for the distributor’s API to handle.

Continue reading “Real-world programming interview question #1”

Node.js for side projects

There is one thing that unites people who work on software: we like to create things that work. Nothing is more satisfying than finishing a feature or project that simply does what it was intended to do. When it comes to my side projects, I love learning new frameworks, technologies, and languages. But in the end, the most rewarding and satisfying part is finishing the project and releasing something to the wild. Let’s be honest, if you work full-time and worry about things like exercising, chores, and possibly sleeping – then you understand me when I say it is not always easy finding time to complete a side project. We can help ourselves by planning ahead and perhaps utilizing some fancy project management tools. But what about our technology stack? If our end goal is to finish and release our project, then it makes sense to pick a technology stack that is well-suited for rapid development.

Node.js has become a popular server-side platform used to power the web servers for many modern web applications. When developing a Node.js application, you will be writing everything in Javascript and you will be able to run your applications on any type of server (Windows, Mac, or Linux). Node.js consists of a large pool of tightly-scoped modules and packages that you can utilize. What is great though is that you only use what you need, keeping your application as lightweight as possible. At the end of the day, side projects should still be enjoyable, and Node.js applications are fun to write.

Continue reading “Node.js for side projects”