Archive for October, 2008

A Pun, A Pun, A Kingdom For A Pun.

Punic Wars

I know it’s terribly corny, but those reading this site will have noticed a slightly more than healthy number of really bad puns.  Simple things may amuse small minds perhaps, but I consider a clever pun the height of wit.

To formally define what I consider to be a pun:

A pun is a single statement, that has two or more different interpretations, all of which are true.

A few of mine that tend to get used more often than others, and please forgive the vulgarity.

A Legal Pun, Is  A Legal Pun.
Another Twit of Wit from the Wit of a Twit.
That bastard couldn’t manage an erection in a Texas whorehouse

Theoretically it appears that puns occur when a word has a single meaning that starts being used by different populations or groups of people in a different context.  After a while you end up with the meaning of the word splitting into two or more distinct definitions whilst retaining  the same sound and often spelling. When the words come back into contact with each other as different groups interact, as often occurs with the hodge podge called English you end up with a pun.

Observations on language aside, if you have some of your own Twits of Wit that you consider worthy extensions for the Wit of this Twit then please let me know.

More will be posted as time, inspiration and – you guessed it – wit – allow…

And a Final Comment, Not Mine, And Technically Not Correct – But Worthy Of Repeating.

These bastards couldn’t find a root in a wood yard

Which is generally applied to politicians management and occasionally the Wallabies or the Australian Test  Squad as context permits.

Sic ‘Em Rex

October 26 2008 | Personal | No Comments »

Crackpot Index: Noise Filter

Or Inspiration Killer

I came across John Baez’ Crackpot Index the other day.   It is an interesting read and provides an interesting insight into the academic mind.

I have to wonder though what happens when some poor bastard develops an unorthodox view of the world that predicts effects outside the accepted sphere of knowledge and who makes the mistake of referencing Einstein and Feynman in the same document.

A simple method for rating potentially revolutionary contributions to physics:

  1. A -5 point starting credit.
  2. 1 point for every statement that is widely agreed on to be false.
  3. 2 points for every statement that is clearly vacuous.
  4. 3 points for every statement that is logically inconsistent.
  5. 5 points for each such statement that is adhered to despite careful correction.
  6. 5 points for using a thought experiment that contradicts the results of a widely accepted real experiment.
  7. 5 points for each word in all capital letters (except for those with defective keyboards).
  8. 5 points for each mention of “Einstien”, “Hawkins” or “Feynmann”.
  9. 10 points for each claim that quantum mechanics is fundamentally misguided (without good evidence).
  10. 10 points for pointing out that you have gone to school, as if this were evidence of sanity.
  11. 10 points for beginning the description of your theory by saying how long you have been working on it. (10 more for emphasizing that you worked on your own.)
  12. 10 points for mailing your theory to someone you don’t know personally and asking them not to tell anyone else about it, for fear that your ideas will be stolen.
  13. 10 points for offering prize money to anyone who proves and/or finds any flaws in your theory.
  14. 10 points for each new term you invent and use without properly defining it.
  15. 10 points for each statement along the lines of “I’m not good at math, but my theory is conceptually right, so all I need is for someone to express it in terms of equations”.
  16. 10 points for arguing that a current well-established theory is “only a theory”, as if this were somehow a point against it.
  17. 10 points for arguing that while a current well-established theory predicts phenomena correctly, it doesn’t explain “why” they occur, or fails to provide a “mechanism”.
  18. 10 points for each favorable comparison of yourself to Einstein, or claim that special or general relativity are fundamentally misguided (without good evidence).
  19. 10 points for claiming that your work is on the cutting edge of a “paradigm shift”.
  20. 20 points for emailing me and complaining about the crackpot index. (E.g., saying that it “suppresses original thinkers” or saying that I misspelled “Einstein” in item 8.)
  21. 20 points for suggesting that you deserve a Nobel prize.
  22. 20 points for each favorable comparison of yourself to Newton or claim that classical mechanics is fundamentally misguided (without good evidence).
  23. 20 points for every use of science fiction works or myths as if they were fact.
  24. 20 points for defending yourself by bringing up (real or imagined) ridicule accorded to your past theories.
  25. 20 points for naming something after yourself. (E.g., talking about the “The Evans Field Equation” when your name happens to be Evans.)
  26. 20 points for talking about how great your theory is, but never actually explaining it.
  27. 20 points for each use of the phrase “hidebound reactionary”.
  28. 20 points for each use of the phrase “self-appointed defender of the orthodoxy”.
  29. 30 points for suggesting that a famous figure secretly disbelieved in a theory which he or she publicly supported. (E.g., that Feynman was a closet opponent of special relativity, as deduced by reading between the lines in his freshman physics textbooks.)
  30. 30 points for suggesting that Einstein, in his later years, was groping his way towards the ideas you now advocate.
  31. 30 points for claiming that your theories were developed by an extraterrestrial civilization (without good evidence).
  32. 30 points for allusions to a delay in your work while you spent time in an asylum, or references to the psychiatrist who tried to talk you out of your theory.
  33. 40 points for comparing those who argue against your ideas to Nazis, stormtroopers, or brownshirts.
  34. 40 points for claiming that the “scientific establishment” is engaged in a “conspiracy” to prevent your work from gaining its well-deserved fame, or suchlike.
  35. 40 points for comparing yourself to Galileo, suggesting that a modern-day Inquisition is hard at work on your case, and so on.
  36. 40 points for claiming that when your theory is finally appreciated, present-day science will be seen for the sham it truly is. (30 more points for fantasizing about show trials in which scientists who mocked your theories will be forced to recant.)
  37. 50 points for claiming you have a revolutionary theory but giving no concrete testable predictions.

Sic ‘Em Rex

October 26 2008 | Opinion | No Comments »

Absurd Phrase: Steering Committee

MIND YOUR HELM!

Have you ever thought about the phrase “Steering Committee”?  Have you ever considered what an absolute absurdity the phrase “Steering Committee” is?  Think about it. Hold each of the words in your mind, “Steering” and “Committee” and just let the images form.  If you are anything like me or the former Royal Australian Navy guy a desk over, a huge grin is probably warming up your cheeks right about now.

It’s not just the problem of a whole collection of people all attempting to steer in different directions all at the same time,  which if you think about it averages out to no direction at all.  It’s the practicalities of actually doing it.  Do they all have their own helm, or do they take turns at the wheel. Perhaps they vote, or at least spend endless hours voting about the right way to vote.  The wrong way to vote of course being any vote that results in the wheel not turning in the direction they want it to go.

From my experience though the most common mechanism is that they all scream contradictory instructions, all at the same time, to some other poor bastard whose job it is to get to a specific place at a specific time.

Now the previous can be managed.  If they are yelling about going in a direction you want to go then it’s easy to help and you can score brownie points. The ones who want to go somewhere else generally don’t agree with each other anyway so you can usually point them at someone else with a third view and just sit back and watch the fireworks.

Having different needs is one thing. Even trying to ensure that your own view is at least considered is acceptable. But where it becomes a real problem is when people actively subvert each other and the organization as they attempt to move things in a direction that suits their personal objectives.

When this occurs then you have a problem.  The direction set by the people who sign your pay cheques is the direction. Thats it. End of Story.  Your job, you know that thing you are being paid to do, is to follow the direction set.  If you don’t want to go where the organization wants to go, if you are unable to follow instructions set by the organization,  then the answer is easy, clear your desk, put your wife’s photo and mouse mat in your little cardboard box, pick up your coffee cup and off you go.

Perhaps you are in an organization where the direction is not clear, where there are no objectives, no goals, nothing to achieve and no leadership anyway.  The sort of place where senior management is never seen and the steering committee reigns supreme.

In that case the answer is also easy. See that cardboard box?  Awfully tempting isn’t it?

Sic ‘Em Rex

October 22 2008 | Opinion | No Comments »

Park Bench Mortgages

