Programmers and social skills

Someone recently asked a very interesting question over at programmers.stackexchange.com.  Unfortunately, though somewhat predictably, people jumped all over it and it ended up getting closed and then deleted within 20 minutes of being asked.  That’s actually happening a lot recently, to the detriment of the community IMO, but that’s a subject for another time.  But I think there’s some actual, worthwhile discussion to be had in this deleted question, so I’m preserving it here, along with the answer I would have posted.  Hopefully it’ll be of interest to some people. Continue reading ‘Programmers and social skills’ »

Odd timing

I got an email this morning from Embarcadero, a pretty straightforward marketing letter that probably everyone on SA for Delphi received.  But one thing caught my eye:

64-bit is scheduled to be released this August.

That’s not particularly unexpected, since that’s when the new releases tend to come out.  But it does confirm one thing I thought was kind of strange when I got the DelphiLive! 2011 Call For Papers email a few weeks ago. Continue reading ‘Odd timing’ »

How default settings can slow down FastMM

One of the biggest challenges in working on the TURBU engine has been minimizing load times.  Some large projects have a whole lot of data to work with, which could take the better part of a minute to load if I tried to load it all up front.  No one wants to sit and wait for that, so I’ve pared down the loading so that only the stuff that’s needed right away gets loaded from the project database right at startup.

And yet, on one of my larger test projects, that wasn’t enough.  One of the things that has to be loaded upfront was map tile data, so that the maps can draw.  Unfortunately, this project has over 200 different tilesets, and it was taking quite a while to load that much data.  I’ve got a RTTI-based deserializer that can turn dataset records into objects, but it was taking a completely unreasonable 3.3 seconds to read the tile data.

Continue reading ‘How default settings can slow down FastMM’ »

Delphi Live 2011 announcement

Last year when I was at Delphi Live, the event was a bit smaller than it had been the year before.  Less attendees, less sessions, not as nice of a venue, etc.  Kind of to be expected, with the economy in the toilet and all, but still it was sorta sad.  I heard a few  people mention that the way things had gone, they doubted there would be another one this year.

Just yesterday I was thinking back on that, and I figured it was probably right, or we would have heard an announcement about it by now.  And that kinda sucked.  I’d really enjoyed going there the last two years.  Well, I’m glad to be able to say I was wrong about that.

Continue reading ‘Delphi Live 2011 announcement’ »

Firebird and booleans: one more hurdle

I wrote my last post about enabling booleans in Firebird after several hours of poking around in database code trying to get my query to execute without errors.  Once it worked, everything seemed great.  But I missed an important step: I hadn’t tried to write anything back to the database yet.

Continue reading ‘Firebird and booleans: one more hurdle’ »

Adding boolean support to Firebird+DBX

Firebird is a great database, but it’s got one really irritating drawback: no native support for the boolean type.  The standard solution to this issue is to create a BOOLEAN domain as a special restricted version of a smallint, and then make your database driver output the correct type.

The first part is easy.  The second, not so much, if you want to use DBExpress.  This really should be handled internally as a special case inside the DBX driver.  Unfortunately neither Embarcadero nor Chau Chee Yang, maker of the alternative dbExpress Firebird driver, has released the source to their drivers, neither driver handles the BOOLEAN domain, and neither driver has any sort of callback/event handler that you can set up to intercept and modify the schema of a query result.  But I’m not gonna let a little thing like that stop me! Continue reading ‘Adding boolean support to Firebird+DBX’ »

The more things change…

Many years ago, back in 2000 or 2001, I forget the exact date but sometime in that time period, I ordered some books from Amazon and had them shipped by UPS.  The shipping date came and went, and my books didn’t arrive, so I called up UPS, tracking number in hand, and asked them where my shipment was.

After looking it up, the lady on the phone managed to track down the problem.  “We attempted to deliver it and couldn’t find your house.” Continue reading ‘The more things change…’ »

I built a compiler today

I wrote a compiler at work today.  It took about 5 hours.

Granted, its input is very simple and nowhere near Turing-complete, and its output is in Delphi, not any type of machine language or bytecode.  But it definitely fits Joel Spolsky’s definition of a compiler. Continue reading ‘I built a compiler today’ »

AppWave: No individuals allowed?

I ran into a first-look review of Embarcadero’s new AppWave service.  It had a link to the beta registration, so I thought I may as well check it out and see what it’s like.  The link takes you to a pretty standard form… until you look at it closely.

On the form, there’s a required field labeled “Company Name”.  Below it are “First Name” and “Last Name” fields, not marked as required.

…what? Continue reading ‘AppWave: No individuals allowed?’ »

Wish list: Generics collapsing

One annoying thing I’ve noticed in building my script compiler is the way the use of generic collections tends to bloat up the size of your EXE.  I use generics for a lot of things; a compiler uses lists, stacks and lookup tables (dictionaries) all over the place.  When I was building it with DeHL, the compiler plus a very simple test frontend compiled into a 36 MB behemoth of a binary, and a quick look at the mapfile shows that the vast majority of that was DeHL collections.  Now that I’ve switched to the more simplified Collections library, it “only” takes 23 MB, a savings of about 33%.  But that’s still huge.  There has to be a better way.

Continue reading ‘Wish list: Generics collapsing’ »