Harri Kauhanen's posterous

Random postings about Ruby, Rails, HTML, CSS, JavaScript and web development/consumer web services in general. 

Philips, Feel Different (using your campaign website)

Feeldifferent

From: Harri Kauhanen
To: european_executive_escalations@philips.com
Date: Fri, 24 Jun 2011 13:03:48 +0200
Subject: Feedback concerning your voucher campaign and website

I bought a Philips Nivea for Men. The product itself works great and my skin is smooth like a baby's butt. I noticed a "2 Extra Refill Cans" campaign on the box and entered to www.philips.com/feeldifferend and the journey begins...

  • I need to register first... Ok, not very 2011, but fine - I find no button, link, image or anything saying "redeem your refill cans here" :(
  • But I choose HS8440 on the page where you ask me to register your product... perhaps I get it after that
  • Now I get 4 identical HS8440 images on a list and the service asks me to choose a correct one... WTF: They all are the same!! Is this a bug or something!!
  • Ok, I realize that there are tiny numbers somewhere in the list that might be different models
  • I pick up my razor and try to locate the exact model number... but there is not any!
  • Ok, I'll try make it through old bananas and egg shelfs to locate the box with "philips" printed on it...
  • There it is, a tiny sticker stating that my model is not just HS8440, but it is HS8440/23
  • I am now confident to choose the first model on the list of four identical models
  • I am asked about the serial number... this one is easy... the serial number is on the bottom of the... hmmm... darn, I cannot locate it, where in the hell is my serial number??
  • A spot a tiny question mark on the page... Uuh relief. I get info that the serial number should be on the bottom of the product OR printed on the box of the product
  • So it must be on the box... I pay my utmost attention to locate something that looks like a serial number.. perhpas it is the number beneath the barcode.. nope didn't work... is that other number on the sticker? Nope, no dice.
  • Next I call my girlfriend to help and spot the serial number somewhere there on the product, box, manual, receipt... nada.
  • Because I'm an engineer I'm not afraid to use some screwdriver, so lets disassemble this little peace of... product
  • Ok it opened easily, I suppose it was supposed to be opened without much force. And what do I get here... lots of number, many numbers indeeed
  • But there's nothing indicating something being a serial number
  • I'm no loser here so I start entering any numbers I see printed on the product
  • WINNER!!! Number is the one on the middleish-top (but without the trailing /A)
  • Ok, now you wan't to know my home address. And home address I must give, because how else you deliver my loistures to me.
  • The next step MUST be the one I can enter my "Unique reference code" printed in the voucher advertisement...
  • No, I get "Thanks"... Hmmm, here be the link saying "display my products", perhaps it's hidden there
  • Wups, I get an page saying "Page not found ERROR..."
  • Back button... and an another scan... there must be "voucher" link somewhere in the site... Nope :(
  • What about search... No, no results
  • Ok, could it be in my inbox? Let's go and check it out.
  • Darn, just some "confirm your email" and "thank you for registering" mails here. No work of my Nivea refills.
  • Ok, now I am just... pissed. I need to give feedback to someone
  • Where is the "Feedback" option... No I don't want to give a feedback about my product, I want to complain about the campaign and the awful site.
My unique reference code is: 6DAF738270

My primary challenge to you is to send those two Nivea "Anti-irritation" (must be good for me :) shaving conditioners.

My secondary challenge is to fix this broken process and let me know you DID something about it.

If you feel you need a hand making sense to your consumer websites, I will give a good price on my consultancy fee just because my girlfriend thinks I am hot every time a shave.

Best regards and oikein mukavaa juhannusta,

-harri.

No, I did not get any response nor the refill cans. Yes, it is a great shaver, indeed, and my skin likes it.

Comments [9]

The moral choice of using Apple products

Rotten_apple

I am a moral being, like anyone else on this planet. Your moral is yours, and it is unique like your fingerprints. I have chosen to eat less meat, and buy organic food when possible. My moral choices do not make me a better person, but they make me what I am. I try not to promote my moral values to everyone else, even though I might fantasize my moral is the most flawless one on this planet.

 

I love Apple products. I have a MacBook, iPhone and a shiny Apple keyboard. I will most certainly buy an iPad as soon as it is available in Finland. I am actually a tiny bit desperate that I have to wait for my unit while my American friends are raving about it. At the same time, I have started to gain moral issues with my love to Apple and the products they make.

 

My moral issue with Apple is that someone else tries to define what is good for me. Someone else decides what I may use, play, watch or consume on my device. Someone else makes the moral decision over mine. It is not the moral of the United States of America. It is not even the moral of Apple corporation. It is the moral of a little steve who got aroused by seeing a most beautiful naked body, and was told that was a bad thing.

 

I agree that virtual hunting of seals is ugly. I find it amusing that I cannot watch Soutpark or read Pulitzer won cartoon on my iPhone. I understand that someone finds bouncing boobs offensive. The key issue here is, who defines whether something is beyond good moral, and which is not. Is it you? Or is it little steve?

 

If Apple store dominated the markets, they would have a problem for distorting the free competition (at least in EU region). If you could (really) buy as great gadget as iPhone is, but without the Apple logo, we would have a choice. If Apple would realize that they are actually very immoral by feeding their moral to the consumers, we would hear much less rant about Apple.

 

Until the day I will engulf my moral issues with Apple, and just enjoy the wonderful products they make. And how long I still have to wait for my iPad! Please!

 

Comments [0]

Ruby on Rails Suomessa, osa 2

This post is written in Finnish. It discusses about the usage of Ruby on Rails in Finnish companies.

Edellisessä postauksessani kaivelin esille Suomalaisia yrityksiä, jotka käyttävät ohjelmistokehityksessään Ruby on Rails:ia. Tässä jatko-osassa listaa on täydennetty muutaman kommentin kera. Erityisesti minua on tällä kertaa kiinnostanut Rails-osaajien määrä.

Nodeta ei mainitse Rails:ia asiantuntijapalvelut -sivulla, mutta esiteltyjen referenssien joukossa on myös viittaus "enterprise" kokoluokan Rails-osaamiseen. Nodeta tarjoaa myös APIdock -palvelun, joka on yksi suosituimmista tavoista lukea (ja kommentoida) Railsin dokumentaatiota. Rails-osaajia Nodetalla on reilut kymmenkunta.

Kisko Labs profiloituu vahvasti Ruby on Rails -taloksi, sillä kaikki toimitukset on tehty Railsilla. Asiakaskunta tuntuisi olevan enemmän "startup-henkistä" mutta on referenseissä mainittu isoja mediatalojakin. Rails-osaajia Kisko Labsilla on vajaa puolenkymmentä.

Leonidas on Rails-osaamiskeskus Tampereen suunnalla. Leonidaksella on noin puolenkymmentä Rails-osaajaa sekä joukko muita asiantuntijoita. Hauskasti nimetty Protosonni tarjoaa nopeaa sovellustoteututusta erilaisilla paketeilla. Halvin prototyyppi-asteisen toteutuksen saa SonniXL -paketilla 7.500 € hintaan.

Idealist Digital:in emoyhtiöstä Idealist Group:sta löytyy kovan luokan idea-jamppoja (kuten Juha Tynkkynen ja Saku Tuominen). Digitaaliosasto koostuu Rails ja Scrum -osaamisesta kahden henkilön muodossa. 10 päivän ohjelmistoprojekti ID10 maksaa 13.900 €.

Carigna on monessa mukana tehden yritysohjelmistoja, palvelinhostausta ja monenlaista asiantuntijakonsultointia. Carigna tarjoaa myös Ideasta sivusto viikossa -palvelun, joka ei itse asiassa lupaa valmista tuotetta viikossa, mutta 100 tuntia suunnittelutyötä kuitenkin lohkeaa jopa 20 euron tuntihintaan. Rails-osaajia ei varmaankaan ole vielä kovin montaa, mutta lisää tuntuisi olevan hakusessa.

Eficode on valinnut teknisiksi alustoikseen sekä perinteisemmän Java/JEE-maailman että Ruby on Rails:in. Rails-osaajia talossa on varmastikin useita, sillä lisääkin haetaan. Asiakkaat ovat tyypillisesti vähän isompia softanostajia.

Futurice on paitsi oma työnantajani, erittäin monipuolinen sovellustoimittaja. Rails-osaajia Futuricella on muutama. Valtaosa Futuricen Rails-projekteja on tehty Facebookiin, kuten esimerkiksi Postin tarjoama KIMPPAcard.

Reaktor on tätä nykyä profiloitunut vahvaksi Scrum-osaajaksi, mutta ilmeisesti Ruby on Rails toimituksiakin reaktorilaisilta vielä tulee. Rails-osaajien lukumäärästä minulla ei ole tarkempaa tietoa, mutta väittäisin niitä olevan "useampia".

Logica on kokoluokkaa isompi yritys (suomessa 3.000 henkilöä) ja on käyttänyt Ruby on Rails -alihankinnassaan joitakin yläpuolella mainituista pikkuveljiään. Omiakin Rails-osaajia on haettu silloin tällöin, joten talon sisälläkin on todennäköisesti useamman henkilön verran Rails-osaamista.

Digia on toinen mainituista "isoista" Railsia käyttävistä yrityksistä. Rails projektien luonteesta tahi osaajien määrästä minulla ei taaskaan ole parempaa tietoa kuin että useampaakin Rails-osaajaa ollaan parhaillaan hakemassa.

DoDreams tarjoaa alustan "Massively Multiplayer Online" pelien pelaamista varten. Kahdenkymmenen hengen firmassa luulisi olevan ainakin puolenkymmentä Rails-osaajaa ja jokusen työpaikkailmoituksenkin muistan nähneeni.

Nautics toivon mukaan julkaisee ennen veneilykauden alkua Sailmate:nsa. Firma työllistää pari Rails-osaajaa.

Maventa:n ensimmäinen tuote verkkolaskut.fi on tehty Railsilla, ja kansainvälinen versio on Railsia ymmärtääkseni myös. Ainakin pari Rails-osaajaa on näiden tuotteiden takana.

Imaginative Minds parhaillaan hakee Ruby on Rails -koodausvoimaa. Mitä kaverit puuhastelevat ei webbisivujen perusteella käynyt selville.

Sovelto järjestää IT-kursseja ja onpa joukossa myös Ruby ja Ruby on Rails -kurssi. Kurssin vetäjällä soisi olevan vankkaa Rails-osaamista.

OtaSizzle on Aalto yliopiston projekti, jossa syntyy "Aalto Social Interface" sekä joukko sitä käyttäviä palveluita. Joukossa on on ainakin muutama Rails-osaaja. 

Enemy & Sons, O'Design, JOI Technologies sekä BF Engineering ovat kaikki yhden tai muutaman miehen Rails konsultteja. Tästä joukosta tiedän löytyvän myös erittäin pätevää Rails osaamista.

Ainakin Helsingin yliopisto, Tampereen yliopisto sekä Haaga-Helia tarjoavat kurssivalikoimassaan jonkinlaista Ruby on Rails koulutusta. Varmasti näitä on muitakin, mutta en googlettamalla sellaisia enempää löytänyt.

Ja jossain kivien ja männynkäpyjen alla luuraa vielä muutama Suomalainen yritys/yhteisö, jotka eivät ole tulleet kaapista ulos.

 

Comments [9]

Ruby on Rails Suomalaisissa yrityksissä

This post is written in Finnish. It discusses about the usage of Ruby on Rails in Finnish companies.

Ruby on Rails porskuttaa maailmalla epäilemättä yhtenä parhaista alustoista tehdä webbisovelluksia. Rails on erityisesti pienten startuppien suosiossa nopean kehitettävyytensä ansiosta. Tunnettuja Rails-pohjaisia sovelluksia ja yrityksiä maailmalla esittelee muun muassa tämä lista.

Mutta mikä on Railsin asema pienessä Suomen maassa? Tein nopean markkinakatsauksen siitä, kuka Railsia käyttää ja mitä sillä on tehty.

Vahvimmin Rails-profiloituneita yrityksiä ovat Nodeta, Kisko Labs sekä Leonidas. Nodetan lippulaiva on yhtiöitetty ja juuri beetana julkaistu Flowdock, mutta ainakin toistaiseksi voi haetaan leivän päälle tarjoamalla konsultointipalveluita sekä hostausta. Kisko Labs on hankkinut itselleen mukavasti näkyvyyttä tempauksilla kuten 24tuntia.com ja bisnesmiehet.com sekä olemalla järjestämässä Suomen ensimmäistä Rails-konferenssia Frozen Rails:ia. Leonidas tarjoaa muun muuassa mielenkiintoisen mallin toteuttaa "projekti viikossa" (protosonni.fi). Update: Myös Idealist Digital tekee projektinsa Railsilla. Heillä on myös mielenkiintoinen "10 päivää / fiksattu hinta" tuote nimeltänsä ID10

Rails osaamista löytyy myös muutamalta kokoluokkaa isommalta softaputiikilta. Futurice (oma työnantajani), EfiCode ja Reaktor tarjoavat kaikki ohjelmistokehitystä erilaisia teknisiä alustoja käyttäen. Rails ei ole näissä yrityksissä tuotekehityksen keihäänkärki, mutta osaamista ja toteutettuja projekteja käsittääkseni löytyy jokaiselta.

Työpaikkailmoituksista päätelleen myös isommat talot puuhastelevat jotain Railsin parissa. Ainakin Digia ja Logica ovat etsineet Rails osaamista omissa ilmoituksissaan. Pienimuotoisempaa Rails-konsultointia ja sovellustoteutusta tarjoavat muun muassa yhden/muutaman henkilön Enemy & Sons, O'Design, JOI Technologies sekä BF Engineering.

Edellisten lisäksi Suomessa on muutamia yrityksiä, joilla on Rails-tuotekehitystä pääasiallisesti oman tuotteen parissa. Tällaisia ovat ainakin Maventa (www.verkkolaskut.fi), DoDreams (www.maailmannopeinkansa.fi), Mooze (www.heiaheia.com) sekä Nautics (Sailmate).

Tietoni aiheesta ovat varmastikin puutteelliset. Vinkkaathan omat tietosi kommentoimalla tätä juttua tai Twitterillä (@harrikauhanen).

Comments [5]

Problems solved with Charles

I sometimes say: "you are probably not serious about web development if you don't use Charles". What Charles, you may ask. According to the author, Charles is...

"Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information)."

The easiest way to use Charles is to hook it up with Firefox (or any other browser) and start watching what a hell is happening between your browser and the Web. This is not much different from using Firebug's Net inspector. IMHO Charles is slightly better than a plugin, because:

  • The UI works great. If I am only interested in headers, I hide the distractions and display only headers.
  • Filtering. I might have a problem with Ajax requests to a certain site and with a filter I can focus on the problem (not on spotting the right request).
  • You may also debug requests made by Flash components. Your plugin probably does not.
  • I can keep track of the whole session while I travel a site. Plugins usually forget the history as you hit a link leaving the page.
  • You can do little educating tricks with Charles. For instance, slow down the traffic to 3G speed and you might be surprised how (badly) your site works.

This is the way I use Charles 95% of time. But the true power of Charles comes with solving the tricky 5% of problems. Here are some real life examples how I solved a problem with Charles.

I developed a Facebook application with Rails and using Facebooker plugin. I could not save an application box to an user profile. No errors, but no application box either.

I monkeypatched the Facebooker so that I could define a proxy to use when talking to Facebook. Using Charles as a proxy, I realized that Facebooker did not send a parameter that was specified in the Facebook API. Facebook did not return faulty HTTP code. Both ends were buggy, but the problem was solved by fixing the library.

A flash component sent images to server, but images got corrupted every time.

Using Charles I could verify the flash component sent every bit of the data. I also realized it was using a wrong content type "text/html" instead of "image/jpeg". I verified the problem by manually resending the request with Charles, and with the correct mime type. While waiting for the fix from the flash developer, I could keep working as I used Charles to modify mime type for every request on the fly.

I needed to integrate with a complex interface containing multiple steps of SOAP, "raw HTTP" requests, cookie parsing and scraping of HTML meant for humans.

Of course this kind of process will be error prone and customer documentation will be faulty. The problems I encountered were a bit easier to explain to the customer as I could use Charles to capture the traffic and sent capture log the client. The log not only contained the faulty step, but the history of requests before the problem. Charles also validated the SOAP requests I sent, which was useful as I used a "template approach" instead of a "real" SOAP library.

Charles has a home at http://www.charlesproxy.com/

Comments [1]

LOL: My Facebook ad was rejected

My "microblogging" service for Finnish dogs http://haukut.fi had a major defeat today. Our Facebook ad was rejected due "image of this ad is either irrelevant or inappropriate." Yes, I do agree that the picture I used "reveals too much skin" and therefore "is not allowed". Perhaps I should use hairier breeds next time :D

Screen_shot_2010-02-10_at_19

Comments [2]

Retrospective to my old blog

I imported the old blog postings from my self-hosted site to posterous. It was fun to read what I've written.

I haven't found a decent blogging platform yet. Twitter was revolutionary, but posterous and Tumblr are both steps to the right direction (when 140 characters is not enough). 

Rails 3.0 is almost ready, so I guess I don't need to worry about choosing between Rails or Merb.

My ActiveRecord impressions are still the same. Wonderful ORM, might not work with huge applications. My suggestion for namespaced models never saw daylight. But I don't really miss them, because I will not miss relation databases as they will slowly fade away (did you hear me saying a statement or something here... :-)

I still use Fireworks, but really wish I did not have to. It is BUGGY and very unstable under OSX. Really really looking for a killer app outside Adobe camp to resolve graphical needs of web design.

I did not go to RailsConf 2009, because it was never organized. 2008 was fun.

Browser testing is still complex issues and I think I did a good job writing those two articles about the subject. I tend to, however, cope with single real machine or virtual machine having multiple browsers installed simply because switching between versions is so much faster.

My smilies and (improved) coucher are are still in use at http://haukut.fi.

 

Comments [0]

Hello Posterous (bye my old blog)

I realized I hadn't updated my blog for a long time. I also realized that if I'm ever going to blog again, it has to be more lightweight than my customized Mephisto installation. I investigated these options:

After a little testing and tweaking, and reading my old story about choosing a decent blogging platform, I must say I was not much happier now than two years ago. It's year 2010, how hard it can be to embed code from Gist? Or render my code block beautifully? What about importing my old blog? Hello, there's an RSS available. What if I copy/paste text from another source... will the HTML source code fulfill at least some bare minimum semantic standards? Would it remove ugly inline CSS?

No, no, perhaps one yes and no.

But I still wanted to get red of my self-hosted, customized, probably insecure blog. I chose posterous simply because it is:

  • simple enough
  • should be very lightweight to post
  • I hear the search engines do not dislike it

The biggest concern about posterous is... the other posterous blogs. Many of them seem to be just copy/paste articles from the "real blogs". Also I dislike how almost all long articles in Posterous are not accessible. This is probably due the heavy integration with email posting, which simply does not support the concept of "headings".

With short stories posterous seems to work very well. And despite the criticism I just said, it is still a cool concept and very well put service.

Now, will I blog more? What will my posterous postings look like? I really don't know.

Comments [0]

Coucher - Super simple RESTful HTTP service with Rack and CouchFoo

I was learning CouchDB with CouchFoo yesterday. IMHO they are sweet combination and I'm really exited to see how they will mature.

My real task at the moment was, however, to develop a RESTful HTTP service using Rails and as simply as possible. I had some success with Inherited Resources plugin and plain ActiveRecord. I then realized that perhaps having Rails is "too much" for my little service having only a simple XML interface and no HTML based UI or need for session handling. I digged into basics of Rack and suddenly had a great idea. I would only need a Rack aware server, CouchFoo and some Ruby code to implement my RESTful service.

I named it Coucher and here's the code:

Comments [0]

Smileys with Ruby

I needed a simple, preferably accessible, way to add smilies support to one of my projects.

The first challenge was to find nice looking, but free to use, smilies. It was more difficult than you might think, because all the quality smilies I found did not accept commercial usage. Therefore, I ended up creating set of my own 

My original idea was to use a little helper that would markup a given text with smilies a bit. For instance:

This is funny :) This is hilarious :D

The markup'ed version would be:

This is funny <span class="smiley smile">:)</span>
This is hilarious <span class="smiley grin">:D</span>

