Archive for the ‘general’ Category

Tabs vs. Spaces

December 1st, 2009

Every time I’ve seen one of these “vs” posts its gone into great length about the philosophy behind such and such.  You’ll never convince someone based on ‘religious argument’. So I’m going to take a different approach here and state who does what and hopefully the weight of ‘who does what’ will make the point quite clear.

Screw the Scientific Method!!

Language/Organisation Spaces Tabs Reference
PHP Pear * [1]
Zend (PHP) * [1]
Python * [1]
Ruby * [1]
Java * * [1]
.Net * [1]
C# * [1 Philips (PDF)] [2 - Microsoft]
Lua * [1]
Erlang * * [1]
Object Pascal * [1]
Adobe Flex * [1]
Ada 95 * [1]
Mozilla (Javascript) * [1]
Mozilla * [1]
Google * [1] [2]
Mono Project * [1]
Webkit * [1]
NASA * [1]
Apache (C) * [1]
Linux Kernel * [1]
Gnome * [1]
KDE Libs * [1]
Joomla * [1]
Wordpress * [1]
Zope * [1]
Django * [1]

Notes:

  • Tabs may be rendered differently on different editors and systems.  So they make for less friendly code sharing.
  • Its interesting to note that the ones using tabs all have histories of mental instability, cannibalism, Morris Dancing, witchcraft and heresy.

Clear win for Spaces, which happens to be what I use.

Epic Self Documenting Code

October 9th, 2009

This is the best:

