Sunday, July 14, 2013

The Kokoda Challenge 2013

My daughter took part yesterday in the Jim Stillman Cup of the Gold Coast Kokoda Challenge. The Kokoda Challenge is a uniquely Australian event. It is a walk to commemorate WWII battles in Papua. The full length Stan Bisset Cup is 96 km long. It is open to students who are at least 15 years old. The Jim Stillman Cup is half the distance and is open to students at least 13 years old. There are shorter Kokoda Challenge walks in Brisbane and Melbourne.

185 school teams of 4 students and an adult and 190 other teams got to the finish line in Nerang Velodrome yesterday and today. This is a gruelling event. The participants walk and run for 28 or 14 hours on average, day and night in difficult terrain, and most of them make it to the finish line.

A big thank you to the support teams and all teachers!

Jim Stillman Cup start in Numinbah Valley.

The full 96 km track.

Thursday, July 4, 2013

Software Testing

I would like to share with you an approach to software regression testing that works for systems consisting of multiple applications.

First things first. Software regression testing should always mean automated testing. Manual regression testing is a wasteful practice that will make you loath change. If you go the manual testing path, the process will take more time every time you add a feature, and soon you will  find out that a simple change, that takes a programmer a few minutes to implement, takes weeks to deliver to the customer. It's best to leave manual testing to beta customers, internal or external. When they find a problem, add a test case for it to the automated test suite to prevent regression. Automated testing ensures that no regression occurred in the last build. Just like continuous integration, it is a must, and ideally you should have it right from the start of the project.

Continuous deployment that triggers tests is a bit more difficult to implement with limited resources - you would need a new test environment for every check-in, but definitely every build should generate all installers, and you should have an automated nightly deployment and test run.

Automated testing of some systems is difficult. A system consisting of web applications, desktop applications, services, all interacting with different operating systems, cannot be functionally tested the same way you test a class library with unit tests. You need something that will emulate one or more users, and will interact with all parts of the system running on multiple computers at the same time. Mocks won't do. You need a program that will click buttons, read text, close windows, launch programs, and remote desktop (yes, it's a verb).

We chose Sikulideveloped at MIT and maintained by people from around the world. Sikuli (“God’s eye” in the language of Mexico’s Huichol Indians) is still quite new, and some features don't work very well, but it is the best one out there. Especially IR (Image Recognition) works great if you remember that it uses fuzzy matching and your images need to capture the essence of what you are looking for. For example, if you have icons on the screen and you need Sikuli to find one, your images should include only the parts of the icons that differ, which may mean not including their borders. Turning off the mouse cursor is tempting, it speeds things up a lot, but it makes troubleshooting harder and may cause weird errors when a program is surprised that a mouse click happens without any preceding events.

What doesn't work very well in Sikuli?
  • OCR (Optical Character Recognition) works best when text is 12-14 pixels big. Use smaller or bigger text and you get funny results. 
  • Switching between applications on Windows is not reliable, the operating system sometimes doesn't honour your requests. You need to resort to switching by clicking on things, like Windows taskbar -> right click -> show desktop -> click on app icon. On Macs it may work better. 
  • There is no serious IDE, and no unit test framework, but that problem is easily mitigated with Google's Robot Framework and Eclipse. For a simpler environment try Notepad++ with a workspace file and Python and Robot Framework language style templates.

When you have tests running overnight and something goes wrong you need to know what happened. Logs are good, but not enough. You need to see what happened. We record all tests with Screenpresso. Just yesterday, I saw a recording of an error that I would find very hard to believe, if reported by a tester. And that's what I like about programming - I see miracles every day. :-)


Saturday, June 8, 2013

Scarecrow by Matthew Reilly

An AIM-120 AMRAAM being loaded onto an F-16CJ by Senior Airman Hector Huguet. Source: wikipedia. 

Scarecrow by Matthew Reilly reads like a script for an opening scene of a James Bond movie, repeated ad infinitum. You can open this book on almost any of the 450 pages and you will find an action scene.

Let me try a few random pages:

  • page 33 - headhunters are chasing captain Shane Schofield, aka Scarecrow, inside an abandoned Russian submarine;
  • page 77 - Gant Fox, Scarecrow's girlfriend, and her team, enter a tunnel into a mine full of terrorists;
  • page 156 - Scarecrow rescues Gant from headhunters inside a Hercules transport plane;
  • page 281 - a quiet moment, while flying Black Raven (Su-37), Rufus tells Mother how he met captain Knight;
  • page 346 - Scarecrow is on a supertanker where multiple fights are going on: Nigerian Presidential Guard, Israeli commandos, headhunters;
  • page 415 - Knight, who was flying a rocket plane (X-15) put his plane in a path of an AMRAAM rocket that was about to hit Scarecrow in his X-15.
Matthew Reilly has sold millions of books, and many people think that a movie about Shane Schofield would be a great hit. However, it would be very expensive to make if using real planes, boats, vehicles, and locations. Also, the level of improbability - Schofield should have died many times in Scarecrow, and lack of romantic scenes make it feel less like James Bond and more like Stainless Steel Rat. Still, could be a good action movie.

Friday, May 3, 2013

Karate-Do Nyūmon


Karate-Do Nyūmon - "A passage through the gates of the karate way" by Gichin Funakoshi, translated by John Teramoto. First published in Japanese in December, 1943.

Gichin Funakoshi is known as the founder of Shōtōkan-ryu, the most popular style of karate, which takes its name from master Funakoshi's pen-name.
"As far as I know, the only styles that have been handed down from the past are the Gōjū-ryū of Master Miyagi and the Shito-ryu of Master Mabuni. I have never given a name to the karate I am studying, but some of my students call it Shotokan-ryū."
Karate-dō means: the way (dō) of the empty (kara) hand (te).
Note: the dash above 'o' signifies a long 'o' sound and is called a macron.

There are a few interesting stories in that book about master Funakoshi's teachers in Okinawa: Yasutsune Azato and Yasutsune Itosu, and about those who came before them. There is a chapter about history of karate, and a detailed description of master Funakoshi's kata (formal exercise): Ten no Kata.

The term karate in the meaning of empty hand was introduced by master Funakoshi after he arrived in Tokyo in 1922. Before that, in Okinawa, he used terms Okinawa-te and To-de.  Okinawa Prefecture was at one time known as Kingdom of the Ryukyus. Kara also means 'China' in Japanese, and some translate karate as Chinese hand. Okinawa had close relations with China and 'Chinese' had an additional meaning of 'fine quality'.

Master Funakoshi gives six reasons to use the character meaning 'empty' instead of 'China':
1. There were no written records, so kara could mean both 'empty' and 'China'.
2. Karate written with character for China could be confused with chinese martial art of kenpō. They are similar, but not the same.
3. Karate is a Japanese art form, so 'China' character should not be used.
4. 'Empty' implies weaponless, empty-handed self-defense, which is a good characterization of karate.
5. 'Empty': karateka must rid himself of self-centeredness and greed.
6. Emptiness is the true form of the universe.

How to make a traditional outdoor makiwara (striking post):
Use Japanese cypress or cedar wood.
2.1 meters long and 9 cm wide.
9 cm thick at the bottom, 1.6cm at the top. Note: You can make two makiwaras from a 9cm by 9cm block.
1/3 buried in the ground.
The pad is made from straw and then softened with a mallet.
A cloth can be used to soften the pad.
The pad has to be protected from rain.

Karate Glossary

Hand:
seiken - regular fist
uraken - back fist
shuken - hand fist
ippon-ken - single-point index finger fist
chūkōken/nakadakaken - single-point middle finger fist
tettsui - iron hammer
nukite - spear hand, same as shihon nukite
shihon nukite - four-finger spear hand
nihon nukite - two-finger spear hand
ippon nukite - one-finger spear hand
shutō - sword hand
haishu - back of the hand

Foot:
koshi - ball of the foot
sokutō - sword foot, striking with outside edge of the foot, close to the heel
tsumasaki - toe tips
enshō - back of the heel
sokkō - top of the foot
sokutei - sole of the foot, used for sweeping opponent's foot

