A spark of an idea became multiple sessions of hard work at Coding Nights where Brandon Lim and our Singapore team of engineers came together to build their very first 8-bit computer from scratch. Find out what went behind the scenes and their learnings along the way.
Coding Nights at Zühlke
Coding Nights are self-organised Zühlke community events where we get to know fellow colleagues and new joiners, come together to work on software challenges and have some good fun. Good food and drinks are always involved, and it is a great way for us to take a break from our day-to-day work routines and put our heads together to solve challenges.
“I have attended a few Coding Nights previously, and have always found it to be a great opportunity for me to put down our day-to-day commitments and spend time to get to know my colleagues. I wanted to contribute by organising a few sessions and started to ask myself: How can I do it differently?” Brandon explains.
The answer came when Brandon discovered some YouTube videos by Ben Eater where he showed how he built a computer using breadboards. It was fascinating for him as he has always enjoyed hands-on projects and know how to build computers having worked with electronics during his school days.
With that, a spark of an idea became multiple sessions of hard work at Coding Nights as the team came together to build their very first 8-bit computer from scratch.
Experimenting and learning to work outside our comfort zone
“It took us 5 Coding Night sessions to complete the bulk of the work and 4 of those nights had more than 10 participants joining. Some of our engineers, myself included, were so passionate about the project that we spent additional time and our own resources to see the project through.”
For Brandon, one of the biggest lessons learned is beyond the challenging technical aspect of this project.
“The biggest lesson I have learnt and appreciate is the difficulty in estimating the amount of effort and resources required for the team to complete a project. The skills of the people involved are virtually impossible to quantify, unlike a video game where a character’s skills are just numbers. It is therefore challenging to determine the amount of time needed to finish the project. However, this does not mean you cannot get better at it. With frequent practice, you can develop your project management skills.”
“The second lesson was how challenging it can be to host and organise events. There were many variables to take note of: logistics, food, drinks, venue setup, and how to split the group into smaller teams if necessary. It pays to be proactive in confirming the attendees, finding out their dietary preferences, and setting up the location prior to the Coding Night session.”
“Lastly, the third lesson is the importance of planning ahead and determining what you need before starting something. Doing things in an impromptu manner can lead to chaos and it is not something that the participants would appreciate. In the case of working with physical hardware, it is even more important as we cannot simply “download” them as we could with software. We learnt it the hard way in our first session where we did not have the right tools — imagine having to strip wires with knives instead of a proper wire stripper. It was difficult and error-prone as the wires had thin insulation and we ended up cutting through the wires and had to start again with a fresh piece of wire!” Brandon shares.
If you are not outside of your comfort zone, you are not really learning at all.
Think big, start small, and learn fast
“One of the most memorable challenge we faced was that most participants including myself did not have prior experience working with electronics and circuits. The last time I worked with connecting different Integrated Circuits together with wires was over 18 years ago. In hindsight, we may have been overwhelmed by the excitement of working on something new that we thought we could do it without any prior training."
The best moment happened when Jonas, CEO of Zühlke Asia, walked in during the first session and asked the team if they know how to calculate the resistance of a resistor from the colour codes.
The team quickly went on a refresher course on calculating resistance, understanding which leg on a LED diode is positive, figuring out how the legs of an IC chip are numbered, and how to read a circuit diagram. Then the real building started.
“Our initial assumption was that once we got the basics of how to connect the wires to the right pins on the chips (Integrated Circuit/IC), the rest should be a straightforward process. On the surface, it did look like we were working with Legos. When there were a few wires and chips, it was easy to know what goes where.”
“However, as more wires were added to the breadboard and we had to go through more than a hundred metre worth of wires — it became harder for us to insert more. We had to use pliers to reach into the right area amidst the sea of wires and insert the one wire into the right spot. By the time we were done, the computer resembled more like a jumbled mess of wires.”
Build it, test it, refine it. Then repeat.
Software engineering and building the 8-bit computer share a few fundamental similarities.
In software development, the first draft of the application is usually not the final version because the priority is always about getting the idea out so that stakeholders could see if the team was on the right track. With the feedback, we could then improve.
Building the 8-bit computer is no different. For the team, the first order of business was to get everything connected to see if the final product worked. Therefore, it was perfectly fine even if the wires were all over the place.
For Brandon, the same engineering principles apply for both hardware and software.
"In software engineering, this is known as refactoring. Codes are cleaned up to improve readability and the existing functionalities thoroughly retested to ensure they still work.”
“In both cases, the knock-on effect was enabling us to do our work more effectively and efficiently because we could identify and prioritise what to do next and where to start quickly. Productivity improves that way."
The other similarity is unit and integration testing.
Unit testing is about testing a small part of the system to ensure that it works according to the requirements. By doing this, we pick up on any errors, problems or issues early on in the development process as it would be much cheaper and easier to fix since there are not a lot of moving parts and dependencies to deal with.
“In the context of computer building, we ensure that each module or chip worked the way we expected before the actual integration when all the modules came together and wires were added, like testing the RAM module by observing the LEDs to see whether the RAM behaves properly.”
Integration testing on the other hand, is about testing whether a subset or the whole system works once the individual modules come together. In software engineering, that means testing whether a software component is able to talk to another component to complete an operation or fulfil a request, like in the case of building the 8-bit computer.
In a similar way, the team tested the RAM module with the Clock module to ensure that the RAM was able to store and output something on every clock cycle.
You never really stop learning
“I believe that being a great software engineer is not just about creating high quality software to help solve problems and challenges, but also having that inquisitive mindset to never stop learning. Like in this case, understanding computer hardware will be useful in helping software engineers write good software.”
Modern software development tools abstract away many of the complexity of a computer system. From a software engineer perspective, once we finished writing a piece of code, we trust the compilers to take care of everything.
However, there are situations where the compiler is unable to generate well-optimised machine code and we are left with a software that seem to be unable to perform any faster. By understanding how the underlying hardware behaves, software engineers can write codes that properly utilise the underlying hardware, extract maximum possible performance and be more environmentally friendly. Afterall, if a computer hardware reduces unnecessary operations, it consumes less power.
The ability to write better software is not the only benefit. By getting people together to work on something in an informal setting could foster better collaboration and synergy, both of which are key to building a high performing team.
“Through these activities, we push ourselves out of our comfort zones to enjoy learning something new despite the initial uncertainties. For all we know, exploring such activity could spark people to try something new and ultimately develop new skills. A fun fact: Some of us have actually mastered the skill to estimate how much wire we need by observation and cutting the right amount from the wire reel!”The next big creative idea for Coding Night?
Coding Nights are a great way to collectively learn new things as a group.
“To start, building an 8-bit computer can be the first part of a series of which we explore the world of digital circuits and hardware that all our software run on. We can then look into building a graphics card out of breadboards, connect it to the 8-bit computer and subsequently display a small picture on a monitor. I believe this is a great way for all of us to learn how a video card works,” Brandon shares.
“Taking it even to the next level, we can build drones/rovers, program them, and then deploy them in either a fictional setting or in the wild to solve different kind of challenges and problems.”Looking to run your first Coding Night?
For anyone looking to run a successful social session like Coding Nights, Brandon has some tips.
“The first is to have an interesting problem to solve. Then, define a set of rules next. Having constraints help people focus on the problem at hand and not worry about other things. Lastly, take note of diversity when it comes to food and drinks. Coding Nights are also all about connecting with fellow colleagues, fostering relationships and building fond memories in our workspace. Nothing beats having a good meal with everyone gathered around the table before diving into problem solving mode.”
Brandon Lim is a Senior Software Engineer at Zuhlke and a builder at heart. He started out as a Full-stack Java Engineer and has since branched out working with different languages and platforms. He has worked on various software projects in diverse domains including Digital Payment, Aerospace MRO, Healthcare and Public Security. He never stops learning and is always excited to pick up new skills such as working with Arduino.
Brandon also enjoys writing, working with electronics and building things with LEGO during his free time.