Friday, November 18, 2011

Delphi Post Build Process

I was just going through the many posts that I haven't posted for various reasons and here was one that I found that someone may find interesting concerning Delphi XE but it should apply equally to Delphi XE2.

Since the beginning the EXE was build in the project directory right next to the .dpr. Now it lives in [Project Name]\Debug\Win32\[Project Name].exe which causes problems with my muscle memory at times so I've added a post build process to create a symlink.

Thursday, November 17, 2011

Review: Bose Noise Canceling Headphones

I've had a pair of Sony MDR-V6 headphones for years. Although according to price the Sony MDR7506 headphones are a little better. But I digress. In March/April 2010 Embarcadero moved the Delphi team from the old Borland facility to an older office building in Scotts Valley. Once we got in there it turned out the fan for the air conditioner/header was super loud. So loud I couldn't discern the difference between going to the office and being on an airplane. Seriously, it was that loud. I first tried out my iPod ear bud headphones because I had them in my bag but had to crank the volume to hear anything. And let's face it, the only thing going for ear buds is convenience because they are so small and fit in your pocket. So I tried my Sony MDRV6 headphones. They were better but not by much. The dull roar of the fan was still there. So I started my pursuit to find a good pair of noise cancelling headphones. After many failed attempts of trying out bargain priced noise canceling headphones from Radio Shack (The new "The Shack" name makes me laugh) and the like I decided to try the expensive ones. I tried out almost all of them and can tell you with confidence that the Bose QuietComfor 15 Noise Cancelling headphones are awesome. If you have a need for noise canceling headphones these are the ones to get. You will only be disappointing with the nearly three c-notes you'll pony up and the occasional AAA battery it takes to run them. We take them on flights and everyone fights for who gets to wear them they are that nice! If you fly, definitely get yourself a pair!

Thursday, November 10, 2011

The Etymology of the Word Geeks

I guess the link is gone. Bummer. It was funny!

Wednesday, November 9, 2011

Clever Code

Every once in a while I run across a bit of code that I find rather clever and I examine it to see if I like it or not. Really it's to see if I ever want to keep it around for my bag of tricks. Sometimes the code is a nice design pattern or sometimes it's rather small, like today's clever bit of code. Today's clever bit of code is this rather simple loop written in Java, but it'd work just fine in C or C++:

  int i = list.size();

  while (--i >= 0)
    // something

At first glance I kinda liked it. Simple, elegant does the job in a few less lines than I would have written. Here's is probably what I would have written:
  int i = list.size();

  while (i >= 0)
    // something

Now after thinking about this bit of code I've come to the conclusion after trying it under a few different C compilers and the Java compiler, I don't like it. i is evaluated then no matter what in all the cases that I tested i is decremented. Not a huge deal, in this small example i will always be in a register, but if the body of the loop contains a bit more in it like the one I was looking at then there's a couple extra mov instructions generated as well.

Am I being picky? Yes, yes I am. I'm not always this picky. I prefer readable code to optimized code, but in this case I don't find it more readable and it is less optimal.

Friday, November 4, 2011

Wholly Cheese Batman, Groupon IPO

I think this is the largest IPO I've seen since maybe Google. I did not expect this and had no idea Groupon was quite that big. I'm still trying to get my head around which is why I'm posting this.

My question is simple "Does Groupon have a bright future and is it worth investing in?"

I was pretty down on Groupon when the Missus bought a Groupon for a local restaurant and the restaurant didn't honor the Groupon. We read through the fine print and they will refund your money for any reason. Not all the other competitors will do that. I'm not sure of the legalities of not refunding because you could call your credit card company, but they were really good about the refund so I'm less down on them. Needless to say the Missus has the Groupon app, watches for deals and buys deals that we would ordinarily buy or that look really fun. Maybe that is the customer base, I'm not the person they are targeting.

So is Groupon the next Google? I wouldn't have imagined they are, but then again the business model of grabbing loads of customers, making them addicts, and then leveraging that with other services seems to be a model that has worked before (Amazon, ebay, Google, Yahoo to name a few).

There are a few other similar services out there but Groupon has the household name just like Xerox and a number of other things out there. So that's a huge plus. The question is what will Groupon do with that $700 million? If they can expand and provide unique things such as unique opportunities to see behind the scenes at a making of the next Batman movie then I think they have some serious potential. is another competitor that offers a monthly subscription to get discounts. Seems odd to me, but it seems to be working for them.

So do you have any insight into Groupon that I don't? Have you plunked down some cash to get in on the action or are you just and avid Groupon addict?