Hung Truong: In PHP!
So I decided that I should do a little bit in PHP since I’m going to have a Google interview soon and the most I’ve done before is manipulating other people’s code. I have my (semi-) professional site thingy over at the root of the site, hung-truong.com. One thing that bugged me about doing that quick site was that I was writing everything in static html. So I had to statically write the menu bar thing so it showed the active menu item for each page. A lot of code was repeated, and it was generally pretty ugly.
I figured it’d be a good exercise to redo that simple site in a php template of sorts. So I used this pre-existing templating class and modified it for my needs. Yeah, I’m still manipulating other peoples’ code, but at least in this case, the code is simple enough so that I understand how all of it works (I haven’t taken the time to go digging around in all of WordPress’ source yet).
Unfortunately the class was really simple, and it still couldn’t handle my dynamic menu bar list thing. So I wrote a quick class called Menubar and it works! You can see the php version of my professional website at this location. I might end up just making it the official one, once I know it’ll work ok.
It was a bit of work, and I didn’t really change anything to the actual site, but if I ever end up adding another section, it’ll be a lot less work than before. Plus it sorta refreshed my (almost non-existent) PHP coding skills!