Learning by doing

I’m often asked ‘how do I learn [insert something new here]?’, or ‘what approach do you use for learning something new?’. You can learn many ways, we all have different styles of learning so you should experiment to find out what works for you

In software development, learning by doing should never be ignored as a useful technique. It’s one thing to learn something at a high level by listening to a podcast, reading something online or in a book, but the next step if you really want to learn the ins and outs is to do it yourself.

Here’s an example of why this approach is valuable. You overhear a guy talking about how a machine is turned on: ‘to turn on the machine you press this button’. Some time later someone else asks you how to turn on the machines, and remembering the conversation earlier, ‘you press this button here’ – the other guy presses it, and nothing happens. Huh, what went wrong?

If you’d tried to turn on the machine yourself earlier you would have found out, probably by trial and error, that there’s a key and it needs to be turned to the ‘on’ position before you press the button. There’s no way you would have learned this just by the earlier conversation, but if you’d tried to turn on the machine yourself, if the key was in the ‘off’ position then the button wouldn’t have worked and so you would have started to investigate further, get the manual, or go and find the other guy and ask some questions.

This is rather contrived example to make a point, and how much detail you need or want to know about any given topic of course varies. However, in software development, I don’t think anyone would argue that you don’t learn to program by reading a book; you learn by doing, you learn by writing code. Go write some code, you might learn something.

Enabling Ubuntu Bash shell on Windows 10 with the Anniversary update

I already have the Anniversary Update on my Windows 10 install, and I needed to ssh into one of my Raspberry Pis. I normally do this from my Mac, but since I’m in Windows 10 working on something, I thought this would be a great opportunity to install the new Ubuntu Bash support and then I can ssh from there right? (I could just install Putty, but then I wouldn’t have a reason to check out the Ubuntu Bash support, right?)

First attempt following instructions here, the bash windows opened and closed quick, too quick to read whether there was an error or not.

Second attempt, from a Command Prompt, entering bash, I got this:

Ok, to enable Developer Mode, into Settings, and click the radio button under ‘Use Developer Features’:

Then I got this error:

Hmm. Not very helpful. Clicking on Learn More opened a browser to a help page, but it didn’t load – I’d reconfigured my ip address to a static address on a local network for testing, and I didn’t have internet access. 0x80004005 probably could be a little more helpful, but enabling DHCP to get an internet connection and then tried selecting the Developer Mode option again, it downloaded, said ‘Some features may not be available until your PC is rebooted’. Rebooted, ran bash from Command Prompt, and now it prompted to download the Ubuntu Bash support. Why it couldn’t have done this already is beyond me, and I’ve already rebooted once, but answering ‘y’ it starts downloading:

After it completes you create a unix user and then you’re all set, and it even has ssh included.

Capturing the KISS pseudo terminal /dev/pts/x value from Direwolf

If you startup Direwolf with a KISS pseudo terminal for connecting another KISS packet app through Direwolf, you probably also need to run kissattach and mkiss to attach to the pseudo terminal. You can do this manually, but after doing this a few times, I put together this script to grep for the returned /dev/pts/x and then execute the kissattach with this value:

iPhone 7 – where’s the innovation?

The iPhone 7 is probably going to be noticed more for what Apple has removed, rather than the faster processor and improved dual lens zoom camera, since this is the first iPhone without a headphone jack.

Apple is notable for removing features on their new products though – laptops and desktops (iMac) with no floppy drive, and then later, no optical drive (MacBook Air).

PCMagazine added this perfect statement:

People who want iPhones don’t want them because of the spec sheets. They want them because of iOS, third-party iOS apps, Apple’s service and support network, and the community effects of Apple-only systems like iMessage.

Apple has succeeded so well at creating desirable products, that if they announced an iPhone 8 today with no new or additional features over the just announced iPhone 7, people would still buy it, just because it’s “one better”.