Wednesday, December 09, 2009

Alegerile prezidentiale din 6 Dec 2009

Am simtit nevoia pe de-o parte sa trag niste concluzii, pe de-o parte sa justific alegerea pe care am facut-o in 6 Dec 2009.



In rest, despre politica este putin probabil sa mai scriu ceva in urmatorii cativa ani.

In afara alegerilor, clasa politica romaneasca este plictisitoare; captiva in propria neputiinta de a construi, care in esenta, dupa parerea mea, deriva din lipsa de profesionalism. Cu alte cuvinte sunt incapabili sa faca ceva, altceva decat sa se certe, sa se piarda in interminabile dueluri verbale sterile, sa minta direct sau prin omisiune, sa deceptioneze. Singurele lor actiuni soldate cu efecte clare, concrete sunt exploatarea in mod direct sau prin interpusi a resurselor statului in beneficiul propriu.

Lucrurile bune intamplate in Romania ultimilor ani au fost sau impuse de apartenenta la Uniunea Europeana, sau efecte secundare necalculate ale unor actiuni politice, sau efectele actiunilor individuale ale unor "proscrisi" cum ar fi d-na Monica Macovei si presedintele Traian Basescu.

Friday, November 13, 2009

Multiple Browser tabs and Flash

I've noticed this a few times already: If I open up 20 tabs, even in Chrome, (don't mention Firefox cause 20 tabs in Firefox means 4TB RAM and growing) in some cases the processor will just run amok and force the cooler into behaving like a V8. I somehow blame that on Flash things that animate in all those tabs even when they are not enabled/active. Couldn't we have something like "put those on hold" when the tab is not active ? I mean I don't care about them even when they run in the active tab !!? Well, of course I'm talking about ads.

Monday, November 09, 2009

Eclipse Jetty (7)

I am not sure of this but from what I found on the net it seems that due to some licensing issues JSP support doesn't work as it should on the Eclipse distribution of Jetty 7. Whatever the reasons, I wasn't able to make JSPs to work properly on Jetty 7.

If you need JSP support go to the codehaus repository and grab a Jetty 1.6 version. Works like a charm.

Friday, November 06, 2009

Terracotta is at it again

Well, I tried to tweet this but somehow the generated bit.ly link is all messed up so here it is:


Wheee ! Works.

PS. For those who don't know what Terracotta is: http://www.terracotta.org/

Saturday, October 31, 2009

Amazon's International Kindle

This weekend it's been a very proficient one. I've got a MacBook Pro and an Amazon Kindle (round of applause). I've managed yet to set up the Mac and get it working with everything including Eclipse etc, but I have yet to understand why Kindle "cannot establish a connection" after I left Bucharest. Since I arrived in Cluj Napoca it doesn't go wireless, it doesn't see the 3G network, very frustrating experience overall (If anyone has an idea why please drop me a line, I'll remain grateful forever :-) ).

The feel of it is pretty nice, but from my point of view the usability, application menu design, and everything that runs it, is totally broken. It feels weird and the options that are available to you are never those that you would expect. That's weird. It's almost like it's been designed to get you in trouble.

The "international" promise is that it connects to wireless networks. Well would you imagine that you cannot chose one, and if it's protected by username/password you cannot specify them ? I mean, wtf ? Drop the thing altogether and boot a decent version of android on it. You have them all, End of story.

So far, my bet was inspired in the sense that I asked for the Kindle ONLY because it allows me to get the books from Amazon so much faster than anything else. Only if this would finally start working ... Otherwise is totally useless. I mean totally.

UPDATE:
With the new Kindle firmware update for the international version (2.3) two things happened:

1.) It now connects through wireless from my current location. Hurray !
2.) It sees PDFs

Means it does what I bought it for. I'm happy.

Wednesday, October 28, 2009

Tests

How many times did I hear this : "There is not time for tests, really" ? Countless times. The counter point is: "Did you ever measure the time you spend debugging issues you have created?" Always compare that with the time you need to write a test to eliminate the issue you just debugged.

And then, if you are honest, ask your boss to draw the money for the time difference from your next salary. Because he'd be paying for the time you were writing the tests anyway.

Thursday, October 22, 2009

Another Google Android kickass usecase - eReaders

