To Our Charley (Aug. 21 2012 – Mar. 30th 2015)

I am going to miss you, your family will mtss you, your friends, , you were so much fun in your short life, and wished I had found you when you were lost in the forest and needed us to find you – and not later when there is nothing we could do for you. Your life was short, but we knew when first we found you in tthe dogs’ home you were for life to be part of our family. We hope you found in us all the love and care and knew we never abandon you and you felt secure where your home was.

Keep playing Charley, keep taking the lead and not letting me take it from you. Even if there is no other place we can still see you playing with the hoola-hoop, chasing the ball, or looking at a log you want thrown. Although your family is dimished and will always be missing you – will are better for knowing you.

Rest Charley in peace and then go play with Gucci –

Love your family.IMG_20141210_190905 IMG_20141228_112440 IMG_20150228_135137


Technical interview questions

It always surperises me how simple some of these questionare – often I get asked theses:

  1. What is the difference in Sql Server when deleting all records in a table using delete or trucate.
    Simply put if one uses truncate on a table any auto-increament fields in the table are set to  the initail value – 0, and the deleted data is lost forever as the deleted rews are not recorderd in the back up log. A trucate will fail if there is any table with a foreign key referencing any row in the table truncated. Applying sql delete each deleted row is recorded in the back up log and can be recovered.
  2. What is the difference between a struct and class in C#.
    An struct is a value type, and once created the instanance of is immutable (its a value type). A struct can not be inherited but can implement an interface.

Relatively simple – now for something that really show ones knowledge

  • Now this question is what I like. You have a delegate that accepts an int and returns a integer; The delegate has three functions assigned to its invocation list.  The funtions have been assigned inside a simple method which has a local int variable x initialised to the value of 2.
  • The functions on the delegates invocation list, in order of assignment are:
    1. multiply the input value by 2 and return the result
    2. add 7 to the local x varaible and multiply the input value by 3 returning the input value
    3. substrct the input value from the local varible x and return the input value multiplied by 2
  • The delgate is called with the local variable x what is the result and why ?

The answer is 6.

Why, I’ll explain later but simply put the input value is closed i.e. the delegate acts like a closure.

Now back to Seria A which has been neglected due to work offers and answering techincal questions like 1 & 2.

Learning R and NoSQL DB

The tasks for next week will be to finally get around to studying Machine Laerning for Hackers – the book is an introduction to R and the book Beginning CouchDb – and Think Bayes (which is a Python Book).

First I need to setup a new virtual Linux application server to host CouchDb and MongoDb – both are JSON document NoSQL servers. Mongos data format is BSON – which has very similar syntax to JSON.

Having setup the server and tested both NoSQL application are running I need to prepare some ETL on the data I will be using. This data is available on the web – but the format is mainly TXT (I could download excel data but were is challegned um). The data is the historical results of the Seria Italia played from 1970. I also need to find the historical tottocalcio schedine. and ETL them as well.

Why this data – well when I lived in Italy, me and my flat shares in Via dei Vanni accanto il ponte della Vitoria, used to enjoyed Sunday afternoon at the bar at the corner of Via Pisana and Ponte Sospeso or in the piazza en-face le bar. In the bar or the piazza, listening to a portable radio, we would be checking lo schindina di tuttocalcio against the live score programma.

I am not a gambler – I played tottocalcio more for the social sunday event than to actully win (anche solo costa una mille lire di giocare una linea … meh niente). The reason I don’t is because I understand probabilty. Back then with a grasp of Baysian Inference (learnt from Collins Dictionary of Statistics) I’d approach it scientifically. The problem was all I had was calulator, very little data (non mi ricordo il nome del settamanale per il tottocalcio), a pencil and paper. Non mai ho fatto piu di dieci – peccato altrimenti ci starei ancora.

Now I have a 3rd Gen i7, 16 gb of RAM, various data mining tools and lots of data.  I am doing this for fun and nothing helps one learning more than having fun. And Data Mining, Machine Learning, and analytics is all the rage at the moment in the market. I’ll get to financial analytics, non-intelligent and intelligent agents later (the finacial zip algorithm and game theory … oh game theory mi piace).