The Crash of 2008

Normally I would write on IT and related topics, but the current market conditions deserve a comment.

It is easy to be a prophet of doom in the current climate, but even my most optimistic thoughts have long gone. I am seeing 7500 as a realistic level on the Dow.  Chart Here. Technically this follows from the intersection of a  long term trend line going back 20 years and the support line formed after Sept 11 2001.  What’s scary is that I am seeing that this month perhaps.  Worse if 7500 doesn’t hold then a figure I have heard bandied about that I can’t really argue against puts us somewhere in the 5000′s moving forward.

So when will it be over? From my call it will be over when people perceive there is value in the market place. In simple terms it will be over when people can see opportunities over the medium to long term.

Unfortunately that is also the problem. From where we are now there simply is no growth in the market.  That famous line from Jerry Maguire is “Show me the money”. Try it. More explicitly  show me the sector, index or even company that will experience growth for the next five or ten years and that is what I will buy.

Working against us is the fact that the usual suspects – the Baby Boomer’s are about to retire en-masse.  In three years time all of  of those selfish horrors that have forced the rest of us to put up with endless tales of their first joint, their first love , the Beatles, Woodstock and the Vietnam war, all hit 65 all at the same time.

Money Out Not Money In

In practical terms that means that money won’t be flowing into super funds – it will be flowing out.  These guys won’t be working any more, that means they won’t be producing products to sell – which if we had any local manufacturing left would probably matter.  More importantly from an economic standpoint the Baby Boomer’s won’t be paying tax if they are not earning and they won’t be paying Goods and Services Taxes if they aren’t spending.  In fact these guys will be creating a demand for both health and welfare. That means money out – not money  in…….

So big picture wise I am seeing a reduction in economic activity due to a reduced workforce, higher outgoings and no areas of growth. In fact I think things may be worse than they look because as people retire they are not counted as unemployed. We are probably already seeing a contracting workforce as many of the Boomers have already left full time work. As usual the lying bastards we vote in have fudged the figures so that it is “technically” not unemployment.

So what happened?  Well in simple terms people got older and growth slowed.  It is no secret that  there is a correlation between the first shock that hit the market back in 2001 when the cashed up baby Boomers hit 55 and started pulling money out rather than putting it in to the market.  Before that there was a surge of superannuation account top ups – compounded by easy access to online trading.

I suspect – although have not proven that this was a causal relationship as well as just being a temporal correlation. (Which means that one thing caused another rather than they just occurred at the same time)

Sub Prime Is An Effect Not A Cause

The major symptom of this slowing in the economy is the chaos we see today in the lending markets.  For a while there you had the Baby Boomers as well as their kids, the “After Boomers” both competing in the real estate market at the same time creating a doubled up demand for housing.  They were both going to auctions and were bidding against each other. One wanted a first home, the other an investment property. Everyone watched TV shows about how to renovate and sell your home for more than you paid – “Auction Squad” here in Oz.

Everyone thought they were a real estate geniuses as they sat in their little row boats on a rising tide.  Governments clapped themselves on their backs in an orgy of mutual masturbation admiration, loudly claiming responsibility for the good times.

At some point though a time was reached where the Baby Boomer’s all were living in houses, had a second or third investment property, their kid’s had taken out their first mortgage and all of a sudden everyone had more houses than they needed and demand dried up.  When this occurred someone somewhere figured out that there was no more growth in the real estate market and they could not count on market demand to protect their money.  In fact they were probably exposed to risk because that $300k property without demand is probably only worth $250k or less.

The money lenders had an answer for this. They came up with the great idea of selling mortgages to people who really should not have had them in the first place.

What  they did was to lower their risk by selling the debt they were owed to someone a little dumber than themselves.

Warning Warning Will Robinson!!

Alarms should have gone off at this point. People don’t sell good loans!!!!!

