External routines in DWS

I’ve been working with Eric Grange on adding a new feature to the DWS compiler recently: external routines.  The goal of this feature is to allow DWS code to call into native routines like Delphi code can call into routines in a DLL by writing a function signature and marking it external, without having to use a TdwsUnit component and create a bunch of heavy-overhead binding code. Continue reading ‘External routines in DWS’ »

Beds and burgers

What do a bed and a burger have in common?  Not much, at first glance.  You eat a burger and sleep in a bed, and certainly not the other way around.  (You might eat a burger while in bed, if you’re a slob, though.)  But they seem like two completely different products, because they are.

So, let’s be a bit more specific.  What do a bed and a burger have in common economically?

Aha! Now we’re getting somewhere.  That’s obvious: they’re both near-ubiquitous consumer goods.  Produced on a different scale, certainly–you’ll probably go through hundreds or even thousands of burgers between buying one bed and buying your next one–but (in the US at least) you’re almost certainly going to buy both during your life.

Oh, and one other interesting point: they both have to be made to order, because they will go bad if you leave them sitting out for too long. Continue reading ‘Beds and burgers’ »

The case of the one-thread race condition

You know what’s even worse than a race condition between two threads in your code?

A race condition in one thread in your code, because there are good solutions and debugging techniques for tracking down multi-threading conflicts, but they don’t work when there’s only one thread involved.

That’s right.  I just spent the last few hours tracking down what turned out to be a reentrancy problem. Continue reading ‘The case of the one-thread race condition’ »

Fixed my blog

So apparently I got hacked somehow. Not sure what happened, but someone found a way in to my WordPress installation and started using it to serve spammy ad links.  I’ve rooted out the problem and installed a WP security plugin that will watch for and work to prevent future attacks, so hopefully this won’t happen again.

As a minor note, anyone who’s left comments on here, someone might know your email address now.  Aside from that, this shouldn’t cause any problems for my readers.

New Year, new job, new town, same me

A lot’s happened in my life over the last few weeks, but most of it revolves around one basic fact: I quit my job at WideOrbit to take a new one with De Novo Software.  The project I’m working on now is a program for flow cytometry, a type of analysis of medical sample data used in diagnoses and research.  (In Delphi, of course.)  It looks like it’s going to be a lot of fun to work on. Continue reading ‘New Year, new job, new town, same me’ »

Wrong figures, right answers

A while back, the husband of a friend of mine got a nasty, painful rash on his face.  When it got up to his eye and started to affect his vision, he went to the hospital, and after a bunch of tests they found out what was going on.  I asked my friend about it when they got home, and apparently the hospital staff had been a lot less helpful than they could have.  She didn’t know exactly what the problem was; she said they had called it “zoister” or something like that, and she probably wasn’t even remembering it right.

I figured she probably wasn’t, because that doesn’t sound like any disease I’ve ever heard of.  So I tried punching it into Google, and sure enough, it had the answer.  “Do you mean zoster?”  I clicked the link, and there it was: herpes zoster, better known as shingles, the revenge of the chickenpox virus.  Why the hospital folks didn’t just say “he has shingles,” I’ll never know.

It took a few days before I realized the implications of what I’d done there, though.  You may have heard the famous quote from Charles Babbage: Continue reading ‘Wrong figures, right answers’ »

Always Review Your Code

I got a request at work yesterday to look at an issue one of our clients was having.  A certain service didn’t seem to be doing anything at all, with no failure messages in the server logs.  After asking a few questions and checking out the log, I determined that the initialization code for that service had never run when the server started up, so I pulled up a local copy on my dev system to figure out why. Continue reading ‘Always Review Your Code’ »

First look at Oxygene for Android development

Jolyon Smith has been posting a lot of really rosy stuff about Oxygene lately.  And he even commented on a recent blog post of mine,  in response to my frustration about Embarcadero blatantly ripping off paying customers by not including Android support as part of the baseline Delphi installation:

[Oxygene is] a better Pascal even than Delphi these days and fully supports Android (and iOS) development using the platform native frameworks, so you get to learn “proper” Android development (portable skills) without having to swallow the Java pill.

Thing is, I’ve been doing some serious looking at Oxygene too lately.  I haven’t reached all of the same conclusions he has, though.  But then again, I’ve been trying to do different stuff. Continue reading ‘First look at Oxygene for Android development’ »

Delphi and Productivity

If you haven’t seen Gabr’s latest post about Delphi language features, it’s worth looking at. I don’t agree with everything he posted, but he’s got some good points.

But he’s also got some annoying problems in the comments department.  Some obnoxious troll is spamming up almost half of the (extremely large) set of comments under the post with a bunch of preaching about how Python is soooo much better than Delphi because it’s less verbose.  His thesis seems to be that since you can write equivalent functionality with (as he claims) one-tenth the lines of code, that Python is ten times more productive than Delphi. Continue reading ‘Delphi and Productivity’ »

Delphi XE5: Promised Android support not included!

This isn’t the post I was planning on writing. I was really looking forward to this latest release.  I really wanted to like it.  I really wanted to use it, and I really wanted to be able to talk on here about how awesome it is.  Afterall, this release was going to finally bring Android support to Delphi, which has been something it’s needed for several years now.

Unfortunately… it doesn’t.  I just got my SA download and installed it, and there’s no Android support anywhere to be found.  Apparently that’s not part of Delphi; it’s an “add-on pack” that costs 140% of what I already paid for SA this year!  All that’s in Delphi XE5 itself is the Desktop development stuff I already have, which has scarcely changed at all since XE2.  With pricing that high, you’d almost think someone in Embarcadero marketing is deliberately trying to drive users to Oxygene! Continue reading ‘Delphi XE5: Promised Android support not included!’ »