Archive for May, 2010

Outsourcing Everything

May 31st, 2010 Comments off

For the last few weeks my flatmate and I have been discussing various things such the effects of monetary policy, the Wal-Mart Effect and it’s local equivalent, The Warehouse, local manufacturing and it’s various advantages and disadvantages, tarifs, globalisation, and New Zealand’s free trade agreement with China, the 800 pound gorilla of manufacturing.

Then John Key announced the budget, and then it seemed like everyone was discussing these things. In all probability, this has been a hot topic for quite some time, and I’ve only just woken up to it now.

Previously, I was largely oblivious to wider impact of government policies. The few instances of outsourcing to IT to India that I have been privy to were so catastrophic that any future outsourcing projects were simply vetoed. At the time, it seemed that baring a large culture change in India, that my job was safe from outsourcing.

Perhaps it is, but that job does not exist in a vacuum. Unless the rest of New Zealand has a viable economy, nobody is going to have any money for my services. At a purely survival level, it is in my best interests to see that the rest of the population as well employed as I am.

So, it is with some trepidation that I read commentary in the NZ Herald by the CEOs of F&P Healthcare and Next Window.

While it’s a nice idea to think that New Zealanders are much smarter than everyone else, and that our much lauded number-eight wire mentality and ingenuity will give let us enjoy the benefits of first world living standards – without actually doing any of the work – it unfortunately does not coincide with reality.

Quite apart from the major details that a large quantity of people are simply not cut out to be ‘knowledge workers’, and that the smart people who do naturally have high mobility and therefore having this annoying habit of moving to where the pay is better – experience in the USA shows that if you do not have good native manufacturing capability, then you will burn money overseas while you struggle to bring your own countries languishing manufacturing capability up to speed. In the meantime, your company has essentially funded the training, and built the plant for it’s competitors, without even the small side benefit of keeping that money in your local economy, where it can be spent on your products.

If New Zealand wishes to halt it’s decline of quality of life, it is imperative that we rebuild our local manufacturing capability. Since New Zealand simply cannot compete on a worker for worker basis with underpaid, subsidized Chinese competition operating without substantial or equivalent worker rights and environmental controls, we must compete on other terms. In the article above, Al Monro of Next Windows says most Kiwis wouldn’t want to carry out the work of “relatively low-skilled labour, working with tweezers and soldering irons … its laborious, painstaking” to build the products of his company. Of course not. It’s the 21st century. He is talking about the kind of work that is, can be, and should be, automated. Instead of innovating, and doing things better and smarter, his company has taken the cheap way out and chosen human, rather than mechanical slave labour to carry out the monotonous industrial work.

That’s not to say that financially, that it wasn’t a good decision. Indeed – anything else may not have been an option. Right now, I doubt that there are three people in New Zealand who could competently discuss the intricacies of designing an automated production line. I suspect that more and more countries have discovered that it’s simply cheaper to hire and treat foreign labour to act like robots, rather than buying the real thing.

In the long term, this strategy isn’t good for anyone. Factory workers who have spent five years or more doing the same thing over and over again for 80 hours a week at 43 cents per hour are unlikely to transition well to being technicians where they must diagnose and repair complex machinery. The more credible reality is that Chinese labourers who are not dead from exhaustion will be simply marginalised and bypassed. If so-called-Communist China would like to know the long terms results of systematically forcing people into permanent unemployment, they could ask New Zealand. After all, we’ve been doing it for decades now.

* – I could move to Australia right now, and dollar for dollar, earn 50% more than I do now. If I factor in the exchange rate, it’s even better.

Password hashes for OpenLDAP in PHP 5

May 26th, 2010 2 comments

Having spent far too long trying to work out to make PHP 5 create usable password hashes for OpenLDAP from examples on the Internet (hint, comments on the md5() function on are dangerously wrong), I resorted to reading the RFCs and writing the code myself. This is posted below for other people who might have the same problem.

# This will generate an MD5 sum hash.
$encrypted_password = '{MD5}' . base64_encode(md5( $newpassword,TRUE));

# This will generate a SHA-1 hashed password.
$encrypted_password = '{SHA}' . base64_encode(sha1( $newpassword, TRUE ));

# This will generate a SHA-1 hashed password with a salt.
$encrypted_password = '{SSHA}' . base64_encode(sha1( $newpassword.$salt, TRUE ). $salt);

RFC 2307
RFC 3112
OpenLDAP Faq-O-Matic

PHP: 5.2.10 (Ubuntu Karmic/9.10)
OpenLDAP (Ubuntu Lucid/10.4)

Categories: Tech Tags: , , , , , ,

Buying New Zealand Made: D&P and Mandatory

May 19th, 2010 Comments off

This weekend, I finally made my way to Duncan & Prudence (161 Riddiford Street, Newtown). While they do not manufacture all items of clothing themselves, everything I laid eyes upon appears to be made in New Zealand, often to the point where Duncan (who was quite happy to chat to me about my project) could name me the exact person who had made a given piece of clothing. In the back room of the store, they also manufacturer t-shirts, of which a speed-up montage of the process is displayed on an LCD. These retail for $60, though the quality of the cotton certainly appears to be far superior to that of your average Hallensteins shirt, and roughly on par with a Enclothe (American Apparel) tshirt.

They also stock a good variety of jeans ($195) in both organic cotton and not-so-organic cotton varieties, which I believe they also produce on-site. Apparently their experiments with organic denim showed that it does not wear as well. Chino style pants are a similar price, as are off the rack shirts, though the style of the two I tried on did not suit me, though I was impressed with the quality. There were a number of jackets, ranging in price from $289 to $438 in a variety of styles and fabrics, principally merino and synthetic.

I eventually parted with $238 for a zip up charcoal jumper, which was also available in black and with a hood. It appears that they also sell cotton underwear, thus eliminating at least one of my exception areas. At some point, I shall return, and purchase a couple of tshirts, and see how well everything holds up with wear.

Earlier in the week I stopped in at Mandatory (108 Cuba Mall) in search of a jacket after experiencing some particularly stormy weather. Likewise, I found friendly staff who were intimately familiar with their product and who led me to a reversible merino green/black hooded jacket with a synthetic inner to keep the wind out. The price tag of $420 and my Eurotrip spend-up prevented me from purchasing that night, though I suspect I will be back. They also had a good variety of shirts and pants, at around the $200 to $250 range.

I had originally considered much of what was on display at both stores prohibitively expensive, because so much of what I is purchased on sale. Nevermind that the quality was almost universally better than everything I was wearing, I simply wasn’t used to prices in that range. My favourite jeans are Levi 527′s, and they have a RRP of NZD$139. But I’ve never paid that. Consider Briscoes, it runs sales so often that people only buy things between sales if they absolutely have to. I no longer think of sales as the occasional opportunity, but as normality. Clearly, the only way to compete with that, is to provide better quality – and that comes at a price.