Wednesday, 12 December 2012

Programming In Python 1: The Cookbook Project

Finally it's finished! Well as finished as it'll ever be. Almost a year a go I started learning Python, the programming language on and off. Which really isn't an ideal way to learn.

As with anything we want to learn in life I needed source materials, examples and exercises to complete. I found these in the Ubuntu orientated on-line magazine Full Circle. One of the early tutorials dives straight into writing a simple program that creates, loads and updates a database of cooking recipes.

The data in the database in this exercise isn't particularly important. It's the lessons learnt in writing the program that creates and manipulates the database. And fortunately Python is a very rich language with a lot of additional modules that can be called upon to enhance the power of software written in Python.

Personally I don't think what I've produced is particularly impressive. But it's where I'm at. For example I really should be making better use of Python's class objects. I guess I still have some habits from learning COMAL and Turbo Pascal bouncing around in my brain getting in the way. I guess I can only get better right?

With some basic concepts learnt, the next challenge is to create a program that will win me the lottery. On the off chance anybody is interested I've included my source code below.

#!/usr/bin/env python
#------------------------------------------------------------------------------
#
#    Program Title    :    Cookbook Database
#    Local Filename    :    sql-0004-cookbook_database.py
#    Author            :    Kevin Lynch
#    Created            :    04.06.2012
#
#------------------------------------------------------------------------------
#
#    Brief:    Write a program capable of storing recipes for later retrival.
#
#                * The program should be menu driven.
#                * Include a search function allowing users to search by;
#                    + Recipe title,
#                    + Author,
#                    + Ingredients.
#
#                * The program should also be capable of creating new cookbooks.
#                * Adding new recipe entries to each relevant book on demand.
#                * Removing unwanted entries from a book on demand.
#                * Program output and interaction prompts must be presentable.
#
#------------------------------------------------------------------------------
#
#    Additional Credits:
#
#        This project is based on the Python tutorials published by
#        Full Circle Magazine. So far as this author can tell the original
#        "cookbook" tutorial was written by Greg Walters of
#        "RainyDay Solutions, LLC" and "www.thedesignatedgeek.com".
#
#        Terminal dimensions code courtisy of Grant Edwards.
#        http://bytes.com/topic/python/answers/607757-getting-terminal-display-size
#
#------------------------------------------------------------------------------
#--|    Import Modules    |----------------------------------------------------

import os
import apsw # SQLite wrapper.
import string
#import webbrowser
import termios, fcntl, struct, sys

#------------------------------------------------------------------------------
#--|    Class/Object Definition Section    |-----------------------------------
class aScreen():
    def __init__(self,aTitle,aBorder,aJustify,aMessage,aContent,aOptionlist):
#        Get Dimentions
        s = struct.pack("HHHH", 0, 0, 0, 0)
        fd_stdout = sys.stdout.fileno()
        x = fcntl.ioctl(fd_stdout, termios.TIOCGWINSZ, s)
#        print '(rows, cols, x pixels, y pixels) =',
#        print struct.unpack("HHHH", x)
#        return struct.unpack("HHHH", x)
        s = struct.unpack("HHHH", x)

        self.iDefault = 'Press "Q" to quit <::> '

        self.H = (s[0] - 6)
        self.W = s[1]
        self.J = aJustify # Tells the aScreen object which type of justification to use.
        self.T = aTitle
        self.B = (aBorder * self.W)
        self.P = 1
        self.M = aMessage # Should be a short single line instruction.
        self.C = aContent # Should be a list. Each list entry will correspond to a line in the terminal.
        self.O = aOptionlist # List of valid responses for this screen.

    def checkLine(line):
        pass

    def formatScreen(self):    # Formats the screen output. Works for showScreen() and should not be called directly.
        # Initialise screen segmentation.
        seg1 = [self.T,self.B,' ']
        seg2 = []
        seg3 = [' ',self.B]
        lines = []

        # Copy charcaters one at a time from self.C to creat a string of a maximum length of self.W - self.P
        if len(self.C) < self.H:
            j = len(self.C)
        else:
            j = self.H

        for i in range(0,j):
            line = self.C[i]
            if len(line) < self.W:
                seg2.append(' %s' % line)
            else:
                j = (self.W - self.P)
                while len(line) >= self.W:
                    if line[j] == ' ':
                        seg2.append(' %s' % line[0:j])   
                        line = line[(j + 1):len(line)]
                        i += 1
                    else:
                        j -= 1
                seg2.append(' %s' % line)
                i += 1

        # Add filler lines.
        if len(seg2) < self.H:
            for i in range(len(seg2),self.H):
                seg2.append(' ')

        # Add everything to one big list.
        for i in range(0,len(seg1)):
            lines.append(seg1[i])
        for i in range(0,len(seg2)):
            lines.append(seg2[i])
        for i in range(0,len(seg3)):
            lines.append(seg3[i])
        return lines

    def errorScreen(self):
        pass

    def showScreen(self): # Displays the current screen.
        loop = True
        lines = self.formatScreen()
        while loop == True:
            # Print the title, main body and borders of the screen.
            for i in range(0,len(lines)):
                print lines[i]
            # Prompt the user for input from the keyboard and verify the response.
            kbd = raw_input(self.M)
            for i in range(0,len(self.O)):
                if kbd == self.O[i]:
                    loop = False
                elif self.O[0] == 'pass':
                    loop = False
                else:
                    self.errorScreen() # When an invalid option is made the user is told.
        return kbd

class newRecord():
    def __init__(self): # Initialise the new recipe class.
        # Variables for Recipes table.
        self.name = ''
        self.servings = 0
        self.source = ''
        # Variables for Instructions table.
        self.instructions = ''
        # Variables for Ingredients table.
        self.ingredients = []
        # General variables needed for this record.
        self.recID = 0

class newDB():
    def __init__(self,dbname): # Initialise the Cookbook class.
        global connection
        global cursor
        self.totalcount = 0
        connection = apsw.Connection(dbname)
#        connection = apsw.Connection("cookbook1.db3")
        cursor = connection.cursor()

    def addRec(self,rec):
        sql = 'INSERT INTO Recipes (name,servings,source) VALUES ("%s",%s,"%s")' % (rec.name,str(rec.servings),rec.source)
        cursor.execute(sql)
        sql = "SELECT last_insert_rowid()"
        cursor.execute(sql)
        for x in cursor.execute(sql):
            rec.recID = x[0]
        sql = 'INSERT INTO Instructions (recipeID,instructions) VALUES (%s,"%s")' % (rec.recID,rec.instructions)
        cursor.execute(sql)
        for x in range(0,(len(rec.ingredients) - 1)):
            sql = 'INSERT INTO Ingredients (recipeID,ingredients) VALUES (%s,"%s")' % (rec.recID,rec.ingredients[x])
            cursor.execute(sql)

    def deleteRec(self,rid):
        sql = "DELETE FROM Recipes WHERE pkID = %s" % rid
        cursor.execute(sql)
        sql = "DELETE FROM Instructions WHERE recipeID = %s" % rid
        cursor.execute(sql)
        sql = "DELETE FROM Ingredients WHERE recipeID = %s" % rid
        cursor.execute(sql)
       
    def listAll(self): # Create a list of all recipes.
        res = ['%s %s %s %s' % ('Item'.rjust(6),'Name'.ljust(30),'Serves'.ljust(7),'Source'.ljust(30))]
        for x in cursor.execute('SELECT * FROM Recipes'):
            res.append('%s %s %s %s' % (str(x[0]).rjust(6),x[1].ljust(30),x[2].ljust(7),x[3].ljust(30)))
        return res

    def listOne(self,rec):
        sql = 'SELECT * FROM Recipes WHERE pkID = %d' % rec.recID
        for x in cursor.execute(sql):
            rec.recID = x[0]
            rec.name = x[1]
            rec.servings = x[2]
            rec.source = x[3]
        sql = 'SELECT * FROM Ingredients WHERE RecipeID = %s' % rec.recID
        for x in cursor.execute(sql):
            rec.ingredients.append(x[1])
        sql = 'SELECT * FROM Instructions WHERE RecipeID = %s' % rec.recID
        for x in cursor.execute(sql):
            rec.instructions = x[1]
        return rec

    def searchDB(self,sql,option):
        try:
            if option != '3':
                # Do search for options 1 and 2
                res = ['%s %s %s %s' % ('Item'.ljust(5),'Name'.ljust(30),'Serves'.ljust(6),'Source'.ljust(30))]
                for x in cursor.execute(sql):
                    res.append('%s %s %s %s' % (str(x[0]).rjust(5),x[1].ljust(30),x[3].ljust(20),x[2].ljust(30)))                   
            else:
                # Do search for option 3
                res = ['%s %s %s %s %s' % ('Item'.rjust(5),'Name'.ljust(30),'Serves'.ljust(6),'Source'.ljust(25),'Ingredient'.ljust(50))]
                for x in cursor.execute(sql):
                    res.append('%s %s %s %s %s' % (str(x[0]).rjust(5),x[1].ljust(30),x[2].ljust(6),x[3].ljust(25),x[4].ljust(50)))
        except:
            # Catch exception.
            res ['I have encountered a problem performing your search request!']

        return res
