iPhone Lemmings

Posted by Mike Haller on Tuesday, February 12. 2008 at 23:09
There are rumours about Apple iPhone getting a Flash player in Safari within the next couple of months. One of the big drawbacks of the iPhone is its lack of Adobe Flash support.

As a software developer, I could think about some of the technical problems they're facing. Usability is probably one of the main problems.

Since the iPhone has no mouse device and the touch screen being a nice replacement for it, the technicians at Apple have to think about how they're going to simulate mouse-events in Flash. Within Safari, they're using it more like a pimped up Lynx/Links2 browser. That is, they're selecting a link the user points at, which can basically be done like with keyboard-only navigation, e.g. with tabbing through the links.

But when it comes to richer widgets such as Flash or a JavaScript-Games like Lemmings, there is much more interaction to deal with than just scrolling a page or zooming in/out.

Try to play Lemmings on iPhone and you'll go nuts within seconds :-)

Parsing unconventional Dates

Posted by Mike Haller on Wednesday, February 6. 2008 at 19:38 in Java
Thirdparties delivering data as XML.
In a perfect world, all those files have their XML Schema.
In a bad world, sometimes they don't have.
In the real world, they often don't have.
In my world, they just don't have.

Are you reading arbitrary XML data files?
They don't have a Schema?


Stuff like this:

 200812312359
 Dec.08



Playing with Spring WS

Posted by Mike Haller on Sunday, February 3. 2008 at 17:36 in Java
I played around with the Spring WebService library and this is a summary of what I did or what you need to take care of while implementing your own web service.

My toy project Whois-WS is about domain WHOIS information. You can ask the service about a domain name and it will return basic information about the domain, such as the domain name, connection status and responsible whois server.

== <> eq

Posted by Mike Haller on Saturday, February 2. 2008 at 10:23 in Hosting
A customer requested to disable all spam filter rules for his accounts. He suspected to miss mails, so he really wanted us to switch off all filters for his accounts.

To implement that within short time, I decided to change the maildrop filter script /etc/courier/maildroprc. I added the following snippet.

# Disable all filters for customer XYZ
if ( $HOST == "example.org" )
{
  log "All filters disabled"
  to $DEFAULT
  exit
}
else
{
  log "Normal filtering rules apply"
}


Well, this snippet does not work as expected. It will always jump into the first case "All filter disabled". As the maildroprc is the general script, which is applied for all incoming mails, the spam filters were disabled practically for all customers. After half a day, my own spam trap account was already fully and couldn't hold any more spam.

So what was going wrong? I read through the courier documentation and found it: == is a numerical comparison. Text comparison must be done using eq. I should have known it better, as I'm a Java Developer. I have never seen any maildroprc example script using eq, so I didn't expect bash-like expressions in there.

The correct snippet:
# Disable all filters for customer XYZ
if ( $HOST eq "example.org" )
{
  log "All filters disabled"
  to $DEFAULT
  exit
}
else
{
  log "Normal filtering rules apply"
}


P.S.: My servers are, hours later, still working on filtering the spam again which was queued. I've got a dedicated machine for running Spamassassin workers, and it's load is .. well high enough.

About

My name is Mike Haller and I'm a software developer and architect at Bosch Software Innovations in Germany. I love programming, playing games and reading books. I like good food, making photos and learning and mentoring about the craftsmanship of commercial software development. Stack Overflow profile for mhaller

Quicksearch