Cottleston Pie

Fernando Felman’s thoughts on software development

  • Categories Navigation

  • Topics

  • Archives

  • Advertisements

Archive for the ‘Uncategorized’ Category

Code Generation, some announcements

Posted by Fernando Felman on March 10, 2009

there has been quite an uproar with code generations lately.

Two interesting announcements caught my attention. First, an announcement was made that the current asp.mvc uses the Visual Studio built-in T4 code generation to drive the scaffolding of the UI. That enables the modification of those templates to meet your unique requirements which is something I always wanted for the Proxy Generation of WCF.

Secondly, the Sculpture project reached version 1.0. This is a very interesting open source project for Model-Driven Development in .NET. In its core, it enables the usage of Molds to support different technologies throughout the range of layers. Here’s a list of Molds available to use in the latest version.

  • Database: SQL Server only
  • Data Access Layer: NHibernate, SubSonic, CSLA and the Data Application Block
  • Service Layer: WCF, Web Services and "just" libraries
  • User Interface, a huge range of molds including Web (ASP and ASP MVC), Windows (Windows forms and WPF) and Silverlight

This is an open source project, and with the notion of molds, I think that there’s huge potential for modifications and improvements, such as adding support for more databases. Definitely worth a closer look, and to start, I’d recommend watching the introduction video.


Code generation is not evil, but it has a risk of going extremely wrong. However, with added support from the development tool (e.g. partial classes) and much better tools out there, I think we ought to take a closer look into what code generations gives us. At the end of the day, if it reduces effort & time, I’ll take it!

Now we only have to see and wait what will Oslo bring to the DDD table with its own capabilities of code generations and extensions… Existing times!


Posted in Uncategorized | 1 Comment »

The wind of change

Posted by Fernando Felman on December 2, 2008

A fellow colleague mentioned this ultra-cool data centre run by one of the largest ISP in Sweden. How cool is it, you ask? It’s this cool:

Yeah, very cool. But what’s even cooler is that people are finally changing the rather silly perception they have about IT professionals. I mean, will you be surprised to see decorations and non-practical wow-factors added to a museum or a musical hall? No, you’d actually expect it to be so. And why’s that? I think it’s because we have this perception about artists that they’ll appreciate or at least be more tuned to this kind of stuff. IT professionals are usually perceived as pragmatic, "no nonsense" people so why bother adding decorations and other non-practical stuff?

Well, I for one, am very happy this is changing!

Posted in Uncategorized | 2 Comments »

The typealyzer – analysing personality of blogs

Posted by Fernando Felman on December 1, 2008

A fellow blogger mentioned the typealyzer service which auto-analyses personality of authors based on their blog. I ran it over several of my blog-rolls with quite amusing results. Anyhow, here’s what it found for my own:

INTJ – The Scientists

The long-range thinking and individualistic type. They are especially good at looking at almost anything and figuring out a way of improving it – often with a highly creative and imaginative touch. They are intellectually curious and daring, but might be pshysically hesitant to try new things.
The Scientists enjoy theoretical work that allows them to use their strong minds and bold creativity. Since they tend to be so abstract and theoretical in their communication they often have a problem communcating their visions to other people and need to learn patience and use conrete examples. Since they are extremly good at concentrating they often have no trouble working alone.

How about yours?

Posted in Uncategorized | 1 Comment »

Private methods vs. regions

Posted by Fernando Felman on March 8, 2007

Back in the days of VS2003 I had a discussion with a colleague regarding the usage of private methods vs. regions. You’re writing a long method (in our case it was a batch job activity) which will perform many actions / calculation one after the other. The question we were discussing is how to enclose the logical sections in that method, keeping in mind that each section will be executed only once.

My colleague (which from now will be called … hmmm… Adam!) supports the regions approach which means that every logical section is enclosed within a #region. In c# regions are collapsed by default and so when you review the main method code you’ve only to read the titles of the regions to understand what the method does. Should you want to inspect a logical section in more details, just open the region and you’re ready to go.

Regions Approach
Regions: neat and small. Support snapshots when mouse hovers.

I supported the private methods approach which means that every logical section is enclosed in a private method. When you review the main method you only see the name of the methods (which should hint what the method does). Should you want to inspect a logical section in more details, you’ve to navigate to the relevant method’s definition.

Private Methods Approach
Private methods: bigger and not as neat. Support method description when mouse hovers.

There is no much difference between those two approaches: both support a way to enclose logical regions and both makes readable code. Adam said that since those methods doesn’t expose shared functionality and will only be called once, there is no reason to use them. At that time I couldn’t find a reason to why I prefer using private methods, expect that “it feels right”, and so we decided to just drop the whole subject.

But now that I’m using VS2005 I’ve a good reason for preferring the private methods approach: unit tests. In VS2005 you can generate unit tests and the great thing about it is that you can test private methods – VS will generate the appropriate code to access private methods via reflection. So if you enclose logical sections within private methods, you can automatically write tests to test only that functionality. But if you chose to enclose the logical sections using regions, there’s no way to automatically strip out just that functionality and expose it to the unit test.

What do you think – what approach would you choose for enclosing logical sections in long methods?

Posted in Uncategorized | Tagged: | 2 Comments »

And so it begins

Posted by Fernando Felman on March 2, 2007

Cottleston Pie / A. A. Milne

Cottleston Cottleston Cottleston Pie,
A fly can’t bird, but a bird can fly.
Ask me a riddle and I reply
Cottleston Cottleston Cottleston Pie.

Cottleston Cottleston Cottleston Pie,
Why does a chicken? I don’t know why.
Ask me a riddle and I reply
Cottleston Cottleston Cottleston Pie.

Cottleston Cottleston Cottleston Pie,
A fish can’t whistle and neither can I.
Ask me a riddle and I reply
Cottleston Cottleston Cottleston Pie.

I chose this poem as the title for my technical blog because I think it emphasizes many aspects of the enterprise software development process: there are many riddles and ambiguity involved in the process of delivering a quality solution for an enterprise. I intend to use this blog as a stage to hopefully answer some of the riddles I know and maybe bring some insights to how to deal with others.

I’m a senior software consultant with more than 7 years of experience in the Microsoft-based software field. In the last 4 years I’ve been focusing on delivering enterprise web-based applications for medium and medium-large enterprises using Microsoft technologies and frameworks. Many times I’ve been called to “open a blog, mate. You’ve got so much content to share!”. Today, I respond to that call. 🙂

This blog will focus on my work life as a senior consultant in Unique Word and I’ll add posts whenever I feel I can contribute or share. I’ll focus on the .Net v2 and the great new things you can do with .Net v3 as these are the fields that I’m passionate about, but every while and then some general technical post can sneak into the flow.

Enjoy the ride!

Posted in Uncategorized | 2 Comments »