With the Barnes & Noble eReader, Nook, which btw looks very nice, we've got another evolution direction for the Android. I'll add it to the list I've put together in another blog post.

Those who say Android is not a market today, they prove nothing but lack of vision. Because Android is not about today's market but it is about what the future holds.

It doesn't even need to be the iPhone killer to succeed because it plays in so many other spaces. The main achievement of the Android so far is that it proved to be a viable platform for far more than a social smartphone. It redefines mobility.

Thursday, October 15, 2009

SSD

A nice one on the state of SSD drives:

http://www.codinghorror.com/blog/archives/001304.html

Tuesday, October 13, 2009

Business people din Romania

Au nevoie de mult bun simt. Foarte mult. Pe langa alte abilitati de care e nevoie.

Intrebarea zilei


Thursday, October 08, 2009

Noi nu vrem respect...

Noi nu ne facem, de obicei, auziţi.
Noi nu ne putem face auziti din cauza zgomotului.

Noi nu ieşim în faţă.
Noi am fi in fata daca societatea s-ar raporta la o scara de valori reale.

Noi ducem, în tăcere, România în spate.
Noi nu ducem pe nimeni in spate. Ii toleram.

Noi mergem la spital cu teama că e ultimul drum.
Noi mergem la spital abia digerand un sistem cretin.

Noi suntem mereu pândiţi de moarte pe şoselele groazei.
Noi am vrea sa fim panditi de moarte pe niste autostrazi, nu pe drumuri cu hartoape.

Noi vedem cum şcoala românească se prăbuşeste.
Noi recunoastem ca scoala romaneasca nu a fost niciodata prea sus.

Noi trăim, după o viaţă de muncă, umilinţa bătrâneţii în sărăcie.
Noi acceptam sa fim umiliti, in saracie, la batranete.

Noi ne naştem cu şpagă şi murim cu ea.
Noi participam la perpetuarea shpagii ca metoda in sine, din lipsa unei alternative.

Noi vedem cum justiţia îi scapă mereu pe şmecheri.
Noi nu intelegem rolul justitiei, asa cum o percepem la ora actuala.

Noi suntem cei abandonaţi de politicienii care au grijă doar de ei.
Noi toleram la nesfarsit o clasa politica arhaica, debila.

Noi nu mai avem încredere în aceşti oameni care s-au obişnuit să ne mintă.
Noi stim sa recunoastem minciuna acolo unde o auzim sau o vedem.

Noi suntem speriaţi de lipsa lor de viziune, de voinţă şi de caracter.
Noi suntem constienti de lipsa de valoare (atat profesionala cat si umana) a clasei politice.

Noi ne simţim în pericol.
Noi nu ne simtim in pericol mai mult decat altadata (de ex acum 30 de ani). Poveste veche.

Noi trebuie să rupem tăcerea.
Noi rupem tacerea in discutiile personale, chat-uri si pe blog-uri. In Media e zgomot.

Noi trebuie să ducem România înainte.
Noi reprezentam un flux paralel cu Romania. Nebagati in seama, neauziti, mergem mult prea inainte.

Noi nu vrem funcţii şi nici putere.
Noi apreciem adevaratele valori, fie ele chiar legate de functii sau putere.

Noi nu cerem nimic.
Noi cerem, neauzit, ceea ce ni se cuvine. Totul.

Hint: a se citi in opozitie cu manifestul "acelei" campanii media. Mai multe lamuriri aici

Wednesday, October 07, 2009

Requesting buying and importing a SSL certificate

So here it is, I am embarrassed after a 2 days long journey to buy / import a SSL certificate from Thawte. It was not their fault, it's only me and I thought it may help people if I share:

First I want to say that I have bought a SSL123 certificate. What I am saying here may not apply to other types of certificates but it still may give you a hint. I have used Java's keytool tool for all the command lines appearing below.

So here are the correct steps:

1.) Generate a RSA type keypair. important: as of the date of this post they only support RSA

keytool -keystore path_to_keystore -genkeypair -keyalg RSA -alias jetty

You cannot secure an IP address through a certificate, only a domain name e.g. yourdomain.com. The common name of your certificate (the keytool will prompt you for your first and last name) must be yourdomain.com

2.) Generate the certificate request, CSR:

keytool -keystore path_to_keystore -certreq -keyalg RSA -alias jetty

