Handmade Hero Day 001 with Q&A
Its time to restart.
Some motivating background.
I attempted to kickoff this series some time back. I think it was early Jan 2024. I started and then life got it the way. As it does. I am back would like to really deep dive into this series and finally understand and get a grasp of the lower level operations of my machine and mess around with the memory to make the machine do what I want it to do. I am also going to refrain, at least in the beginning of using any A.I. in this blog. I use A.I. a lot in my daily work and would like to make sure that my skills of human communication are kept fresh by practicing in some venue. I think this will serve as that venue.
Day 1
What did we cover today?
Today we covered setting up the development workflow for what Casey has said we will the rest of the series. Specifically we come to understand that sometimes all the large build systems that industry would have you to use can be bloated and often, especially in the beginning are not needed and can even add unnecessary overhead to getting to the point of actual starting to build something.
Additionally Casey let the audience know that he will be using emacs as his editor of choice. So will I. He showed some shortcuts and ways to easily interface between emacs and windows applications. We also learned how to use the command line tool cl to build our project and devenv to execute and debug our application.
I would say that the theme of today was mostly getting an end to end build process working so that in future videos we are able to focus on the coding flow and not worrying about if our system is set up correctly or not.
My notes and tips for today.
I have some experience using emacs and of course have been a full stack developer / data engineer for about 11 years now. I will leave a few tips and hints along the way. I fully expect to mostly be learning along with others so do not assume that what I am saying is the holy grail of how to do to some Topic A or some Topic B.
- We can use the compile command in emacs to execute the build.bat and stay within the emacs compile -> Edit -> run flow.
replace the typical make -k command with build.bat as it is now on the path is a great little hack.
We are allowed to do this because we added our root development directory to path see 23:50 in day 1 video
I will show two examples of flow where there is an error to be fixed and where there is a successfully compilation.
You can see in the above image that with no errors the compile command in emacs is dispatched to the build.bat which triggers the commands to windows command shell and with a successful compile we are given a green finished success message.
I will know insert an error case in the C code and recompile.
The above error was created by missing the closing ) in the return call. You can see that emacs includes the compilation buffer with the error where the code happened we can use the command next-error in the mini-buffer to automatically go to that error in the code. see small screen cast below.- Another tip of note is the the use of the of a Virtual machine for running the series. I created a win7 virtual machine as a guest on proxmox and remote into that using rdp so that I can use the older tech like windows 7 and Visual Studio 2013. I am sure you would be able to use a more current operating system and version but I wanted to be as genuine to the time period that Casey is programming in as possible. My version of emacs is even 26.3 for that version of windows. Small cast below to show my proxmox vm setup.
Closing
If you have made it this far. I appreciate you stopping by my blog. Please leave some comments to motivate me to continue with this blog as go thru the handmade hero series. I am considering adding walk-throughs of the blog to my YouTube channel as well so keep an eye out for those videos. Thanks everyone.


Comments
Post a Comment