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.
Friday, November 18, 2011
Delphi Post Build Process
Posted by
Chris Bensen
at
7:00 AM
0
comments
Labels: Delphi
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!
Posted by
Chris Bensen
at
8:00 AM
0
comments
Thursday, November 10, 2011
The Etymology of the Word Geeks
I guess the link is gone. Bummer. It was funny!
Posted by
Chris Bensen
at
7:00 AM
0
comments
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)
{
list.remove(i);
//..do 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)
{
i--;
list.remove(i);
//..do 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.
Posted by
Chris Bensen
at
7:00 AM
7
comments
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.
Coupons.com 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?
Posted by
Chris Bensen
at
7:00 AM
0
comments
Friday, October 7, 2011
Steve Jobs
Steve Jobs, the Galileo of our time, will be missed. I will always remember the commencement speech he gave at Stanford.
Posted by
Chris Bensen
at
7:00 AM
0
comments
Thursday, September 22, 2011
So I Upgraded to Lion
At the moment I'm not so sure Lion is better. Snow Leopard was clearly better than Leopard, and Leopard was clearly better than Tiger. Some things are snazzier, but just use extra CPU cycles and batteries. There are some nice features such as just close the lid of your laptop with an external display doesn't sleep the computer. But there are a lot of little problems. iCal doesn't connect which is odd. The new look of iCal, Address Book and Mail is interesting. Apparently they are phasing out iChat because it wasn't in the dock but rather replaced with FaceTime. Why are FaceTime and iChat different apps? Boot time actually seems to be longer. With Windows 8 boot time bloody fast I can't imagine
There are two reasons I upgraded:
1. I got a new MacBook Pro that I loaded to the gills with memory and swapped out the default HD for the fastest thing I could find so I wanted to run the OS that it shipped with.
2. It's usually better to stay up to date rather than lag behind. I typically lag behind if the OS bad or adopt it rather quick if it's good. I held off with Leopard because my printer wasn't supported for 6 months.
Does anyone have any input that I'm missing? Is anything really way better? Is your boot time different than mine?
Update: I upgraded to an SSD drive and maxed the RAM out and now it boots instantly. It's pretty awesome actually.
Posted by
Chris Bensen
at
10:00 AM
5
comments
Wednesday, September 14, 2011
Windows 8 Developer Preview
The Windows 8 Developer Preview is worth a look.
Posted by
Chris Bensen
at
9:20 AM
0
comments
Friday, September 9, 2011
.NET Gadgeteer
Creating little gizmos has always intrigued me. I picked up a Lego Mindstorm on a whim years ago but I always struggled with the Windows 98 requirement. I've had my eye on an Adruino for some time but the .NET Gadgeteer looks pretty interesting. Check out this article:
.NET Gadgeteer - an alternative to Arduino?
Posted by
Chris Bensen
at
7:00 AM
0
comments
Thursday, September 8, 2011
Delphi XE2
Congratulations to my the Delphi team (my old team) for getting this monster of a product out the door. I had lunch with a bunch of the engineers and got to hear some of the war stories. I worked on a lot of the Mac bits so it's nice to finally see that ship. I have some posts written somewhere on some of the RTL functionality that was written over a year ago so I'll have to dig them up, download the trial and see if they are still relevant and post them so everyone can benefit.
Posted by
Chris Bensen
at
7:32 AM
0
comments
You Want to Write Good Software
Before you do anything else promote all warnings as errors.
Do static code analysis. There is software for this, use it.
Try and optimize for readability but understand what is going on underneath. In other words, don't just write code that works, write code that is efficient. Every bit of extra overhead is extra clock cycles or memory that could be used for something else. Everything is going to mobile and extra CPU cycles is battery life.
Expect that your code will last a long time. Someone else will need to maintain the code. So write good clean readable code.
Only document the things that are difficult to understand. All too often I see comments such as "\\ copy this to that". Seriously this is a lame comment. If it is necessary explain why the copy is necessary, otherwise leave the comment out because the copy will be self documenting.
Format your code correctly for the project so someone else doesn't have to do it later which will make all the blames go to that person.
Just take some pride in your code. At the end of the day you'd rather people say "damn that's some nice formatted elegant clean code, I'd love to work with them again." Think of your code as your legacy.
Posted by
Chris Bensen
at
7:05 AM
0
comments
Wednesday, August 31, 2011
Netflix
I went with 1 DVD out at a time. How about you?
Posted by
Chris Bensen
at
3:44 PM
1 comments