VITAL: make sure you keep the keystore file somewhere you can get it later and don't change, tamper, delete anything from it. Just keep it safe as it is!

The CSR looks something like this:

-----BEGIN CERTIFICATE REQUEST-----
AAAAERERRRTERTDASDASYDASDMAN312312312DASDASd etc etc
blablalonger stuff here

-----END CERTIFICATE REQUEST-----

3.) Go to their site, choose the certificate you want to buy and make sure you get right at least the following options:

When you paste your CSR you may be pressing the button "test your CSR" just to make sure all the info contained in it is valid.

Choose Tomcat as the server software if you will deploy on Tomcat or Jetty. Otherwise choose the server you are using, if it's not there then ASK the support what to put in there. On the bottom of the support page you'll see a live chat button, use it, as they are very responsive. If you use Tomcat/Jetty and don't choose Tomcat as the server software they will not issue a PKCS7 but a generic certificate and you won't be able to import it later!

Tax number is the VAT number in case you're buying for a company registered in the European Union.

4.) They'll pass you through the verification process and send you back the certificate which looks just as the CSR string but with PKCS7 header and footer:

-----BEGIN PKCS7-----
blablatons of things here
-----END PKCS7-----

5.) Save that string into a certificate.txt file, and save it with Notepad (on windows), not Wordpad or anything that would mess with formatting, insert spaces or anything like that.

6.) Run this:

keytool -import -trustcacerts -file certificate.txt -keystore path_to_keystore -alias jetty

VITAL: it needs to be the same keystore from where you generated the CSR, untampered, unchanged, at least not the alias you have used to generate the CSR. So the alias you have generated the CSR from, must be there !

If you will see something like 'Certificate reply was installed in keystore' you're done.

If you get something like

"keytool error: java.lang.Exception: Input not an X.509 certificate"

then it may be that you didn't save the certificate correctly, or that you tampered with the keystore. However this error can appear for 1000 reasons other than the type of your certificate.

Take this information more as a guide then as "religion", use it w/o any guarantees, and whatever you do not understand or are not sure of, contact their support otherwise you may find yourself in the situation of buying something totally different than what you actually need or want.

Wednesday, September 30, 2009

Innovation gagged ?

Here you can read the entire article which I consider to be a brilliant piece. Thanks to Alexandru Popescu for twitting it (I've made a habit thanking him for sharing so I'd better set up a daily cron job to do that for me :-D ). What hit me very hard and almost made me feel bad (heaving a 6 years old daughter) was the following bit which I find to be astonishing:
If you look at 4 year olds, they are constantly asking questions and wondering how things work. But by the time they are 6 ½ years old they stop asking questions because they quickly learn that teachers value the right answers more than provocative questions. High school students rarely show inquisitiveness. And by the time they're grown up and are in corporate settings, they have already had the curiosity drummed out of them. 80% of executives spend less than 20% of their time on discovering new ideas.

I always though that lack of innovation is deeply linked to the social factors as poverty in under-developed countries where 80% of the time you must actually think of how to survive. Instead I learn it's very deep in our "organization" as a species. SCARY !

What do you value ? The right answers or the atypical / provocative questions ?

Tuesday, September 29, 2009

Most people ...

... never learn.

Thursday, September 17, 2009

Android

I asked a very talented friend of mine to do a drawing for me, called suggestively "Android". Here it is. You've got to love this guy, really:


Here are few other works he's done, enjoy :-)

Wednesday, September 16, 2009

Tuesday, September 15, 2009

Android in "exotic" usage scenarios

I've seen some very cool usages for the Android so far, let aside the mobile phone platform:

1.) Business Desk Phone/Organizer looks really good !
2.) Video / Gaming platform , needs a lot more work but hey ! At least it's something
3.) Not that exotic but still kickass :-D - Archos internet tablet, eat that Apple :-D
4.) Barnes & Noble eReader - Nook
5.) M Tube MID anyone ? MID shares media with TV set via gestures.

Anyone knows of any other usages ?

Monday, September 14, 2009

Android vs iPhone success - phone producers are not getting it

When designing a smartphone you should look at the most simple, stunningly obvious fact: that it lets you build something soooo far from a PHONE. Fuck the phone! It's an aged, expired concept. It's dead !

