The Land Of the Rising Sun Part 3

World Expo MascotsDay 6: Aichi World Expo 2005
A Toyota Concept CarWhen we were planning for this trip, my Dad stumbled across the mention of the World Expo in Aichi in Japan in the Reader’s Digest, which just so happened to open during the time that we were there. He wanted to go, so we worked it into our last day in Japan. Getting to the Expo required catching a bullet train (or shinkansen) out of Tokyo. For those that haven’t heard of it, it’s a train that can reach up to 300km/hour and so is excellent for long distance travel. This year’s expo’s theme was based on “Nature’s Theme” and so was showcasing a number of technologies and promoting messages on the importance of maintaining our environment. The Robot Station exhibit was pretty impressive showcasing a number of robots used throughout the Expo site including both cleaning and security ones. There were also a number of other ones including Papero, a child-minding robot used for interactive teaching and learning combining advanced visual, touch and voice recognition technologies.

Magnetic Levitation TrainLike the Expo we had in ’88, this one also meant a lot of standing in line to get to see many exhibitions. The largest line was for the Toyota Showcase which showed us their latest robot technology and other concept cars. Not only did we line up for two hours to get a reservation ticket for the event, but we also then lined up another hour to get in! It was a pretty interesting day all up, with so many new exhibitions and halls making for a good walk around. I even managed to get to go to the Australia pavilion which actually had a pretty impressive showcase to give it. Our mascot for Expo was a female platypus which certainly made for some very sellable merchandise. I think it was a crime though selling Foster’s beer in our food area, and then charging 900 Yen (almost AU$11) for a Crownie!

Trip Summary
Japan’s an awesome place, steeped in amazing technology and a very traditional culture. Although a number of Western influences can be seen, Japan still seems capable of continuing to sustain and grow its own unique culture. Here are just some of the things that I found were different or funny:

  • The influence of the French (who were the first to trade with the Japanese when they opened up to the rest of the world) can still be found today. The French word Prefecture is used to describe regions, and there are a numerous little bakeries serving croissants, sweet and savoury breads on every little corner. The French emphasis on presentation and quality can also be found in all aspects of daily life including food, gifts and clothing.
  • Technology is everywhere, including in your toilet stalls. It was hilarious to find that some toilet seats were electrically heated, and usually had a control panel performing a wide range of functions such as fake flushing noises, or nature noises as you went about your business.
  • Japan is immensely clean despite the seeming lack of rubbish bins on the streets. When you do manage to find them (be sure to carry around your own rubbish), you will find that the Japanese are accustomed to recycling and there are distinct bins for paper, plastics and cans.
  • Vending machines abound all over the place, containing items you would normally expect such as a food, drink and cigarettes, but can dispense pretty much anything, even clothing.
  • Politeness is engrained in the Japanese culture in all aspects such as all the welcoming shouts and thank-you’s when you walk in or out of stores. I thought it was funny that by the end of my trip, I found myself bowing constantly.
  • Trains and subways definitely get packed especially during peak hour. There seems to be a certain art mastered by those that ride on these constantly of being able to stand in the isle without holding onto anything, and then others that somehow manage to sleep while standing up holding onto a single strap. This is certainly the country who has mastered the art of the power-nap.

Visiting Japan is definitely like visiting another world and something I will need to put back on my agenda in the near future! Sugoi Desu Ne!

The Land Of the Rising Sun Part 2

Toyota's Concept CarDay 3: Tsukiji Fish Markets, National Museum of Emerging Science and Technology, and Toyota Megaweb
Peak travelling season for cherry blossom viewing means booking accommodation near Shinjuku (the busiest subway station in Japan) was nigh impossible. Despite the low availability, we managed to get accommodation just near the Tsukiji subway station and only about four blocks from the famous Tsukiji fish markets. The markets are famous for its amazingly large area spanning several blocks and comprised of really fresh seafood and associated seafood products. You can tell how fresh the seafood is by the writhing life of live crabs, prawns and other varieties of sea creatures all with the saltwater smell but without the really bad fishy odours accompanying less fresh varieties. It is also here that each fisherman prepares their freshest tuna and puts it on display in only the way that the Japanese do so elegantly.

