I can see 2014 being an incredibly stressful year, seeing as only the first month has caused me to pull my hair out! Uni assignments are piling up again and trying to fit in side projects is becoming harder and harder. On the subject of university porjects, my Advanced Topics in Web Development assignment is nearly finished. This PHP abomination has taken me hours to complete, and has already been majorly refactored. Twice.
If anyone who has read my blogs before might gather, I’m a bit of stickler for consistency and good architecture and PHP, before you add anyone else’s modules to it, fits in…neither of those categories.
For a start, how anyone thinks that putting twenty thousand functions in the global namespace was a good idea, I’ll never figure out. Even ones that do database interaction and mixed with string functions. Oh and while we’re talking about string functions; anyone ever heard of naming conventions..? strtolower and str_replace. Probably two of the most commonly used functions in programming, surely implemented at the roughly same time but under two different naming conventions. A good friend of mine has suggested that he might embark on a project to normalise the PHP functions namespace, and I hope he does! I dread to ever look at PHP’s underlying code if they can’t even build their API coherently even after 5 major iterations.
That being said (read: rant over), however, I have enjoyed delving back into the flexibility that is the functional programming paradigm. Being able to knock entire applications out very quickly is something you can always praise PHP or it’s daddy Python for. The PDO persistence framework has also been fun to work with as it enabled me to ditch all the horrible globally namespaced MySQL functions and build a OO, transactional ORM (we weren’t allowed to use any PHP frameworks). There is not a great amount of documentation for it I have found however, so maybe I might help them out by doing a little tutorial on here some time. My little Data Mapper framework might prove useful to someone.
Final words for today: For Gods sake; be consistent and coherent with your code everyone…