Archive for the ‘General’ Category

Moved, again

March 3rd, 2014

Find me at http://www.hammettblog.com/

But yes, I’m keeping this one, frozen, for historical purposes since some content might be useful for some. But the theme and wordpress’ plugins are broken beyond repair.

Like Eric Cartman used to say ‘screw you guys, I’m going home’ :-)

Categories: General | Top Of Page | No Comments » |

MR3 – *very* high level overview

February 26th, 2012

Picture = thousands of words, right?

Help Emilie

January 13th, 2012

If you heard the story on radiolab, you know her. If you havent, then do it.

Categories: General | Top Of Page | No Comments » |

The curse of knowledge

May 31st, 2010

While reading Made to Stick I had to stop to appreciate the epiphany of this realization: The curse of knowledge is so real and concrete. I find myself having real trouble explaining things that are obvious to me. Teaching the benefits of good design, IoC Containers, Composition vs Inheritance and what is common about enterprise kinda of development as opposed to other types are just extremely challenging.

People tend to think that having a great idea is enough, and they think the communication part will come naturally. We are in deep denial about the difficulty of getting a thought out of our own heads and into the heads of others. It’s just not true that, “If you think it, it will stick.”

And that brings us to the villain of our book: The Curse of Knowledge. Lots of research in economics and psychology shows that when we know something, it becomes hard for us to imagine not knowing it. As a result, we become lousy communicators. Think of a lawyer who can’t give you a straight, comprehensible answer to a legal question. His vast knowledge and experience renders him unable to fathom how little you know. So when he talks to you, he talks in abstractions that you can’t follow. And we’re all like the lawyer in our own domain of expertise.

Categories: General | Top Of Page | No Comments » |

Alive and well

May 6th, 2010

Wow, I thought I need to post something on this blog before the PHP code that runs it gets stale.

Still alive, still working for Microsoft, but a few months ago our MEF team was merged into the Common Language Runtime (CLR) team. The CLR teams owns all the low level stuff: execution engine, JIT, GC, and some not so low level things like the Base class library (BCL) and security model. So if you have any complains on any of these things let me know and I’ll ensure you I’ll forward to the appropriate person and make sure I get a reply :-)

While I’m still working on MEF I also managed to get involved in some new CLR stuff for the upcoming version. Early days, so nothing to talk about yet.

MEF updates

I’m working with ASP.NET MVC team to have MEF integrated with the next MVC version. There are a lot of constraints that won’t allow us to optimize a lot of the experience, but things should change soon.

I’ve managed to put together a sample depicting MEF integration with WebForms. I’ve used ControlBuilders to change the generated code to use MEF’s container to instantiate controls. Let me know how you like the approach. We’re considering productizing it, but we need to measure the interest level first. Would that be useful to you?

Finally, among other things we’ve been exploring, componentizing our container implementation is one of my goals. Simplifying some common tasks and APIs is another. For those who are not really fond of MEF’s attributes I’ve prototyped a convention-based registration API. Will blog about it soon.

Castle updates

So the Castle community really impressed me. They released a bunch of stuff and are managing to introduce loads of cool features.

Other stuff

iPad: being an owner of an iPhone and MacBook Pro I see absolute no reason to have an iPad. My standard reply when the subject comes up is ‘I have an iPhone, which is the compact version of the iPad’. Sorry Steve Jobs, you won’t grab my $ for this one.

MS Courier: if you’ve been under a rock for the past year, go and check the Courier. It was canceled a few weeks back by MS. There was a short interview available to us on why this happened, but it wasn’t very convincing. I just truly hope they come up with something even better, and real soon.

Windows Phone 7: on the other hand, everybody here is excited about the new phone. Some (lucky!) few ones are already playing with prototypes. Did we get it right this time? Time will tell.

Categories: General | Top Of Page | 3 Comments » |

Progressive .NET Tutorials, May 11-13th, London, UK

February 24th, 2009

Progressive .NET Tutorials 2009

Skills Matter has agreed to co-organisie The Progressive .NET Tutorials with us. This will be a really exciting 3 day long event with 2 tracks featuring half day and full day Tutorials by me, Ayende, David Laribee, Gojko Adzic, Ian Cooper, Mike Hadlow, Scott Belware and Sebastien Lambla. I will be giving two half day tutorials on Tuesday May 12th and Wednesday May 13th. My first tutorial will be on the Castle and second will be on MEF.

For the full programme check http://skillsmatter.com/event/open-source-dot-net/progressive-dot-net-exchange

Special Community Discount

If you book on or before Feb 28th you will pay just £350

Skills Matter has given me a special promotion code that will entitle you to a nice discount off the Tutorial Fees. Simply book on or before Feb 28th, quote SM1368-622459-33L (in the Promo Code field) and pay just £350 (normal price £1000). Offer is only valid until February 28th only, and tickets are going fast, so if you would like to secure a place and claim your discount – get your skates on!

