Wednesday, December 31, 2008

January Photo of the Month



The photo this month was taken when I was in Yellowstone February 2006. I got to snowmobile around the park for an entire week. This photo was published in the current winter issue of Nature Photographer magazine on page 3.

Friday, December 12, 2008

December Photo of the Month


Here's a photo from my backpacking trip last October in Sequoia National Park. This photo was taken just after a very large storm at twilight from Crabtree Meadows. Just to the left of that mountain in the center and barely visible is Mt. Whitney. Here's a topo map of the area from Google Maps. The storm came on suddenly and left a lot of people stranded on Whitney. The next morning we heard and saw a dozen or more helicopters rescuing hikers. Many of them were day hikers that weren't prepared.


Tuesday, December 2, 2008

Interbase 2009

Today Interbase R&D demoed Interbase 2009 to Delphi and C++Builder R&D. There are some pretty slick features such as column level encryption, over-the-wire encryption and new ToGo edition. Click here to check out the Interbase 2009 product page. Pretty cool stuff!

Thursday, November 27, 2008

Thanksgiving

Thanksgiving is my favorite holiday. There are no gifts, just enjoy each-others company. And in Bensen family tradition, we will enjoy the sunny 70 degree weather at the beach.

If you've been reading my blog this year, thanks for giving me the chance to teach.

If you've been blogging and teaching, especially talking about Delphi, and doing it without regard for repayment, thanks. We appreciate it more than you know.

If you help people in real need, you have my deepest thanks.

Thank you.

Tuesday, November 25, 2008

Cocoa and iPod Touch

Yesterday's post was a very popular post. Maybe it's because I've been neglecting this blog. Anyhow, I got my iPod Touch because my sister is a college student and my Dad bought her an iMac when Apple had their last back to school promotion. So I was pretty stoked to get a free to me iPod touch even if it's the older generate and 8 gigs.

t's an awesome little device. So I started learning Objective C and Cocoa last Wednesday evening. It takes a bit to get your head wrapped around Objective C, but once you get in the right mind-space it's pretty clear. At first it looks like C with a bunch of garbage. Then you start seeing how the C is decorated with the objective part and bam, your in the mind-space that's required to program in Objective C.

When I get into a new language/framework I try to pick something interesting that I want to create, even if I don't finish it, just to have a goal. I then try to figure out how the language and framework are designed so I can understand the advantages of the platform. For instance something I find interesting about Objective C is all method calls of objects are actually messages that go through a dispatch mechanism. Every time the compiler encounters a method call of the form [objectInstance func] the compiler replaces it with a C call to objc_msgSend. This means that method calls on an object in Objective C are a bit slower than a virtual method call to an object in C++ or Delphi.

My little pet project that has turned out to be a lot more work than I anticipated is to port DCannon2 to the iPhone. In toying around with the OpenGL ES I've had to modify much of the existing OpenGL code since things like glBegin and glEnd are removed for performance reasons from OpenGL ES. But DCannon for the iPhone is coming along.

Monday, November 24, 2008

iPod Touch

I've been using an iPod Touch for a few months now and I really like it. I only have a few songs on it and don't use it for video. I've got a few complaints but it's still the best PDA I've used. I used a Palm Pilot for years.

The v2.0 added the ability for iCal support for multiple calendars. This is huge and worth the $10 upgrade.

The Remote app is super cool. I can imagine it being totally awesome if you had an Apple TV.

The display is really bright and easy to look at.

The feel of the unit is really solid. The only part of the unit that doesn't feel solid is the power off button on the top.

I've held the latest version and it is easier to hold. The original iPod Touch had squared off edges which are sharp on your fingers. The volume control and external speaker on the new one would be two really nice features to have.

I wish the battery life was better.

I upgraded to v2.2 over the weekend and Safari hasn't crashed yet.

Lack of a To Do list in my opinion is a huge problem. I've tried every free 3rd party ToDo list and they all simply suck. I hope Apple makes one that syncs with the ToDos in iCal.

I wish the iPod Touch could sync with my Mac without plugging in the cable, running iTunes and pressing the sync button. But they probably don't want to run out of batteries in the middle of a sync.

Friday, November 21, 2008

Bathroom Remodel Project Nearing Completion

Here are some photos taken of the last few months of our master bedroom and master bathroom remodel:








We finally got tired of the really slow progress having only time after work and on weekends all the while trying to work around our daughters afternoon nap. So we hired a tile guy to finish the tile. Pretty good timing since the economy totally tanked.