The iPhone's success is due to the fact that it is NOT a phone. Let aside the design of it, which is brilliant just as most of Apple's designs, I won't write a 500 pages paper about why the hell it's so nice. It just is ! And still Motorola Cliq is nowhere near it. And so is the LG GW620 (Btw could LG have found a name that is harder to remember ?! Hardly !). Hell, even HTC models, aside Hero, are not getting it entirely. However, from all the Androids out there, HTC Hero "gets it" the most.

So all Smartphone designers out there please stop embarrassing yourselves and stop designing Phones ! Yes. Drop the Phone concept altogether because the most successful Smartphone(TM) out there, the iPhone, is not a phone. Just as iPods are not mp3 players ! Ah, another example at least by the looks, Zune is stunningly beautiful.

Just go out there, find some punks in the streets, catch them graffiti-ing the walls and ask them what would they like at a device that would, amongst others, allow them to socialize online, listen music, twitter, face-book, or look fancy. And they will not point to any Cliq or LG GW 620 ppx trgg 55.

Android is a platform that you can build upon. It's been proven. Use it but for fuck's sake STOP DESIGNING PHONES ! The iPhone showed you all that people want much more than a phone. Give it to them. And something beautiful will arise finally. The days of the phone are over. Let there begin the days of the smartphone, call it the Phone 8.0 (Laugh, Mr. O'Reilly is gonna come after me =)) ) or whatever you want.

Aside design, iPhone is about the way you interact with it. It allows grown-ups to be children again, be able to play again. You touch it, slide it, zoom it, talk to it. Nevertheless they may do useful stuff but it lets you play, relax, feel good when using the device. The virtual keyboard is something that should be embraced, stop designing phones with touch screen AND QUERTY or whatever fucking sliding keyboard ! You are defeating the purpose of the touch screen. Why do you have it if you don't use it ?

In the iPhone / Android era, which started a while ago and is happening right now, the phones are all free. Cause nobody will buy them anymore. You'll get a bag of phones with a $4 subscription (massive laugh here). If you want just a phone, the chip and the battery fits into the volume control of your headphones.

Read my lips: The phone (as we know it) is dead. Sooner you realize, better for your sales.

The (short) quest of Speech Recognition on Android

Well yeah, speech recognition is possible BUT apparently it is handled by default by the Google Voice Search package (I am not 100% sure but it's all I have learned till now, read this for example) which is available only for the brave :-D. And I am weak.

So I am currently investigating other ways of implementing it. There would be two main directions to investigate:

1.) Perform the speech recognition on the device - I'm not sure how practical this is, would certainly eat up a lot of CPU/battery, if possible at all. However I didn't find any resource on this, at least not yet and not for Android.

1.1) As an intermediary step maybe it would be easier to implement recognition for a limited vocabulary for which you would store sound/text values, record voice and try to match the recorded sound against the existing entries. This may work, the issue here would be analyzing/matching the two sound samples.

2.) Capture a sound file/stream, upload it to a server, convert it to text and get the text back. I found Sphinx as a possible server side package to do the speech recognition and get the text back, but there are some drawbacks to this approach: you need a server, you need bandwidth (3G, Wifi I'd say) and you need to convert from the capture format on Android (3GPP, mpeg whatever) to the formats supported by Sphinx which is dependent on JavaSound (cringe!), these being aiif, au and wav.

However for the 2.) point there is a slight advantage in being able to choose the server platform/package which would not need to be Java (I specifically looked for Java, Sphinx 4 is Java) and I assume that speech recognition efforts have been made in other languages too.

Has anyone else tried/thought of doing something similar ?

Wednesday, September 09, 2009

The danger of becoming "social"

I've been working on getting up to date with the "social web" lately, you know, twitter etc. And I realized this morning that I checked twitter and another dozen of social or news sites before starting work (well I always do that, nothing new here) but something was missing ... umm what ? And then I suddenly realized. I forgot to check email :-D . That must mean something.

Amongst others, it means Google Wave launch is long over due as it will, hopefully, allow to see them all in one place, and not only see them but also collaborate, share, whatever, not sure of all this 2.0 thing :-D. And if it doesn't, well, we'll see how we can help it :-D

Thursday, August 20, 2009

Vacanta in Romania

La Felix cu nevasta si copilitza:

1.) Romanii au descoperit un nou mod de a sta in apa: Multi si in picioare. Multi multi, desi si in picioare. Mai si umbla. Da' nu inoata. Defel. Ne-a salvat nenea de la pensiunea unde eram cazati ca avea piscina. Am facut acolo cateva ture bune.

La Costinesti, tot cu familia:

1.) Poate Silviu Prigoana sa trimita o flota de masini sa stranga peturile.
2.) Oamenii, nu inoata, stau in picioare, ciotca. De data asta in apa alburie (de la jeg banuiesc) si plina de alge.
3.) Salvamarii salveaza fetele de aglomeratia de pe plaja si le duc in larg fluierand stavrizii umblatori
4.) Ala de la Aqua Park de la tobogan zice: Cat are fetita ? Eu: 6 ani. Ala: Ia pune-o langa perete. Eu: De ce ? Ala: Sa vedem cat e de inalta. O pun langa un marcaj de 1.20 m, e mai mica cu un cap, ce sa-i fac daca maica-sa care e mare deja si are doar 1.50. Zice geniul ala: Nu are domne' 6 ani, vad dupa expresia fetzei. Ma gandesc (ma al draku, or fi angajand astia numa paranormali sau cu studii superioare sa sufle in fluierele alea, ma prinse asta furand 6 luni din varsta lui fiica-mea) . Degeaba. Nu ne lasa. Sotia are o tentativa de a fi un pic mai dura da dupa atatia ani de Cluj Napoca s-a inmuiat samanta de cearta, nu le mai are. Coboram jos la alea pentru fraieri ca aia sub 1.20 platesc degeaba. Bine ca acu' un an in Antalya au lasat-o turcii pe toboganele de adulti pe gratis. N-avea nici un metru. Da aci e lumea civilizata ma. Nu e Turcia. Da banu' si du-te stai in ploaie daca vrei baie.
5.) Stam la pensiunea Golden Pearl. E in Costinesti in zona primariei. O recomand. E cel mai bun lucru de anul asta pe litoral. Totul e pe fatza, totul e cinstit, ce platesti aia primesti, camere curate, dencente, mancare BUNA, da BUNA, nu ca zic eu asha. Gatita calumea, e prima data cand nu imi merge burta la draku de cand merg eu la mare in Romania.

Vine si continuarea ...

Wednesday, August 12, 2009

HTML 5 and client - server apps

Was listening to this: http://www.infoq.com/interviews/HTML-5-Ric-Smith interesting stuff as always, thanks InfoQ, I really needed to hear what's the fuss about HTML5. I say it's Pandora's box. Meet me at a beer and I'll explain cause it's going to take all night :-D

However there is this question asked by the interview-er which I just couldn't stand responding :-)

One of the trends that I have seen that seemed to have occurred several times: when you start of you have the main server, you have the dumb terminal and logics gets pushed down to the clients, and then the same thing happens with personal computers, pushing desktop applications down to the clients, not being run on the server anymore. Those started to shift back and then you have web applications which are hosted on the web and instead of Flash plug-ins. Now it seems there is a shift back down, to adding more intelligence to the client, and doing more work on the client. While at the same time there is a push to move stuff from the client to the server. Is this a pattern that you see is happening as well and what do you think it's going to happen in the future? Will we continue to do this back and forth or not?

I think, at least in the Java community, all evil started with Struts. Yes. Most server side frameworks used this paradigm of receiving a request, rendering a HTML page and send it back in response. And yes, there may have been some valid reasons to do that, but not all. And it wasn't the only alternative. AJAX is with us since many many years but it got lots of publicity and traction with the clients like GMail appearing. As a long time GWT runner now (and not only GWT but I'll stick to that mainly) I can see, hands on now, how the HTML rendering on the server side was a huge mistake.

So let me put it this way:
Spending CPU cycles on the server side for rendering HTML is simply wrong. All the flow and UI rendering and event interception SHOULD happen in the browser. You go back to the server if you want to access persistent data or want to coordinate with other thin clients (simplest example is a chat app) and send or receive data from them but that's it. UI rendering and application flow in most of the cases belongs to the client. There are few cases where you need to go back to the server for application flow but that proportion is minimal.

