“The Big Rewrite” an open discussion at Swenug Gothenburg

Yesterday we had an interesting meeting at the Swedish .net user group Swenug in Gothenburg. The them was “The Big Rewrite”. Instead of allowing a speaker to talk about something interesting we chose this time to make it as a discussion meeting. Two groups in two different rooms had an open discussion regarding the big rewrite.

What’s the biggest problem regarding rewrite an application to new technologies? how can we work to prevent major rewrites? What does the business people in the organization act and so on.

FullSizeRender (4)

Every one agreed that if you need to rewrite something you really need to know what requirements you really need in the new version. To know this you need to measure what features are mostly used today. We need to know if we can change it to better features. We most understand what featured we can delete. We need to understand the ROI of a rewrite.

It’s also important to see a rewrite as a new project not just a rewrite.
Maybe go full agile, use lean startups and so on.

But the most important part is that you can’t just rewrite a product if the whole organization can’t rewrite them self. In other word, it’s not only about write new code you also need the whole organization support to understand what the new rewrite is all about etc… There is no use to take the old backlog and just add new code.

Advertisements

How to make Lean UX with A/B testing fun in ASP .Net MVC? Part 1

A/B testing is jargon for a randomized experiment with two variants, A and B, which are the control and treatment in the controlled experiment. It is a form of statistical hypothesis testing with two variants leading to the technical term, two-sample hypothesis testing, used in the field of statistics.
Source: https://en.wikipedia.org/wiki/A/B_testing

download
And some other nice explanation:  https://vwo.com/ab-testing/

It’s really hard to change or add something and know if it’s a success or a failure before we have test it on real users. In Lean UX it’s important to do this test process as cost effective as possible by decrease unnecessary waste without skipping important work. The best feedback is when you let people use it and see if they like it or not. You can test wireframes, design sketches but that’s not the same as test It for real in real action. Many users will see this cool new thing as a sketch and think; that looks really cool! but is it really that cool when it’s implemented and live in action? Not all the time, maybe some times but we can’t be really sure before we can test it. In Lean UX A/B testing is one approach that can help you get early and rapid feedback if the idea is great or just a new pain for the user. The core idea of Lean UX is to aim small and hopefully shoot big. In other words, do as little as possible and test it before you spend too much time on your ideas.

Let’s see how ASP .Net MVC can make this by just add very little code to make A/B testing fun and easy. 🙂

I love to use the creativity to think; – how can I add something simple that works and also gives me many other possibilities? It’s some kind of evil obsession I have and that’s also what I love most about software design. In this case I will show you how you can add some code to make your page not only A/B test friendly you can use this idea for other things like themes, change layout bases on personalisation and you can even use it to give your user some luxury in e-commerce sites and so on.

In the software, there are thousands of ways to solve the A / B testing. What I found very useful that also decrease waste from more complex solution is to copy the view you want to test to a new location and add changes to that new file, and then let ASP .Net MVC show just that new view based on some business rules. I also want less code, and it shall be easy to remove my test-view without too much work. Therefore, I want to use the view folder and it’s files and not manipulate controllers if not needed. It’s more waste to add new controller if you can use the the you already have when you want to test another layout. My approach doesn’t stop you from A/B test controller as well if you want to add that feature in the future. Remember I’m fan of Agile and Lean approach and principles like KISS (Keep it simple stupid) and YAGNI (you aren’t gonna need it). That’s why I keep things as simple as possible and expand it if more advanced featured is needed later on. 

This is my goal:
Let’s say you want to test your home view, you can then easily add a new folder inside the view folder for example “B Testing” and add your home folder and its view in there. And then add some changes to it… DONE! Cool right? In less of a second you just made a A/B tested home view. Sell it for 5h of work 😉

ab_1a

To make this possible I want to let my view engine look for views in special folders but fallback to the original if there is no files in this special folder. ASP .Net MVC do this by default. Like this setup:

ab_1

I call the variable theme because I can use it for other purpose than just A/B testing too.

Lets create this
Go to your ASP .net MVC project and add a new class that implements the interface IViewEngine from System.Web.Mvc. And implement the view engine code.

ab_2

Then add the folder locations within a method. I call mine CreateThemeRazorViewEngine

ab_3

Then I create a RazorViewEngine and configured the Partials, View and Master locations to the new folder structure of mine. In this case ASP .Net MVC razor will act as normal but start looking for files in my theme folders if they exist.

I love the factory and provider pattern so I will use those. As factory I will use DI/IOC framework, I like Autofac but you can use whatever you like the idea is the same.

I start by creating one IViewThemeManager interface with one method GetTheme. This interface is the one we use on all the ViewManager providers that will handle all the business rules based on why you want ASP .Net MVC call for another view or partial.

ab_3a

And then I implementation my factory method to the ViewEngine with the IOC and some error handling.

ab_4

If there is no IViewThemeManager provider configured it will give me null and return the default Razor view engine. That’s why I use the _fallbackViewEngine. If there is an IViewThemeManager provider registered I ask for the Theme which in this case is the folder name I want the view engine to use.

After that we need to tell ASP .Net MVC what Engine it shall use so we need to add some code for the methods implemented from IViewEngine

ab_5

In this case I call my CreateViewEngine that will return either the default engine or mine.

Here is the full file:
ab_6

Now go to Global.asax and clear all View Engines and add this new one in Application start.

ab_7

We can now run the project and everything will work as normal. This because the resolver can’t find any IViewThemeManager provider yet and fall back to default.

ab_8

Now it’s time to add the A/B testing business rules. In this case I want to know if the “Learn More >>” button gets more clicks with another text. So I want some user to get “Learn more >>” and others “Want to learn more?”

First I copy the index file in my home folder to a new home folder under “B-Testing” and just change the text on the button nothing more.

ab_9

ab_1a

Then I create my IViewThemeManager provider. My ABTestingViewThemeManager.

ab_10

After that I will add some simple rule. In this case I just send them to my “B-Testing” view folder if the date time second contains number 2. (Just for the test, ok? Real A/B testing might need more complex logic and maybe even som settings, depends on how important the function is, remember don’t make it to complex if not needed. KISS 🙂 )

ab_11

After that I configure my interface and provider with autofac.

builder.RegisterType<ABTestingViewThemeManager>()
.As<IViewThemeManager>()
.InstancePerRequest();

And when I run the page and if the DateTime.Now.Second contains number 2  it will use my B-Testing view instead.

ab_13 ab_12

I also added the view rules for partials so you can just test a partial as well if you want to, you don’t need a full view, you can use the default one that just calls for your partials.

Just copy your A/B partial to “B-Testing/<your controller folder>” and this code will take care of that too.

And if you use partials to render templates for example angular you can even test unique directives and web components if you want to. Just add the angular template in your partial and copy just that partial and its folder structure to the “B-Testing” folder or what name you prefer.

You can also add a provider that will give some user a whole new view, layout or webcomponents layout if they are lets say “pro users”. Just add a pro user folder and create a new IViewThemeManager provider that check if the user is of the role pro or something like that.

Happy play around.

Who is Johan Normén?
Johan Normén is 37 years old, work as a speaker, mentor, team leader, agile coach, and senior .net developer at Softhouse in Gothenburg Sweden. He has over 18 years business experienced and worked in many different projects and roles. Was one of the creators of Swenug (Sweden .Net User Group) with over 3000 members all over the country. He started the computer era as game designer at the age of 12 with his Amiga and team. He has been nominated as the top 10 developers in Sweden in the Swedish version of Computer Sweden 2015

Twitter: @johannormen

The ultimate agile team constellation

I often got the question “What’s the perfect team?” and the answer is as always “it depends”. The reaction is usually the same; some angry looking eyes. :-), I wonder why?

I can’t answer the question “What’s the perfect team?” but I can give you some tools and ideas in the process of creating a great team. But then it’s up to you to do all the necessary work.

First you need to destroy the fixed mindset of the ideas with roles, process and tools and try to see people in your organization as different talents that you have in your portfolio to succeed with your main — vision and goal. If you can’t let go of your fixed mindset then I can’t really help you. I guess you are reading this blogpost just because you have tried many times creating teams with this not so agile mindset and it did not go as you expected, right? So get rid of tit for a while and we can continue.

Don’t see people as front-end, back-end, designers and testers etc. The layers and the silos creates trust issues, creates bad WIP (work in progress) limits, creates a complex team before a simple productive team. It’s harder to replace layers, and people with a special role if she/he get sick and so on. If your main tool to handle team maturity is reports, forecasting then you are in trouble. Those things is an early indication of ineffectiveness in your organization.

As one of the Agile manifestos point out:

“Individuals and interactions over processes and tools.”

This is why I want you to erase the idea of roles. You can add roles later on if you want to but for now you have no clue why you need one therefore there is no roles ok? Good 🙂 . All you need to know is that you need talents to succeed not roles. You need individuals that can interact with each other not build walls with layers and silos ok? Cool, lets go on.

