mardi 26 juin 2012

$%$@#!# maven...


Have you ever ended up in a maven build quagmire ? Cornered in a desperate situation with absolutely no idea on how to get out ?

I have always tried to stay away from maven because I have always seen it as a tool to try to overcome lack of communication and of being rigorous inside a development process. And I just don't think that there is a tool to replace that just yet !
Yes, I understand that a tool well done can really be helpful regarding that... But actually from what I have got from it, maven was not it... and actually far from it.

I just remember trying to compile some very simple application and ending up downloading half of the internet... For what should have a been a simple javac call...
Granted, the tool can do so much more, but why make so much fuss before you are actually asked for more ?

Sooooo I had a bad feeling about all this, but always tried to stay away from it... And I did manage to... until last friday... I ended up having many hudson jobs implying maven that just went nuts... and I had to try to get that back on track.

Well, what can I say. I think the dang thing stinks already when everything works, but becomes literally rotten when something goes wrong. And believe me, things will go wrong. Maybe you don't mind having to install your own local mirrors, monitor them, and go through tens of cryptic xml mazes. Well that's your choice, but leave me out of there. I could go on and on about this, but I will let others do it at my place.

Here are the pieces that made me feel better after a nightmarish day:
- A discussion about some bad reputation over at StackOverflow.
- very articulate point of view about various maven problems.

The first discussion gives many insights about the troubles you will (or sadly are) face using maven, and to get used to the fanboys arguments that will make you wish them to face all the horrors that happened to you.
The second is just so very well constructed, that I don't really have anything to add...

To me what is probably the worst point about maven is that as a programmer, you end up with a result (jar or war) that is just probably bigger than it should... And that mostly, you have surrendered the idea of following tightly your dependencies.

What struck me reading this, is that those point of views are old (2010 & 2009) ! And these are so valid today still !

One last point that people should be aware of and that is not mentioned in any article that I have read : once you opted in for maven, if the reproducibility of your build is important to you, then you might end up with a difficult way out. You will have at least to stick with the dang thing until the builds depending on it no longer have to be remade !

Anyhow, don't let the fanboys go down on you saying that they have become a de-facto standard.
The 2012 eclipsecon survey results (go to page 15) shows that even if it has made great progress, maven still only accounts for 42% of the builds. So make they pay the due respect to the venerable Apache ant.

In conclusion, do you sometimes ask yourself these two important questions:
- What build system do you use ? 
- And why ?

jeudi 31 mai 2012

Just came across this amazing guy (James Hague) and reading his posts has been really refreshing:
- How did things became so good.
- The most important decisions are non-technical.
- Solving the wrong problem.
- Write code like you just learned how to program.
- Coding as a performance.
I hope that you'll enjoy reading these posts as much as I did.
I encourage you to read the rest as well ;-)
I am already thinking of changing my project to make it an old retro-game in the stateful and event-oriented fashion...
I'll probably just end up doing nothing in the end, but it sure is funny to think about it ;-)

mardi 22 mai 2012

Reset

It sure has been a while.
I am not sure that I will be blogging regularly as I have abandoned all illusions about the strength of my resolutions, but I wanted to try to keep a log about my geek interests of the moment and the areas where I wish to expand my knowledge.

