Click to login
Francis Shanahan[.com]
Of Supernovae and Caesar's Last Breath
[Jun 2/08, 6:31 AM]


A recent article in the New York Times described scientists observing a supernova in action [LINK]. I couldn't help but be amazed at the science in this article. It also reminded me of some other facts about life, space and myself which are not always top of mind.

Essentially the article describes how scientists were able to observe a supernova from the very beginning of the process. It's very rare to have a telescope pointed at the right spot in the sky in order to catch this. Normally astronomers see the afterglow of the collapse which might be months or years old. It's kind of like the Universe's Funniest Home Videos except replace "Funniest" with "Fascinating" or "Scientifically Significant".

This event took place 88 million light years away.  A light year is of course the distance light travels in an Earth year (about 6 x 10^12 miles). In more meaningful terms; this event, relative to time on Earth, happened 88 million years ago and light from the event has traveled the vast distance across space and is starting to reach us now.  You have a window of a few months to capture the data with a telescope. What an amazing thing that we here we are 88 million years later, capturing the event in our telescopes.

The Earth is roughly 4.5 billion years old. the universe itself is estimated at 13.5 billion years. In that time matter/energy is neither created nor destroyed and doesn't go anywhere. It hangs around changing form. Entropy is conserved.

By that reasoning, each and every particle in your body, is roughly the age of the universe. I'm not 100% certain of the accuracy of that statement but I think a more firm statement is that the information (entropy) contained in the particles that you are made up of has remained constant and is at least the same age as the universe. Note I said particle, not necessarily atom.

We also have the old example of Caesar's last breath. What happened to the air from Caesar's last breath? Answer: nothing, it's still around. If you do the math involved in the number of molecules he breathed out, combined with the time since then, assuming a uniform distribution, it can be shown that with each and every breath we're breathing in the SAME atoms he breathed out. [LINK]. Rebeca Watson [LINK] made the observation that given enough time passed, with each and every breath we're breathing the flatulence of everyone that's ever lived. Oh dear. I think I need a mint.

So at different levels, we're different ages. Whilst I'm now 33, at the molecular level I'm thousands of years old. At the atomic level, I'm probably as old as the Earth, ruling out the possibility that my atoms arrived via meteorite. At the particle level, my matter dates all the way back to 300,000 years after the big bang. At the Entropy level, I'm as old as the universe. Not only that but that but my Entropy will live forever.

This sort of thinking may also indicate I may be having a mid-life crisis of some kind.
TrackBack URL | Add Comment.
Unfiled
Code Optimization
[Jun 1/08, 10:47 AM]
My co-worker Marc's got a good post on code optimization[LINK]; I couldn't agree more in this case.

I think programmers should be given a mandatory course in games programming and/or embedded systems. One of my first jobs out of college was programming a home-grown smartcard reader for the CAROLAN project [LINK]. Can't believe I found that link. I worked on this for 3 weeks in a tiny shop above a bakery in Rathmines. There was myself and one other guy, the electrical engineer who was busy soldering up boards on the other side of the room. It was a lot of fun.

I've written a few game-type things back in the day, the Maze of Madness[LINK], Dungeon of Death[LINK], Gloop[LINK] and so on.  Essentially you can't get good frame-rates without a little optimization.

One thing I hear commonly is that optimization is something that was easier in the "OLD" days of C, C++ and Assembler. I'd challenge this with an example I wrote recently in C#. It's a thing that creates collages/mosaics using the Discrete Cosine Transform [LINK]. the basic steps are as follows:

a) Gather images from Flickr
b) For each image, compute the DCT, storing the largest components of the transform along with their positions.
c) Take an input image and split it into sample areas.
d) For each sample area, compute the DCT vector.
e) Scan the database of DCT vectors to find the closest match using the Root Mean Square [LINK]
f) Place the highest scoring image in the sample area and move on...

This is a neat little application and as you can see quite CPU intensive with MANY places for optimization. Nevertheless, after gathering a database of over 35,000 images, the application takes roughly 1 second PER sample area when computing the best target image. This is after much optimization.

As you can see, C# is a powerful language with many conveniences and advanced constructs to make programming easier. That said, it's ALSO possible to perform a lot of optimization, without the use of assembler or C.
TrackBack URL | Add Comment.
Unfiled
Back-Log of Work, Twine Invite and a Pit in my Stomach
[May 30/08, 6:32 AM]
Ordinarily I'd say "work has been crazy" but lately life in general has been crazy.  I have an excess of things which are all scrambling for time in my conscious mind. 

My recent thumb injury is healing but the nerve damage is causing a lot of problems. Imagine constant, intense pins and needles in your thumb, not being sure if you're holding something with adequate grip pressure and lastly severe shooting pains on the slightest touch. Yes I know, boo hoo, wah wah.