“Each team should be full-stack and responsible for taking a component from idea right through to production. Don’t divide by layer (frontend/backend/data) nor by activity (analysis/development/testing). Both layer and activity boundaries have rich communications across them. Remember the central importance of Conway’s Law.”
– Martin Fowler

Next step is to understand how your employees and your self are as person and how to motivate the uniqueness within each of you, to do so you need to understand what motivates us. Dan Pink have a wonderful RSA Animation and presentation about this. I suggest you take a look at it before reading further because it will help a lot. https://www.youtube.com/watch?v=u6XAPnuFjJc

“People can have two different mindsets, he says. Those with a “fixed mindset” believe that their talents and abilities are carved in stone. Those with a “growth mindset” believe that their talents and abilities can be developed. Fixed mindsets see every encounter as a test of their worthiness. Growth mindsets see the same encounters as opportunities to improve.”
― Daniel H. Pink

To understand what motives each person in your organization you need to understand them better. Get in touch with their intrinsic feelings. There are many tools for this. One of the easiest tools is using the same ide as with personas and add some gamification in work. Instead of just identify personas for the project you shall work on do it with your organization. Let each individual create their own personas profile with the same main principle and hang in on the wall so everyone can see it and get more knowledge of each other. What’s their motto, what interests do they have? What’s character traits does each individual have? Skills and talents? It’s very important to understand your team mates, because you shall work with them. 🙂 In agile you take command to lead together with your team mates to do so you need to understand how they are, there positive sides, negative sides so you can easily together help each other feel well and get respect for whom you are. The same way you create respect for your family and children of your (if you have any.). Because the domain is called work it doesn’t mean that it shall not have the same principles needed as with the domain family. There are many more tools for this in Agile and Lean Team Startups. But let’s talk about that in another blogpost.

Untitled-1

As soon you know more about the person, who she/he is its time to go to next level. In the real world you always have your employees for loan. You don’t own them; they are there for you if you don’t motivate them they will leave for someone else that does. People will come and go, therefore it’s important to understand that we need to be open for beginners within our organization and a proactive plan to make them step up towards the expert step.  I don’t like the idea to rank a person as a whole. Like businesspeople do with titles as Junior and Senior. What does that say? What’s in the gray zone between this junior and the senior? And when does a junior become a senior? When he/she knows more than the boss or have worked for ten years?  If you think you can work with the same thing you did in one year repeated nine times and then think you have ten years of expertise, you are wrong. Sure you have worked ten years but you are for sure only an expert repeating the same thing over and over again. So as with the roles get out of the box and get rid of the ideas regarding junior and seniors. Business peoples just created them so they can put different prices on their head nothing more.

“…Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done…” – 5th principle behind agile manifesto!

What I found very useful is the Dreyfus model. Dreyfus model does not rank you as a whole it just ranks you for each individual skill and talents of yours. For example, you might be very good in golf and maybe an expert in golf. But for the talent painting you might be novice. You can draw some lines but you are not very good at it.

Dreyfus models have different states in each individual skill of yours. Dreyfus have five states each of them different mindset based of knowledge, experience and skills.

1. Novice – Need rules and clear guidelines.
2. Advanced beginner – Need less rules , uses guidelines, but without holistic understanding
3. Competent – Develops conceptual models, sees actions in long and short terms
4. Proficient – Sees situations holistically, will self-correct based on previous performanc
5. Expert – No longer relies on rules, guidelines, or maxims, works primarily from intuition

dreyfus-model-of-skill-acquisition

Do you want to know more?
Read more:  
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2887319/
or
https://en.wikipedia.org/wiki/Dreyfus_model_of_skill_acquisition

As soon you have the tools and knowledge about your organization and people’s talents it’s time to create the team.

The best principles for combine talents is like creating software, don’t decide architecture, techniques, platform before you understand the project. So DON’T create a team before you understand the vison, goal and type of software. Is it desktop system? Does it need many integration specialists? Is it a Webb tool? Is it e-commerce? is it a highly transactional system? Does the customer use any own system we need knowledge about? Like Navision? CMS and CRM of any kind? Is responsive design a requirement? This is typical questions in a startup and as soon you know this you can create your fabulous team. Try to pick people as full stack as possible or at least people that can work cross many functions. Like the image below. (The color indicate a unique talented individual, not a role. The columns just indicate required skills needed for the project, they are not roles just requirements for the project. It needs design, it needs a front-end and so on…)

