Tuesday, December 28, 2010

Upgrading Drupal 5 to Drupal 6

Once again Drupal is just such a treat to work with. The amount of documentation available on the internet is amazing. If the proprietory software houses learn something from this they may give the open source stables a go. Everything I needed was a Google search away. Thank you. I am especially grateful for this data migration script: http://drupal.org/node/311442
Porting Views manually was a bit painfull and well woth the exercise for what we got in return.
Thank you Drupal Community for being UBER AWESOME!

Friday, December 24, 2010

Merry Xmas madventurers!



So Stefan spoiled himself with a Landcruiser this Christamas. He's been back in South Africa for a while and plans to start up a company to do adventure tours and safaris, starting around here and spreading into the rest of Africa.
To this end he has also been recruiting Wesley and myself and together we have started to have quite some delightful fun. Fun, fun and more fun.
She's been baptised, The Monster and will take us to some of the more remote and hard to reach places and you should join us if you love fun and adventures. She is fitted out with leather seats and we could potentially squeeze in seven people on shorter trips or six for more comfort on the long hauls. We picked her up in Durban yesterday and it was the first time I enjoyed such a luxurious comfortable drive back to Mtunzini. Absolutely yummy. It is understandable why people get so attached to their luxury vehicles. Just switch on the Cruise control, sit back in generous space adjust the climate settings to your individual liking and enjoy the ride. Mind you, there is so much space, I am sure you could fit on my lap :).
If you are up for some adventurous fun, getting out into nature and enjoying this planet's rich bounty, then watch this space. We will suggest some routes and a schedule in the near future. We hope you will get in touch with us with your hopes and desires.
Merry Xmas madventurers! May your wildest dreams come true!

Mtunzini is being spoiled even before it becomes a mine dump



Mtunzini's beautiful forest view recently suffered a brutal assault. Some aesthetic genius decided to stick his erection right in what used to be an unspoiled view. Does the visually perceivable space not belong to everyone who can see it? What is next? Billboards? Sky scrapers?
I was shocked when I walked along my favourite trail marked as 'Chalets' through the forest into the grass field next to Nature's way backpackers on the way to the beach. Suddenly there was this big white blotch where there used to be green. As you can see in the accompanying photos. Shocked because I was led to believe that people in this town have some aesthetic values they set out to protect. And other people have had to break down their third story developments in the past. Strict restrictions are placed on everyone else. And somehow this entity managed to impose their tastelessness on us.
It's all part of of a larger aesthetic value decay. Since the mining industry in the body of Exxaro will start mining the space 100 meters from village, the whole place will look like a mine dump, so what difference does one boil make?


Tuesday, June 29, 2010

Outdoor office with hammock vs. cubicle

So Stefan Silke popped in for a visit from Amsterdam. Johannesburg is a nightmare in winter. Jozie winters suck. It's cold and dry and I can hardly entertain a guest there. A road trip down to Cape Town was the first bad idea and considering the weather and sordid winters I started leaning east and north. It also soon became apparent that Stefan was doing quite a bit of work and so was I. Mtunzini here we come.

We're chatting about his business and the pains he suffers as a result. Recruiters generally suck. I dread encounters with recruiters. They're an awefull bunch. Silly buggers out for a quick buck. So clumsy and impersonal. Often downright incompetent. Not all though. There are exceptions that prove the rule. And Stefan is that exception. Connecting the dots. The best people for the best jobs, establishes crystal clear focus. Add a city, Amsterdam, an industry, IT and a role, recruiter with integrity who so happens to be a programmer as well. Made me reconsider my job as a software programmer to one of life hacker. He so happened to also be the first person to send me a lifehacker.com link.

It's winter here too. Between 20 and 31 degrees celcius. While it is summer in Europe when it is certainly at it's best. And my friends there exclaim their joy at lesser temperatures. Hanging in a hammock in the forest here looking at some Zebra in a small grass field while working just feels so much better than sitting crouched over a keyboard in a cubicle at a desk. I guess it's each to his own. Different folks for different strokes said Alec. The hammock seems to have the perfect ergonomic design. It's just a matter of sliding into the right position. Life is a treat. Thank you Anton and Diricia for running telamenta.com and making this possible. And thank you Stefan Silke for hacking life and giving us thewhitedoor.com. And the inspiration to have a go at it myself.

It's lovely to have 3g mobile broadband in South Africa and screw the @#$%*&! who are responsible for making it so expensive. Liberate us from such oppression. why is it so much cheaper in other parts of the world?

So, I am off to walk a friend's dogs and then cook something for whoever is in ;) Indulge in the wonderful state of affairs while it last.

Monday, June 7, 2010

Address project risk with testing starting from the top

So we have a website that grew to some size and I need to manage my risks on that system while cowboy young developers explain to their superiors that the code should be difficult to read because it was difficult to write. Yes, totally organic stuff.

I need something quickly to start with. Hello Selenium. Quickly run through a few scenarios. At least the main cases to start with. Hey , wait, let's teach a tester how to record their tests and ask them for a copy. Voila. And then run that test suite after changes to confirm the system state.

It would actually be nice if I didn't have to sit here and stare at the screen while these macros play their way through all the clicks and form submissions. Let's automate it.

It's a Drupal website and it is always a good idea to search for something related to drupal as there just may be a module for it already. And so it is. On Drupal 6 install the examples module with drush and enable the simple test module. Voila, with some example tests and, hey looky, some modules have tests on the admin page at http://mydrupalsite.bom/admin/build/testing. Where do they come from? Select a few tests and run them. Beautiful. I'm getting a warm and fuzzy feeling around my heart.

Quickly write a test. Translate the Selenese to Simpletest and voila, it does not work. Simple test like other test frameworks are spawned from the testing realm and there are some ideas you have to subscribe to and they all make sense and we will get there while right now i just want to run tests against the test site on the highest level. And I can use the scripts I get from testers easily. It will take a bit of modification to get the assumptions ironed out of simple test and I should perhaps do that as soon as I have some extra time on my hands

In the meantime export the selenium scripts to Java code, write a class and call that ever so often. Convert the Selenese to Webdriver so we do not have to worry about browsers crashing or bothering our screens. Junit have those asserts and the reporting is convenient. Hudson presents the test results conveniently and has a nice interface to run the tests from and keep track of their trends. And Bob is your auntie. Hudson picks up the changes in my git repository and runs the tests. I can get an email of the reports and see who changed what and what the results was. Beautiful.

Thursday, May 27, 2010

Hans Matthias Olwage at National School of Arts in Johannesburg

Fabulous and fun was the way Hans Matthias Olwage had his exhibition opened at the school of arts last night for which his close friend Boris Vukasovic sponsored decadent catering that was just delightful.

Willem Boshoff revealed Hans to us in appropriately endearing terms, commending him for his creativity and non conformity. One can overlook the dearly innocent person Hans really is by misjudging his art. Willem used the Latin 'extravagari' that translates 'to wander beyond' associated with the fact that Hans walks just about everywhere he goes. And in spirit of Hans' ability to challenge the norm changed our perspective on the word extravagant by keeping quiet at that part of his sentence so we could fill in the gap after he took it apart cleverly.

Too bad if you missed out on the fun last night. Fortunately Hans is still there during the upcoming days from 10:00 till 16:00 until the 2nd June. And it is well worth your while to pop in and have a look. I do not consider myself a conventional thinker and had some of my conventions challenged. In the potentially heavy and serious subject matter your sense of humour will not be disappointed. I am not going to give away more over here. Go and have a look. Failing that you can connect with him on facebook and see some of his pieces which will regrettably lack the impact of the full bandwith real life exposure.

The National School Of The Arts,
17 Hoofd Street, Johannesburg, 011 339 6539


View Larger Map

Thursday, May 13, 2010

Being mobile could be cool but it's tough for South Africans

