Tuesday, June 22, 2010

Outside-In development and Dependency Injection


The first chapter of Mannings upcoming book Dependency Injection in .NET has a nice introduction how to practice outside-in development and how it goes hand in hand with dependency injection.

Read it yourself, the first chapter is available for free.

Sunday, June 20, 2010

Quotes of the week


The source code is the design! Code is text! The failures of MDA, Visual Programming and UML in the last twenty years have teached us that.

Visualization is for discovery. Code is for delivery.

- Sebastien Lambla, speakers dinner prognet

Saturday, June 19, 2010

My beach lecture has arrived!

... unfortunately it will take another 3 weeks until I will arrive at the beach.

PS: I am wondering if it is an insult for one of the books to be displayed along with the other? Probably I will find out ...

Friday, June 18, 2010

Craftsmanship means we should refuse to work in dysfunctional environments!


My post "From coding whore to opinionated developer" last year had quite some comments.

I was taking the position, that we developers do not have to put up with everything. As professionals we should set some minimal standards and if they are not achievable then we should not be here.

I was focusing on rather technical aspects of development. One and a half year later I have come to the conclusion that we should extend our standards to all aspects of development. In my opinion it is a sign of professionalism to insist on certain standards in our environment. If these standards are not met, we should try to change things, but if this does not work we should strongly consider the option of leaving.

Jumping on the crusade of Uncle Bob et al. for craftmanship in the software industry, I think we as craftsmen should refuse to work in projects where the clearly unproductive political and organisational overhead is in no relation to the actual essence of the project. Our professional pride should not allow us to accept certain conditions.

Symptoms of such dysfunctional project environments are:

  • Having to sit in overstaffed meetings where we don't have to say anything and won't get anything out of it.
  • Working on short term contracts that do not match the assigned tasks (you don't know if you will finish the given task)
  • Starting to work without a contract
  • Having to start urgently and immediately on a project but when you start working there is actually no work for you to do or nobody has time to introduce you.
  • Starting on a project but the necessary infrastructure is not available (hardware, software, accounts ...)
  • The only times your manager is approaching you is when you made a mistake in your weekly time-report.
  • Having to feed bogus status reports to three different managers that do not talk to each other.
  • Having a horde of business analysts on the project, but not knowing who they are, where they are, what they do and how this should effect your work.
  • Having no chance to get to know the real stakeholders of the projects.
  • Knowing that any concern you voice is just draining away in the maze of organizational overhead.

Accepting symptoms like this is a sign of resignation, it means that you accept that you will never deliver what you are capable of (which is quite a comfortable excuse for mediocrity), in essence you are giving up on being a professional.

Sadly I observe that contracted developers in big enterprise projects put up with almost everything (I am including myself here). Some of us struggle, but we give up at some point. We can't identify with the project any more, we do not care any more. We are just executing tasks. We cling to the cheap excuse that at least we are getting paid ... we have given up on being craftsmen.

This is the typical No pigs, just chicken antipattern.


(Note that I am aware that a lot of us developers are suffering from the "I do like my profession, I don't like my job"-syndrome, I am not arguing that we developer should be treated like divas, but I think that there are a lot of environments where we cannot bring any change ever, and the only way to achieve a change is to refuse to accept them ...)

Tuesday, June 15, 2010

My iPad Applications


Update 2010-10-2: I switched to Reeder instead of NewsRack for offline RSS reading and most of the time to ReadItLater instead of InstaPaper for offline content.


After one week with my iPad my first apps résumé:

The following apps I am using productively:

  • GoodReader: Great app! I use it to connect to my DropBox and download mainly pdf-documents to read them offline. Very intuitive usability. The newest version offers customizable cropping for pdfs, so you can get rid of wasted borders and get the most out of your screen!
  • NewsRack: Offline reading for my Google Reader rss-subscriptions and syncing favorites and read items back to Google Reader. It does the job very well. Also nice integration with instapaper, twitter and delicious.
  • InstaPaper: Offline reading of articles that I have marked during the day. Does the job well. Nice on the eyes with grey or black background.
  • Not really apps but very useful: Quix, Delicious and Instapaper bookmarklets in Safari.


The following apps I installed, but coud not yet decide if they are useful for me:

  • AtomicBrowser: Seems an interesting replacement for Safari. Better tabs and full-screen mode could really improve my browsing experience.
  • Simplenote: Alternative to the native Notes app with online synchronization.
  • Tweetdeck: My favorite twitter client, but on my iPad it seems to miss tweets ...
  • BlogPress: The edit mode seems to be very crude. You can write html, but thats a pain on the iPad. Also you cannot publish posts as drafts to edit them later with a usable editor.
  • FlickrStackr: Nice interface. I can browse my flickr photos. I can upload pictures. But expected to be able to download pictures from flickr to the iPad photo albums. Nope, at least not yet!
  • Kindle: I decided to buy my copy of Rework in paper, because I want to take it to the beach ...

I would be interested in suggestions from other iPad users with similar interests ...


PS: And no, I did never miss Flash yet or have ever come across one of those hyped bue-cube screens...

Learned Today: Joining with Hibernate

Hibernate (and NHibernate) is able to do a lot of different kind of joins.
Unfortunately it can not do outer joins on properties that are not mapped as associations.

My goal was to get the result of the following SQL-query with an outer join:
select e.Name, d.Status, count(*) from event e
left outer join delivery d on e.Id = d.EventId
group by e.Name, d.Status

I hoped to realize the above query with Hibernate in HQL. Actually you can do joins between entities where no association is mapped:

select new ReportDto(e.Name, d.Status, count(d))
from Delivery d, StatisticalEvent e where d.EventId = e.Id
group by d.EventId, e.Name, d.Status
... unfortunately this is an inner join.

You can do outer joins with Hibernate:
select new ReportDto(e.Name, d.Status, count(d))
from Delivery d right outer join d.Event e
group by e.Name, d.Status
... unfortunately you have to have mapped the association between the two entities, since you have to feed a path to the join expression.

(Note that I do not claim this is a proper usage scenario for Hibernate. Reporting queries like this are certainly an edge case for using Hibernate.)

Tuesday, June 8, 2010

M-V-VM again: The same but different!

I just can't shut up about the confusion in ui-patterns.

During reviewing Manning's upcoming book Lift in Action I cam across yet another variation of the M-V-VM pattern.

Lift takes the M-V-VM pattern to the web (so far I have only come across it in the WPF context) and calls its implementation the "View First" approach:


The “ViewModel” is referred to as a Snippet in Lift. There is a very tight coupling between the snippet and the XHTML output.

... so once again a different interpretation of the same term, welcome to babel.

By the way Lift in Action is a very nice book so far. You can get the first chapter (containing the above imgage) for free. The book whet my appetite to dive deeper into Scala.


Related Posts Plugin for WordPress, Blogger...