Friday, November 06, 2009

ÖreDev day #5 – afternoon

Cucumber

This will be interesting, I love the idea of Cucumber. Also the presenter, Aslak Hellesöy, has a blender on the desk… Eeeh.

He started out with a small introduction of BDD and actually TDD also. He took standpoint in the Dan North ideas on BDD, that is a outside-in approach (as apposed to the TDD outside-in), but putting the business value in the front of the sentence.

This guy is apparently the inventor of Cucumber, which has gain many followers and support in the community. It looks very well documented.

OK – the blender part wasn’t a success but it looked funny ;).

The rest of the talk was a demonstration of the basics in Cucumber and it was all really interesting. I will most certainly check this out. Although he didn’t go anywhere near .NET and C#, there was apparently support for it. And hopefully integration into Visual Studio. I don’t dare show my customer that much console-window-hacking…

ASP.NET MVC Advanced Ninja

I think I’ve seen this before… Here is a link to it. Or maybe not. No – it’s mostly new stuff done in Visual Studio 2010 and ASP.NET MVC 2.0. I’ll try to just enjoy it.

Nope – didn’t work… Here are some highlights:

  • In ASP.NET 4 they have included a short hand for HTML encoding output, <%: %> instead of <%= Html.Encode(…) %>
  • He also showed a T4 template that generated a static class with all the views, content, links and images. It’s still very beta, but looks promising.
  • Compilation is just another level of unit testing.
  • We saw how to do validation in ASP.NET MVC (2.0) with DataAnnotations. And how to use those annotations to generate client side validation. As Scott Allen did a few days ago. It’s cool!
  • Html.DisplayForModel() uses templates and convention over configuration to figure out the view to generate. Cool!
  • JQuery Grid looks promising.
Modeling in the age of Agility

Kevlin Henney is the name of the presenter and he seems in a hurry as all other presenters during this conference.

Why doesn’t we like to see the words modeling, architecture and agile in the same sentence. Well, modeling and architecture is kind of heavy word… Or really? That’s the standpoint that Kevlin started.

  • We saw a definition of agile that simply stated that it means to do. I like that.
  • “It turns out that nature knows very little about the equations we are applying to it.” – Cool quote.
  • A model is an abstraction from a point of view for a purpose.
  • A model is based on a particular way of framing the world of interest.
  • Be discriminate when modeling – leave irrelevant stuff out. If you check a map of the London underground it’s not an actual map in a sense that the scale is not right, things are not in the right places etc.
  • If you look at a pen from the end of it you only see the tip. You miss the concept of the pen. So you’ll need to flip it to show that it’s a pen. Use the right model for the domain.
  • When doing a model understand WHY you do the model. What are you going to communicate? What will you present? What is important?
  • Also modeling is about the –ing. That is doing modeling is more important than the produced model, because that is communication.
  • He ended by recommending a great UML-modeling tool; the whiteboard! I like that also.
Final thoughts

And that’s it! ÖreDev is over. It’s been a pleasure and I don’t think I ever learned so much in so short time.

Thank you all – especially the ÖreDev-team!

ÖreDev day #5 – keynote and morning

Information overload and managing flow

The last day kicks off with a keynote given by Scott Hanselmann, who is one of my "heroes" if you like. I always wanted to see him live, he is usually informative and really funny. Here is some off his tips on the subject:

  • Effectiveness – doing the right things
  • Efficiency – doing the things right (jumping off a cliff in a efficient way :))
  • Triage – sort information. Don’t leave things in your inbox
  • Do it – drop it – delegate it – defer it = pick one.
  • Sort your data streams (twitter, email, colleague) into Signals and Noise
  • Email that you’re cc:ed on are not as important To:
  • Mailing list
  • Don’t check emails in the morning - “If you are the fastest responder to a problem, you will get all the problems.”
  • Check email three times a day – for 20 minutes each.
  • You cannot beat the system by putting in more hours.
  • Use the Pomodoro Technique and schedule your work (emailing, phoning, blogging, coding etc.)
  • Audit your input and streamline it.
  • “You can’t cut if you don’t measure” – Scott Hanselmann
  • Tools
    • Rescue Time – introspective retrospectives
    • 43 folders looks quite messy but powerful
    • Sync to paper – check out http://pocketmod.com/
    • Write things down that you want to do during a week. And check that the list is done or not at the end of the week
    • Evernote
    • Remember the milk instead of todo.txt
    • Use email rules as above (to:/cc: and calendar invites)