Today I downloaded Connectbot to this Android phone to make an ssh connection to a server where I am busy upgrading a Drupal installation. I could also attend to details using this browser.
I want to bitch about how slow 3g is and the fact that MTN prematurely expired my data bundle and they set up an extremely incompetent and powerless help desk to bring greatfrustration to their customers. As if their predatory business practise is not bad enough. Why are the cell phone networks in South Africa allowed to treat us the way they do?
A friend wants an iphone app for taxi routes and hand signals. I wonder if she really believes that people who use taxis will spend such fortunes while most of them are earning less than the cheapest phone contract in Europe. Is it possible that we suffer all this abuse for the foreign shareholders to oppress us in a new way?
Should I be contributing to a system that treat people like this? Does anyone know of alternatives? The other monopoly has been tacking the piss much longer. Do we really have no say in this? Is talk and bitch all to be done?
It is believable considering that the government expects workers to pay for their employers electricity. Citezens have to subsidize industry energy use? Revenge for all the unreported theft parhaps? Or is the machine simply stronger than man? There are some scary fantasies about robots becomming or turning out evil but it is really someone somewhere who fails to care at the right moment.
sulk...

Tuesday, May 11, 2010

Drupal makes life so much easier it's just beautiful.

It can actually be very easy and convenient to roll out an advanced application.

With Drupal you can create a content type, export it as a feature, extract the feature to the modules directory, open the exported .module file, add some relevant code and export the feature so your customer can easily install it.

The user story went something along the following lines. To get an insurance quote, collect information from a user. Submit the collected data to a webservice which will return a quoted premium which the user can then accept or decline. Some prompts went to the user interface and other details were emailed to various parties including an XML update to another administration system.

It was a matter of creating a new content type with CCK and exporting it as a feature using the features module. This conveniently creates all the files that make up a module. It creates a compressed tar which has to be extracted to the modules directory on your Drupal installation with tar xzf exportedfeaturefilename.tgz and then enabled in the modules administration.

In the myfeaturemodule.module file a menu call back was added for a admin form which was coded right there using the forms api. And voila, an admin page where an administrator could add configuration settings like the webservice endpoint and authentication details. It is worth mentioning that the persistence of these settings was taken care of with drupal's variable_get() function that stores it in it's variable table.

In the form alter hook the node's submit button text was changed to "Get quote". Some of the node's fields were hidden using field permissions module.

Using the node api
* the form input was first validated on the 'validate' event after which
* the 'presave' event executed code to authenticate a soap client using the soapclient module, and do a soap call populated with the form values to the webservice end point configured in the admin form.
* In the 'insert' event we had the node id to create links to two other menu call backs, one to accept and another to decline the quote. Which was added as a links in a message to the node's display.

There is more to it with exception handling and emails to be sent to another admin system, administrators and also confirmations to the person requesting the quote which Drupal made very convenient and easy. The email to the admin system was the only XML processing to be done. The soap client takes care of turning arrays into XML and vice versa.

Changing the permissions so anonymous is allowed to create content of the quote node type and adding a menu link to 'Get a quote' that links to the node creation form which cost the content type definition creation to get.

And voila! An advanced application with a great looking user interface, networking with security, persistence all taken care off.

Thank you dear Druapl community for making my life so much easier and creating a system that is so much fun to play with!

Sunday, May 9, 2010

Jozi Drupal Camp


Such fun! Different from the usual geek get together which are mostly sausage festivals the Drupal camp at IS in Bryanston was _very_ different. Drupal gets something right which no other software project I know about has done. Girls. Woman. Babes. Honeys. Yummy. Asked why Drupal, they all answered it's fun and they love working with it and they love the community. Someone who was subjected to Moodle was trying to persuade her employer to allow her to redo it in Drupal just because it is so much more fun. Another was migrating a Sharepoint server to Drupal because it is more fun and easier to use.

Gorgeous people, beer, boerewors on the bbq, girls and guys speeking geek in understandable language, sharing, caring and, and, and then some, pure delight. It's just amazing how people share their knowledge and experience while in another part of the software world people have insensitive to hold on to their knowledge and try to keep it secret. I went home with a whole new bag of tricks feeling great about another world where ideals still have value and people are actively acting on it.

