2009-01-19

The trouble with triggers

It is nice when I get a confirmation for a feeling I had for a long time.
Triggers should be use with extreme care. It is a bit like AOP, very powerful but you don't let anyone play with a chainsaw.
So it is worth reading an article The Trouble with Triggers By Tom Kyte in Oracle magazine.
Note that there is a free paper version if you don't have a netbook for the toilets.

2008-11-27

Installing KUbuntu alongside Fedora

What decided me to try Kubuntu is the updated Miro version, the one that allow to download Youtube chanels. Ubuntu has it, but Fedora is lagging a bit behind. (Notice that Mandriva and Suse had it too).
Besides, the Fedora 10 Feature list didn't excite me.

In order to install Kubuntu alongside Fedora on a free LVM volume, I decided to use UNetBootIn. There are no RPM, you have to download it from sourceforge. Since it is only one single exec, there are no problems.

So, you just launch unetbootin, choose which distribution to install, I choosed Ubuntu 8.10 Net install. It download a little file and ask for reboot.

I rebooted and choose "Unetbootin" in the Grub menu. It launches Ubuntu's install.
Partitionning is the scary part: Ubuntu doesn't help you much to choose the right LVM volume ! Basically, don't use your existing /boot, choose to config LVM and only mount the LVM volume that will contain Ubuntu. It still says that it will change the partition table, but luckily, it didn't break too much things.
I did a bare lightweight install (no X server).

Ubuntu's install changed the partition's UUID. Normally, it wouldn't have been a concern. But I used to configure Fedora's fstab to mount it under /mnt/ubuntu. So when I booted back to Fedora it falls short on a "Repair System" shell. Just because it couldn't find the UUID anymore !! Anyway after some Googling, I remounted the filesystem in read/write mode : "mount -w -o remount /" as seen in Linux Forum and just commented the bad line.

After rebooting, I used system-config-lvm (don't know why it doesn't appear in the menu) to mount the kubuntu partition back on /mnt/ubuntu. Then I wanted to copy the /mnt/ubuntu/boot/ to /boot/ and add Ubuntu to the Grub menu. But I only had to updated Grub to add the Ubuntu menu. The file were already in /boot/ : I wonder if UNetbootin copied them there in order to boot the install ?

Anyway, I just rebooted and choose "Ubuntu" in the Grub menu. It reached quickly a standard shell where I did a sudo apt-get kubuntu-desktop, triggering the download of not less than 1,5Go of deb files. But I know that I can switch from one to the other systems.

After rebooting, I still have to configure the NVIDIA drivers, since it gives me a blank screen yet ...

2008-10-15

Xebia Web Framework Contest (French)

Xebia is a well known company with a strong focus on Java and Agile.
I already heard of them through Gero Vermaas's blog.
I saw this context in a post from Matt Raible.
See: RIA Contest : Flex / Silverlight / GWT / Echo3 / JavaFX.

The comment are worth reading too : it shows that it is an interesting experiment, but very limited in time and focus. So it won't be true in 3 month or on another kind of project.

2008-10-03

Java browser plugin on 64 bit Fedora and more

It's been a long time. So just to say that :
- Fedora 10 should be there soon

- There is some hope for a good java plugin on 64-bits browsers. For now just install java-1.6.0-openjdk-plugin. Or better, just yum install java-1.6.0-openjdk-*

- being on a project with a lot of JMS, Tibco RendezVous, Complex Event Processing, Event Driven Architecture and the likes, It is the kind of paradigm change that bring some fun to the job ! So no more HTTP request nor function calls : just send events and hopefully someone else will write the code to react to them. We are so used to HTTP and the firewall censorship that we don't even consider JMS ! But there are plenty of cases where it makes perfect sense to use events and messages : a lot of them !

2008-07-22

Web Development as Tag Soup

A post Web Development as Tag Soup by Jeff Atwood in Coding Horror. Very good blog indeed.
There are so many things to say about this problem. Maybe because it touches the Sacred Graal : separation of concern : Presentation and Business Logic.

Overall, there is no silver bullet, but people tends to forget that a Web Application, Web site or intranet can be very different projects and they compare Oranges to Apples. The client and development team changes everything.

Obviously, there are tons of comments, I will try to extract some :

- Mixing HTML / Javascript / server code : is it that bad ? Can there be a "good tag soup" ? "You recently championed Embracing Languages Inside Languages."