The code to use is: *SM1368-622459-33L* and must be entered in the box provided when booking online at https://skillsmatter.com/register-online/conf/280

Full details of the event can be found at http://skillsmatter.com/event/open-source-dot-net/progressive-dot-net-exchange

See you in May!

Categories: General | Top Of Page | No Comments » |

Farewell to dear friend

February 18th, 2009

I got a sad sad news this morning that a very dear friend had passed away due to a liver disease. He was only 34, recently married and had just moved to his dream house. An awesome C/C++ programmer that taught me many useful (and useless) things and all time funny person.

wenderson.png

Categories: General | Top Of Page | 1 Comment » |

QUnit: love it!

May 28th, 2008

If you were looking for a way to test js, and like me, found jsunit a bit too weird to use, go with QUnit. It’s easy to get started and easy to keep all tests organized. I plan to record a screencast on how to use it soon.

qunit1.png

Categories: General | Top Of Page | 2 Comments » |

Migrations patch

May 28th, 2008

As promised, here it is. Some comments about the changes

- Had to change the way tables names were used on the CREATE/DROP/ALTER statements, removed quotes to allow you to define the schemas. I use Core.Comment, Tracker.Team as lot.
- Made Connection available to the migration class, as you would need it to perform sql operations using same transaction
- Introduced the SchemaBuilder
- Added support for unique keys (still need to support Defaults, though)

For donjon, I’ve also created a Castle ActiveRecord integration, so the migration reuse the connection/transaction support. It’s not nice as I would like it to be as it involves creating a SessionScope for the migration run, but works well. I’ll try to make that available in a near future.

Categories: General, OSS | Top Of Page | 3 Comments » |

Machine.Migrations is freaking sweet

May 22nd, 2008

Update: patch is here, but nevertheless it was applied already.

First of all, yes, I’m a Family Guy’s fan, if you haven’t noticed yet.

To dig into Machine.Migrations has been on my to-do list for a while. After another error due to a missing schema on one of our projects, I moved it to a higher priority. Jacob’s introduction might be a good start, but really haven’t done it for me. So I grabbed the source and started to navigate.

Sure, I have some nitpicks about it, but overall it’s a beautiful piece of code. SoC nicely applied.

My requirements, however, are a bit different. I dont want my clients running migrations tasks, I want my project automatically updating the schema to reflect the latest model. As the project is modular, each module has its own schema version. So instead of inspecting the file system, I’d inspect assemblies. Versions wont come from file names, but from a class name from an attribute.

Twenty-minutes later I got it changed to support that, basically adding new implementation for two services.

Then I started to convert my old migration scheme (rudimentary) to the 001 migration for one of my modules. Something like:

Schema.AddTable("Company",
                new Column[]
                    {
                        new Column("Id", typeof(int), 8, true),
                        new Column("Name", typeof(string), 20), 
                    });

Schema.AddTable("Project",
                new Column[]
                    {
                        new Column("Id", typeof(int), 8, true),
                        new Column("Name", typeof(string), 20), 
                        new Column("Description", typeof(string), 20), 
                        new Column("Url", typeof(string), 20), 
                        new Column("CompanyID", typeof(int)), 
                        new Column("`Key`", typeof(string), 12), 
                    });
Schema.AddForiegnKeyConstraint("Project", "FKProject_Company", "CompanyID", "Company", "Id");

Schema.AddTable("User",
                new Column[]
                    {
                        new Column("Id", typeof(int), 8, true),
                        new Column("UserName", typeof(string), 30), 
                        new Column("Email", typeof(string), 20), 
                        new Column("FullName", typeof(string), 20), 
                        new Column("Password", typeof(int)), 
                        new Column("`Key`", typeof(string), 12), 
                    });

Ok, not cool. Too many strings, too error prone. I’m a firm believer that software can be made smart and help you where it’s possible.

So I changed it to

SchemaBuilder builder = new SchemaBuilder(Schema);

TableBuilder company = builder.AddTable("Company", 
        Columns.PrimaryKey<int>("Id").Identity(),
        Columns.Simple<string>("Name", 25)
    );

builder.AddTable("Project",
        Columns.PrimaryKey<int>("Id").Identity(),
        Columns.Simple<string>("Name", 25),
        Columns.ForeignKey("CompanyID", company)
    );

builder.AddTable("User",
        Columns.PrimaryKey<int>("Id").Identity(),
        Columns.Simple<string>("`Key`", 15).MakeUnique(),
        Columns.Simple<string>("Name", 25),
        Columns.ForeignKey("CompanyID", company)
    );

Let me know if you like it, so I can make the patch file available.

Categories: General | Top Of Page | 12 Comments » |