ParameterExists => isDefined

Another quick regex: to perform a sitewide search/replace that replaces every “parameterExists” by “isDefined”, simply do a:

Search: parameterExists\(([^)]*)\)
Replace: isDefined(“\1″)

That saved me at least 2 hours :-)

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

cfqueryparam / regular expression

Currently, I’m migrating a CF5/Win project to CFMX9/Linux. Apart from the usual path issues, the one who programmed this app yeeears ago did not protect *any single* form- or url-variable inside CFQUERY against misuse or even SQL-Injection. Not one syntax check, no CFQUERYPARAM… *sigh*

Unfortunately, it’s impossible to perform a sitewide search/replace, so I have to open every single file containing CFQUERY tags. To get a list of all the files containing “<cfquery…”, I did a quick

grep -rli “\<cfquery ” > cfqueryfiles.txt

Then, I wrote two tiny regular expressions that make the manual replacing a lot faster:

Step 1: Strings => Varchar
Replace ‘#([^#]*)#’ by <cfqueryparam cfsqltype=”CF_SQL_VARCHAR” maxlength=”50″ value=”#\1#”>

Step 2: Numbers => Big
Replace #([^#]*)# by <cfqueryparam cfsqltype=”CF_SQL_BIGINT” value=”#\1#”>
(Careful! This replaces ANY variable, but does its job inside CFQUERY. Do NOT “replace all”.)

After that, you only have to set the correct sqltypes and/or maxlengths.

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

Speaking at Flash Platform User Group Wellington (New Zealand)

After the XMas break is now finally over and summer has arrived in Wellington, we’re starting the monthly meetings of the Flash Platform User Group again. Actually we were known as the Flex User Group but went through a bit of self-finding and re-branding and the outcome is a broader focus on the overall Flash Platform. That also includes Flash, AIR, Flash Catalyst and associated things like the Text Layout Framework or Stratus.

The next (and first meeting in 2010) will be held at Natcoll Design Technology in Wellington (thanks to Brett Taylor, who’s the head of department for Interactive Design and Web Development at Natcoll and helped a lot to set this up). Topics will be Stratus, Adobe’s peer-to-peer framework for RTMP communication and Skinning in Styling in Flex 4. Both will be 30 min-ish long introductory presentations, no previous knowledge of either topic will be required.

This is the agenda:

Date, Time, Address:

Tuesday, February 16 2010 – 5:30 pm for a 5:45 pm presentation start. Anticipated end at 6:45pm-ish.

Natcoll House
2/20 Kent Terrace
Wellington
New Zealand

If you’re attending, please make sure you register at our Eventbrite site: http://wellingtonflashplatformgroup.eventbrite.com

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

Adobe Refresh in Asia Pacific

This is just a quick reminder that Adobe is running a series of Refresh events across Asia Pacific in February. Perth and Sydney are apparently booked out resp. very close to being booked out – but there are places left for Brisbane, Melbourne and Auckland.

— snip —

Join Adobe in a dynamic live presentation to REFRESH your understanding of the most recent initiatives in the areas of content creation, collaboration and distribution. The Adobe team will showcase the recent announcements including the iPhone developments using the upcoming Flash Professional CS5 as well as showing you how you can build applications faster with Flash Catalyst, LiveCycle Mosaic ES2 and much more. You will also hear Adobe’s most recent announcements from Max 09 and be shown the latest software tools available from Adobe.

— snip —

Dates:

Perth – 11th February (full)
Brisbane – 16th February
Auckland – 18th February
Sydney – 23rd February
Melbourne – 25th February

Registration and agenda:

Auckland: https://events.adobe.co.uk/cgi-bin/event.cgi?eventid=9153&country=pa
Brisbane, Melbourne and Sydney: https://events.adobe.co.uk/cgi-bin/event.cgi?eventid=9155&country=pa

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

Webinale 2010

Yay, Webinale 2010 in Berlin is on again (31/05 – 02/06) and I’m going to be hosting and moderating the RIA day at the conference. I’m quite happy and proud to have put together a super-interesting agenda (tentatively) with a quite international bouquet of speakers (in fact: Australia, New Zealand, France and Germany :-)

1. Kai Koenig: Wieviel RIA braucht der Mensch? (@agentk)
2. Thibault Imbert: Ten Innovative Projects for the Flash Platform (@thibault_imbert)
3. Carlo Blatz: Agiles Arbeiten in RIA-Entwicklungsteams (@carloblatz)
4. Justin McLean: Bringing RIAs and hardware together (@justinmclean)
5. Alexander Schulze: RIA-Translations mit lingopool

You might note that some sessions are actually in German – it’s a German conference after all… :)

Haven’t organised my trip yet and it will most likely be a reasonable short stint in Europe after all. But there’s Scotch on the Rocks in London in the week before Webinale – it woul it be a shame not to put in a stopover on the way over to Germany? Hmm… thinking… thinking…

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

Disabling CTRL+ALT+DEL to login in Win 2k3 server

