For a few years now, i’ve been hosting this site on Dreamhost. Despite the subpar performance, 90% of the time the site was up churning out requests, which for me worked out great.
Still, there’s something about shared hosting that makes me cringe, so i’ve been meaning to move to a VPS (Virtual Private Server) for quite some time now. After much consideration, i’ve decided to go with gandi.net. The reason? I’ve tried it before and they offer a fair price for what they offer: a single 256mb “slice” for $16/month, scalable up to 16 slices.
It may be a little bit more expensive than Dreamhost, but in the long run, i reckon it will pay back in terms of uptime and expandability.
Really, i don’t know what i should be writing about.
Over the past couple of years, i have written a handful of posts on this blog, most of which have been written on-the-fly and without any long-term considerations taken into account.
As a result the blog lacks consistency, leaving the reader with little clue what to expect. And much worse, it leaves me wondering what the hell to write about.
Looking at the analytics, the top 5 content is:
“Running your own iPhone applications without paying the developer fee”
The front page
“Flash plays SCUMM, take two”
“C to ActionScript via Adobe Alchemy”
“The Horror of Native GNUCash on Mac OS X”
So maybe i should write about developing iPhone applications? After all, it would nicely tie in with what i am doing now… writing an iPhone application. Then again…
What about making a nice page instead. Does this really have to be a blog? Perhaps i could have a single page blended with cuppalicious content! Then again…
Perhaps i should write more about silly programming projects. Forget about SCUMM, why not compile VIM or Emacs for Adobe Flash? Or taking it to the extreme, what about compiling the Linux kernel to run in Flash?
Or maybe i should rant. Everybody loves a good internet rant!
All i know is the current iteration of this blog is no more. It is just plain unworkable.
So what next?
I’d really like to keep the general development theme, but invigorate it with something a bit more interesting. The only problem is… i’m not sure what that “interesting” element should be.
As a little experiment, i decided to move this blog’s comments to Disqus, a third party service which well… hosts comments.
Setup was extremely simple. It went something like this:
Make a disqus account
Add cuppadev.co.uk as a site
Download wordpress plugin
Install wordpress plugin on server
Click “Import” button
Comments now go through disqus
Wow… that was quite simple. And i like simple.
Hopefully this will help weed out the tons of spam i have been getting recently. I think also that it’s simpler to use, so who knows, i might get more comments.
Looks like i’ve been tagged with a meme. This time, it’s about Software Development, courtesy of Gary Vaughan. Since that’s my field, i thought i might as well respond to it.
How old were you when you first started programming?
About 10.
How did you get started in programming?
I picked up a copy of Borland Delphi from PC Plus (a home computing magazine here in the UK). Ran my first program, and thought it was kind-of cool. Little did i know what i would be getting myself into.
What was your first language?
Programming language? Delphi, otherwise known as Object Pascal. Language? English.
What was the first real program you wrote?
The first ever would of course be a “Hello World”. The first one which i would consider “real” would be a neat web-based file storage app, which i didn’t make until many months later.
What languages have you used since you started programming?
The first professional programming gig would be freelancing for Mode7 Games.
If you knew then what you know now, would you have started programming?
No. Instead, i would have jumped on the dot com boom by hiring a set of competent programmers and making some really cool website with substance, pulling in crazed investors by the hordes.
Maybe after the bubble burst i would think about starting programming.
If there is one thing you learned along the way that you would tell new developers, what would it be?
Problem solving is the most crucial aspect of programming. Make sure you learn how to do it.
What’s the most fun you’ve ever had… programming?
After “Hello World” ran… it all went downhill from there. :)
A while ago now, i stumbled across a web based double entry accounting solution called Luca (not to be confused with the Mac Application).
Unfortunately though, the documentation was a bit sparse. However with a bit of persistence, i have just about managed to figure out how to use it.
Starting out
(note that for this little walkthrough i am using Luca 1.02, so don’t be surprised if you are using a later version and things look that bit different)
Assuming you have managed to download and install Luca, as well as log in, you’ll be presented with this rather interesting interface:
Whoah! Lots of options to choose from, but which of those do we need to start off with?
First things first, you’ll need to create a chart of accounts, so select the “Charts of accounts” option. You’ll be presented with a list of charts, which should be empty. Click on “Add new chart”, and your screen will look something like this:
The only 2 values which are of interest are “Description” and “Format mask”, the former of which can be anything you like. The latter is a bit more tricky, and it took me a while to figure out. It seems that the “Format mask” is basically a sequence of 9’s using dots as separators. The more dots you use, the more you can nest your accounts.
For reference, i put the following values in this form:
Description: LucaCorp
Format Mask: 9999.99 (i.e. 2 levels one using four digits, the other using two)
You should now have a chart you can use. But to be of any use, it needs to be assigned to an Organization. To do this, go back to the main menu, and select “Organizations”. Then select “Add new Organization”. Your screen should now look something like this:
Give your Organization a name, a remark if you like, and of course a chart of accounts. The values i used are as follows:
Name: LucaCorp
Remarks: blank
Chart of Accounts: LucaCorp
Note that you will also need to give yourself (and anyone else you trust with a user account) permission to use the Organization when entering transactions. This can be done in the “Users X Organizations” screen.
Creating accounts
Now would be a good idea to actually make some accounts. To do this, go back to the main menu and select “Accounts of the chart”. Then for the “Parent chart being edited:” field, select your chart of accounts. Your screen should now look something like this:
For each account you want to create, click on “Add Account” and fill in the form, which should look something like this:
The “Class” is the type of account to be created. You can make Accounts for Assets, Liabilities, Equity, Revenue, and Expenses (note that this list can be altered by playing about with the “Account classes”).
The “Std. journal” corresponds to an id of a “Standard Journal Description” which you can make in “Standard Journal Descriptions”. From what i can tell this allows you to save on typing repetitive descriptions when entering transactions, though i have not really found a use for it yet.
“Code” is the identifier of this account. It needs to correspond to the “Format Mask” you created earlier, e.g. in my case, “1234” and “1234.01” would both be acceptable.
“Parent account” is the code of the account you wish to be the parent. You can use this to create complex hierarchies of accounts, something which i assume Accountants love to do.
The rest of the fields are pretty obvious, apart from “Mobile clients” which i can only assume allows people using Luca’s bluetooth functionality to enter transactions on the account (note though that i have not tried this out).
So now you can create accounts at will. As for which accounts to create, it’s really up to you. However if you are a bit stuck, below is a table of values you can enter to reproduce a set of accounts from of one of my favourite tutorials on Double Entry Accounting written by Joseph Mack.
RocketScience LLC Accounts
Class
Code
Parent
Description
Small description
Asset
1234
cash
cash
Asset
1234.01
1234
Joseph Mack, withdrawing
jm_withdrawing
Asset
1234.02
1234
check account
check_account
Asset
1234.03
1234
petty cash
petty_cash
Liabilities
1235
liabilities
liabilities
Liabilities
1235.01
1235
Joseph Mac, capital
jm_capital
Equity
1236
equity
equity
Equity
1236.01
1236
accumulated profit and loss
acc_profit_loss
Equity
1236.02
1236
[clo]profit and loss
profit_loss
Revenue
1237
revenue
revenue
Revenue
1237.01
1237
fees earned
fees_earned
Expenses
1238
expenses
expenses
Expenses
1238.01
1238
advertising
advertising
Expenses
1238.02
1238
food,entertainment
food_entertainment
Expenses
1238.03
1238
office supplies
office_supplies
Entering transactions
To enter transactions in Luca, you’ll need to first create a Batch. To do this, from the main menu select “Batches”. Then on the next screen, select your Organization and click on “Add new batch”. Your screen should look something like this:
As you might have noticed, there is not much to a batch. The only thing to look out for is the dates you enter, which need to be in the format “yyyy/mm/dd”, and need to lie within the organization’s active period (the default being 1970/01/01 -> 1970/01/01).
If you ever want to change the date range of the active period, all you need to do is select “Active Period” from the main menu, then click on “Edit” next to the relevant accounting period for your organization. Your screen should look something like this:
Then all you need to do is enter an initial and final date. It’s as simple as that!
For my first batch, i used the following:
Description: First batch!
Initial date: 1970/01/01
Final date: 1970/01/01
Checksum: 0
Status: Open
Type: Normal batch
Now you can start entering your transactions, which in Luca are referred to as Journals. To do this, from the main menu select “Journals”. Then on the next screen, select your Organization and Batch, then click on “Add new journal”. Your screen should look something like this:
So to sum this up…
“DB account” and “CR account” mean “Account to debit” and “Account to credit” respectively. I’m going to assume you know enough about double entry accounting to figure out which accounts you credit and which you debit.
“Std. journal” i already mentioned when creating accounts.
“Cost center” i have yet to figure out, best to leave this as 1 unless you really need it set.
“Date”, “Description”, “Value”, and “Status” are all pretty obvious.
You can enter as many journals as you like in a batch. It is also interesting to note that you don’t have to enter both a credit and debit for an entry – you can quite easily add multiple debit or credits in a row.
Profit and Loss
At the end of the accounting year, you’ll probably want to determine profit and loss, which usually involves folding revenue and expense accounts into a single profit and loss account. This is otherwise known as “closing out the accounts”.
So how does one do this in Luca? Quite simply in fact. Select “Balance closing” from the main menu, and your screen should look something like this:
So basically all you need to do is select your organization, enter in start and end dates, then click “Prepare to close balance”.
However you’ll probably bump into a few issues first time, as three conditions need to be satisfied:
You need an account which contains “[clo]” somewhere in its description to store the closing values.
The period you specify needs to be within the current active period.
All batches in the specified period need to be set to “Closed”
The first condition is rather easy to satisfy. All you need to do is make an equity account named something like “[clo]Profit and Loss”.
The last two conditions we more or less went over when talking about batches.
Assuming you got the balance to close, your “Profit and Loss” equity account should now look something like this:
To sum it all up
Luca is a pretty promising accounting solution. It does accounting, reports, and also includes a bit of multiuser management too. In contrast to other solutions, it doesn’t try to do everything – which i believe is one of its strengths. It’s a relief not having to wade through a swamp of CRM to do something as simple as sorting out the accounts.
Sadly though Luca doesn’t appear to have a very active community, and from what i can tell Elvis Pfützenreuter puts most of the work into it.
Still from what i have been able to gather Luca is still under development so with any luck it’ll gain more useful features in the future such as multiple currency support.
After much deliberation, i finally got round to upgrading my Macbook from Mac OS X Tiger to Mac OS X Leopard.
Installation was mostly automated. I decided that as i still had Linux installed on the machine, i might as well just reformat it a start from scratch. After putting in everything needed, i sat back for nearly an hour until it finally finished installing.
After watching the fancy new intro movie and filling in all of the dialogs, i ended up with the desktop, which surprisingly wasn’t as bad as i had first imagined.
There was however a little issue i had to address: I had to copy across all of my files to the new installation. The only problem was that most of them were in a FileVault which i backed up from my Tiger installation.
Interestingly Leopard uses “.sparsebundle” files instead of “.sparseimage” files to store FileVault’s, so i couldn’t just copy my old FileVault over and log back in with all of my files and settings in tact. No, i had to figure out a workaround.
Firstly, i made sure i was logged into a different user account than the one i was restoring. I then opened up my old ”.sparseimage” file which mounted at ”/Volumes/jamesu”.
Now i could’ve just gone into Finder and copy all of my files over just like that, but then i realised that there were a lot of hidden files present so i needed to make sure they were copied too. Thus i decided to open up Terminal and use a command line tool called “ditto” to copy my stuff across, which tries its best to preserve all of the metadata.
So now i could just log-in and everything would more or less work. However i also remembered that i had some more files from when i was using my Linux installation. These were on another machine, so i first copied them across. For this i used SSHFS, but any method is applicable. I then utilised another command line tool called “rsync” which synchronises files between two locations in order to copy only the files which had changed from my last Mac backup (which my Linux copy was based off of).
And viola! I could now log-in, safe in the knowledge that all of my important files were accounted for. Of course, i also turned FileVault back on so my important documents were now safe from prying eyes again.
Now i’ve got everything sorted, i think i’m going to check up on the exciting new developer API’s present in Leopard.
After stumbling across the Entrepreneur Geek blog, i spotted this rather puzzling river crossing puzzle. Sadly, i haven’t managed to solve it yet, but i think i’m close.
Instructions:
Help these people to cross the river, in the next screen.
Only two people at a time, at least one adult.
Criminal (in striped dress) cannot be left with others, without the Police.
Mother cannot be with sons, while father is not around.
Father cannot be with daughters, while mother is not around.
Click on the BIG BLUE BUTTON to start!
Click on people to get them on or off the boat.
Click on the Red buttons to move the boat to opposite side
I have been tagged by Ian with the Scattergories meme.
The rules
Use the 1st letter of your name to answer each of the questions. They must be real places, names, things . . . nothing made up! If you can’t think of anything, skip it. You CAN’T use your name for the boy/girl name question. If your name happens to start with the same letter as mine, sorry, but you can’t use my answers!
Earlier this month, Gary Vaughan mentioned QuickSilveron his blog. For those of you that don’t know, QuickSilver is a rather neat application launcher (amongst other things) for Mac OS X which allows you to simply launch an application by hitting a key combo, typing in the first few letters, and then pressing return / enter.
Consequently, i cannot remember the last time i explicitly went to my Applications folder to launch an application which wasn’t on my dock. So i guess i’m hooked.
Sadly not all of my computers run Mac OS X, so i don’t have the fortune of being able to use QuickSilver on them. Fortunately, they all run Ubuntu Linux, and you can almost guarantee some nut has made a free open source clone of your favourite app which runs on it.
After a bit of searching, i came across a KDE app called Katapult. It seems to get good write-up’s, so i decided to install it and then try it out.
$ sudo apt-get install katapult
$ katapult &
After starting it up, i got a nice icon which appeared in my system tray. Clicking on it popped up a big “Katapult” icon, which initially confused me a bit. Although after pressing a few keys on my keyboard, i realised it was the input dialog which i could type the name of the application i wanted to launch. For instance, if i typed “ter” and then pressed return / enter, it would launch the gnome terminal – neat!
After looking at the preferences dialog, it became apparent that the proper way to invoke the Katapult input diaog was by pressing “Alt + Space”. In addition, i could change which “Catalogs” (which is where the commands and so on are stored / processed) should be searched, as well as tweak them. Catalogs which were included by default were:
Calculator Catalog (allows you to perform calculations by typing them in)
Amarok Catalog (allows you to select songs from your Amarok library)
Spell Catalog (allows you to spell check by typing “spell “)
Document Catalog (allows you to open documents by typing their name)
Bookmark Catalog (allows you to open firefox bookmarks by typing their name)
Program Catalog (allows you to open applications by typing their name)
In any case, i am definitely going to install Katapult on any Ubuntu Linux desktop machines i administer in the future. It’s such a convenient time saver!
SSH Tunnel manager is a rather nifty tool which allows you to manage a list of SSH tunnels, which basically securely forwards ports on your own machine to a remote one.
So for example, if i had an administration control panel running on my web server, i might want to make it so that i could only connect to it locally (so there would be practically no chance of anyone on the internet accessing it).
But i would still want to access it remotely, and the only way for me to do that is make an SSH tunnel which acts as if i am connecting locally on the machine, when in reality i am not.
Any would-be hacker would need to figure out the login details on my SSH server in order to have a chance of accessing the control panel.
Now whilst this app was great, i noticed something a bit disturbing about it. It turns out that its been quite a while since it was last maintained, and thus it it still a PPC binary, meaning if i run it on my brand new shiny Intel mac, i have to let Rosetta run, which is memory hungry and gobbles up precious CPU time!
Luckily, the developer also provided the source code to the application. So the solution was obvious: i needed to recompile this application as a Universal Binary, which means it will run natively on both PPC and Intel mac’s.
This didn’t end up being very hard, i.e.:
Download and unpack the source code
Open the project file in XCode (converting it to the new format)
Replace the ssh executable in the resources with the version from /usr/bin
Set the configuration to “Deployment” and build
Run it and hope it works
Thankfully for me, it built properly (with the exception of a few warnings, though they didn’t look too serious). So now i have a nice and shiny native version of the SSH Tunnel Manager on my mac.
In case anyone doesn’t want to go through the 5 step solution, or perhaps you don’t have XCode installed on your machine, here is a copy for you to download.