If you can make time to visit the National Museum of Emerging Science and Technology, it is certainly worth it, at least even for the few rides that you get to go on. Probably the most exciting science museum I have ever visited, they had a number of exhibitions and interactive demos including Honda’s famous human-interactive robot, Asimo. They had a number of motion simulator rides there was well (think Batman ride if you know movie world) and one was even a 3D simulation of the real world but on a ‘Honey I Shrunk the Kids Scale’.

There were many other things to do in the Mitaka area, but we only really had time to fit in Toyota’s Megaweb. Amongst holding the latest models of all makes in Toyota’s range of vehicles (including the latest Landcruiser!), it also contains a number of futuristic concept vehicles (although when we went, there was only one but I assume the rest were at the Aichi World Expo). They too had an exciting racing car simulator ride for free which was heaps of fun. Traveller’s Tip: If in the vicinity, visit the upper levels of Palette Town (a shopping centre) and enjoy its amazing decorations and day/night sky themes.

Mount FujiDay 4: Mount Fuji and Hakone Tour
This day was our first of two Hato Tours further out of Tokyo. Our first one involved a combined trip visiting both Mount Fuji and Hakone. Mount Fuji (also called Fujiyama or Fujisan) is the tallest mountain in Japan, measuring 3776 metres tall. Approaching its base made for some spectacular landscape views, and with some freshly fallen snow from the day before keeping its top all snow-capped, also made it pretty much perfect for some great photo taking. Although the snow prevented us from going extremely far up the mountain, we still managed to get a good view of the Japan Alps from where we did get and had a bit of fun throwing a few fresh snowballs about.

We visited Hakone after having lunch near the base of Mount Fuji. This place is famous for its hot springs, outdoor activities and just natural beauty and this retreat’s popularity is evident by the vast number of corporate-owned houses spread all throughout the hills. Its placid lake is spectacular, and there is a golf course here that is apparently the most difficult to play in Japan. A good view of the area can be taken by taking a cable car to an outpost overlooking the entire region and where a Shinto shrine can also be found.

Toshogu ShrineDay 5: Nikko
Nikko is an area of Japan that contains a lot of historical value so much so that its famous Toshogu Shrine is World-Heritage listed. I highly recommend going on a tour for this area because we got so much more out of the buildings when someone was explaining its significance and relevance to the Japanese. Each of the buildings in the area had amazingly intricate details and many Buddhist monks still work there today, maintaining all of the surrounding environments and facilities.

The Land Of the Rising Sun Part 1

Edo MuseumAs my last post indicated, I’ve just spent the last week with my family travelling around Tokyo and hitting as many of the most popular tourist destinations that we could. Six days is really not enough and I think even one month would really be pushing it to fit in every single thing in. Of course, this just means I will just have to go back to Japan 🙂

Although the trip started off on a good note (we got moved to an earlier flight from Brisbane to Sydney) we were slightly put out by technical difficulties in Sydney resulted in an additional three hours delay on the tarmac on top of the eight or nine of flying. The flight itself was at least relatively painless and soon enough, we were arriving at Narita only a couple of hours behind schedule.

Ghibli MuseumDay 1: Studio Ghibli and Shinjuku
Our first day was going to be cut short with the delay from Qantas and after checking into the hotel, we headed off to the Studio Ghibli Museum at Mitaka. Studio Ghibli produces amazing anime (Japanese animation) films that are spectacular, appealing for both children and adults alike. Fans would know of the more recent rereleases of versions dubbed in English by Disney including Princess Mononoke and Spirited Away. The creativity and detail of each of their movies is even more so reflected in all aspects of this museum, from each doorway, doorknob, closet filled with intricate detail and with some really funky stop animations that I cannot give any justice to by describing it in my blog. Unfortunately we were not allowed to take any pictures inside this place, so I felt compelled to buy the book which has pictures of the museum. I highly recommend putting this into your schedule if you get a chance. The official website can be found here.