To paint a more visual picture, and please note the figures are for argument, the actual amounts are probably different.  Someone loaned the guy on the park bench $100k at 10% to buy a home. After all the value of the house would go up and so the loan was secured.   But one day they looked at  their population vs age graphs and determined that maybe the growth would slow down at some point soon. This meant that the guy on the park bench was a higher risk than was desirable.  To cover their position they on sold the loan at 8% to someone else, still making 8 points.   Not as good as 10, but better than none eh.

The person who bought the loan – who probably hadn’t looked at their population vs age graphs, who figured growth would go on for ever and who probably still believes that there is such a thing as a free lunch, thought they would make 2% for nothing and if the worst occurred they would sell the guys house from underneath him.

In practice what happened was someone loaned the guy on the park bench money they should not have had in the first place, then sold the debt to you and told you to chase the guy wearing his underpant’s on his head for your capital.

Who is the idiot…

Hindsight is a wonderful thing.  The question, and it is a big one, was whether there was intent behind the on selling of debt.  Business is business and risk is risk – fair enough.  But a rip off is a rip off and exploitation is exploitation.  I don’t know about you, but where I come from to intentionally damage someone else, or the economy in general does not serve Justice and in my book that ain’t legal.

Sic ‘Em Rex!

October 18 2008 | Economics | No Comments »

Be Wary of Consultants

Snake Oil Salesmen Beware

This started as a final rule for the post on System Installation to try to get the point across that writing an installation script is not as hard as external consultants would advise, but then realized it is worth a post in it’s own right.

This golden rule of IT. Do not trust the advice of companies or people that make their money by making your systems more complex.  They will all ways make things harder than they are and then offer resources – which  you are paying for – to solve the problem.

There is an unwritten law of consulting “The solution to every problem involves two more consultants”. So when your external consultants tell you it’s too complicated, that it will need three of their staff on standby for the rest of eternity, will take six months to develop and will involve a total rewrite of the code base; ask yourself what’s in it for them….

The IT industry is worth money. It is a small pool of technically literate people surrounded by a larger pool of barely literate – “9 to 5 IT types – coz it pays well” surrounded by a lot of sharks.  As an industry it is a lot like the law.  Once upon a time few people could read or write – and the lawyers got paid by the word – which resulted in long sentences and little justice.

In todays world the legal types have arranged things so they get paid by the  fifteen minute block and trials drag on endlessly as the stream of professional witnesses and other consultants chew up the states dollar.

Think of the tax system which is designed by accountants and tax lawyers. Has it ever gotten simpler? Talk about the fox guarding the chicken coop.

IT is exactly the same.  You need to ask yourself why you think it is so hard.  Who created that impression and what are they getting out of it.  Do you know if the task at hand is as complicated as you have come to believe or are you repeating what someone else told you?

You go to a meeting with an external vendor and you find ten of their resources sitting around the table all religiously following their “CMM level 4″ process.  Do they all need to be there?

Do not confuse a “Quality Process” with “Process Quality”.  Two entirely different things my friends.

Lets put it in more familiar terms. You want a new driveway laid and the consultant comes in and says it will cost a few thousand dollars. Half way through he would like to bring in another consultant to do soil quality tests, and another four people to measure the surrounding driveways so you can compare the slope of your driveway against industry benchmarks.

Before you know it you have a dozen people holding a driveway requirements focus groups, followed by a six month period of weekly strategic workshops…..

Sound familiar?  Do you know managers that fall for this shit?  If you find em, fire them. Get them out of your organization fast. Let them be your competitors problem.  Imagine what damage they could cause somebody else’s bottom line.

So reality check people. This  is business.  If you are not on your toes someone will fleece you.

That is what they get paid to do…

The hard thing for “most people” to get their head around is that other people are making money out of “most people’s” ignorance. Pride is a killer here.  Senior management types with the ego’s to get to the top will never admit what they don’t know.

So the final word on this one – it turned out to be a bit of a rant – IT is a trillion dollar business and on this particular dirtball there is no “Principle of Fair Exchange”.  It is perfectly legal to gain an unfair advantage over another person – to rip someone off.

