Things learned from a senior developer

Dear new developer,

This post by a Bloomberg developer catalogs everything they learned sitting next to a senior developer for a year. Lots of good stuff in there. Favorite excerpts:

How to handle an outage:

For when things go wrong, and they will, the golden rule is minimizing client impact.

My natural tendency when things went wrong were to fix the problems. Turns out, it’s not the most optimal solution.

Instead of fixing what went wrong, even if it’s a “one line change”, the first thing to do is rollback. Go back to the previous working state. This is the quickest way to get clients back on a working version.

Only then should I look at what went wrong and fix those bugs.

This is really good advice. When you are under pressure in a production outage, the tendency to try to figure out what is going on can be very powerful. However, figuring out the root cause of the issue is probably not as important as restoring functionality to your end users. Roll back. If you won’t be able to replicate the issue in your staging environment (due to load or some other reason) save off your logfiles and note the start and end times of the outage for further analysis (slack is good for that).

On code reviews:

Code reviews are amazing for learning. It’s an external feedback loop on how you’d write code vs how they write it. What’s the diff? Is one way better than the other? I asked myself this question with every code review I did: “Why did they do it this way?”. Whenever I couldn’t find a suitable answer, I’d go talk to them.

After the first month, I started catching mistakes in my teammates codes (just like they were doing for mine). This was insane. Peer reviews became a lot more fun for me – it was a game I looked forward to – a game to improve my code-sense.

My heuristic: Don’t approve code till I understand how it works.

Code review is definitely a skill worth practicing. You don’t want to nitpick and I’m a fan of automated linters/code style enforcers. That way you can have all the ‘where does the brace go’ arguments once, and then have the rules automatically enforced. Of course you can look for bad variable and function names, and that is valuable (and non automatable). But in my mind there are two aspects code review that are harder, but more important:

  • How does this fit into the overall system. Are there other components that should use this code or be used by this code? Is this structured correctly?
  • Do I understand this code and what it is trying to do. This means you need to understand the problem that the code is solving.

The whole thing is worth a read.

Sincerely,

Dan

Balance Questions With “Banging Your Head”

This is a guest blog post from Don Abrams, lightly edited. Enjoy.

Dear new developer,

When starting out, the hard part is balancing two things:

  • Asking questions
  • Banging your head against the wall

Additionally, as a new developer you’ll likely be encountering something for the first time: a codebase that is really really large. Like large enough no one knows all of it. You’ll want to learn how to navigate the codebase ASAP. Every place is different. If you can checkout all the code and get the product running in less than a day, you’re at a world-class shop. If it’s more than a week, I’m sorry.

After you learn to navigate the code, my recommendation is then to learn and copy the patterns that other team members use. So your questions should mostly be “how did someone solve this before?” or “hey, have you seen anything like this before?” If you look at the code they referenced and still have questions, then bring it back up ASAP.

If someone offers to pair, DO IT! Tip on pairing as a junior: be the keyboard and basically have them tell you what to do. You’ll learn how they think about the codebase and learn to navigate it better. You’ll feel stupid when they tell you “just” to do something, but those are the things you need to know. (“just XXX” signals that XXX is complex thing that you’ll take for granted soon– documenting those will really help the next junior).

I also recommend reading a LOT of code.Then, as you get a better command of the codebase and team patterns (3-6 months), you can start asking questions like “why did someone solve this before this way?”

That’s when it gets fun.

Sincerely,

Don Abrams

Don Abrams has over 10 years of software development experience and recently moved to France.

Be a great developer today

This is a guest post from Tim Tyrrell. Enjoy.

Dear new developer,

New developers are making mistakes. They are making mistakes every day. As a new developer, one’s job is to recognize one’s mistakes, implement a change in behavior, and help others implement that same change when similar mistakes bubble to the surface of one’s awareness.

Software has clearly identified patterns. Observer, mediator, singleton, bridge, and abstract factory to name a few. Some patterns that are less popular include active mentoring, maximizing pairing interactions, and self-imposed code review. These patterns represent a few of the necessary actions required to fast-track one’s rise from junior to mid to senior and beyond. We are all guilty of exhibiting some of the best and worst behaviors as new developers— myself included.