With the day almost over and our bellies almost empty, we headed for Shinjuku. This area has the busiest train/subway station in Japan, with over 3 million people passing though its gates every day. It’s an amazing area with so much always happening and an entertaining place just walking around. The East side is the seedy area, filled with adult shops, pachinko (think Japanese slot machines but much more entertaining), restaurants and shops. The West side is apparently commercial and the rest is just generally busy. It’s an easy place to find a cheap but delicious meal and we ended up having the best tempura set I’ve ever had – the batter so light and crispy served with an excellent miso soup and various vegetables, pickles and dipping sauce. Unfortunately it was so good I forgot to take a picture! Traveller’s Tip(s): The bottom floor of most department stores has a food section that you can generally find inexpensive but good quality food to eat for dinner. We also visited the Tokyo Metropolitan Government Building on this day (it’s the tallest free building that you can go up in and has a great view of the city)

AkihabaraDay 2: Edo Museum, Akihabara and Roppongi
Our second day saw for a relatively relaxed departure for the Edo (former name for Tokyo) Museum that not only gave us a great insight into the Japanese culture, but a great and visually stimulating appreciation for its history as well. Although many of its explanations are mainly in Japanese, there were enough English translations and amazing artefacts, paintings and objects that made the visit worth it.

Our next stop was Akihabara, with its famous district called Electric Town. In this area, floors, buildings, streets and blocks are completely devoted to all types of electrical goods and one can be sure to find anything that they really need (and even don’t need). The Japanese are well known for being technologically advanced and all of the latest gadgets and certainly the best range can be found here. I was surprised at prices as well as I thought they would be pretty expensive, but after seeing some of the newer Ixy/Ixus cameras, I came very close to upgrading my current camera. Some of the models were yet to come out of Australia, and a quick google just told me the prices were actually really competitive. Somehow I managed to resist the temptation so I’ve still got my year-and-a-half-old camera that is still taking great pictures. Traveller’s Tip: If you get tired walking around Electric Town, go find one of the floors with the massage chairs and have a good rest for twenty minutes or so. It’s really worth it!

With some time to spare for the evening, I wanted to head out to Roppongi. This area of Tokyo probably has the highest concentration of foreigners as well as (or maybe because of) the (seemingly) highest concentration of bars and clubs. With so many people and travellers about, expect no less for this area to be much seedier than the rest of Tokyo. This mix makes this place even more interesting for people watching, with the most outgoing makeup, hair and fasion sense of the Japanese coming out at night.

My First Anniversary at Thoughtworks

Riverfire on the Storybridge HotelFor the usual readers, you might have noticed I tend to avoid mentioning employers because my blog entries are solely of my own opinions, and any associations or agreements are purely coincidental. Today is a little bit different (in that I will mention my employer) because this is my first anniversary with my current employer, Thoughtworks.

A little bit about my background. 2005 is my fourth year of being a professional software developer, working my way up from apprentice to journeyman, on towards being a master craftsman. I spent my first two years working for Oracle where my fantastic manager gave me the freedom and challenges to grow out of the all important attitude-shaping years of being a graduate. After working with some agile processes there, I continually stumbled across references to Thoughtworks (all in good contexts) and ended up applying for a job. A few (six) months later, the recruitment process ended and here I am today, one year on as a Consultant working out of their Brisbane office.

I realise that my experiences in consulting have been shaped by the nature of Thoughtworks’ Brisbane office and the commercial landscape of Brisbane itself. Despite initial expectations of projects that last between 3-6 months and involve potentially lots of travel (which I don’t really mind in this stage of my life), it so happens that I have been on the same project since first joining and what travel I did do last year was mainly around my own holidays. I’ve been lucky enough to work on a project involving a larger number of Thoughtworkers, though not as many as I imagine I could have, had I been working out of the Sydney or Melbourne office (something I, as well as many other TWers would like to do).

