samedi 24 octobre 2015

Creating Vs Learning

When I code for myself, I struggle to find a balance between willing to learn and willing to create something successful. As I lack of time (like all of you), I really have to work on this and keep these approaches as separate as possible.

When I mix both, I systematically get frustrated because I put a lot of energy on searching, learning and trying to find the right way to do things. Yet, my code reflects this learning process and it become harder and harder to get the features done and deployable. Step by step, I sadly abandon the projects in a forgotten github repository.

What are your expectations when you are learning? When you learn, it’s important to go deeply. For instance, rather than using JQuery upfront, you’ll try to write vanilla js, to figure out how things work and feel the pain by yourself. Of course you reinvent the wheel, but it’s OK as you don’t expect to deliver. It takes a lot of time and energy and you end up with a useless piece of code. You have to lower your output expectations. Find a simple objective (a simple game, a kata, a REST API and client) and focus rather on the process of discovering things along the way. Try a lot, acquire new practices, forge yourself an opinion about what you learn.

On the contrary, when you decide to create something, you have to focus on output. It’s the same goal as at work: get things out quickly with an acceptable level of quality. Start with what you know enough so that your lack of knowledge won’t prevent you to express what you have in mind. Don’t try to find and follow all the best practices, just do. You’ll be able to get back to your code later, if needed (if your app is deployed and is actually used). Try to be prolific and be ready to dismiss some of your creations: diversify your portfolio. The income of building things is not the knowledge you get but the feedback from your users (comments, money).

Of course, when you shape your mind toward creating, you’ll face situation when you’ll don’t know how to solve a problem, which can push you back into the learning spiral. Look for the easy path then: find the high level libs that do everything for you and don’t try to figure out what is done under the hood. Keep that for later, when you choose to go back to your learning phase. Examples:

  • Want to build something that rely on push notification? Start with node, Express and Don’t use websocket from scratch.
  • Want to build a REST client in Python? Search PyPI for an already existing lib. If not, use requests. Forget urllib for now.
  • You struggle to get a nice web UI? Read this.

This is a new mindset for me either. I want to learn but I also want to build stuff. Unfortunately, I have this tendency to reinvent the wheel and to avoid easy-to-use libs to prove myself that I am a badass programmer. Actually, I enjoy the process of editing code, trying things maybe rather than getting things done. Have to fight my demons now and craft a damn masterpiece!