email extractor

My New Year’s resolution

General No Comments »

My New Year’s resolution for 2009 would be to come up with a releasable version for IntelliCommons, IntelliJAF and IntelliMyAdmin(a future project).

2008 was a busy year and even I didn’t finalized everything on my road map, there is always another day tomorrow and another after that. I hope next year I will have enough free time to work on my personal projects.

See you in 2009…

Should we write code comments?

General No Comments »

Once in awhile I find an article about how we should write code comments, if we should write them or why we shouldn’t write code comments at all.

There are some voices out there who say Comments == code smell ’cause the code should be self documented. I’m not sure about not writing comments at all, but in general writing less comments and more readable code seems a logic thing to do. The real problem with writing self documented code is that is not an easy thing to do.

I have to confess I’m not very good at writing documentation. I’m not talking about writing documentation in English(which is a foreign language for me), even writing documentation in my native language – Romanian – it’s still a pain in the ass for me(or my readers) so I would always prefer to write more code than comments.

However comments are mandatory when writing an API, even if it is simple and it is obvious what it does. Most important is to write not what it does – because this should be obvious just seeing the class or method name – but how it does it, what is expected as input, what is returned and what constraints exists, if any.

In conclusion we should write more self documented code and when we write documentation we should do it right.

IntelliCommons

General, Java No Comments »

After 4 weeks I can say IntelliCommons finally looks as it should be. The code is cleaned up, it has some minimal javadocs, decent test units(about 800 tests, code coverage is above 60%) and the project home page … at least it shows something :) . I’ll be back in a few weeks to complete the home page website, but right now I’m trying to cleanup IntelliJAF - the main part of it, and to create sub-projects for anything that is not core.

Also I’ve created the prohect on Ohloh, I like some of the statistics available over there. I couldn’t add an Ohloh widget to the project home page, I’m still trying to convince Redmine developer(s) to add a feature for inserting HTML fragments in wiki.

There are lots of mistakes in IntelliJAF, some that I knew some that came with great surprise. Anyway, I herd the third time is most of the time successful…at least I think it will be better than the previous versions.

Basically it will have the same functionality like before but it will provide support for Maven 2(and Maven 1 of course) repositories, a better separation between dependencies and plug-ins, cleaner API and many other small changes.

What’s happening with IntelliJAF?

General, Java No Comments »

Well, it’s been a while since my last post, and finally I found some “time” to write about my project(s). I promised myself I will post some updates every 2-3 weeks but somehow I couldn’t find the time to do it.

Since my spare time is not what it used to be, between my family & my job I hardly find some time to work on my side project(s) – by the way here is a nice article about why to have a side project : http://www.ekinoderm.com/wordpress/2008/09/the-importance-of-the-side-project.

Anyway, I’ve done some things. Most important decision was to split the main project into several (smaller) projects and also to extract everything that can be used outside IntelliJAF under a project called  IntelliCommons (did you expect a different name? :) ).

First things first, I’ve started with IntelliCommons. Here is the project home page : http://projects.intellisoftsystems.com/projects/show/commons, for the rest of the sub-projects I will came with details later.

What is with this project? Why to have it outside IntelliJAF?

  • First of all, it simplifies the main project. All those “common” parts are developed and tested(with JUnit) as a separate entity, with its own features, bugs and road map.
  • Second of all, it could be useful to have those small libraries outside IntelliJAF ’cause IntelliJAF is not a suitable for every job. IntelliCommons is a multi-module project, a combination of Jakarta Commons and a few things that I thought it could help me to build Java applications easier/better.

Why to reinvent the wheel? Well I couldn’t just import 20 libraries just because it happened to have something that I wanted. I just took everything that I found useful out there(it doesn’t necessary means copy the code, more like using the code as an inspiration) and compressed them into a library which should be useful and in the same time very small(to be integrated in IntelliJAF bootstrap library).

Right now I’m writing JUnit tests, update javadocs(some explanations are not very detailed) and I will start writing documentation in wiki.

So stay tuned, I will try to keep my word and post some updates every 2-3 weeks…

Handling exceptions

Java No Comments »

There are lots of debates about handling exception in Java, especially regarding checked vs unchecked exception and catching Throwable. I will not go into details, I think peoples more qualified than me already wrote entire chapters around this subject.

Anyway, a few weeks ago I had a huge debate with one of my colleagues about catching Throwable. He is really strong against catching Throwable and I agree with him … but with some exceptions. I totally agree, in a normal execution flow, you shouldn’t catch Throwable, and even if you catch it for any possible reason you have to throw it again.

Everything started around a watchdog thread which was responsible to monitor other threads and come to rescue when was need it. It doesn’t matter what the watchdog does, the question is : do you catch a Throwable in the main thread loop or do you let the thread to die? If you catch Throwable, what you gonna do with the exception?

Neither to say, my colleague was against catching Throwable or Error. He told me I have to let the thread die.

I was against this approach. I agree, some exceptions like OutOfMemory should be handled with an auto-restart.Also InterruptedException should be handled and you should stop the thread. And there are other exceptions which can need special handling. But I’m not sure it is better to stop the thread just because you got an Error.

Of course, you have a proof that something didn’t went well, but do you think the thread should die?

How about this scenario : your (watchdog) thread decides to connect to a FTP server to check some files and gets a LinkageError(NoClassDefFoundError for example because the FTP libraries couldn’t be found). Do you let the thread die just because this is an Error? Or you continue with the next operation and just log this failure?

I think there are situations when you cannot just let the thread die, you have to catch anything(Throwable) , eventually handle some particular exceptions, log the exception and continue. But maybe I’m wrong. I can accept I’m doing wrong things when I’m writing software, but right now I’m still convinced I did the right thing.

Any opinions?

IntelliJAF on Ohloh

General No Comments »

Yesterday, I uploaded IntelliJAF on Ohloh.

I just wanted to see how much is worth it :) . After I saw the result, which seems way off to me, I read the explanation and I still feel is way off. It didn’t took me 49 years to develop it, it took me only 4 year of my free time so probably around 1 year of “normal”development. If you look in the project history the project seems to have 9 months, but just because I lost the repository(the history actually) :) .

Anyway, I’m not complaining about Ohloh, they did a great job presenting these open source projects from a different perspective.

In the next days I’m planing to upload other projects I’m working on, maybe I will get some contributors.

Welcome to my blog

General No Comments »

I’ve finally opened my blog. Mostly, this blog will track my open-source projects hosted here projects.adrian.tarau.org.

Feel free to download my projects and even to join them.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in

Hit Counter provided by Email Lists
Forex Robot
Forex Signals