And as I also said here: http://lightweightyes.blogspot.com/2009/04/is-browser-new-virtual-machine.html UI rendering and application flow in the browser allows for a whole new level of scalability (rendering HTML on the server side was eating a humongous percent like 50 - 80% of the total application CPU cycles in some apps that I saw and even developed, fingers crossed !). Also in the above mentioned post I was envisioning running a Terracota setup in the browser (maybe too much beer at that time). Of course that with the current state of HTML it's not possible. But there is this thing called Web Sockets which comes in the HTML5 and this would really enable that scenario and many more. Don't ask me how practical is that, but I am sure there are Usecases where that would be appropriate, we just need a smart guy to point them out :-)

As I said: Pandora's box :-D

Tuesday, August 11, 2009

Apple vs. Google

Rumors spread more and more about a war going on between Google and Apple. And it's not about the Google OS, I think. iPhone business has generated more revenue in 2 years than the MAC. That is, Apple has discovered how to monetize peoples appetite for mobility.

Sun actually discovered that appetite a long time ago and tried to put Java on every phone in the world, it succeeded also to a big degree but never had success due to the stupid J2ME designed by lab people who had nothing in relation to reality, just as those who designed EJB ! fingers crossed!. But poor Sun didn't know how to pack it and sell it, neither nice as Apple does with the iPhone, nor smart as Google does with their Android platform. With the HTC Hero suddenly the world realizes that iPhone can happen on other platforms too, and can be infinitely smarter than a touch screen. Yeah, exactly that is Android. So freaking smarter !

And so, we have Google with their "Open" nonsense threatening to rival the huge milk cow that is the iPhone. If you come to me and say Apple doesn't try to build there a monopoly just freak off and make a Google Voice app for the iPhone.

So we have a potential Microsoft in it's inception in the mobile world which is Apple. And there is Google who, with intention or not, is directly competing with that through a platform, Android, which if would have been built by Sun instead of the dusty J2ME years ago would have revolutionized the mobile world back then.

We'll see who's gonna win. My stakes (all) are on openness. Yeah, Google exactly.

P.S. I just hope I won't get into the position of buying an Apple iPhone because there's nothing better, like it seems I need on the desktop. Windows is killing me (or the need to reinstall it). For Linux I am still looking for drivers (remember windows 98 installed each weekend ?). So there remains the MAC. It's a need though, I am not part of Apple's i*Poo* culture, it's simply gay. Yeah I said it. That's what it is. And I don't want to be part of a platform where apps meant for me get rejected by some schmuck's dictatorship. I come from a country where I had tons of that shit all my childhood. I won't take it as a grown up if I can choose.

Monday, July 27, 2009

Ubuntu, your HDD, hearing sounds, hdparm, usability and secretaries

I've installed kubuntu on my laptop, planning to replace XP with it, no more windows poo, if kubuntu or any linux for that matter, ain't working I'm Steve's Jobs guys for good (*cringe*).

However, due to the way ubuntu is configuring (or not configuring) your HDD power management settings, I am hearing every few seconds a strange sound coming from the HDD, something like a de-click. It's like it would stop every 5 seconds or stop every 5 seconds and then start again.

