Programming (category archive)

The McDonald’s Breakfast At Any Cost Calculator

The McDonald’s Breakfast At Any Cost Calculator can roughly determine the best location to fly to to get access to the McDonald’s breakfast menu, based on flight time and whether it will be breakfast time once you arrive.

It is perhaps better explained with an example: it’s 1700h (5 PM) in Tokyo, and you want a McMuffin, but the breakfast menu isn’t going to open for another 13 hours. You can’t afford to wait that long, but where else can you go? The answer, as this tool will tell you, is Honolulu. You’ll arrive around 0616 local time, ready to stride into a McDonald’s and get breakfast. In Tokyo, it’s only 0116, and you would have had to wait hours longer for your McMuffin.

The code is very simple, and the time zone calculations don’t account for DST (since they don’t use the date at all). Flight times are calculated based on latitude and longitude coordinates, a distance formula I got from Wikipedia, and an estimated average flight speed. You can use this tool for times other than breakfast, but it will get confused if midnight lies between the start and finish times.

Categories: Programming » PHP and Projects » Web applications » The McDonald's Breakfast At Any Cost Calculator
The McDonald's Breakfast At Any Cost Calculator is a tool for roughly determining the best location to fly to to get access to the McDonald’s breakfast menu, based on flight times and time zones.

Avocado, an online image gallery application

Written in PHP and tailored to my needs, Avocado is a free lightweight personal online image gallery application I have been working on.

I’ll be using it for my own gallery, so you can see it in action there. This first release of Avocado is a beta version, 0.5, and it’s not going to get promoted out of beta until (among other things) it has better search and editing capabilities. Still, it’s perfectly usable as-is, although the documentation is highly incomplete.

It goes without saying that the source isn’t an amazing example of good coding. It’s not too bad, considering the scope of the application, and I certainly learnt some things along the way. Speaking of the source: zip (37.7 KB) or tar.gz (31.8 KB). Aside from compression formats, the downloads are identical.

Categories: Projects » Web applications » Avocado and Programming » PHP
Avocado is a free lightweight personal online image gallery application.

Are You Authorised

Since I’ve just restarted Authority development after six months I thought I ought to quicken the pace of updates on the blog, so here we go. After some teething problems (i.e. every page taking five seconds to load because I was making over 1000 database queries a hit) the new game code is working very nicely and I’ve got almost all of the old Authority functions re-implemented. I’ve also added a new game management panel to the interface which I’m liking the look of*:

*figuratively speaking. I’m not actually satisfied with the way it looks.

Categories: Projects » Games » Authority and Programming » PHP

Authority hasn’t been forgotten

The project has been on hiatus for about six months because past design and programming decisions had forced me into a corner when it came to the final portion of the game. This was a corner forcing the coding to be untidy and complicated. So! I’m overhauling a lot of the code and I’m confident this will make Authority happen and happen better. No timetable will be set at this point.

Categories: Projects » Games » Authority and Programming » PHP
Authority is an online strategy game with units and stuff, currently in development.

Redesign: Novus

Today I have launched the latest version of www.maestrosync.com, which I have given the rather uninspired title of Novus. Fundamentally, it’s based on the latest versions of WordPress and K2. There was then much designing and coding (HTML, CSS, and proper PHP) and the site was born. Some brief notes:

  • I wanted to give the site a proper and stylish design, so I used a grid. It doesn’t leap out at you because the design is simple, but almost everything is aligned to the grid.
  • The colour scheme is a bit of a change for me—in the past I have mostly used shades of blue, but the red goes well with the darker blue.
  • This is the first version of the site which is really usable and easy to navigate, particularly when it comes to my projects.
  • The logo is a stylised ae ligature, which itself comes from when I used to style the title as ‘mæstrosync’.

There are still a few rough edges that I’m working on, so ignore them for the time being.

Categories: Programming » PHP, Design & graphics » Web design and Projects » Web applications » www.maestrosync.com

aftcast: scatters foam blocks from a great height

My latest mini-project, aftcast, generates random blocky graphics based on a few parameters. I intend to make it more customisable. It reminds me of writing little programs on graphics calculators back in high school.

Categories: Programming » PHP and Projects » Web applications » aftcast

ACID ASSAULT

Acid Assault. Last updated, late 2006. Will I ever work on it further? Perhaps. For now:

aa_preview.zip (721 KB)

Some notes

You control the cannon with the left and right arrow keys.

From the sky come chemicals, threatening the balanced pH of precious lake. The green ones are acids; the purple ones, bases.

The aim of the game is to neutralise the falling chemicals. To neutralise an acid, press ‘Z’ to fire a base. To neutralise a base, press ‘A’ to fire an acid.

Sometimes the chemicals will fall in sets of more than one. You can neutralise these by firing out your own composite super-chemicals. To fire multiple bases (for neutralising acids), use the X (2x), C (3x), and V (4x) keys. To fire multiple acids (for neutralising bases), use the S (2x), D (3x), and F (4x) keys.

You can also neutralise these super-chemicals by shooting multiple single shots at it. If I do ever work more on Acid Assault, I will remove this option.

Occasionally some salt will come falling down. You can pick it up with your cannon (by moving into place so it hits you) to gain levels. These don’t really do anything in the current version.

As mentioned, the levelling and scoring system isn’t particularly good. It will be improved maybe.

Categories: Projects » Games » Acid Assault and Programming » C++
Acid Assault is a basic arcade game which involves shooting falling acids and bases.

Opinionated, again

Now featuring an administration panel and proper user management things. Also, some extra tweaks here and there. Opinionated is still very basic, but it’s quite usable.

Download

Categories: Projects » Web applications » Opinionated and Programming » PHP
Opinionated is a very simple content submission and rating system.

Opinionated yule/anti-yule (solsticed)

This is the latest version of Opinionated, my hyper-basic democratic idea sharing and ranking web application. I believe this version adds minor cosmetic tweaks and the ‘change password’ feature (yes, it’s that basic). I could add more features like moderation but I feel that would go against the spirit of free democratic discourse (although perhaps it could use an “exile user” feature). The code’s there, so if anyone did want such a feature they should be able to add it themselves (or ask me nicely to do it).

Download

Categories: Projects » Web applications » Opinionated and Programming » PHP
Opinionated is a very simple content submission and rating system.

Algorithmic fantastic

More evidence of Authority progress, y’all. Authority uses a new, different algorithm to check for connections compared to the method used in Territory (the concept of ‘connected territory’ is present in Authority as well, although it’s completely different to the way it works in Territory). It doesn’t have a name, since I wrote it myself, but I’m sure there is an essentially identical one out there that does have a name; it’s about as simple as you can get (since we’re not trying to find the shortest path to something, the distance travelled is irrelevant) and I imagine it’s prototypical of all the fancier searching algorithms (Dijkstra’s/BFS/A* et al.). Anyway, it’s faster and far less complex than the old one, which is good because in Authority there’s going to be a lot more connection checking going on.

Now, it’s not terribly exciting, but nevertheless you can try it out for yourself (text-based; no pretty graphics here).

Categories: Projects » Games » Authority and Programming » PHP
Authority is an online strategy game with units and stuff, currently in development.