switch (mIntegrationDirection)
{
   case InventoryIntegrationDirection.DoTheSameChangeInShop:
      DoTheSameChangeInShop(GetChangedDataFromInventory(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInInventory:
      DoTheSameChangeInInventory(GetChangedDataFromShop(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory:
      DoTheSameChangeInShopThenDoTheSameChangeInInventoryForNotChangedDataInInventory(
	   GetChangedDataFromInventory(mLastSynchDate),
	   GetChangedDataFromShop(mLastSynchDate));
      break;

   case InventoryIntegrationDirection.DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData:
      DoTheSameChangeInInventoryThenDoTheSameChangeInShopForNotChangedData(
	   GetChangedDataFromShop(mLastSynchDate),
	   GetChangedDataFromInventory(mLastSynchDate));
      break;

   default:
      break;
}

Read how this travesty occurred at DailyWTF

Mac Blogging Software …is rubbish?

March 21st, 2009

You’d automatically think that an application you need to pay for would be better than a Firefox plugin. Unfortunately that’s not the case but it baffles me how no one else seems to realise this.

For example take the array of Mac blogging apps out there: Ecto, MarsEdit, Blogo, MacJournal, etc, etc…

Paid for applications and yet they all have a woeful array of features when compared to the free Scribefire Firefox addon.

Scribefire includes Youtube  and Flickr integration, article searching, WYSIWYG/HTML/Preview panes, integrated promotion tools, ad serving tools and much much more besides. And did I mention this is all FREE?!

While the Mac community are crying out for substandard apps they paid for to release feature X for their fave blogging app. Why? Why not just switch to Scribefire and save yourself the heart ache?

Or am I missing something?

Freebase – Structured Data

January 25th, 2009

freebase-logo.pngCan’t believe I’ve not spotted this before. Freebase is a freely editable store of structured data. If you want a table of programming languages or Greek poets then Freebase can provide. This has endless possibilities for tinkering and scripting with.

If you’ve not seen before then I strongly recommend a visit.

Insight, Facts and Hmmms

November 30th, 2008

I’m a big fan of Google Insight.  Mainly because it burns time when I’m bored and provides lots of “hmm” moments.  Its a service Google provide that lets you see search volume against a range of other factors such as geography, time, etc.  I thought I’d put a few together that may be of interest to you all.

Django is HUGE in Russia

I have no idea why this is.  Maybe because Django sounds slightly Russian?  No thats ridiculous.  But just look at those numbers – compared to the US and the UK (doesn’t appear) its huge!

Why do the Russians Love Django?

Why do the Russians Love Django?

Rails is in Decline

The Google searches tell no lies.  It seems that Rails is in decline while Django is on a steady and solid incline.  Vive le Django.

My Heart Bleeds

Everyone Forgot How to Use PHP’s substr Function

A collective dose of amnesia seems to have struck the world as the search term “substr” seems to have had an 80% increase in recent years.

Surely its Not Hard?

Surely its Not Hard?

Scala? Don’t bother.

Scala was big a few months back with a sudden influx of tutorials and discourse posted to dZone.  Unfortunately looking at the graph its pointless bothering with it.  On top of that Guido doesn’t think much of it either – and he knows his languages.

See that Bottom Feeder?  Scala.

See that Bottom Feeder? Scala.

Canadians Love Merb

I like Canadians.  They were never quite so anti-British as the Americans.  They still have our Queen as their head of State and have none of the beligerant crankiness of republicans in America and Australia.  Its no suprise then that they like Merb – a lot.  Merb is of course ‘Rails-that-works’.

God Save the Queen

God Save the Queen

Well I’m sure you’ve all enjoyed these stunning eye-openers.  If I find anymore then I’ll be sure to let you all know.  In the mean time – have a good day.

13 OS Reviews in Seconds

November 13th, 2008

Operating System ComparisonAfter the success of my previous quick-fire review on Ajax frameworks I decided to do another on operating systems. I’m taking a good chunk of Linux, Windows and Mac here. So here’s the no-holds barred reviews on the major OSs.

  • Debian – A proper man’s OS and although the installer doesn’t look friendly its got everything you’ll ever need.
  • Ubuntu – Fisher Price OS for children and senile grandparents.
  • Mint Linux – Ubuntu with some wicked guns and lasers and whirring wizzy bits that go some way to redeeming Ubuntu.
  • Mepis - Gone a bit dull and boring.
  • NetBSD - Rock solid slut that’ll work everywhere.
  • Windows XP – Does its job and its a hell of a lot better than Vista.
  • Windows Vista – Lets not go there.
  • RedHat – Overly expensive cumbersome bull.
  • Mac OSX – Made for homosexual web designers and hairstylists.
  • Slackware – For people who grew up programming with punch cards.
  • Gentoo - Tries to be clever and fast but fails miserably and slowly.
  • FreeBSD – Just because part of MacOSX is based on it doens’t make it MacOSX!
  • Haiku OS – The answer to: “What is the sound of one hand clapping”.

Work / Life Balance

November 5th, 2008

Dilbert.com

Top 10 Project Killers

November 3rd, 2008

1. Excessive Promises – Often made without developer input or consultation. Promises of insane levels of functionality will only seek to burden the project with unnecessary tasks.  Example:

  • Sales: You want a Titanium Rocket Car with your project???
  • Customer: Errm…well no…erm…
  • Sales: You can have it!!!

…later…

  • Sales: We need a Titanium Rocket Car!!
  • Programmer: WTF?!?!

2. Change – Or should I say: Refusing to accept that change is inevitable and having fixed requirements with no flexibility is unnatural.

3. Lack of Communication – Lack of client involvement and poor communication is working blind.  Ever hear of Chinese whispers?

4. Inexperience – from the team leaders, programmers and management.  In fact anywhere in the line can cause problems.

5. Lack of Planning – Often a curse of developers who just want to get on with the job.  Planning is by far the most important aspect of a new project and also the most often neglected.

6. Lack of Priority – Concentrating too much on ‘parts’ and losing site of the bigger picture.

7. Relying on a Due-Date – See Parkinsons Law (work will expand to fill the time allowed).

8. Hardware and poor hardware management.

9. Ignorant Managerial Interference – I did have a great Dilbert comic for this but I lost it. :(

10. Insufficient Resources – Whether that be staff, time, facilities or raw materials.

Can anyone think of anymore?

Holiday

November 3rd, 2008

Dilbert.com

Google App Engine Frustrations

July 20th, 2008

Google App Engine LogoI’ve tried more than once to jump onto the Google App Engine bandwagon to no avail. Unfortunately it’s preview nature is acting to frustrate any attempt I make build something I’m happy with. Just some thoughts so far:

No Direction – It’s been dumped into the ether with no solid direction. No recommended method or path to building your web app is given or hinted at. I’m all for choice and its great Google allow you to use Django, CherryPy, WebPy, etc. but it’d be helpful if a consistent and solid method was given. Unfortunately you’re left with the feeling that the GAE has been thrown together with no real thought of making a web app out of it.

Disorganised Documentation – This doesn’t help the problem mentioned above as the docs provide 3 or 4 ways of producing a web app from the start. It first tells you how to do it using basic CGI and printing directly to the browser. Then it shows you using the RequestHandler and WSGI app. At which point it doesn’t say URLs are now handled by the WSGIApp instead of the app.yaml. Then it brings Django templates into the mix. How about pretty URLs? Oh well we can do that in app.yaml, or using matched groups in the WSGI app. For the love of all thats holy can’t we just have a single nice solution? A recommended method? An idea? A guide?

Restrictions – So it gives you all that wonderful choice as mentioned above so you think you’re going to make the best of it but oh no. Now you have to put up with the restrictions. No MySQL, no Django admin, restricted URL retrival, restricted security, no file uploading.

So you have to ask the question: Why?

What, ultimately, is the point in it when there’s far better out there – Django, Merb, etc.  It has no purpose other than to faff with and so I shall be avoiding it for the forseeable.