Prentice Hall was nice enough to send me a bunch of books (of my choosing) free gratis in the hope I'd read them and provide some feedback. I barely have time for food let alone reading but one book that's been cracked a few times is "SOA Principles of Service Design". [LINK] I've even come up with a horrible joke on the topic...

"Did you hear the one about the anti-social WSDL?....He was a real pain in the SaaS".
Ugh, *groan* that's almost too bad to write down.

So I'm working through this book and will publish some thoughts when I've gotten through enough of it to do it justice.

I've come up with a number of projects ideas which I'm hoping to develop on a common framework. I need an outlet more to rid my mind of this stuff than to achieve anything particular. Not sure if that statement objectively makes sense but hopefully if folks know me they'll understand what I mean.

I have (finally) gotten access to Nova's Twine Beta [LINK], I have high expectations and will post more on my experiences in the coming weeks.

Lastly, I have a pit in my stomach this morning as Karen is undergoing another round of chemo today. I cannot convey in words how hard this is for all involved (Karen, our kids and if I'm feeling selfish, myself also).
TrackBack URL | Add Comment.
Unfiled
The Most Pollutant Drawing in the World
[May 24/08, 6:08 PM]
This guy made a drawing using a GPS device in a briefcase and DHL. [LINK] A process known as GPS Drawing. (Also checkout Geo-Caching for more fun with GPS devices). He claims it's the "Biggest Drawing in the World". Great.

On first blush this seems like a neat idea. However, I can't help wondering...

a) Why bother? You can generate those GPS coordinates and draw the picture without ever sending anything anywhere.
b) The picture is a self-portrait. I would've hoped if you're going to draw a big picture on the Earth you could think of something that'd have a bit more meaning to the other 6 billion people you're drawing on.
c) With all that fossil fuel spent flying the briefcase 110,000 miles, this is certainly the least eco-friendly drawing ever made. Compare to the tiny bit of graphite the pencil on paper would've used. Talk about excessive carbon footprint!
d) Is it Fake? Seems hard to imagine a shipper sending a package in weird loops out over the Atlantic Ocean just for kicks.

So I'm left thinking this artist's a self-serving moron. I guess that's art for you.
TrackBack URL | Add Comment.
Unfiled
Math Chuckle
[May 22/08, 10:43 PM]
This gave me a chuckle...


TrackBack URL | Add Comment.
Unfiled
Dustin: Irelande Douze Pointe
[May 21/08, 9:10 AM]
Dustin the Turkey has entered the Eurovision Song Contest. If you're not from Europe, you won't fully grasp the notion of the Eurovision Song contest. It's a song contest, held once a year across Europe, simulcast live. Most nations (with the budget) will have a song entry and the goal presumably is to see who's the best singer and song writing country. Of course most countries will enter in their native language and represent their country's heritage somehow, so it's a great cultural swap-meet.

Europeans sit glued to the television for hours on end whilst the entries perform and scores are read out by each and every country for each and every entry (bar their own).  As a kid we used to make up score-charts, copying every entry from the newspaper onto a piece of cardboard. Oh how we'd agonize on the "matrix" and usually, we'd screw it up at least once.

Ireland's won it an inordinate number of times, most famously with Dana's "All Kinds of Everything" but for me it'll always be Johnny Logan with the melancholy tune "What's Another Year?". That song is emblazoned on the far reaches of my mind from hours of repeat play on TV and Radio at a key point in my early development.

This year's entry is from Dustin the Turkey. Dustin is a hand puppet with a Dublin accent. It's a long journey to Eurovision success but as Dustin would say "Rome wasn't made out of hay". [LINK]
TrackBack URL | Add Comment.
Unfiled
Stitched Thumb
[May 18/08, 4:30 PM]
I drove a 1 inch chisel into my thumb on Friday whilst making a boat with my kids. Luckily they didn't see it happen.

It went in nice and deep, my thumb's completely numb on the corner now. Hopefully that's not permanent.

With all the power tools in my shop it was the hand tools (chisel) that got me.

Could've been worse.
TrackBack URL | Add Comment.
Filed under: Life
My Book Reviews
[May 16/08, 6:48 AM]
My book's been for sale over a year now. It was written back in 2006 and released in 2007. I fully expected the whole "Mashup" craze to be over and done with at this point. Here we are in 2008 and I'm still hearing folks touting this as "cutting edge". The latest evidence came this week actually when a vendor presented their "web 2.0" capability as if we'd never heard of it.

Writing a book is fairly rewarding. Just the satisfaction of seeing the words you've toiled over printed and bound is a unique experience.

Probably the most rewarding thing though is to read the reviews. The book is published in a number of countries. I will now shamelessly include two reviews. One from the US and one from the UK.