- Everyone is promoting his solution : generally a templating engine, but with some discipline to reduce the amount of code in the soup.

- A part of the problem is readability : <a href="<%=foo%>"><%=bar%></a>. Some suggest that "attribut soup" might be more readable. At least it is well formed XHTML : <p tal:content="string:foo"/>. Others consider that it is still a kind of Soup.

- "MVC tends to lead to file proliferation. It takes at least 5 files to create a single page: 3 JSP (using Tiles), 1 servlet, and 1 bean. I have to open 5 files to change a page."


Aims :

- Testability : code in the controller is easier to test than code in the HTML page.

- Wysiwyg : If the HTML is in the server code : only server-side developer can touch it. Designer won't be able to change and refine it. It is best to have well formed HTML templates to work with.

- i18n : what if the text is in the server-side code and in the HTML !

- Same kind of problems with escaping strings and unicode : Javascript, HTML, forms ... all different ways for your text from the Database to your front end !

- Readability, maintenance

- reuse, component


Solution proposed :

- Template Attribute Language : TAL (Python, PHP, Java ...) or XMLC (Java). A bit like the Wicket templates.

- Google XML Pages (GXP) Not very impressive yet. Wuld have to be coupled with some tools or IDE to be compeling.

- Get rid of HTML : GWT (almost), JavaFX, Flex, Curl ...

- Get rid of old paradigm : from Server-side generated HTML switch to SOFEA, Thin Server Architecture.

- more declarative language : XForms ...

- Use an all in one IDE + framework (JSF, JSTL ...) : Eclipse RAP, Netbeans, ...


Argument in favor of Tag Soup :
I quote :
Using more abstraction is just plain wrong, because:
1) you want to control what the output HTML will look like, so forget about a 'builder' tool, like a series of doc.addTag("P",content,attributes) ... it's Ok for passing data through some XML markup, but HTML documents are to complex to keep a clear idea of what the output will be this way. Customizing the layout is going to be a mess.
2) You want to use a 'template' library to avoid using too much logic inside your markup. This ends up being a joke, because you still want some logic, and you end up re-inventing a worse language that has to do loops, conditionnals, formatting, while your base language has certainly a better, more elegant syntax.
3) "simpler" intermediary language, like some XML markup then transformed to HTML through XLST leads you to the same pitfalls. You think you can avoid having logic in your markup, you end up reinventing another language, having to learn that language, to find out you get even more complexity.

The problem with tag soup is just the same of any language in any situation when you lazily prefer writing spaghetti code than creating meaningful functions, explicit variable names, clear indentation, well divided problem solving. Any programming language embedded in HTML is OK, anything else is a waste of time. What you need is to do all the complex stuff outside that embedded HTML file : do the business stuff and read all the records in the controller, and when you need complex formatting or logic rules, do it in helper functions that you'll define in a library accessible from your embedded html. In that embedded HTML, use your primary language, except everything must be very concise and trivial. Anything non-trivial as to be in outside helper functions with meaningful names. How do we program in general ? When we write a method we make sure all the code is about the microproblem you're trying to solve through that method, and anything too complex has to be in other methods, right ? That's just the exact same thing happening here. Being in the middle of HTML markup doesn't mean you can forget those programming rules. It's lame to blame your programming language when you put yourself in a mess, and that applies here too.

2008-07-08

UML is going down ? or is it the whole programming thing ?

At first I was looking at UML because I like it and would like to see more MDA and MDSD done. But I read 13 reasons for UML’s descent into darkness and the future doesn't seem to shine :


But since I am very skeptical about the conclusion that are generally drown from Google Trends, I searched a little more and it seems that whatever the subject "Java, SQL, HTML ..." the trends goes down more or less :

So, I still hope to see something good out of AndroMDA or Taylor.

2008-07-01

Linux Podcast

#! CrunchBang has a nice Linux Podcasts Roundup
And there is a long uncommented list in Monterb.org !
Another commented list in Tux University. (By the way, LearnHub seems to be a nice place !)
Another one from LinuxLink with little comment and logos . Go to Google for the others.

But it will be hard to replace Lug Radio !!

2025 Summary

Trying to see if I can manage to complete a few projects this year. Sold my 10 years old Squier Stratocaster, bought a Strandberg Standard N...