The Goal: Simple put it is to discover the predicability of a tottocalcio schedina – and how many lines should be played and aid in learning and reacquiring skills neglected since 2000.

Having set everything up on the application server … I now need to do the ETL.

Basic Process of all ETL:

  1. Find the data source(s) (
  2. Study the loose structured TXT sources to extract pattens
  3. With the extracted patterns transform TXT to appropriate intermediate XML (why XML … I might need it later)
  4. Add any additional semantic data to the intermediate format
  5. Convert intermdiate format for loading into CouchDb and MongoDb
  6. Load the data

The data environment is ready.

The ability and the thirst to learn … why is it not recognised, on personality tests I rank hugely on intuition 10/10 … experts are intutive … what does that say … I rank just as high on risk taking … are they linked ?

Why Smart People Don’t Get Hired – Appears I’m a No. 5

Interesting  Why Smart People Don’t Get Hired read and I appear to be caught by most of the points. Having been a University Lecturer I suffer mainly from fault number five – although I truely believe people are not stupid (a part from a couple I have work with – cowards would aptly apply as well to them behaving a WWI generals). As an aside – imagine someone claiming that a database modelling tool complicates the design process of designing a database perhap he should tell Oracle to dump the data modelling tool and Microsoft to stop wasting time developing SQL Server Management studio. That it was said in front of HR, really makes you wonder how stupid IT infrastructure managers can be in certain organisations sponoured by the Commision.

Now I know the problem – maybe I should start treating others as idiots – nah, that is not me. I like to encourage, and assist people (and organisations) to achieve, especailly those who have the misfortune of being managed by those who belittle what other could accomplish and never give them credit. What an individual given the oppertunity and encouragement can and will achieve is sometimes amazing (you have to accept they will make mistakes but that is normal and healthy) but too often these individuals are boxed in by a company who management are ABC individuals (generally uncreative consumers) who mummy always sent them to school with an apple for the teacher.

Have I gone of point no I have not  – the associations are there …

How not to offer a contract

This appeared in the text of the barcelona-metropolitan in the Classified section, yes I actually do work on finding contracts in Barcelona or elsewhere in Europe – is that not what Skype, and Google are best at doing, long distance face to face no cost business.

Here is a copy paste of the description


Seriously not very informative … now I know business entrepreneurs do not want to give away too many secrets but this is just too opaque.

  • never use capitals, seriously don’t ever use capitals as it is annoying and certainly not in the classified section.
  • in any copy one should always check the spelling and grammar – very important for that professional look..

Now come the questions as any self-respecting person would ask as a web developer:

  • Do you actually have any infrastructure and what is it ?
    • JEE, .NET, Sharepoint (um … not unless you have over 500 employees and the infrastructure to match), or a LAMP server.
  • Do you actually have a domain, or even a hosting service ?
    •     important when it comes to underlying web technology
      • If not then is that included in the price (certainly not but price is very dependent on host’s technology stack – stick to LAMP providers as there is big competition in the market).
      •  If you want a .cat domain then it will have to be in Catalan unlike an eu domain which can be anywhere in Europe.
  • Proposed domain of web site:
    • is this going to an ecommerce site, a business blog, a social site etc, please give us a hint
  • Proposed functionality:
    • do you require social application integration, gamification, SOE etc. as that costs.
  • Without at a hint of domain and functionality
    • how can I cost the web site.
  • What is interesting about the work ?
    • I have no clue …do you

Well there it is, I’ll keep looking

Weird interview questions I have been asked

I am an honest person and give answers honestly, in my life I have numerous job interviews … maybe I’m just too honest, and call a hammer a hammer when I see one (being rather PC here) often at the end the HR person often throws in an odd question. Here are the question and the answers I rememebr.

What is your favourite Abba song and why ?

  • I should say Take a Chance on Me – but the real talent of Abba, Agnetha, never looked comfortable in the official video but I think everybody notices this  …  I’d go for SOS … the echos still reverberate and will forever for purely personal reasons.  I was only 12 years and she, Katie, trashed by heart.

What in your opinion is the best film ever made and why ?

  • Le Samouraï (”Frank Costello faccia d’angelo”) with Alain Delon the best french noir film, and film ever made run close too Mery Per Sempre. The film has very little dialogue but is intense, you are never sure whether you want justice for the victim (as you learn more about the victim you think he deserved it) or his assassin. Plein Soleil, another brilliant film, just lacks the intense emotional ambiguity but the sence in the Naples market is just hypnotic.

Which acclaimed film do you wish had never been made ?

  • 2001 a space odyssey, what a load of navel gazing bull, and the main actor a hippy hipster I’d love to give good kicking too with a pair of steel toe capped 10 hole DMs. Who the hell was he? Bloody hippies. (interview ends … sandal wearers). Boring pasudo intellectual in the extreme. Sorry, just utter drivel.

Which song has the most impact on your self and why:

  • The important bit is the why, as there is very little chance the interviewer will know ever song ever released. Sham 69 Borstal Breakout – on a higher level this is not about a breaking out of a correction establishment – but breaking out of the institutionalisation of one life by the delusional and fearful authorities (teachers, police, journalist, employers, government and neocons) that you will discover they have no right of respect of their life beyond the respect they give to yours.

Which song do you think is most overrated:

  • The Eagles Hotel song, worthless navel gazing, guitar masturbation that only the US could produce and think its a classic. Wished they had not infected the world with that worthless dival. Still smile when that is what expat US cizs think is a great contribution to world culture.  Ah, colonials, can’t love em.

The rolling stone or the beatles:

  • Neither … can’t stand either …

If you died tomorrow which song would you chose:

  • Was asked sometime in 1985 … answered Hurry Up Harry by the Sham 69 as my family is Irish. Now not sure how I would answer that one now, it would have to be the Raveonettes, Here Comes the End, the driving beat is pure rock and something positive in a negative stream.

Best Art show you have viewed:

  • Can’t remember if it was in Rome at Adrian’s Tomb or somewhere else but Caravaggio by candle light (not real but artificial) was simply a mind numbing sensation … every picture took on a different essence and fearsomeness … you could taste the drying paint. Be scared, you’d be.

Venetian Blinds or Russian Dolls (European Commission at the end of a three hour interview)

  • Russian dolls, I can think of more uses for russian dolls (cocktail shaker, measuring jugs, beaker, maracas etc …) than venetian blinds.

First Attempt at Connect 4 in Python

After I stopped panicing and relaxed it was not that difficult – but that is the ay the cookie crumbles. Still need to do some debugging but as first attempt and my limited knowledge of python I don’t think its that bad as it was written with the nano text editor.


class board(object)

  def __init__(self,cells=6,rows=7) :
    self.cells = cells
    self.rows = rows
    self.board = {}
    for row in xrange(rows) :
      self.board[row] = ' ' * cells

  def __str__() :
    print " " + "_ " * self.cells
    for row in xrange(self.rows):
      print '|', for cell in row : print cell + '|'
    print " " + "_ " * self.cells

  def occupied(self, row, cell) :
    return self.board(row)[cell] == ''

  def unoccupied(self, row, cell) :
    return not occupied(row,cell)

class connect(object) :

  def __init__(self) :
    self.board = board()

  def place(self, cell, sym) :
    for row in reversed(range(self.board.rows)) :
      if self.board.unoccupied(row, cell) :
        self.board.board(row)[cell] = sym
    print self.board

def main() :
  game = connect
  print "To exit game enter non integer when prompted for coloumn"
  while True
    try :
      strcol = raw_input('Enter column number')
      intcol = int(strcol)
      sym = raw_input('Enter your playing symbol'), sym)
      print 'Game exited'

if __name__ == '__main__'

IDE’s are for sissies, f I could write whole JEE application in nano … I can