Robert Robbins, (Williamsport, PA USA) - "The book covers more than the Amazon APIs so I recommend it if you are interested in mashups in general. I'm very keen on JSON right now and was pleased to find that covered as well. I think the author is a very good programmer who has many clever ideas like using XSL to transform XML into JSON (although using Yahoo! Pipes is easier). I'd have to say that this is one of the few programming books I've read that presented some really ingenious solutions and creative project ideas. Most books just provide uninspiring "Hello World" examples." [LINK]

Alix, (South East) - "Recently purchased this title, and it is quite excellent. From the outset the author makes you aware that this is not going to be another of those boring manuals. He is true to his word, it is crammed with information that you will need to become familiar with if you are looking to write new web applications that havent been done before. There is plenty of information for those in the earlier stages of learning all things ASP.NET and then you are smoothly introduced into the requirements for creating mashups and remixes of widely available APIs. The real strength of the book is in inspiring your imagination to come up with new web based applications, summed up by the fact that i wanted to read and finish this book as quickly as possible because you know that good stuff is waiting for you in the later chapters." [LINK]

I'd say I'm happy with that.
TrackBack URL | Add Comment.
Filed under: My Book
Logical Fallacies in Software Architecture
[May 14/08, 6:59 AM]
I've been trying to improve my critical thinking abilities of late and to that end, the Skeptic's Guide the Universe [LINK] has been very helpful. It's through this means I've been re-exposed to the notion of the "logical fallacy". Here's a link if you're not familiar with the concept [LINK].

"A logical fallacy is a false or incorrect logical principle. An argument that is based upon a logical fallacy is therefore not valid."

Example A=B and B=C therefore A=C.

A logical fallacy might be A=C and B=D therefore A=B.

There's essentially no basis for this A=B assertion. This is a trivial example and easily pointed out. When you get into things more complex items reflecting items in the real-world it gets harder.

Here are some Logical Fallacies I'm seeing in software design:

1) Argument from authority: Stating that a claim is true because a person or group of perceived authority says it is true. E.g. "this thing scales, the vendor said so".

2) Looks Good on Paper: A particular design looks elegant and can be easily explained on paper. However is non-performant and entirely unmaintainable in real-life. Example of this is the "enterprise service bus".

3) Design from Best of Breed: Identify the functional areas covered by your architecture, then pick best of breed in each area. You end up with a master of all trades, Jack of none. Your system needs to hang together, you can't take each area in isolation.  These days with software acquisitions you can't even be guaranteed that choices from a single vendor will hang together as they might have been developed by different smaller companies.

I probably have a few more if I were to think about it. These sort of build on an earlier post "Vegetable Design Patterns" [LINK].

More on this later...

TrackBack URL | Add Comment.
Unfiled
The Quackometer on Homeopathic Medicine
[May 9/08, 6:44 AM]
A terrific article on the "Quackometer" here [LINK]. It talks about the lack of clinical testing and scientific evidence to backup the incredible claims made by the alternative medicine community.

Why do I care about this? Actually normally I wouldn't care. Just that Karen has cancer.

When a loved one is ill, you'll do anything to improve the situation. When Karen was diagnosed (over a year ago), I quickly set about researching her form of cancer, trying to uncover a potential cure or complimentary therapy.

I quickly became overwhelmed with information. Let me give you the rundown of *crap* I uncovered as potential cancer cures:
  • Reishi Mushrooms
  • Reiki (laying on of hands)
  • Flax seed + Cottage Cheese
  • Fish Oils
  • Essiac Tea
  • Green Tea
  • Pomegranate
  • Turmeric
  • Feng Shui
  • Homeopathy
  • Fresh Cell Therapy
  • Naturopathy
  • Immuno-augmentative therapy
  • Shark Cartilage
Now let me tell you what I've discovered...IT'S...ALL...B*LLSH1T!!!

That's right. Bullshit. There is no clinical peer-reviewed evidence of the efficacy of any of this *crap*.

There are two types of people preying on the cancer community: BS artists and Con artists. The first are ignorant morons, the latter are insidious opportunists.

I have every reason in the world to want this stuff to work. So does just about every cancer patient or caregiver. That makes us easy targets.

Not only do they prey on the victim's finances, more importantly they offer false hope to a group of people who are already at their most vulnerable. To which hope is needed most.

If these therapies had even a PERCENTAGE of the efficacy they claim, it would make sense then that every cancer treatment regime would factor them in. The response to this typically is that the pharma industry actively dis-credits these alternative medicines in an effort to push their drugs. Sorry, that's just plain false.  As Mark Twain said (paraphrasing) "A lie will journey around the world before the truth has put on its shoes".

Lastly and most deplorable, each of these therapies has its own chemistry. By introducing additional moving parts into the mix you run the risk of lessening the effect of clinically proven therapies.

I liked the following quote which was actually focused on prayer as a therapy (not the focus of this posting).
This pithy quote came from a cancer patient:

"Jesus is great but don't try Jesus without Chemo".
TrackBack URL | Add Comment.
Filed under: Life