This was very funny and informative. The funniest is that he did basically the same as the Zen-guru Marc Lesser. But oh so different…

The Pair Programming Show

This promise to be great. The first slide says “How to teach pair programming?” It looks to be, just as the title, as a show. With props and the whole thing – nice. The presentation is done by Niclas Nilsson and Hans Brattberg

Also they promise to show some of the bad things that we can experience when teaching/learning pair programming.

Pair programming is about; communication, learning and communication. So be patient, split time with keyboard equal, talk, not show. It’s hard! But the only way to get everybody up to speed.

Without an engaged navigator you don’t collaborate and share mind. Then you get any of the advantages of pair programming. A complicated operation is always performed with two doctors. Would you rather have one?

There are now giving some great points on why pair programming is feasible and economical. For example this chart.

It’s easier to stand up for code quality and not “hacking” when you are two people together… Also it’s harder to hide technical debt.

They had an excellent summary slide of benefits with too much for me reloop here.

Breaking out of dependency hell

This talk is given by a tired Ayende. He has promised to use his designated victim method… Better stay alert.

He talked about the use Dependency Injection, Inversion of Control containers and Convention over configuration to manage solution complexity.

Using a Inversion of Container will make us feel like you lose control of your dependencies. And that is the whole idea – if you micro-manage your dependencies will give you a static system that is hard to change (Open-Close-principle, open for extension but closed for modification).

Another benefit from using an IoC is that you get opportunity to use aspect-oriented programming, to handle cross cutting concerns.

Thursday, November 05, 2009

ÖreDev day #4 – afternoon

I’m still feeling a bit exhausted from the last Dan North talk. Now we will have some more down-to-earth code stuff.

Putting the M of ASP.NET MVC with Scott Allen

Scott started off by defining the purpose of the model is, who does it serve?

  • Business objects are great if you build a wrapper on SQL Management Studio ;)
  • The model can be found serving two master – both the view and the business logic.
  • The answer to the above is too create a view model. But that can give you a lot of classes. I (and Scott) think that will be worth it – because every class now have a well defined responsibility. 
  • Cool – you can define an interface that decides what properties to bind when using TryUpdateModel<T>
  • Don’t use IModelBinder to bind your own models because you’ll have to write much code. Instead override OnModelUpdated on the default model binder and add only to things that differs from the default binding… Great tip! The binders are to be registered in Application_Start.
  • The controller should not really bind the model – it’s not it’s responsible for that stuff. A controller should only orchestrate the application parts
  • In ASP.NET MVC we’ll have the possibility to use DataAnnotations
  • Cool – EnableClientSideValidation to create JavaScript validation from your server side validation

Yeah I learned a lot of things here. Thanks Scott!

Specification workshops

From the program this should be on BDD which I like, so I hope that will learn more on it. The speaker is very passionate and fun. 

  • Customer looking at code is as looking of things produced by www.mrklingon.org
  • “How experts think” was dropped as “the most important book I’ve read.
  • “I am the only one in the room that have hade the privilege to be bombed by a B2-bomber…” Eeeeh.
  • Ask the question Why? more often in software projects.
  • Requirements are often given as a solution to an unknown problem. A story of people requesting a printout to be able to type into another system made that point very clear.
  • On-site customer is a ROLE not a single know-it-all-person. Such a person doesn’t exists.
  • Collaborate on specifications – business people, test, developers. Do it everybody together.
  • Do it by discussing examples – you don’t need to write it down but use to drive the specifications. Example writing workshops or Specification workshop (or any name that scare them enough to come)
  • Run the workshop
    • Choose a story
    • Introduce it, explain with examples
    • Let people ask question and suggest other examples
    • Discuss until everyone is confident that we have enough examples to start working
  • This leads to a shared domain knowledge and evolving the ubiquitous language

This was great! Thanks Gojko.

ÖreDev day #4 – Why your agile adoption fails, with Dan North

This became so much and was so good that I publish it as a separate post.

After pretty disappointing morning I’m hoping that Dan North will bring things back to great – as most of the day was yesterday.

