:

Development Problems – Xtreme Learning

Development Problems

Xtreme Learning: 9 Tips to Get Up and Running When You’re Cutting Your Teeth On Development Problems

This guy knows when the pieces don’t fit…

As developers, we’re bound to come across development problems that are beyond our knowledge, and we need to learn something fast. It may be a 50,000 line application you’ve inherited that is crashing for some unknown reason, or a new and complicated feature requested by a client. Either way, you need to learn how the code works and start delivering working software.

While it’s tempting to just litter your project with breakpoints and throw code at it, this often isn’t the best use of time. Sometimes, you need to take a step back, spend a day digging into a codebase, and fill in your mental model of how the application works.

It can be a painful slog as you struggle to understand how something works, but it’s an experience all good developers have had. The following tips and tricks are some things I’ve learned cutting my teeth over the years:

  • Keep a notebook. There’s a relationship between reading and writing. You retain knowledge more when you’re writing down what you read, reinforcing concepts. Having a hard time actually filling a page with valuable notes? Make a goal to fill at least a page a day with notes; by using the notebook as a kind of offline storage/reinforcement mechanism, you’ll be able to retain more and what you’ve learned is reinforced because you’ve had to write it down.

This guy knows when the pieces don't fit...

  • Play “who”, “what”, “where”, “when”, and “why”? If you’re trying to figure out how a class works or debugging an error that coming from a specific piece of code, open up a Google Doc or write in your notebook these 5 questions and answer them about the code. This helps you ensure that you have a good knowledge of what is going on with that particular class. The best way to learn something is to teach it – and when you’re going through this exercise, you’re forcing yourself to teach yourself about the code you’re working on.
  • Efficient Searching. Learn the basics of regular expressions. Know how to do a full text and filename search in your IDE of choice. Be aware of some tricks for searching, like searching def foo instead of just foo to find just that method’s code.
  • Draw it out. I love coding with a whiteboard. Not only is it fun to draw circles and arrows between various bits of code, but it can help you visually conceptualize an entire system. And when you draw it out, you refine your own mental model. Plus, the whiteboard is a tremendous aid when trying to explain things to a fellow developer.
  • Pseudo Code. For me, I approach writing software as a series of drafts. My first draft is normally pseudocode, in which I outline all the classes and functions that I’ll need. The second draft is either replacing the core of my pseudo code with real functionality, or building that into a section of already working code. Then the final draft is replacing all of the pseudo code with real code and debugging.

Talk to yourself (From MoMa's 2011 Talk To Me Exhibition)
Talk to yourself (From MoMa’s 2011 Talk To Me Exhibition)

  • Rubberduck. Rubber duck with either a real person or a private slack group. Explain what you’re going to do as if you’re talking to a person. Often times when you force yourself to explain your thinking, you’ll find holes in it. You’ll catch bugs before they appear.
  • Stuck on something? Write a Stack Overflow question. Not only will it force you to rubber duck your problem and provide sufficient information to reproduce your problem, a helpful list of related questions will appear as you type it in. There’s many times I’ve gotten unstuck by just starting a stack overflow question and realizing the answer halfway through writing it.

Escribano

  • Don’t be afraid to write documentation. If the documentation on your project is sparse, don’t be afraid to beef it up. You’re not wasting time, you’re becoming more of an expert on the code and helping future developers.
  • Don’t be afraid to be ask a question of another developer and be completely wrong. It’s often said that the best way to get a correct answer on the internet is to ask a wrong question. Remember: you are not your code and we’re all in the search for truth together.

Hopefully, these techniques will come in handy the next time you need to learn something extremely fast. As long as you’re reading, writing, and making a conscious effort to master what you’ve learned, you should be able to pick it up in no time!

We're building an AI-powered Product Operations Cloud, leveraging AI in almost every aspect of the software delivery lifecycle. Want to test drive it with us? Join the ProdOps party at ProdOps.ai.