Make it work

This is a guest post from Tim Bourguignon. Enjoy.

Dear new developer,

Let me tell you a story.

Once upon a time, there was a black chalk board in a dark room. The board carried remainders of countless creations. Diagrams that could pass as hieroglyphs for the non-educated eye. Or well crafted UML to the others. From systems to modules, modules to components and component to classes, it all seemed to flow. Generic, inter-operable and reusable, it was beautiful. Those architectural blueprints led the creation of the software. Countless tests secured it, using the best means at hand. Production servers welcomed the bits. But a few week later, the company shut down. There was no market for this software. There was not enough cash left for the company to pivot and explore a different idea. Too much time was lost writing the most beautiful and never used piece of code in the world. Beautiful or well crafted code that doesn’t solve a real problem doesn’t count.

Once upon another time, a software crashed in production. A website was down. A shopping system was not taking orders. A customer was losing a fair amount of money for every hour, every minute and every second that passed. And boy was she furious. A few caffeine-doped hacking hours solved the problem. Thankfulness replaced the customer’s furor. The architecture of the solution lacked flexibility. The re-use potential was at an ever lowest. A bitter smell of copy-paste still held in the air. And the amount of technical debt in the codebase reached new heights. But the fix saved the business. Sometimes, ugly or imperfect code that “do the job” is the best you can hope for.

Here’s how David Heinemeier Hanson and Jason Fried described the launch of Basecamp:

When we launched Basecamp, we didn’t even have the ability to bill customers! Because the product billed in monthly cycles, we knew we had a thirty-day gap to figure it out. So we used the time before launch to solve more urgent problems that actually mattered on day one. Day 30 could wait.

Rework by DHH & Jason Fried

Let me rephrase this: they launched a paid-product with no way to earn money! Does this sound sane to you? It actually is. Worst case scenario, nobody is willing to pay anyway. They don’t have users, they don’t need a payment system. Period. They concentrated their effort on making a great product until the launch date. If the product attracted customers, they would need a payment system. The month that ensued might have been smooth… or very bumpy. Again at the end of that following month, some code had to be running. Good or bad, perfect or crappy looking, it had to do the job. Otherwise they would lose money.

Let’s generalize by putting code aside for a moment. Have you ever written a text to throw it out seconds later realizing how crappy it was? I know I do it countless times every single day. Have you ever had a great idea put you into ecstasy, only to throw it away the moment you put it on paper. Have you ever realized how dumb an idea you had, after hearing you verbalize it? I know I do every single day. Plans are perfect, until they meet reality.

For everything you do, there is a right time. Sometimes it is “yesterday”, sometimes it is “now”. But more often than not, it is “later” or even “never”. The best way to find it out is to strive to make “it” work. Whatever you do, try to make your plans meet reality as fast as possible. Only then can you be sure you are not working on false promises.

Don’t underestimate this first rule. We often forget about it at the first pinch of peer pressure. If you write software as part of a team, you have experienced a variation of the following in the past:

My coworkers will review my code. What will they think of me? I’d better refactor this component, make non-trivial changes to this module, enable future extensions in this class and clean my code up to its core to uphold the design standards…

What I could have done in a few minutes has grown into hours and the peer pressure increases. What has taken a long time to craft must be excellent, or was it the contrary?

Can you live up to this first rule? Our formal education taught us to seek the unattainable best grade and to hunt for any flaws. To the contrary, this rule tells us to seek the “good-enough” and then iterate on it. Use those intermediate versions to foster discussion. Lay a “good-enough” version of your work on the table, be open about its flaws and be sharp in criticizing it yourself. As a group, you can then decide whether to invest in making it suck less, or leave it be. As J.B. Rainsberger said in his talk “7 minutes, 26 seconds, and the Fundamental Theorem of Agile Software Development”:

If every item in our shop either costs $8 or $13 and we hard-coded those values, we are done!

Of course, not every draft that does the job is production ready. Production is often far away down the road. You will have to work hard to find out what “good-enough” means for every new challenge you face. But by seeking working solutions in your daily life, you will make true progress. Refine working software. Keep both feet on the ground and focus on tiny measured steps. This is the basis for producing a good solution. The solution that is there when the deadline falls. The solution that makes the business work.

— Tim

This post was originally published at Auswanderer Quatsch ².

Tim has been building synapses between human beings since 1983. Passionate developer, Mentoring advocate, mentor and mentee himself, he works as Chief Learning Officer, Head of Agile and technical Agile Coach for the MATHEMA company in Germany. In his free time, he hosts the Software Developer’s Journey podcast and spends as much time as he can with his wife, with [1;3] kids clutched on his back!

When do you feel like you’re “senior”

Dear new developer,

I thought this was a great tweet. It’s worth clicking through and reading the responses. I wrote my own tweet in response, but thought I’d write about it a bit more here.

