blog #programming

PHP Timestamps and Year 2038

I'm currently in the process of moving an old PHP application to a new framework since the one originally used is way outdated, spitting out deprecation warnings left and right. The app still uses unix timestamps to store and handle dates. 2038 is still a long time off, but I'd rather not have to work on this app again in the future so I decided to have a look into how PHP timestamps are compatible with dates beyond January 19th 2038.

Quickly Generating XML Sitemaps in Ruby

To simply add XML sitemap generation to a Ruby program or script the sitemap-generator gem is all one needs. However the documentation for the library is quite heavy and filtering out what's needed to incorporate its functionality into a simple script can take a while. But really all it takes is this:

Overthinking Web Application URI Routing (PHP)

I just got around to implement URI routing for my PHP framework. Given a setup such as

Designing an MVC architecture for web applications

A while back I was tasked to create a web application based on the popular MVC architecture pattern. Part of the task was not to use a framework, but to write the application all by myself. So I looked at my notes from school that taught me this basic model of an MVC architecture:

Writing that perfect Makefile
Where I realize Make is actually quite good enough after all.
xmk (cont.)
More pointless confusion about Make.
xmk is another build automation tool inspired by Make. It features a hierarchical block structure and a function interface to facilitate Make-like dependency resolution.It aims to be simple and explicit even in projects that are meant to be compiled for more than one platform.
Make and build automation
How to improve upon Make when you don't even understand it.
Making sense of object-oriented programming

You're a programmer. You always know the exact specifications of the thing you've set out to model. You can always trust dependencies you rely on to just work and never break. You can trust that the environment you're programming for remains stable und unchanging for time immemorial.
Your neurologist suggests that your naivety and optimism may be cause for concern. Or maybe you just woke up to an angry customer's mail complaining that the feature they had requested wasn't realized to their satisfaction. Or did you wake up in front of your screen, still having to fix that dependency issue that came up in yesterday's update? In any case, you probably don't have much time to think about where things started to go wrong.

Further experimenting with non OOP PHP

Cleaned up the mess I posted yesterday. The code should be pretty self-explanatory now. First I introduced type classes to mimic C structs: