MDL: Spending to make…

February 26, 2009

While it’s a fairly common and reasonably accurate maxim that you have to spend money to make money, I find myself wondering if the same is true of energy. To reword and disentangle the metaphor: Can you save energy by using energy?

Here’s a my train of thought: You have curtains in your house. It’s possible to fit a motorised unit and automate the opening and closing of the same. This would same ostentatious, lazy and wasteful. To have a computer, sitting, always on, in your house, which decides when this should happen would seem to increase these negative factors.

But…

During winter, you try to close the curtains to keep heat in. Doing this early means you miss out on daylight and, furthermore, you have to turn on artificial lights. Doing this too late means that you loose heat through the windows. There’s is probably a converse example in hotter climates than this, in which your house gets too hot in the middle of the day if you don’t close the binds, meaning you have to turn on the air conditioning.

So then, at what point does the energy used to run the computer become a good investment? What if it has sensors inside and outside in order to measure the temperature gradient, and so it can choose the best time to close the curtains? What if it also manages your heating? What if it intelligently turns out the lights in rooms you’re not in? Reminds you that you turned the oven on but haven’t actually put anything in it… Makes damn sure that you get out of bed in the morning… and so on…


MDL: Call by the what now?

February 24, 2009

Some not work related computery bits and pieces have been percolating around my head for some time now. I think we should talk about them for a while. That is: I’ll talk. You listen.

I’m probably going to write a couple of more techy blogs, all loosely interrelated. I am going somewhere with them, but I’m not entirely certain as to how much of this journey I will share with you.

First of all, I’m going to talk about the fairly simple computer related concept of “Call by reference” versus “Call by value”. This is fairly basic computer science (though I wish they’d taught it properly earlier on in my course). It’s possible (probable, even) that this example (or variations of it) has been used a thousand times before. I’m not going to go look for one (or the absence of one), I’m just going to write down my own particular take on it. I assure you that any plagiarism I’m about to commit is in no way deliberate. So, without further ado…

Let’s say you want to send a specific piece of information to someone via email. Let’s say it’s part of today’s featured article on Wikipedia (William I of Orange, at the time of writing). In today’s connected digital world, you have too main options. First of all, you could send them the information itself, like so:

William was born in the castle of Dillenburg in Nassau, present-day Germany. He was the eldest son of William, Count of Nassau and Juliana of Stolberg-Werningerode, and was raised a Lutheran. He had four younger brothers and seven younger sisters: John, Hermanna, LouisMary, Anna, Elisabeth, Katharine, Juliane, Magdalene, Adolf and Henry.

There are several things your recipient can do with this. They can read it. They can edit it, but this will only edit their local copy. The original remains unchanged. If they want to request that a change be made, they can, however, edit it and send it back to you. This is “calling by value.”

Your second option is to send them a link to the information:

http://en.wikipedia.org/wiki/William_I_of_Orange#Early_life

This, again, allows them to read it. They have to follow the link to the information it points to first, though. This time, if they make an edit (this being wikipedia) they actually are changing the original copy. They can also see what other information is around it, and if they feel so inclined they can change that is well. You might consider this to be an undesirable consequence. This method has the aditional advantage, however, that you did not have to take the time and effort to make a copy, and the amount of information you had to actually send is significantly smaller. This is “calling by reference.”

If you deal with this sort of thing on a day to day basis, you may well be aware that when you do this sort of thing in a computer program you have another option. You can send a constant reference, which would be analagious to sending a link to a website the recipient has no write access to. For example:

http://www.britannica.com/EBchecked/topic/644041/William-I


MDL: Street Fighter Tutu

January 6, 2009

So I like computer games. This isn’t news, really. Not in a hardcore live-to-game type way, more in a general fondness type way. That said, I did, as a youngster in an age before mobile phones, catch a bus to the next town so I could play a particular arcade game in what was (on reflection) a seriously dodgy little shop. That game was Street Fighter 2. It was a pretty great game, and it pretty much changed everything as far as the gaming industry was concerned. It spawned a bunch of sort of sequels which were mostly very popular, a couple of prequels, which were also very popular, and an actual sequel… which ditched most of the characters people loved and wasn’t as popular.

Coming out a couple of months is Street Fighter 4, a sequel to Street Fighter 2, but a prequel to Street Fighter 3. More about that later, but to complicate things further, there’s also a new version of Street Fighter 2, Super Street Fighter 2 Turbo HD Remix, or as I’d like to call it: “Street Fighter 2: Really Fricking Pretty Edition”. What it is is a revamped edition of the “original” Super Street Fighter 2 Turbo with redrawn graphics, new music and rebalanced game-play (all the characters are about equal now). So now (refering to the images below), instead of looking like the image on the left, the character Ken now looks like the image on the right.

Pretty cool, huh? What’s really weird, though, is that they didn’t change any of the game mechanics, so it still plays like it always did, thus:

Which is a little jarring, but apparently necessary. Why? Because there are still large touraments with this game and some people actually count the frames in order to get their combos right. Weird.

But what of Street Fighter 4? Well it’s still the same style of 2D fighting game, but it uses what I think is the most beautiful graphics engine I’ve ever seen:

This gives it a gorgeous cell shaded / traditional Japanese art type look which I really like. Also, even though the game-play is 2D, the engine is 3D; meaning it’s not limited to pre-programmed graphics, and so Ryu can actually react to the fact that he’s probably about to get dropped on his head, in real time. What’s more, when you pull off a more spectacular move, the game can get a bit more cinematic on your ass:

Credit where credit’s due: I stole all the images from wikipedia and Games Radar. Click any of them to jump to the relevant article.


MDL: Celtx on the Acer Aspire One

August 24, 2008

So I managed to get the Celtx screenwriting (and general preproduction) software up and running on my shiny new AA1, and in the interests of sharing the knowledge I thought I’d post how I did it. Please note, this should also work as general recipe for installing any software not available under the package manager in Linpus Light Linux (provided there are no additional dependencies).

First of all you need to download the software from the downloads page of the Celtx website, here. I’d recomend getting the straight up Linux version in your choice of language (frustratingly there is no option for British English, though). There is an Asus eee specific version, but that just clears up some dependencies and doesn’t really provide you with anything extra. 

First of all you’ll need a terminal, so hit Alt+F2, type “terminal” (without the quotes) and hit enter. A terminal should have popped up. If you’re a Linux novice, don’t worry, you should just be able to copy and paste everything from this page.

Now you need to unpackage the software. I put it in /opt, because it generally seems to be a dumping ground for user installed applications (as far as I can tell). Type these in the terminal one at a time:

cd /opt
sudo tar -xf /home/user/Downloads/Celtx.tar.gz

Now, if you type “ls” you should see a directory named celtx. So far so good. Next you need to add a link so Celtx can be run from the command line, like this:

sudo ln -s /opt/celtx/celtx /usr/bin/celtx

In theory that’s all you need to do. Now if you type “celtx” on the command line (or after hitting Alt+F2) the program will run. We can make it a lot easier than that, though. Next we need an icon to represent it on the desktop. There are two options here. First of all you could use an existing one. Type this:

sudo thunar /usr/share/pixmaps

A file manager window should pop up and if you scroll down you’ll find all the system icons. If you find one you want to use for Celtx: cool, if you don’t then you’re other option is to make one. I’m not going to get into that, but if you want to do it please bare in mind that is has to be a png, it has to be 90px x 90px in size and it has to be placed in that directory. I found on on the web and resized it myself. Assuming you have the icon you want in the downloads directory and it’s called “celtx.png”, you would type this to get it in the right place:

sudo mv /home/user/Downloads/celtx.png /usr/share/pixmaps/celtx.png

That done we need to create a desktop entry for it. You need to use a text editor for this. I used “vim”, so that’s what the directions here will say. “vim” can be pretty hard to use at first, though, so if you’re not linux minded you might want to find a tutorial on the web, or replace the “vim” command with something else (mousepad is one option that might be easier to use and more familiar). We start by (basically) creating the file:

sudo vim /usr/share/applications/Celtx.desktop

If you’re using vim, hit “i” (the word insert should appear at the bottom) and then paste the following into the file:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Celtx
Name[zh_TW]=Celtx
Name[zh_TW]=Celtx
Name[zh_CN]=Celtx
Name[de]=Celtx
Name[it]=Celtx
Name[fr]=Celtx
Name[es]=Celtx
Name[pt]=Celtx
Name[nl]=Celtx
Name[ja]=Celtx
Name[ru]=Celtx
GenericName=Celtx
GenericName[zh_TW]=Celtx
GenericName[zh_CN]=Celtx
GenericName[de]=Celtx
GenericName[it]=Celtx
GenericName[fr]=Celtx
GenericName[es]=Celtx
GenericName[pt]=Celtx
GenericName[nl]=Celtx
GenericName[ja]=Celtx
GenericName[ru]=Celtx
Comment=Write and edit media scripts
Exec=celtx
Icon=Celtx.png
Terminal=false
Type=Application
StartupWMClass=celtx-bin
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-shockwave-flash;
X-Desktop-File-Install-Version=0.10
Categories=Work;
StartupNotify=true 
Be sure to replace “Celtx.png” with whatever the icon you want to use is called. Also, all those language options are possibly not strictly necessary, but I copied most of this from another file and left them in to be on the safe side. Likewise, I could probably have done something a bit more clever with the “MimeType” bit, but decided not to bother. Next, save and exit the file. In “vim”, you hit escape, then type:
:wq
and hit enter. Lastly, we just need to tell Linpus to display Celtx on the desktop:
vim /home/user/.config/xfce4/desktop/group-app.xml