After some googling and foruming (back again to the OS hacker's life, when you were installing and reinstalling windows 98 (faint !) drivers every night in your lousy student life) I found that the issue could be the aggressive power management saving policy. For the hard disk here's how you tell it to save the least, thus not stopping it at all or something, the explanations are a bit fuzzy:

hdparm -B 254 /dev/hda

And then the sound stopped. I guess this means it will smack the battery but I don't care I'm using it as a mostly desktop system anyway.

In other words I am not saying that Ubuntu is far from windows usability but still, imagine your secretary running something called hdparm in the console. Well not that they'd be able to detect strange hard disk sounds either, until it's smoked !

Otherwise I'm quite happy with kubuntu, Java, Eclipse, Tomcat they all running like a breeze. Surprisingly kubuntu's UI is quite nice, with one annoying inconsistency, I've set the general system font to size 7 but still in Eclipse's editor it's a lot bigger, I wonder how am I going to fix that.

And I still need to get the sound working, I have no clue on how to install/get/replace the driver for it but somehow I feel that these days I am going to meet a smart-ass who's going to tell me how to do it and then laugh at me.

Wednesday, July 22, 2009

Manipulating petabytes of data

Have you ever asked yourself what would you do if you'd need to do it ?

Here are some useful links:
Feel free to add to the list if you feel like it. It crossed my mind that JBOSS hasn't announced such a product. It's about time isn't it ? :-D

Monday, July 06, 2009

The Google Android vs iPhone bet

Here's my bet with Radu of the Eloquentix fame, on Google Android vs "iPhone 3,4,5 G, XPDU kaboom big badaboom":

In 2 years not only that iPhone will become obsolete, it will own the same market share that MAC has. And not only that, but it's "quality" will become a true legend. As Apple switched from the big mighty rocket science processor to Intel ones, I am waiting for the day they will run their iPhones on Google Android :-D, forced by this shit some people call "market".

And so, The iPhone will be nothing more than an excellent design powered by decent quality, while Android enabled phones will benefit from the unstoppable inovation comming from Google AND the herd that belives in these two words: "open *whatever*". I am only waiting for the terminal (HTC Hero may be the one, I only wish it was cheaper) that will be able to create the momentum needed for the vendors to say: This Android thing really has potential. We loose if we don't exploit that market. And that is the "bye bye iPhone moment". (Hear me Sony? Wake up you Playstation XYZ pimps. You want your playstation on mobile? The answer is Google Android). I've bet before but this is the first public bet I make. Let's see how it turns out.

Here Radu, just post a comment here and we have a bet. The stakes is the latest iPhone 3GPdBHboom badaboom (I buy you) available in 2 years from now on (6 July 2011) vs the latest equivalent price Android enabled phone (you buy me) and I get to choose which one as there will be plenty :-D. Who looses the bet, buys.

Thursday, June 18, 2009

GWT - Application is not up to date erred message

GWT has a very weird way of dealing with serializable types. If a type is not serializable (read in the docs what that means) and you try to use it with the remoting support you'll get all sorts of weird exceptions. I have explained one situation in a previous post.

In the same ideea, if you have a remote exception (that implements IsSerializable cause you want to send it over the wire right ?) BUT you are unfortunate enough to forget that ALL google serializable types MUST have an empty constructor (as per their docs) you will get a

IncompatibleRemoteServiceException

with the message "Your application is not up to date, hit refresh in your browser bla bla bla". And you will hit refresh a lot of times with no result.

If you read the IncompatibleRemoteserviceException javadoc you'll see it is thrown in the case of sending over the wire a "not so" serializable type. So an exception implementing IsSerializable it is not yet serializable if you DON'T ADD A NO ARGS CONSTRUCTOR to it.

I'd wish GWT would check at compile time for all serializable types used (or at least declared) and at least give a warning if not fail the compilation altogether.

Remember: a GWT serializable type MUST have a no args constructor (unless you don't specify any of them) and that's for all your serializable type hierarchy.

Thursday, May 21, 2009

JBoss Drools and GWT 1.6.4 classpath conflict

If you're doing a project with GWT 1.6.4 and you also use JBOSS Drools you will have to exclude the Drools libs from the classpath when compiling java to Javascript with GWT, as it throws a proud representative of the jar hell:

[java] [ERROR] Unexpected
[java] java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.looku
p.ProblemReferenceBinding.closestReferenceMatch()Lorg/eclipse/jdt/internal/compi
ler/lookup/ReferenceBinding;
[java] at com.google.gwt.dev.javac.JsniChecker$CheckingVisitor.findClas
s(JsniChecker.java:231)
[java] at com.google.gwt.dev.javac.JsniChecker$CheckingVisitor.checkRef
s(JsniChecker.java:142)
[java] at com.google.gwt.dev.javac.JsniChecker$CheckingVisitor.endVisit
(JsniChecker.java:65)
[java] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.trave
rse(MethodDeclaration.java:227)
[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.travers
e(TypeDeclaration.java:1149)
[java] at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclarat
ion.traverse(CompilationUnitDeclaration.java:487)
[java] at com.google.gwt.dev.javac.JsniChecker.check(JsniChecker.java:3
50)
[java] at com.google.gwt.dev.javac.JsniChecker.check(JsniChecker.java:3
40)
[java] at com.google.gwt.dev.javac.CompilationUnitInvalidator.validateC
ompilationUnits(CompilationUnitInvalidator.java:159)
[java] at com.google.gwt.dev.javac.CompilationState.compile(Compilation
State.java:198)
[java] at com.google.gwt.dev.javac.CompilationState.refresh(Compilation
State.java:178)
[java] at com.google.gwt.dev.javac.CompilationState.(CompilationS
tate.java:93)
[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDe
f.java:264)
[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:283)

[java] at com.google.gwt.dev.Compiler.run(Compiler.java:170)
[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.
java:84)
[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:78)
[java] at com.google.gwt.dev.Compiler.main(Compiler.java:131)

Thursday, April 02, 2009

Is the browser the new virtual machine ?

It just crossed my mind, as I am developing with GWT (Ext - JS - *Cringe* ) these days, that there is at least one similarity between the Java JVM and the Browser (you name it) as it is perceived these days. So the first and the foremost JVM promise is "write once run everywhere".

I think that with a good JS/CSS framework you can accomplish that in the Browser also. However I am not sure that ALL the browsers are prepared to host efficiently tons of objects (remember how we program in Java =)) ). Some steps have been taken by Chrome to that respect, I hear. However are they prepared for efficient garbage collection, are they secured, stable enough ? How about thinking of a lot of JVM goodies paralleled onto the browser ? (Like are we ever going to have a browser level Terracotta product ? *Cringe* again)

Monday, March 30, 2009

What's the most scalable web tier ever ?

The browser ?
 

Friday, January 09, 2009

IIS6 + Tomcat configuration, old classic

So you're not a IIS guru, nor a Windows guru and somebody forcefully give you the job to configure IIS6 with tomcat. You're unfortunate enough to go to all web wide tutorials which point you on how to place the ISAPI redirector dll, where to put it, to configure it through registry or properties file. I certainly prefer properties file as you don't want to hear my oppinion on windows registry (or maybe you want: it's a pile of shit !). After all workers.properties and uriworkermap.properties correctly configured it still doesn't work. You start searching frantically on the internet.

