Wednesday, 30 December 2009

A sad day...at least for me

On Sunday I decided to boot up my two-and-a-half year old Philips X58, which came originally with Windows Vista, but now dual-boots the trial version of Windows 7 and Ubuntu 9.10. It had just booted Windows up when, all of a sudden, it died. At first I thought maybe the power had gone, as the power supply was pretty worn out, but it had the battery in and as far as a I knew it had some charge in it. I tried pressing the power button, which did nothing, and that's when I started worrying because even if power wasn't reaching it from the power supply and the battery was discharged, there would be enough power left to get the battery warning light to flash, but nothing whatsoever was happening.

I noticed that the light on the power supply was flickering, rather than being steady, so I googled it, and apparently that normally means power is reaching the adapter, but can't be passed on to the computer. A bit more research led me to believe there were several possibilities:
  1. The power supply was broken.
  2. The connection from the power socked on the computer to the motherboard was broken.
  3. The fuse in the power supply had blown.
  4. The motherboard had been fried by a power surge.
Ominously, there was a faint whiff of burning from inside the computer. I took the back off to have a look and couldn't see anything obviously wrong with it, so I figured I had to eliminate the power supply as an option. So I ordered a new power supply for it.

This came yesterday, so I tried it with the laptop, but it was the same story - flickering green. So it looks like the motherboard on this machine is gone. Humph, just the Christmas present I want...

This is frustrating because the machine isn't actually that old (half as old as my Dell Inspiron). I have also noticed one of the hinges has a crack in it. I'm looking into how much it might cost to repair it, but it's a rather awkwardly-designed laptop and I'm really not convinced it's going to be a worthwhile proposition repairing it. So it's likely I'm going to have to replace it.

I was actually considering the possibility of buying a new one with Windows 7 anyway (even though I last bought one only in October, a Dell Mini Inspiron with Windows XP), so this does at least come as a valid excuse to buy a new machine. Despite my preference for Unix-like OS's, I do still like having the option of using Windows around.