4
The above image describes this.
Blue person has skills in design, front-end development (sass, less, html, javascript) and understand testing. The orange person has some knowledge of design maybe a novice in design but can help with design if needed, the person also has skills in back-end coding and testing. The green person has little talents in front-end and more skill at back-end and testing. Can be a great mentor for the team regarding TDD, system testing, regression testing and so on, And the yellow one is more like a full stack person that can help in all areas if needed.

Tips: It’s not good to put only experts in one team, novice in another. Spread them out if you need to increase the skills overall in your organization. The best suited person to help another to go from one step to the other is the person that just left that step.
So if you need someone to understand angular for some front-end work it’s easier to add an advanced beginner to the team if you also got a novice talented angular to the team, instead of just add experts in that area. The advanced beginner can more likely explain the problem better for the novice person over an expert talented person. Because they mostly talk the same language.

As soon you have your team-setup you can start asking your team what necessary service functions they need. Service functions can be cross-functional mentors, it can be a product owner if the team think they need one, it can be an agile coach, a team leader or scrum master if they feel they need that kind of service. This is a big change from the old traditional organization design. In this case the team create the process. It’s not strange at all even if it feels little odd, the team are the people that shall make it possible so the only correct thing is letting the team get what they need to succeed.

Remember that a development team in agile is not just developers. People in the whole process of creating a project are the development team even the service function competences is part of the team.

Remember, a named method is not a silver bullet so you need to be open minded. You can simple collect information by checking what correlations and interaction you got between the customer and teams. Maybe you need a waterfall approach, agile-waterfall, scrum, scrumban, lean, XP or your own setup of tools and processes. Maybe you just need to use Kanban and no project owner and such because the team are the domain experts together. Why add extra waste when there might be no need for it?

IMG_0515 (1)

It is important to not fall back in old ideas like the project manager where he/she is supposed to handle everything. Then you are back at the main problem again and you have just wasted your time reading this blogpost. 😀

“We can’t be afraid of change. You may feel very secure in the pond that you are in, but if you never venture out of it, you will never know that there is such a thing as an ocean, a sea. Holding onto something that is good for you now, may be the very reason why you don’t have something better.”
― C. JoyBell C.

Who is Johan Normén?
Johan Normén is 37 years old, work as a speaker, mentor, team leader, agile coach, and senior .net developer at Softhouse in Gothenburg Sweden. He has over 18 years business experienced and worked in many different projects and roles. Was one of the creators of Swenug (Sweden .Net User Group) with over 3000 members all over the country. He started the computer era as game designer at the age of 12 with his Amiga and team. He has been nominated as the top 10 developers in Sweden in the Swedish version of Computer Sweden 2015

Twitter: @johannormen

Thank you Sweden for the nomination of Top 50 best developer contributors in Sweden.

Today I woke up with a notification from my father. It seemed Swedish people had nominated me for contributing to Sweden all this year within development.

FullSizeRender (1)

I’m flattered and honored about this. Hard work will pay itself 😀
Because of this I want to tell you my story and hope other finds it inspiring.