There are two things you will certainly miss cause they are missing from most of the tutorials I have read:
  • create a virtual directory (right click on your IIS web site you're configuring) named jakarta and give it execute run and read priviledges (most of the time read and execute should be enough) pointing to the folder containing the ISAPI redirector DLL, named as in the extension_uri ISAPI redirector configuration property aka: extension_uri=/jakarta/isapi_redirector.dll
  • create a web service extension (right click on web service extensions, add, name it tomcat point it to the redirector DLL and make sure you check the magical 'Allowed' status)
So after all the isapi_redirector.properties, workers.properties, uriworkermap.properties and correctly defining the DLL in the ISAPI Filters tab of your web site and seeing the magical green arrow victoriously pointed UP nothing works ? Well shit happens. REMEMBER to perform also the above points with the virtual directory and web service extension and you'll save yourself 2 days of frustrating windows restarting, IIS stopping and starting instead of playing a nice game.

Happy IIS-ing and if you're doing this on a regular basis ... find another job !

Monday, January 05, 2009

Do not go to Soelden - Haus Albin ...

Unless you want to be introduced to the 'open appartment' concept: 2 separate rooms, the toilet outside the rooms and across the hallway (used by all living at that floor, I mean the hallway, but nothing stops anyone at that floor to stumble upon that toilet anyway), the kitchen and the living room 2 floors downstairs. I am wondering when will we be introduced to the appartment that is splitered accross 2 separate buildings.

As for the temperature it was hitting 15 degrees celsius (YES on the inside, with us sleeping there !), I woke up 3 nights at 4 AM literally frozen (outside it was -15 to -5 degrees celsius all the time) and thinking to buy an electrical heater the next day so that we don't get back home sick as hell. When we got back home we were wearing t-shirts at 19 degrees celsius and we were thinking "what the hell, it's too warm in here. oh wait, no, it's 19 degrees, it's 3 degrees under the european standard, it's just that we don't need to wear tons of clothes, it's normal temperature".

And after all these, the "land lord" (literally fucking laugh here) accused us of being "cheap" when we didn't agree, immediately and without comment, to pay the kids station fee (70 eurs/kid. We paid it of course, we are decent people). We were wrong not to announce the kids in advance, I admit it, but you guys were extremely unpolite to put it so straight after 2000 euros you have charged for that freezing, so called 'open appartment'. To put it blunt as well, you were fuckheads with no excuse. You almost ruined our holiday and yes, you suck !