Matthew Lang avatar

Matthew Lang

Web developer with a preference for Ruby on Rails

Logging a TIL a day

Every day is a school day. I love that phrase.

As a programmer and daily resident of the Internet, it really does apply to me. Not a day goes by where I don't learn something new. It might be a new method in the Ruby language, or a new trick in Rails. It might even be just learning that your favourite App.net client for the iPhone does allow you to save drafts. Really, I just discovered this last week.

The thing is though, I'm usually working at such a pace where I learn something, use it and then forget about it. No more.

You only learn from the things you write down. If you don't, trying to remember it with the million other thoughts that go through your head that day just makes it impossible. So with that in mind I am aiming to log a today I learned (or TIL) a day.

Mostly this will be programming stuff, but it should feed the my blog for potential development and programming posts. I might even post a summary of the week here if it becomes more than just programming stuff.

Leaving a legacy

I might not approve of Curtis McHale's choice of journaling tool (just kidding), but I do approve of his reason for journaling.

I’d like to think that they will want a better picture of what I was in my 30′s as my family was starting. I’d like to think that I’m interesting enough to leave a legacy for them that they’ll be interested in.

Knowing those that came before you by Curtis McHale

Journalong love

Nitin Khanna has been enjoying Journalong:

So you like to note down your thoughts but don't want the complexity of a proper journaling software like Day One? Journalong is now free, so just hook it up to your Dropbox and start using it to write down your thoughts in txt or markdown, maybe even several times a day.

Journalong: Easy Peasy Dropbox journalling by Nitin Khanna

A good idea: The text playlist

I originally read about Leo Babauta's text playlist at the start of the year. The idea is that you keep a list of articles that you read on a regular basis and keep them in easy reach. I was sold.

I wanted to create my own text playlist but the problem I had was that I had hundreds of articles to pick from. My Pinboard account gets links saved to it daily and at the last count I was at just over 1300 saved links. Where do I begin to build my list? Searching through my Pinboard links was going to take time.

I let the idea of a text playlist slide for a while until I came across an article that I wanted to add to my playlist and over the last few months I've browsed through a few tags on Pinboard looking for articles that I've frequently read in the past.

At the start of the week I had a breakthrough. Stef Lewandowski's article on creativity was my first article on the playlist and today I recalled a few other articles of the same high quality that I wanted to add. I love this idea of a highly valued list of articles that you can refer back to on a frequent basis. I like to think of it as my "Best of" from my saved links in Pinboard.

So without further ado, I give you my text playlist.

A new hobby

I have a new hobby, sort of. Last weekend I bought myself a new set of golf clubs and last night I took my oldest son to the driving range for a boys night. He got to fine tune his swing and I got the chance to become familiar with the first set of golf clubs I've had in 20 years. It's sure been a long time since I played a round of golf, so I wasn't sure what to expect with a new set of golf clubs. The surprising thing was that I could actually hit the ball reasonably well.

This new hobby isn't about me though, it's more about my son. Being a great little golfer means I want to get him on the course as often as possible, but access to golf courses for kids isn't easy, especially when you thrown in the unpredictable Scottish weather. Also he's a bit young to be out playing a round on his own.

So I decided to arm myself with some clubs and get into this golf thing with my son. Hopefully over the summer and autumn I can get him onto some public courses near us, but more importantly he can teach Dad how to play golf!

Don't neglect your product

It's come to my attention that I have neglected Journalong in the last few months. I had big plans for Journalong but in the last few weeks I've simply neglected working on it. I should be able to work on Journalong on my own time, but finding that time has been difficult over the past few months. That's no excuse though, but that's really another story.

I only realized how much I had neglected it when an email from the on-line writing service, Draft, arrived with a bundle of new features for users. Reading through the features I realized that I had let Journalong slide for too long.

No matter what size of product or service you run, letting it fall to the wayside for even a few weeks is bad. If you want it to be a success then you need to be gradually improving your product just one bit at a time.