First, it’s worth acknowledging that the term “senior developer” means different things in different places and times. Certainly the knowledge expected of a senior developer in 2020 is different than in 2010. And likewise, a senior developer at a small consulting company will probably be ineffective at Google and vice versa. I’ve written more about the various types of senior developers here.

It is also worth pointing out that a senior developer isn’t the same as being a good coder. A senior developer has that skill plus many others. So, how do you know you are a good coder? In my mind, there are three attributes:

  • You know your tools
  • You can figure out what the right code to write is
  • You can make the right set of tradeoffs

Let’s examine each of these in turn.

First, it’s important to know your tools. These could be low level tools like the syntax of your language or your text editor. They could be higher level tools, like an open source framework or a custom library. They could be computer science focused tools like a parser.

But you need to know these tools and what are the right ones to apply to solve the problem at hand. Otherwise you’ll either be re-inventing something that has already been done or trying to apply the wrong tool to a problem (much like using a saw to hammer a nail; can be done, isn’t pretty).

Next, you need to figure out what the right code to write is. Even if it is no code. This means that you don’t expect to be handed a full set of requirements from some all knowing figure. It means you dig in and understand the domain. That you apply your knowledge and skills to the problem. And that you use the above tools to solve the problem within the constraints that you are operating.

For that is the final piece. Every bit of code has its own context in which it was written. The code that you write to load a CSV file one time can be undocumented and slow. The code that you write that will be executed multiple times by every application user should be polished, tested and fast. As a senior developer, I think you know that “good code” is context dependent.

You understand that context and make appropriate choices to get the job done.

Sincerely,

Dan

Featured

“Letters To a New Developer”, the book

Dear new developer,

I hope you enjoyed reading these letters. I’ve certain enjoyed writing them. When I chat with new developers, at meetups, on slack, or via email, they let me know when letters are helpful or unclear. They suggest topics. They give me feedback, which, when you’re writing into the howling abyss of the internet, is very helpful both for calibrating your message and improving your motivation.

I’ve also posted these letters to some online communities. I’ve received plenty of feedback from those folks as well. Some kind, some caustic. That’s not unexpected.

After writing a hundred or so posts, I thought, there’s a book here.

And so I wrote one.

You can buy it from any of the usual suspects:

You can also check out a preview of the chapters on the publisher’s website. I’d love if you’d do so.

Here’s who I wrote it for:

For new developers
You are new to the software development job market. Perhaps you have completed a bootcamp or college degree. You may refer to yourself as an entry level or junior engineer.

While everyone’s background and skills growth happens at different speeds, new developers generally have less than five years of professional experience. Many new developers are worried about their abilities, don’t feel welcome, and have a difficult time finding that first job.

But as an industry, we need more new developers. There are so many problems with which software can help. Companies want experienced engineers, but all the senior developers I know started out as new developers. A senior engineer is just a new engineer seasoned with gaffes, education, and time.

For new developers, this book will help you avoid missteps I’ve made. It also introduces you to disciplines beyond coding critical to success. While programming is crucial for any software product or service, there is much more required to deliver an application.

For anyone considering software development
If you’re not sure if software engineering is right for you, this book offers perspectives on how to succeed.

I’ve intentionally kept the barriers to the layperson low with limited technical jargon. Only a few technologies are discussed, and those sections can be skipped. If you are thinking about becoming a developer, I’d recommend buying this book and a book about programming.

Giving a computer commands that it can execute is an important skill for any software developer. But software engineering is so much more. You must know what to build, how to work with your team, and how to maintain your systems.

For mentors
If you are mentoring a new developer, this book can serve as a discussion guide. Because each chapter has letters approaching a theme from different angles, you and your mentee will find it useful for focused mentoring sessions.

As an experienced developer, you’ll of course bring your own insights and experience to each topic, from your debugging process to the value of an online community for continuous learning.

And, of course, you may have had a different experience than what I share. Such contrasts are a jumping-off point to discuss the diversity available in a software development career.

Introduction, “Letters To a New Developer”

Sincerely,

Dan

PS If you shoot me an email, I’ll give you a discount code.

Choose inspiration over imitation

This is a guest post from James Turnbull. Enjoy.

Dear new developer,

Steve Jobs made the phrase “Good artists copy, great artists steal” famous in the tech industry. However, there’s considerable debate about the origin of the expression. Ironically, he was possibly cribbing from Picasso, who might have been cribbing from Igor Stravinsky, William Faulkner, or perhaps T.S. Eliot. Of all the many variants, I prefer Faulkner’s “Immature artists copy, great artists steal.”

What does this phrase have to do with writing code? More than you’d imagine. As engineers, we’re often stuck on something, banging our heads against a wall over a block of code, or a problem we can’t solve. Some people go for a walk to overcome these blocks, and others take a shower or switch contexts. But many of us go searching the Internet for answers. We try Google, Stack Overflow, or Github for error messages, snippets of code, or implementations that might overcome our problem. When we find something that helps we take this code, often morph it a little, and then use it in our codebase:

Commit message

Or in a code comment:

# From https://stackoverflow.com/questions/62048888/how-to-select-a-floating-point-or-integer-using-a-regular-expression-from-text
text.lines.find { |l| l[' Running Total '] }[/[\d.]+/]
. . .

But there is a lot of disdain, even hate, for this approach from other engineers. This hate is often combined with gatekeeper overtones or remarks about how this wasn’t how things were done when they were learning. I’ve heard it described as “copy-pasta coding” or “cargo coding,” or sometimes even described as outright plagiarism. So is it plagiarism?

To me, there’s a clear distinction between imitation and inspiration. When you go looking for that code, you’re looking for inspiration to solve the problem you have. It is rare to find the exact code you need that you can without modification, nor do you often find code can be used by simply copying it in place. By the very nature of trying to understand how someone else solved the problem, you’re learning, inspired by their creation. Later, as someone finds your code when they seek to solve the same or a similar problem, they can see your implementation and the original, and potentially receive further inspiration and insight.

There are best practices, though, that you should abide by when you use this approach. Firstly, credit the source of your inspiration, acknowledge the work of the original author, and help the next person who is following the same path to a solution. Indeed, if you feel uncomfortable about acknowledging the source of the code that inspired you, perhaps that’s a signal that you’re not doing right by the original creator?

Secondly, use the code as a learning tool; experiment and apply your knowledge and perspective to it. I recently found a Ruby method to work with a nested hash. I liked the solution but realized there was a way to make it more functional and easier to understand. So I took the code, modified it, and made it my own. In has been my experience that the best code results from code shared, whether developed with others or even code reviewed to get other’s perspectives. This process is how we learn to be better coders by learning the lessons of those who came before us and building upon them.

So ignore those folks who hate on this approach. I am sure they protest too much because I can guarantee they have done this in the past, and their disdain draws from the rose-colored glasses that inhibit memories of how they learned. Great artists don’t spawn from nothing, and “Great artists steal” is about finding inspiration; finding the key or the “eureka” moment someone else’s implementation sparks and using it as a starting point to creatively solve your problems.

– James

P.S. This post draws some ideas from Adam Kurtz’s excellent Things Are What You Make of Them and from numerous articles and interviews from the team at The Creative Independent. I strongly recommend both if you’re interested in understanding artistic creation and how great artists create.

James Turnbull is an engineering leader, author, and open source developer. James was the VP of Engineering at Glitch, a CTO-in-residence at Microsoft, CTO/Founder at Empatico, and CTO at Kickstarter. He was previously in leadership roles at Docker, Venmo, and Puppet. James was chair of O’Reilly’s Velocity conference, speaks regularly at conferences, advises a number of startups, and teaches engineering and technology skills. You can find him on Twitter.

Seek feedback loops

Dear new developer,

Feedback loops are so important. (If you’re not sure what that is, I’d recommend “Thinking in Systems”.)

These loops help systems improve. If you don’t have feedback, you’ll improve more slowly, in my experience. Why? Because you won’t know what you are doing that is good and what is garbage. It’s really hard to evaluate that kind of stuff yourself. You can do it, it just takes time and perspective.

And of course, you want to do more of what is good. Here are some kinds of feedback loops which have helped me.

  • tests
  • one to ones
  • public writing
  • being a contractor

Automated tests are a really tight feedback loop. You can make changes to code and know if you’ve blown things up. (Type systems are another tight feedback loop preferred by some.) This is helpful in many situations, including when you are debugging a problem.

One to ones are a great way to gather feedback from your manager on problems, challenges and situations that you have faced. By doing it in a one to one (rather than a one off meeting), you’ll build context and history around these. After all, the tenth time you bring up the fact you find front-end development challenging indicates that this is a pattern, and you should evolve yourself or the position to help with the challenge. When you have your meeting, make sure you ask for feedback explicitly. When you get it, avoid being defensive. If you make it hard to get feedback, you’ll get less.

Public writing, especially a blog, is a great way to get feedback. You’ll be able to put your thoughts out in public. This can be scary and frustrating; some communities are more gentle about feedback than others. But the act of writing forces you to make the implicit explicit. And sharing that knowledge is a great way to get feedback. (Even a lack of response is feedback; what you were writing didn’t resonated with the audience you shared it with.)

I think everyone should try being a contractor. First it makes you appreciative of everyone else in a business, because when you are contracting, you often have to take on roles outside of development (sales, accounting, marketing). But for the purposes of this post, contracting is a great way to get feedback from the market. You’ll learn about which skills are in demand and what organizations will pay for those skills. Of course, you can find this out as an employee, but if you are a contractor, especially a short term one, you’ll be interacting with possible hiring managers much more often than as an employee. And the feedback loop is brutal and blunt: do they hire you or not.

Feedback loops are a key way to find out whether what you are doing is working or not. Seek them out.

Sincerely,

Dan