I'm thinking probably another Dell - despite what so many people seem to say about Dell, all my Dell's have been great computers. My Inspiron I bought in 2004 is still going strong, and my Axim PDA works well too. The Mini Inspiron has also proven to be a good machine in the short time I've had it. My dad's Dell desktop was hit by a power surge last year which damaged the motherboard but would still power on (it just had regular BSOD's) so it was more resilient than my Philips, and it was easy to repair. I've found Dell's to be simple, reliable, efficient machines, and that suits me fine. The only issue I've had with them is the crapware they install, and even Apple do that (cough...iWeb...cough).

Maybe I should branch out into getting a desktop as I've always had laptops in the past?

Friday, 18 December 2009

RATM for the Xmas number one!

Just wanted to voice my support for the campaign to get 'Killing In The Name' by Rage Against The Machine to the 2009 Christmas number one slot in the UK! I harbour no illusions about it changing the face of the music industry or getting The X Factor off our screens or anything like that, but it'll be worth it just to piss off Simon Cowell! I already have the album, but I bought a copy for precisely that purpose!

If you're in the UK and haven't bought it yet, here's a link to buy it on Amazon. At 29 pence, it's an absolute steal!

Thursday, 17 December 2009

Validation

It can be quite hard to tell whether your programming skills are up to scratch if you're not doing so professionally or otherwise producing code that will be scrutinised by others, such as for an open-source project, or being taught in a classroom environment. You can't help but think "Am I doing a good job?", and it's difficult to get outside validation.

So today, when I came across a blog post referring to the FizzBuzz Test I thought I'd have a go. I decided to use Python as that's the language I know best, but I was a bit concerned about being a bit rusty as I haven't done much Python coding for a while due to concentrating on other things. As it turns out I needn't have worried. Here's the code I came up with:

def fizzBuzz():
for i in range(1,101):
if i % 3 == 0 and i % 5 == 0:
print "FizzBuzz"
else:
if i % 3 == 0:
print "Fizz"
elif i % 5 == 0:
print "Buzz"
else:
print i

fizzBuzz()

Not too shabby, and if this blog post is correct, it puts me ahead of a few people who are already working as full-time programmers! After doing that, I felt a bit better about my skills.

I wrote a Python script a few months back when at work we had to use one Excel spreadsheet among many, many people to update some details. If you've used Excel a lot, you may know that this can be a recipe for disaster - if you have sharing disabled, only one person can use it at once (and inevitably someone will go to lunch with it open), and if it's enabled you run the risk of someone overwriting what you've just entered. In frustration I wrote the following Python script to allow me to update the file without going into it. Please note that it requires the xlrd and xlwt modules:

# Spreadsheet Updater
# Written to allow an Excel spreadsheet to be updated automatically without opening it manually

from Tkinter import *
import xlrd, xlwt, datetime, tkMessageBox

class Application(Frame):
"""GUI application that takes data to be input into a spreadsheet. """
def __init__(self, master):
""" Initialize Frame. """
Frame.__init__(self, master)
self.grid()
self.create_widgets()

def create_widgets(self):
""" Create widgets to get information to enter into spreadsheet. """
# create instruction label
Label(self, text = "Enter details for a new entry in the current spreadsheet (saved as Current Month)").grid(row = 0, column = 0, columnspan = 4, sticky = W)

# Policy Number
Label(self, text = "Policy/Scheme Number").grid(row = 1, column = 0, sticky = W)
self.policy_no = Entry(self)
self.policy_no.grid(row = 1, column = 1, sticky = W)

# System
Label(self, text = "System Number").grid(row = 2, column = 0, sticky = W)
self.system = Entry(self)
self.system.grid(row = 2, column = 1, sticky = W)

# Log Ref
Label(self, text = "Log Number").grid(row = 3, column = 0, sticky = W)
self.log_ref = Entry(self)
self.log_ref.grid(row = 3, column = 1, sticky = W)

# Name
Label(self, text = "Name").grid(row = 4, column = 0, sticky = W)
self.ph_name = Entry(self)
self.ph_name.grid(row = 4, column = 1, sticky = W)

# Reason for Change
Label(self, text = "Justification for change").grid(row = 5, column = 0, sticky = W)
self.reason = Entry(self)
self.reason.grid(row = 5, column = 1, sticky = W)

# Incorrect Data
Label(self, text = "Incorrect Data").grid(row = 6, column = 0, sticky = W)
self.incorrect = Entry(self)
self.incorrect.grid(row = 6, column = 1, sticky = W)

# Correct Data
Label(self, text = "Correct Data").grid(row = 7, column = 0, sticky = W)
self.correct = Entry(self)
self.correct.grid(row = 7, column = 1, sticky = W)

# Spacer to separate Correct Data from Validated
Label(self, text = "").grid(row = 8, column = 0, sticky = W)

# Admin Validated
Label(self, text = "Have Admin validated change?").grid(row = 9, column = 0, sticky = W)
self.validated = StringVar()
admin_validate = ["Yes", "No"]
admin_column = 1
for entry in admin_validate:
Radiobutton(self, text = entry, variable = self.validated, value = entry).grid(row = 9, column = admin_column, sticky = W)
admin_column += 1

# Admin Informed
Label(self, text = "If not validated, Hand off to Admin method done?").grid(row = 10, column = 0, sticky = W)
self.informed = StringVar()
admin_inform = ["Yes", "No", "N/A"]
admin_inform_column = 1
for entry in admin_inform:
Radiobutton(self, text = entry, variable = self.informed, value = entry).grid(row = 10, column = admin_inform_column, sticky = W)
admin_inform_column += 1

# Admin details
Label(self, text = "Admin Details").grid(row = 11, column = 0, sticky = W)
self.admin_details = Entry(self)
self.admin_details.grid(row = 11, column = 1, sticky = W)

# Processor
Label(self, text = "Owner").grid(row = 12, column = 0, sticky = W)
self.processor = Entry(self)
self.processor.grid(row = 12, column = 1, sticky = W)

# Create a submit button
Button(self, text = "Click to submit", command = self.update_spreadsheet).grid(row = 13, column = 0, sticky = W)

def update_spreadsheet(self):
""" Create a Python list containing all the values from the application, plus the date, and append it to the spreadsheet. """
# get the date
raw_date = str(datetime.date.today())
year = raw_date[0:4]
month = raw_date[5:7]
day = raw_date[8:10]
date = str(day + "/" + month + "/" + year)

# get policy number
policy_no = self.policy_no.get()

# get system
system = self.system.get()

# get log ref
log_ref = self.log_ref.get()

# get name
ph_name = self.ph_name.get()

# get reason for change
reason = self.reason.get()

# get incorrect data
incorrect = self.incorrect.get()

# get correct data
correct = self.correct.get()

# get Admin Validated
validated = self.validated.get()

# get Admin Informed
informed = self.informed.get()

# get Admin details
admin_details = self.admin_details.get()

# get processor
processor = self.processor.get()

# create a Python list to hold the elements for adding to the form
new_entry = [date, policy_no, system, log_ref, ph_name, reason, incorrect, correct, validated, informed, admin_details, processor]

# If an element is empty, bring up a warning and break out
all_complete = True

for entry in new_entry:
if entry == "":
all_complete = False
break

if all_complete == True:
try:
self.write_to_spreadsheet(new_entry)
self.confirm_message()
except:
self.fail_message()
else:
self.incomplete_message()

def write_to_spreadsheet(self, new_entry):
""" Method to import the contents of the spreadsheet to memory, then save it again, overwriting the original. """
# Import the spreadsheet as a Python list with a nested list for each individual row
book = xlrd.open_workbook("Current_Month.xls")
sheet = book.sheet_by_name("Sheet1")

entries = []

for i in range(50000):
# if the first cell of the current row is empty, break out of the loop
try:
entry = []
for cell in sheet.row_values(i):
entry.append(cell)

entries.append(entry)

except(IndexError):
break

entries.append(new_entry) # Add the new entry to the spreadsheet

# Write the resulting list back to the spreadsheet
new_book = xlwt.Workbook(encoding="utf-8")
new_sheet = new_book.add_sheet("Sheet1", cell_overwrite_ok = True)
i = 0
for entry in entries:
j = 0
for item in entry:
new_sheet.write(i, j, item)
j += 1
i += 1

new_book.save("Current_Month.xls")

def confirm_message(self):
# Display a message confirming input processed
tkMessageBox.showinfo("Confirmed!", "New entry confirmed!")

def fail_message(self):
# Display a message warning input failed
tkMessageBox.showerror("Error!", "Error in writing to spreadsheet!")

def incomplete_message(self):
# Display a message if not all fields are completed
tkMessageBox.showwarning("Incomplete!", "Warning! Form not completed in full!")

# main
root = Tk()
root.title("Spreadsheet Updater")
app = Application(root)
root.mainloop()


Sadly, it doesn't show up well in Blogger - the ends of some lines are chopped off. I was quite proud of it - it does the job I wrote it for, which is all I can ask, and it looks fairly elegant to me. Sadly, I wasn't able to use it at work as it would have required everyone who needed to access the spreadsheet to have Python installed, and I was not able to get this (I won't go into why, but I do understand the reasons I was given, and they were pretty good, and potentially I could have done the same thing in VBA, if I knew it, without needing to install any software).

This put a damper on what I would like to have done next - written a second script to export the contents of the Excel spreadsheet to an SQLite database, then created an amended version of the updater to update the database instead of the spreadsheet, then finally written another script to export the contents of the database to another spreadsheet, thus enabling us to use a database to record the data in the first place (a much better solution!) while still retaining the option of getting it in spreadsheet form if necessary.

So I had this code just lying around, without a use. I've therefore submitted it to Useless Python - as at right now it hasn't been accepted yet, but hopefully it will be. I'm looking forward to people's feedback about it - for that matter, please feel free to comment here! I would welcome any constructive feedback.

In the last couple of years I've learned HTML, and a fair bit of Python. Earlier this year I finished my CIW Foundation course, and then spent a couple of months studying C. Even though I kind of got stuck on pointers, I learned quite a bit, and now any programming language whose syntax is based on C is a lot easier.

I'm also beginning to understand why so many experienced programmers say that they can learn a new language in a week or so. I'm now studying JavaScript and much of the syntax is almost identical to that of C, so it's very easy to pick up the core language itself. Also, a lot of concepts are common to virtually all programming languages - if/then statements, while and for loops are near-universal, for example, so you only have to learn them once.

I've now bought the books for the CIW Master Enterprise Developer certification, and it means I'm going to have to learn JavaScript, Perl, PHP and Java, as well as classic ASP and SQL. Assuming I complete it, I will have qualifications to validate my abilities, but for my money that's not what makes a great programmer.

A great programmer is someone who writes code that does the job efficiently, but is also elegant and easy to understand. Qualifications can't tell you how elegant or efficient your code is, nor how readable it is. And this is where it gets really hard to get validation - you can know your code works, but it's very difficult to know if it's good code if you don't have a wealth of experience.

Wednesday, 25 November 2009

Google Wave invites

The other day I signed up for Google Wave, and I've now been sent a load of invites. I've tried to give them away on Twitter but no-one seems to be interested right now!

I've still got 13 left as at right now, so if you'd like one, please leave your email address in the comments below and I'll send you one, subject to availability. Naturally, for your own sake I'd urge you to obscure it in some way, such as bob(AT)example(DOT)com instead of bob@example.com, to help stop it being harvested by spammers.

Saturday, 21 November 2009

What would you do if you ran Microsoft?

Here's a little thought experiment for you. Microsoft has been a phenomenally successful company, with a market share of nearly 90% of the desktop computer operating system market, a not insignificant chunk of the server market, near-domination of the office suite market, and fingers in many other pies, including mobile phone operating systems, the console and portable music player markets. Its founder became obscenely rich, and the company has come to represent for many people the sheer potential to make money in the computer industry.

On the other hand, the company has also been no stranger to controversy. It has been subject to a number of investigations as a result of its near-monopolicy in the operating systems market, and has a reputation for anti-competitive practices. Also, it's never been a company people like the way they like Apple or Google - mostly people are ambivalent about them. Windows has attracted a lot of criticism in the past for its vulnerability to malware when compared to other operating systems (some of which can be attributed to its greater market share, but certainly not all), and Windows Vista was widely regarded by many as a flop. Windows 7 may have marked a turnaround in the company's fortunes, but at present it's probably too early to say.

So, what if you had the chance to run it? Say Steve Ballmer threw one too many chairs across the room and had to be escorted from the building? What if they picked you to succeed him (let's ignore the slight issue of most of us not being qualified to run a company that size, I know I'm not)? What changes would you make?

Here's a few suggestions of my own:

Contribute to WINE development:


I'll probably take a LOT of criticism for this, but stick with it, I promise, there is a logical reason for this!

The WINE project could be seen as a thorn in Microsoft's side in that it's trying to deprive Microsoft of sales of Windows by allowing other platforms to run Windows applications. That's a very negative view, but it seems to be the view Microsoft hold at the moment. I've even heard rumours that Microsoft have used Windows Genuine Advantage to prevent Microsoft software working on WINE.

But, there's an alternative viewpoint, and that's this:

"Users like Microsoft's software so much that they want to run it on other operating systems"

In other words, Microsoft need not invest their own time and monies in porting their software to another platform because someone else is prepared to create software that will allow it to run on this platform. So thanks to the work of the WINE developers, Microsoft can sell its own desktop applications to users of other operating systems, at no cost! Okay, that's a VERY positive spin on it, but that doesn't make it wrong.

After all, the margins are much higher on a copy of MS Office than on a copy of Windows, yet Office is probably a simpler product to create. So it makes sense to help people who want to run Office on Linux, for example. By shutting themselves out of that market, they may be shooting themselves in the foot because they are ceding that market to competitors such as OpenOffice and StarOffice.

Any contribution need not be terribly substantial - perhaps changing a few licensing terms and providing the developers with copies of documentation that isn't normally provided to the public, thus eliminating the need for time-consuming reverse-engineering, would alone provide a massive boost to the project. More active participation, such as having Microsoft engineers contribute, bringing their knowledge to the project, would be of huge benefit.

Do more to assist the Mono project, including taking further steps to assuage the fears of free software advocates

The Mono project has never been far from controversy, ever since its inception. By reimplementing the .NET framework and the C# programming language, among others, it has allowed developers to use their existing skills with Windows for developing on other platforms. But there are a lot of concerns that Microsoft could one day launch a patent suit, preventing the use of software created using Mono.

In all honesty I don't think there's any one way that Microsoft could calm these fears, but there's plenty of scope to improve the situation. They've already done quite a lot to help (the community promise, and open-sourcing the .NET Micro Framework), and just need to continue down the same path, open-sourcing as much as they can and ensuring that developers need not worry about the threat of patent infringement hangin over their heads.

Mono allows developers to use their existing skills in Windows development to create cross-platform applications quickly and easily. By ensuring the future health and wider adoption of Mono, Microsoft would be encouraging developers to use .NET technologies instead of competing cross-platform development frameworks such as Qt.

Make heavy use of open-source software

That is bound to be another controversial one, but it's logical. Apple have shown that a hybrid approach, with some open-source code and some closed-source, can work well. It allows them to leverage the power of the open-source community and avoid reinventing the wheel.

For instance, what if Microsoft switched Internet Explorer to a Webkit base? Webkit is a mature, fast and stable open source technology, and also complies with current web standards. Doing so would greatly simplify the job of maintaining Internet Explorer, and would make web developer's jobs easier too. You can make similar arguments in favour of GCC in the form of MinGW, and I'm sure plenty of other people can suggest other software that's ripe for replacement by an open-source alternative.

Open-source software may not always have the polish of its closed-source counterparts, but there's no denying it does sterling work behind the scenes. By leveraging its strengths, Microsoft could lighten their own workload while also contributing to the open-source community. Bugs and vulnerabilites would be fixed quicker, and we'd all get better quality software.

So, that's my suggestions. What about you? If you took control of Microsoft, what changes would you make? Creative and inventive answers are great, but nothing too outlandish - remember, you would still be accountable to the board, so things like "give the shareholders their money back" would be turned down flat!

Monday, 28 September 2009

A brief update...

I haven't posted on here for a while as I've been busy at work and on my course, so I thought I'd just share some good news I've had in the last couple of months.

First of all, it now looks like I will be able to take voluntary redundancy from my existing customer services role next year, although it's not yet certain. I'm looking to leave about 7 months down the line, and not only will this mean I get to leave this rather dull job, but I will also go with a big fat redundancy cheque, in excess of £10,000! I don't know the exact amount - apparently it's based on months and years worked there, which would make it £10,500 as at December, so it will be more than that if I leave end of April, and I also get to take some free shares I was given that I would otherwise have had to leave in. I might also get pay in lieu of any holiday I'm owed at the time, and the whole thing is tax free, so it could work out considerably more. Put it this way, it's around a year's salary for me, and I'm pretty confident I could get a new office job quickly, probably paying more.

But that's not the plan, which is where my second news comes up. This morning I did the final exam for my CIW Foundations course. I'm pleased to report that I passed, with a score of 77 correct out of 85 (around 90.5%), which is pretty good as the pass mark is 54 out of 85, and it's multiple choice. This now means that I just have to register this online and they'll send me the certificate, and I will then be a CIW Associate!

So now I have a recognised IT qualification, my desire to become a web developer is now one step closer. As I've got plenty of time till my preferred redundancy date comes up, I figured it's worth doing another course so I've emailed the college and asked them to send me details on the three that I'm most interested in (Java, C# and C++). At this point I'm leaning towards Java as the impression I've gotten in the past is that Java is essential if you don't really want to go the Microsoft route (I'd much rather work on Linux/Unix or OS X), and is still useful if you do as C# is similar enough that it's easy to adapt to. I think C++ might be a bit too demanding, and while I don't mind C# as a language I reckon any course that focuses on C# is bound to use either Visual C# Express Edition or a trial of Visual Studio. These are pretty good tools but I'd much rather be able to use Vim for everything (or if I have to use an IDE, one that supports vi keybindings), together with an appropriate compiler and debugger as I find this way works better for me (although I am pretty fond of MonoDevelop as this gives you a killer combination of vi keybindings and Intellisense-style autocompletion).

Shame they don't offer a Python or PHP qualification, but hey, I can always do that later if I want. I'm now thinking that I'll start looking for something in February to have lined up for when I leave my existing job, so it would be good to have gotten a decent amount done on getting another qualification, one that involves actual programming. There are plenty of vacancies on offer all the time, but I really need experience with server-side web programming to be able to do them.

Here's hoping it all works out OK and in a year's time I'm doing a much more fun and better paid job!

Monday, 10 August 2009

Learning to speed-read

Sounds like this might be worthwhile if, like me, you have squillions of books lying around that you've never gotten round to reading. I'm going to give this a go to see if it makes any difference - I'm a pretty fast reader to start with though.


More DIY videos at 5min.com

Saturday, 28 March 2009

Scammers are morons...

Check out this very dumb spam email that was sent to, of all places, the Debian Hurd mailing list, and received a suitably chastening response. I mean, seriously, Linux has a reputation for being geeky, Debian has a reputation among Linux distros for being geeky and the Hurd port is no doubt even geekier (I'm on the mailing list, but only really because I'm interested in the idea of the Hurd and I would like to be able to play with it once I have sufficient skills). Who is dumb enough to think that people on this mailing list will not realise this is a scam? Not to mention the nature of it:
Dear Webmail Account User,

This message is from the webmail administrator/
IT support center to all webmail account users. We are
currently upgrading the data base and e-mail center due tO
unusual activities identified in our email system.
Therefore, We are deleting all unidentified Webmail Accounts
to upgrade and create space for new ones.

You are required to verify your webmail account by
confirming your Webmail identity. This will prevent your
Webmail account from termination during this exercise.

In order to confirm your Webmail identity, you are to
provide the following data below;

First Name:
Last Name:
Username/ID:
Password:


*Important*
Please provide all these information completely and correctly
otherwise due to security reasons we may have to deactivate
your webmail account temporarily.

If anyone falls for that one they probably shouldn't be allowed near a computer ever again! I guess it goes to show that most online scammers are in fact utterly stupid people who bank on there being someone even stupider to fall for it.

Sunday, 22 March 2009

Kill Bill in One Minute

I loved this video! Check it out!


Saturday, 21 March 2009

INX

I stumbled across an incredibly useful tool the other day, which I thought I'd share with you. INX is a custom Ubuntu respin that lacks an X window server. In other words, it's a command line only system.
Now, this may at first make you think "meh, what can that do?", but INX sets out to prove you wrong by letting you do virtually everything you can do from a GUI! Including browse the web graphically, read email, listen to internet radio even watch videos!
INX is two things: First of all, it's a great demonstration of just how much you can actually do from the command line. Second, it's a great learning aid. It includes loads of tutorials on how to use the command line. I learned a load of things from one go, including how to use GNU Screen.
If you're even remotely serious about learning to use Linux properly, I highly recommend grabbing a copy from the link above!

Programs wanted for old-style chips

Interesting idea, but seems strange to use 8-bit processors when it would probably be easier to use a more modern x86 CPU that was coming to the end of its lifetime - older Intel chips can be had pretty cheap, and this would let them use the variety of free software available such as Linux. Why reinvent the wheel?

read more | digg story

Sunday, 15 March 2009

Musings on learning Python

I realised that I hadn't posted for a while and I also hadn't mentioned how I was doing learning Python, so I thought I'd best write a new post.

Well, I've been using Python Programming for the Absolute Beginner, 2nd Edition, and I've skimmed through it once to familiarise myself with the syntax and am now working through it a second time, but this time I'm making sure I pass all the exercises before I move on. I did have a significant setback during this time because I had to spend two and a half months working on Network Technology Foundations, the final module for my CIW Associate course (got 19 out of 21 on the test though! Just waiting to hear from my tutor about doing the final exam, though), but I finished that in mid-February. So, in the period from mid-October to start of December, and then again from mid-February onwards, I've been spending a little time every day learning Python. Now I can devote a bit more time to it, I think I'm making a fair amount of progress.

And how do I find it? Well, I already have reasonable knowledge of HTML/XHTML, and did a little bit of programming in BASIC on my Amstrad CPC when I was a kid, and I'm already reasonably familiar with the bash shell (though I haven't really done any shell scripting), so I wasn't a complete novice. From my experience, and from attempting a few other languages (Perl and Java, mainly), I've found that Python is the first language that I really feel I can make progress with. I've already surpassed my meagre BASIC knowledge, and I feel it's doing me good because unlike with BASIC, Python encourages good programming practices such as indentation, which will no doubt do me good when I choose to learn another language.

I've heard in the past that Python just seems to "fit your brain" better than other languages, and my experience bears this out. I can already follow the flow of pretty much any Python program pretty well, and I was really pleased the other day when I found a listing in a magazine for a game written in Python and I understood every line perfectly. I still haven't gotten very far with learning object-oriented programming, but that will come with time.

I've also tinkered with C a tiny bit, and learning Python has meant that I find it easier to understand what's going on in C, which is great. One of the things that drew me to Python was the fact that it was relatively easy, but at the same time was a full-featured, modern programming language, not some kid's teaching language, so I could learn the basic concepts behind programming using Python, such as object-oriented programming, then apply the principles I'd learned to more demanding languages, as I've always heard that once you know a few languages it's easy to learn another. I've already found that if I look at a program in pretty much any language now it's possible to get some idea of what's going on.

As a very welcome side-effect, my skills with Vim have increased tremendously, and combined with the fact that I can now touch-type, when you compare how long it took me to enter a BASIC program as a kid to how long it now takes me to enter a Python program of roughly equal length, there's no comparison. The downside of this is that at work when typing letters (I work in a customer services role), I keep reaching for j to move down, the Vim key bindings are burned so far into my brain!

I'm going to continue learning more Python, but I'm getting a little bored with my current Python book so I will finish this read through and move on to something else. I have Apress's Beginning Game Development with Python and Pygame, The Definitive Guide to Django and Practical Django Projects, as well as O'Reilly's Learning Python and Programming Python, so that means I've got plenty to learn about Python. I find reading several different tutorials about a subject gives you a more balanced view of it, and there's also plenty of tutorials online about Python so there's loads of scope to learn more.

I have some idea of the path I'd like to take with learning to program after I'm reasonably skilled with Python. I'm interested in learning to program the iPhone and iPod Touch, and now I have a MacBook that's a possibility that's open to me (note that this is pretty much for fun, I'm not one of these people who thinks they're going to write an iPhone app that everyone will buy, after all a year or so ago everyone was thinking the same about Facebook apps and now most people are pretty bored of them), so I've got Apress's Learn C on the Mac, Learn Objective-C on the Mac and Beginning iPhone Development. I wanted to learn C at some point anyway, partly because it's useful to learn it for other languages, and partly because it's pretty much required for any kind of serious Linux or Unix programming, so if I learn that (or, at least enough to get by), then learn Objective-C, then that'll stand me in good stead for learning how to use Cocoa and Cocoa Touch.

I also plan to learn Java and/or C# at some point since both languages are in demand, and I may do this after I finish my current course as the people I'm studying with offer courses in both of these.

OK, that's quite a lot on my plate, I know, but hey, ambition counts for a lot!

Wednesday, 25 February 2009

The Teenager Audio Test

Apparently people over 25 can't normally hear this, but I could at 30, and it was irritating! Pointless, but fun - see if you still have the hearing of a teenager!

Train Horns

Created by Train Horns

Wednesday, 11 February 2009

I really like today's Dilbert:
Dilbert.com
Enjoy!

Thursday, 15 January 2009

Ubuntu causes girl to drop out of college? Errr...

I expect by now most of you will have seen this article, about a young woman who bought a new Dell laptop, but for some reason got it with Ubuntu preinstalled, and was complaining that it had forced her to drop out of college.

My first thought was how? Dell's website doesn't exactly make show Ubuntu prominently, you really have to go searching round for it to find it. Also, it has a pretty big disclaimer saying that if you buy one of these computers, you won't be getting it with Windows. Dell certainly don't sneak it onto your computer.

Second, it's certainly not Ubuntu's or Dell's fault. If she'd bought a Mac, for example, the Verizon setup CD probably wouldn't work on that either - even now Macs aren't always well supported.

I don't really blame the girl, although she REALLY should have asked for help earlier, and not gone to the TV station! If she'd logged into the Ubuntu Forums plenty of people would have been willing to help. Hell, I would have been willing to help someone in that position myself, it's certainly not a terribly hard issue!

That girl represents the overwhelming majority of people who use computers for just surfing the net, emailing and writing a few documents. Ubuntu can perform very well in that role, however most Internet Service Providers are still very Windows-centric. I'm sure many Mac users experience these kinds of issues too. So getting broadband working using ISP-provided hardware and software in anything other than Windows can be an uphill struggle.

I guess the issue really here is more about ISP's than end users or operating systems. I truly despise the setup CD's used by most ISP's. Why install software you don't need to use? It's not hard to configure a broadband connection if someone just gives you the information you need.
Here's what I think ISP's need to do:
  1. Ditch those stupid USB DSL modems most ISP's use. On Windows you normally need to install a driver to use them, whereas Linux and Macs will generally either work straight away with them or won't work. A much better option is something that connects via Ethernet. As a general rule, it won't require any drivers to work on any OS you wish. More and more broadband packages include a wireless router, so just make this a decent Ethernet one rather than a USB one. If they don't need to install a driver, that's a whole step in the process gone, like that! Could cut down on tech support calls in one stroke.
  2. Ditch the automated configuration software and use a web interface. These are generally just as user-friendly, but don't require you to install anything. My D-Link wireless router has a web interface and I can configure it on my MacBook, or one of my Linux machines if I wish. If the ISP provides the router, make it one with a web interface, and have the setup instructions concentrate on that router, but provide information that's sufficient to cover any router. Also, what if people are going to be using the connection primarily with something other than a computer, such as a PlayStation 3? This way, no matter whether they use Windows, a Mac, Ubuntu, Slackware, Solaris, FreeBSD or a PS3, they can get online.
  3. Get rid of automated setup CD's for Internet connections. Every remotely user-friendly OS, Ubuntu included, has its own wizard for setting up an Internet connection. Give people the information they need to do it, and let them do it. I really think one of the reasons people have problems with computers is over-zealous hardware and software suppliers trying their best to hide every last little detail, even filling in a few numbers and ticking a few boxes.
I'm all for making things easy to use, but end users should not be spoon-fed. It makes more sense to me to give people the information they need and let them get on with it. Configuring a router via a web interface if you have all the information you need on a sheet of paper is no harder than filling in a form online, which anyone with half a brain can do. If you can join Facebook, you can configure your router if someone gives you the information you need.

Instead people get told to put in the CD, run it and attach the modem. They expect it to work straight away, and if it doesn't are lost, because every last detail has been hidden from them so they don't know where to turn next. If they have input those details themselves, they can go back and see if they have entered something wrongly.

I appreciate there are many people who don't want to learn the technical details. Fine, I don't want to force them to learn. But we should be trusting people to input a few details on their own, rather than pushing everything out of sight.

Wednesday, 14 January 2009

Unix commands work in Google!

Holy crap! Did you know you can use some Unix commands in Google? I just Googled the following:
ubuntu | grep icewm

and got a load of responses about Ubuntu, all mentioning IceWM! Now that is a SERIOUSLY useful tool, which I will be making very heavy use of indeed! Wonder what other Unix commands work in Google?

Sunday, 11 January 2009

A review of OpenSolaris 2008.11

I'm always willing to try new operating systems, and naturally it's a plus if they're free and open source. I like the Unix environment in general, and find that it better suits my needs than Windows.

So I guess it was inevitable that I was going to give OpenSolaris a try at some point. For the uninitiated, it's an open source operating system based on Sun's Solaris operating system, which is itself a version of Unix.

OpenSolaris feels very similar to popular Linux distros such as Ubuntu - it boots from the CD into a Gnome desktop with all the same applications as you'd expect to see in Ubuntu - Firefox, Thunderbird and Pidgin. OpenOffice isn't included by default, but is available from the repositories. This similarity is no accident - Sun hired Ian Murdock, founder of Debian, to help them create an official OpenSolaris distribution.

OpenSolaris's implementation of the Gnome desktop has to be the best I have ever seen. Check out this screenshot:



This shows the default theme, Nimbus. I prefer Dark Nimbus:



Compared to Ubuntu, the fonts that come by default are nicer, and no need to worry if you're brown-phobic too! It also includes Compiz by default.

As yet, OpenSolaris only offers the Gnome desktop. Not great if you prefer KDE like I do, but it does mean the whole thing is geared towards one desktop, making it a bit more uniform than most Linux distros - you won't find KDE apps that stand out like a sore thumb!

One downside is that compared to most Linux distros, OpenSolaris can be rather leisurely. It took several minutes to boot up in Virtualbox, and while the installer was no harder than Ubuntu's to use, it took a LOT longer. Installing new software was also very slow.

The graphical package manager is very similar to Ubuntu's Synaptic, and won't cause problems for anyone who's used to the idea of package management. However, OpenSolaris doesn't seem to have the sort of simple update manager that Ubuntu has.

One aspect that would no doubt come in very handy is the new Time Slider feature. Reminiscent of Apple's Time Machine, this feature allows you to automate backups in a simple user-friendly fashion. Sun's ZFS filesystem is undoubtedly extraordinarily powerful, and Time Slider makes it easy for the average user to use it.

This is Unix, so naturally there's a shell. While there was apparently a controversy over their selection of the bash shell, as used in Linux and OS X, over the Korn shell which is more often used in Solaris, I feel they made the right decision. Since bash will be familiar to people who use Linux or OS X, the two most prominent *nixes, it makes sense for them to adopt this.

I think for many people, OpenSolaris may be the open source operating system they have been waiting for. Some people do complain about the fact that there's no one company behind Linux and they get confused by the different distros. If so, OpenSolaris may well be the answer to their prayers. While there are other OpenSolaris "distros" such as Belenix, OpenSolaris is the official distribution. It offers an end-user experience that compares favourably with modern Linux distros. Also, the fact that it only supports Gnome so far means that it's consistent, although I personally would prefer to have the option of using KDE instead.

Also, Solaris is one of a number of operating systems that have been certified as real Unix. While as far as I know OpenSolaris has not been certified as this, it's based on the same code base as Solaris. So if you like your desktop Unix, but don't want to pay the premium for a Mac, you may want to consider this.

Sun have announced plans to offer OpenSolaris preinstalled on some Toshiba laptops. This is nothing short of astonishing considering how long people have waited for preinstalled Linux, and I guess that really shows how much difference one company's unwavering support can make.

If you're in the market for an open source operating system, OpenSolaris is well worth a try. This is only the second release, and it's really shaping up well. It still needs better driver support, and it could do with being faster, but I like what I've seen so far, and I look forward to following the fortunes of OpenSolaris over the next few years.

Saturday, 10 January 2009

Why the Budget All-in-One Desktop Will (NOT!) Fail

I just read an interesting post on Wired about the phenomenon of all-in-one desktop computers, built with laptop or netbook components (for example the Asus Eee Top). They point out that budget devices such as netbooks do well in poor economic conditions, and that compartmentalisation has proven acceptable in many Apple devices. However, they then go on to claim that these devices will fail because they're not mobile. Huh?

These devices aren't intended to be mobile! They're intended to be cheap and cheerful desktops that nonetheless look good. The fact is, great as netbooks are, you would NOT want to use one as your primary computer, unless you used it for only a few minutes a day. For a price that's not much more than a netbook, these devices offer a full-sized screen and keyboard. And I don't know about anyone else, but I find I'm often more productive on a desktop than a laptop for tasks that require you to spend long lengths of time typing, such as coding. An ergonomic desktop will always be more effective for that kind of task than a laptop which is designed for mobility.

Furthermore, they're missing the point. These are affordable, stylish devices for the ordinary user, rather than the type of user who reads Wired. They don't actually need to be that powerful. Here's what the ordinary user tends to use their computer for:
  • Web browsing (typically Facebook or another social network, eBay, maybe Flickr etc, and sometimes buy something online)
  • Email
  • Instant messaging
  • Writing letters
  • Sync their iPod
And that's pretty much it. These machines will perform fine for this kind of task. Ultimately they are designed for people who use their computer primarily as a portal to the Internet.

I suspect the Wired writer may have fallen into the "power user trap". Just because a power user wouldn't necessarily find it a good deal doesn't mean everyone else would feel the same way. These are ideal computers for the following uses:
  • A child's computer (I believe strongly that children should have their own computer if possible, it encourages them to tinker with it in a way you wouldn't want them to do if they had to share the family computer)
  • For elderly relatives.
  • People who just want to surf the net etc
  • A first computer for almost anyone
They compared it to the iMac. Well, that's a far more expensive computer, so you'd expect it to have a lot more features. No-one would consider these as an alternative to the iMac, nor would they consider the iMac as an alternative to these.

In fact, I've been considering buying some kind of small form factor desktop myself, because I really don't have the room for a full-sized desktop, but I really could do with that kind of productivity boost. I have had back problems caused by using a laptop in the past, and also have occasionally suffered from RSI, so a desktop might work better for me as my main computer. I'm not much of a PC gamer, and I prefer Linux to Windows or OS X so I can get by with a machine that isn't very powerful - just use a minimal window manager like Fluxbox.

There's several options - one of these net-tops like an Eee Top, a Mini-ITX machine (has the advantage that it comes without an OS so I could just install a Linux distro of my choice), an Eee Box, or a Mac Mini. If Apple had actually updated the Mac Mini like they were rumoured to have done then I might well have gone for that as I already have a mouse and keyboard I could use, I'd just need to buy a display for it (although I strongly suspect that a Mac Mini refresh is on the cards at some point later this year, maybe when Snow Leopard is released, and if I hadn't got a desktop by that point a refreshed Mini with Snow Leopard would be a strong contender). So either the Mini-ITX or Eee Box might work well for me.

So, in my opinion the phenomenon of the budget All-in-one desktop will not fail, because it's targeted at ordinary users, and it's often hard for power users to appreciate what people like that want.