Archive of January 2008

Windows forms and HTML: not a good combination

Posted on 2008-01-26 09:57:11

Some while ago, the request of one of our clients was this: they have a web application, and they wanted to publish some news on that. Because adding news management to the application itself was a little costly, they thought, “hey, we have a website as well, let’s publish news on that, and the web application can fetch the news from there”. This works fine: we get the news items as XML from the website, then parse and display it in the web application. All worked fine and dandy.

The client also has a windows application for the same system, which has a few more features than the web application, but works on the same data. So after a while they thought, “hey, let’s add the news to that as well!”. Good idea.

Adding the HTTP requests to this application to retrieve the news wasn’t the problem. The main problem we encountered: the news items themselves could contain (X)HTML to format the text, and the standard windows forms controls do not have support for displaying HTML.

Yes, there is a “browser control” that just calls up the internet explorer rendering engine internally, but that’s only a .NET 2.0 control, and the application uses .NET 1.1. Besides, bringing up such a heavy control just for displaying some simple <strong> and <em> tags is a little overkill. There is a “rich text box” control, but it only accepts RTF and doesn’t seem to know about HTML. In the end, we decided to just convert the HTML into RTF and be done with it. To this moment, only strong, em, br, and paragraph tags are supported… any other HTML tags are silently ignored.

The two other frameworks I’ve worked with for GUI applications, Java and Qt, both supported (a subset of) HTML natively, and with Qt you can put entire HTML pages into a simple label. Funny, that something so simple would be so difficult to do in .NET, especially since HTML seems to be more universal, compared with RTF, specially in the light of the “web centered” way of computing nowadays.

Posted in: Work

C4Minimapper update

Posted on 2008-01-20 19:05:04

January seems like the month of the updated programs: I’ve released new versions of the citybuilding minimappers, and yesterday I’ve updated the Caesar 4 Minimapper as well: it’s up to version 1.3.

It’s not yet on this site though: so far it’s only been available at Caesar 4 Heaven and the Tilted Mill forums. As soon as I stabilize the source tree out (I just imported the C4 minimapper into svn two days ago), all small programs I made for Caesar 4 will appear on this site.

And this isn’t the end of the program releases and updates: I have a few more tricks up my sleeve, though most of them will probably have to wait until February.

Citybuilding minimap programs

Posted on 2008-01-17 19:54:25

After much toil, I finally released the latest and greatest version of my collection of minimapping programs yesterday!

This release adds the mapper for Emperor to the collection, and upgrades the existing three mappers to Qt, making them truly platform independent, and not dependent on the Visual C++ DLLs anymore. Hurray!

For those interested, read more about the mappers on their project page, and hop over to the download section to get a copy of them.

Hardware vs. software: same difference

Posted on 2008-01-15 21:25:30

Yesterday, one of my colleagues arrived at work and immediately noticed something wrong: his phone had stopped working. The irony starts here: “Who do I call to get my phone fixed?”

Anyway, a couple of hours later a guy from the “hardware” department shows up and goes through the standard checks: plug another phone to the same cord, check if it works, check the phone on another outlet, etc. After a while he determines that the cable running from the phone to the outlet (in the floor) is bust and needs to be replaced.

Now, those phone cables are bundled with the computer’s ethernet cable and power cord to keep it all neat and tidy and prevent a wire mess. The disadvantage of this is that it’s potentially difficult to replace one of those cables.

Anyway, the repair guy returned with a new cable, and installs it: he has to tug hard to get the old cable out, and plugs in the new one. After checking that the phone works, he packs up his stuff and leaves.

The affected colleague was getting some coffee while this all took place, so when he returned, the first thing he saw: “hey, they fixed my phone!”. And the second thing he saw: “hey, they broke my internet!” Second irony: “who do I email to get my internet fixed?”

What happened? While replacing the phone cable, the guy had pulled the ethernet cable apart. And in such a way that the “head” you put in the ethernet “hole” was still in there, with only some loose wires sticking out of it. An hour later, the same guy showed up again to replace the ethernet cable. Let’s hope he didn’t break anything else.

Makes me think a lot of the software development process: you fix one bug, and inadvertently create another in a different place…

Posted in: Humor, Work

Reflection on 2007

Posted on 2008-01-06 18:10:09

At the start of the new year, it’s a good time to look back on the previous year. So what has 2007 brought me?

First quarter

The first few months were dedicated to my master’s project: in January I produced the first test results, and most of the first quarter was spent conducting tests and analyzing results.

Mixed in with my master’s project were visits to career events and visiting companies to see if they would be any good as future employers. Near the end of March I finally made the choice out of 3 serious proposals: I would start working on June 1. That left plenty of time for writing my thesis and finishing my education, or so I thought …

Read more...
Posted in: Personal

Outlook annoyances

Posted on 2008-01-03 18:51:38

I’ve been working with Outlook (2002) at work for some months now. Since then, I’ve seen some of the more interesting quirks that this rather … complex program has.

First, I’m rather attached to the preview pane: I almost never really open mail in a new window, unless it’s lots of text or it has those funny poll buttons. So, I wanted to mark mail as “read” when I had opened the mail in the preview pane. Where would that option be, when I didn’t know this message area was called “preview pane”?

So there’s the options panel: a mindless collection of tabs and sub-panels and sub-sub-panels with options. Looking at the options panel, we have a couple of tabs. Where will this section be, in “Preferences”, “Email options”, “Email format”, or perhaps “Other”? After scouring through the multitude of pop-up panels I finally found the damned setting: Tools -> Options -> Other -> Preview pane settings -> Mark messages as read when displayed in preview pane. Was it hard to find? Yes. Was it obvious? No.

Second, the reminders. When a reminder for an appointment pops up, there are a few buttons on it: “Ignore”, “Ignore all”, and “Postpone”. The first time I saw such a reminder, I was desperately looking for a button that did so much as “Acknowledge & Dismiss” (also known as, “Yes, I know and haven’t forgotten about it, please don’t bother me again”). The best possible option was “Ignore”, and on subsequent reminders I’ve learned that this is the only possible response that will get rid of the wretched reminder permanently. Rather non-intuitive: “Ignore” means to me like “Ignore this appointment” …

The third interesting tidbit: how the Exchange server deals with replies. It’s nice when there’s a note on an email saying “You have replied to this email on [date] at [time]”, but this is rather unhelpful: if I start a reply, then discard it, it will still say that I have replied to the email, even though I did not. If I start a reply on Monday, finish it Tuesday and send it on Wednesday, it says I replied to it on Monday. So, what good is this functionality if it isn’t accurate?

I’m happy I use Thunderbird at home: it’s so much better on all above points, and the most handy feature is the easy search option that’s in plain sight and not hidden somewhere. At work, if I’m searching for an email, the first thing I do is sort the list and try to find it manually. Only if that fails I will hunt the menus to find the dratted button to the “search messages” option. And even then it refuses to search more than one folder at the time…

Posted in: Work