Args, this is one of those “note to myself” posts. Today I was looking (for the n-th time) for the local policy setting to switch of the necessity that a user has to press CTRL+ALT+DEL to login in a Win 2k3 server. It’s particularly annoying as I’m running one for development purposes in a VM and I’m forced to use the VMWare Fusion menu to simulate the key stroke. Now, here it is:

  • Launch Group Policy Editor (GPEdit.msc)
  • Go to Local Computer Policy/Computer Configuration/Windows Settings/Security Settings/Local Policies/Security Options
  • Set “Interactive logon: Do not require CTRL+ALT+DEL” to enabled

All that requires local admin access – if your machine is tied into a network with AD or domain controller settings and group policies all that might be different, but it should do the trick for the typical developer’s “Windows Virtual Machine on a Mac”-scenario :)

Additional note: you might want to switch off the screen saver or resp. untick the check box forcing a user to re-login after the screen saver was triggered. Again – consider your system, I would for instance not recommend doing that on a full-blow stand-alone Win 2k3 server – but for a dev environment in a VM it’s most likely fine.

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon

Why Air New Zealand is the Airline of the Year!

Air New Zealand (short Air NZ from here on) – my home turf airline – has recently been named Airline of the Year in the Air Transport World magazine awards. There are plenty of reasons why they absolutely have deserved to win this award. Plenty, really! Lance Wiggs has listed a few of those from his point of view and I couldn’t agree more (Make sure you read it, Lance’s post is really interesting from a business point of view).

It seems that they pretty much just get it. Take their online engagement on Twitter as an example: with accounts such as @flyairnz, our beloved @airpointsfairy or @korulounges they actually communicate with their customers (not to mention @grabaseat and the regional AirNZ offices in the US and the UK). At this stage I can’t think of being in constant chit-chat with another “corporate” account on Twitter besides @flyairnz. Other airlines in the region (and globally, I follow about 50 airlines on Twitter) are either totally ignoring that channel or stupidly push out corporate messages and deal airfares but not much else.

The don’t just get Twitter but also lots of other aspects of “online”. The airpoints fairy has her own little world, there’s grab-a-seat and there’s the Adobe Flex-based Air NZ Frequent Flyer portal (although I’m not totally happy with how that particular app’s being done and delivered :-) – if anyone from Air NZ reads this and is interested, feel free get in touch for some advice)

But seriously – even offline or outside of social media they do a great job. Recently I had an issue that after a flight from Brisbane to Wellington on a Saturday my suitcase was chewed. Chewed as in – destroyed to a level of not being usable anymore. Luckily nothing was missing from the inside. Baggage services “took care” of the issue and told me that I’d have to drop the suitcase at a local baggage repair store where it would be assessed, potentially repaired but they couldn’t really tell me how long it would take due to their workload etc.

Naturally I wasn’t happy with that – the suitcase was an obvious write-off anyway and additionally I had another trip to go on 4 days later where I wanted and needed to use it. Also – why would it be my responsibility to drop off a suitcase somewhere, I haven’t destroyed it after all. So I complained. I tried with baggage services on Monday first but they couldn’t really help me because all claims are being handled by one person in NZWN. I couldn’t reach that person the whole Monday morning and got quite frustrated over that fact (later it turned out that the guy at the baggage desk in the airport gave me the wrong phone number, doh). As I couldn’t get any progress besides “you have to bring in the suitcase” vs. “no, I’m not going to do that” I used Twitter. Luckily I had already vented my frustration about the destroyed suitcase in the first place on Saturday from next to the luggage belt and @flyairnz had reacted to that (on a Saturday, wow). On Monday I used that channel indirectly again, explaining my problem and (actually) made some suggestions for changing the overall broken luggage process after the experience I had and things started to get moving (I’m sure my status with them helped as well).

To cut that story short – by the end of Tuesday I had a new suitcase: same brand, very similar weight (after they firstly delivered me a replacement suitcase that was way too heavy for my purposes) and delivered to my doorstep – that’s exactly how it should be. Very nice turnaround to fix the issue quickly, awesome work Air NZ.

Again – the moral of the story is: they get it. They genuinely want to help if you tell them about the issue and I generally feel treated by them as a valued customer and not just cattle. And that’s even the case when you’re a non-status customer sitting in economy. Everyone makes mistakes, agreed: For instance, I regularly vent about failed “premium luggage delivery” on Twitter (it seriously always seems to hit me :-) ) – but in the overall scheme of things that’s not more than an occasional minor nuisance.

Another example: Last week I was in Auckland (on a very cheap ticket, something like NZ$ 100 for the return trip). Normally those tickets are not refundable and not changeable without a hefty penalty (for a good reason). I was on the 8 pm back home and was in the lounge (after I checked in with my iPhone mPass app) when I suddenly got paged at around 6:20 pm. Having made my way to reception I got offered to be rebooked for free on the 7 pm flight as the 8 pm flight was going to be running 15 mins late and they had a few spare seats on the 7 pm flight. Again, that’s something where I’m sure FF status helps a lot, but it’s still an extremely nice gesture; thanks a lot Air NZ.

Post to Twitter Post to Delicious Post to Facebook Post to StumbleUpon