Even if it's only a couple of hours a week, it better to make improvements and ship them rather than waiting for a day where you can do a whole ton of work in one go. That day might not come for a few weeks or months. What if it does come and you end up doing something else? Don't neglect your product.

Goodbye Twitter

This afternoon I said goodbye to my Twitter handle, @matthewlang and deactivated my account there. It's been a move I've been thinking a lot about over the last few weeks. Since the start of the year my Twitter use has really declined. I just don't have the time for Twitter, and I was increasingly finding it to be more of a distraction than anything else.

In the last few weeks I've deleted my Google account and now another aspect of my on-line presence is gone. And it's no bad thing either. Having lots of networks and profiles attached to your name isn't a good thing in my book. Stretching yourself across multiple networks and services takes a lot of your time. That's time I just don't have.

There are of course accounts on networks and services I do have like LinkedIn and Github, but these are important to me and they don't require a lot of time.

I also have a personal website and blog that I post to on a daily basis. I find that writing for my blog gives me more to say on a topic than Twitter ever could. Given the choice between spending time on Twitter or writing for my blog, I'd much rather spend the time writing for my blog.

What's in a name?

What's in a name? Quite a lot actually. When I first started freelancing it was my wish to specialise in Ruby and a couple of the more popular frameworks that are built with Ruby, namely Ruby on Rails and Sinatra. Being fresh to freelancing I didn't want to narrow my field down too much either. I still have plenty of experience with the Microsoft .Net languages and frameworks. After considering this I used "Freelance Web Developer" as my title on my website and as part of my bio.

Now though I am re-considering who I am and what I do as a freelancer. I'm coming round to describing myself more as a Ruby on Rails Developer than anything else. Yes it is more focused than what I have done in the past, but it's what I have been working with for the last five months and will continue to do so in the near future.

I never thought that the Rails framework would involve so much. Every day I'm discovering something new about it and I'm really enjoying the experience. For now I'm happy to be marketing myself as a specialist rather than a generalist.

Time for a reading switch

I've been reading fantasy books for over 20 years now. I was first exposed to the genre through a friend at school who gave me the Dragonlance Chronicles to read. It was hefty book but I was immediately hooked. Since then I've read hundreds of books in the genre enjoying each and every one.

Over the years I've favoured authors like J. R. R. Tolkien, Terry Pratchett, Raymond E. Feist, David Gemmell, George R. R. Martin, J. K. Rowling and David Eddings. There have been a few authors who I have only read one or two books from, but I tend to favour books from the authors I just mentioned.

In the last year though I've become less and less patient with the books I have been reading. I've abandoned four books in the last year because they didn't hold my attention. Books that I am reading are becoming predictable or simply just don't grab me when I am reading them. Now I'm finding it especially difficult to find a new book to read from the fantasy genre because I don't want the next book turning out to be another turkey.

I haven't been reading books from the fantasy genre exclusively, I have been reading other books in the last few years including the Master and Commander series, Conn Iggulden's Emperor and Conqueror series and a few other military history based works of fiction.

I'd even consider the zombie genre if it means I'll find more books to enjoy. Perhaps it's time for a switch.

Rushing Code Through

Life as a freelance developer isn't always plain sailing. I can deal with the bulk of my day to day activities including requirements gathering, designing and implementing features with code, testing and of course deployments. It's what I am paid to do by clients.

The one thing I have trouble with is rush jobs to meet a deadline. As a developer I would ideally like to write tests for all my code, re-factor it and get it to a place where I feel comfortable shipping it. In the real world though that doesn't always happen. Sometimes it's only hours you get to either rush some code changes through. A depressing experience for any developer who takes pride in their work.

In scenarios like this I like to remember that although the code I am shipping in not tested or re-factored to my preferred standard, I can always pick up the code the next day after the deadline has passed. Before I pick up any other tasks tomorrow, I'll ensure that the sub-standard code I previously shipped is correctly tested and re-factored appropriately.

My tips for keeping a journal

