Tech
Testing Code
When I was in college studying computer science, something that got drilled into me was the concept of test-driven design, or TDD. TDD is a method of designing software in which you write your test cases first, then go and write your code. The advantage of doing this is that you make a sort of checklist of items to complete, which you can periodically test your code against to measure your progress and verify that changes to your code don’t break any previously working tests. This usually all depends on having some testing framework installed, either as an included component of the language, or as a third party library. In school we would use JUnit since a lot of the mid-level classes were taught in Java.
Building a Shell in C
Yqsh is a side project of mine that I started because I wanted to learn how a Linux shell works and brush up a bit on my C skills. This page is a compilation of learnings and challenges I come across while building it. The source code is available online.
The Basics
At the simplest level, a shell presents you with a prompt, waits for you to type a program to run, then runs the program and presents you with the output. There is so much more to it than that, but this gives me three things to implement as a starting point: