Flotsam and Jetsam #55

Marco notes that Embarcadero has put out a press release announcing a 54% increase in revenue in 2011 over 2010.  This is unequivocal, clear, unassailable good news.  No amount of Chicken Little whining will take away from the fact that this is very, very good news.  (It didn’t take long for Marco’s commenters and the Nattering Nabobs of Negativity in the non-tech newsgroups to try to find a way to make this something other than great news.)  The most important thing that the EMBT Executives care about is the bottom line – and that is how it should be.  And the bottom line for Delphi apparently looks pretty darn good – good enough for them to brag about it.  When the bottom line of Delphi looks good, that is good for Delphi developers.  Hey, I noticed that I’ve gone over 1000 comments here on my blog (actually it’s more like 3000  if you count spam that I’ve deleted.….).  Thanks to everyone who posts comments.  I appreciate you reading this stuff I write, especially when you go to the trouble of writing something up and adding to the conversation.  Lately some of the discussions on my technical posts have been really good – I’m grateful. I am not myself able to go this year, but I’m quite happy that three of my team here at Gateway Ticketing will be attending Delphi Developer Days this April in Baltimore/Washington, DC.  I was there last year, and I can tell you that it was a really valuable experience, and I recommend that you attend this year if you can. Jason Southwell’s ApeSuite for FireMonkey has a new beta out with a bunch of new features. More FireMonkey components are now coming from TMS Software as well – they have a cool set of instrumentation components as well as a TableView control that will be popular for folks writing mobile apps in particular. And Even More FireMonkey: As previously noted, I haven’t played with FireMonkey  much, but I have to confess, it is cool to think that this demo app – as described by Anders Ohlsson in his EDN article – is written in Delphi and will run on the Mac (and even iOS I guess…?) as well as on Windows.  Pretty slick.  And while you are at it, check this one out as well.
Read More

…Wherein I Rant Vigorously About Mobile Twitter Clients

I am now going to go on a rant about Twitter clients – mobile Twitter clients in particular (though some desktop clients are rant-worthy as well).  I am going to do this because I can’t understand why they are such a pain in the ass and work so badly, when they could so easily work so well. Okay, first, don’t get me wrong.  I really like Twitter.  (If you want, you can follow me, I’m @nickhodges --  no surprise in that handle, eh?)  I like it because it’s a great place to keep up on news, find interesting articles, read funny stuff, and to post your thoughts in short, pithy statements of 140 characters or less.  It’s also a great time killer.  If you are waiting at the doctors office, it’s a much better way to pass the wait than looking at a two and a half year old copy of People Magazine.  It’s interesting, fun, never the same thing twice, and frankly, I’m a little addicted.  I do almost all of my twitter reading on my phone or on my wonderful Amazon Kindle .  But yet reading Twitter on my mobile devices drives. me. crazy.  When it comes to mobile Twitter clients, I’m not addicted -- I’m inflamed with a rage that burns like the heat of a thousand suns. I’ve tried just about every one out there. They all drive me insane.  And so here is  my rant: A twitter client should never, ever, ever, under any circumstances, for any reason, at any time, ever, ever, EVER move my “cursor”.  EVER. And by “cursor” I mean my location in my Twitter stream.  I determine where my cursor goes, not you, you blasted twitter client that thinks you can just show me whatever you want when you want to.  If I am reading Twitter on my phone, leave off on a funny Pauly Peligroso post, go away to another app, and then I come back, you darn well better have my twitter client looking right at that same stinking Pauly Peligroso post when I come back.  I don’t care if I’ve been gone for five minutes, five hours or five years, you flipping better have your cursor right there where I Ieft it. Not anywhere else.  Where. I. left. it.  Leave a gap if you have to. I don’t care, just leave it. Don’t try to do me a favor and “catch me up”.  If I need catching up, I’ll get myself caught up. Give me an option to get caught up, fine.  But for the love of Adam Sandler, DON’T MOVE MY POSITION IN MY TWITTER STREAM.   Ever,  ever, ever, never, ever, ever.  Second, if you tell me that there are “143 new tweets”, and I say “Great, some new tweets”, put me at the freaking START of the 143 new tweets, not at the current time!!!!   Why in the name of sweet baby Dick Van Dyke would I ever, ever, ever what to start at the most recent tweet out of those 143 new tweets? Why would you tell me that there are 143 new tweets and then start me out at the point where there are zero new tweets? Why do I open up the fracking client and see some tweet from three seconds ago, when I want to read the 143 new tweets?  Why do I have to manually scroll down and try to figure out where the new tweets start?  What is that, some kind of sick, twisted joke?  Really?  I have to scroll?  Seriously?   I mean this is basically a variation of the “Never move my cursor spot”, but come on, this is ridiculous. Third – stop trying to shorten my shortened URL’s.  I’m smart – I can shorten my URL’s myself.  It’s nice you want to do that for me, but at least let me opt out of it.  Nothing says “wasted time and resources” as a link that is a Twitter shortened version of a bit.ly link that started out as a tinyurl.com link.  I mean, come on, I can keep my twitter posts under 140 characters myself.  I don’t want your help.  I don’t need your help.  Stop it. Bottom line: Mobile twitter clients stink and they make me want to bash public monuments with a sledgehammer. (I’d never do that, really, but I want to when I go back from checking my mail and the stupid TweetCaster moves me to  a tweet that was posted 23 seconds ago.) Phew, okay, I feel better now.
Read More

Flotsam and Jetsam #54

I like FireMonkey.  Actually, I confess that I don’t know much at all about FireMonkey, but I like that it exists.  I don’t use it, but I like that it is there, broadening the appeal of Delphi and generally advancing the cause of the tool we all love so well.  So I was pleased to see that the nascent market for third-party FireMonkey controls continues to grow.  The latest offering is from Jason Southwell’s Arcana with the cleverly named “ApeSuite”.  ApeSuite is in beta, but you can get in early at a special price.  Jason has been updating the library pretty regularly. I’m glad to see people getting a good start on what will hopefully be a thriving marketplace, and I tip my cap to Jason for jumping in. Alex Ciobanu – formerly of the Delphi RTL/VCL team – has made a few changes to his outstanding open source offerings.  First, his DeHL project has been discontinued.  I’m sorry to hear that – there are some really interesting things in there.   But second, he has done a brilliant job with a new project that is, to a certain degree,  a replacement, Delphi Collections.    He says it is “on hold” but it appears that he is actively working on moving it forward.  Alex is a really, really good programmer, so I keep a close eye on what he is up to.  His contributions to the Delphi community are very large, and I’m very appreciative of what he does.  Lots to learn there. How to Get Your Comments Deleted:  This is my blog, and what ends up on on it is up to me.  I’ve noticed that some of you have been trying really hard, though, to get your comments deleted with a modicum of success – and I’ve been helping to make sure that you succeed in this endeavor when appropriate.  I thought that you all might want to know for sure how to get your comments deleted.  The best way is to be a jerk and write a content free but insulting comment that adds no value whatsoever.  Do that, and you’ll get your comment deleted.  Hope that helps. Eric Grange pointed out that there has been a marked uptick in activity on open source projects involving Pascal.  It’s nice to see numbers attached to something that I’ve kind of felt to be the case.  The addition of generics and anonymous methods to Delphi really opened the language up to some really cool and really powerful frameworks, and things like Alex’s code above, the Spring Framework, Delphi Mocks, and all kinds of other frameworks.  It’s a really good time to be a Delphi developer.  (And Ohloh is a pretty interesting site – worth poking around.) What and how things are named in our code is a really important part of being a good developer. That’s why I thought this post was interesting – “Interface naming: prefix 'Can-' vs suffix '-Able'”    We tend to create interface names with –able (ISerializable, IDisposable, IEatable, whatever….) and maybe that isn’t always the best convention?
Read More

EurekaLog and FireMonkey / Win64 / OSX

Clarification about EurekaLog and latest Delphi versions... Delphi XE2 has introduced a new visual framework - FireMonkey, as well as support for more platforms, including Win64 and OSX. There are constant income of questions about EurekaLog's future and possible support for these new technlogies. So I've decided to publish general explanation for everyone. EurekaLog and FireMonkey The answer is simple - EurekaLog will... never support FireMonkey, because there is nothing to support! FireMonkey is visual framework. But EurekaLog just don't use any visual frameworks - it don't use VCL and it certainly don't need to use FireMonkey. EurekaLog uses API for all visual UI. That's why you already can use EurekaLog with both VCL and FireMonkey applications. Of course, if you want to create your own custom error dialogs for EurekaLog or something like that - fine, use API, VCL, FireMonkey or whatever technology else. There is no limitations. However, EurekaLog is not related to VCL or FireMonkey. It's just exception tracer. EurekaLog and Win64 Sorry, but EurekaLog 6 will never support Win64. It was written without considering other platforms in mind. However, there are good news: EurekaLog 7 will support Win64. Right now we're working on it, even though it dind't appear in any public releases. Support for Win64 is our current top priority! It's expected that Win64 support will be released (as beta) after we ship stable release of EurekaLog 7. You can help this to happen sooner by testing EurekaLog. Preleminary estimate is that Win64 support will be basic for first few releases and then we'll add advanced features (like disassembler view). Another good news is that we want to make migration process as painless as possible. Ideally you should be able to install EurekaLog 7, open your old project, recompile it - and it should work. EurekaLog and OSX The case with OSX support is very similar to Win64. EurekaLog 6 is out of question, but support for OSX is planned for EurekaLog 7. This is our second top-priority. We want to finish Win64 first and then start going for OSX. Currently, there was no work done for OSX, but all current work is done with future OSX target in mind. EurekaLog and... Lazarus/MSVS C++ Yes, there is slight possibility for appearing EurekaLog for other IDEs like Lazarus or Microsoft Visual Studio (C++). However, currently this is considered as low-priority in far-far away future. Note: this information is highly preliminary and is suject to change. Also, there is no estimates available.
Read More

What’s Your Favorite LiveBindings Example?

LiveBindings, which were introduced in Delphi XE2, provide developers with new options for associating objects. And they are only one of a wealth of new features introduced in this groundbreaking version of Delphi. They are also a source of some confusion. One of the problems is that most of the demonstrations of LiveBindings are simple, in part because LiveBindings are so new. Another way to put this is that it's hard to think differently about object binding when we are so familiar with Delphi's existing mechanisms. As a result, most examples that I've seen so far duplicate much of what we already achieve in Delphi.But this is bound to change. I believe that once we start to see creative applications of LiveBindings, we, the collective Delphi community, will begin to think about them differently. I hope to jump start this process by collecting examples of LiveBindings that represent the way that we'll be using them in the future, and I'll publish these here. Of course, I'll give credit if you contribute so that you can bask in the gratitude of your fellow Delphi developers.So, here is my question. Do you have examples of LiveBindings that go beyond the obvious? Alternatively, have you seen an example that breaks the mold? Is so, please share. And, in case you haven't given much thought to LiveBindings, here is a short introduction.LiveBindingsLiveBindings is a general term for Delphi's new object/property binding mechanism first introduced in RAD Studio XE2. It is the only binding mechanism available to the new FireMonkey cross-platform component library (FMX), and is also available for traditional visual component library (VCL) components.At its core, LiveBindings is a mechanism for creating associations between objects and expressions. Expressions are strings that are evaluated by Delphi's new expression engine, and in the case of LiveBindings, they define what effect the expression will have on an object.While expressions are strings, they are evaluated by the expression engine at runtime, which is quite a bit different than your Delphi code, which is compiled by Delphi's compiler at compile time. As a result, expressions are different from other string types you normally encounter in Delphi code. For one thing, expression strings can define literal values using either single quotes or double quotes. In addition, the expression engine recognizes special methods that have been registered with it through Delphi's Open Tools API (OTA), and can employ custom output converters to transform data from one type to another. Another concept critical to LiveBindings is scope. In LiveBindings terminology, scope defines what is visible to the expression engine. Most LiveBindings require a control component (the object to which the expression will be applied), and in most cases a source component as well. In the case of these LiveBindings components, the control and source components are both in scope, making their properties available to the expression engine. Similarly, those custom methods that have been registered with Delphi from a design time package are also in scope, making those methods callable from your expressions.It's worth noting that while LiveBindings use expressions, expressions can be used without LiveBindings. Specifically, you can create a scope programmatically, adding to it the objects and methods you want the expression engine to evaluate, and then ask the expression engine to perform the evaluation, returning a value based on the expression string. It's an important point, as far as the expression engine is concerned, but not something that you necessarily need to think about when you are using the LiveBindings components.Do We Need LiveBindings?I recently spoke about LiveBindings during the "24 Hours of Delphi" broadcast with David Intersimone. One of the listeners asked a question about LiveBindings that I hear pretty often, though he gave a somewhat new twist. "Why do we need LiveBindings?" he asked. "After all, it appears that LiveBindings is just another way of doing what we already do using event handlers. It kind of seems like fishing poles. In older days we had cane fishing poles, and they worked just fine. The new fiberglass and graphite rods are nice, but they don't really do more than the old rods."I like the analogy a lot, because it actually highlights why LiveBindings are a positive thing. Let's take the fishing pole example. A recent television show on The History Channel called "101 Gadgets that Have Changed the World," the publishers of the magazine Popular Mechanics list the top 101 devices that have had a dramatic impact on our daily lives. And, guess what, fiberglass fishing poles made the list (at 100), beating out duct tape and being edged out by the stapler.In any case, the point is that while cane poles and fiberglass fishing rods perform the same task, they work differently, and fiberglass rods are functionally better on every level.I think we are going to be saying the same thing about LiveBindings, once we get our heads around them. Yes, you can do many things with LiveBindings that can be achieved without them, but as we get more familiar with their capabilities, I believe we will discover a whole range of features that are enabled only through LiveBindings.So, let me hear from you. Post a link to your example, or an example that you find on the Web, as a comment to this posting.
Read More

Free Delphi XE2 “Game of Memory” for iPhone available in AppStore

My first iPhone app (the "Game of Memory" written with Delphi XE2 and FireMonkey) is now available in the AppStore (for free), see http://itunes.apple.com/us/app/game-of-memory/id489076335?ls=1&mt=8 It was quite a journey from "start" to actual AppStore deployment, but fortunately, I now know all the steps, so from now on it will hopefully be easier (although probably not faster).
Read More

Flotsam and Jetsam #51

If you missed CodeRage 6, or you didn’t get to every session that you wanted to see (hear?), it is now all online.  That link also points to the latest offers and ways to find out more about XE2.  I love XE2, and think it’s the best Delphi ever.  And I say that not even using the FireMonkey/cross-platform stuff – so it’s even better than I think.  I was digging around in my boxes in the basement – we’ve moved a ton, and so I’ve got stuff scattered all over – and came across a CD labeled “Website”.  I opened it up, and lo and behold, there was a copy of one of my very first web sites, built with NetObjects Fusion.  It was fun to poke around and see some of my really old content.  (As a point of reference, the homepage has “This site was last updated on  Tuesday, December 18, 2001” at the bottom.  Remember when we used to do that?) Actually, I think some of the stuff will end up on my current site.    Not all the links work, but if you’ve been around a while, you might remember some of it.  Most of it was hand-maintained, but you can see where I tried to integrate in some early Delphi-based CGI stuff.   I actually still like the colors and the template.  The Generics.Default.pas unit is an interesting one – you may never have cause to use it directly, but it contains a lot of interesting stuff in support of the classes in Generics.Collections.pas.   It’s worth poking around in.  I was doing just that, and came across some interesting code – a function called (and I quote) BobJenkinsHash.  It is used rather extensively throughout the unit, and appears to be a general purpose hashing code.  Who is Bob Jenkins, you may ask?  Well, apparently he’s a guy that wrote a very powerful and useful hash function, and Embarcadero has utilized it as part of their generics library.  And here’s the interesting part – they created it using a set of GOTO(!!) statements whose use , well  -- I seriously can’t believe I’m actually saying this – actually kind of make sense.  The C code depends on the “fall through” nature of C’s switch statement, and the GOTO calls actually mimic that rather nicely.  I’m open to suggestions on how it might have been written better.  (Again – I can’t believe I just said that, but there it is.)  And to redeem myself, I’ll chastise the author for not defining his interfaces in their own unit.  (Sorry, Barry – I had to do something to restore my street cred for actually liking the way the GOTO’s worked…..) Anyway, interesting little find in the bowels of the Delphi RTL. I’ve added a new category, Three Sentence Movie Reviews.   I watch a lot of movies, and have all these aspirations of writing up movie reviews when I watch, but I never do because it takes too long.  So I thought I’d simply limit myself to three sentences in reviewing the film, and that way I might actually get the review done.  I might have to get a bit creative – sort of like keeping tweets to under 140 characters.  Should be fun.  If you read this blog via DelphiFeeds, you won’t see it as I’ll not be putting the Delphi category tag on them. Just another reason to subscribe to my real feed. 
Read More

