While drawing things on the canvas and scooting around them is nice, it gets old very fast. Instantaneously, if you’re an end user (unless you’re on a page for looking at things, in which case, no foul). On the other hand, there are far more efficient ways of rendering porn and/or amusing pictures of cats, so I’m going to go ahead and assume that we want to liven things up with some animation.
Reading Tiled maps for Canvas
In my previous post, I showed an example of a tile map in a viewport, but didn’t go into the details of explaining how the map was generated or loaded. In this post, we’re going to have a look at that.
The map file itself was created using an open source application called Tiled. It’s a neat application, and definitely beats writing out tile maps by hand. If you’re planning to do much work with tile maps, it’s worth checking out.
A Rough Path Finder in CoffeeScript
I’ve recently been playing with CoffeeScript, a neat little language that compiles to JavaScript. It’s a lot more concise than plain old javascript and can be organised much more tightly, so I’m really having a blast with it. That said, its conventions are a bit different to what I’m used to working with, so more bit of practice is in order.
One of the practice scripts I wrote is a very basic 2d pathfinder, hooked up to an html5 canvas element. The original idea was to get a good feel for the CoffeeScript syntax and then write a bit about it, but a screenshot of the finder on Facebook generated a bit of curiosity among some friends, so this post will be about the pathfinding algorithm instead; the CoffeeScript post will just have to wait a bit longer.
Visualizing data with Google Maps
A few weeks ago, a club I’m a member of was updating its membership information. Since the data was being collected in a Google spread sheet, I thought it would be interesting to create a map visualization to show where the members come from. In this post, we’ll write a map overlay which will generate a display like the one in the following image using data drawn from a Google spread sheet. Basically, we’re going to give a map a nasty rash.
You can also see the map here, or download the files here. Note that the size of each location has been fudged and bears no relation to the values originally collected in the membership survey.
RESTful Web Applications with Jersey and Spring
A couple of months ago, we were tasked with creating an API to expose some functions in our system to third party developers. We chose to expose these functions as a series of REST web services. I got to play with Jersey, the reference implementation of JSR 311 (Java API for Restful Services); this turned out to be a nice surprise, as it proved to be extremely powerful and elegant. In this post, we’ll create a very simple REST web service using Jersey.
Continue reading “RESTful Web Applications with Jersey and Spring”
Revisiting the JavaScript Calendar Control – Part 3
It’s been some time since I started writing this three part series, and it certainly took a while longer to get done than I expected. A busy work schedule does tend to do that, but if it makes anyone feel better, having left the third part hanging did give my conscience a field trip. So let’s do a quick recap and get on with it 🙂
- In part 1, we created a jQuery plugin which displays a simple static calendar.
- In part 2, we added the facility to pick a date, and to switch the month on display.
- In part 3 (this post), we will add some sanity checks, and the ability to display events on given days.
Continue reading “Revisiting the JavaScript Calendar Control – Part 3”
Revisiting the JavaScript Calendar Control – Part 2
Following last week’s implementation of the basic shape of the calendar, this week we will add behaviours so that we can pick a date on it.
This post is part of a series of three posts:
- In part 1 we created a jQuery plugin which displays a simple static calendar.
- In part 2 (this post), we will add the facility to pick a date, and to switch the month on display.
- In part 3, we will add some sanity checks, and the ability to display events on given days. Continue reading “Revisiting the JavaScript Calendar Control – Part 2”
Revisiting the JavaScript Calendar Control – Part 1
A few years ago, I wrote a calendar control for a Code Project article. Although I’ve used it myself several times, and despite the fact that people still appear to be using it, I can’t help but cringe every time I look at it again. Every time, the thought that comes to mind is “It could have been so much cleaner in jQuery…”.
Well, the time has come to bite the bullet and see how it can be pulled off again. Rather than going over the whole thing in one go though, we’re going to take it in steps over a number of posts to implement a feature or a group of features, so we can look each in slightly more detail. This is as much for my benefit as everyone else’s. If anyone spots anything weird, inefficient, or badong in these posts, please let me know. I like to think of this as public code review, so, you know. Bring it on.
We can rebuild him – we have the technology
The posts will be divided as follows:
- In part 1 (this post), we will deal with the display of a simple static calendar.
- In part 2, we will add the facility to pick a date, and to switch the month on display.
- In part 3, we will add some sanity checks, and the ability to display events on given days.
And with that, on to the post itself. Continue reading “Revisiting the JavaScript Calendar Control – Part 1”
SHA1 in PHP and MySQL
Wrote a brief note on the speed of digests in PHP vs. the speed of the same digest in MySql.
Read it at http://fwebde.com/php/encryption-php-vs-mysql/
New theme for The Simple Part
Despite my best attempts at procrastination, it had to happen sooner or later. Stephen Reinhardt’s Light theme, the free version of which has served this blog well and faithfully for the last year and something, has finally been decommissioned. Replacing it is a new theme I clobbered together over the last week.
One of the reasons I moved this blog off the old wordpress.com subdomain – the only reason in fact – was to allow me to mess around with it as much as possible. Writing the theme is one such messing, though a number of things got in the way and meant that it took a while longer to get started than originally intended.
This theme will be considered a permanent work in progress. I’d be interested in any comments, complaints or suggestions concerning its usability (or lack thereof), appearance (or hideousness thereof), or anything else which may be handy or simply cool.
With thanks to Emilyn and SZC, whose advice prevented a number of crimes against aesthetics and partly offset my inability to work with colour schemes more complex than black and white.