POODIR – Why to spend a weekend with this book

Margaret Hamilton with some source code, maybe from the Apollo Guidance Computer project. The code was woven into rope-core memory (left). Changes to that were not easy. Astronauts used the interface (right) to access AGC functions

Code is easy, I was told, because it is mutable – it will always be growing and changing – hopefully growing in capability, not in complexity. It is hard because you can paint yourself into corners – you create the maze that you solve and your tools can become your torture devices if you are not careful.

Here are a few things I learned in that respect from revisiting Practical Object-Oriented Design in Ruby (POODIR)

  • The practicality comes from a succinct set of ‘retries’ on individual concepts, enhancing them with each iteration, finding the new advantages and flaws; in other words the way a Developer learns and grows. It is as short as this format could allow and still cover the territory of object oriented design and test
  • It centralizes the dichotomy of object oriented design – composition versus inheritance but in the end emphasizes that the Message is what matters – communication between structures is what leads to joy in development

This is not a prescriptive journey, the core concept is that the reader understand the trade-offs and why they continuously re-appear in every development process – software development is a holistic process and choices are pragmatic – meaning they are made based on the best information available at the time, and on the fundamental assumption that software will be refactored when new information comes along.

The book is no more static in its approach that a development project and no more judgemental that a good fellow code reviewer.

This is a read for a practising professional that has been heads-down a bit too long, or a new graduate who wants to understand some of the more enigmatic comments on their pull requests. It can be read on a weekend and will broaden perspective. I appreciated most the last sections on testing and behaviour-driven development

Some of the main metrics that the author emphasizes is ‘cost effectiveness’, i.e. time cost now and time cost in the future, and Joy, which is measured in the ease of manipulating and traversing a code base to adapt it to new capabilities. These are the two most meaningful things a developer can measure, since they impact every day of their careers.

Three big takeaways:

  • Test the behaviour of Object through their public interfaces. Question the existence of extensive private behaviour in a given moving part of your design
  • Understand that their is a spectrum along which you make architecture choices every day – between composition and inheritance, between now and the future. The balance is struck in terms of time invested now versus time needed for future changes
  • Code is mutable – it will change, and you may or may not be the one to have to change it. Make this process of refactoring a joy, rather than a pain through self-documenting architecture, interfaces, and tests

 

 

 

Where to go after seeing The Martian?

Where to go after watching The Martion

After watching The Martian you might be craving more realism, more Mars, more mission control, more space exploration, more survival stories, or just better acting. Here are a few documentaries, books, and other movies and how they are related to The Martial, aside from the usual “same director” and “same Matt-saving”

Minimum component infrared Camera trigger timelapse on canon cameras using Arduino

Check out "How Vacuum Tubes Work" to appreciate the convenience you get in your Arduino board.

Check out “How Vacuum Tubes Work” to appreciate the convenience you get in your Arduino board.


EOS M is a great little camera, but only has the Canon IR trigger for interval and timelapse. Here is a link to an Arduino sketch that outputs IR trigger signals on pins 12, 11, and 10 at 5, 15, and 30 seconds respectively. Designed to run on an Uno board with minimum external components – just change the IR LED + pin to the appropriate pin above for the timing you want. Credits in the code header. Let me know if you have any improvements!

.ino file

The Ultimate Outreach Question: What If

What If, Randall Monroe

What If, Randall Monroe

If you have not come across XKCD yet, I envy and pity you. Pity, because you have been missing out, and envy, because you will get to see it all for the very first time. XKCD is in the Spirit of the Pulitzer prize winning book Godel, Escher, Bach, but more of a stick man version thereof. The author of XKCD, Randall Monroe, is releasing a book, “What If” that takes his format into the realm of stupid questions – the best kind – to find some surprising answers. Curiosity is not smart, curiosity is curiosity. It kills cats, it causes nuclear cold-wars and internets, and helps you pop bubble wrap with rolly chairs in the office. What If doesn’t even exist yet, but what if it did? (i.e. it’s on preorder) I hope they can print enough DRM’s e-book editions.

Outreach #2: I F*ing Love Science is going the TV route

Science in mainstream culture is benefiting from the fragmentation of broadcast and upstarts looking for new content. The low production overhead of blogging will be moving up-budget, though the format has not been announced.

The unabashed enthusiasm for curiosity and the love shown for the curious people behind it are what makes IFLS stand out. I hope they can have some associated interactive content to go along with the production budget.

details here