Building a browser

The browser in one of those mythical beast to a web programmer like myself. It's a complex piece of software, it's true that as a web programmer I look at game programmers as these majestic creatures that perform magic with code. I watched this video on fluid simulation and I was in awe of what I was witnessing. As for myself, I've not had a lot of interest in games after the age of fourteen. The last game I ever played was Need For Speed: Most Wanted. Before that I used to play Dota locally as I did not have an Internet connection. So I don't have an interest in making games. But browsers, yes indeed. So when I found the Web Browser Engineering book, I was beyond excited. Since, then I've doing building my browser in Go, I've called it grome.

Currently, I'm in Chapter one, finishing the exercises. I've got, keep-alive, caching, redirects and compression to do. I'm not too sure, how to do the caching bit, the others I have done in some capacity before. But I cannot express, how much I'm enjoying this. The code is very messy, but it's by design. As a better structure has not appeared yet. After I finish all the fist exercise, I'll write some tests and do some refactoring. Testing is surprisingly quite easy, as the expected behavior is quite obvious, and I don't need to mock anything. As I can use my own browser. Never would have thought I'd be using those words in that order.

Drawing the screen

I'm really excited about this chapter. I've always wondered how things are displayed on the screen. How things like rendering and framing happen. It's one of those things that's always fascinated me, also in my head I've built it up to be really difficult. Would be nice to know at least at a basic level, how it works.

The network stuff is not easy, but it baffles me less as I have a basic understanding of sockets and how socket connections are just like files. At least in Linux & Unix, no idea what goes on in Windows. It's quite inspiring to see, how the Kernel developers have made an elegant abstraction of network connections. I digress.

I'll finish the exercises today, and get through the testing and refactoring as soon as possible so I can draw the screen. Exciting times. Also, right now I'm reading the book online. The printed edition is not available yet, but I'll be getting one as soon as I can. It's the least I can do to show my gratitude to the authors. The joy that this book is given me so far, is unexplainable.

Why do I want to build a browser?

I've always wanted to tackle something complex, so that I can feel a little bit more competent and know that with effort and time, I too can handle complex problems. Also, I don't think I'm a good programmer, because the problems I have faced have not been very complex. I'm hoping this should help me feel slightly more competent.

Till the age of twenty seven (I'm thirty one now), I have been a state of learned helplessness. I have no idea when or where I picked it up, but I did. So I always felt like I was not smart enough to be a programmer. That's why I failed the first time. But the second time, when I tried to learn it, I found that if I put enough time, I could learn it. Since, then I have this thirst for understanding that seems unquenchable.