Skip to main content

Blog

Miscellaneous articles relating to the use and development of Tuskfish CMS.

Copyright, all rights reserved.

In this collection

Those awful articles about "the best" / "most popular" programming languages

Sick of low quality clickbait articles about "the best" and " most popular" programming languages? Everyone seems to play this game, even otherwise reputable sites. I suppose they do it because "what language should I learn" is a question that every aspiring programmer has to ask. There's a lot of traffic in it.

Nearly all of these articles are bad, because they are based on irrelevant metrics such as trends in keyword searches, recent Github activity, average salaries or similar. For example, if a lot of people search for "Javascript" clickbait articles often extrapolate this into "popular" and/or "the best", and slap it into a "top 10" list of languages you should learn!

Another round of refactoring

I have one more refactor of Tuskfish planned. The goal is to break down some of the more monolithic methods into smaller logical components that are easier to test. This will not involve adding any new functionality as the core system now does what I want it to do. From here on changes will largely focus on refining the structure, simplifying and clarifying the code to make the project more robust and easier to work with.

Password hash cost calculator

I was playing around with different password hashing algorithms and came across this password hash cost calculator. It's a simple script you can use to measure how long it takes to calculate a given hash on a particular machine. Since web hosting accounts often come with limited resources compared to your local dev box, it's useful for tuning the cost of your hashing algorithm (how many times you iterate the calculation) to keep it at a sane level.

Cleaner code: Tuskfish refactored

Tuskfish has had a substantial internal restructure. Static methods have been removed in favour of dependency injection, and modularity has been added (beginning of course with the content management module). The documentation needs extensive revision, when it's all ready the result will be released as Tuskfish V1.1.

Thoughts on "Clean Code"

I just finished reading Clean Code: A handbook of agile software craftsmanship, by Robert C. Martin. It’s a highly regarded book and contains many useful ideas; I have started refactoring some aspects of Tuskfish based on things I learned from it. This will include improving names, shortening and splitting up some of the larger functions into smaller logical units, replacing magic numbers with named constants and so on.

The problem with PHP

It feels strange to criticise PHP after developing a substantial (for me) project in it. Obviously I like the language and the recent performance improvements have given it a significant boost. But there are a few things that grate on the nerves and make me wonder about its long term future. Here are some of them, presented in no particular order.

Oh and welcome...

I almost forgot to say, welcome to the Tuskfish CMS Project. It started as a personal project that I created to solve a number of problems I was having at work revolving around ever-increasing maintenance overheads and ever-decreasing free time. I needed a robust and flexible but low-maintenance solution for web publishing, and here it is. Kinda growing...