Autodie 2.00 released

Autodie 2.00 released
This weekend the long awaited autodie 2.00 for Perl was released to the CPAN, which was almost immediately replaced by 2.02, which fixes some oopsed tests and which adds a couple more features to give us a really sweet experience. This blog entry assumes you're using 2.02.

Observant viewers will notice that the major version number has changed. I've taken the great leap from 1.999 to 2.00. Clearly, something is different, and you might be wondering what.

Well, autodie 2.0 now supports a hinting interface for user-defined subroutines. Put simply, if you have a user-defined subroutine that does something funny to signify failure, you can now tell autodie about that. Once it knows, it can Do The Right Thing when checking your subroutine. You can even put the hints into the same file as those subs, and if someone is using autodie 2.00, it will find the hints and use them.

This may not sound very exciting, but it is. It means that a lot of really ugly error-checking code, both on the CPAN and the DarkPAN, can go away. Lexically. Still not convinced this will change your life? Let's look a little more closely; trust me, you'll like it.

Let's pretend you're working on a piece of legacy code. For some reason, the people who wrote this code decided the best way to signal errors is by returning the list (undef, "Error message"). I don't know why, but I've seen this anti-pattern emerge independently in three 100k+ line projects I've been involved in.

(read more...)

Dubai Adventures - Day 3

Dubai Adventures - Day 3
Today I decided to travel to Jumeirah beach and surrounds, a decision I made purely based upon the number of tags and photographs in the area for Google Earth. Since I'd be doing this during the day, I decided to take a practical approach. I left the laptop and most electronics back in the hotel, and packed lots of water and sunscreen. I wore my most breathable cotton top, a linux.con f.au hat, and what Jacinta calls my "pirate pants". These pants are very loose, and very breezy, and very comfortable. But as a result, I didn't look like a local, and I didn't look like a typical tourist, either. I was, however, protected from the sun and reasonably cool.

