4 Apr 2011, 1:00am
Miscellaneous:
by

leave a comment

April Fools: Google’s GMail Motion

It seems like motion control is a theme this year for April Fool’s pranks, this time with Google getting in on the act with a motion control interface for their GMail email application.

However due to the open nature of the Microsoft Kinect sensor for Xbox360 some students at the University of Southern California’s Institute for Creative Technologies actually went off and built a working prototype of Google’s fictional Gmail Motion application after seeing Google’s April Fools video.

2 Apr 2011, 4:23pm
Miscellaneous:
by

1 comment

April Fools: Starcraft returns to console for Xbox360!

I think Blizzard’s April Fools gag (Starcraft II on Microsoft’s Xbox 360 with Kinect sensor) is the best I’ve seen so far this year: amusing concept, decent production values for the video and humourous (to fans of the game at least).

Reddit has a good round up of this year’s April Fools offerings by the games industry you can find here.

1 Apr 2011, 1:00am
Links
by

leave a comment

Friday Linkage

This weeks interesting links:

29 Mar 2011, 11:18pm
Productivity:
by

leave a comment

Don’t delay, start contributing today!

Mark humorously makes a very good point in this short talk at TED: don’t delay contributing!  Your contribution may not be large or dramatic but you cannot predict the scale of the impact in peoples lives you can make until you start contributing.

This video reminds me of the principle of inertia:

“The vis insita, or innate force of matter is a power of resisting, by which every body as much as in it lies, continues in its present state, whether it be of rest, or of moving uniformly nor a measure of mass.” – Sir Issac Newton (1687)

If your are currently not contributing then your are liking to continue doing nothing, however if you are already contributing then you are likely to continue contributing.  The hard part is making the transition between these two states.  By starting with small contributions as Mark suggests we can increase our chances of successfully making the transition from doing nothing to contributing t0 each other and society.

28 Mar 2011, 1:00am
Programming:
by

2 comments

Processing Perforce command output with python.

The Perforce command line client supports returning Python marshalled dictionary objects as command output via the ‘-G’ option.  This functionality can be used to easily export data from Perforce to various formats to allow further analysis.   The following script exports the  submitted change lists returned by the p4 changes command to an CSV file which can easily be loaded into Microsoft Excel for analysis.  The script also converts the returned timestamp into human readable date and time columns.

"""Perforce changes dumped into CSV format."""
import marshal, subprocess

def Run( cmd ):
  """Run supplied perforce command and return output as a list of dictionaries."""
  results = []
  cmd = "p4 -G %s" % cmd
  # Run the Perforce command using -G option to get results as Python marshalled dictionary objects.
  process = subprocess.Popen( cmd, stdout=subprocess.PIPE, shell=True )
  # Harvest stdout output until end of file exception is thrown.
  try:
    while 1:
      output = marshal.load( process.stdout )
      results.append( output )
  except EOFError:
    pass
  finally:
    process.stdout.close()
  return results

if __name__=="__main__":
  import csv, datetime

  # Perforce command to run, fetch the latest submitted changelists.
  cmd = "changes -L"

  # Get results.
  results = Run( cmd )
  print "'p4 -G %s' - %d" % (cmd,len(results))

  # Convert timestamp into human readable form.
  for result in results:
    result['timestamp'] = result['time']
    result['date'] = datetime.datetime.fromtimestamp(int(result['time'])).strftime("%d/%m/%Y")
    result['time'] = datetime.datetime.fromtimestamp(int(result['time'])).strftime("%H:%M:%S")

  # Write results to file.
  f = open( 'p4.csv', 'wb' )
  w = csv.DictWriter( f, results[0].keys() )
  w.writeheader()
  for result in results:
    w.writerow( result )
  f.close()

This script could also be used to export the results of most Perforce commands to CSV simply by changing the cmd string (line 25).  It could also be adapted to export into a different format e.g. JSON, XML or even into a database like SQLite.

25 Mar 2011, 1:00am
Links:
by

leave a comment

Friday Linkage

This week’s interesting links:

  • 20 percent time spent coding in the clouds.
    An interesting post by a Google engineering director about how he recently used his twenty percent time developing his first App Engine application on a long haul flight to Japan.
  • Do or do not.
    The author has an interesting take on not using asserts in favour of using unit tests instead.  Reflecting on this I find asserts and unit tests essential for C++ projects however for projects in Python I tend to just use unit testing.
  • How not to get things done.
    This ironic post makes a case against those engineers with a knack for ‘getting things done’ usually at any price (e.g. gratuitous hacking) can be dangerous to the project.  All engineers require leadership on code quality, testing and maintenance not just those who get things done.
  • A Hundred Machines for Only Ten Dollars an Hour.
    An interesting presentation on just how the Amazon cloud makes massive parallel data processing using Hadoop very cheap: $100 in this case.  There is also a warning as the author ends up spending $3000 in legal fees convincing FaceBook that he didn’t do anything wrong with his $100 of data processing!
  • How to polish a turd.
    A post about the process of developing and evolving a game concept from conception to shipping.  I have had the opposite experience from the author with publishers being the main source of change requests.
  • Are gas prices really that high?
    As a European living in Canada it is easy to appreciate just how much cheap fuel is here.  This graph maps out petrol prices for the whole world relative to the US prices which are even lower than Canada’s prices.
  • Time Management (Comic).
    An amusing take on time management blog posts.