Friday, April 30, 2010

Reloading lib/ classes in development


I've finally found a solution for reloading classes found in rails' lib folder.

In Environment.rb: Add the path for the lib subdirectory where my module was stored, e.g.

config.load_paths += %W( #{RAILS_ROOT}/lib/item_setup )

In Development.rb: Add the name of my Module to the explicitly_unloadable_constants list, e.g.,

ActiveSupport::Dependencies.explicitly_unloadable_constants = 'NameOfMyModule'

If you have other modules you want to automatically reload, use the << explicitly_unloadable_constants array, e.g.,

ActiveSupport::Dependencies.explicitly_unloadable_constants << 'NameOfAnotherModule'

That's more less it.

Monday, April 19, 2010

JavaScript editor in VWD 2010 rocks!!!

Hi there,

I've always been a huge fan on VisualStudio. That fact alone means that my opinion might be biased. However what the VS team made this time with the capabilities of JavaScript editor is simply magic!

Here's what I started with: I've created an ASP.NET MVC project using default settings. That has produced the basic skeleton with Scripts folder in it. Then I've created a new WebSite, copied the jQuery stuff over from that MVC project, created a new JScript file, included jQuery in it and bang! IntelliSense worked just like that!

And it's not only because the $ object is defined! Far from it! Take a look at the following screenshot:

As you can see the IntelliSense worked not only with the stuff that comes directly from $ object but also worked just fine with my plugin as well!

Here's another example that I've tested - ExtJS:

As you can see the editor was capable of parsing all the sources from ExtJS and provide me with the proper IntelliSense for a an object instantiated from Ext.Window prototype!

To add to all that the editor works like a speeding car - fast like I've never seen it before anywhere else!

I'm sure other IDEs (especially those from Java world) provide good developer experience but VWD 2010 is simply the best!

Thanks Microsoft for making this tool available to everyone!

Have fun!

Thursday, April 15, 2010

4Developers conference in Poznan

Hi all,

last month I've visited one of the biggest conferences for developers in Poland. 4 tracks, a lot of very passioned people, lots of great material, good beverages and great service - all in one place.

To the right there's Jarek Palka with me just moments before his presentation on JavaScript on the server side :) Very interesting stuff indeed!

If you'd like to check out the agenda and presenters look at

One thing that I must say was a big disappointment was the presentation given by Jacek Laskowski. I was really expecting more from a person like him. Instead we were given a lot of CV stuff and unprofessional jokes.

A very interesting thing I saw there was a presentation by Maarten Balliauw showing not only that programming against the cloud is possible but also that using Microsoft's IDE and tools it's extremly easy! Good job Maarten!

See you again in a year!

Sunday, April 4, 2010

JTK - the killer emerges

Hi all,

recently I've been shocked by how many people write their unit tests without actually putting any assertions in them. Can you imagine that?

Long story short a good friend of mine proposed that we write an application/maven plugin called JTK (which stands for Java Test Killer) that will check the test cases and will provide a clear overview of how many of the tests that the project has make no sense based on the fact that they don't call any assertions.

You can check out the sources on (it's obviously managed under Mercurial so you'll have to have the client installed which you can get from here)

There's also a couple of tools guarding the process of creation: Hudson and Sonar.
The maven repository (in case you'd like to give it a spin) is here (snapshots only as of this moment but we're planning on releasing it eventually).

We're at a very early stage but if you're interested in helping out let me know!