Sunday, September 26, 2021

Solving SICP

بسم الله الرحمن الرحيم 

In my quest to become a competent programmer, I had a lot of false starts and took many wrong turns. In hindsight, I feel that I didn't really know what I needed to be capable at programming, as programming to me was mastering a programming language.  That was the dominant take-away from almost all the tutorial websites which turned up in Google searches. It was supposed to be super easy to be a programmer. 

I was mostly convinced. I used to think, what is there to programming other than using conditional statements, loops and functions, constructs, which are after all, common to all programming languages?

I could solve complex numerical problems from chemical thermodynamics in C using the said facilities and I could use the terminal to compile my programs so what else could I need?  I could use Xcode to make a chemical engineering calculator app for iOS, albeit with basic UI, but who cares about UI (Apple does)? Here's a fine app which will calculate bubble and dew points, so it should doubtless sell like hot cakes. 

Programming was never a big deal, to me it was just fleshing out my numerical algorithms into code, and all that I had to ensure was that the code had the correct syntax and did what I wanted it to. If the program compiled and output the expected answers, what happened under the hood was immaterial.

But programming has more to it than performing engineering and scientific computations, which I realised when I found that there was essentially no market for chemical engineering tools other than those by big corporations, and that I had no skills beyond those that would aid in doing numerical calculations.

So I felt like a beginner again.

But, Praise be to Allaah, I found a thread on Hacker News, where people praised this book, SICP. It was also mentioned in websites like teachyourselfcs, and was quite popular on Internet forums. I trusted Allaah and attempted to study it. I started doing it in December 2020, and now 10 months later, Alhamdulillaah, I have reached section 5.4 of the book. I feel that I benefited from it very much.

I did not do all the exercises, but what I did I will In Shaa Allaah post on this blog.