Archive for the ‘Programming’ Category
Friday, February 12th, 2010
Here's a question I was pondering a couple of days ago: Can you make JavaScript's String object mutable, as in modifiable without having to re-assign the string.
Why would this be useful? Sometimes you might share a string between objects, and you'd want changing it in one place get reflected in ...
Posted in Programming | 2 Comments »
Thursday, January 28th, 2010
During my adventures in programming, I've been involved in many projects. Luckily, despite having made some mistakes, they've gone quite well. Here are a few of them, with tips on how to avoid making them yourself.
Posted in Programming | 13 Comments »
Wednesday, December 16th, 2009
I have decided to rewrite TankWar, and I'll be writing a bunch of blog posts about the process. If you ever wanted to know how to write a scorched earth/worms-like game using just JavaScript, now is your chance to learn ;)
This is the first one: Assessing the damage. In other ...
Posted in Programming | 3 Comments »
Friday, November 27th, 2009
Hey it's Friday so it's time to try a fun JavaScript hack - Let's go and precompile some functions!
What does "precompiling" mean? In principle, it means we take a function which takes multiple parameters and pre-define some of them. All this is done dynamically, so your code can do it ...
Posted in Programming | 1 Comment »
Wednesday, November 11th, 2009
You need to add some new functionality to your function or class. Let's say you need to remove all objects stored, but optionally also call a method on them.
It's pretty simple, isn't it? Let's just add a parameter to removeAllObjects! If you make it true, the additional method is called, ...
Posted in Programming | 13 Comments »
Thursday, November 5th, 2009
Continuing the trend from last November, when I posted some of my favorite blogs, I think it's time to highlight some other good blogs!
So here's a bunch of more - be sure to check them out:
The PHPDeveloper blog: Many PHP programmers probably know the PHPdeveloper website, which links to a ...
Posted in Programming | 5 Comments »
Wednesday, October 21st, 2009
You’ve written a PHP based web app, and you’ve made sure it doesn’t cause errors if the user submits unexpected values via any URLs or forms. But there’s something you quite likely forgot to test: What if the data that’s expected to be a singular value happens to be ...
Posted in Programming | 11 Comments »
Thursday, October 15th, 2009
James Carr has written a well argumented post about comments. To sum it up shortly, he says comments are the lowest form of communication, and that commenting freshly written code is not a good idea. I tend to disagree, and here’s why.
Posted in Programming | 29 Comments »
Monday, October 12th, 2009
I was contacted by Packt Publishing to review a new Zend Framework book, Zend Framework 1.8 Web Application Development. I have previously reviewed Object-Oriented JavaScript, also published by Packt, which was a quality title so I’m looking forward to reading this ZF book. The book is written by Keith ...
Posted in Programming | 5 Comments »
Thursday, October 8th, 2009
Back in august, I introduced the error tracking challenge. While it didn't get as much participation as I had hoped for, I did manage to collect some results.
In this post, I'll go through the most common ones, and suggest some approaches to avoiding them. Suggest your own errors and tips ...
Posted in Programming | 8 Comments »