Tuesday, August 10, 2010

Swollen MacBook Pro Battery

I started this morning with the intention of writing a quite upset rant about Apple's support and hardware replacement policies. Yesterday after returning from a three week vacation I plugged in my MacBook and started to work away. For some reason the trackpad button was not behaving as it should and in the end stopped working. I was for a moment really baffled, but when I turned the notebook around it was obvious that something was wrong. My battery had swollen up as described on AppleDefects.com.

I took my notebook immediately to Macforum Göteborg where I purchased the notebook in 2008. Even though the warranty on the notebook had already ran out, I still expected to get a new battery without fuzz. I can accept that the capacity of the battery over time degrades. Hey, I could have lived with a battery so bad that I pretty much have to be plugged in all the time, but a battery swelling up like this is not acceptable. It shows poor quality parts and/or manufacturing errors, neither anything I expect from a 30000 SEK notebook. Damn, didn't I already pay the "Mac price premium"?

At Macforum I was then surprised when they told me that they have seen this before, but Apple supposedly refused free replacement. They recommended me to just buy a new battery. WTF! For me that was not acceptable and I started to argue the case. It took over an hour and finally Macforum agreed out of - what I understood at the time - "pure kindness" to replace my battery. However, the battery had to be ordered and I will hopefully receive it within a week.

I went home determined to write about the kindness of my Mac shop and to rant about Apple's replacement policies. But when I started to research the issue today, I noticed that actually many people had the same problem, but with very different experiences regarding the replacement of the battery. Some said Apple replaced the faulty batteries without problems others said Apple refused replacement. The same seems to apply to the resellers. I am not sure what to believe at the moment. My only recommendation in this case is to not accept a no from either Apple or the resellers! I will try to get more information from Macforum when I pick up my new battery. Stay tuned.

--Hardy

Thursday, July 29, 2010

Portugal vacation

veronica and alejandres house At last - some bits and pieces from our 10 days in Portugal. We stayed at Käthes daughter Veronicas house in the little village of Avessada a couple of swedish miles north of Lisbon. Veronica is transforming a piece of barren land around the house into a self sustainable farm. With help of volunteers she has truly accomplished a lot in a very short time. Read more about it here. The village only has some hundred inhabitants but still manages to support 4 bars. This was a good thing since our Internet oriented hosts didn't have a proper TV cable and I really wanted to see some of the world cup games. (Sadly enough - Portugal didn't win any games during our stay.) A beer is only 70 cent or so so it is really affordable to go out and have a beer or a coffee. There are two kinds of local beer: Sagres and Superbock. Apparently people lean towards Sagres in the south and Superbock in the north. sagres To me they taste about the same and are really superior to "normal" Swedish beer like Pripps, Spendrups and Norrlands Guld. The coffee is also great and is strong and a bit larger than caffe italiano.


Food is great in Portugal. It is perhaps not very fancy but the ingredients are so good that everything just tastes great. We cooked some at home and had some nice lunches and dinners out. Meals to remember were the seafood lunch in beach heaven Ericeira, the buffet lunch on a side street in Sintra with home cooked food by 2 friendly ladies, the very cozy restaurant in Tomar where we sat in a nice homely garden, the sushi at Origami just next to Oceanario in Lisbon, the lunch at a local joint in Malveira (down the hill from Avessada) that were just very local and very good (grilled sardines!), the brazilian meat dinner in Lisbon and of course a great midsummer's dinner at home with our hosts and some of their friends enjoying (?!) snaps and sill!


We did 2 day trips to Lisbon using public transportation to get there and made it to most of the sights and places. Flying through the sea Even though I have visited Torre de Belem before it was great to do it together with the kids. Just strolling around in the old parts or Lisbon is also a great time. It is vivid streets where people actually live in the old hoods. We visited Oceanario which is a huge place with lots of aquariums filled with all kinds of strange and normal fish. There were also a couple of open spaces with birds from different climate zones. The subway station serving Oceanario is called Oriente and has this truly awesome futuristic architecture. Think Star Trek space ship but more voluminous.


The weather was a bit interesting. We had some hot days especially in Lisbon and when going inwards from the coast. And we managed to get one great day at the beaches around Ericeira but half way through the coast was about 20 C and misty so we canceled our plans of visiting the bird island outside of Peniche and also didn't make it to surfing school. But we had no problem filling our days with other things to do. One day we stayed at home and only went for a long walk. First up to the hill top with two big wind power stations. It was a strange feeling to look at the great views with 2 rotors moving about somewhere up there. castelo de almourol Then we walked around the entire hill (the kids gave up after the hill climb though) finding a couple of geocaches on the way.


2 days were spent in Sintra in the two strange palaces with accompanying gardens from the 19th century. True imagination to come up with all the details in the architecture and a crazy bunch of people to fund it and populate it during the summers. What else? We spent about a day on the templars trail visiting the great Castelo de Almourol in the midst of Rio Tejo and Convento de Christo - the magnificent portuguese templars head quarters on the hills overlooking the nice city of Tomar. All very medieval, terrifying and uplifting.


The perhaps saddest part of the trip was our visit to Fatima. I really had to see this sacred place to get a feel for it. The place where a couple of kids saw Mary and people started going there en masse despite the church initial attempts to marginalize it. walking on knees is big in fatima It was fascinating to see the big square between the two churches in memory of the event. There is a special lane for people walking on their knees to make God listen better. Being a former newborn it is always depressing to see religion having so much power over people. Maybe it is good for some of them but I am sure that for many it is rather a limiting force.


And the graffiti was great. Robin Hood sai à noite


As always - a good guide book (Lonely Planet this time) is really useful and we had good luck with restaurants we tried outside the text. Just look for the locals is as good an advice as ever. There are more pictures over at flickr if you just can't get enough! And superthanks to Veronica and Alexander for having us!

Sunday, July 18, 2010

Bits and pieces

A few quick notes before heading of into vacation.

Postgres

Ever seen this or a similar error message on your Mac?

could not create shared memory segment: Invalid argument  

This happened to me when I tried to increase the number of max_connections parameter in the postgres configuration file. After increasing the maximum connections I got another error message which told me to increase the shared_buffers size as well. And finally, after that I got the error message above. After some research I found out that for some reason the system shared memory value on Mac OS X is out of historic reasons very low. Go figure.

The thing to do is to edit /etc/sysctl.conf and add something like this:

kern.sysv.shmmax=524288000
kern.sysv.shmmin=1
kern.sysv.shmmni=64
kern.sysv.shmseg=16
kern.sysv.semmns=130
kern.sysv.shmall=131072000
kern.sysv.maxproc=2048
kern.maxprocperuid=512

The parameter which is important is kern.sysv.shmmax. You can view the current setting via sysctl -A or more specifically sysctl kern.sysv.shmmax. I had to restart my computer to get the values to take effect.

Git

I started to use git more and I must say it is growing on me. However, since most of the projects I am working with are still on svn I have to use git-svn. Most of the time everything works just fine, but one thing I am looking for is a tool which converts a git patch to a svn patch. Unfortunately, a git patch will not directly apply into a svn repo. Problematic are especially file additions and removals. So far I haven't found a satisfactory solution. Anyone?

RubyGem

I thought I pass on this cool little ruby gem I found and started using - Cheat Sheets. Just install it via sudo gem install cheat and then you can access any of the built-in cheat sheets, for example cheat git. And of course you can simple add your own cheat sheets. Sweet.

Android

