clean code – chapter twelve

One of the books I’m currently reading is Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin. It’s an excellent book and I highly recommend reading it to any software developer. As you may have guessed, I’m currently on chapter twelve and I’m moving slowly through the book in order to absorb the […]

magento separation of concerns development strategy

Objective When developing with Magento on a team, it’s easy for developers to accidentally make changes to the core (source) or even intentionally. While this does make development a lot easier, it makes upgrades painful and it’s just bad practice in general. Ideally, we would maintain a separation of concerns. That’s right, it shouldn’t just […]

show maintenance page with flag file using .htaccess

Just a small trick I picked up while planning for site downtime and wanted to remember for myself. The following snippet will redirect to a (pre-existing) maintenance page if it detects the existence of another file: RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/maintenance.flag -f RewriteCond %{SCRIPT_FILENAME} !maintenance.flag RewriteRule ^(.*)$ /503.html [L] This will look for the existence of […]

python: states and capitals

So I think I’ve covered the basics of Python pretty well and actually made something useful for myself. After messing with higher or lower, I thought I’d try my hand at a script geared more towards learning. Like most people, I’d memorized my states and capitals in grade school but I personally had forgotten some. […]