DCanon 2

DCannon 2 is finally done and can be downloaded DCannon 2 here. It will require a a graphics card that can handle OpenGL. The entire game was built with Delphi 2009 and written in Delphi using OpenGL and SDL (used for the sound library and dynamically linked of course). David Lock deserves most of the credit.

Update: The original ZIP file uploaded omitted the sounds and graphics. This new one has it all.

DCannon 2 is a two player action packed arcade style game based on the original only with a whole lot more going on. We added night and day, volcanos, lava, lava waves, ice, lightening and thunder, meteorites, and lots of new weapons.

They keyboard controls for the red player (left player) are:

Move Left - A
Move Right - D
Aim Up - W
Aim Down - S
Increase Power - R
Decrease Power - F
Fire - SPACE
Next Weapon - Q
Previous Weapon - E
Toggle Lights - Z
Fire Jump Jets - X
Deploy Shields - C
Weapon Group 1 - 1
Weapon Group 2 - 2
Weapon Group 3 - 3
Weapon Group 4 - 4
Weapon Group 5 - 5


They keyboard controls for the blue player (right player) are:

Move Left - NUMPAD 8
Move Right - NUMPAD 5
Aim Up - NUMPAD 4
Aim Down - NUMPAD 6
Increase Power - +
Decrease Power - -
Fire - RETURN
Next Weapon - NUMPAD 9
Previous Weapon - NUMPAD 7
Toggle Lights - NUMPAD 1
Fire Jump Jets - NUMPAD 2
Deploy Shields - NUMPAD 3
Weapon Group 1 - INSERT
Weapon Group 2 - HOME
Weapon Group 3 - PAGE UP
Weapon Group 4 - DELETE
Weapon Group 5 - END

Tuesday, November 18, 2008

Using TInterfaceList with for in Syntax

In Delphi 2009 you may have notice that IInterfaceListEx has added to the list of interfaces supported by TInterfaceList:

TInterfaceList = class(TInterfacedObject, IInterfaceList, IInterfaceListEx)
For those of you who use interfaces this will be of interest but I've found that most people use the class directly rather than the interface. As it turns out we couldn't modify IInterfaceList because it would break a published interface, so we had to create a new interface to allow a developer using interfaces to use enumerators which are required for the for in syntax. So there you have it. If you like to use interfaces and you use IInterfaceList, you can now use the for in syntax.

Wednesday, November 5, 2008

November Photo of the Month


Here's a photo from my September backpacking trip of the Kern River.

Tuesday, October 28, 2008

Delphi Prism

The following is taken from the Delphi Prism product page:


Delphi Prism    Next generation Delphi development solution for .NET and Mono

  • Delphi Prism programming language for .NET and Mono 
  • Take advantage of the latest and greatest .NET technologies including WinForms, WPF, Silverlight, ASP.NET and LINQ
  • Use your existing Delphi programming skills to build .NET applications
  • Easily connect with all your data across multiple sources and tiers
  • Visualize and better understand your database structures with database design and modeling capabilities in Delphi Prism Architect edition
  • Powered by RemObjects Oxygene compiler technology

The fast way to build applications on .NET for Windows, Linux and Mac

Delphi Prism is the new .NET development solution from Embarcadero Technologies. In this Visual Studio based solution you’ll be able to use your existing Delphi programming skills to build .NET applications, taking advantage of the latest and greatest .NET technologies such as WinForms, WPF, Silverlight, ASP.NET and LINQ. You will of course also be able to develop database applications using familiar dbExpress functionality and .NET clients that connect to native DataSnap servers. Delphi Prism Architect includes database modeling and design capabilities based on ER/Studio that enable developers to design, model, and better understand their databases.
Key Delphi Prism features include:
  • Complete solution for .NET development
  • Powerful full featured Delphi Prism development language
  • dbExpress framework for building database applications
  • Supports development for the Mono platform 
  • Database modeling and design based on ER/Studio
  • DataSnap client creation
  • Blackfish SQL database with included deployment license

Wednesday, October 1, 2008

Alignment in Delphi 2009

Alignment of structures has changed a bit in Delphi 2009. The new layout is more compatible with C++. The old layout system is still available by setting {$OLDTYPELAYOUT ON}. So if you don't want to change your code for whatever reason you don't have to. Use {$ALIGN n} or {$An} to specify the alignment.