books life

The Joy of Books

Books are amazing. They are these small handheld items of compressed knowledge – some of them hold a lifetime of wisdom…  others are engaging and creative stories that spring up as a result of many days of mental hard work.

In our modern connected world it is the power of video that gets the most attention. It’s not suprising though is it? We humans are hard-wired to take in information visually. If there is a smartly dressed and attractive person delivering the information it definitely gets our attention (be it the weather forecast on BBC or a YouTube video).

I acknowledge and enjoy the power of video but over the last few years I’ve started to make an effort to read books that are regarded as must-read or just those that I think will help propel me upwards on my journey of self-improvement.

I wanted to highlight some of these (and a few personal favourites) and why they have had such an impact on me… so read on!

  • Guns, Germs & Steel (Jared Diamond, 1997)
    This well known book by anthropologist Jared Diamond seeks to answer the question of why Europeans came and conquered the “New World” rather than the other way round.
    This is a question, a “shower-thought”, that I had pondered for a while. I have this fascination with ancient history and why the world looks as it does today. If I had a time machine I think I would call up Jared Diamond first and invite him to visit any time period he chose (as for me I would fast-forward to the 24th Century to see if it really does look like Star Trek πŸ™‚
    They made a TV series of the book with Jared Diamond himself, however I urge you to read the book as it is very accessible and aimed towards the ordinary person.
  • Bounce (Matthew Syed, 2010)
    This highly-rated work was the very first audiobook I ever read (listened) and is absolutely fascinating look into the “Talent Myth” – this is the belief that some of us are born with innate talents that others do not posses.
    It is not only engaging and interesting but also enthusiastically narrated by James Clamp. It might seem odd for me to mention the narrator but I found that some audiobooks are let down by the narration however not in this case.
    In my field of Software Engineering I have come across colleagues who have seemingly magical abilities when it comes to writing software or picking up abstract concepts. After absorbing this book and from talking to some of these colleagues I now know better, it is not magic or some innate ability but the result of many hours of things you don’t see: personal learning & discovery outside work hours, writing non-perfect software that fails in production and then learning the lessons and learning from other more experienced software engineers.
  • Star Wars: The Thrawn Trilogy (Timothy Zahn, 1991)
    What the heck? I’m including an iconic bit of pop-culture in this list?! Yeah mofo, it’s MY list πŸ™‚
    I should say that I’m not a serious Star Wars geek but in the mid-1990s teenage me picked up these books one random weekend because I was amazed someone was writing stories set after Return of the Jedi (that was 1983). Turns out the author Timothy Zahn had crafted a wonderful story that captured the feel of the beloved movies perfectly. Every word the characters spoke were as if they were lifted from a real movie and spoken by the original actors.
    I later learned that Timothy Zahn recorded the movies to audio cassette and used to play them back in the car for his son on long cross-country trips. Believe me, it shows in his writing!
    “Thrawn” refers to Grand Admiral Thrawn, a character from the story who has since become so popular that he is now part of the official canon of Star Wars. After raving about these books to my brother, I promptly bought the rest of the trilogy and read them all in a week. You don’t have to even like Star Wars to enjoy them, it’s simply a good story set against a well-researched science fiction backdrop.
    As a side-note I got in touch with Timothy Zahn on Facebook and he always replies promptly. One of my life goals is to meet him one day and get him to sign my copies πŸ™‚
  • Mr Money Moustache Blog (Peter Adeney, 2012+)
    OK, I cheat a bit – this is not a book… but a blog by a wonderfully articulate, mild-mannered yet bad-ass retired Software Engineer living in Colorado, USA. However if you collect all his blog posts from 2012 onwards to present day they could easily be taken as a book of sorts.
    Oh, and no it’s not just about money. The secret agenda behind it is to trick people into living the best life possible for a human being by developing something called “bad-assity” πŸ™‚
    For a Quick Start I strongly encourage you to start here and here to learn about the F.I.R.E. movement and what MMM is all about.
    This guys writings strongly resonated with me and put into words some nebulous thoughts, hunches and feelings I’ve had rattling around my brain for a while. I’m not the only one – his blog has a global audience.
    For a British slant on this theme please check out The Escape Artist.

So that is my list!
I’m currently reading The Seven Habits of Highly Succesful People and listening to an audiobook on Elon Musk. Next I want to read Anti-Fragile.
For a more comprehensive list on what is highly regarded by people I regard as peers, I encourage you to check these lists:
…but now over to you – what has made an impact on you?


So you deleted your Windows 10 partition table… now what?

You know the scene. You are helping a friend with a couple of corrupted/dead microSD cards. You want to access tools on a Linux machine but you moved to Windows a long while back.

You only have your trusty Windows 10 laptop that you’ve had a year onto which you have meticulously set-up your data and apps and other custom bits and pieces (ssh scripts, Virtual Machines). So what do you do?
My first thought was to use an existing Debian VirtualBox to do this. However I soon found out that VirtualBox does not yet support microSD device pass-through. USB devices work fine but not microSD… πŸ™
So what now? Being an experienced Software Engineer you insert a SystemsRescueCD liveCD USB into your Windows 10 laptop and then boot into a SystemRescue system. You then fire up gParted, plug in each microSD card in turn and proceed to examine the state of each card.
For the first card you spot some oddities and use “dd” to write zero’s to the whole device. Once that is done you create a new partition table. Eject and insert it. There are still weird things happening. You still see the old partition layout. Curious. You give up and declare this microSD card unusable.
Next you try the other microSD card your friend has given you. It’s late, 2131hrs, and you’re tired, it’s a working day and tomorrow is a Friday. Yay end of a busy week. With gParted open you insert the microSD card and without thinking much, proceed to delete the partition table and answer “Yes, I really want to do this destructive action” to the dialog prompt…
Hmm, something odd. Where is the card in the device list from /proc/devices … Oh no. No no no. The device was not detected by the system. Therefore it did not appear as the default device in gParted. Therefore I just deleted the partition table… of my perfectly fine and working laptop HDD. Arghhhhhhhhhhhh!
OK… calm down. Do not panic. I have a running system and that system happens to be SystemRescue OS. I can recover from this if I just keep my head straight.
The data is still present on disk it’s just the disk layout table, telling the OS where to find each partition is just not there.
Thankfully, I had SystemRescue USB at hand. On this are handy tools to help recover from just such an eventuality. After all it does not have “rescue” in the name for nothing!
After some Googling of similar problems I discovered the tool I needed is called “testdisk” –
this attempts to scan an entire disk to find partitions (and guess it’s type). In running this myself I found that one can simply just use the defaults options it gives me.
In other words, the default options “just work”. Just let it run and find the partitions. It will present a candidate partition table to you. You can use the “p” key to view the contents of each partition it finds as an extra check (examples from all three partitions below).
img_20181026_113606 img_20181026_113556 img_20181026_113536
Make sure you also make the first partition bootable (indicated by the asterisk *).
Windows 10 normally will have three partitions: a boot partition, the system (where Windows 10 actually lives, all your apps, photos, userdata, etc) and a recovery partition.
After checking that everything looks OK, accept the partition table and write it to the hard disc.

This is what your partition table should look like post-write by testdisk
This is what your partition table should look like post-write by testdisk

Now at this stage if you boot the system you will probably see some scary black or blue screens. You need to do another step which is to rebuild the “Boot Configuration Data”.
The way I did this was to get a Windows 10 install media USB (or CD), boot into it and follow this guide to get to the command prompt.
At this point I did:

bootrec /rebuildbcd

…then reboot. For me that fixed it. Phew! Thank Zangief for that!

I've never seen such a beautiful sight :)
I’ve never seen such a beautiful sight πŸ™‚

If that does not work for you I recommend trying these in order:

 bootrec /FixMbr
 bootrec /FixBoot
 bootrec /RebuildBcd

More info here
Moral of the story is: do not do sysadmin work as root when you’re tired (obvious in hindsight!)
Note: I did an additional un-needed step after I wrote the candidate partition table to the HDD. This was to use “testdisk” to “Write TestDisk MBR code to first sector”. This was not needed since we will use the Windows 10 install media to write the MBR.