Wednesday, January 06, 2010

Drools syntax highlightning in IntelliJ

I tried to include my version of the IntelliJ IDEA filtype configuration in a comment at Danilo Gurovich blog without success, but here it is:

 <?xml version="1.0" encoding="UTF-8"?> 
<filetype binary="false" default_extension="" description="Drools" name="Drools">
<highlighting>
<options>
<option name="LINE_COMMENT" value="#" />
<option name="COMMENT_START" value="/*" />
<option name="COMMENT_END" value="*/" />
<option name="HEX_PREFIX" value="" />
<option name="NUM_POSTFIXES" value="" />
<option name="HAS_BRACKETS" value="true" />
<option name="HAS_BRACES" value="true" />
<option name="HAS_PARENS" value="true" />
<option name="HAS_STRING_ESCAPES" value="false" />
</options>
<keywords ignore_case="false">
<keyword name="accumulate" />
<keyword name="collect" />
<keyword name="comment" />
<keyword name="end" />
<keyword name="eval" />
<keyword name="exists" />
<keyword name="forall" />
<keyword name="from" />
<keyword name="function" />
<keyword name="global" />
<keyword name="import" />
<keyword name="package" />
<keyword name="rule" />
<keyword name="then" />
<keyword name="when" />
</keywords>
<keywords2>
<keyword name="!=" />
<keyword name=":" />
<keyword name="&lt;" />
<keyword name="&lt;=" />
<keyword name="==" />
<keyword name="&gt;" />
<keyword name="&gt;=" />
<keyword name="and" />
<keyword name="contains" />
<keyword name="in" />
<keyword name="matches" />
<keyword name="memberof" />
<keyword name="not" />
<keyword name="or" />
</keywords2>
<keywords3>
<keyword name="inserLogical" />
<keyword name="insert" />
<keyword name="retract" />
<keyword name="update" />
</keywords3>
<keywords4>
<keyword name="activation-group" />
<keyword name="agenda-group" />
<keyword name="auto-focus" />
<keyword name="date-effective" />
<keyword name="date-expires" />
<keyword name="dialect" />
<keyword name="duration" />
<keyword name="lock-on-active" />
<keyword name="no-loop" />
<keyword name="salience" />
</keywords4>
</highlighting>
<extensionMap>
<mapping ext="drl" />
<mapping ext="rule" />
</extensionMap>
</filetype>

I'm back!

Wow! It have been almost 4 years since the last time I wrote a post on this blog, but I guess nobody really noticed that I have been away? :-)

Nothing much has really changed since the last time I was “here”. We have moved to a new house, been on a holiday in Thailand, Florida and Sardinia, Italy, which all was really great.

I have been on three different projects in the last four years, but now I'm back at the same client as last time. I haven't been coding much Ruby lately because I discovered Objective-C and iPhone programming which is great fun. I also went to the WWDC2009, and I have to say that this was the best developer conference I ever attended. I’m going back go this year as well…


See you soon!

Thursday, April 27, 2006

Still no MacBook Pro, but…

I have been waiting to buy a MacBook Pro until Apple fixed the few issues that have been reported on the first MacBook’s. After the release of a new revision that claimed to fix these problems, I ordered a 15.4” 2GHz MacBook Pro with 2GB Ram and 100MB 7200rpm hard.

A few days later I read at the Mac1.no site that the new 17” MacBook Pro was released. I had of course heard the rumours that it was expected, but I guessed it would be too expensive. It wasn’t.

For about 185 kroner (about $30) more I get a larger screen, faster processor, one extra USB port, one FireWire800 port and a 8x SuperDrive compared to a 4x on the 15,4”. My Mac dealer let me change the order so now I’m waiting for my 17” MacBook Pro. The drawback is that I have to wait a couple of weeks longer until I get my new laptop, but I hope it’s worth it!

Monday, January 16, 2006

The wait is finally over...

When I first heard the news about that the new MacBook will ship in February, my first reaction was, “I'm have to have one as soon as possible!

But maybe I should wait until the first update comes? Will it have an 8x SuperDrive as the old PowerBooks? What about the missing FireWire 800? It honestly doesn’t worry me that much as the reportedly problem with the heat.

Technorati Tags:

Sunday, September 25, 2005

Congratulations, Fernando Alonso!

The youngest formula one champion in the history is Fernando Alonso. That’s clear after he finished third at Interlagos, Brasil today. Montoya won the race just before my personal favorite, Kimi Räikkönen.


You’ll be back next year Kimi!!!

Tuesday, September 20, 2005

Eclipse, take five…

As the few of you that actually reads my blog already know, I have quit my job in Telenor and started as a consultant again. My new employer is Net Professionals, and my first assignment is for a company that both use IntelliJ, Eclipse or whatever you want to use. But in this project all developers uses Eclipse, but I was free to use IntelliJ. I felt that this could be a good chance to learn to use and like Eclipse, even though that I have tried four times earlier without being convinced. But this time the version is 3.1 and it looks even better that the last time, so I am (trying) to be optimistic and starting up Eclipse and getting ready to do some real work.

One week later...
I am back using IntelliJ.

What is that makes Eclipse so popular. It’s free and that’s nice, but if you are a professional developer using your IDE or Editor many hours a day, $499 is not that much. The main advantage Eclipse has over IntelliJ is the wealth of good plugin’s. While IntelliJ have some nice ones, my favorite being TestDox, it is still far behind Eclipse. But as coders IDE IntelliJ shines, except for the ugly look and feel used by the 5 version. I wonder when I will try Eclipse for the sixth time…

Damn you Ruby on Rails

After discovering Ruby on Rails this spring :-) my interest in Java and Java related technology has dropped to the bottom. I’m thinking “why the hell should I want to do it in Java when I’m so much more productive in RoR?” Yes I know, Rails and Ruby is not the best choice for a lot of problems and systems, but it have made me often think that “this must be able to be solved an easer way using some other technology”. But that’s a good thing.

Friday, October 08, 2004

Spring Rich Client Project

Yesterday I was attending a Spring Framework seminar arranged by Objectware. They had invited Keith Donald from Interface21 to do a full day presentation. I have been using Spring for quite some time now, so I didn't learn anything new, except for one thing: The Spring Rich Client subproject, founded by Keith.

It has been a while since the last time I wrote a Swing application but after this presentation I would not mind getting my hands dirty again. What it provides is a nice abstraction layer above the Swing API, the same as the "Core" Spring Framework does for the J2EE API's. Nice :-)



Monday, October 04, 2004

Hibernate, PostgreSQL and Spring

Puh.. After couple of hours swearing at this problem, I finally found what caused the error. The problem was that when trying to insert data in a PostgreSQL table I kept getting errors for some of the rows I was trying to insert. The error message returned from Hibernate was something like "data integrity violated by SQL 'null'…" blah blah blah "… Call getNextException() to see the cause". The Spring Framework data access exception was reporting a DataIntegrityViolationException.

I therefore assumed that the problem had to do with the quality of the data I was attempting to insert, such as null values. The suspicion did not get any less by the fact that the source of the data was read from an Excel spreadsheet using POI.

When I finally got to my senses and traced the Hibernate code, I was able to see the "next exception", which did NOT have anything to do with null values. The problem was that once in a while the value of one cell contained a string of six characters instead of five as defined in the database schema :-( It would be nice if Hibernate could include this information in the returned error message. Please Gavin!

I have recently converted from MySQL to PostgreSQL, after been lobbied by Thomas Roka-Aardal and have found that PostgreSQL is much more intolerant and strict than MySQL, but after all I think that is OK.