It is perfectly legal to use a loss leader and come in at the price the customer wants to see, and then raise endless change requests along the way that double the price before they get half of what they want.

So be wary, particularly of silver haired used computer salesmen with a firm handshake, the gift of the gab and a bag full of solutions to problems you didn’t even know you had.

**cough** snake oil salesman **cough**.

October 17 2008 | Opinion | No Comments »

System Implementation For Dummies

System Implementation; the bane of every system development.

You have a collection of software that you presumably spent months if not years developing, all of which depends on other pieces of software, which themselves are in a state of change and may even depend on the piece of software that you have just written.  Assuming  that you have followed some sort of methodology you have very carefully collected requirements, designed the system, written the code, unit tested it, functionally tested it, tested it as an integrated system, had your users test it,  and finally by some miracle obtained a sign off from your customer that all is ready and it is time to turn it on.

So what happens.  You organize a major production outage – often over a weekend, arrange for a dozen different groups of people to sit down in front of various computers and very carefully follow a hundred page thick set of manual instructions that tells them to start and stop various processes, back up various databases, manually change lines in a dozen files all in the correct order at precisely the right time, never making a typo….

So what’s wrong with this picture of a manual install of an IT system, apart from the fact that it seems to be standard practice in too many places.

I will let you think about that one…. **cough** you are a programmer **cough**

Let’s have a look at what a system implementation entails. In a nutshell what you are doing is making some changes to some files on a disk and adding some new files to the system, hopefully in such a way that if something goes wrong you can rollback to the state you were in before you started. You probably at the end of this exercise you will stop and restart some processes to ensure the new files are picked up.  That’s it guys – it is the same on Unix, VMS, Windows and every other operating system from your iPod to the Space Shuttle.  Now don’t give me any of this grief about “It’s got a database, or .jar files, cron jobs that all depend on each other and its too complicated” etc.

Something the technical types probably haven’t told you, or you forgot back in your first year lectures is that all software consists of collections of bits in various states arranged in things called files. All system and software work consists of changing the states of those bits.

So here are some tips.

Learn “make”

If you are on unix and call yourself a programmer, you really need to learn how to use the “make” utility. You have probably run the following sequence a hundred times.

$./configure
$make
$make install

See this site for details or try this google search.

Failing that, because to be honest “make” is non trivial.

Learn a scripting language.

Perl is a good one, but there are many others, then try the following exercises.

  • Write a script that will create a temporary directory and put files in it.
  • Write a script  that  will moves files from one directory to another.
  • Write a script that will create a directory and then move a list of files from a known location into it.
  • Write a script that will read a file and find a particular line.
  • Write a script that will read a file, look for a particular line and write a new file with that line changed.
  • Write a script that will start and stop a given process.
  • Write a script  that will run other scripts.

Now comes the hard part. Write a script that will stop a process, move a collection of files to a new directory, change the lines in a couple of these files, then move a collection of new files from some other directory into the original location and restart the process.  To rollback you simply reverse the sequence.  Stop the process, move the new files out and the old files back, restarting the process at the end.

By the way if you can’t do the previous – which amounts to a first year tutorial – what are you doing in the industry?

Predeploy

What does that mean?  OK normally you will be doing all the hard work at some ridiculously late hour of the evening, you are tired, all your operations staff are home in bed, there may not even be anyone with system privileges in your data center at that time of night.  Predeploy means to do 90% of the hack work during business hours when all your operations staff are on deck to help if something goes awry. All you want to be doing during your outage window is the simple task of moving files to their new locations.

Script Everything

You should never ever ever ever be reliant upon someone correctly typing in a stream of console commands at 3:00am.  It should be idiot proof.

Put all variables in a single configuration file.

You should never ever have to pick through a hundred files to change the name of an installation disk.

Test Everything

Lets assume you have followed the rules above and you have written an installation script that will stop processes, move your old code somewhere safe, move in new files and restart the server.  Do yourself a favor and test it.  The installation script is a program developed just like the multi million dollar system you are using it to install and it needs to be treated in the same way.  In fact your installation script if you do it properly will have requirements, a design and test results just like any other piece of software.