Say Yes to Everything

This may seem daunting, but it will force a new developer to continue to claw at the boundary of their own comfort level.

They might ask: “How can I say yes to a task if I’m not sure if I can actually accomplish said task?”

Generally, software developer === problem solver. One isn’t required to know everything when one walks in the door, but one is expected to leave work each day having laid a few more bricks on top of an ever expanding foundation.

One way to level-up quickly is to say yes to tasks that managers either (a) do not have time for or (b) assign to test one’s level of grit and determination. This will show superiors that one has the bandwidth for complex assignments and that one is willing to accept challenges outside of the expected range. Time spent carrying out these tasks is less important than clearly communicating progress, outlining steps taken towards accomplishing the tasks, and reaching out frequently to resources at one’s disposal in order to avoid impasse.

Once a developer begins to set a precedence for clear communication, progress, and accomplishment, managers and senior developers begin to trust that developer at their word, and they take setbacks as a sign of high complexity or fluid acceptance criteria rather than a gap in skill-set or effort level.

Does one’s team participate in local developer meetups? Have they asked you to come along or give a talk on a project one recently completed?

Say yes.

Are one’s peers interested in a hack-a-thon this weekend?

Say yes.

Does a recruiter want to talk to the new developer about a position that might be a good fit?

Say yes.

Not that interested in the position?

Say yes.

Not that interested in the company?

Say yes.

Interviewing is a skill that needs to be practiced like any other to achieve mastery. Better to improve this skill before one is in need of utilizing said skill.

Do Not Waste the Time of Senior Developers

Developer time is consequential and incredibly expensive. When a developer with more seniority takes the time to pair with a junior they are undoubtedly losing time they could be spending doing a number of other tasks that are all vital to the health of their team. Before asking for this highly valuable time, I encourage new developers to ask themselves a few questions.

  1. Do I clearly understand the components at work and how they interact in the system in question?
  2. Have I spent ample time reading about the nuances of my problem on Github, StackOverflow, Medium, and other outlets? Did I google my error message?
  3. Am I making assumptions that I haven’t been able to prove? Have I written any tests to prove these assumptions?
  4. Have I replicated my issue multiple times, so that I can clearly outline my process when the time comes to explain it to the senior?
  5. Have I taken time to write out my current questions and investigate them on my own?
  6. Have I asked relevant questions on our messaging medium — generally Slack — and taken time to investigate answers provided to me in this written medium?
  7. Have I taken a break, walked around, done some push-ups, absorbed some sunlight, and come back to this problem with fresh eyes?
  8. Have I clearly identified the gaps in my knowledge and exhausted all other resources on my quest to fill these gaps?

Each of these questions probably deserves its own article, but developers — myself included — have ceaseless amounts of work to do and a limited number of hours in the day.

One must understand how the pieces of the puzzle fit together and communicate at their synapses. What is each piece’s objective? Is it doing too much? Have I identified the failure down to the line number?

Do this before asking a senior for their time.

All of the previous questions lead us to researching our problem on the internet. If we are not first googling the error message and reading about prior encounters, then we can certainly improve our debugging process by doing so.

Do this before asking a senior for their time.

Assumptions have plagued me mightily in my first few years as a developer. They have been at the center of many of my mistakes. Writing tests represents a fantastic way to test assumptions at a fundamental level of input and output of specific methods. If one’s team doesn’t have any tests around the components one is interacting with, then add them. If one does have tests, then run them and use them to help step through the code and check the data at each intersection.

Do this before asking a senior for their time.

We must make sure we can clearly replicate behavior numerous times or at least replicate inconsistent behavior until it becomes inconsistent. If the process is large and requires many steps then start writing them down. It is possible that one’s process is the problem. This feeds back into avoiding assumptions. Do this to ensure that the maximum amount of time can be spent analyzing the problem in question instead of searching for the unknown problem.

Do this before asking a senior for their time.