More of a question really. Does you Android phone shuts down properly? I had several occasions now where my phone shut down, because it was running out of power (well, we all know how great the battery life time is :( ). In each case I had to pull out the battery in the end, because the shutdown would never complete. Does anyone have similar experiences?

--Enjoy

Friday, June 04, 2010

My favorite Android apps

Now it is almost a month since I've bought my HTC Desire and I admit I am addicted and the only way to separate me from it would be to pry it from my cold, dying hands. Funny enough it is not for the simplicity of making phone calls. When it comes to making calls I often wish my old trusty Sony Ericsson back. What really got me hooked though are the ability to read email, RSS feeds and of course all the other nice apps. Here comes a list of my favorite apps (in no particular order):
  • ASTRO File Manager - anyone with some geek blood needs it. I just want to know what's on my SDcard. Personally I would have wished for more structure on the filesystem. It's a mess on there :(. Good thing about the latest version is also that it comes with a task manager which allows me to kill any app
  • Quick Settings - a must have! One of the few apps I have as shortcut on the "desktop". Easiest way to quickly turn on/off bluethooth, Wi-fi and GPS
  • Gesture Search - nice app. Used it a lot in the beginning when I did not have my most used apps as shortcuts. I mainly use it to find and start applications. Not so much for finding contacts
  • Dropbox - trusty dropbox. A must have on your computer and now on your phone as well. In case you don't have a dropbox account yet use this link and give me and you some extra space
  • TripIt - again a app I already used on the computer, but became so much more useful now. Traveling really gets easier with this app and it must be one of the apps with the nicest design
  • Remember The Milk - same as for TripIt. Becomes so much more useful on a smart phone. In contrast to TripIt which is stronger as android app than webapp, Remember the Milk on the phone has still some way to go. Nevertheless, I shelled out the money for the pro version
  • Runstar - best running training app I found. Awesome design. Running is so much more fun now. Stockholm Half Marathon here I come
  • Ted - nice to watch some TED videos once in a while. The app has a bug though and each time you start it, it wants to upgrade!?
  • c:geo - nice app for geocaching. Has room for improvement though
  • Foursquare - latest toy/game addiction of mine
What's your favorite app?

enjoy,
Hardy


Addendum:
The one thing I am missing is tethering. Hopefully this will come with the Android 2.2 Froyo.

Thursday, June 03, 2010

Second day of SWDC

Second day of SWDC is about the mobile web. The first talk by Wolfram Kriesing set the tone - the future mobile app is built with HTML. The need for native apps will simply go away. There are some things you can't do with a webapp that you need to do with a native app. To solve this problem there is Phonegap that bridges native functionality to the webapp. The mission of phonegap is to finally disappear when these features is part of the HTML spec and implemented in all browsers. It seems like a distant future. In the meantime we can build one webapp and use phonegap to get it to various devices.

Then Mikael Kindborg talked about dynamic languages on the android platform. He showcased droidscript that lets you dynamically run apps with javascript on your phone. I have seen it before and it was as cool as always.

SonyEricsson had an advertisment spot that first was an old school presentation by Claes Nilsson and then a more interesting hands on demonstration of Sonys development tools by Thomas Bailey. Also Eclipse was started for the second time this conference. It felt weird this time too.

Tom Hughes-Croucher of Yahoo! held a splendid presentation on latency arguing that bandwidth is not a problem - latency is. He made a really nice breakdown of the typical problems of performance with wireless devices. Mobile phones as well as laptops. He finished of with showcasing YQL - a Yahoo! tool to do joined queries on the server instead of joining them at the client.

Tom Blackmore - the gis guy - talked about how to implement geolocation succesfully. Lots of eaxmples, code and urls to illustrate. His enthusiasm is really something.

Nikolai Onken from Uxebu talked about human apis - his video examples didn't work but he still managed to convey his message. New smart phones combined with new smart HTML enables us to make really smart applications. One app he made shows the heart rate via bluetooth in a mobile web application. (On a jailbreaked iphone though.... :-) ) He also had some gear with him to get temperature and humidity readings. All truly imaginative stuff and a motivator for moving forward.

Googles Michael Mahemoff talked a bit (more) about HTML5 and the endless possibilities. At this point I was a bit tired and started to drift away. Henk Jurriens talk about open data sets didn't really wake me up either although the subject is really interesting.

Tim Caswell on the other hand had a lot to say about node.js. He had lots of code that I barely understood and he made a really, really cool demo where 2 web browsers on devices he brought together with several browsers in the audience moved circles around concurrently. The node.js server had no problem orchestrating several concurrent users posting loads of data concurrently. Really cool.

2 days of web development conferencing is now over and I have to return to the warm embrace of my current client and a Java enterprise portal project. How strange that I haven't heard a word about portals in any of the 5 or 6 conferences I have been to the last 18 months..... Oh well - it still pays the bills. Anyhow - superthanks to Peter Svensson and his crew for a great conference. I will be back next year!

Wednesday, June 02, 2010

Mi Buenos Aires

I noticed I never really wrapped up my travel reports of Argentina. Here is a little speech I gave at my last Göteborg Toastmaster meeting. Why do you not follow me on a trip to

MI BUENOS AIRES!

It was early in the morning. I woke up after a 13 hour flight. Looking out of the window I finally saw our destination - Buenos Aires. It felt like the city never ended. I had never seen such a big city before. Imagine a place with 13 million people! After landing we took a taxi into the city driving on an elevated expressway. To the left and right one tower building next to the other. And then after a 40 minutes, leaving the expressway, we were taking our final step into the city. Buenos Aires had us in its grip. People everywhere, cars honking, buses roaring. It's was frightening, but at the same time exciting! Just an example, Avenida 9 de Julio in the city center is 12 lanes wide. Try crossing this road in one go!
But it takes only a few days until you realize that all the things you were initially so terrified about are nothing else then the pulse of this city. You live with it and learn how to flow with it. In the end it even feels strange when on a public holiday the city is just this tiny tad less noisy and frantic.

MI BUENOS AIRES la gente - the people!

What makes a place really special? It's the people you meet. One amazing thing about Buenos Aires is the friendliness of the Porteños - the inhabitants of Buenos Aires. It is so easy to meet people, having just a short conversation. Sometimes this might even end with a dinner invitation. It is hard not to fall in love with this type of openness. And once you get to know people you will also hear about their worries. For example, you will hear, how frustrated and disappointed they are with the government. Politicians as well as great parts the public sector are corrupt, making it hard for the whole country to move forward. Most people will also painfully remember the 2001 crisis when Argentina went bankrupt. There was inflation and the accounts of people were frozen. Many people lost all their savings. To the day people don't trust banks. Instead their preferred place to keep money is stashed under the mattress. Cash is King.

MI BUENOS AIRES los famosos - the celebreties!

It's time to talk about a few famous people. Remember at least one of these names and you will have a great conversation opener for YOUR trip to Argentina. Lets start with the music. Ahhh, Tango. The love, the passion! If you are only a tiny bit interested in tango you will sooner or later hear of Carlos Gardel the soul of tango and the one person who made tango fashionable. One of his most famous songs is: "Mi Buenos Aires Querido" :)
On the political side, there is of course Juan Perón and his wife Evita. Both loved and hated at the same time. Perón was a military social climber who became the most famous Argentinian president. His style of politics even has its own name - Peronism. However, his success would not have been possible without his charismatic wife Evita whom all of you probably know from the movie with the same name. But even though she was fighting for the poor and for women rights her legacy is controversial and many people will accuse her of acting in pure selfinterest.
Last but not least, the sports. El Diego, la mano de dios - the hand of god! Who hasn't heard of this famous football player with the number 10. Maradona is still treated as national hero in Argentina. He even has a honorary lounge in the famous football stadium la Bombonera, the home stadium of the Boca Juniors. And this is a football club every Swede should now, because back in 1905 when the founders of the clubs were sitting together in the harbor of La Boca, contemplating which colors their new club should have, they decided that the flag of the next ship sailing by would decide the colors for their club. Let's just say that the players' jerseys, the stadium, even some of the houses in the neighborhood are yellow and blue.

MI BUENOS AIRES la comida - the food!

Knowing me you know that I will have to talk about food. I had great hopes into the Argentinian cuisine before going to Buenos Aires. A country colonized by the Spanish with millions of Italian immigrants. That sounds like a marriage made in heaven.
Well true, you cannot tell an Argentinian how to grill his meat. Buy the best cut you can afford a little salt and straight on the parilla - the Argentinian grill. Tastes sooo good!
But wouldn't you get bored to eat meat EVERY DAY? It seems Argentinians are so obsessed with their meats that they forgot to think about anything else. Argentina has a great choice of fresh and tasty vegetables, but the Argentinians have no idea on how to prepare them.  When it comes to spices it starts and ends with salt. Pepper is already considered exotic.
But who needs food when he can drink wine? I fell in love. Argentinian wines are outstanding. A Benegas Sangiovese from Mendoza - a dream come true! Viva el vino de Argentina.

MI BUENOS AIRES!

Ahhh, I am running out of time with so much left to say. I hope you enjoyed this smörgåsbord of impressions.

BUENAS NOCHES

First day of SWDC 2010

I have this nice habit now to write down bits and pieces from the conferences I attend. It is a good way to remember what actually happened. This time I am at Scandinavian Web Developer Conference in Stockholm. About a hundred web hackers (as Mark Wubben called us) assembled at the old almost ancient movie theatre Skandia at the most popular shopping street in Stockholm. Quite a sight actually. Despite one late cancellation the schedule was absolutely packed. The conference is one track only so you don't get anxiety over choosing but on the other hand might get stuck with something boring. That was not a problem the first day. An uninteresting talk was also welcomed due to the need for some relaxation in between the very interesting stuff.

The first day was about web development leaving mobile development for the second day. It started out with Robert Nymans talk about HTML5. I saw it a couple of weeks ago at geek meet so nothing new really. (Although it was refreshing to see the presentation evolving a bit since then.) HTML5 is obviously happening and due to its backwards compatiblity it can be used right away. Not all browsers support it but even a rather bad browser can be javascript shocked into liking the new tags of HTML5. This new version of the standard was brought up several times during the day in different context. The common consensus seems to be that it is a good step forward but there are still lots of pieces missing. The most serious critic came from Chris Heilmann in the ending talk of the day. It was a great talk on giving users what they really want. Not many users care at all what version of HTML that runs in their browser - even less what javascript framework we used to write it. They just need it for some non technical purpose. In this business we have a habit of extrapolating our own behaviour to that of our users. We all install new browers as soon as they appear and have modern smart phones in our pockets. Not so with our users. Some of them hate computers and have learned to change as little as possible to make sure that it doesn't break. This is a big failure of our industry. Obviously there are reasons users feel this way. It is not nice to tell users that they need to install another browser in order to use a site. Chris jokingly suggested that instead of just turning users away if they have IE6 we should use directx to blur the pages for them. This would cause user head aches and would eventually lead to corporations having to abandon IE6 in favour of modern web browsers. Chris talk was possibly the best of this day. CSS3 guy Daniel Glazman also talked a bit about HTML5 in his talk called "Browser War 2010". Actually the talk lacked mentions of the war but was nevertheless an interesting history lesson with some forward looking in the end.

Another theme was code organisation. Dylan Schiemann held a hilarious but a bit unstructured talk about dojo and motools showing how to work with encapsulation in Javascript. Sergey Ilinsky presented the Ample SDK and argued for a declarative way to describe user interfaces. Apparently declarative most often means XML which is a bit strange to me. Couldn't any language be used for declarative style programming? And Rik Arends of ajax.org showcased a web based IDE for web development in the cloud. Pretty impressive but not totally obvious that the tool is truly useful. Stefan Pettersson also touched the subject of code organisation when talking about large scale javascript web sites. He gave us some good pointers about where to look for performance gains.

More interesting was Alexander Langs talk on document databases. The examples he used were a bit naive perhaps but still made the point clearly. There are many use cases where document databases is preferrable. This subject is kind of a neighbor to node.js. Malte Ubl held a great introduction that yet again made me want to try it out for real. I may even have to reorganize my list of new technologies for spare time exploring. The huge selling point for node.js is its performance characteristics. It is such a simple and beuatiful idea - to get away from processes and threads waiting for stuff to complete and instead have a truly asynchronous solution.

Patrick Chanezon of Google walked us through Googles cloud offering and showed how to create a web site using GWT and app engine. It felt strange to see someone actually compiling something not to mention running eclipse. It was a strange sensation in this context. Another Googleoriented talk was Mark Wubbens brilliant introduction to building Chrome extensions. With a couple of really nice and thoughtful examples he guided us through the important features of Chrome extensions. It is actually similar to Greasemonkey scripts for Firefox and it is apparently the same guy now working for google.

All in all - the first day was great. Thanks a lot to Peter Svensson and his crew! Looking forward to tomorrow.