I am a lot into the Software Factory these days. Software Factory being a suite of application that helps company build software more effectively.
That means that instead of actually coding, I am trying to setup the best possible environment for my fellow coders comrades.
That means that not only have I been looking into:
- source control management (mainly svn, perforce, git)
- build systems (cmake, gyp),
- continuous integration systems (jenkins, hudson, buildbot),
- code review tools (gerrit, rietveld, phabricator's Differential),
- bug trackers (redmine, bugzilla, jira, phabricator's Maniphest),
- wikis (redmine, confluence, phabricator's Phriction).
But that I have been checking how different projects are organizing the way they code (Google, Facebook, Chromium, Android, git).

I have been also trying to get back some C basic coding skills.
For that I have been picking up reading "Mastering Algorithms with C" by Kyle Loudon.
And instead of just reading the solutions, I have thought of setting up a github.com account and publish my lousy code there. I have thought as well of taking that adventure in C as an opportunity to go ahead and eat my own dog food... So I will be trying to use that to try those "Sofware Factory" tools during that journey and evaluate them as things go on.

In order to be more efficient, I have been investing some time into org-mode, a remarkable tool to help oneself organize. As I am forced to use Outlook at work, I have been thinking of setting up DavMail on my machine and centralizing all in a faithful fine-tuned emacs.

The plan is ambitious, and we can say that the global course is set. So let's set sail !

samedi 27 décembre 2008

Vista is out...

The hardware is nice...
I am the lucky owner of a Dell Xps M1330 laptop, and last week I just had too many problems with my laptop running vista family basic to my taste. Previously I actually found that the system was pretty good so far. I had overcome many of its shortcomings thanks to open source software, and the system was actually quite (and to my surprise somehow) stable :-)

... and so the problems start rising
I had a first alert with a nvidia video driver update. Seeing that an recommended update was available, I just installed following the usual click-click protocol. Once that bugger installed, my fan just went on full speed. Oh, no problem I thought, the little guy must have run into some cpu intensive little thingie and we'll be back to his usual quite mode soon. Well, no you silly, it just decided it was his new cruise speed now. Then my second thought was the usual stupid but weirdly very effective way out, so I just went and rebooted the computer. No luck, the fan would go off right from startup and would never get back to normal speed. So thanks to actually checkpoints made before upgrades, I kissed the recommended upgrade good-bye and the fan got back to normal sound levels. Then I had just a regular vista upgrade that would fail with some cryptic error code, that I actually really didn't have time to go check for a while... with the concern in mind that I could be potentially more exposed to danger that I usually am with a fully patched system. But the final straw was that I couldn't copy a zip file from the network neighborhood. I had just a popup box telling me that I didn't have the privilege to do that. What da ?!?! Tried to run the explorer with admin privileges didn't change this, and I finally had to catch the file with my friend's usb key. There is probably a (correct) way to do this, but I just don't feel like searching when I am using that os. If I have to play the adventurous way, I'd rather do that on a libre system.

And so let's try something new...
That's why since a few days, the laptop is now running OpenBSD. I have wanted to try this one for a while, and being in vacation, I just decided it was the right time ;-)
I went on the install just the way it's written in the booklet given with the cd, and had no problem with that... I just changed a couple of values on the way to make the /tmp and /var more comfortable in terms of available space. And voila ! OpenBSD was booting in his usual blue background text.
Due to some restriction, the wireless card doesn't work right away, you need to download a firmware first. In my case achieving that is quite simple : plug the wire and ask the friendly dhcp server for an ip address :
# dhclient bge0
once you have access to the Internet, you can then add the package containing the package..
# pkg_add http://damien.bergamini.free.fr/packages/openbsd/wpi-firmware-2.14.1.5.tgz

From there, if you do as sir Schneier (and I ;-) does, a simple dhclient wpi0 will put you online through your wireless card.

From that you probably will want to set your $PKG_PATH to a mirror close to you, and then add mozilla-firefox.
pkg_add mozilla-firefox and voila...

More to come, as I am getting to have more fun with the fish...

vendredi 18 mai 2007

Installing PostgreSQL on your Pardus Linux

Let's say that you want to play around with a sql database engine...
I personnaly recommand PostgreSQL, it will satisfy your needs and seems to be the most inovative gpl kid in the database town.
In Pardus installing it is performed by installing the postgresql-server package.
You can optionnally install the kPoGre package which is a kde administration tool for postgreSQL.
To install these, use PiSi of course... you can do it using the command line or the click-o-friendly gui frontend as you prefer ^^
Once you are done downloading and installing, start your postgreSQL engine through the ServiceManager module of TASMA your Pardus Control Center.
Select your PostgreSQL Database Server and start it up...
Now you need to create a role to your username...
For this you need to create your user in postgreSQL, and to achieve that, you have to call createuser from the postgres user.
amine@dan ~ $ su
Password:
dan amine # su postgres
postgres@dan amine $ createuser amine
Shall the new role be a superuser? (y/n) y
CREATE ROLE
Obviously you would have changed amine by your username ^^
Now that you are known by postgreSQL as a superuser, you can come back to your regular being, and create the database you will be using.
To do so, call the createdb command with the database name...
postgres@dan amine $ exit
dan amine # exit
amine@dan ~ $ createdb example
CREATE DATABASE
Now that the database is created, let's play around with it...
You can use kPoGre if you have installed it (for the Gui Lover :-), or give a try to the command line interactive terminal :
amine@dan ~ $ psql -d example
Welcome to psql 8.1.9, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

example=#
Congratulations, you are ready for playing with your freshly installed fully fledged database engine !
Tip : If you don't like typing psql -d databaseName everytime,  just use your username as databaseName... psql will try that one by default if called without arguments...
Have fun !

lundi 26 mars 2007

Svn server... out of the box... or almost ^^

Pardus Linux gives the opportunity to start your own local svn server very quickly !
Just launch Tasma, your friendly Pardus Configuration Center, and from the System module, click on the Service Manager.
Here you can see listed as an available service (but not currently running) the SVN server.
Click on it and then run it...
Wait young Jedi, you are not totally done yet ! ^^
If you type ps -eaf | grep svnserve in your Yakuake (I am in love with this terminal since the first day I launched it !), you will find something like this :
apache 3755 1 0 23:55 ? 00:00:00 /usr/bin/svnserve --foreground --daemon --root=/var/svn

Oh ho... has Pardus made it work directly...
well not really... Actually there is no such thing as /var/svn yet !
First thing first let's create the directory :
$ su
# mkdir /var/svn
In order to create repositories, you have to use svnadmin :
# svnadmin create /var/svn/repository

Have a look at http://svnbook.red-bean.com/en/1.1/ch06s03.html for more information as how to
administer your server...
Personnally I prefer accessing it through ssh.
In order to do that, use your Service Manager to fire the ssh server... and then you can access your svn server thanks to the url :
svn list svn+ssh://localhost/var/run/repository
It will ask you for a password and then will not give you any error message... meaning your server is ready for the initial import !!
Enjoy !

samedi 3 mars 2007

Let's get started

I thought I had to start a blog and be serious about it...
But I just kept delaying and procrastinating...
But pardus made it happen ! ^^
It's an amazing linux distribution made in Turquey.
The distribution was so great, that I felt that I had to try to help the developpers there in return...
I ended up contacting the fine people at Pardus to try to help the french translation.
In return I was given a developer access in no time, and asked if I had a blog to be linked to the pardus planet !
And here the blog is created ^^
More to come soon !