@antonpiatek on twitter

  • @sxa555 it applies to all smartphones, but I found it amusing none the less in reply to sxa555 4 days ago
  • Wife just complained that iPhone is bad cause you can sit on the sofa and buy stuff... 5 days ago
  • RT @marketspi RT @sickipedia: How do you confuse a Daily Mail reader?Tell them asylum seekers kill paedophiles. 5 days ago
  • RT @marketspi Today my sis told my 3 year old niece that I am a teacher who teaches "hard types of counting". I should put that on my cv. 1 week ago
  • Most of my morning gone to running handover to post-ga team in India. Conf call quality is bad, and I'm near falling asleep! 1 week ago
  • My phone has stopped showing tweets in friend stream, how annoying 1 week ago
  • More updates...

Posting tweet...

Powered by Twitter Tools

A Debian Packaging Howto

I do a fair bit of Debian/Ubuntu packaging at work (kind of on the side) and have had several people tell me that although the New Maintainer’s guide (http://www.debian.org/doc/maint-guide/ or it is available offline in the package maint-guide and also has some translations) does do an introduction it is a bit hard to follow, particularly if you have a really simple program you want to package up and release. The New Maintainer’s guide does assume you have an existing tarball to work from, and that is often not the case if you just want to package up something you have made so I thought I would write a detailed walkthrough of packaging up something simple.
Continue reading A Debian Packaging Howto

HTC Desire – Android rocks!

I gave in to the whole “smart phone” thing on the a week ago and ordered a HTC Desire online. The phone arrived last Tuesday and has barely been out of my hand since.

The hardware is fairly similar to the iPhone in shape, but a matt-black back casing and sort of purplish-metallic looking trim. The screen may be slightly taller than the iPhone, but only just.

Android is quite a cool OS, though I cannot tell how much is core Android and how much is “HTC Sense” which comes as part of the phone. One thing to say is that while an iPhone feels like a phone with lots of pages of buttons, the Desire is somewhat more like a computer. Technically it IS a computer – It is running a 2.6.29 Linux Kernel and you can hack a root account on it, though I have not done so (yet? Yeah, I surprised even myself here – I thought I would be hacking it and upgrading it to the latest Android straight away, but I am just enjoying all it can do right now)

I have 7 desktop screens, and swiping left or right moves between them. Each one can be filled up with application icons or shortcuts, or many applications also have “widgets” such as a clock with weather forcasting on it (clicking on the weather opens the weather app showing the weeks forecast).

Similarly I have a calendar widget showing me what is coming up from my Google calendar, and clicking on it takes me to the Google calendar application.

The touch-screen is a capacitive type and behaves wonderfully, though typing on the keyboard does take some getting used to.

The integration of the phone is quite incredible. Adding a twitter account and setting to get alerts whenever someone mentions me and now my phone beeps, vibrates and shows a twitter update in the pull-down status panel alongside text messages.

Facebook and Google integration however are far more impressive. Setting a Facebook and Google account and once it syncs I can see all the people I know in Facebook and all my Contacts in Google on my phone. Not only are they visible, but if it can it links the accounts (you can manually set links too) so that all the data shows up together. So for example, I have friends that I only had a mobile number in my phone, and email address in Google, and now that all shows up together along with their Facebook profile photo and more details from Facebook! (If only I could then force all that data back into my online Google address book)

I suspect the iPhone appstore is slightly better stocked than the Android Market, however there are still plenty of very good apps out there, and many are free (yes, there is a free lightsabre app if you really need it)

Google Maps is rather cool, and even has “Navigation”, which gives voice directions while driving (or walking) – It even pronounces the names of streets, though not particularly well.
If you are walking the route, at the touch of a button you can see the route through Google’s street-view so that you can see where the turns really are, though I suggest not trying this while driving.

As I am with 3 as my provider, I fought my way through their website to get the MSN and Skype applications, which once found were easy to install. One odd thing is that both Skype and MSN only work if you have good 3 signal AND have turned off wireless. It seems strange to me as there is no harm in letting you use wireless, but I guess they have their reasons (I believe that the Skype app actually uses a GSM phone call to do the voice to their server which should be easier on their network than VOIP, but that doesnt exaplain why wifi couldnt be used)

Google Earth is pretty cool to see running on a device in your hand, but perhaps even cooler is the Google Sky app which not only uses GPS to work out where on the Earth you are, but also uses the Compass to work out which way you are facing, and the tilt/accelerometer thingy to work out which way your phone is facing. Holding the phone in front of you, as you would taking a picture, it shows the stars, planets and constellations that are visible in that direction. As I know almost nothing about star constellations this is rather interesting to me.

Okay, so Google have influenced the apps a lot, but they did write a lot of the OS, and it is perfectly fine to use without a Google account (it does POP/IMAP and Exchange for email), but I think you get more out of it if you use Google already.

One thing I have yet to try is application development: I’ve only had it a few days – come on!
Looking at the developer docs it looks pretty straightforward – Eclipse IDE, Java classes provided, you should even be able to debug your app running on your phone via the USB cable. The only downside I have heard is that the GPS libraries require licensing, though apparently it will work in debug mode on your phone. It also appears that there is a $25 signup fee for the Android Market, but that doesn’t seem too extreme (especially when you compare it to $99 per year for the Apple app store)

One thing worth checking: I found (as did many other people if you search for it) that having the Twitter account enabled for updates (for example in Friend Stream) caused the calendar to continually poll for updates. This uses lots of battery (and probably bandwidth). It seems that calendar is the task responsible for nearly all background updates, so don’t just assume that it is your calendar using all your power or bandwidth, it is probably something asking calendar to do lots of updates

If you think something is using too much battery power, download the app “Spare Parts” from the Android market, and in it select “Battery History->Partial Wake Usage” and see what comes top. Mine used to show Calendar, but after removing the flickr account settings from the core OS “Settings->Accounts & Sync->Flickr->remove” and restarting the phone the bars are all very much smaller (and Calendar barely features on the usage)

Spare Parts looks incredibly useful, as you can also track bandwidth usage.

Posted from WordPress for Android

Wales

On the first May bank holiday this year a few friends from work, and some of their partners, decided that as most of us had not climbed Snowdon before that this would be a good time to do it (of course Andy had planned the trip months before and found an awesome cottage for the seven of us to stay in)

John and I arrived quite late on Friday night and spent a little while driving round the farm until we came across the correct farmhouse. Saturday saw the weather looking slightly worse than Sunday, so we decided (see photo of planning below) to do another walk – We ended up walking in a national park in Dyffryn

img_11298

Dyffryn

img_11407 img_11411 img_11388

img_11360 img_11341

img_11322 img_11316

img_11346 img_11345

img_11300

On Sunday we actually did the walk up Snowdon, which although I found a bit tiring (probably the limit I could realistically do in my current state of unfitness) was also incredibly enjoyable

Snowdon

img_11564

Note the small dog in the man's right hand

img_11544

img_11491 img_11446

img_11532

img_11421 img_11416

img_11422 img_11570

On Monday we decided we didn’t really want to head home early, so walked across the long foot/rail bridge at Barmouth before turning back when we realised the pub that was “just over the bridge” was actually ten miles further…

Barmouth

img_11585 img_11606

All the rest of the photos are on flickr (Wales), and if you can find the flickr map link you can browse around and where each photo was taken, as they are all geotagged (probably a first for me having had my GPS for a year)

Australia

I recently got the chance to go back to Australia for the first time in several years, only this time my Wife came with me. Loads of photos from Melbourne to Sydney which we drove over about a week. A fantastic way to see the place, and despite being a very long drive was rather pleasant (presumably because it is such a long way that few people drive it often, so no commuter traffic for most of it – whereas in the UK it is almost impossible to drive anywhere without being stuck in commuter traffic jams)

Too many photos (thought I did get a few Infra-Red ones) all in a set on flickr: Australia 2010 or a brief selection below

img_11254 img_11279

crw_99813 img_11241

crw_99844 crw_99845

img_11171 Sydney skyline at twilight

Fixing broken LVM and Sofware Raid on Linux

I have been building a backup pc our of mostly spare parts, including several old disks. To get the most reliability and space our of the disks, which are all different sizes, I decided to use software raid to mirror each chunk of data in pairs (raid 0) and then use LVM on top of each piece of raid to make all the raid volumes appear as one storage device to the linux OS.

The disks are as follows: 250G, 200G, 160G 120G, so to get the most space out of them I divided them as follows (Note: this is a simplification for the purpose of explanation, the real disk also has a raid 0, mirrored /boot/ partition which is not mentioned below. You need this because LVM is not supported by GRUB, so you can’t boot from a LVM volume):
250G: A (200G), C (40G)
200G: A (200G)
160G: B (120G) C (40G)
120G: B (120G)

A,B,C are partitions on the disks for software raid – I then set up software raid for each pair of A,B,C and set the created LVM physical volumes on top of them, which then are grouped together into one large volume group, giving me around 360G (actually less once you convert to base 2 rather than 10) of mirrored data storage. Note that I can lose any one disk and still have all my data (though I wouldn’t want to hang around too long replacing the disk as a second disk failing could mean you lose most of your data).

I actually created 3 LVM logical volumes, one for mounting each of / (the root of the disk for all OS data), /home (for all the stuff I actually really care about), and a volume for swap that doesn’t really need to be in lvm or raid, but it was just easier to do.

I previously wrote instructions about how to setup LVM and software raid, but this time round managed to completely screw the whole lot up just near the end. I forgot to define one of the raid devices in /etc/mdadm/mdadm.conf so next time I rebooted this raid device was not found in the early boot stages. As this raid volume is needed to create the full set of LVMs for my root filesystem, the system stopped booting right at the beginning because the LVM array was incomplete.

Fixing it was actually not to difficult, but I mention it here in case it is of help to anyone else (or in case I manage to do it again, which is probably likely)

Fist I booted a Ubuntu Live CD (actually a USB stick image created from my running Ubuntu laptop and a spare Ubuntu CD), but nearly any live cd should do. Once booted, I had to install (in the live session) mdadm and lvm2 as Ubuntu does not have these installed by default. Once you have these tools you can start your recovery (note that this needs to be done with root permissions, so sudo -s or similar to get a root shell)

Find the raid devices with mdadm –assemble –scan and then use pvscan and lvscan as required until your system has found your lvm config, then mount it (don’t forget to mount /boot/ too as we will need to rebuild the initrd)

mkdir /tmp/root
mount /dev/mapper/main-root /tmp/root
mount /dev/md0 /tmp/root/boot
chroot /tmp/root

Now you should be pretty much inside your root filesystem on your lvm array. Now we need to make sure all the raid arrays are configured in /etc/mdadm/mdadm.conf

Run mdadm –detail –scan to generate the lines for the config file, and make sure each array is listed in /etc/mdadm/mdadm.conf

From here it is pretty simple, all we have to do is rebuild the initrd so that it knows how to find all the raid and lvm devices needed during boot. dpkg-reconfigure linux-image-<your current kernel version> It is imporant to make sure that you get the right kernel, so have a look in /boot to check you get the right version (uname -r wont work here because you have booted your live cd image and not the kernel your box will run)

I got several warnings about /proc/ not being mounted, but this did not appear to be a problem.

Reboot, and you should be ok. You may want to make a copy of your current kernel in case you accidentally break it, just copy the linux-image…gz and initrd…gz from /boot/ to new names and run update-grub and that should give you two kernels to choose from (hopefully booting choosing them in the right order, the order should be based on the version numbers in your kernel files so adjust if needed)

Google announces Google TV

I am surprised it has taken someone so long to try and merge the web and tv’s successfully (ignoring hobby projects like MythTv). I am slightly suprised it was Google, but given they own youtube maybe I shouldn’t have been so surprised

See the official announcement for more