Dan promised yesterday that he will bash on Scrum a lot in this talk… And at the same time as this there is a talk on Entity Framework 2.0. With Ayende and Scott Bellware in the audience…

OK – our hall is filling up. Dan is smiling. Could be fun. Here are some quotes:

  • A manager in a crappy system with a certificate is still a manager in a crappy system
  • Certified$crumMa$ter :)
  • Check out the Satir change model to understand peoples reluctance to change
  • Think of the different stages of the Dreyfus model
  • “75% of uncoached Scrum projects will fail” – Ken Schweiber
  • Get a build/continuous integration! Because flushing out the problems around that process flesh out a lot of problems
  • Automate tests! Introduce assumptions test to test legacy code. Assumptions test is a way to document your assumptions on the legacy code.
  • Understand Deliberate Discovery around the domain, the architecture and the people.
  • Rolling wave planning – only break the imminent stories to details.
  • Get good a writing stories; break features into stories, have them concisely small and then each story size is 1 story. Here he made a reference to “A slackers guide on project tracking”
  • WaterScrum – your sprint are too long Which gets you all the downsides of both Agile and Waterfall…
  • Go to one week sprints. Identify what hurts and fix it! Plan –> Do –> Check –> Act
  • “I love failing. Its fun and is a great opportunity to learn”
  • Spent money is spent (on investment in tooling/processes) – instead think of the impact on effectiveness.
  • Build trust with the business – demonstrate and celebrate success, demonstrate transparency
  • Remember to get the “What’s in it for me!” to all parts of your value chain; operations, test, business, corporate and developers.
  • Projects (and their management) will not pay for change… “Not on my budget!”. Solve this by getting the project management responsible for the system lifecycle and make small changes frequently
  • Introduce a strategic change pot of money that transcends projects
  • On architects in Ivory towers: “I don’t write code anymore – Don’t you see my long white beard?” :D
  • Get the architect into the teams as consultants. Reward them for sharing knowledge.
  • Stewart leadership – leadership by getting coffee.
  • Integrate tester into the team and invest in automated testing.
  • Systematic change requires systemically change
  • “A bad system will beat a good person every time.” – Edward Deming

I’ve run into many of these problems and thought hard on much of the solutions but this was so crisp and good.

ÖreDev day #4 – morning

We’re of to a brand new day. Feel well rested although last night was quite late…

Keynote: What drives design?

This can be very interesting, if focus on the last two D in any [x]DD-technique (TDD, BDD etc). I’ll make a summary in the end.

This was a interesting historical overview to start with. Pretty cool that our industry is so young that the people who “started it all” are still not that old. Cool to hear about their troubles and stumbling on their way to greatness.

Rebecca Wirfs-Brock talked a lot about the RDD (responsibility driven design) and the patterns behind it. Then said compared it to other DD-techniques, such TDD, BDD, FDD and DDD and so forth.

Making the sausage

Now this should be interesting if by no other reason because of the speakers; Dan North, Neal Ford, Stuart Halloway and Tyler Jennings. They are going to talk about BDD in something called Clojure. It promise to be great!

It was a bit disappointing in a strange way; it’s was great but I had a hard time keeping up with their ideas. But after a while I get it but not well enough to re-loop it here. Sorry.

Functional languages are strange in itself and four functional programmers running through code they wrote a late night…  You can probably understand my confusion.

Test-Driven Web UI Development

Scott Bellware is doing this. It’s the first time I’ll hear him, except in the local pub…

The talk was about lessons learned on trying to bridge the gap between testers and (TDD-)developers in an agile team.

Here are some random stuff that I picked up:

  • Selenium looks like a cool UI-automation testing framework. It free!
  • Selenium can actually generate test-code in a programming language of your choice. Beware that the tests are just a starting point – not the full blown test suite to use for ever and ever…
  • As programmers we shouldn’t do things that decreases productivity for the testers. It’s the whole teams productivity that counts.
  • The tests should describe the product not the implementation.
  • Good BDD-tests should be like a Table of Contents in a book. You don’t want to go into details if not needed.
  • Pair programming with a tester and a developer may be a way to find issues really quick. But I think a good, solid understanding of the test framework is needed.

I learned some about of Ruby and some on automating tests. I liked it but we didn’t reach all the way, sadly. James Bach had some comments that I would have loved to heard more around.

