Øredev 2011 wrap up
Jan 21, 2012 ·
I attended the Øredev Developer Conference in Malmo, Sweden last November. It was truely inspiring. In this series of sum-ups, I will try to summarize the talks I went to.
KEYNOTE: Alexis Ohanian - Only your mom wants to use your website
After an early morning flight, we arrived too late for the morning keynote with Reddit co-founder Alexis Ohanian. The doors to the keynote were closed, but it was playing outside.
Alexis talked about how to convince people that your product is worth their time and how companies tend to ignore the user experience, such as how airline ticket search engines return a huge amount of tickets, where most are not what we want.
I will watch the talk once the video is up. People who saw it told me it was good, although Jeff Atwood threw Reddit some shade during his Friday keynote.
Jon Skeet - C#5 Async 101
Jon talked about the new .NET async
concurrency feature that will be available in C# 5.
Jon talked about how async operations have been around since .NET 1, but how they have resulted in spaghetti code. The new async
and await
keywords seems like a clean way to write async code. The resulting code reads like non-async code, which is very nice.
A cool thing is that all await
s are potential pause points. If .NET has all it needs to return a result, it will do so without going async. Jon showed this in action. It looks great!
Gary Short - .NET 4.0 Collection Classes Deep Dive
Gary talked about list fundamentals in .NET. For instance, when you add items to an empty list, its capacity grows to 4. When that’s no longer enough, it expands to 8, then 16, and so on. If possible, initialize the list with an int parameter, e.g. new List<string>(10)
, to make it grow in fixed steps, which is more performant.
Gary also told us to not use Add
in a loop, since AddRange
is better, and how XAt
is better than X
(RemoveAt
instead of Remove
etc.). A function that specifies the index executes at fixed time, no matter how many items you have in a list. With graphs of how much slower certain operations work when the size of the list grows, Gary really exhausted the subject.
Gary also went through sorting and how the various sorting algorithms perform and ended the session by going through various collection types. To understand lists and collections, this was a great talk.
Phil Haack – Building Mobile applications with ASP.NET MVC4, HTML5 and jQuery Mobile
This talk was quite interesting, since Phil discussed a lot of aspects of mobile browsing and how ASP.NET MVC4 can help you out.
Adaptive Rendering
will be added to the default web application template. It will cause web applications to automatically render differently based on the target screen size.
Another new feature is that you can create device-specific variations of the same view. For instance, Index.cshtml
is the default view and Index.iphone.cshtml
is a variation that you get when you view the page on an iPhone. Custom modes can be added to global.asax
.
Phil also demonstrated using iBBDemo2 for simulating an iPhone when browsing the web. Quite handy if you want to easily be able to try out your custom views.
Nathan Totten – Facebook Development
Nathan was hit hard by the conference’s Wi-Fi problems, as he showed how to build apps for Facebook.
He talked about different kinds of Facebook applications, like iFrame apps, web sites with Facebook Connect, mobile applications, desktop apps (like Spotify) etc. and how they can use OAuth 2.0, REST services, the FB Graph API & FQL to integrate with Facebook.
Nathan also discussed the JavaScript and C# Facebook SDKs. His advice was to use the JavaScript SDK if possible, and the server-side SDK when integrations should be hidden.
Finally, Nathan demonstrated how he works with local and live applications. He creates two separate apps: one that’s bound to the live site and one that’s bound to localhost.
Fredrik Mörk – API – the hidden UI
The first Swedish speaker I watched was Fredrik Mörk, who talked about how we have to give our APIs the same tender loving care that we give our UIs. Users shun bad UIs while developers shun bad APIs, so we should put some effort into our API design.
An API must be discoverable, so always assume that the developer knows nothing. Adapt conventions from other APIs to make developers recognize your API instead of having to remember it. The REST standard is a great start.
Fredrik advised us to always expose as primitive data types as possible, to make an API accessible to as many as possible. Always choose abstract before concrete and choose your abstraction according to the purpose. For instance, if you expose an IList instead of an IEnumerable, you are communicating that you expect people to insert stuff into it.
Once an API is published, it’s no longer yours to change. While a GUI can change, an API can’t. Be careful with adding features and data to an API without a plan. Be intentional. Do not let chance determine where a feature ends up and what it’s called.
All in all a great session!
Dan North – Embracing Uncertainty - the Hardest Pattern of All
If there’s one talk I regret not attending, it’s this one. Everyone I spoke to were blown away by this keynote on how we strive to avoid uncertainty, even when it’s the better alternative.
Quotes like “Fear leads to risk, risk leads to processes, processes leads to hate, suffering and Gantt charts” and “We are rather wrong than be uncertain” and the way Dan reasons about how faith becomes religion, are just amazing. I can’t wait for the video.
For a better summary of this session, visit Daniel Lee’s excellent blog.
Greg Young – How to not apply CQRS
I love Greg. After this talk, I stormed out of the room and bursted out that “he is the Henry Rollins of software engineering”, to which a stranger turned around, equally happy, and replied “I KNOW!”. Later, I overheard a conversation, where a guy says “Wow, Greg looks JUST like Phil Anselmo”. Rock star quality.
But what did he talk about I hear you ask. Well, he talked about how a good way to fail with CQRS is to apply it everywhere in a monolithic system.
CQRS is not a top level architecture. It requires a bounded context.
So applying CQRS without a bounded context is an almost fail-proof way to fail. When you apply CQRS everywhere, nothing can change.
Greg talked about CQRS & DDD and the dangers of imaginary domain experts. Who can be considered to be a domain expert? A consultant who have worked with a system for a while, or an employee who have worked with the domain for years, but lacks coding skills?
This is really important, since CQRS is business-centric. CQRS and DDD only works with domain expertise. It will otherwise be like playing the telephone game and using Google Translate to translate Shakespeare. BAs are really good at asking the right questions, but they are not domain experts.
As an exercise, Greg talked about Programming as Analysis, which I’d like to try. The point is to build a system for a domain that you don’t know anything about. Timebox your access to the domain expert to two hours. In two hours, you have to find out everything you need.
You will fail, of course. But in doing so, you’ll come up with a bunch of new questions. So you throw everything away. Then do it all again. Two hours. Then do it again. Then again.
Greg concluded his talk with pointing out that the most certain way to fail with CQRS is to learn it by building a CQRS framework. Instead, you should focus on the business values of applying CQRS. Greg finished his talk with calling frameworks “crack for architects” and stating that they are evil.
A great session!
Rickard Öberg – Event Sourcing explained
Rickard talked about Event Sourcing and started with describing a common architecture:
Client <- Service facade <- Domain <- Storage
and how with Event Sourcing, things look a bit different:
Client <- Service facade <- Domain (Commands -> Events) <- Event storage
With Event Sourcing, we don’t store state, but events. This is a huge difference. By storing events, we can replay all events that has affected an entity during its lifetime and can build it up from scratch to its current state.
To avoid heavy build-up operations, we can use stored snapshots:
- Event (latest)
- Event
- Event
- Event
- Snapshot
- Event
- Event (oldest)
With snapshots, we start with the lastest event in the stack. As long as it’s not a snapshot, we keep it for later. Once we reach a snapshot, we grab it and apply all stored events to it in order. This way, we don’t have to replay its entire life, just a part of it.
Rickard then talked a bit about his event sourcing framework. Clearly suffering after Greg’s framework burstout, Rickard had the balls to still insist that his framework was really good and that he likes to use it.
Event sourcing makes report generation trivial, since you never loose data. If you add $500 to a bank account then withdraw $300, and the system doesn’t store events, all we know is that we now have $200 more than when we started. Maybe the system writes transactional details to the log, but with event sourcing, the event store becomes the log.
Due to its log-like nature, event sourcing simplifies debugging. Nothing gets thrown away. The events are what make the entities look the way they do. If an event is accidentally not saved, that’s bad, but that is another problem for another discussion.
Event sourcing continues to interest me. Maybe one day, I will use it?
Udi Dahan – Who needs a Service Bus anyway
Udi Dahan, the founder of NServiceBus
, talked about why he thinks we all should consider using service buses.
Udi begun with the history of the service bus, speaking about CORBA, the rise and fall of the Broker architecture and how a service bus differ from a broker:
A broker is in the middle of everything, a service bus is everywhere
A bus is distributed and plugged into every part of the system. There’s no remoting, since it’s not needed. While a broker is central and ties everything together, a bus communicates with messages and ensures that every subscriber receives the messages it should receive.
Udi finally demonstrated how to set up and use NServiceBus. If you haven’t checked out NServiceBus, or any other buses for that matter, make sure to do so.
Jeff Atwood – Creating a Top 500 Internet Website in C# for Dummies
When you publish your kick-ass website for the world to see and use, how do you optimize it to stand the load of millions of visitors? Jeff knows, and shared his four greatest tools:
- Static content
- Reverse proxy
- Multitenancy
- Caching
A CDN
(Content Delivery Network) is a must. Either use a cloud-based service like Amazon S3, or put your content on a server that’s separated from the logic. You can then distribute your content globally and let clients site use the closest available content server.
A reverse proxy
distributes all incoming requests over a number of internal servers. With load balancing in place, it can drastically improve the amount of traffic a site can handle.
Multitenancy
means that one application does many things. Having several applications running on one server makes each perform more poorly than if one does several things.
Caching
…well, we all know, but the issue is how to cache. Having one cache per server may cause inconsistencies, but having a single one may cause poor performance. Jeff uses one MySQL per app and one that is shared by all to keep them in sync.
Jeff also talked about serialization and how to consider your serialization options – binary serialization
may crash if the assembly changes and xml
may be CPU intense. A final advice was to design things as if you have a farm, caching, etc. even if you currently don’t.
A great, but intense session.
Marc Mercuri – Cloud First Services
Marc started by stating that you must have an entirely different mindset when you build for the cloud, and should design all new applications as if they are meant to run in the cloud.
Marc went through various hosting options (on premise
, cloud-based
& partner hosted
) and some of the popular service models:
IaaS - Infrastructure as a Service
(Amazon EC2 etc.) – you get a server and then do the rest of the work yourself.PaaS - Platform as a Service
(Azure, AppEngine etc.) – an environment to which you add your apps and get a bunch of pre-built tools.SaaS - Software as a service
– free or commercial software, ready to be used by you and others, often with different service and payment tiers.
If we break down our services into well-defined capabilities, workloads, solutions, roles and services, we will be able to:
- scale them independently of eachother.
- replace one service with another one with the same capabilities.
- move, exchange or delete one service, without making the rest fail.
With cloud-based services, we must design all tasks to be async and stateless and always assume that other services aren’t available. Designing services this way will prepare them for the complex reality of distributed systems.
Use distributed caches, queues, external data storage, etc. and you will be able to easily scale when you build that killer-app that the whole world wants to use.
Consider your storage alternatives. Sometimes a relational database if perfect, while other cases require NoSQL, BLOB storage, or plain files. You can boost your service availability with redundancy
(multiple instances) and resiliency
(how to recover).
And finally, some final words of wisdom:
- Moving to the cloud is NOT equivalent to designing for the cloud.
- Moving to the cloud does not mean you have to move all or nothing.
- Platform SLAs are not Application SLAs. Uptime doesn’t cover your app logic.
- Bad applications will not behave better in the cloud.
- Support and operations are not automatically automised.
This was an amazing one hour session. It even had more - I’ve excluded the Azure parts.
Greg Young – How to get productive in a project in 24h
In his second talk, Greg Young talked about how to kick-start a new project. First of all, as a consultant, do you know what the company does? Have you used your their products or services? If you have no understanding of these fundamentals, how will you deliver value?
Greg described some tricks of his to get started quickly. He usually starts off by inspecting the CVS. Projects that have been around for a while and still have tons of checkins, could possibly be suffering from a lot of bugs. A certain area with a massive amount of checkins could possibly be a bug hive.
So, looking there can quickly tell you where a project hurts. Naturally, many checkins don’t have to indicate bugs or problems. The team could just be building stuff. However, at the very least, many checkins does mean that people are working in that part of the project.
This is a simple first step that will make you able to discuss the project after just an hour or so, and maybe even pin-point some problems. This will give your customer the impression that you are clairvoyant (or at least know what you’re doing), which is why they pay you.
If a project doesn’t have continuous integration, at least set it up locally. It doesn’t take long and will help you out tremendously. You’ll be able to react when someone breaks the build, the second they do it…well, at least it’ll give you pleasure.
Greg demonstrated how to dig even deeper, using NDepend. This part was awesome and showed various metrics, like cyclomatic complexity and afferent/efferent coupling, various graphs that make NDepend great, then told us to keep an eye out for black squares in the dependency matrix (circular references…bad) and rigid couplings (should be broken up).
All in all a great session that gave me a lot of things to aim for when holding presentations myself. As a consultant, you shouldn’t miss this video.
Jeff Atwood – Stack Overflow: Social Software for the Anti-Social Part II: Electric Boogaloo
I won’t attempt to cover everything in this keynote. Instead, watch the video. It’s filled with fun gems, like when Jeff describes how things that are accepted in a web context would be really strange in real life. For instance, Facebook lets you keep a list of friends. Who has a physical list of friends in real life?
Jeff talked gamification and how to design services like a game, by defining a set of rules that describe how a service is meant to be used, then reward those who follow the rules and punish those who don’t. And since games have rules and games are fun, designing our services as games mean they will become fun as well, right? Well, not necessarily.
However, rules at least tell us how we are supposed to behave. It doesn’t work for all sites or services, but should be considered for social software. Game and play generally makes social interaction non-scary, since everyone have to conform to the rules.
When created Stack Overflow, Jeff and Joel therefore did so with gamification in mind. You may not notice it at first, but everything is carefully designed. For instance, people used to complain that you can’t ask a new question from the start page. This is intentional. Before you do, they want you to read other questions, see how people interact and learn the rules.
Stack Overflow adapts several concepts from the gaming world, where “good” players are rewarded with achievements and level up as they progress. It has tutorials, unlockables, etc. Without first realizing it, Jeff and Joel had created a Q&A game with several layers:
- The game – ask and answer questions
- The meta-game – receive badges, level up, become an administrator, etc.
- The end-game – make the Internet a little better
This makes it possible for Stack Overflow to allow anonymous users, unlike Facebook who decided to only allow real names in order to filter out the “idiots”.
Since Stack Overflow awards good players, bad players are automatically sorted out. The community is self-sanitizing. People are awarded with privileges if they play good enough. It’s like Counter Strike, where you have to be a team player. If not, the game will kill you 🙂
I could go on and on, but I recommend you to watch the video instead.
Tim Huckaby – Building HTML5 Applications with Visual Studio 11 for Windows 8
Tim has worked with (not at) Microsoft for a long time and is very charismatic. What I really liked with his session was that it seemed a bit improvised, unlike most sessions at Øredev.
What I didn’t like as much, was that it seemed too improvised. Because of lack of time and hardware issues, Tim failed to show what I came to see: HTML5 applications with VS 11.
Tim begun with stating that he hates HTML but loves HTML5, which he claims is about to “cross the chasm”. This means that it’s a safe technology to bet on, since it will be adapted.
How do we know this? Well, this graph illustrates how a technology is “crossing the chasm” in relation to how people adapt it.
Tim thanked Apple for inventing the iPad, since thanks to the iPhone and the iPad, Flash and plugins are now out and HTML5 is in.
Large parts of this talk were amusing anecdotes, like how Adobe once published a “we ♥ Apple” campaign, to which Apple responded with “we MISSING PLUGIN Adobe”.
Tim went through some browser statistics, explained why IE6 is still widely used (damn those piracy copies of Win XP in China) and concluded with some small, so-so demos.
Tim Huckaby – Delivering Improved User Experience with Metro Style Win 8 Applications
Tim started this talk with Natural User Interfaces and some new Windows 8 features, like semantic zoom, a desktop mode behind Metro (hi Win 7), smart touch and a task manager.
Tim demoed Tobii on a cool laptop with two cameras, which allows it to see in 3D. The rest of the talk was…enjoyable. I had fun, but wasn’t too impressed. The Kinect demo was cool and let Tim to claim that the upcoming XBOX Loop with Kinect is a small revolution.
Jim Benson – Healthy Projects
Acccording to Jim, healthy projects are characterized by being:
- Happy
- Productive
- Stress-free
- Focused
- Nice to the workers
He gave a good example of how things tend to go wrong in this organization structure:
- Company (has many portfolios)
- Portfolios (has many projects)
- Projects (has many tasks)
- Tasks
Imagine someone working at task level being “promoted” to project level, e.g. by becoming a product owner. If this person can’t understand his new role and keep focusing on task level details, it will lead to micro management. The same applies when moving from project to portfolio and portfolio to company.
Jim then talked about how, when you add rules to an organization, you must also introduce processes to handle them. If rules are hard to follow and lack a process, people will fail.
A good technique to visualize how a team is feeling is to mark scrum or kanban notes with an illustration that describe how they feel after completing a task. Simple, yet effective! In hindsight, much is obvious, but I enjoyed the talk in the moment.
Doc List – Development is a game
This talk was all about Doc having an idea and wanted a lot of stuff to happen. He asked, how do we measure how good we are at what we do, and what are the KPIs? Certificates? Level of success? Something entirely different?
He then asked, why can’t life itself be a game? Why can’t we have rewards in our work? Why can’t we have quests? Want to measure a person? Give him or her a quest! Want to measure a team? Give it a group quest!
Doc wants to create a globally applicable system, that ranks people according to what they know. With this, if you need “a level 24 Java developer”, you will have a specification of what a level 24 Java developer knows and a list of persons who are at that level (since it is measurable). Doc wants to build a global community for this and wants…
…well, that’s the depth of it. Doc is a charming man who has been around for a while and has a great rep, but this was just talk. Until Doc gets started, I’ll lay my focus elsewhere.
Dan North – Pattern of effective delivery
With Dan’s keynote being one of the highlights of Øredev (I missed it), I looked forward to this session. So did the rest of the conference. The room was packed.
Dan spoke of some exciting new patterns, like:
- Spike and Stabilize (easy, semi-effective) – Try something, then build it well. Optimize for discovery.
- Ginger Cake (semi-hard, semi-effective) – Break the rules once you go senior, like an experienced baker baking ”a chocolate cake, but with ginger”.
- Short software half-life – Make it easy to replace. Optimize for throwawayability.
I didn’t find this to be an interesting talk, but there were a few amusing analogies.
Conclusion
Øredev 2011 had high mountains and some valleys. Next year, I hope to see more local talents and a better mix of speakers. Being American shouldn’t automatically quality you.
Discussions & More
If you found this interesting, please share your thoughts on Bluesky and Mastodon. Make sure to follow to be notified when new content is published.