Don’t ever be afraid to ask questions. But ask them in an order similar to this: 1. Ask the internet. 2. Ask oneself. 3. Ask the internet again. 4. Ask a developer that worked on the code most recently. 5. Ask in the team messaging channel dedicated to questions.

Do this before asking a senior for their time.

Get up from one’s desk. Go for a walk. Talk to other developers near the water cooler. Don’t stare mindlessly at a screen during this time.

Do this before asking a senior for their time.

Check and make sure steps one through seven above have been carried out. Still have questions? Go ahead and make sure that one can clearly articulate every step in the process necessary to explain the problem at hand.

Now, and only now, should one ask a senior for their time.

Be On Time and Be Present

Every meeting, event, stand-up, or retro takes up precious developer time. It’s a new developer’s job to gather the maximum amount of information available, ask questions to clear up confusion, and add input where they have it. If a new developer shows up late then that developer is a disruption instead of an addition.

Let me tell all new developers a secret; they aren’t valuable enough to be distractions. Don’t be one — ever.

Use these meetings to show initiative and communicate clearly. Do not allow one’s distractions to eventually become a nuisance for other team members. Eliminate distractions and engage completely with the team and with the current discussion.

Engage Fully in Code Review

This begins with reviewing one’s own code with precision, accuracy, and a level of criticism reserved only for oneself. Where did one make trade-offs? Comment on that line and explain why the code was implemented in this way. Where did the new developer choose performance over readability?

Start the conversation.

Own the work.

Explain why.

If one isn’t aware of the why around these decisions yet, then be prepared to be taken to school by the senior developers until one does understand.

When the new developer code reviews their own work then they once again save time for those spending their precious attention and finite cognitive energy reviewing that code in the future. Follow conventions. Check that one’s CI/CD build passed. Do not ever ask for the time of other developers without a thorough pass through from oneself.

Add a video to the PR that show’s the functionality that has been developed. Show one’s test suite running. Show the level of detail needed to be a great developer.

Review the team’s pull requests. Ask questions about code that doesn’t make sense, but not before asking the internet.

Ask about patterns.

Ask about performance.

Ask about refactoring.

Ask about trade-offs.

Ask about testing.

Ask about anything that doesn’t look like it’s been written with the utmost care. This will push one’s teammates to improve and iterate upon their work, and they will thank one for it as they level-up.

Start Mentoring

“But Tim, I’m the one that’s new here. I need more mentors! Not the other way around.”

The above statement represents a faulty mindset within many new developers. One of the most efficient ways to solidify one’s skills as a new developer is to explain known skills to others who have yet to master them. This leads to personal mastery of the subject being taught. The subject can be related to environment, shortcuts, workflow, data types, performance, logic, tools, and just about anything else.

I guarantee the foundation of a new developer’s knowledge includes skills that even seniors do not possess. Share these skills with fellow new developers and expand both network and knowledge within this process.

Did one go to a boot-camp or university to acquire one’s skills? Go mentor students.

Spend at least an hour a week doing this.

Is one in a boot-camp or university currently? Mentor more junior students.

Spend at least an hour a week doing this.

Is there anyone more junior or at a similar level — within a year — of experience at one’s current workplace? Pair with that person and offer them one’s help whenever they ask for it.

Spend at least an hour a week doing this.

Giving back will not only help a new developer achieve mastery and network expansion, but it will also help them experience happiness via altruism. This type of happiness compounds over time, and it will lead to fulfillment one never imagined.

Start Making Changes Today

Don’t wait to be a great developer. Be a great developer today. Then be a better developer tomorrow. Then share the secrets of success with other new developers.

Imagine the world that we can build together with this mindset.

Please reach out to me personally if I can help with one’s developer journey.

Be kind.

Learn hard.

Do good.

Repeat.

– Tim

This post was first published on Medium.

Tim Tyrrell is a Software Engineer at Crownpeak and Current Mentor and Mod-0 TA at Turing School. He is also a Game of Thrones conspiracy theory enthusiast/Repulsed by Flat Earth conspiracy theorists/Pun loving guy/Helper of people willing to put in the work.