Elbow:
empi - elbow
ushiro empi - rear elbow
yoko empi - side elbow
shita empi - low elbow
mawashi empi - round elbow

Stance:
heisoku-dachi - feet together stance; formal attention stance
musubi-dachi - feet together, toes out; informal attention stance
hachinoji-dachi - open leg stance, like musubi-dachi but feet 30cm apart; many kata start and end in this stance; hachi means eight - the stance resembles the Chinese character for eight: 八
zenkutsu-dachi or zenkutsu - front stance
migi zenkutsu - zenkutsu with right leg forward
hidari zenkutsu - zenkutsu with left leg forward
kōkutsu-dachi - back stance
fudō-dachi - immovable stance
kiba-dachi - horse riding stance

Command:
yōi - ready
yame - stop
rei - bow

Other:
omote - front
ura - back
kenpō - lit. fist method, Chinese martial art
budō - martial arts

kata - formal exercise
kihon - basics
kumite - sparring
karateka - karate practitioner

uke - block
soto-uke - outside block
uchi-uke - inside block
age-uke - rising block

zuki - punch
uchi - strike

oi-zuki - lit. pursuing punch, aka: front punch, lunge punch, straight punch, stepping punch
jun-zuki - front punch, shoulders 90 degrees to the arm
kizami-zuki - front punch, shoulders in line with the arm
gyaku-zuki - reverse punch
morote-zuki - double punch
teisho-zuki - palm-heel punch

kimete - focus
chūdan - middle level
jōdan - upper level
gedan - lower level
barai - sweep
ryū - style
fū - type
tanden - center of gravity in the lower abdomen

ichi - one
ni - two
san - three

ichidan - first grade, first black belt rank

kiai - spirit
maai - distance
kawasu - turning
kawashi - interaction, step in and turn to avoid an attack

yarijutsu - spear techniques
bōjutsu - stick techniques

kuchi bushi - "mouth" warrior
bushidō - the way of the warrior
makiwara - sheared straw - striking post

Tuesday, April 2, 2013

Gold Coast - Burleigh Head, Binna Burra, Labrador

I am still smitten by the beauty of Gold Coast beaches and hinterland. Here are a few interesting pictures from the last few weeks.


A view from Burleigh Head National Park towards Surfers Paradise:


A view from Burleigh Head National Park towards Coolangatta with Tallebudgera Creek in front:


On a track in Burleigh Head National Park:




A view from the mouth of the Tallebudgera Creek inland:



A view from the mouth of the Tallebudgera Creek towards the ocean:

Lower Beechmont towards Nerang lake:

Binna Burra Lodge in Lamington National Park:

A skink in Binna Burra:

On a track in Binna Burra:

A plaque to honour Romeo W. Lahey:



A colourful bug in Labrador. There was also a red one and a hundred of blue ones in a cluster, but it was an evening and the pictures were not good quality:


A little blue crab in Labrador:

Beach erosion after recent storms. It is being fixed currently by the Gold Coast City Council. A view towards Surfers Paradise:

Labrador doesn't have access to the open ocean. Instead, it has access to Broadwater which separates mainland from islands and peninsulas of the open ocean. A view from Labrador towards Southport.

Australian Sand Sculpting Championships - in 2013 the theme was Sand Safari:

 Penguins of Madagascar:


Monday, March 25, 2013

Gold Coast MakerCamp 1

I've been to a MakerCamp yesterday. It was organised by Gold Coast TechSpace in Southport.

TechSpace is a place for enthusiasts to meet twice a week and work on hobby projects. You can work every evening or night if you want - every full member has a 24 hour access.

If you work remotely, but you don't want to, or can't, work from home, Gold Coast TechSpace offers cubicles for $200 a month, see co-working.

So, what's a MakerCamp? It's a "show and tell" for people who make things, primarily involving electronics, often based on Arduino or RaspberryPi, but there was also Pavel who wants to build a catapult, and is looking for people who can help him build a Roman village in Australia.

Steve Dalton showed this low-cost plotter:

And a Lego Mindstorms kit set up and programmed to solve Rubik cube:

Neil, Rod (Skip), and Chris are working on a tiggy game for little 3D printed robots.

Anna Gerber who participates in The Edge showed her LilyPad creations. I liked an octopus-like doll that moves its arms and head when somebody is talking to it. 

Phil showed a display made of 240 flexible waterproof RGB LEDs, which you buy by a meter.

If you want to start with electronics a good place are the kits made by freetronics.

When you are making something, you may need custom parts, and a 3D printer like this printerbot comes handy:

3D printers are getting cheaper, more precise, and more versatile. The cost of material for making a small plastic part is about $1. You buy material per kg in what looks like wire on a spool, and for a certain nozzle diameter, this one had a 0.5mm nozzle, you get a certain number of meters of wire per 1 kg. The instructions that are sent to the printer show the total number of meters of wire that you will need. Jorge from Rabbit + Cocoon Arts Precint was telling me that 3D printers can now print metal parts, and big parts for planes. Amazing!



Thursday, January 31, 2013

Europe Trip - January 2013


A few observations made during my January 2013 trip to Warsaw, Paris, and Amsterdam.

Timing

Let me start with the timing. Winter is not the best time of the year to visit cities of Europe. The only good thing about it is that there are fewer tourists. The bad things are: days are short, cold, and often overcast. If there is snow and the city must work, then usually sand and salt are applied to streets and sidewalks. If the temperature fluctuates between above freezing (zero degrees Celsius) and below freezing, as it often does in Warsaw, the result is a mess. A mixture of melted snow, salt and sand gets on your boots, on cars, buses, sidewalks, building facades, inside buses and trams... look at these pictures from Warsaw:

Melted snow, sand, and salt on sidewalks and streets.

Melted snow, sand, and salt inside a tram.

A view through a dirty bus window.
Cities that are below zero or above zero for most of winter don't have that problem. 
Unfortunately, living in Australia and travelling with school-age children forces me to go on longer trips during Australian summer breaks, that is, in December and January.



Smoke Stacks

I am not sure about Paris and Amsterdam, but in Warsaw central heating in winter is often achieved by heating water in a coal power plant and then distributing that hot water to buildings and flats.

Amsterdam
Paris


Street Art

The more the better. 
Amsterdam
Paris - Montmartre
Warsaw - Tamka
This one is big - can you find windows?
Warsaw - Praga


Blocks of Flats

Despite the obvious differences, there are many similarities in European cities, customs, and even words in languages from different families: Polish is Slavic, French is Romance, and Dutch is Germanic. 

Pedestrian traffic lights, for example, work in a very similar way in Warsaw and Paris: they are quiet (no sound for green), have fixed cycles (no button to push), and similar green and red stick figures. 

Blocks of flats seem to be a common heritage as well. I saw those in Canada too. Unlike in the U.S., in Europe these are not necessarily inferior to other kinds of dwellings.
Paris
Warsaw

Amsterdam


Science Centres

Paris - La Cité des enfants.
A rare moment when there is no out of control school group around.
Warsaw - Kopernik - a very new and very clever science centre.
Possibly the best science centre I visited, and I visited quite a few.


The French Are Not Rude

I don't know who came up with that myth, but the French that we met in Paris during 7 days of travelling by metro and train, sightseeing, shopping in normal shops, and walking normal streets were always very polite. Much more polite than Polish or Dutch. Not that the Polish or Dutch were impolite. It is just that only in Paris I experienced people saying 'pardon' to get around me, 'bonjour' when entering a shop, 'au revoir' when leaving a shop, making room or vacating a seat on the metro when seeing an adult with a small child, and generally trying to help a lost tourist. Merci!


Paris - various

Snowing.
d'Orsay
Musée des Arts et Métiers - the first steam car by Cugnot
Two Concorde planes in the Air and Space Museum in Paris.
The Smithsonian in Washington D.C. does a much better job of showing aviation and space history.

Paris metro station - ceiling repairs on the cheap.
First and smallest of the three arches in Paris.
They are aligned, and in good weather maybe you can see all three.
Boulevard Diderot
Louvre - main entrance
Louvre - inside 
Eiffel Tower


