hamilton *hammett* verissimo

Another special person... just like everyone else

  Home  |   Contact  |   Syndication    |   Login
  19 Posts | 2 Stories | 5 Comments | 18 Trackbacks

News

www.flickr.com
This is a Flickr badge showing public photos from hammett1. Make your own badge here.

Archives

Post Categories

Image Galleries

Monday, May 22, 2006 #

To http://hammett.castleproject.org/, hopefully for good!


Friday, May 12, 2006 #

I've been asked this lots of times: why Castle hasn't reached 1.0? To be honest, nothing much, but as I'm a perfeccionist I decided to make some things better (and my my top priorities) before going 1.0.

DynamicProxy rewrite

DynamicProxy plays an important role on castle and several other projects outside castle umbrella. However it has some limitations to overcome. I'm working on it on my spare time and hopefully will have something to be tested this month.

After completing it I'll have to work on MicroKernel/Windsor/Aspect# to bring them up to date with the new DynamicProxy API.

Rewrite Scaffolding support

I'm considering rewriting this one using the new StringTemplate View Engine, as it supports recursion, something that is missing on NVelocity. It also should reuse most of what has been developed on the new FormHelper and the new DataBinder implementation.

If you want some cool Scaffolding now, I suggest that you take a look at what Marc-Andre Cournoyer has created.

Complete VS.Net Wizard refactoring

This was requested by the company I work for. They want extensibility on the VS.Net wizards so their extensions can be plugged. It's 99% completed, though. I just need to test it more and create a version for VS.Net 2005

Add Cache support to MonoRail

Still unsure about this one. It's definitely required, and I'd love if we could came up with a design that sits between MR core and the selected view engine. Yeah, View Engine agnostic. But a bad implementation is so easy to be accomplished. I wish I had the need on my current project so I could extract an implementation from it, instead of creating one by trying to antecipate the requirements...

Rethink EventWiring facility

This is an important piece. Events can really improve the level of decoupling you have in a system. The current implementation of the event wiring facility has some assumption that have been wrong on the mailing list. The problem is that we need to come up with different behaviors, so I think the best thing now is to stick with a default behavior and allow the developer to inform what he/she wants through the external configuration... can be a quagmire...

So, when all this issues are solved -- and the issues on jira -- we'll be 1.0 ! :-)


Thursday, May 04, 2006 #

If you're around Olympia, WA, you should stop by and attend to Chris Bilson's presentation on MonoRail. Quoting ssdotnet web site:

"Developing web based applications is full of challenges and pitfalls: session state, view state, post backs, control trees, and page lifecycles. How many times have you heard the dreaded, “I clicked refresh and it debited my account twice!?!?” A number of people have come up with clever ways to simplify web apps. Some don’t actually make it more complicated. Let’s talk about one framework, Monorail, some of the things it brings to the table, including it’s ultra-simple data-mapping API, ActiveRecord, and finish off with a discussion about database unit testing."

Being a little nitpick here I do need to state that MonoRail and ActiveRecord are two completely separated projects. MonoRail offers some level of integration with ActiveRecord and the Windsor container. But, yada yada yada, that's irrelevant. It's cool that people are talking about it. :-)


...snore like a bear with sinusitis? Please tell me I'm not alone on this!


Sunday, April 30, 2006 #

I started the second part of the series on the plane while getting back to my country. I tried to dive into the initialization process. Hope you enjoy it!


Friday, April 28, 2006 #

I started a series of articles with an ambitious goal: demystify ActiveRecord. This will hopefully create some AR hackers in time. So get some coffee and read All you wanted to know about Castle ActiveRecord - Part I


Tuesday, April 25, 2006 #

If you've played all Silent Hill games (I still need to complete SH4) I strongly advise you to go and see this movie. It's very cool ! It could be way better, though. :-)


Funny job ad:

Senior Software Engineer (C#)

We’re looking for the you! Must be able to be bend software with your mind, create hugely scalable web sites, program like the wind, and not get dizzy while confronted with two huge 20” monitors. We use a lot of C#, .NET, MonoRail, Indigo. We like to drink beer and eat CheezIts.

Btw, if you want to apply for this job, see pluck web site

And another thing: these guys developed the awesome Shadows


Sunday, April 16, 2006 #

After more than 12h on airplanes you finally get to the hotel. It's 10:00 AM and you're urging for a hot shower and only half awake. The clerk comes.

- Hi, checking out?
- Good morning. Checking in. I've a reservation...
- Oh, I'm sorry. Checking in starts at 3 PM. We don't have any clean rooms at the moment.
- Oh great. What can I do?
- You can wait on the TV room.

Great service, eh?


Friday, March 17, 2006 #

I can't remember the last time I had vacations. When I've been to London, as any ordinary geek, I used my time to really focus on studying english, thus it wasn't really vacations... I'm also taking a few books (7) and hopefully will find my peace to think about the MonoRail Caching and the new and improved DynamicProxy.

Anyway, I'm leaving in a few hours, gonna drive for about 12 hours nonstop. I wish the weather were a little better :-(

Stay tunned on my flickr, too!


Monday, March 13, 2006 #

Comment posted on Introducting Castle Part II:

I have to agree with you on this, Hamilton - even when I first started looking at Rails (a few months ago) and went, "oh boy, Castle's like Rails but on .NET... but what's this NVelocity thing?"... I was never worried about it being hard to use. If anything, it seems too simple, too procedural after working with server controls for years and years.

For me, it's taken a couple of months working with ERB in Rails to really appreciate its simplicity; I'd have to suspect that 98% of the time, something like NVelocity is more than sufficient for rendering needs. Looking back on it, I see just how awful a lot of my old server/user controls were in terms of separation of concerns, keeping to MVC, etc. Approaching an interface problem with nothing but encapsulation, encapsulation, encapsulation in my toolkit tends to inspire behemoth controls that only work where they were designed, or else I would spend half my time trying to predict how to make a 'reusable' control instead of getting the job done. I still have DataGrid derivatives which were designed for a particular type of data, automatically varying parameters on stored procedure calls to accomplish sorting, paging, editing, and so forth. Not that it's an inherently bad thing (when everything works right) - it can be really convenient - but wow; that's a model, view and controller all built into one. When encapsulating objects to make my code neater just encapsulates it into many-long-methods-per-class spaghetti controls, something's not working right.

Don't get me wrong - I've read comments from a lot of other people who don't fall prey to 'reuseaholism' like I do, so I'm not trying to generalize this to everyone. But when I remember my first days in .NET, when I just used Repeaters instead of DataGrids (for full customization) and Repeaters instead of DataLists (e.g. navigation menus)... I have to wonder if maybe it's all I need for 98% of the pages I create? Anyway, all that I know for sure is that NVelocity is a heck of a lot easier than crafting server controls for every rendering need. - Though I must admit you could argue they're too easy, they're too underpowered, to the point of inefficiency and procedural/spaghetti code when you're nesting loops within loops with conditions and conditions up the wazoo. But, hey, then you just use a WebForms page for those nasty bits, right?


Tuesday, February 07, 2006 #

Quotes from the show Never scared

If you've never stared at rat poison for 45 minutes, you've never been in love. If you've never practiced your alibi in front of a mirror and the only thing that made you give up was an episode of CSI, you've never been in love.
Once you’re married, kiss all your dreams good-bye and “make the bitch happy.” Good relationship is simply eating and f*****. The longer you’re with someone, more eating and less f*****. It’s all about married and bored or single and lonely.

Chris Rocks couldn't be more right about that. Personally I am on my way to the second option. I'm sick and tired of trying to please someone, having to swallon my mood, having to bring patience and tolerance from nowhere.


Sunday, February 05, 2006 #

So among one phase and other of Manhunt, I'm improving my brain exercise. Now it's able to deal with boolean expressions. I had to review the AST nodes implementation to allow some tree rewriting.

a = 1 == 1 
b = 1 != 2
x = 10 
puts 3 * 90, a, b, x 

This produces the following initial AST

AssignmentExp
  NameReferenceExpression (a) 
  BinaryExp (....)

AssignmentExp
  NameReferenceExpression (b) 
  BinaryExp (....)

AssignmentExp
  NameReferenceExpression (x) 
  ConstantExp (10, int)

MethodInvocationExp
  Target NameReferenceExpression (puts)
  Arguments
    BinaryExp
    NameReferenceExpression (a) 
    NameReferenceExpression (b) 
    NameReferenceExpression (x) 

So I'm treating the names as some unknown entity that is rewrite as we discover more... The tree gets rewritten to

AssignmentExp
  VarRefExp (a) 
  BinaryExp (....)

AssignmentExp
  VarRefExp (b) 
  BinaryExp (....)

AssignmentExp
  VarRefExp (x) 
  ConstantExp (10, int)

MethodInvocationExp (puts)
  Target null
  Arguments
    BinaryExp
    VarRefExp (a) 
    VarRefExp (b) 
    VarRefExp (x) 

The code, once executed produces:

E:\dev\projects\Blah\BlahProj\bin\Debug>hello
270
True
True
10

Kinda cool. Now I'd like to introduce the dynamics capabilities, meaning: some names should be marked as dynamic, and thus the compiler should not attempt to type it and consequentially more code will be generated in order to perform checks and casts. It's kinda fun, but demands too many types to get something running :-\


Friday, February 03, 2006 #

I've been using my spare time to read about different languages and how they deal with types. It's amazing how good ideas are implemented in several non-mainstream languages that are not going to ever be known by most of programmers.

Nevertheless, you can deduce that I'm working on a language. Indeed, just as a brain exercise. Fixing and improving Castle is nice and it's cool, but sometimes I need to research and try things on a different field. One of the things I wanted to make work was type inference, but the sophisticate version of type inference.

The non-sophisticate type inference is being able to type designators based on the assignment expression, like

myvar = 10 + 15

The binary expression will be evaluated to int, and so is myvar. This does not consider others usages of myvar on the same context. For example:

myvar = 1

if (myvar > 10L)
...

Here, while myvar will be typed as an int, it's being used in a comparison with a long.

There are many paper on type inference for object oriented programming languages, quite interesting subject. Most of them care about polymorphic function as a mean to achieve efficient code and thus optimized execution.

The quite trivial example would be

def max(a, b)
  if (a <= b) b else a
end

max(1, 2)
max(10L, 20L)
max(3.01, PI)

Type inference will be used here to create three versions of the same max function. Some papers suggest the usage of constraints inequalities to solve types and to create the versioned functions in this case. This involve creating a graph based on code flow where the nodes represent the variables and the edges represent the constraints:

myvar = MyClass.new  # Constraint: myvar should be at least as subset of MyClass type

Anyway, a very sophisticate type inference may be found on ML. The book "Programming language pragmatics" has a great topic dedicated to it. Using its example code:

fun fib (n) =
    let fun fib_helper(f1, f2, i) =
        if i = n then f2
        else fib_helper(f2, f1+f2, i+1)
    in  
        fib_helper(0,1,0)
    end;

The syntax is quite strange, isn't it? I've never programmed in ML, neither any other functional or imperative-functional language. But the beauty here is the type inferencing working

The parameter i should be int as it's been used in a binary expression with another int. Parameter n is compared to i, so it must be int too. When fib_helper is invoked in the body of fib function, the parameter are also int, so this is consistent with the inference so far. Any usage that is not consistent will raise an error.

Isn't that cool or what?

Anyway, for now I'm going to stick with a non-sophisticated version, unless I bump into a nice paper describing a very simple algorithm that fits my needs.

Btw Nemerle is a language to be checked. I'd never use it to construct a system, but it's quite nice to force a shift in your brain. The virtualization of structural types that they achieved is impressive. If you don't know what that means, in most languages type equivalence is based on what a type have

record x
  int i,j
end

record y
  int age, favcolor
end

In lots of programing languages, x and y are equivalent. Java and .Net use names to determine equivalence.

On Nemerle (copying from their tutorial) they have (and you can create your own) methods that depend on a signature

class Hashtable ['a, 'b] 
{
   public Iter (f : 'a * 'b -> void) : void 
   { ... }
}

Here Iter is a function that expects a function with the signature of 'a, 'b and returning void.

Well, there are many programming languages around. Each has distinct features and cool and nasty stuff. So my word of advice: get out of the mainstream driveway every now and then and see what's happening around. You won't regret; :-)


Btw Mike has cast his vote towards a 100% dynamic language. I'm really not convinced about that and still leaning towards a hybrid solution.


Monday, January 30, 2006 #

Andre has just directed me to the files of his presentation on MonoRail. Great stuff!

One thing, though: scaffolding works great. I don't know which problem he might have had. I thought the documentation on the scaffolding has cleared all questions :-(