You should now be looking at an XML file. You need to find this:

<id>6</id>

And insert this underneath it:

<app sequence="2">/usr/share/applications/Celtx.desktop</app>

Be sure to increase the “sequence” numbers on the other “<app>” entries as well, to make sure there are no duplicates.

That’s about all there is to it. If you reboot the machine you should now find that you have an icon for Celtx on the desktop. After you put some .celtx files on the machine, you might want to right click on one and select “properties”, then tell Limpus to open the file type with Celtx (otherwise it’ll just treat it like a zip file).

This is quite a long post and I have work to do, but I might return in the next couple of days with some things to say about Celtx itself. Happy hunting!

PS Thanks to the users of the forums on aspireoneuser.com for the knowledge which was needed to work this out.


My Digital Life: I’ll see your eee and raise you One

August 18, 2008

My good friend Dougal got himself an Asus eee pc (relatively) recently. He likes it a lot. I like the idea of it, but not so much the implementation. On his version at least, the screen is too small for me, and the later versions are a bit too pricey. I love the idea of a small, light and eminently carriable laptop though. It’s the premise I originally bought my MacBook under, but I found even that machine to be too bulky and heavy to carry around constantly. The MacBook Air might work, but it’s very expensive (from the direction I’m looking at it from, anyway) and not really something I’d be prepared to pull out of my bag and start working on while sitting on the Meadows.

So I bought myself an Acer Aspire One. I like it quite a bit. I was worried about the size of the keyboard, but it’s fine; I’m typing this on it right now. The fact that I don’t (deliberately) touch type is probably an advantage in this case. I comes with 8 GB of SSD (hard drive, basically) which doesn’t sound like a lot these days, but I’ve already bought an extension to this (just waiting for it to arrive). The RAM is also a little low, so I’m thinking of upgrading that. It’s not expensive at all, but it is very fiddly, so I guess we’ll see. I don’t like laptop touchpads in general, and the one on the one is particularly lame, so I have a two part plan to help with this. The first part is software based and I’ll come to that later. The second though is yet another fiddly hardware upgrade (how exciting!), namely the installation of a touchscreen. Battery life isn’t great, so I might get a spare, or an external backup.

The next concern is software. This machine is basically intended to be a glorified word processor, so most of what I want it to run is writing software. Writing in this case means:

Blogging (like this)

Work (Thesis, papers etc)

Screen Writing (be nice to get back into this)

General Purpose Writing (of course)

and also:

Keyboard Control

Synchronisation with my real computer

The first obstacle here is the operating system. It currently runs Limpus Light Linux, which I recently heard referred to as “Linux for Pussies”. Unfortunate turn of phrase aside, this description isn’t too far off the mark. It’s very simple, very easy too use and boots in about ten seconds. But it’s also not as easy to customise. It seems that it is possible to install OSX on the One (always my first choice of operating system these days), but due to the lack of Apple hardware it would be crippled to some extent. Even so, it would make finding the other software I need a lot easier, because Open Source and Graphical User Interfaces DO NOT MIX. It’s one of those instances where to get what you pay for. Open source command line applications are almost uniformly fantastic, but anything with a GUI will probably look like the developer just shat on the floor when asked and then got his dog to do it while he cleaned up the mess. The two serious open source advocates I know both confess to a dislike of doing anything graphical, so maybe it’s symptomatic. I dunno. There are exceptions, of course. Eclipse is one, to a lesser extent so is Firefox. Also an exception is the currently gestating Netbook Remix of Ubuntu Linux, which might just be exactly what the doctor ordered, operating system wise. As far as I can tell it’s not quite ready for public consumption yet, though. As soon as it is I’ll probably switch, but for the time being I’ll hack away at the Limpus until I get something workable.

I’ll probably use Open Office (with actually runs quite quickly on this machine) for most of the writing, with Celtx (surprisingly good and free) for the screen writing and maybe Kyle for Latex formatting.

Gnome Do should take care of the keyboard control. It’s a clone of Quicksilver on OSX which works pretty well. It’ll never work as well, since the architecture of OSX supports this sort of thing better, but it comes close enough. For the synchronisation I’ll try and set up a custom rsync script to move things back and forward between this machine and my Mac, and then I’ll do most of the heavy formatting and posting and such from there when possible.

Speaking of which…