The sponsor's generosity was confirmed by the people who work with and for them. Their values go deeper than just public relations exercise. Telamenta's people talk about each other like family and they adopt new members into their family rather than employ employees. eConsultant's girls and guys considerately care for each other. It was remarkable how happy people are and how they enthuse about the companies they are involved with and the projects they work on. How eagerly most of them were to let you into the technicalities of their work and share and share, share and share some more. It will be difficult to choose a team to be part of between IS Labs, Telamenta, eConsultant, Springfisher, Brandsh or Cerebra. Which probably explains all the independent people who rather share their time with all these different teams.



Yesterday was pure inspiration and I am very grateful to one and all there. My experience the previous day with the cynical or perhaps simply incompetent noise of the CMIS specification and the miserable reality they sustain contrasted strongly against this ideal, vibrant living energy. Here is something worth contributing towards. This is a culture I want to be part of. A culture that is generous, open, accessible and kind. Geeks who don't try to baffle one with jargon and technicalities to set themselves apart but rather letting other people into their reality by making it accessible in clear terms and language with kindness. It is apparent why girls also love being around. Jozi's Drupal community positively ROCKS!

More photos:
Jozi Drupal Camp

Friday, May 7, 2010

CMIS is just a bad PR exercise

So there is a new specification which is supposed to make a developer's life easier.

Yeah right!

Unfortunately there is nothing useful in it. The specification is developed on a very high level and there is simply no benefit for the developers on the ground who have to actually use it. Well of course it is not supposed to be like that and there are attempts at something technical that is just silly.

The smallest base type in the spec is 'Document'. Yep. So everything we deal with everyday which we call 'Content', that being the _content_ of Documents is completely discarded in the so called, ha, ha, ha, 'Content' Management Interoperability Service. Unless off course you are OK with changing all your fields, nodes, components, etc, etc to extend the base class 'Document'.

It seems to me that a bit of that eighties geeky need to deal with emotional insecurities by clouding up one's language with ambiguities may have survived in the legacy part of our machine. And they are going to fight to the bitter end to make it stand. Even in 2010 with freaking SQL and all. I s#*7 you not. And even going as far as leaving Web Content Management out of scope. How old are the grandfathers who are doing this to us?

Can they seriously omit Content from the 'Content' Management? Are they intentionally trying to dissuade anyone from taking it seriously?

It is very sobering to realise that OASIS in fact just supports 'standards' because they are paid to, regardless of the poor quality.

Perhaps I fail completely in articulating our needs via their channel for public feedback on the spec causing myself and them unnecessary frustration and emotional grief. Please have a look at the spec and submit some honest feedback. Who knows maybe someone somewhere actually do care.

After reading the spec you may have a good laugh at these blatant lies:

OASIS announced the approval of Content Management Interoperability Services (CMIS) version 1.0, a new open standard that enables information to be shared across Enterprise Content Management (ECM) repositories from different vendors. Advanced via a collaboration of major ECM solution providers worldwide, CMIS is now an official OASIS Standard, a status that signifies the highest level of ratification. Using Web services and Web 2.0 interfaces, CMIS dramatically reduces the IT burden around multi-vendor, multi-repository content management environments. Companies no longer need to maintain custom code and one-off integrations in order to share information across their various ECM systems. CMIS also enables independent software vendors (ISVs) to create specialized applications that are capable of running over a variety of content management systems. David Choy of EMC, chair of the OASIS CMIS Technical Committee: 'CMIS makes it possible for business units to deploy systems independently and focus on application needs rather than on infrastructure considerations. With CMIS, integrating content between two or more repositories is faster, simpler and more cost-effective. This is how it should be.' [...] Mary Laplante, vice president and senior analyst for the Gilbane Group: 'CMIS has the potential to be a game-changing standard, not only through its promise to facilitate affordable content management, but also as an enabler of whole new classes of high-value, information-rich applications that have not been feasible to date. At the end of the day, companies simply need better approaches to integrating systems. Business agility increasingly separates the winners from the losers, and agility is perhaps the biggest single benefit that CMIS offers'. CMIS is offered for implementation on a royalty-free basis..."

But ranting is not getting us any further so we should simply agree on some standards among each other and find vendors who value their integrity to support it.