How much time should I spend a day learning to code?

This is the question I asked myself when I first started learning (well relearning really) to code a while back. Obviously I Googled this and found some really interesting answers, but generally speaking, the common wisdom is about 4 hours a day.

I call bullshit on this. In my experience (and your mileage may vary) you should code every day, but it really doesn’t matter how much. Sure, you’ll get to the destination faster if you’re able to put 4 hours a day, but that number is completely unrealistic for a good chunk of the population.

Personally, I have a full-time job, 2 young kids, and a wife. 4 hours a day is an absurd amount of free time for me each day to work on much of anything. So when I study something I work to a very simple philosophy. Do some study every day. That’s it. Change is all about momentum. You don’t have to stop sleeping to make a change, you just have to show up every day and do something.

Routine is key

My personal routine is to get out of bed early, normally around 5-5:30am. Then I do as much of my course work before the kids get up as possible. Normally I’d get around an hour or so done. Some days I might sleep in and only get 30 mins, but I still progress. To solidify my learning, in the evening I go over what I did in the morning and write up notes. Sometimes those notes turn into a blog post. In that way, I’m sort of doing double duty. Sharing what I’ve learnt and documented it for my own retention all in one.

The thing about learning anything over and above your already busy life is that you have to make it accessible or it won’t work. Lowering the barrier to just do something each day means I might only research something I learnt the day before or add some comments to code I wrote a week ago. It really doesn’t matter what it is, as long as I get started each day.

So if you’re wanting to study but don’t think you have the time? Explore study options that let you learn in small chunks and to your own deadlines. I’ve found both Udacity and Udemy great services for this sort of thing. You won’t get a formal qualification from these services, but if you’re just interested in the skills then does that really matter?

Github Learning Lab🔬

I’ve been using GitHub for a while now as part of my spelunking into the world of VR and Mobile development. I think it’s fair to say it’s done a great job of protecting me from the inevitable mistakes of learning something new. Having said that, it does take a while to get your head around anything other than the basics.

Thankfully there are a large number of resources available to help you along the way. Most recently I discovered GitHub Learning Lab, a fantastic resource for learning how to use the platform for your own projects or contributing to others.

I think the thing I enjoy most about this particular option for learning is that it’s actually using the tools themselves. Yes, there is text and video to consume, but you actually use GitHub itself to work with the course material. I’m a real learn by doing sort of person so this sits particularly well with me.

So if you’re new to GitHub, or just want to solidify your knowledge of it, I suggest you take a look.

 

How to: Setup CocoaPods in Xcode

Hey, guess what? I’m learning iOS development and have been for months! Thought I might increase my rate of publishing to my blog if I did what I did for my VR course and posted study related stuff here. So to that end…

Here’s a simple step by step guide for adding CocoaPods to your iOS projects. There are quite a few steps involved and I suspect this is something that is done relatively infrequently in a single project. It’s always nice to have a reference for this sort of thing.

Steps

  1. Inside Terminal, change directory to the folder containing the Xcode project
  2. Initialise a new Podfile. You do this by using the “pod init” command. If you need more details read about it in the CocoaPod’s guide for pod init
  3. Open the Podfile in Xcode. Just drag it to the Xcode icon in the dock
  4. Add the library to the pod file. Here’s an example Podfile with SwiftyJSON and Alamofire libraries added
  5. Install the pods using the “pod install” command in Terminal. Here are more details on pod install should you need them
  6. Now open your Xcode project via the new .xcworkspace file

Easy as pie.

Udacity VR Nano degree retrospective ⏳