The project itself has been pretty good, both from a technical perspective and an agile process perspective. It has become ever better this year, with the team having more self-empowerment and ability to manage itself. Last year the project had been heavily based on a single person’s interpretation of “agile” and unfortunately almost all input team members gave from both technical and process standpoints were always overridden (an anti-pattern I highly recommend any budding benevolent dictator avoid implementing if you want to build successful self-empowered teams). Agile is great, but I would love other opportunities to experience other projects to see other people’s interpretation and application of it.

I have been here for three internal conferences, where everyone in TW Oz gets together and I find these amazingly refreshing. Besides meeting everyone else in TW Australia (something we rarely get to do), hearing everyone’s passions for different things has helped me challenge myself and grow professionally this last year. I’ve learned so much about lightweight processes, technologies and strategies from the conversations and exchanges I’ve had with other TWers. I even presented (with the great help of Andy) at our last internal conference and despite being accepted into the Agile India conference, had to pull out due to some poor internal timing issues.

I was bit worried by my age when I first joined, calculating that I would have been the youngest member of our Australia office by at least a few years (not now that we have grads though!). Thankfully everyone is treated is the same regardless of age, and everyone can converse with anyone with the same level of passion or argue with the same level of heat. I do wish that there was a bit more of a structure in place, especially for younger people, to provide a little more guidance/advice, because although I can see where other people are in their careers after years in the industry, it takes me a while to work out how they got there, and work out what else I can do to expedite my journey to being a master craftsman. I find that it is sometimes good to have challenges set by other people as well to build upon your own goals and provide opportunities to outreach what grasp you think you may have.

Consulting (especially on-site consulting) is different from traditional software development. The hours are certainly not as flexible as traditional product development, and on top of the hours you do on site being billable, there are many more that eat into your own personal time, doing the things that have to be done. Besides administrative time and definitely worthwhile time catching up with other TWers, the slack time that many other development shops probably have too much of, ends up being absorbed by consultants in their own time (but we’re lucky we’re so passionate about the things we do).

Being onsite all the time, especially for such a long time certainly affects your own working attitude. I know a lot of the things that came out of my review last year was the end result of maintaining the balance between being passionate about your beliefs, arguing over and defending differences in opinions, delivering business value, growing good working relationships with the team, all while trying to maintain the “professional demeanour” expected of consultants. It’s hard to know how you’re doing with such little feedback and advice, and ever harder to do it better without this continuous loop. Asking for help and advice is the one thing I am trying to do more of, so that I can become better at what I do.

So the good: meeting and working with brilliant people, being continuously challenged, growing significantly from a professional perspective. The could be (and maybe even soon to be) improved: being a single-project consultant, lack of travel opportunities, and more feedback.

The Importance of Grammar in Software Development

Last year, I was reading a number of booking about language structure and grammar, in an attempt to address, what I consider, a deficiency in the Queensland Education system and a further pursuit of my own interest in linguistics. I highly recommend avoiding these types of books unless you are really (really!) interested in the area because most of them tend to be quite boring.

The reward of finishing these, rather dull, books is the discovery of a few interesting facts about languages. The most interesting (ok, ok, bear with me) and relevant one I found is the topological classification of the English language according to sentence composition. In this category of languages (English, German, Chinese), a majority of sentences are composed using the Subject-Verb-Object (SVO) predicate (e.g. John walked the dog). In contrast, the Japanese language uses SOV (As for John, The Dog He Walked), and Yoda used OSV (The dog, John walked).

