Jul 12, 2009

The Value of Twitter

A while back I wrote a post about Twitter and how I didn't really like it. This was mainly from a personal perspective, where it was just me and my friends on Twitter and people would just tweet about random stuff.

These days however I've been using Twitter as an advertising tool for the Pirate Party of Canada and it is really working well. I tweet about a meeting or an announcement, and people retweet it, and the news gets spread really quickly. Compare this to Facebook (well Facebook now has a more Twitter-esque model on the front-page but we don't really have a Pirate Party page on the site other than the group) where you can't really broadcast a message easily to lot's of followers. Well, you can send a message to all the people in a group, but there are a lot of people that the message doesn't apply to and it's probably annoying for some people in say, Vancouver to always be receiving messages like "there's a meetup in Saint John, NB". Whereas on Twitter you can just ignore the tweet.

So in summary, Twitter is a pretty good communication tool for a one-to-many broadcast. In case you hadn't figured that one out already :)

Jul 9, 2009

Kitties and CPU Fans

A lot of us like kittens, they like to play and run around and chase things - just earlier my kitten was sitting in the screen doorway watching a squirrel, it was pretty funny.

They also like fans on computers. Things moving! Oh my god! So they stick their little claws in there trying to kill your fans. Try to keep them from doing this, the ends of their claws can splinter and while it may not hurt them very much (at least it doesn't seem to, he just keeps doing it) one thing you don't want is little bits of claw firing into your system.

Recently my computer started making a lot of noise from the fans. I figured that it was the heat, it is July after all. However I noticed that the fan on the side of my case wasn't working, and the CPU fan was working extra hard - way harder than normal.

I decided to open up and take a look. Sure enough the case fan had enough fur around the spinning part to slow it down to the stopping point, but here's what was worse - the CPU fan:


That is only about 10% dust!

Jul 7, 2009

Disable Notifications in Jaunty

For those of you like me who can't stand the new notifications in Jaunty (for me they are extremely distracting, like when a window pops up on top of what you are typing into) there is a nice little tweak to get rid of them described here.

For those who don't want to go and read it, here is the short form:
cd /usr/share/dbus-1/services
sudo mv org.freedesktop.Notifications.service org.freedesktop.Notifications.service.disabled
Then restart (I think you only need to restart X for this, so just log out and log back in again).

Jul 1, 2009

Arrr - Pirate Party of Canada

With the recent success of the Swedish Pirate Party, these kinds of parties are popping up all over the world. At the moment I am helping revive the Pirate Party of Canada which can hopefully run in an election sometime soon!

So if you are interested in protecting yourself from another C-61, join up and give us a hand!

Jun 29, 2009

/(Temporary)? Retirement/

It seems that the company I have been working for, keenkong and I have taken our separate paths. It wasn't really anything spectacular, from my perspective it was basically just a little incompatibility. I wasn't overly enjoying it, and that likely affected how I worked.

So now I look to the horizon with a fair bit more uncertainty about the future. I'm feeling fairly neutral about the job ending. I'm not ecstatic but at the same time, I'm happy to have some free time and a chance to take on some more creative pursuits.

As for looking for a new job, I'm not feeling overly motivated to find a new development position. It seems there are enough open-source projects that I'd be interested in contributing to to satisfy any code craving I may have.

Right now my current goal looks to be go back to school full-time and finish that, and see where it takes me. Back to coding? Maybe but unlikely.

So yeah, I will announce here my (likely permanent) retirement from the software development profession, and hope that all of those reading still in it will enjoy it more than I did :)

PS: I will still be writing code in my spare time - I do like coding after all. This blog will continue to get posts about that kind of stuff, just probably not as many Rails/JRuby posts.

Jun 27, 2009

Using FreeImage in Ubuntu

In my last post I mentioned I wanted to output a visualization of the time it takes to render various parts of my fractal generator. To do this I used FreeImage, so here is a little tutorial on how to use the library in Ubuntu.

To install, just install the libfreeimage-dev package, either through Synaptic or using:
sudo apt-get install libfreeimage-dev
Once you've got that installed, you can link to it from your C/C++ programs.

Here's some simple code to output a blue background to a bitmap:
#include <FreeImage.h>
#include <stdlib.h>

int main(){
FreeImage_Initialise();
atexit(FreeImage_DeInitialise);

// create the bitmap object
FIBITMAP * bitmap = FreeImage_Allocate(200, 200, 32); // allocate a 200x200 pixel image, with 32-bit colour

// create the blue colour
RGBQUAD blue;
blue.rgbBlue = 255;

for (int i = 0; i < 200; i++){
for (int j = 0; j < 200; j++){
// draw a blue pixel at (i, j)
FreeImage_SetPixelColor(bitmap, i, j, &blue);
}
}

// save it as output.bmp
FreeImage_Save(FIF_BMP, bitmap, "output.bmp");

// deallocate memory
FreeImage_Unload(bitmap);
}
Then to compile:
g++ image.cpp -o image -lfreeimage

Jun 20, 2009

Julia Sets - Moving the seed

I've been at the fractals again. This time I made it morph:
video

This is a Julia set again, but instead I am tracing a path through the complex space with the seed value. The path taken in this video is a near-circle centred at 0.12 + 0.74i with an real radius of 0.11 and an imaginary radius of 0.10.

There were a number of other really cool ones, but the problem is that the path they take tends to go into areas which have lots of points that do not fly off into infinity, which means they take a long time to process. That means that I can't have a nice framerate like the video has.

One thing that was kinda neat was that if you flip the sign on the centre of the ellipse for the imaginary component, it flips the patterns displayed on the x-axis (or maybe it's the y-axis). So centred at 0.12 - 0.74i, those swirls are in the top-right and bottom-left instead of the top-left and bottom-right.

A thing I would like to try to make better animations would be to see where the framerates get low. I can probably do this by iterating between -1 and 1 in the real and imaginary components and spit out a time for each computation. My plan will be to spit that out into a greyscale image so that it is easy to see where the slow points are.