Wednesday, November 04, 2009

ÖreDev day #3 – afternoon

The fallacy of efficiency

Dan North – given a talk on not believing in efficiency (the theme of the conference) ;).

What he is aiming at is the difference in efficiency (the effort we burnt so far) and effectiveness (the outcome is what’s important, not how much we burnt so far).

OK – this is great! He is dropping gold ever ten seconds. I just hope to get hold of the slides, and try to post them here. I cannot possible summarize it here… It’s boarder-lining on politics but I like it.

Dan North – check him out. He’s great and quite funny also.

OK – best so far! By far!

Explorations of NHibernate

This will be another talk by Stephen Bohlen, the speedtalker… So I don’t expect to be able to write to much during this.

We’re learning about add-ons (etc.) to NHibernate.

Here are some nuggets that I managed to throw down:

This was great but oh so fast, I’m short of breath…

Productive WCF

Going into the last part of the day and I am beginning to feel tired…

OK – Juval Löwy is up now and I expect some pretty advanced stuff.

Yep – I will be some not so well-know productiveness things in WCF. Another list:

Another great session. I’m running out of batteries now. Not sure if I can document the last session… Maybe – I’ll publish now, just for sure.

Accessing Data in the Azure Cloud

Julia Lernman based her talk on the frustration on not understanding how to use it, from a developer perspective. Suits me just fine – I’ll learn all the cloud religion later… :)

This seems to be a great but basic talk. I’ll leave it and try to grasp it. I am a beginner on this…

ÖreDev day #3 – morning sessions

Accomplishing more by doing less

This day started with Marc Lesser giving a keynote on “Accomplishing more by doing less”. This was a short overview of the day that I attended on Monday, so it was some of the same, but also gave a crisper understanding of the subject. It was great to get a repetition for me.

Great quote of the day; Find “the One who are not busy”. In yourself, or God or whatever you read into it. I know what I do…

Scrum – why it’s so hard to implement

Jens Ödegaard gave this talk and it was one of those: “you’re not gonna get any silver bullets”, but rather a run through the challenges you face implementing Scrum. It was quite nice see that I wasn’t alone in my experiences. Here is some quotes that stuck:

  • We want organizations that dare to let go of the old way of management.
  • The team is in this together – if you cannot do anything to help you can always show that you want it solved. If by no other means – bring coffee.
  • We didn’t have all these problems before Scrum. Well no. You had – but you didn’t see them.
  • A ScrumMaster should explain scrum to the rest of the organization.
  • A ScrumMaster is the teams best friend, removing impediments to help them focus on the task at hand.
  • A ScrumMaster has not authority. You have to coach people to commitment.
  • The daily scrum is a team meeting, not reporting to the Scrum Master. Scrum Master is not required to be there but rather make sure to be there
  • Define DONE together with the team and the Product Owner.

The end of the presentation was much better than the start which was very basic. It would have love to stayed longer on the “What to do?”-slide.

OK – that was not good. On to the next

eXtreme programming in practice

This session is given by Neal Ford and he’s a good presenter from what I understand.

  • One of the things he mentioned is that XP works well because there are built on a series of feedback-loops on different time scales (minutes – pair programming, hours – unit tests, days – standups, weeks – iteration etc.)
  • He posed a new name for Non-functional requirements; Quality of Service. I like that.
  • Don’t ask how long will a task will take. Rather gauge complexity in a magnitude scale (1, 2, 4, 8, 16 etc.). And do it relative the other stories in the system
  • “All models are wrong, but some are useful” – true and funny.
  • Track initial estimate, “sprint” estimates (beginning of iteration) and actual values.
  • Every story is 0% until its 100% done. These criterias are expressed in business terms, hence user stories (As [X] I want [Y] because [Z])
  • Truck number – the number of people that you cannot have hit by a truck. This number should be greater than 1 or your in trouble… Funny
  • YAGNI – Don’t build frameworks (on speculation). It’s better to extract a framework from a finished project.

This was a great presentation, also basic overview. On XP this time – I enjoyed that very much. Thank you Neal! The slides are for download here

This is a great conference and as always the best parts are in between sessions, talking to others.

Tuesday, November 03, 2009

ÖreDev day #2 – NHibernate in practice