Paris CDG

Inside Terminal 1 - palm trees covered by snow.
Shuttle train
Terminal 1 - the flying saucer



Paris - Montmartre

Painters' square
Basilica of the sacred heart
Tomek with a mime artist who happened to talk a lot... in Polish
A view.
Another view - can you see the Eiffel tower?



Salvador Dali Museum in Paris

There is a small Salvador Dali museum in Montmartre. It is unusual, because it focuses on Dali's sculptures, not paintings. Here are my favourites:
Alice in Wonderland
Winged snail


Paris - Versailles 

I like trains, so let me start with a train that took us to Versailles from Paris. By the way, the French version of the double decker carriage is much more comfortable than the Dutch one. In the Dutch version there are glass doors that separate compartments from the exits. The doors are narrow, and they don't open easily. When you add to this the need to use the stairs to go up or down, and narrow corridors, and lack of storage space, then you will understand that getting in and out with luggage is a major undertaking in the Dutch double-decker train. In the French one it's just the stairs that are an obstacle.
Double-decker train to Versailles
Versailles - Front.
The entrance to Versailles is a place of work for a group of young men, originally from Africa, selling little Eiffel towers. How do they know, just by looking at us, that we are Polish? :-) First words to me:  "Kolega, pięć za jeden" - "Mate, five (little Eiffel towers) for one (Euro)". A good deal by the way, a pity that we bought two for one earlier at a shop in Montmartre. This little guy uses them as rockets when playing. :-)
The view from the castle towards the gardens.
It reminds me of the Washington D.C. mall design.
Same architect or just a copy?
Versailles - Back

Versailles - inside. A portait of Luis the XIV.
There is something peculiar about this portrait. Can you see the chipped tile on the left? A few other tiles had cracks. The question is: was the floor in bad shape and the artist was true or did the artist want to send us a message, maybe that the king looked good, but the foundations of his rule were weak?

Way back - an English village replica in the Versailles gardens.


Warsaw - various

Nowy Świat
Old Town Square
Polish Military Museum - a Suchoj plane 
Polish Military Museum - T-34
Royal Castle by day
Royal Castle by night
University Library from aside
Royal Tract
Inside a new PESA tram
These trams show on a screen the time to travel to remaining stops.
This information is important if you use a 20, 40, or 60 minute ticket.
Same tram from outside
Old and new - Praga
A beautiful day on the outskirts of Warsaw
Skiing in Warsaw - Szczęśliwice.
Warsaw is generally flat and this hill is artificial. It used to be a rubbish tip.


Amsterdam - various 

I liked the scale of Amsterdam much better than that of Paris. Paris feels like it was designed for cars and big military parades. Paris feels heavy. Old buildings are usually 6 or 7 stories high. 
Amsterdam in comparison feels light. Most of the city centre is designed for trams and pedestrians. Old buildings are 4 or 5 stories high.

Leaning houses of Amsterdam.
Henri Polaklaan 
Rembrandt Square


Amsterdam Resistance Museum

This is a very interesting little museum worth a separate blog article. I will post just a few pictures here.
Nazi propaganda poster.

Nazi propaganda poster - recruiting to work in Germany
Dutch SS volunteers going to the eastern front.
Over 22 thousand Dutch joined the SS.  
A queue of Dutch citizens signing up to join a legal alternative
to the Dutch Nazi party.
Jewish survivors returning after liberation.
Notice the sign in the background:
"This is Holland. Remember, the Dutch are our allies."


Dutch Over-engineering

It may be just me, but I keep noticing Dutch engineers designing things that seem unnecessarily big or strong, or just made for fun. 
A ram-train

Nothing will stop this door opening mechanism. 

A handle bar not to mess with.
Extra wide metro carriages. At least a metre wider than the Paris version.
A building in a shape of a fast train.
A building that looks like a chocolate covered ice-cream bar?
A giant drawer chest on the right? I like them both.
A piece of beautiful engineering:
showing the mechanism of the escalator at a metro station.