When I started my Udacity VR Nano degree I knew I was in for a challenge. Now that I’ve successfully completed my final assignment I thought I’d share some lessons learnt. So in no particular order:

  • Use version control. Thankfully I started doing this very early on. I had heard of the benefits and for whatever reason actually took them seriously. I started a religious habit of regularly pushing changes to GIT. I only used GIT to roll back to previous versions of projects hand handful of times, but had I not had the option I would have had a much bigger problem on my hands.
  • Don’t underestimate the time required. Taking on any study that requires large blocks of time can’t be taken lightly. It’s not going to be enough to only do a 30 min stretch at lunch, or an hour once the kids are in bed. You’re going to need a clear half day at least once a week to make real progress. Also, make sure you know what’s going to consume your time on projects in any given block. No sense clearing 4 hours for study only to have 3 hours of that time consumed rendering a 4k 360 video.
  • Don’t forget to look after yourself. With pressure on your time, it’s easy to cut out things like exercise or time with your family. Don’t do that. Cut out things that are actually a waste of time instead. TV is a big one but also think of ways of compressing your time. Like listening to audio books while you go for a run rather than reading a book alone.
  • Take breaks. If your mind is cluttered you’re not going to learn as well as you might. I found when I spent more than an hour trying to solve an issue the thing to do was take a 20-minute walk, clear my head, then take another crack at it. It’s amazing how often your mind will solve problems for you when you let it.
  • Take notes. Even if you never refer to them, take them anyway. Do this with a pen and paper (or a tablet and a pencil). It’s all about making the information get in your head. I almost never refer to my notes, I don’t take them to remember later. I take them to remember them now.
  • Try and integrate your life into your study. I did this by using my kids as the target audience for my projects and used them as user testing subjects while developing. It let me spend quality time with them and get some study done. It was also an education for them too so a real win-win.
  • Scope out what you’ll need before you begin. I started my course with a late 2009 Mac Mini. While old, it was fine for much of the course. The later parts that required 4k 360 video editing, not so much. This sort of thing can add considerable costs to your study budget so make sure you have a line of sight on this and save accordingly.
  • Get involved in the community. A huge part of successful study for me was the community of learners and educators around the subject. Help others and ask for help when you need it. Don’t waste time beating yourself to death if you get stuck. Solving your problem on a public forum helps everyone else with the same issue in future. So don’t be selfish, ask for help.
  • Be grateful. To your partner for looking after the kids. To your friends for listening to your ramblings about project issues. To your classmates and mentors for helping you along the way. Be grateful.
  • Stick it out. Software development is hard. It’s not supposed to be easy. It is literally constant problem-solving. There will be times you’ll think “maybe I’m just not good at this”. Just keep going.

Done: Night at the museum ☑️

I’ve been AFK for a while (holiday) so I just wanted to post the details of the final version of “night at the museum” I finished a few weeks ago that I delivered as part of my Udacity VR course.

The project went well (in that I passed) but I have to admit it was an exercise in restraint as much as anything. Like a lot of people, I tend to have big plans for everything I make but those plans are not always practical. This project was no exception. While I am ultimately happy with what I created, I do consider it very much a minimum viable project. When it comes to working on assignments like this there are a number of things to consider. First and foremost for me is available time.

I’m totally loving learning VR development, at this point, I spend almost all my free time doing it. But working full time and having a young family is a busy time in life, so if I want to progress projects I have to be efficient with my time or things can stagnate. Also, I currently pay for my studies via a monthly subscription so every extra month a project slips into comes at a significant extra cost.

Just to give you a few examples of compromises made on this project:

  1. Playing content at each of the stations was fairly limited and doesn’t have much finesse. For example, the final build allows the user to play audio from all 5 stations at the same time, this leads to a fairly horrible experience if a user does this
  2. I reused a museum model from a previous project because it was faster than building my own. This means it’s not really an ideal setup. Space feels a little constrained and doesn’t provide much room to move about. Most real museums are quite spacious so it didn’t really fit the aesthetic I was aiming for
  3. I wasn’t that happy with the spatial audio implementation. The environment had a bit too much reverberated for my liking and given more time I would have improved this a bit
  4. There’s no environmental audio, just the content of the stations. I’d preferred to add some atmosphere to the scene just to add the feel of the place

There are loads of other things that could be better about the final deliverable, but ultimately what was made “did the job”. Creating anything is always a series of compromises and I think delivering something you can live with and (resourcing permitting) can be built upon, is more important than getting things perfect. Perfection, after all, is the enemy of the shipped.

If you’re interested in the project’s code, it’s all available on my Github account. Enjoy.