One Right Thing at a Time

Wherein I discuss how to do things that you should be doing and how not to do things that you shouldn’t be doing….

Sometimes you tweet something and it makes sense to you, but then you realize that it also kind of begs for more discussion. 

For instance: “Things move so quickly that doing the *one* most important thing means it’s less likely that you’ll do the wrong things in the long run.” 

I thought that a little more explanation would be in order.  Let’s say you have ten cool features on your “Things Customers are Screaming For” list.  There are two basic approaches you can take to getting them done: You can do them in series or in parallel.  If you do them in parallel, you’ll get them all done sooner, but you may not get them done as thoroughly.  If you do them in series, it will take you longer to do them all, but you’ll likely get each one done more thoroughly.

However, doing them in series – that is, sequentially doing only the most important remaining item – has an added benefit:  It can help you not do things that you shouldn’t do.  You may have ten things on your “We need to get these done right away”, but as time passes, some of those things may prove to be not needed, overtaken by events, or just plain dumb ideas.  Doing things in parallel may mean that you get everything done sooner, but it also means that you might do something that proves to be a waste of time later on.

For example, if you have a team of five folks, and you have five ideas that take six man months each, you might give each person one idea to work on, and then six months later, you have all five ideas done. Great!  But uh oh! — as it turns out, over the course of those six months, things changed and events transpired in such a way that two of the ideas weren’t really good ideas after all, and at the end of the six months you regret ever starting on them.  So in the end, you have three things done that needed doing, but have wasted your time on two ideas that you should have left undone.  Furthermore, since you only had one person working on each idea, you may not get a fully fleshed out solution, but instead, one that may have missing features or is not complete in some way.

But consider what happens if you work on them in series: say that instead of starting in all at once on the entire list,  you pick the single most important of the ideas on the list.  You focus your whole team on doing that one idea.  You will likely be able to get it done somewhat sooner, say in one or two months instead of the six months in our example. (Five team members working on a six man-month project will likely take a bit longer because of transaction costs.)  In addition, you will get a “five-headed” solution instead of a “one-headed” one, and thus the solution would likely be more complete, fleshed out, and feature rich.  In other words, you might very well end up doing one thing properly and thoroughly instead of doing five things not so completely. 

The added benefit comes when, after doing the most important project, you realize that one of the ideas you had originally thought was awesome isn’t really that awesome, and that you can take it off the list and not waste time on it. You might add another item to the list, or another item that was on the list suddenly becomes vastly more important than it was at the start of the first project.  Instead, you can repeat the process and start working on the next most important thing.  You end up with a very nice implementation of each project you do undertake, and you don’t do the projects that shouldn’t be done.

In a rapidly changing technical environment, that which looks like a no brainer in January might be old news by July.  Obviously you want to avoid working on that project.  A practical example might be that you are a software tools vendor, and people are pressing you to do, say, a development tool for Windows Mobile 6.  You could choose to add staff and get that request done sooner, or you could stay the course and do more important things, only to discover with massive relief that you didn’t do Windows Mobile 6 at all when Windows Mobile 6 becomes a legacy technology.  (Sound familiar? ) 

Now, I’ll grant that if you follow this plan, you’ll end up with fewer features in the long run.   But you’ll also end up with more complete features with less wasted effort.  You won’t have spent time on things you ultimately should not have.  It might take a little longer to get any particular feature to market, but in the above example, you’ll end up with three really solid features and no time spent working on things that you should not have worked on at all instead of five half-baked features, two of which were a waste of time.

Repeat this process enough, and it becomes much more likely that you will end up with a product that has the right – and fully rendered — feature set.  In many ways, inefficiencies are the result of choosing to do the wrong thing.  If you keep your choices finely grained – that is, always put your efforts only into the things that are obviously the very most important thing to do do right now – you will end up doing the right thing every time, even if there is slightly less of it. 

It’s often been said that knowing what you should do is easy; it’s knowing what you shouldn’t do that’s hard.  If you repeatedly focus on and complete the one single thing you absolutely should do and do it well, it will be more readily clear what those things are you should not do. So, I guess ultimately, you have to choose: More features done less thoroughly with time spent on things that turn out to be a waste, or fewer, more complete features with fewer projects that you shouldn’t have done.

Read More

Read More