Quite a Break

Wed, 30 Jul 2008

So yes, that was quite a long break. I'm not sure if I'm back to weekly things yet, but I'm at least back to things. Someone reminded me about the two generals problem which I'd had some thoughts about, so I thought that I'd post my thoughts here, since I was planning to do so at some stage anyway.

I'm about to start a new job working for Dolby Laboratories which I'm very much looking forward to. I have two more days at my current job (which I still enjoy) and then a short break and then I'll be starting. There is no super interesting "why I'm leaving" story, nothing bad happened, it was just time to move on, and Dolby really matches my interests, so I thought it would be excellent to go there.

I didn't realise that Dolby were even in Sydney, so I have to thank jobreel for alerting me to that, with the disclaimer that I'm friends with the people behind it. On the other hand, it was the only job listing website that I used in my search, and I'd be happy with it regardless of who made it.

Break Of Some Length

Sat, 22 Dec 2007

I'll be away for a little bit. Weekly updates therefore won't happen until they start happening again.

In the mean time, read these things:

Revealing Errors

The Universe of Discourse

Basic Instructions

Good Math, Bad Math

God Plays Dice

I think they are all pretty interesting, and probably not as well known as my other regular sites.

Spam and Stuff

Mon, 10 Dec 2007

I've been getting some spam in the comments here. I haven't done anything to fix it yet, but I am actively deleting the posts. I'll think of a good solution a bit later, at the moment it is about 3 posts a day, so it isn't too bad to get rid of stuff, but soon it will annoy me enough and I'll fix it good and proper, possibly with a large change in the backend (and maybe frontend) of the site. I'd like to finish the c+ stuff first though (then I'll be able to give it a test project too).

Lots of random things today, its all a bit nerdy at the moment, I haven't been interested in much non-nerdy stuff lately.

Caching

Tue, 18 Sep 2007

This website was getting quite slow, so I've enabled caching for all of the html pages (and also reduced the number of items on the page). This isn't the end of the performance tweaking, but it is a start. Things that still need to be done:

  • Clear the cache correctly (when someone makes a comment) (so don't be alarmed if your comment doesn't show up straight away).
  • Provide some way to navigate to older stuff.
  • Add some headers to content so your browser will do some caching too.

I always forget perl syntax, so as a result you will typically see the site going up and down over the time I spend deploying any changes. Consider it a bonus.

Image Resizer GUI

Mon, 03 Sep 2007

After the image resizing program was quite popular someone took the code and added a GUI to it, so now you don't have to be a programmer to use it :). You also don't have to even have a compiler if you are in Windows, so if you wish to play with it, and you were scared by how lousy my distribution methods were and how hard to use it was, then be scared no longer and head to gabeiscoding.com for the usability enhanced application.

Also added is the 'person removal' feature - if you colour a region in solid red (as in the primary colour, #FF0000) then the scan lines will be more likely to pass through the red region, so the object you coloured red will be removed (hopefully).

Also, if you are a Java person, then Mathias made a Java version with person removal, and person preservation (so you can mark a section to avoid messing up). It will also run in Windows, and is also insanely easier to use than mine.

Also, you may notice that the front page of this site now loads lots faster than the other pages... during the peak of activity, I was using way too much CPU time, so I did a really dodgy job of caching the front page. I will eventually fix it, but for the moment, just know that the link that says the number of comments can underestimate the actual number of comments.

Source Code Party

Sat, 25 Aug 2007

Due to non-zero demand, I've packaged the source for the resizing application. Then I realised that it used my image library, which I haven't released yet, so I've also packaged it up. Then I thought - how is a person going to build all of this? They could use gcc -std=c99 *.c, but that won't work right because not all the c files are in the same directory. Of course, I was just being an idiot when I thought that, because I know that the easiest way to build all of my things is with amkel. But, the version of amkel which I released before is probably too buggy to use, so I thought version 2epsilon is due. Finally, I thought - since I'm putting up 3 things, why not make it 4? So I did the dithering source code too.

So, here they are: (all under GPL3)

I find the image library really useful. It isn't powerful at all, it just lets you write C code that looks like this:

Image img = loadImage("someImage.bmp");

imageSetPixel(img, 51, 12, 128, 192, 15);   
imageSetPixelRgb(img, imageGetWidth(img) - 1, 10, imageGetPixelRgb(0, 0));

saveImage(img, "newImage.bmp");
destroyImage(img);

It might have support for some other simple file types, but I might have accidentally removed it (and even then, the interface stayed the same - it decided on the file type based on a file extension, rather than doing fancy stuff). It is great if you want to quickly try out an algorithm, and while it wasn't written to be efficient, it seems to be fast enough.

For building stuff, make sure amkel works. Type:

$ cd amkel # or where-ever you put it
$ cat > test.c
#include <stdio.h>
int main(int argc, char *argv[]) {
    printf("woo\n");
    return 0;
}
<ctrl+d>
$ ./amkel.rb test.c
$ ./test

And it should print 'woo'.

If you are feeling adventurous, make sure you have rubyscript2exe and tar2rubyscript installed so that amkel can find them, and run ./amkel.rb amkel.rb - this will create a single file which you can put somewhere in your $PATH. Which will make building stuff a whole lot easier.

Then put stuff in a structure like this:

/.../blah/image
/.../blah/resize
/.../blah/dither

And then you should be able to run amkel on 'resize.c' or on 'dither.c' and it will automatically include the image library and compile everything. If you haven't made the single-file version of amkel, then be aware that you will probably have to run amkel from inside its own directory.

Enjoy the source code party.

So It Begins

Fri, 18 May 2007

Welcome to my place on the web. I don't know really what to say here. But, I figure that a post like this means that if someone is going back through the archives, then they will know when to stop.

The plan is that there will be at least one new thing every week, and that that one thing will at least be marginally interesting.

Oh, and if you are wondering about the robot overlord thing, I was just playing around and I made a robot. Then I was playing around some more and it ended up on a planet, and one thing led to another and he was the Fiendly Robot Overlord. There isn't really much of a story. Oh, and I googled for "Friendly Robot Overlord" and there was only one result, so I figured that I could take them out.

Andy

 

About

I'm a nerd living in Sydney. This is a place where I can write stuff about my interests and not care that no one else is reading.

I like music, maths, programming, pretty pictures, filters and other good things.

(more info)

It should be fairly obvious that this isn't connected to my employer at all.

Email me (not a catchpa)

Email policy

Subscribe

RSS Feed RSS

Get an aggregator

Liferea (Linux)

Vienna (OSX)

Feedreader (Windows)

Google Reader (Web based)

I've only used Liferea, so I can't vouch for the other ones.

About this site

This site runs a (modified) version of blosxom.

The host is GeekISP, and they seem to do an excellent job.