I suppose my interest in this area is its relevance to my ability of writing clearer code that communicates better intent. One of the touted benefits of Object Oriented Programming (OOP) is its easy mapping to the natural description and interactions between real world things, and our ability to express code our ideas closer to the language we use everyday (for me, English). I’m convinced that if I learn how to write better (learn how to structure proper sentences, apply proper terms, etc) even in basic articles or entries on this blog, then I should have also improved my ability at working out code that communicates more.

Take these two simplistic (and not necessarily ideal) blocks of code:

// Block A<br />public void triggerSpecialNotification(ExecutionResult resultOfExecution) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (ALERT_CODE.equals(resultOfExecution.getCode())) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dispatchAlarmNotification(resultOfExecution);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />// Block B<br />public void triggerSpecialNotification(ExecutionResult resultOfExecution) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (resultOfExecution.getCode().equals(ALERT_CODE)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dispatchAlarmNotification(resultOfExecution);<br />&nbsp;&nbsp;&nbsp;&nbsp;} <br />}

Based on the proper SVO paradigm, although Block B is more susceptible to NullPointerExceptions (and probably why Block A is typically written), Block B is consistently more readable because the resultOfExecution is maintained as the subject for the entire method.

Maybe here is a better example (I’m still floundering to find a good one):

// BLOCK A<br />public void doSomeWorkAndTriggerNotifications() {<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;ExecutionResult resultOfExecution = runCommand(someCommandObject);<br />&nbsp;&nbsp;&nbsp;&nbsp;someMessagingService.triggerSpecialNotifications(resultOfExecution);<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />}&nbsp;&nbsp;&nbsp;&nbsp;<br />// BLOCK B<br />public void doSomeWorkAndTriggerNotifications () {<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;ExecutionResult resultOfExecution = someCommandObject.run();<br />&nbsp;&nbsp;&nbsp;&nbsp;resultOfExecution.triggerSpecialNotificationsVia(someMessagingService);<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />}

Although the end result is something that could be achieved via a number of other xDD (x Driven Design/Development) approaches, I think this focus on grammatically correctness may help some improve the readability and design of their own code. In fact, it’s almost as if there is an opportunity to build a design tool reviewing code based on standard grammar correctness based on an a given vocabulary (domain specific nouns, verbs and adjectives perhaps described through annotations?). My ideas are still pretty raw, but maybe it has potential…

Making Privates Public

Disclaimer: This code is not for the faint-hearted and should not be used without very good reason (in our case, an external library not giving us access to a fair property of a certain class). Tested only on Java 5.

public static Object getPrivateFieldValue(Object anObject, String fieldName)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throws NoSuchFieldException, IllegalAccessException {<br />&nbsp;&nbsp;&nbsp;&nbsp;Class theObjectClass = anObject.getClass();<br />&nbsp;&nbsp;&nbsp;&nbsp;Field field = theObjectClass.getDeclaredField(fieldName);<br />&nbsp;&nbsp;&nbsp;&nbsp;field.setAccessible(true); // make it available outside of class or package<br />&nbsp;&nbsp;&nbsp;&nbsp;return field.get(anObject);<br />}

Sometimes it’s scary how it can be just that easy…

Test For The User

I enjoy Test Driven Development (TDD) for the value it brings out in both my professional attitude (affirmation that tests are important) and my code (driving out design ideas and forcing the code to be easier and faster to unit test). There are times where I get frustrated at not being able to write code as fast I as want (and believe me, typing speed is not the issue – perhaps it’s Java’s verboseness?), and you get lost in all the syntactic aspects of the programming language, thinking about proper class responsibility, maintaining consistency throughout the entire application, and trying to improve upon what is there.

I have witnessed it far too frequently (and also sometimes succumb to) the comfort provided when all tests pass, with a natural conclusion being that all things in our application are perfect. Sometimes I make the mistake of assuming that other parts of the system are just as well tested, and have not changed beneath my feet.

Though there are many (yes, unfortunately not all) of us who believe that the tests we write and automate are important, let us never forget the ultimate acceptance tests for the system we write that our end users may (or may not) give us… their happiness.