Run Things In Parallel.

The “Ok” we will install this piece and if that works, then the next piece etc strategy is complete bullshit.  What happens if the last  component fails six or seven hours into an eight hour window….. You are at the end of the outage and you now have to roll everything back.  Stop your servers, move the files across and restart.  If it fails you have to investigate and either fix or rollback anyway.  In either case give yourself the largest  window possible. Never ever allow yourself to be under time pressure, that is when mistakes happen.

Perform The Install When You Have A Full Backup Scheduled.

This is usually the time consuming part, waiting on a full backup to complete.  So make it easy for yourself. Schedule the final cutover ,which should really only take an hour at most, to run at the end of a scheduled outage window.

So that’s it guys, believe me; as a programmer it is probably faster and easier to write the installation scripts than it is to write the hundred page document of obscure installations steps, attend all the implementation walkthroughs and struggle through a manual install under extreme time pressure at some awful hour of the morning.

October 13 2008 | Development | No Comments »

Documentation Tools: Doxygen

Self Documenting Code!!

The Doxygen documentation tool is a must have. I have been using it for some years now with no problems at all. Some major examples can be found here but perhaps the best way to show you it’s output is to link to some of my own code.

To produce the following I downloaded Doxygen and, pointed it at my code and simply ran it. I run it under Windows, but there are packages available for all sorts of operating systems. It will handle C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.

NOTE: As this post is quite old and the documentation was chewing up a Gig on my hosting companies servers I have removed the old documentation

Client Code

Server Code

To see the whole class hierarchy you click on the “Class Hierarchy” tab at the top of the page and then “Go to the graphical class hierarchy”

A good example is one of the busy pieces of my code that is used as a base processing class called CProcessor from the Server Code link. This is the base class for a whole collection of different types of derived classes as you can see if you scroll down the class hierarchy page.

All those things with lines connected to CProcessor are derived classes that make use of the code in CProcessor. In practical terms this means that if I change CProcessor and make a mistake then all those derived classes will be impacted.  Where this is an important analysis tool is that it enables one to see what does and what does not need testing. This enables testing effort to be directed where it is needed.

Now you can go further. If you click on the CProcessingBlock and scroll down you will see all the member functions. Now if you click on one of them – say CreateCellField you will see every function that calls CreateCellField. It might take a couple of seconds for the page to display – this is a big complex class.

Now I didn’t do anything to my code to prepare for this – simply ran it.  It took me a couple of hours from scratch.  In fact it took longer to upload the html it produced to this website than it did to produce the files.

Also if you play around you will see that the source code that produced the hierarchy can also be reached by clicking on the appropriate header file or source file name.

As a final comment. If you actually document your code as you go – something I find often starts with good intentions – you can embed comments into the code using three slashes /// rather than the traditional two // which will produce output similar to that found in my CAxisPlane class from my client.

What Does It Cost?

It is open source licensed, which makes it free, always a good thing. The following is from the Doxygen site.

Doxygen license

Copyright © 1997-2008 by Dimitri van Heesch.

Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided “as is” without express or implied warranty. See the GNU General Public License for more details.

Documents produced by doxygen are derivative works derived from the input used in their production; they are not affected by this license.

Final Comment

For the record this is the thesis version of my code StrawberryFields 1. It is unreleased as I don’t have the time to support it.  The new code StrawberryFields 2 is essentially a total rewrite built around XML rather than MySQL with the editor being better suited to nanoscale research. In simple terms it uses all the lessons learned writing the first one, doing my thesis and figuring out what Mike Ford and associates really wanted rather than what  I thought they wanted.  But unfortunately the whole thing is on hold for a few years, at least until the economy sorts itself out.

Study the Mistress.  Work is the Wife.  If I want to spend time with the former then I have to pay my dues to the latter….

With things as they are that may be some years.

October 09 2008 | Development | No Comments »