Keeping a journal seems quite an easy task to do, but remembering to update it and keep it going can be something else. I've kept my journal going for 18 months now and these little tips are what have helped me journal for this long.

Set a reminder

Set a reminder for your to do your journal entries. Last thing at night before you read a book or an hour before you go to bed are ideal times. Any kids you have will be sleeping, so you'll get a few minutes of distraction free writing.

Setting this reminder will hopefully turn into a habit where you will pre-empt the reminder and journal every day without being prompted by a reminder. If you find yourself forgetting to journal, then simply set up your reminder again.

Journal just two or three sentences at a time

Keeping a journal doesn't mean you should be writing epic chapter length journal entries every night. Just two or three sentences are sufficient. If you want to write more then do so, but just a summary of the day is sufficient for those non-eventful days.

Keep your journal close

Whether it's pen and paper or journaling with your preferred app, keep your journal close for those times when you want to write something down. You never know when you're going to want to write something down.

Don't knock yourself for missing a day

Journaling every day can be difficult. Family life, career, holidays, work trips and other things can distract you from journaling for a day. If you miss a day then don't worry about it. It's only one day. Get back to writing a journal entry the following day and make sure your reminder is set for a few more days until you get back into the habit of writing a journal entry every day.

Don't Strive for Perfect Code

Striving for perfect code is a goal of many developers and programmers. We want our code to be simple to read, concise using the best idioms that our programming language has to offer and of course backed by an army of tests to prove it works. You want your code to be perfect. This is achievable in our own projects and products that we have invested our own time in, but what about work for clients and employers?

Your development time is measured as a resource whether you are a full-time employee or as a gun for hire freelancer. How do you justify spending hours getting the code you have written to be the most perfectly implemented code you can achieve?

You don't.

As an agile developer, the code you have written should be testable and easy to read. With a little bit of extra time, it should also be concise to the point where you have re-factored duplicate code, extracted some methods and maintained basic programming principles but also ensured that it is still readable. So what about taking a step further and making it even better?

Hold fire. The code you have written for the feature or bug or whatever it was is now working and tested. You've spent a bit of time refactoring. Now commit your changes and move onto the next card for the application.

In your eyes you have committed sub-standard code. With a bit more time you could have taken it further and made the code better. This path can go on and on if you're not careful.

In your client's eyes or employer's eyes you have committed working code, you haven't taken too much time to do it, and it works. They will be happy with your efforts.

The perfect code you are aiming for is never going to perfect and nor will it last. In a few months, the framework you have written your code with is going to be updated. Chances are the perfect code you have written could be improved upon again. In a year or two, the programming language your application is written in is going to be updated. There goes your perfect code. Then when the programming language has been superseded by a new kid on the block, the application you invested so much of your time in is rewritten in a different programming language. Your perfect code is gone forever.

Unlike the written words of Hemingway or Tolkien that have endured decades, your code is simply a stop gap to making a product or service operational. By all means exercise some time to make improvements on the code. Remove duplications, re-factor it, but always keep an eye on the clock. Spending too much time trying to achieve perfectly written code is not a good use of your time or the time of your client or employer.

The wrong approach

The wrong approach. It's a major downfall of mine. Trying to solve a problem by approaching it wrong and looking for a difficult solution. The thing is I'm not looking for the difficult way to solve the problem on purpose, I just keep happen to be looking in that general direction.

Take the problem I had today.

For three hours I tried to find the solution to a problem I was having in a clients application. I spoke to the client at the end of the day to give them an update on my progress and five minutes after the call the solution was clear.

The client didn't provide the solution. It was just one of those moments when everything fell into place and all of a sudden the solution became clear. I wish these moments presented themselves more often.

The truth is I simply need read up more on the programming languages and frameworks I'm working with on a daily basis. The everyday knowledge only gets you so far. When you've exhausted that you need to look towards the more advanced parts. It's only when I learn these advanced parts that I will truly rid myself of looking at problems with the wrong approach.