#------------------------------------------------------------------------------
#--|    Function Definition Section    |---------------------------------------
def LAR(db,title,message): # List all recipes in the database.
    c = db.listAll()
    lars = aScreen(title,'*','',message,c,['pass'])
    kbd = lars.showScreen()
    return kbd

def SAR(db,kbd): #Show a single recipe.
    # Show list of recipes to select from.
    if kbd == 'pass':
        kbd = LAR(db,'The Cookbook Project > Select A Recipe','Press "Q" to quit or make a selection <: br="br">    # Retrieve the choosen recipe from the database.
    elif kbd.isdigit() == True:
        rec = newRecord()
        rec.recID = int(kbd)
        rec = db.listOne(rec)
        # Display the results.
        c = [rec.name,' ','Preperation Steps:',rec.instructions,' ','Ingredients:']
        for x in range(0,len(rec.ingredients)):
            c.append(rec.ingredients[x])
        c.append(' ')
        c.append('Serves: %s' % str(rec.servings))
        c.append(' ')
        c.append('Written by %s' % rec.source)
        sars = aScreen('The Cookbook Project','*','','Press any key to continue <: br="br" c="c" pass="pass">        kbd = sars.showScreen()
    elif kbd == 'delete':
        kbd = LAR(db,'The Cookbook Project > Select A Recipe For DELETION!','Press "Q" to quit or make a selection <: br="br">        return kbd

def SRD(db): # Search for a recipe.
    # Determine search criteria.
    SRDS = aScreen('Search Database','*','pass','Press "Q" to quit or make a selection :> ',['Search by ...','1 - Recipe Name','2 - Author','3 - Ingredients'],['1','2','3','Q'])
    SRDSa = aScreen('Search Database By Recipe Name','*','pass',':> ',['What is the name of the recipie you would like to search for?'],['pass'])   
    SRDSb = aScreen('Search Database By Author','*','pass',':> ',['Who would you like to search for?'],['pass'])   
    SRDSc = aScreen('Search Database By Ingredients','*','pass',':> ',['Which ingredients would you like to search for?'],['pass'])   
    kbd = SRDS.showScreen()
    rec = newRecord()
    if kbd != 'Q':
        if kbd != '3':
            if kbd == '1':
                kbd = SRDSa.showScreen()
                sql = "SELECT pkID,name,source,servings FROM Recipes WHERE name LIKE '%%%s%%'" % kbd
                res = db.searchDB(sql,'pass')
            else:
                kbd = SRDSa.showScreen()
                sql = "SELECT pkID,name,source,servings FROM Recipes WHERE source LIKE '%%%s%%'" % kbd
                res = db.searchDB(sql,'pass')
        else:
            kbd = SRDSa.showScreen()
            sql = "SELECT r.pkID,r.name,r.servings,r.source,i.ingredients FROM Recipes r LEFT JOIN Ingredients i ON (r.pkID == i.recipeID) WHERE i.ingredients LIKE '%%%s%%' GROUP BY r.pkID" % kbd
            res = db.searchDB(sql,'3')

        SRDS = aScreen('Search Results','*','pass','Press "Q" to quit or make a selection :> ',res,['pass'])
        kbd = SRDS.showScreen()
        SAR(db,kbd)

def ARD(db): #Add a recipe to the database.
    nr = newRecord()
    screen = aScreen('Add A New Recipe','*','pass','Please enter the title of your recipe or press "Q" to quit :> ',[''],['pass'])
    nr.name = screen.showScreen()
    screen = aScreen('Add A New Recipe','*','pass','Please enter how many your recipe serves or press "Q" to quit :> ',[nr.name],['pass'])
    nr.servings = screen.showScreen()
    screen = aScreen('Add A New Recipe','*','pass','Please enter the name of the author of your recipe or press "Q" to quit :> ',[nr.name,'Serves %s' % nr.servings],['pass'])
    nr.source = screen.showScreen()
    screen = aScreen('Add A New Recipe','*','pass','Please enter the ingredients for your recipe or press "N" to move on :> ',[nr.name,'Serves %s' % nr.servings,'Written by %s' % nr.source],['pass'])
    kbd = screen.showScreen()
    loop = True
    while loop == True:
        if kbd == 'N':
            loop = False
        else:
            nr.ingredients.append(kbd)
            screen = aScreen('Add A New Recipe','*','pass','Please enter the ingredients for your recipe or press "N" to move on :> ',[nr.name,'Serves %s' % nr.servings,'Written by %s' % nr.source,' ','Ingredients'] + nr.ingredients,['pass'])
            kbd = screen.showScreen()
    screen = aScreen('Add A New Recipe','*','pass','Please provide instructions for prepairing your recipe or press "Q" to quit :> ',[nr.name,'Serves %s' % nr.servings,'Written by %s' % nr.source,' ','Ingredients'] + nr.ingredients,['pass'])
    nr.instructions = screen.showScreen()
    screen = aScreen('Add A New Recipe','*','pass','Do you wish to save this recipe? Press "Y" for YES and "N" for NO :> ',[nr.name,'Serves %s' % nr.servings,'Written by %s' % nr.source,' ','Ingredients'] + nr.ingredients + [' ','Preperation Instructions',nr.instructions],['pass'])
    kbd = screen.showScreen()
    # Now write all data to the database
    if kbd == 'Y':
        db.addRec(nr)

def DRD(db):
    screen = aScreen('Add A New Recipe','*','pass','Do you wish to continue? Press "Y" for YES and "N" for NO :> ',['WARNING!!! This section is for deleting recipes from your data base. This operation cannot be undone!'],['pass'])
    kbd = screen.showScreen()
    if kbd == 'Y':
        kbd = SAR(db,'delete')
        if kbd.isdigit() == True:
            db.deleteRec(kbd)

def mainLoop(dbname):
    db = newDB(dbname)
    t = 'The Cook Book Project > Main Menu'
    m = 'Press "Q" to quit or make a selection <: br="br">    o = ['Q','A','B','C','D','E']
    c = ['A - List All Recipes','B - Select A Recipe','C - Search Recipe Database',' ','D - "ADD" A New Recipe','E - "DELETE" A Recipe']
    mLscreen = aScreen(t,'*','pass',m,c,o)
    loop = True
    while loop == True: # Show the main menu until a valid option is selected.
        kbd = mLscreen.showScreen()
        if kbd == 'Q':
            loop = False
        elif kbd == 'A':
            # List all the recipes in the database.
            kbd = LAR(db,'The Cookbook Project > List All Records','Press any key to continue <: br="br">        elif kbd == 'B':
            # Select a recpie.
            SAR(db,'pass')
        elif kbd == 'C':
            # Search the data base.
            SRD(db)
        elif kbd == 'D':
            # Add a recipe.
            ARD(db)
        elif kbd == 'E':
            # Delete a recipe.
            DRD(db)
#------------------------------------------------------------------------------
#--|    Main Program    |------------------------------------------------------
# Title screen. Database file name will be asked for here.
intro = ['Welcome To The Cookbook Project','please enter the file name of your cookbook.']
title = aScreen('The Cookbook Project','*','pass','Press "Q" to quit or enter a file name <: br="br" intro="intro" pass="pass">dbname = title.showScreen()
# Main program loop.
if dbname != 'Q':
    if dbname == '':
        dbname ='cookbook1.db3' # This is a stub.
        mainLoop(dbname)
    else:
        mainLoop(dbname)

# Credits screen.
intro = ['The Cookbook Project Software.','Written by Kevin Lynch',' ','Original tutorial published by Full Circle Magazine.','Original code written by Greg Walters','Rainyday Solutions, LLC,','www.thedesignatedgeek.com',' ','Terminal dimentions detection by Grant Edwards']
title = aScreen(' ','*','centered','Press any key to quit <: br="br" intro="intro" pass="pass">dbname = title.showScreen()

Saturday, 13 October 2012

Ubuntu Tip: Using Quickly To Build Applications - Basic Commands

What is Quickly?
Basically it's a command line based tool for building applications. So go ahead and open a terminal. Now it will be useful if you're familiar with the Python programming language. If you're not then there are tones of on-line resources to help you learn.

How to create a new application:
Type: quickly create ubuntu-application mybrowser

Quickly will create a directory with the same name as your application containing all it's files.

How to edit your application:
In the applications directory type: quickly edit

How to edit the GUI:
In the applications directory type: quickly design

How to run your application:
In the applications directory type: quickly run

How to package your application:
In the applications directory type: quickly package


You might also want to watch this video. It will take you through the development of a very basic web browser application.

Sunday, 5 February 2012

Linux Is Not A Viable OS

Pageviews by OS 7 Jan 2012 - 5 Feb 2012
I just came across two comments in an idea on Dell's IdeaStorm claiming Linux is not a viable OS or some nonsense. Frankly I was gob-smacked to learn there are still some people promoting this FUD. So much so in fact I was moved to write quite a lengthy rant and then repost it here. Frankly if this stuff is still doing the rounds and people are actually believing it then we're not doing enough to get the message out that Linux currently dominates the OS market in it's many forms. It has a presence in virtually every device market pigeon hole. And it's the top contender in most. If you are a Linux user and Dell customer using Linux on Dell hardware then get your arse on IdeaStorm and tell Dell you want Linux!

That was the short version. Below is the long version I posted on IdeaStorm.

Linux is not a serious contender in the OS market? This is the sort of FUD and ignorance that keeps consumers away from Linux. Linux is very much a contender in the OS market. Which is why Microsoft lists desktop Linux as a threat to it's desktop Windows in it's tax returns. When netbooks first appeared Linux was such a massive threat to Microsoft it had to literally give Windows XP away for free and extend it's shelf life because Vista wouldn't run on a netbook.

If you have a WiFi router, DVR, DVD player, smart TV, satellite set top box, cable set top box or any number of other devices in your home then the chances are it's running either a Linux or BSD based OS.

Android/Linux smart phone deployments dwarf all others in the smart phone market. Even Apple's iPhone is dwarfed by Android when all Android distributors are counted as one. And Windows Phone 7? Hardly a blip on the radar.

It's true all manner of malware exists for Linux. However Linux has a different approach to dealing with malware. Yes the people sticking their heads in the sand are not helpful. Linux does have anti-malware software built right into the kernel. It's call Apparmor. It works a bit more like a white list of software rather than the black list Windows anti-virus vendors try to use. This is used in combination with community vigilance. One of the great advantages of Free and Open Source Software is the community gets to see the source code. It can be inspected so the community can determine what it does. So additional anti-virus software on Linux is generally speaking not needed.

With the black list approach you'll always be step behind. And that's just not good enough.

So far as the average office worker or home user is concerned GNU/Linux has all the bases covered when it comes to application software. There are more web browsers, e-mail clients and office productivity sweets than you can swing a cat at. And many of these applications are also available for Windows as well. So migration needn't be a harsh experience.

It's true more specialist bespoke software is not available off the shelf. However that's true of all OS platforms. The clue is in the "bespoke software" part. The Microsoft way is to tell people to use their OS and applications stack no matter what. And indeed Microsoft channel partners follow this mantra. Religiously sometimes. However it is very bad practice to shoehorn every business into the same mould. This is in fact the primary reason why malware is such a massive problem for Windows.

When building bespoke systems it is better to assess the clients actual needs and serve those needs first. When that approach is adopted. FOSS tends to win. Hence the reason why many of the worlds stock exchanges have switched to GNU/Linux. Hence the reason why US drones now run on Linux instead of Windows which could not be properly secured against malware. Hence the reason why many EU government agencies are switching to GNU/Linux and why GNU/Linux is so popular in South America. Hence the reason why something on the order of the top 40 of the worlds most powerful super computers are running GNU/Linux and why most of the top 500 are running GNU/Linux.

And then there is the tablet market. Which very closely resembles the smart phone market. ARM based devices running Android/Linux.

At this stage in the game anybody claiming Linux is not a viable contender is just delusional. The last market Linux has left to conquer is the desktop. Which is ironically becoming less relevant every year if the pundits are right. The only market where Windows has a strangle hold is the desktop/laptop market. Linux is slowly gaining ground. Microsoft is slowly losing.
Pageviews by Browser 7 Jan 2010 - 5 Feb 2012

Interested In Linux? Here are a few resources.

Incidentally if you're using Google or Facebook. You're a Linux user already. Something to think about people.

Wednesday, 7 December 2011

CarrierIQ - FOSS Wouldn't Have Stopped It!

There seems to be quite a bit of fuss going on around this whole CarrierIQ business. Specifically there seems to be some sort of misconception that a fully open source operating system would have some how prevented CarrierIQ from being used. What complete and utter nonsense. Lets consider how this software was discovered.

This thing was detected by security researchers. How many smart phone users out there are security researchers? How many smartphone users out there in the real world actually care what diagnostic software is installed on their "phone"? And now that we know about CarrierIQ, how many Android or Apple smartphone owners are going to do anything to remove it? Almost none is the answer to all questions. Just a teeny tiny minority of people using these devices understands the inner workings enough to even think to look for this sort of activity.

In deed one of the security researchers who discovered CarrierIQ, only found it because he was tracking down the source of some data packets moving across his companies networks that shouldn't have been there. The implication being if he hadn't noticed the rouge data packets. He wouldn't have found CarrierIQ.

Now lets consider how a fully open source OS would have helped. Could Google have reasonably stopped HTC, Samsung or Motorola from installing CarrierIQ? It's doubtful. If Google aren't involved in the installation of this rootkit then I see no way they could have stopped it. Even if it had been installed as a standard default app. Most people still wouldn't have noticed it. And even if they did. They likely wouldn't have done anything about it. The description would have read something like, "Reports performance metrics back to manufacturer for support purposes". Most folks would like then have considered it a necessary technical component and left it well alone. I mean I let my Ubuntu desktop report back to Canonical.

So in the end CarrierIQ would still be there. Most people would do nothing about it. As they are doing now.

If Google had created their own performance monitoring software could they have stopped this? Well no. Android is open source or at least mostly open source. And as with most general purpose operating systems today, Android is modular. That means any component can be changed out for an alternative part by those who have the know-how and will to do so. So Samsung and HTC could still be spying on you.

There is also another issue to look at. Data security on a network. How does open source software protect your data against monitoring once it leaves your phone? The phone companies know who their customers are and who's calling who, who's texting what etc. And it's not just the phone companies. Go talk about any subject or product on Facebook and then watch as the adverts you're served up on web pages match exactly what you were discussing ten minutes ago.

So what exactly is the fuss about? Are people still under the illusion they have some sort of privacy left in this world? Privacy died when the art of "data-mining" was discovered.

....

Just one more thing before the lights go out. I noticed a few folks crowing about how Windows Phone 7 devices don't have this rootkit. Well no they don't it seems however who needs a rootkit to ruin your day when Microsoft are involved. Sidkick, Office 365/BPOS, Windows, Xbox malware. Enough said.

Saturday, 29 October 2011

Users Don't Know What They Want

I was reading this article which quoted a comment by Richard Hughes. "User don't know what they want". Well excuse me for being to retarded to write an advanced GUI desktop on my own. But I can choose what to eat for breakfast in the morning. I manage to dress myself. Go out to work. Make it through the day and get home safely. All on my own.

When I bought my current PC. A Dell Dimension XPS 700. I did that on my own as well. I even paid for it. With a credit card. When I decided to make the move to GNU/Linux full time. I decided on my own to do it in stages. The first thing was selecting a GNU/Linux distribution. I experimented with Fedora and openSuSE. Then discovered Ubuntu. Now since I was using the hybrid hardware/software RAID array built into the 700 series system board the installation of a Linux based OS back then wasn't straightforward. Dmraid wasn't installed or configured by default on any of the distros I tried. And that's actually part of what drove my decision to go with Ubuntu.


Being stupid, I couldn't get dmraid working in either Fedora or openSuSE. Both distros use RPMs. Back then RPM hell was a term many people came to know. Basically there were dependency issues. Ubuntu with it's debs was better organised. No dependency issues. Although configuration was still a problem. But with a little research into the Ubuntu documentation I found what I needed to get it all up and running. Which meant I could now dual boot. Until that point I had been boot Linux from a USB drive.

So I'm not smart enough to write my own version of Gnome. I am smart enough though to know how to problem solve. How to make decisions. I know what works for me and what doesn't. Windows XP with all it's issues and problems wasn't working for me any more. So I made the sensible decision to find an alternative. What do you think I'll do now that Gnome doesn't do the things I want it to do? Maybe I'll find an alternative. It would seem to be the sensible thing to do.

When ever a software developer, a programmer makes a comment like "users don't know what they want". It's a clear sign something is going very wrong in that software project. Which reminds me of another comment I read once in a article. Linus Torvalds once said something like "he who writes the code gets to decide". Meaning ultimately programmers participating in free open source software projects are the ones who decide which features to include and which features to drop. Which is fine. Until that is the software you are writing targets a user group beyond other programmers. And that's what desktop environments do.

Kernel developers like Linus Torvalds have a certain luxury of rarely having to interact with desktop users. The concerns of the desktop user are rarely the concerns of the kernel developers. In a sense what kernel developers do is invisible to desktop users. So we desktop users don't complain very often when they drop or replace features. Desktop developers however don't have that luxury. As Canonical/Ubuntu and KDE found out. Gnome should be learning lessons from these two groups.

When KDE 4.x series was released there was uproar. The majority of users hated it. Some of there anger was squarely targeted at being hit with the unfamiliar. The very same issue we have to overcome to get people to use a GNU/Linux based OS in the first place. Anybody would think we'd know better. Right? A lot of the anger however was squarely down to the fact KDE had changed things too much. Now so far as I know, KDE developers aren't known for being polite about people who criticise their work. But after all the bitching was done they knuckled down and started fixing the things people were complaining about. As a result KDE is now a more pleasant desktop environment to use with some pretty cool features. Everybody's a winner!

Canonical has experienced similar anger spat in their direction for daring to force Unity on it's user base. Unity started life as the interface to Ubuntu Netbook Remix. And it's not hard to see why Canonical would think Unity would work well on a netbook. Small displays means you have to be economical with the display. Low powered CPUs meant not much was being done by way of multitasking. But on a desktop? These just aren't considerations that are any where near the top of the list of all the things to be considered. However Canonical would not be deterred. It rolled out Unity.

Most people say Unity was rolled out too soon. It wasn't finished. And indeed they say the same of Gnome Shell. Rather than bitching or insulting it's user base though, Canonical it seems would rather just make Unity better. 11.04 delivered a stale turd of a GUI. With 11.10 Unity was now running atop the new and improved Gnome 3.x. They fixed some of the annoyances. Made the dash useful. 12.04 will focus more on stability and polish. Basically KDE and Canonical listened to their user base. And because they listened they could fix the problems that were pissing people off.

Listening and understanding users is the most important thing a developer working in the user space can do. If your not writing software people want to use then your playing to an empty house. I'd hate to see the Gnome Foundation playing to an empty house. Gnome has been good to me over the years. It's been relatively hassle free. Simple and easy to use and configure. It's developers need to respect the users and listen to what they are telling them.

It would be a shame to see Gnome implode and be crushed by the weight of it's own foot print. There are plenty of alternatives. LXDE, XFCE, KDE and Unity to name but a few.

Wednesday, 28 September 2011

The Nature of Metro?

A few posts back I theorised Metro was either just a new skin for IE and a tieling mode for Windows window manager. Well here's the proof.

http://www.techrepublic.com/blog/window-on-windows/tweak-windows-8-to-remove-the-metro-interface/5077?tag=nl.e101

The registry hack to switch off Metro and restore the Windows 7 task bar with start menu has already been found. Microsoft should just be distributing this as a service pack or add-on of some kind. Not a whole new OS.

Sunday, 25 September 2011

Ubuntu Natty and Unity - Update

The stability gained from removing MediaTomb and disabling the screen saver is short lived. So Boinc is going to have to go. Although I suspect Unity is the real culprit. I've seen some reports that 11.10 Beta 2 is quite good. I might just go a head and install that. Or I could ditch Unity completely. Set up the Gnome 3 PPA and install Gnome Shell/Gnome 3. Alternatively I could go with KDE or LXDE.

I could of course simply ditch Ubuntu and opt for Fedora or Debian. I mean it's not like I'm a total newbie dependant on Canonical doing everything for me. I've had bad experiences with distros in the past that used RPMs. So Debian might be more up my street. It is after all what Ubuntu is based on.

Microsoft Sponsored FUD?

Well here's an unexpected blast from the past. Which looks like Microsoft sponsored FUD. Windows Phone 7 suddenly gets some press coverage when everybody else had written it off and considered it a dead end. Just like Sidekick and Kin. So why is cnet suddenly covering Windows Phone 7 now?

Well unless you've been living in a cave you can't have failed to notice the Windows 8 hype machine starting to roll. The thing about this article that sparks suspicion other than the coverage of a virtually dead and buried mobile platform is that it quotes a study. A study which claimed the majority of the smart phone owning public are considering an Android based device. But yet the author chooses to focus on the Windows Phone 7 numbers? Why? Reads like FUD and propaganda to me.


Saturday, 24 September 2011

Windows 8 and UEFI

I generally consider Windows 8 to be vapourware. There's no actual proper working copy of it yet. Although we do now know there is at least a developer version. Which Microsoft showed off recently. Which in turn led to much fan fair and excitement in some corners around the new Metro interface and it's Metro Apps. And I admit Metro does look good. So where's the catch?

Well firstly from what I can figure out, Metro is actually a new look IE designed to work with HTML5 apps wrapped up in an application wrapper. Which is actually how many Android and iOS apps are built. So nothing new there. Metro is basically a gimick. And gimicks are used to distract peoples attention from the small print. So what's in the small print of Windows 8?

UEFI is! UEFI is the proposed successor to the ageing BIOS. Microsoft is requireing that all OEMs and system builders participating in the Windows 8 logo program have a particular feature of UEFI enabled. This feature basically locks down the system so that it will only run approved OSs that have been signed with special security keys. Which isn't a problem if you're happy to just accept whatever Microsoft offer you.

It is however a problem if you like to tinker with your hardware. Remember you pay for the hardware. You own it. Hardware is not licensed unlike software. So surely it should be up to you what OS you choose to run? Well if Microsoft has it's way and OEMs ship their PCs with this new UEFI feature enabled, tinkers will no longer be able to use main stream OEM hardware.

UEFI with it's cripple ware feature enabled will require any OS you choose to install to be signed with those special "security" keys. Which poses problems for OSs like GNU/Linux and FreeBSD. It'll also create problems for project like the Haiku OS. A free open source version of the now dead BeOS. Developers of these operating systems would need to get every OEM to sign their OSs.

Which means at the end of the day UEFI basically excludes homebrew OS from being developed and run on mainstream hardware. Some people think this might violate EU competition rules.  I don't know how true that is. What I do know however is that this makes me think Microsoft are getting really desperate and resorting to some of Apple's dirty tricks to protect their monopoly. Apple use a similar feature of EFI to lock OS X down to Apple hardware.

http://www.uefi.org/home

http://www.theregister.co.uk/2011/09/21/secure_boot_firmware_linux_exclusion_fears/

Monday, 19 September 2011

Ubuntu Natty and Unity - Update

Just a quick up date. So no screensaver enabled, no MediaTomb and guess what? No crashing.The PCs been running all night quietly crunching numbers with Boinc. And it's still usable the next day. The system monitor does show one "zombie" process though, zeitgeits-datah. I'll need to do more research on that. But whatever it is. It's not stopping things from running smoothly.

Sunday, 18 September 2011

How Much Is Gizmodo Paid For Fud?


A few articles on Gizmodo have caught my eye recently. Basically in all of them they manage to mention Apple in a favourable light, support Windows 8 and bash Android or Google. Quite an interesting turn of events. Normally I'd comment on these articles in the sites comment's section. But due to Gizmodo's bizarre commenting rules I'm not allowed to comment there. So I'll do it here.

The first article that comes to mind is “Google SMASH: Why No Industry Is Safe” by Roberto Baldwin. This arrived in my in box on the 14/09/2011. The basic premiss of the article seems to be that because Google are so incredibly good at delivering what Internet users actually want. They shouldn't be allowed to compete at all. Much fuss is made about how Google have crashed everybody else's party and are playing in all of their backyards.

Which is true enough. Google were not the first kid on the block to offer webmail, on-line searchable maps or indeed many other services that Google offers. Including web searches by the way. Yahoo, Altavista, AOL and many others were around long before Google as Google was around long before Microsoft's Bing. Of course Roberto has no problem with Microsoft trying to crash in on the web and seemingly no issue with Apple's iPod. Apple weren't the first to produce an MP3 player. Remember the Diamond Multimedia Rio?

One of the specific issues Roberto has with Google is they make things easy for people to use and do. The example quoted is Google's new Flight Search feature. Google have made it easier to use than the competitions web site. So clearly Google are bad. Right? Well wrong actually. That's the nature of innovation and competition.

Company produces a service or product. Company B sees issues with that service or product and decides it can do a better job. If company B succeeds in the implementation and execution then company B wins and keeps the lions share of the market until company A comes up with an answer. In this way companies are forced to continue to develop better products and the consumer always has a choice. So why are Google being demonised here? They've done what every commercial entity is supposed to do. Compete!

Other examples given in the article include MapQuest, Firefox, Hotmail and Yahoo Mail. In every instance Google came to market with a better offering. The comment about Hotmail and Yahoo Mail stuck me as being particularly odd.

“Hotmail and Yahoo mail? Totally respectable providers—until Gmail. When Gmail beta launched in 2004, it offered a full 1GB of storage, compared to the paltry 2MB-4MB offered by other email services at the time. Now all a Hotmail handle's good for is a punchline.”

First off all Google have done here is offer a better product. Nothing about what Google has done should have suddenly made Hotmail or Yahoo Mail suddenly some how “evil” as opposed to “respectable”. Many Roberto was talking about “respectable” in the other sense? Meaning they were perfectly good products. Well no they weren't. 2MB-4MB even in 2004 was incredibly limiting when you started adding attachments to e-mails. Just one or two e-mails could scupper your quota. Which is why I waited until Gmail came along before getting a webmail account at all. Before Gmail, I stuck to my ISPs offering. It had fewer space restrictions. And it's exactly that 1GB of storage that originally made Gmail so appealing.

So unable to actually find a flaw with Googles products. Roberto decides to attack Googles business model. Now it's no secrete to most who are educated and understand how the Internet and how businesses work, that Google makes much of it's money from on-line advertising revenue. Indeed this is a major source of income for Google. So naturally they seek to do everything they can to capitalise on that. And well with Google being firmly based in the worlds greatest capitalist economy, who would expect anything else?

Yes it's true Google have moved into many other markets purely to expand the scope of Internet advertising potential. That was the whole drive behind Android. To create a mobile platform that would deliver on the needs and wants of users that would also enhance Googles advertising business. And frankly it's a win, win, win, win scenario.

Google gets a mobile advertising platform that can deliver standard web pages and thus standard Google adverts to consumers. Companies advertising products get to advertise to potential consumers throughout the day and not just when they're stuck in front of the TV or PC. Handset and mobile network providers get a free OS to distribute on their devices that can meet all of these demands. Consumers win because they get a rich user interface, access to a well stocked application repository and a hand set that does more and does it better than before. In fact the only parties that don't win are Google's main rivals. Apple and Microsoft.

Now this is the real smash. Google have built their business without resorting to litigation to compete. They have invested massively in infrastructure. Often driving up standards in technology. Which it should be mentioned their competitors have benefited from. Competition is not a bad thing. Competition is what drives the market. Google are forging a path of innovation. Others can join them. Or sit around complaining and become obsolete.

The next article that comes to mind is this one. "If You Already Hate Windows 8 Then You Hate Technology” by Matt Honan. This landed in my inbox on the 15/09/2011. Now clearly an article like this is going to make comparisons. We'd expect nothing less. However there are a few things I don't understand. One of them being the need to berate Android and claim Apple has no competition in the tablet market?

This is an interesting comment. Least of all because Apple's iPad and iPhone products have been given such a run for their money by Android, Android now easily owns the smart phone market and Samsung's Galaxy S range of tablets were so enticing to consumers. Apple felt the need not only to have them banned globally. But they tampered with evidence just to get the point across. The point being Samsung's new Android powered tablet was so good Apple wouldn't have been able to compete. So they chose to litigate instead.

A few other things I didn't understand about this article. How is it Windows 8 goes from being so awesome at the start of the article it's the only competition in town for the iPad. To not actually really working properly yet and being a bit crap at the end? And yes I read the “IT'S ONLY A DEVELOPER BUILD” disclaimer. It's mentioned almost in hypnotic fashion by every journalist covering Windows 8 right now. Well that's all great and everything. But what exactly is “sub-optimal” hardware? Is that maybe hardware that's not powerful enough to do the job properly? Just what would be the optimum hardware configuration for Windows 8? Surely Microsoft must at least know what they're aiming for? I mean this new “Metro” interface can't possibly be asking that much can it?

And just what is this “metro” interface any way? By all accounts it's a tiling mode for Windows 7's window manager. And you can only use it to run certain applications. Metro Applications. So not a tileing mode then? Probably more like IE with a new skin. Which sounds more plausible given that these “Metro applications” are basically HTML5 web pages in an application wrapper. Hardly revolutionary. Other OS's have a tileing mode for their window managers and many smart phone apps are just HTML5 in an application wrapper.

So the killer app Microsoft are delivering in Windows 8 then is an interface for smart phone style apps on Windows 7. I'm struggling to get excited here. But then again according to Matt. That means I hate technology.

Actually it means I'm bored to the back teeth with Microsoft delivering too little too late and then buying media attention for stuff everybody else has already done and left by the way side. Microsoft aren't fashionably late to the party. They're belligerently ignoring the invitation and then complaining when they're left out in the cold. Microsoft should try doing something that genuinely adds value. Like the way Sony has integrated it's new tablet with the PS3 and it's range of Bravia TVs.

So far as Windows goes. It will always be fighting the reputation Microsoft has earned. Please take not of that. Microsoft earned it's reputation. Microsoft are big enough to play nice. But instead they very often choose to be dicks.

Saturday, 17 September 2011

Ubuntu and Natty -Update

So another day and another quick update on life with Natty. Yesterday I hit a new problem. Ubuntu kicked me out to the GDM login screen with no warning. I'm not even sure what log to check to find out what went wrong there. But logging in again was no big deal.  I also had something of an epiphany.

When I upgraded to 10.10 I was running MediaTomb. Which made the OS somewhat unstable. Removing MediaTomb and reinstalling it fixed the problem. So for the time being. I've ditched MediaTomb. The improvements have been instantly felt. Boot ups no longer require the filesystem to be checked on every boot.

However I was also messing around with Kubuntu on a VirtualBox virtual machine. I'm thinking maybe VirtualBox still has some issues with Ubuntu Natty. It seemed a bit slow at time. However that may be due to Boinc which I also have running in the back ground. Boinc is next on the hit list. I think I may confine it to a virtual machine. First though I need to figure out how to make a minimal Ubuntu installation disc.

The reason I was playing with Kubuntu was because I'm thinking of ditching Unity and Gnome altogether and moving wholesale to Kubuntu. Which raised a question in my mind. Why aren't Canonical putting all their efforts into Kubuntu? KDE already does more or less everything Canonical are developping for the Unity interface. Not only that but all the effects and features of KDE are integrated with the desktop environment already. Certainly there's room for improvement. But so far as i can see. Everything Unity offers is already there in KDE. It seems to me KDE is a much better launchpad for Canonical than Gnome will ever be.



Monday, 12 September 2011

Ubunty Natty and Unity – Update


Well another day and more problems.

Firefox crashes constantly. Why is this Canonicals fault? Well Ubuntu doesn't come with vanilla flavoured Firefox. It comes with integrated Ubuntufied Firefox. Which might I also note didn't update to revoke DigiNotar security certificates. I had to remove them manually.

Any extended period on in activity seems to kill Ubuntu. It won't even shut down or reboot. I keep having to press the power button to force the whole machine to shut down. Not good.

All I can say is October is feeling like it's a really really long way off. The silver lining is I discovered ALT+F2 actually does still work. I think I've going to have to keep a better diary of problems I encounter.

Sunday, 11 September 2011

Ubuntu Natty And Unity


When I wrote my last piece on the Unity interface I was criticised for not giving Unity a chance. Which one could argue was fare. Unity was still in development at the time. Now that Unity has been the default desktop interface for Ubuntu desktop edition. Introduced to Ubuntu 11.04 (Natty Narwhal). My fears about Unity have not yet changed.

Unity simply put is lacking in basic features and Ubunty 11.04 as a whole is somewhat unstable. I've just noticed at some point the CD automount feature crashes. Apparently this is an issue with gvfs or some such. And lets not forget compatibility with MusicBrainz is still broken.

So to date what are the major problems with 11.04 and Unity.

CD automount invariably crashes. There appears to be no work around or fix other than rebooting.

Speaking of rebooting. For the first time ever my system is now regularly hanging on reboot. This seems to be a Plymouth issue? I could be wrong. But I've never had this before. All my hardware checks out. So the problem must be software.

Unity has no way to clear the “recently used files” list. This is a basic feature that has existed on most desktop environments for years. Decades! Even Microsoft can pull this one off without a hitch.

Unity has no way of creating a custom launcher from with in the Unity interface. This again is a very basic feature. A launcher is just a link of a sort. Nothing special about it. Why this feature isn't there is a total mystery. It begs the question which type of people Canonical thinks the Ubuntu community is made up of? The work around is to create the launcher manually using Gedit. Not really something a beginner would think of. More time than it's worth for a “power user”. I can see why people are abandoning Unity. Unity isn't even aware /bin exists. Anybody would think any sort of “run application prompt” in Linux would at least be aware of /bin. But no. That's too hard. But it gets worse. Unity doesn't even let you type the path name of your application. It just doesn't accept it.

Unless Unity is made aware your application exists via the creation of a launcher, it's no dice. And unity has no way to create a launcher. So in the age of the ultra slick GUI we're reduced to typing at the command terminal just to launch a simple application. And don't get me wrong. Users shouldn't be afraid of the command terminal. But using just to launch a single app is over kill. It's geek masturbation.

MusicBrainz compatibility is broken. MusicBrainz as I understand it was re-jigged to be Gnome 3.x compatible. Ubuntu Natty is still dragging it's heals at Gnome 2.x. This is a major let down for an OS that claims to be “social from the start”.

These problems might not seem massive. But for a desktop user they can be show stoppers. When your music app can't even tell you the name of your audio CD or even mount it automatically in the first place. It doesn't look good. In fact it looks really, really bad. It's not the sort of OS you want to hand out to people. How can we recommend Ubuntu when Canonical are getting such basic features wrong? You can't recommend an OS and then say “oh never mind if X doesn't work. Canonical will fix that in the next 6 monthly release”. It just doesn't fly. The only positive note is Unity does inprove somewhat in the future. It gets better. But who knows if Canonical will address all the stupid issues that should never have arisen.

At this point in time I feel Canonical would have been better off leaving Unity on the netbook. Developing it in the background while using Gnome 3.x for the time being. Unity just isn't ready for mainstream usage. It gets in the way more than it helps. And when your OS is getting in the way of your work, play or whatever. It's time to find a new OS.

Edit: Alt+F2 still brings up a run command prompt that actually works. Unity is damn confusing. Which brings to mind something else that's missing. An introduction to Unity and what it does.

Monday, 7 March 2011

Ubuntu Natty Alpha 3 - First Impressions

This will be a short post since I haven't played with Ubuntu Natty for long. But first impressions are mixed if I'm to be kind. On the upside Ubuntu is still usable. On the down side, it's not what I'm looking for in a desktop OS.

The new interface just sucks for desktop users. It might make sense on a tablet where only one application is being used at any given time. But it just doesn't work as a desktop GUI. I don't like it. It's not what I'm used to and I don't want to be "converted". Imagine my eation then when I discovered the "Ubuntu Classic Desktop" option at the log-in screen. Then imagine my disappointment when I realised it didn't actually do anything yet.

Mono is once again a sore point. I just don't see the point. Mono doesn't bring anything to the mix that isn't already there. Other than possible legal troubles of course and a ridiculously bloated install foot print. So as you might expect I tried removing it. And guess what? Ubuntu didn't seem to lose any functionality that couldn't be replaced by installing alternatives. The applications I lost included Gbrainy, Tomboy Notes and Banshee. All of which I can live quite happily without.

OpenOffice.org has been replaced with Libre Office. Again I'm not really sure what the advantage is other than Libre Office has been contaminated with OOXML support. Canonicals leanings towards Microsoft technologies is beginning to annoy. I moved to Linux to get away from Microsoft. Please for the love of all that's still pure in the world don't drive me on to a Mac.

The Gimp was notable by it's absence. Which means I'll have to install it since I was planning on doing a clean installation for 11.04. It's not a hard thing to do. But the Gimp has been a standard application on the Linux desktop for so long. It just doesn't seem right it's not there any longer. I'm a Gimp user. So I need it.

The one thing that did really impress me with this installation was the new Ubiquity installer. Hopefully I'll have a video posted to YouTube soon. This is the one part of Ubuntu that has gotten better with every version of Ubuntu. This time around basic information is collected as the system is being set up. So it's no longer a case of collecting data and then copying files. Files are copied while basic user data is collected. Which does speed up the whole process by a few minutes. And lets face it. Anything that helps cut down installation time has to be good.

Sunday, 12 December 2010

File Sharing Options In Ubuntu

Since October was my last post on this blog I thought it was about time I posted something at least somewhat useful. As someone who owns several PCs something that interests me is networking those PCs together so that they may share files and common resources. This is actually something many people struggle with all the time. For those who can't solve the problem they may resort to cumbersome methods like using USB sticks. So what are the file sharing options available to Ubuntu users?

Well as I've just mentioned, you can use USB sticks. It's a reliable method guaranteed to work. It is not however terribly efficient. The next option involves networking and there are 3 main ways to share files over a network in Ubuntu. We have Samba, which is an implementation of Microsoft's networking protocols for Windows. Next we have NFS which is commonly used in most POSIX compliant OS's. The third and final option in the "cloud".

Samba
Samba is great. When it works. Not only does it allow other Linux machines to share files and other resources like printers. It also allows both Linux and Windows machines to share the same resources on the same network. Which is great. When it works.

And that is the biggest con for me when it comes to Samba. Not only did the Samba developers succeed in developing software that could network both Linux and Windows PCs together on the same network using Microsoft's SMB protocols. They also succeeded in reproducing the reliability of Microsoft's networking protocols. It could just be my incompetence. But frankly I've never been able to get a home network to actually work reliably with Windows and Samba has never work consistently and reliably for me in Ubuntu either.

I will however concede that there are many people who do appear to have Samba working just fine. Another advantage is that shares are dynamic and browse-able. By that I mean a new share will appear on the network as they are made available.

So Samba is flexible but not reliable.

NFS
NFS or Network File System on the surface looks a bit scary. Setting it up requires using something called the "terminal" and editing "configuration files" with "root privileges"! For the purposes of a home network based on Ubuntu machines it's actually very simple. Install 3 packages and reboot the PC. Then you can start sharing stuff. Which is where you need to start editing files. Well actually you don't.

Ubuntu has a GUI that lets you select shares for either NFS or Samba. It can be found in System>Administration>Shared Folders. In the case of NFS this will create all the entries in the /etc/exports file for you. All you need do is supply the basic information. The folder to be shared and the clients (other PC's) who have access to it. Editing the /etc/exports file directly does however give more flexibility and certainly isn't something any home user should shy away from. Simply make a copy of the original file. That way if you screw things up, it's easy to fix.

One of the biggest draw backs for me using NFS is that it's static or not browse-able. At least as of yet I haven't found a way to browse through a PC's NFS shares. Each and every share on the network needs to be "mounted" manually or via the fstab file for automatic mounting at boot time. Which can be inconvenient if you can't remember the exact name of the share. I also haven't yet figured out how to share a printer with NFS. If it's even possible.

NFS server and client software is available for Windows. However I've never used it and therefore can't vouch for it.

So NFS is reliable but inflexible.

The Cloud Services
There are at least two "cloud" based file sharing services that spring to mind when it comes to Ubuntu. The first is Canonical's own service. Ubuntu One. This is installed by default in Ubuntu 10.10 as part of Canonical's "social from the start" initiative. You do however still need to create a user account.

The other service and probably more popular service is DropBox. DropBox is the more mature and better established of the two services. Which means more of the bugs have been ironed out. I've used both services and DropBox is definitely my choice for the moment.

The thing that interests me most about these services is the ability to share files securely wherever there is an Internet connection. Not only do they share files but they synchronise them as well. Which means the latest version of a document should always be available. There is a significant limitation however. Cost!

Unlike using Samba or NFS to share resources on a home network using a cloud service limits the amount of data you can share at any given time. That's because the cloud services operate by copying the files to an on-line storage space and then to each client. This on-line storage needs to be paid for by someone.

Users do however get some free storage space. With DropBox it's 2GB and with Ubuntu One it was 1GB when I tried it. Which in today's world of massive MP3 libraries, digital photos and perfectly legally ripped DVDs isn't much. Once you've reached your reached the limits of your on-line storage capacity you must move files out of the shared space or pay up actual real money for more space. On a monthly or annual basis. Which means you're actually paying good money to access your own files.

On the plus side however these services do tend to "just work". Which is why they are popular and why people are actually prepared to shell out money to get that extra storage capacity. Cloud services are also said to have another important function. Off site back up. In reality this only works if you go to the trouble of setting it up that way. Remember these services automatically synchronise their shares. So if you delete a file in the shared space on your laptop. It will be deleted in the shared space on your desktop as well. However as a cheap off site back up option it's not a bad idea.

So cloud based file sharing services are reliable, flexible, browse-able but potentially expensive.

The Conclusion
Each file sharing option here has it's pros and cons. The important thing for people to realise is there are options out there. You don't have to stick with a one size fits all and doesn't actually work properly for anybody solution. My solution is to use a combination of services. I use DropBox for files I need access to when I'm not at home and can't connect via my own home network. And I use NFS for my home network.

I have chosen these options for their reliability and simplicity. They both "just work" and very rarely throw up any problems. Not having figured out how to share a printer with NFS at the moment if it's even possible isn't a huge issue. In the modern age why are we still printing stuff anyway? There's no real "need".

Tuesday, 5 October 2010

ConDem-ed

This is just a quick observation. The other night I was watching the news. There was a report on the cuts the ConDem-ed government intends to make along with the welfare reforms. I couldn't help but notice everything major that has been mentioned so far will not be implemented in this parliament. But in the next parliament.

I'm by no stretch of the imagination a political heavy weight. But that rather seems like an ideologically driven approach rather than austerity measures. The cuts the ConDem-ed government are planning will be intended to last well beyond this and the next government. And there is one more odd thing about this ConDem-ed government.

Details. The devil is always in the detail. But the ConDem-ed government are very light on details. Before the election I was criticised by some for calling out the Conservative manifesto as being utter nonsense. All head lines and no substance. Those who would play devils advocate defended that manifesto, claiming an election manifesto should only set out the "vision statement". Well frankly that's just not good enough for me.

Before the election the Conservatives were pushing out some radical Thatcher-ish sounding policies with no actual meat in them. Today in government they are doing much the same thing. How can a government function for this long after an election and not have actually done anything? Why are the opposition parties holding them to account?

Something has gone very, very wrong in British politics.

Wednesday, 11 August 2010

deviantArt Munro

There are people in the world who doubt the usefulness of the Internet and the World Wide Web. These same people are the people who are currently talking down the transition from the desktop computing model to the "cloud" model. They are also the same people who stand to lose the most from this transition.

I've read articles in the past that talk about the security concerns related to "cloud computing" or "fog computing". There's a lot of scaremongering going on in the industry and in popular media. And disasters like Microsoft's Sidekick disaster are routinely trotted out to add weight to the claims being made. All of those articles however ignore one simple fact. We already live in the "cloud". As I've said in various forums in the past, cloud computing is simply a return to the client server model where applications are hosted by a server and interacted with via a client. The server does the heavy lifting. The client provides the interface. This is how the web works. It's how it's always worked.

So why all the fuss? Well traditionally web applications have always been limited to the capabilities of the web browser. Primarily Microsoft's Internet Explorer which has been a ball and chain shackled to the ankles of the Internet since Microsoft forced it upon it's customers in Windows 95. But that has changed. Microsoft no longer dominates the web in a meaningful way. It's market share is falling continuously. New versions of IE cannibalise market share from older versions of IE while the over all market share for IE falls. Microsoft's competitors are stealing the march on the web. Apple, Google, Opera and Mozilla have all released HTML5 aware web browsers. And it's HTML5 that will set the web free.

HTML5 is what powers Munro from deviantArt. Munro it's self is nothing special. It's a painting application that allows you to publish directly to your deviantArt account. What is important is how Munro is delivered. It's free to use and is delivered to the user via the deviantArt web site. There's no plug-ins required. No installation required. No configuration required. No lengthy serial number to input for activation. It is essentially the ultimate plug 'n' play application. The only thing the user is required to do is figure out how to use it. Which isn't hard.

Munro isn't the first HTML5 application to pop up. There are quite a few out there now. Discreetly integrated into web sites. Users simply take them for granted without even noticing how painless the whole experience was. Because it was painless. This is how the web was meant to be. Free and easy to use. Simple and transparent. Accessible to all.

Monday, 26 July 2010

Why does Wall Street hate Microsoft?

Why does Wall Street hate Microsoft? is the question posed on the Microsoft Blog. The answer the author arrives at, extremely quickly, is Windows is just not exciting enough. Hmm okay then. I'm no expert on the stock market or on how investors behave. But I think it's a safe bet they're more interested in the profit margins. Not just from one or two products. But from the whole product line. And there in lies the problem. With the exception of Microsoft Office and Microsoft Windows very few Microsoft product lines ever seem to make any profit at all.

Take Bing for example. It was supposed to be the next best thing since sliced bread. It wasn't. Hardly anybody uses it and Microsoft's on-line efforts are haemorrhaging something on the order of $2,000,000,000 per year. Vista was a disaster and despite the supposedly good figures for Windows 7. The business world is sticking with Windows XP. Which is why Microsoft has extended downgrade rights to 2020. And Windows Surface was also essentially still born.

There was Zune. Which only really sold in the USA and even then wasn't so popular. There's the Xbox. Hugely popular, yes. Shame it's a technical disaster with at least half of all units sold at one point being returned as duds. Which one might think was enough disappointment for one product. But no. Microsoft had plenty more disappointment for Xbox fans. First they decided to lock out third party peripheral devices. Then they decided to cut off early adopters by ending support for their version of the console. There was the sidekick debacle. Then there was the still born Microsoft "Kin Phone". Which nobody wanted. And then of course there is a list longer than your arm of product lines Microsoft has recently discontinued.

All of which is very telling about Microsoft's understanding of todays market. They just don't get it. For some unfathomable reason Microsoft thought teenagers would buy a phone like Kin when they could have an iPhone or the HTC Legend, the Google Nexus One or the Motorola Droid. Even Microsoft's own Windows Phone 7 looks like a better proposition. Then there is the way Microsoft treats it's paying customers. People are tired of the 20 character activation codes. It makes people who have bought and paid for their products feel like criminals. So it's understandable then they might consider switching to Apple or Linux.

And speaking of the competition. When Microsoft's competition does something different, exciting or innovative Microsoft's responses are almost non-existent. Microsoft's answer to the buzz surrounding Compiz on the Linux platform was a new task-bar. Windows that minimise or maximise when you shake them or some such. Compiz in comparison has a multitude of features. Some actually useful in boosting productivity like the Negative, Opacify, Enhanced Desktop Zoom or Add Helper. Basically Microsoft are a company that doesn't have anything new to offer and always seem to be late to the party. And not even fashionably late at that.

It's not that Wall Street hates Microsoft. Wall Street just doesn't see any potential. Investors minds have been made up that Microsoft has run it's course. It's time for a change. For something new. Apple are currently storming a head because Apple has proven it's self to be a company that can diversify to survive and fight it's way clear of bad times. Microsoft innovates by buying up an existing company or product and slapping it's own brand on it. Apple innovates by putting a new spin on existing technologies and products.

Then there is the honesty factor. Investors don't like it when people lie to them. Windows 7 is turning bumper profits. Except virtually nobody in the business sector is interested and the whole of Asia is apparently pirating Windows. So who exactly is buying Windows 7? Are these bumper profits coming from consumers alone? Maybe there's some "Hollywood" accounting going on over at Redmond.

Wall Street doesn't hate Microsoft. It just doesn't care any more.

Saturday, 24 July 2010

Ubuntu Tip: How To Synchronise Gnote Between PCs

In the great Tomboy vs Gnote debate one of the trump cards Tomboy has is it's ability to synchronise it's database of notes with other PCs. Not that it was ever a feature that worked brilliantly. However none the less it was a feature I used and the only reason I continued using Tomboy over Gnote.

How stupid I was?

Ubuntu as many Ubuntu users will know comes with a "cloud" service called Ubuntu One. Which while isn't that great provides us with the basic inspiration for what we're about to do. You see Canonical in their great wisdom decided it would be a great idea to integrate Tomboy with Ubuntu One. Fine. Excellent. If it works. It did for a time for me. Then sort of went a bit crappy. However there are more mature "cloud services" available for synchronising files between two PCs. And that incidentally is all Tomboy's synchronisation feature does so far as I can see. It simply copies files that have been created or changed recently to the PC that doesn't have the new version.

You see all of the notes you create in Tomboy or Gnote are stored in individual XML formatted files. And the Linux file system has a crafty little feature called symbolic links. Combine this with a service like Ubuntu One or Dropbox and all our notes are synchronised automagically so long as we have an active web connection.

Prerequisites:
  1. Tomboy or Gnote. I recommend Gnote. It's lighter and faster than Tomboy.
  2. Ubuntu One, Dropbox or similar service. I would recommend Dropbox.
Setup:
  1. Creat a new folder for yout notes in your Ubuntu One or Dropbox folder.
  2. Copy your existing notes to the folder you just created in your Ubuntu One or Dropbox folder. Tomboy notes can be found in /home/your-user-name/.local/share/tomboy. Gnote notes can be found in /home/your-user-name/.gnote.
  3. Replace the Tomboy or Gnote folder with a symbolic link. Open a terminal window and enter the following command adjust for your own PC;
    ln -vsf Dropbox/gnote /home/your-user-name/.gnote
  4. Repeat steps 1 and 3 on the second, third, fourth, etc PC.
NOTES:
  1. It's best to have Tomboy or Gnote already setup and working before you attempt this.
  2. It's also better to avoid using hidden directories with Dropbox. They don't work very well in my experience.
  3. If you're using Tomboy but would like to switch to Gnote that's not a problem. Gnote is a native Linux implementation of Tomboy that is free of all Mono dependencies. Both applications use exactly the same data file formats and both offer almost exactly the same feature set. So all you need to do is copy the Tomboy files to your Gnote folder.