I started my life with an Commodore 64 in the age of 6. I really thought that computer games were cool so my curiosity increased a lot. I didn’t know much about game development; but I know I was a hell of a player. So I start look into game design. At that time there was very little information about all this computer thingy, few books about creating games. So I needed to find other people with the same interest. I did 6 years later at the age of 12. I got in contact with Martin Hedlund. He was older than me but hell of a programmer and designer on Amiga. (Today he is more famous as one core developer for the 3d engine of battlefield etc..). He showed me and my bother (Fredrik Normén) design ideas and some programming. We spent many days and years networking with him. I started to design games and manuscripts while my brother took the coding part. Later on I met this amazing graphic designer Krister Karlsson. He and some friends worked on a computer game named Shenandoah. They really got me even more inspired. Krister as a designer and Aaron as the core developer. (Read more about Krister and his game here:
http://www.gamereactor.se/artiklar/137944/Drommen+om+1993/ In Swedish).

Me and my brothers game development ended because of school. We did some demos, prototypes, and graphics though. I’m not sad that we never finished the games, I’m glad we did not, and all the knowledge it gave us.

12088333_10153504614456273_9171063667102465768_n

In the age of 16-17 I got into Media Production school in three years. Under those years we started up a study coffee that was open all day and night for students. They got access to computers and books etc. It was an initiative by the school. We also had this class room “214” as we called it. It was the number of the room. Some geeks sat there all night using computer for surfing the net, play games like MUD and so on. Me and my brother was there working with html and web design. We did our schools first webpage ever J and few people understood html at that time (95-97). So I started to work as a web designer and technical support for an e-commerce company 97-99 directly after school.

After a while I started to code more than I did before. Thanks to all this knowledge regarding game design, objects, modules programming was easy to learn. So in few months I was coding front-end, back-end, did database modeling and even stat to inspire other people to create better design with the code. Why do all this lines of code and stuff when you can do it with objects and so on? Went through my head. The Single Responsibility principle (SRP) was in my blood thanks to the modular game design requirements and so on. As soon Microsoft announced next generation internet (ASP+) I rushed in to the beta versions of visual studio. I was one of the first people in Sweden download it so Computer Sweden called me and wanted me to do an article about it. ASP+ ended up with the name .Net later on.

I really loved UX, Design, Architecture, database models, clean and nice designed codes and components. It was cool and really amazing. I loved new ideas, new thoughts so I start networking with more people around the world. Java people, Microsoft peoples, designers and so on. I also was one of the top contributors on the leading developer forum “Pellesoft” around 2000-2005. I wrote articles, answer questions. This time I met Patrik Löwendhal (Who got nominated as Top 1 best contributor to Sweden this year 2015). I also reviewed around 22 .Net books for Wrox press at this time. But never wrote my own :/ sadly.

I loved this new world, object orientation, architecture, UX problems, code that really needed to get easy to maintain and so on. So I started to contribute to some open Microsoft projects like Enterprise Libraries. The name at that time was Application Blocks. As soon Microsoft started to love XML and added a sea of configuration requirements for those Application Blocks I leaved. I hated when simple things got complicated when not needed. I think I got this from my ideas and experience about user experience and so on. I used the same ideas and thoughts in my code and architecture decisions, and still do.

The year was 2003 and I wanted to start consulting, help people to be better programmers and so on. To do that I need more knowledge then games and e-commerce systems. At this time, I also met Johan Lindfors (He worked at Micosoft). We took lunches some times when he visited Gothenburg and talked about user groups and other cool stuff. He mentioned that a person called Joachim Rossberg was also interested in creating a user group so I talked to him and my bother. And this is how the project to create the biggest user group in Sweden got started. There was a User group half active in Stockholm with the same name we wanted to use so I asked if I could use it as well. It was ok the name was SweNug. The main goal with SwenNug was to let people know there is more than just what Microsoft Sweden tell you there is. We wanted people to know that ORM exist, Dataset is the worst idea ever and Domain Driven Design will help people create better and more designed domains. My goal was to make SweNug the biggest user group in Sweden.

swenug

At the same time Johan Lindfors offered me, my brother, Fredrik Klarqvist, Patrik Conrneliusson (Fredrik and Patrik was known by the community swedsecure. They loved security) and Andreas Håkansson (known as TheCodeJunkie and the Nancy creator.) the opportunity to get the .net alpha 2.0 platform and build a reference architecture based on it for Microsoft. But the platform should not just be a reference architecture, Lindfors also got this idea that it shall be a product for people to use. He had a cool idea that almost looked like Stackowerflow but even before Stackoverflow even existed. We never finished this job because Microsoft got to many complaints regarding promoting ASP .Net 2.0 features before people even understood ASP .Net 1.0 so they stopped sedning us new versions and documents regarding ASP .Net 2.0. Sadly but true…

With all this energy to do good for the developers in Sweden me, Patrik Löwendhal, my brother and Dag König (Now employee of Microsoft Sweden) had an event in Gothenburg called Swenug Architecture Summit. It was an open space event. We got .net people, java people at this meeting. This was the first time I met Jimmy Nilsson (Knows as the Domain Driven Design guru), Roger Alsing (now known as the creator of Akka .Net). We talked about Relationship mappers, Domain driven design, design patters, SOA and lots more. It was a milestone for all of us in our growing carriers.

To not make this story to long I will speed up the 12 years after 2003.
I talked to seminars like, Swenug, nForum, Developer Summit, Road shows with Microsoft, road shows with Dotway, Pimp My Code with Cornerstone and lots more. Contributed to Microsoft projects, educated students and so on. Steve Ballmer even had a world tour when he talked about an Azure solution I created for Volvo IT and the Twilight Movie. Iit has been wonderful geeky years J And I could not have done all this without all you guys I mentioned in this blog and others I forgot to mention as well.

And here I am now… 2015 with the nomination as top 10 contributor for the developers in Sweden.
http://techworld.idg.se/2.2524/1.639803/sveriges-basta-utvecklare

I can say that, it has been fun, lots of work and I have met so many wonderful people out there.
That have helped me as well, I got inspired by them, and I hopefully inspired some of them too.

And thank for all of you who have nominated me…