My coding workflow for personal projects

I would like to share my personal workflow for when I’m working on personal projects. I have noticed that I’ve refined my coding practice over the course of the four years that I’ve been doing it. What I do in my spare time actually reflects a lot of my workflow at my day job, but is also different because it’s my time, so I can do whatever I want!

Git committing code

I like my code commits to be clean. I review all git diff’s before committing. I will do “work in progress” commits, if I’ve don’t want to lose my place, but won’t commit anything to a main branch that I’m working on unless I know it’s good and I want to keep it. I’ll make a small experimental branch if it is going to take longer.

What do I do different? I like to experiment more. I like to try to solve something more than once. Refactor an extra time. Try to get the best solution, by trying different solutions to see which I like better.

I make lists

Making lists of the next 4–5 things to do helps me stay organized and have goals for what I want to accomplish. Other, unplanned things still come up though. This is where I use Kent Beck’s strategy from Test Driven Development.

I will entertain a brief interruption, but only a brief one, and I will never interrupt an interruption (rule thanks to Jim Coplien).

So, I write down other things that come up, and do them as soon as it makes sense.

When I get an item done, I cross it off of my list. This makes me feel good. Like I’ve accomplished something.

I like to keep track of how much time I code, and what I did. This also makes me feel like I’m making progress.

Learning new things

At least once a week, I take a break from building things, and just focus on learning something with no expectations for producing anything other than to learn something new, better, etc…

This is super rewarding. Just building all the time, and only learning short tidbits on Stack Overflow can be monotonous. This is one of my favorite parts of coding in my spare time. Just learn something new or in more detail, and it’s fascinating. Then, it can usually be applied in ways that are at first unexpected. Future coding becomes easier with this constant improvement of knowledge.

Learn one new computer language or framework per year

By learning a new language or framework, it makes you think about your main language or framework in different ways, and you will come up with solutions that you didn’t think of before. After learning Java for 3 months, the way that I think of Javascript is pretty different. Java has different concepts for static types, setter, and getters, and inheritance.

Others are doing the same. For example, EmberJs now enforces that you can’t set a computed property, and it will raise an error if you do! It’s Javascript, so by normal standards, there is nothing stopping you from doing that, except now the authors have thought to enforce this concept in the framework.

That’s all for now. This is my first blog about coding. More to come :)