I caught a taxi to Jumeirah mosque, for just a little over 10 AED (about $3.50). I didn't expect to find the mosque open (and indeed, it wasn't), but I got some nice photographs. The main reason I wanted to visit the mosque is that it was walking distance to the beach, and (if you're me) Sheik Zayed Road. While two days ago I had discovered that walking around the old souks resulted in someone trying to sell me a fake rolex every few minutes, today I discovered that walking around Jumeirah had a taxi beep at me every few minutes, hoping that I would need a lift somewhere.

Jumeirah beach is very pretty, and very hot. There weren't many people out, and a lifeguard watched lazily from a tower. The beach came with lots of rules, one of which was "strictly no cameras", so I had to be a little more discreet with my photographs. The water looked extremely inviting, and I relished the idea of hopping in for a swim. Unfortunately (and accidentally), I had left my swimming gear back in the hotel, and my mask and snorkel back in Australia.

At the beach I got some great photographs of the skyline of Sheik Zayed Road, especially of the Burj Dubai, which distinctly reminds me of the Combine Citadel in Half-Life 2. Having looked around the beach, I decided to head off toward Sheik Zayed road, which I was certainly would be filled with marvels.

The walk was a lot harder than my previous wanderings around Bur Dubai, even though the distance was shorter. I was walking through a residential distract, and as such there was a lot less cover, and fewer amenitities. It was clear that Jumeirah was home to the rich, with magnificent mansions and expensive cars.

After about 1.5km of walking from the beach, I was finding that the heat and exposure was making me a little uncomfortable, and that while I had packed a lot of water, I'd probably need to think about looking for more. Luckily, I had just chanced upon a park. It was beautiful, green, lush, and immaculately maintained. For some reason, the gate was shut, with a large padlock, and it looked as if this gate had been shut for some time. Perplexed, I went to a second gate, and it was also closed. I noticed a person in the park, but he appeared to be a groundskeeper, who was distracted by talking on his mobile phone. This had me even more perplexed; why spend water, and money, and high-value property on creating a park that nobody can get into? This wasn't marked as a private park, and it even had a playground in the middle of it. Maybe it closed during the middle of the day, and re-opened later on?

A climbing check, and two stealth checks later, I found myself a section of soft grass and a shady tree under which to snooze. I woke after about half an hour, a little surprised that the groundskeeper hadn't woken me. Refreshed, I continued on my way, and discovered much to my delight that Dubai has public refrigerated drinking founains. With my water bottles refilled, and my face and arms splashed with blissfully cold water, I continued onwards.

The region I was walking through seemed to be filled with houses that were universally big. However one house in particular stood out. It was on the corner of two streets and was unfinished. That in itself is nothing special; Dubai seems to be in a constant state of construction, but it was clear this building had been unfinished for quite some time. The shell was made, but that's all which was there. Amusingly, a sign on the side said "For Sale or Rent".

After walking past another park (also beautiful, closed, and deserted), I eventually reached Sheik Zayed Road. This is the home to many of the tallest buildings in Dubai, and is a spectacular sight from the air, but amazingly dull on the ground. These were hotels, and office blocks, and the odd food outlet here and there. It was also completely impossible to cross on foot. It looked like some footbridges were under construction, but they were nowhere near finished, and they were so big I suspect they were for yet another road link, and not meant for pedestrian traffic at all.

I walked down the street, and got some decent photographs. My plan was to walk across to the Dubai Mall, take a look around, and then walk up the other side of Sheik Zayed Road to the Emerites Towers. As it happened, try as I might, I couldn't find a way to get across the street, which has twelve lanes, and cars travelling at considerable speed.

Hot, disappointed, and tired, I decided to try and find someplace cool, and preferably with restrooms. Being Dubai, there was a small mall not too far away, and I made my way toward it. It had a supermarket, and an electronics superstore, and in a rare moment of impulse purchasing, I grabbed a copy of EA Sports Active (which apparently sucks less than Wii Fit), after carefully checking it for any signs that indicated that perhaps it would only work in certain regions.

If I had my laptop with me, I would have pulled out my maps and looked for interesting activities, but since it was not available, and since I had gone all this way to discover that Sheik Zayed road sucked, I hailed a taxi to get back to town. This was one of the best parts of the day, since the driver was very talkative. He was from Pakistan, to which he'd love to return, but apparently there are no jobs there. He had worked previously in the Ukraine, and had moved to Dubai eight months ago.

My driver commented that Dubai is an artificial city. It's got artificial islands, artificial buildings, artificial snow, and artificial parks. People are here because Dubai has done an amazing job of marketing itself to the rich, but due to the global financial crisis, the rich aren't rich anymore, and they're flying back overseas. Tourism is down, jobs are more scarce, and so many of the not-so-rich who have come here for work are also going back overseas. Apparently all this was great reducing traffic congestion and getting me back to my hotel, but it sucked for the city as a whole.

Back at the hotel I had a bite to eat, and wrote this blog. My plane leaves at 9:35am, which means I want to be at the airport at 7:35am, which means I want to be leaving the hotel at 7am, which means waking before that. If I want to avoid too much jet-lag I should be going to bed now, and waking super-early in the morning. Instead I'm here posting blog entries, and discovering that the the UAE censors flickr, so there won't be any photographs until I get home.

(read more...)

Dubai Adventures - Day 2

Dubai Adventures - Day 2
I'm never going to be awake early in the morning so I can visit the museum if I keep getting back to my hotel at 12:30am, and blogging about my day. And yet that's what I'm doing right now.

Today was my second day in Dubai, and I discovered that Dubai has westerners, women, and arabs; they all hang out in the malls. After sleeping in again (goodness, I was tired), I decided to go to the Mall of the Emirates (the one with indoor skiing in middle of the desert), and then make my way by foot to the Burj Al Arab area, which I estimated was a 2.5 km walk, and hence pretty easy.

I caught a taxi, as the distance was much too far to walk, and I had no idea which bus to catch. I had a great chat with the taxi driver; he was from Nepal, had moved to Saudi to work (not far from where I was working), and was now in Dubai. I asked if he had any family here, and he laughed. Apparently Dubai is so expensive, especially with rent, there's no way he could support a second person; the plan is to work here as long as he can stand it, and take his savings back home.

It seems that with the global financial crisis (GFC), while Dubai still has lots of taxis, it's lacking the tourists who normally use those taxis. The GFC and the drop in tourism is something I'd heard from a few sources now, and it's clear that a lot of Dubai depends upon the tourist trade.

When I stepped into the Mall, it felt like stepping into America. It had American shops, American food, and American people. Actually, as I was to discover after talking to a few of them; the majority of the westerners were from the UK. Almost everything in the mall had prices similar to what I'd pay back home, and like most malls, most of it were things I had absolutely no interest in at all.

Luckily, I found one of my objectives for the day, and that was a free wireless hotspot. I eventually found the access point, it's just outside the cinema, and the SSID is "yournetworkname". I used it to call home (again, hurray for VoIP), and after a good chat ran down my laptop battery. Unfortunately, I didn't bring my external battery (it's heavy!), so any remaining communication had to be done via a hand-held.

The other discovery I found in the mall was an arabic gift shop, which was filled with local wares and tourists. Amazingly, I actually enjoyed browsing here; this certainly wasn't stuff I'd see in Australia (or anywhere else), and the prices were extremely affordable. There was also a hilarious collection of art-work out the front of the door. Words can't do these justice, so you'll just have to look at the photos (coming soon) and see.

I purchased a selection of gifts and while often it was easy for me to say "$x will like this", I discovered that was very hard when $x = 'jarich'. Eventually I went for the shotgun approach, and got her one of everything.

Somehow, after two calls home, some IM chats with friends, a selection of gifts, some photographs of the ski slopes, and some chats with the locals, it had got rather late, so I decided to set out on my walk. This was made more challenging by the fact that my laptop had a flat battery, and that's where my maps were located, but since the Burj Al Arab is the world's tallest building, it's not hard to spot and walk toward it.

I should correct myself there, it's not hard to spot. Walking toward it was hard, since there were huge multi-lane highways, and construction work, and no obvious way to actually walk there. I could (and in hindsight, should) have got a taxi there. It would have cost AED 10 (about $3.50), which would have been a bargain for the XP I would have gained visiting it and the nearby Souq Madinat.

As it was, I ended up walking fruitlessly in what was essentially the wrong direction. Eventually I stopped for some food outside the Lulu Hypermarket, where the serving staff of the fast-food place I frequented were delighted that I was from Australia, and gave me detailed information about the busses in the area, and were generally awesome. They were from the Phillipines, and collectively were the nicest people I've met all trip. It's just a shame the food wasn't.

Having found the bus (AED 2 rather than AED 45 for a taxi), I looked forward to being able to see all the huge towers along Sheikh Zayed Road, which is the home of some of the most opulent hotels and establishments. Consequently, I was dreadfully disappointed when it decided to go down Al Wasl Rd instead, which doesn't have much sightseeing at all. Eventually the bus pulled into the Bur Dubai bus station, which I had never been to before, but which I knew was walking distance from my hotel.

Unfortunately for me, I didn't know in which direction my hotel lay, and due to an inefficient hashing algorithm being used in my brain, I couldn't recall the name of the street with my hotel, either. I knew I was staying in the Ramee Apartments, but apparently Ramee is a chain with a number of Dubai hotels. Plus, my laptop battery was dead, so no checking maps for me.

Luckily for me, I was in Dubai, so I just walked across the road to the mall (Dubai has plenty), plugged in my laptop, and fired up Google Earth with all my cached maps. The bus stop was only 600m from my hotel as the crow flies.

On walk to my residence, down a surprisingly deserted street, a man approached me from an alleyway. From experience I figured this probably meant he wants to sell me a 100% genuine fake rolex, although for a moment where I wondered if people get mugged in these parts, and there was a reason nobody else was walking down this street.

"Excuse me, but do you speak French?" Okay, I really didn't expect that. I admitted I didn't, and wondered where this conversation would go. "Oh. Then do you have a hotel?" I started to wonder if French-speaking, homeless tourists were common in these parts. "Yes, I have a hotel. I'm walking there now." "Oh. Are you sure? Because if you need a room, I have a room you can rent. It's very nice." "No, really, I do have a hotel." "Oh, okay, where are you from?" "Me? Australia. How about you?" "I'm from France."

Suddently, the conversation made sense. My new acquaintance was over here working, and with rent prices being so high, he was looking for a room-mate. He would have been most happy with someone who could speak French, but I'd do. If I was unhappy with my hotel, or sticking around in Dubai, he'd be happy to split the room costs with me, 50-50.

We had an interesting chat, and I pointed that I could see my hotel and was about to turn down one of the streets toward it. We wished each other a good night, and I dropped past the 24 hour Super Happy Mart to replenish some supplies for breakfast.

Tomorrow I should try to wake up early and visit the museum, but based on prior experience I'm not sure if I will. Failing that, my plan is to catch a bus or taxi to Jumeirah Mosque, check out the beach, and then walk through the back-streets of Al Bada to Sheikh Zayed Road, which should put me in the heart of the "down-town district". I'm sure I can find myself some trouble from there. ;)

(read more...)

Bitcoin QR code This site is ad-free, and all text, style, and code may be re-used under a Creative Commons Attribution 3.0 license. If like what I do, please consider supporting me on Patreon, or donating via Bitcoin (1P9iGHMiQwRrnZuA6USp5PNSuJrEcH411f).