Now it’s NHibernate with Stephen Bohlen, who is aiming to cramming in all (kinda…) of the screencast on www.summerofnhibernate.com in 4 hours.

I think I’ll just sit back and try to learn this, because this guy is probably paid by the word :)

OK – closing in on the end. I really enjoyed this presentation but it would have benefitted from being longer, a whole day. It felt a bit rushed and we didn’t get as far as I would have reached. Although the material covered was great and well presented. And now I always have the www.summerofnhibernate.com to run back to.

I learned something about TDD and unit tests. Always ask:

“What can we safely assert?”

And the answer should be:

“Only the values I’ve set in the test code”

This is especially useful doing “unit tests” against the database (ie. integration tests).

If you write a test that searches for people with first name equal “FIRST NAME”, the only thing you safely can check that returned people contains is that first name equal “FIRST NAME”.

ÖreDev Day #2 - ASP.NET MVC with Scott Allen

Now we're getting into the "real stuff" or rather IT-related stuff.

I am now attending a session with Scott Allen, who is a great guy by the way, on ASP.NET MVC. As readers of this blog know I love this framework already since it got me back on understanding web development again.

OK - since Scott is dropping god nuggets as he speak, I thought that I put it here as we go, in no particular order;
  • When you create the "URL template" for routing you can specify anything you want. For example {controller}/{action}/{category}/{locale} would fill the category and local with anything passed to the URL or null if not set.
  • Learn and use MVC Contrib
  • Set the projectfile-setting MvcBuildViews to get compilation errors for errors in the views. This slows builds down so don't use it when not needed.
  • Test your routing with Fluent HTML Testing Routes
  • Check out ActionFilters to be able to hook into the "events" of the action methods; OnActionExcecuting, OnActionExecuted etc.
  • I got a big aha-moment when Scott described the Execute-method of IController-interface. Especially check out the RequestContext object sent to the Execute-method, that contains RouteData-dictionary. There you have your route-template values...
  • I can't believe that I've forgot about UpdateModel. It's a good thing - but sending the strong type is better :)
  • Build your own HTML helper methods for everything except the trivial HTML-generation. "If you ever have a if-statment in your view use a HTML helper" - was the exact quote.
  • The web.config in the View-folder is just to get people not to try to pull down your views directly.
Thank you Scott for a great overview. I link the slides here when available.

Monday, November 02, 2009

ÖreDev Day #1 - Accomplishing more by doing less

I am at my first conference since 2000. My good times flies, then it was .NET launch and I was very envious of the people getting to try it out since I was stuck in a never ending VB6 Com+ assignment. Well, here we are - 2009 and ÖreDev.

The first day for me was spent with a single session that took the whole day. I didn't know to much about it and simple went to it since the title was so alluring - Accomplishing more by doing less, with Marc Lesser (taken name?). Who can miss out on such a offering.

Well, as expected I guess, the content wasn't so much on thing to do, that would only have added to the burden of things to do. But rather it was about doing less of some thing, namely:
  • Fear - here we talked a lot about why we fear stuff like time, not being seen etc. Also the antidote is to be generous which I think sounds very nice. Being generous with your attention, your joy etc.
  • Assumptions - we stopped for a while and pondered the false assumptions that we often bring to a situation. Also we did an excellent exercise in which we looped and dipped. looping is simple retell a story and see how it was received / interpreted. Dipping is talking about your emotions surrounding the story and story telling.
  • Distractions - how many thing that distracts us. Especially in the social media tsunami of today. We learned that successful people have their priorities in order and act on them. Be present and reduce your Work In Progress was other lessons learned. I mentioned Pomodoro as a great technique to manage distractions.
  • Resistance - actually we didn't get into this one at all…
  • Busyness - we all want to look busy. But why? A thought was thrown out that it had to do with fear of life being short. If we are busy we think that we get the most out of it… But we would be wrong - we don't have time to see that life is passing…
The lecture was Marc Lesser and he brought a real calmness and ease to the session. Starting with 30 minutes meditation will maybe do that.

Although I, as a Christian, don't agree on everything surrounding the spiritual part of Zen - I still got a lot out of the session. I of course cannot describe all of it here - but I will take with me to start to be more present and be generous with my attention.

Thank you Marc, for a great day.