Then, using one of those CSS image replacement techniques, I would display a graphical smiley and hide the text version.

The first problem I encountered was those techniques seem to work only on block level DOM elements. Smileys, however, should be part of the normal text flow. Another problem was that I could not make the text inside span dissappear and at the same time display a smiley graphics as background. Therefore, I needed another span. I also had to add some content inside the outer span so that Firefox would render it nicely and Internet Explorer would display it at all.

.smiley {
       background-repeat:no-repeat;
       padding-left: 16px; /* The width of the image */
  }

 .smiley.smile {
     background-image:url(/images/smileys/smile_16.png);
 }

 .smiley.grin {
     background-image:url(/images/smileys/grin_16.png);
 }

 .smiley .smiley-as-text {
     position: fixed;
     top: -500px;
 }

Why did not I just hide the smiley-as-text span? The answer: some screen readers would skip the smiley. To be honest, I don't know how screen readers handle smileys, but by not hiding the span, smilies will at least be read.

Here's the Ruby code I would use in one of my Rails helpers.

SMILEYS = {
  ':)' => 'smile',
  ':-)' => 'smile',
  '=]' => 'smile',
  '=)' => 'smile',
  ';)' => 'wink',
  ';]' => 'wink',
  ';-)' => 'wink'
} # and the rest of the smilies...

def smiley(text)
  SMILEYS.each do |smiley, smiley_class|
    text.gsub!(smiley, "<span class='smiley #{smiley_class}'><span class='smiley-as-text'>#{smiley}</span>&nbsp;</span>")
  end
  return text
end

What if I have varying font sizes and we want to use smilies that scales with the text size. Well, my solution is to create smileys for the each font size. E.g. wink_16.png would work well with 16px fonts. We do not need not to touch the Ruby helper at all. Instead, we handle smiley sizes using CSS and simply wrap the the text with a new class, for instance <div class='big-text'>This blog entry is about to end :(</div>.

.big-text {
    font-size: 24px;
}

.big-text .smiley {
    padding-left: 24px;
}

.big-text .smiley.sad {
    background-image:url(/images/smileys/sad_24.png);
}

Comments [0]