Page 40 of full list of posts


EZDSL for Delphi XE

Just a quick one: I’ve updated EZDSL to support Delphi XE. Seeing as I only have Delphi XE installed these days, this is the only compiler I can now certify as working with EZDSL. I guess the earlier ones will still work just fine, but I no longer have the time or the will to check. […]

READ MORE

JavaScript: an acceptable use of double-equals? Just.

When I first started learning and writing JavaScript, the recommendation I came across again and again was that the equality operator, ==, or “double-equals” was the devil incarnate. You should always use the identity operator, ===, or “triple-equals” because then you won’t have to battle weird type coercion bugs (and remember it’s not necessarily the time you write the original code that you’ll get tripped up, it’s the time you maintain it for the nth time). […]

READ MORE

JavaScript: fast floor of numeric values using the tilde operator

OK, put this one in the completely weird bucket. It works, but damn it’s obscure. […]

READ MORE

PCPlus 294: Learn to solve pentominoes

This article was just a great deal of fun to write. I wanted to talk about Knuth’s DLX algorithm (“Dancing Links”) as a solution to the exact cover problem. I’d already talked about Sudoku (a great demo of DLX) recently as an article in the mag, so there was nothing for it but to go for pentominoes, one of the other examples Knuth gave. And it gave me a great reason to bring out my old pentomino set that I was given as a teenager and futz around with it. Needless to say I’m still just as bad at solving it as I was then. […]

READ MORE

JavaScript: Unit testing asynchronous functions

In a previous blog post, I talked about the QUnit unit testing library for JavaScript. In that post, I showed how to use it with a date library I was messing around with. If I were you I would review that previous blog post; it will help in what’s to come. […]

READ MORE

Implementing MarkDown for comments

I haven’t been too happy about the facilities for commenting in GraffitiCMS ever since I started using it. Great for minor feedback, but awful for pasting code when crafting an implementation detail as an example. Since StackOverflow uses MarkDown for its comments and I’ve grown used to that, I decided to experiment adding it to my blog here as well. […]

READ MORE

JavaScript: Using the shift method on the arguments array

In my webinar today on reading jQuery source code, I was talking about the extend method. I started out by talking about what a typical extend method would do before going onto the jQuery-specific one. […]

READ MORE

PCPlus 293: Building an efficient dictionary

I think this is pretty much the last article I’ve written for PCPlus that discusses algorithms in a fairly formal sense. As I said last time, my editors and I have slowly been moving my articles towards more “how it works” topics than the traditional “layman’s guide to algorithms” subjects I’m perhaps better known for. […]

READ MORE

Minor changes to look-and-feel

I’ve been meaning to do a bit of housework on this site to clean up the CSS and to add a bit of interactivity. After all, I write a lot about JavaScript, so I might as well start adding some to my blog. […]

READ MORE

JavaScript for C# developers: callbacks (part III)

In the previous two installments (one, two) we explored the use of callbacks through creating a mapp function for arrays (so called because the latest JavaScripts have a native map method already), and through creating a mapAsync function where the work is done asynchronously rather than serially. The reason for this was so that we could avoid triggering the browser’s “script running a long time” warning and, also, more importantly, provide the user with a responsive UI. […]

READ MORE