Showing posts with label Software Engineering. Show all posts
Showing posts with label Software Engineering. Show all posts

Tuesday, 26 August 2014

I was humble once and I was awesome at it or 5 Rules to Being a Great Team Lead


I often mock humility with my favourite saying "I was humble once and I was awesome at it."

The truth is that I think humility is a virtue. It is a moral excellence and one that many claim to possess but then fail miserably at.

The reason I bring it up in this context is because you can not enable and serve a team unless you possess the ability to put yourself last and not aspire to take the credit.

In the last few years, I have worked with egos that would sink the Titanic. Most have been brilliant individuals that for some reason craved the acknowledgement of their brilliance to sustain them.

There is one thing that I do well and it is building teams. That doesn't mean I am awesome at hiring geniuses. It doesn't mean I am great at finding combinations of people that work together. That doesn't mean my teams exist because of me. The one thing I do well is serve my teams. I exist to build a safe and sustaining environment that allows people to do their jobs.

People want to do good work. They want the 8 hours they spend every day to mean something. Most people don't want to run the world. In fact, they want that kind of rubbish to be kept out of their way so they can contribute to the best of their abilities.

I have five rules that I believe make a great team lead:

  1. Lead from behind - enable your team to do what they do best. Don't pull them along by a collar;
  2. Share the fame and share the blame - don't single anyone out as a hero or a villain. Teams produce great results, not individuals;
  3. Celebrate all the wins, no matter the size - don't wait for external validation to celebrate your team. Make the little moments big moments and the big moments, amazing;
  4. Lead the charge and die trying - always be part of delivery and contribute to success. No one will follow you if they don't think you truly understand what it is like to be them; and 
  5. Have fun - life is too short to be serious all the time. There is a time for seriousness and that is usually with your clients. With your team, you should be a person who laughs or cries or falls flat on your face. Being real will allow people to be themselves and when they are themselves, they will be great.
Humility involves succeeding and failing. Both are valid. Failing is ok as long as you learn from it. Success is ok as long is it doesn't go to your head.

Monday, 7 April 2014

Define Done



Often when I read blog posts or articles about agile, they are talking about advanced concepts or solving funky problems that happen when you're in the depths of running an agile team.

The alternative are Masters of whatever flavour of agile is in at the moment. They are saying you start by following these exact rules that will save your whole team. I call bullshit on all of them.

In a previous post, I spoke about how there is no point is applying an agile band-aid if you don't work out where you are first and then add rigour to your current processes.

Once you do work out what practices your team is using and identify them and apply rigour, it is time to start putting in place some entry and exit criteria to initiate work and define success. I consider it drawing two lines in the sand that represent where we start and where we finish.

I always start with multiple Definitions of Done that apply to sprint tasks/stories, the entire sprint/iteration and the project.

This gives the whole team an idea of what it means to have completed a task and signed it off. That doesn't mean you comply with full continuous deployment and produce production releases at the end of each sprint (although we all dream of such a utopia) but it does mean that you have an end state that is achievable and universally understood. Working software is of course, part of this end goal.

It is important that this is understood before you even start the project so get this in place and get buy-in before you seriously put in any delivery effort.

Definition of Done for a User Story
I often treat the definition of done for a user story as the exit criteria for the swim lanes on a Kanban board. This defines when a user story that fits in a sprint is considered complete:

  • Business analysis is complete [Owner: Business Analyst][Swim lane: In Analysis];
  • Technical analysis is complete [Owner: Technical Lead][Swim lane: Ready for Dev];
  • Estimation of effort [Owner: Entire delivery team][Swim lane: Ready for Dev];
  • Implementation of the user story is complete [Owner: Developer][Swim lane: In Dev];
  • Implementation of unit and integration tests [Owner: Developer][Swim lane: In Dev];
  • Integration with all other sprint stories [Owner: Developer via Continuous Integration][Swim lane: In Dev];
  • Automated packaging [ Owner: Developer][Swim lane: In Dev];
  • Automated or manual deployment [Owner: Developer and Tester][Swim lane: Ready for Test];
  • Full functional testing in a partially integrated environment where mocks are allowed [Owner: Tester][Swim lane: In Test];
  • Sign-off of user story functionality, confirming implementation reconciles to requirements [Owner: Tester][Swim lane: Ready for Sign-Off]; and
  • Sign-off from product owner that the user story has been delivered [Owner: Product Owner][Swim lane: Signed Off]
Definition of Done for a Sprint
A sprint is considered done when:
  • Sprint planning was run and included the whole team;
  • All user stories are signed-off by business;
  • All user stories have been fully integrated with the current working software;
  • Automated test coverage meets the agreed team standard;
  • A retrospective has been run and actions owned or implemented by owners;
  • Backlog has been groomed for future sprints;
  • A deployable package has been prepared and versioned for release to an acceptance environment (that may be production); and
  • Actual versus Estimated Velocity has been compared for future planning.
Definition of Done for a Project
This is a much tougher one. It depends on the situation you are in and the environment. Often we aim for working software and successfully full requirements reconciliation. There are many other things though that make this list. It is one that must be agreed to prior to delivering the project.


The important thing about any definition of done is that you must know up front what the goal posts are defined to be and not move them. Yes, you can change the way you play the game but you still know what it means to be finished.

Don't start until you know what it means to finish.

Sunday, 23 March 2014

Forget Being Lean Until You Get Some Rigour



Over and over again, people talk about Lean like it is a giant waterproof, super-fast healing Band-Aid that will fix every delivery team. They say "Toyota this" and "Motorola that" and "you're not lean enough."

The problem I have with this is when the Band-Aid is being applied to a delivery team that has no structure at all. You can't make a cowboy team leaner or even more agile without putting structure in place and then improving it.

I don't mean picking Scrum or Kanban and saying do this and then become leaner. Instead, I mean that teams must become aware of their as-is way of functioning. Identify practices and articulate them. There always are practices in place but people are not always conscious of them. Without consciousness, there is no method. Once you have method, you can use it rigourously.

Become aware of what you do now. Decide on where you want to be. Map a course of action from one to the other and most importantly, give yourself time and give yourself permission to fail and correct.

Telling a team with no self-awareness to become leaner is pointless. First find the point.

Agile - Is it only mostly dead?


One of the fathers of the Agile Manifesto, Dave Thomas (@pragdave) wrote a blog post a couple of weeks ago proclaiming that "Agile Is Dead (Long Live Agility)."

The post has been moving through the software dev community and causing much head nodding. Everyone seems to agree that the word "agile" means very little these days and has been corrupted by the trainers who will make you a Master from a two day training course for thousands of dollars.

At ThoughtWorks, we would mostly snigger at people who called themselves Scrum Masters but not because they were so quickly empowered. It was more because they missed the point of being agile and instead adopted prescriptive processes and accompanying costly tools to achieve what can be done with much less and achieve much more.

The reason that I am happy Prag Dave spoke out and voiced this is because people will hear it now.

Being agile is a way of thinking and acting and not a set of hard and fast rules that make better software. Tools and processes won't save a team. Pragmatism, rigour and constant feedback with change will.

I don't know if the word "agile" is dead. The good thing is that a lot of us agree that we need to be more agile and not do agile.

So go do that already.


Monday, 30 December 2013

Stop writing your own frameworks



I am in Darwin for Christmas. This is where I grew up, went to University and came back to work for a very short time in 2010 while trying to work out whether I wanted to stay and face the challenges of my profession.

It was very a short stay because this place is like many small Australian cities - there is a need for IT but it is satisfied by a small pond populated by a lot of medium-sized fish acting like sharks. After a very short time, that gets old.

My career is about focussing on building software that people want to use, not flexing my under-developed biceps and splashing wildly in a muddy pond. So while I was here, I did my best to learn something from the situation and not cause too many ripples. Yeah, me... the ripple maker.

As I walked in to different clients, developers on the client-sites kept asking me what frameworks I had brought with me. At first, I smiled and said .NET but then I realised they meant bespoke frameworks that I had created. They wanted to know what I carried in a swag on my portable hard drive that helped me build systems. In their case, this was for small systems of simple client-sever apps. And every dev had their own framework.

You're probably wondering what I mean by a small system. In the context of software, it is a system that services a small number of concurrent users and does not require capabilities like scalability and robustness under load. Yes, yes, you may argue all systems do but for more affordable systems with simple requirements that change infrequently, this can seem like over-kill. The developers who build these know that they are coding write-once applications. So the bits they do find themselves repeating on the next project, they build reusable frameworks for. These frameworks can then be used over and over again as they build the same designs over and over again. Reuse. Good, right? University told us reuse is good.

This is not that different to what I have seen in a lot of medium to large organisations though. It seems more common in groups that build small systems but it does cross all worlds and all demands. The difference is that the big places don't ask for my custom framework. They instead tell me about theirs.

The Problem With Your Custom Framework


Every time you build software, you should regress to the point of origin: The Requirements.

Every piece of software you implement. Every line of code you write. Every ounce of effort you exert in making the machine grind should be traced back to a requirement that a user needs in order to achieve their goal while using the software.

If you've worked with me then you still have my voice in your head droning on about the importance of requirements traceability. For the rest, expect a blog post in the very near future.

Custom frameworks are not an exception to this rule. In fact, they are the one part of any system that should be justified to kingdom come. If you can't find a business reason to build it then don't. I have very few to no exceptions to this rule.

Now, the reason this is important is because software has to be maintained. It must be extensible, robust, reusable, testable and above all else relevant. The software should never be held back by the tools and materials used to build it. They are not important. The end-user software is.

If the requirement of your job is to build software that other software uses to satisfies its requirements then framework away. If not, then you will spend a lot of upfront effort and infinite future work maintaining your framework just to keep it relevant to the systems it consumes.

People like Microsoft have many teams of many elite developers building many generic frameworks for you to build your castles upon. Unlike the sand that yours will be built of, theirs are backwards compatible, constantly updated and relevant. All you have to do is recompile or re-consume their changes and keep focussing on your business needs. You focussing on supporting multiple systems and stalling natural evolution and progression is more detrimental than helpful.

In most cases, there are two reasons developers insist on building their own frameworks. The first is that they took what they were told at university about reusability to mean that they must reuse code or they have failed. The truth is that design patterns are more reusable than code in a lot of circumstances. If you do need code reuse for one system, it will not often translate to another system unless great care is taken in the first place to design it that way and the agreement to maintain it is consciously agreed to by all parties including business.

The second reason is that developers like to build stuff that they can point at and say they built. I think this is sad and verging on the point of needy. As far as I am concerned, I should be able to look at a code base and have no idea at all what each developer wrote. Code is not about a developer tagging the mountain of obfuscated code that represents their prowess to others. It is about making something that can exist long after your are gone.

Let the nicest thing anyone said about you be that your code was clean, correct and easy to understand.

How To Know Your Framework Is Holding You Back


If you spend a lot of time working on your framework and not on features then your framework is not helping.

If you spend time justifying why systems dependent on your framework can't be advanced to later versions of general software (like newer version of .NET) then your framework is not helping.

If you write a new system with exactly the same design as the last system then you must ask yourself if you are solving the problem domain or complying with the saying that if all you have is a hammer then everything looks like a nail.

So You're Saying My Framework Should Be Thrown Away?!

Yes.

Most frameworks are built to satisfy a need that an underlying framework (like .NET) does not yet satisfy. As soon as that general framework does, you should deprecate your compensation.

Stop wasting your time working out the best way to forge steel and instead buy it from the great steel works and then go about constructing great structures.

I'd much rather build the Empire State Building upon the shoulders of others than a half good piece of metal alloy that may or may not support a bridge tomorrow.

Tuesday, 12 November 2013

We Are So Progressive



While waiting for my clearance to clear (that's all for another blog post), I've been talking to different people about short term gigs. I am not in any major hurry to find anything so the conversations are not stressful job interview types but more a chat about whether we can work together.

One interview was such an entertaining conversation that I was impressed at my ability to keep a straight face the entire time. Instead of giving you a blow-by-blow of the whole session, I'll just share the top three highlights that made me smile afterwards.

"I don't believe in unit testing. It gives people a false sense of security. I believe testing gets in the way, which is why we fired the dedicated testing team."

This came out of me asking what the automation in their dev and deploy processes is like and what kinds of testing (automated and manual) were in place. The development manager and architect (who is the same person) went on to lecture me on the false security blanket that unit testing is and that it is an overhead that in no way helps assure a quality code base. He used words like coverage and feedback loop and other buzzwords but not in any way that seemed to fit in with any kind of practices or processes I'd ever heard. It's very possible I was hearing of very new ideas. Yeah, possible.

In the end, he had reduced his delivery team to a business analyst and a bunch of developers who pushed code through to Production in 20 minutes with his surety and trust that they simply didn't write buggy code.


"We have Continuous Integration right there. *points at monitor hanging on wall* That screen shows our 16 production apps. It pings them every few minutes to see if they are still working. If they are, it's green. If they aren't then they appear red."

Now, that is a dashboard but it in itself is not CI. I've been seeing the term Continuous Integration used a lot of by people who think it is based on red and green lights. I'm guessing the amber light of traffic lights must make them really confused.

In this case, I asked if they had any automation around their build or deploy process. Again, I was dismissed as some kind of charlatan with ideas from yesteryear. This was the point where I became most distressed, in that burning-building-and-the-lifts-are-out-and-I'm-on-the-75th-floor kind of way.

The dev manager said that "yes, our profession is going towards automated testing but that's a phase." He said he was going away from it having proved it wrong. He said "I am progressive." After later whinging to some ThoughtWorkers, we decided he was progressing backwards and so was technically correct. *sigh*

"Data modelling is over-kill."

Now, I'm the kind of girl who watches Fast and Furious 6 and thinks there weren't enough car scenes. I even read reddit and wonder why the comments ended. Over-kill is not something I claim or proclaim much at all.

In this case, he (dev manager guy) wanted to know what I liked about ASP.NET MVC. He wanted to make sure I hadn't just read the FAQ. I just spent the last 18 months as the Microsoft PFE ASP.NET MVC Lead in Asia so when I say I know MVC, I wrote the FAQ. Either way, test away.

I gave my reasons and went on to talk about DDD and the merits of building a domain true to your users. He sniggered. That's ok. People snigger.

In this case, he challenged every idea of modelling to the point that he said he'd discarded Entity and any persistence layer at all and thought a Dataset passed straight to the templating engine wasn't awful.

I sighed again.


So those were my favourites. I commend myself on my ability to listen and consider all that was said. Even his impressive 20 000 requests on his 16 web applications per day had me keeping a straight face. Ask any of my colleagues who've worked on farms that do that in a second. Oh well.

One thing I took from this whole experience is that everyone has a world that seems huge to them. What we must learn is how to judge up and out. There are people out there who don't want a pissing contest. They just want to help you build software that scales, is robust and can be extended.

In my world, I always want to strive to work in better places that teach me bigger and more amazing concepts. Everything I know is tiny and insignificant compared to what I have to learn.

At least, I know that.

Tuesday, 27 November 2012

Why I'm an Engineer and Not a Pastry Chef

On the Internet, people joke about First World Problems (FWPs) when they stub their toes on their BMW run-flat tyres while wearing their new Louboutins, in an attempt to avoid stepping on their Paspaley pearl earrings.

On my team at work, we have PFE World Problems (PWPs). They make an FWP look like torture. As a job, it isn't so bad. I'd go as far as to say it doesn't suck. It is time I reminded myself of that.

My latest PWP was hitting what in Microsoft is called the 7 month itch. No jokes about antibiotics please. It is a point when after being at the company for a while, you are passed the honeymoon period and straight in to the everyday work ritual.

When people told me I would hit this, I sniggered. Well, it was probably more of a giggle but now I find myself sighing mostly and realising that Monty Python was right in the Life of Brian...



Brian: No, no. Please, please please listen. I've got one or two things to say.
The Crowd: Tell us! Tell us both of them!
Brian: Look, you've got it all wrong. You don't need to follow me. You don't need to follow anybody! You've got to think for yourselves! You're all individuals!
The Crowd: Yes! We're all individuals!
Brian: You're all different!
The Crowd: Yes! We're all different!

Truth is that joining a big company with so many possibilities is awesome to start and keeping that momentum going is up to you. In this case, it is up to me.

I identified the two things that are not Mana-friendly and now I must find a way to fix them or get out.

They are...

The Lack of Team (the journey)

PFEs work mostly on their own. What I do is called transactional work. You go in and provide knowledge or a solution or give someone a hug and then you move on to the next client. Those who are lucky like me, go back to the same clients and sometimes the same systems.

If you've met me IRL then you know that I can build rapport with anything and anyone from a CIO to a dev to a grumpy crocodile to a brick wall in under 3 minutes. All of that comes from genuinely caring about what clients want and how to help them achieve that. My work is not about me being a superstar or about credit or acclaim. If I wanted that, I wouldn't be in PFE. I'd be a pastry chef.



Anyway, you build rapport and you like the cause. You work towards the cause and you actually add value. Then you leave and start all over again. It is fun but it isn't the same as being part of a dev team building software.

This means that I have to find a way to belong. A way to feel part of something without being in the middle of a dev team slaving over the coals. That's my first action item. I must find a way to enjoy the journey that satisfies the way I like to work... with people.

No Finish Line (the destination)

Ask anyone who identifies as pragmatic and they will tell you that delivering something from start to finish is more satisfying than gold plating or talking about it for ages.

In my current day to day work, there are very small blocks of work that I have to complete. People often say they like the work but not the wrap up report or presentation at the end. I love it all. I love the start, the middle, the race to the finish, the wrap up and the bloody post mortem.

As an agile dev, breaking down big things in to small achievable parts is a talent I have. I can deconstruct any requirement and put it back together, while holding the holistic view and goals in my head.

There is my second task, to find a way to take on bigger chunks of work that let me satisfy my need to build awesome stuff.


It took a lot of sulking to come to this realisation. It also took a colleague to give me a good slap and tell me to step up and do something about it. I am often that person to others but oh so famous for not taking my own wicked advice.

Thank you, unnamed colleague. You are lucky there is a continent between us :)

Now to make it better or get the hell out.


Tuesday, 20 November 2012

Team Players Are Worth More Than Superstars



A lot of time, I am involved in putting teams together and getting them to mash.

Sometimes, I am given the raw materials and have to make the most of what is given me.

Other times, I get to pick and choose and use excuses like "we need the best combination to deliver what the client wants."

Often when we hire developers, we look for technical skills and client facing skills and design skills. This is all well and good as long as we also look for collaboration skills.

The environment that I play in is full of superstars who really do know their stuff. The thing is that when I'm choosing a team that knows my stuff, I want one thing in particular. You have to know how to collaborate.

A developer can know an API front to back.
A developer can talk about the intricacies of their technology stack.
A developer can describe everything they have ever built and impress you.

However, I want someone who can work with others.

I am not fussed if they are a member of Mensa or can recite 6 digit primes by heart. That doesn't make a useful developer.

What is most important is that you can work with others. You must be able to say what you have done. You must be able to describe your intentions. You must be able to write code that doesn't identify itself as yours but instead mold with the team.

Yes, there are so many average devs but a good dev who can communicate and collaborate will wipe the floor with them.

Be a good team player.

A superstar is worth nothing alone.

Thursday, 4 October 2012

Be Mobile or Be Cloudy

There are two spaces in the dev world for a dev to touch on right now that can not be ignored. If you do ignore them, you are accepting legacy status within a year.

Be a mobile dev OR Be a cloud dev.


Cloud: A visible mass of condensed water vapor floating in the atmosphere, typically high above the ground


Everyone is talking cloud this and cloud that. If you aren't at least having a play in this new world at home then you are already falling behind.

This should be something additive. It will work with what you know and be a logical progression, just as classic client server gave way to the storm that was web development.

Everyone has an offering. Amazon was first and they did ok. Google wants all your data and pretty much has it. I work for Microsoft so you'd expect that to be why my suggestion for a starting place is Azure.

In actual fact, it is Azure but not because I work for them.

If you are a .NET developer and you want fluid transition in to this new buzz word filled world of cloud then there is no better option than Azure.

Moving to any cloud is not just a matter or spinning up a few servers and copying your code over. Designing for this new environment is key. Take what you have and move it to a truly scalable model with infrastructure as a service and advanced app monitoring.

Stay tuned and join me on my 90 day adventure to build an Azure based application.


Mobile: A decorative structure that is suspended so as to turn freely in the air

There are also a bunch of major options if you go down this path. Google has Android. Apple has the mainstream iOS platform. Microsoft gives you Windows 8.

Having written apps for all of these players, there are good and bad things about all of them.

My bet is on line of business apps that don't appear on app stores at all but get consumed inside businesses to do everyday work.

Designing for a mobile platform is as distinct and must be as purposeful as designing for the cloud. You don't just move code. You don't just swap out your presentation layer. There are considerations made for user experience on such portable but tiny devices. Then there is how you handle data down and uploads across 3G+. There are many restrictions to grasp but these strong guidelines can be used to quickly build for these platforms, if not fought at every turn.

.NET devs again will find the Win8 app leap more of a small step.

Whatever mobile experience you bring with you or gain in the adoption of this kind of programming and design, it will help you in building leaner and friendlier applications.

My posts on getting started with Win8 dev are here.


There will always be legacy apps. Just don't be a legacy software developer.

Sunday, 2 September 2012

Preparing for Win8 App Excellence Labs

While running Win8 Application Excellence labs, I have seen developers hit similar situations each time, that take time away from the labs that could be used for more user experience (UX) and technical feedback.

These labs are sponsored by Microsoft Evangelists and executed by Microsoft Premier Field Engineers. We are trained and experienced in what a Windows 8 application built in the New User Interface should look like and behave.

The purpose is to enable developers as they prepare their applications for submission to the Windows Store.

You will hear people say that the labs are there to grant early access via developer tokens but this is not the case. Our primary purpose is to communicate a common understanding of the design guidelines (both technical and user experience) that make up the new Win8 user interface and underlying technology.

Over time, I have built up a list of useful links to help developers get their apps in to shape so they are most of the way there when they hit App Excellence labs or for when they submit to the store themselves.

Here are some links to help devs on their way to a well built and well design Win8 app...



Thursday, 21 June 2012

Measurement and Sentiment



A good friend of mine and former colleague is working in an environment of legacy applications, with legacy developers who don't want to take part in any development practice change. He is charged with moving all of their pre .NET apps to a later and greater version of Microsoftness. They are encouraged to come along on the journey but are not really interested in changing their ways much at all.

While thinking of advice to give a friend, I came to these conclusions.

The first thing with change is to understand that it is human nature to resist it. The ones that push back are not the freaks, those of us who chase the mutations are. We are the minority but we are the ones who shape the world around us.
That is why buy-in from your team members (the pigs, not the chickens) is extremely important.

Rigorous practices is what makes an agile team. Those practices are determined to work based on two things - measurement and sentiment.

Measurement is the data that proved that a practice applied rigorously achieved a measurable increase in quality or quality or clarity or whatever your sliders are set to.

Sentiment is the buy-in to the practice by the team members. That is devs and BAs and testers and business reps and anyone else involved in using that practice to get the best results. Without buy-in, the practice should be dropped after trying it for one or two iterations.
On a new agile team with people who are feeling consciously incompetent and not believing, you can fail to gain buy-in or lose what little you had.

Without sentiment, measurement is unsustainable. Without measurement, sentiment is unjustifiable.
When I teach engineers or any member of a team a new way of doing something, I explicitly ask for buy-in. If they don't give it then I sit with them and try to understand what the pain point is that they are experiencing. Then I address that concern, beit with understanding or a different practice or explanation or discussion.
Try do this at an individual level if you have relationships already or think the discussion will build rapport or technical respect.
If it is the whole team you need to address then use a retrospective that allows everyone to air what doesn't work in a constructive setting. Self organising teams must decide what is best for them with some guidance but they must choose for themselves. If they choose then they commit as part of the deal.

Often those who suggest the ideas are the outspoken ones and the leaders of the descent anyway. Use them as a force to encourage change.

Friday, 15 June 2012

Presenting at the Premier Field Breifing


Today was a day for Canberra Premier Field Engineers to share their knowledge with an open house, at our second Premier Tech Briefing for this financial year.


My colleagues were out in technical force and dressed like Microsoft ninjas. I got to wear my Swarovski crystal Microsoft shirt which was I admit, a highlight.

Jimmy Fitzsimmons presented on Windows 8 Dynamic Access Control as Steve Moore, the Lync genie spoke in an opposing room.

Imtiaz Khan then gave a SCCM 2012 Tech Overview, while Grant Holliday and I did a joint session on Agile Development with Visual Studio and Team Foundation Server 2012.

There were wild cheers; huge amounts of delicious food; virtual graffiti of another engineer's face as a demo; and a free autographed book from our local published TFS guru.

We had a fantastic turn out with attendees from 25 organisations from across Canberra.

The immediate feedback has been very positive.





Next time, we will have a full dev stream. Stay tuned.

A Lifetime of Events




Last week, I sat with a developer in an effort to solve an issue with broken Suspend-Resume handlers in Metro. The developer told me that he was getting inconsistent behaviour with his Suspend handlers and that he suspected a bug in the Metro framework.

When I got him to repro the bug, showing me how the error was caused and what the resulting output was, I found that he was not suspending and resuming but instead, suspending and on-launching.

He was exiting the application.

Metro triggers the suspend handler at that point. Suspend handlers run when you exit the application. Exit can be either suspending and leaving for a bit or quitting the application forever.

Now, one thing you should know about the Suspend handler is that it is paired with the Resume handler. If you can not see the Resume handler being called subsequently, after you add code to the Suspend handler then you are putting it in the wrong place.

The developer I was helping was putting his code in the wrong place. He was assuming that if he told Application.Current to persist something then it was so for as long as he waited to relaunch the application. He was wrong.

Web developers don't seem to hit this learning point but desktop developers do. It happens because they don't live inside life cycles. They have never been forced to understand that objects have lifetimes and you have to interact within the rules of that world.

When this developer called the Suspend handler and traced the persistance back to a file that stored the serialised version of his data, he assumed that it would be there when he started the app again.

That is an incorrect assumption.

Application lifetime lasts for the a the amount of time that the application is current. That means that when you launch it and when you exit it, the application is live. Outside of those boundaries, Metro does not guarantee anything. Files persisted to storage by the Application object are not always there and not always called the same thing. If it goes to disk, it could just as well go to memory and it is then just as fleeting.

There are matching pairs when it comes to exit-entrance handlers. With Suspend, you can count on Resume. With Exit, you can count on Launch.

Don't assume anything will be consistent, outside of the lifetime that your event belongs to.

If you want to ensure data or state persist then you must explicitly handle that persistence when it does not obey Application lifetime.

Friday, 25 May 2012

Premier Tech Briefing 2012


Premier Tech Briefing 2012 – Friday 15th June

Come and join us for the Mid-Year Premier Tech Briefing 2012. Learn from the best as Microsoft Premier Field Engineer’s (PFE) show you their tips and tricks learnt from the field.

Arrival/Registration and Breakfast – 08:00am to 09:00am

Please arrive at the venue with enough time for registration.

Session 1 – 09:00am to 10:30am

Option 1 - Windows 8 Dynamic Access Control

Presented by a Microsoft Premier Field Engineer. A first look into Windows 8 Dynamic Access Control – Everything you thought you knew about securing a file system is about to change!

Option 2 – Deploying Lync 2010!

Presented by a Microsoft Premier Field Engineer. A deep dive into how to get the most out of a Lync 2010 deployment.

Session 2 – 10:40am to 12:10pm

Option 1 – SCCM 2012 – Introduction to SCCM 2012

Presented by a Microsoft Premier Field Engineer (PFE) A deep dive into the new features of SCCM 2012 – All your questions answered!

Option 2 - Agile Development with Visual Studio and Team Foundation Server 11

Presented by a Microsoft Premier Field Engineer. We will take a ride through an example project and show you how an agile team can efficiently prioritise, plan, and deliver high quality software. We will also take a look at the valuable set of new features and capabilities that Visual Studio 11 and Team Foundation Server 11 bring to agile teams.


Venue: Microsoft Canberra - Level 2, 44 Sydney Avenue, Barton

Registration


To register, please emails damadden@microsoft.com

For any questions please contact me. I hope to see you there!

Thursday, 22 September 2011

A Thousand Words


When I find myself explaining a concept over and over again to the same or different members of my team, it is a signal that I need to draw a picture.

Often, I draw the picture for a few people before it clicks that I should put it on an A3 piece of paper and stick it on a wall or take a photo and send it around in an email.

In the case above, I was explaining mapping between model classes coming out of different layers of the application. All sorts of words were being used to refer to these objects and it was getting confusing.

This image has given us an explanation of where mapping classes exist; what models coming out of different layers are called; namespaces to be used when creating or referring to mappers and models; and a common language for technical discussion.

To write that in a document would be long and cumbersome.

When you aren't explaining it in code, explain it in pictures.

Tuesday, 20 September 2011

The Check-In Procedure for my team


This is an email I sent out to my team yesterday. What do you do before checking in code?
---
Hello rose petals,
I’ve put a stuff to do before you check-in procedure on the wall.
In case you do not look on the wall (even though you should try to each day), here is a summary of the summary…
1. Merge all your code locally by doing a Get Latest Version from TFS;
a. Resolve any conflicts by trusting what is on the server and moving your changes in to that code. If anything can’t auto merge or conflicts seriously with your code then find the dev who wrote it and have a chat about how to make it work. This is a life skill, grasshopper.
2. Run all the tests (not just your own) and make sure they are all still working. This process is regression testing and stops you introducing a bug that causes something else with a dependency to fail;
a. Functional, Integration and Unit tests should be run.
b. If you do break something and fix it then write a test around that area because it seems fragile and may happen to someone else. Tests are security blankets. I’ve always wanted a teddy bear called CI.
3. Ensure all compiler errors and warnings are fixed;
a. Warnings exist for a reason. They speak of great tales of possible performance errors and sagas of linking and runtime optimisation. They are not there for the entertainment of the devs who wrote Visual Studio or .NET, they are for us.
b. Use ReSharper to make the little green box at the right top of each code file green. Ask me what I mean by this if you aren’t sure.
c. Use fxcop to ensure static analysis rules are complied with. Yes, even the ones you don’t love but we have decided are standard for our project.
d. Retro Steve will cry if you check in without these warnings resolved. I will look disappointed. Puppies will die.
4. Check it in!
5. Show another developer your code for review and check out the code and run the tests on their machine;
a. This means you have someone else to blame share your future bugs with.
6. Be happy. You are a good human being.
This is why I should not take pseudoephedrine during work hours. Damn cold or hayfever or something.

Sunday, 11 September 2011

The Knowledge Gap


Anyone who has had a glass of wine with me at the end of a long work day will have listened to me complain about the technical level of the people playing IT professionals.

Yes, "IT Professional" is a broad group of people now with lots of different specialised roles. This happens as a profession grows and as it grows, we start to see the holes in the entry level criteria that are leaving us with inexperienced professionals producing what can only be inexperienced code.

That's fine, right? You throw in a senior engineer to vet what they produce before it hits source control or worst case production. You give them bench or training allowances to go off and take courses, read books and teach themselves.

This is where it falls down. Teaching yourself something is a highly developed skill. Universities do not teach higher grads exactly how to develop a case management system with a specific tech stack with the exact restrictions and requirements as they will need for a specific client. No, they teach concepts and they teach you how to learn on your own and do it fast.

The ability to understand complex software concepts improves with time and experience. So does the ability to pick up a concept and hone it based on reading, watching talks and trying it out. Both of these skills come quickly to good developers. There are many non-degree qualified engineers that I have worked with who are brilliant. The one thing they do better than a lot of others is to pick up a concept and actually learn and understand it.

Going and reading about something and implementing it does not mean that you have done it properly. The eternal error I see in software engineering is that a developer learns how to build one thing and as they change technologies or languages, they build exactly the same thing.

They miss the intricacies, beauty and benefits of the language they are using. They even miss the point completely when they solve different problem domains with the same solution. It won't work. Everything I have built is slightly different than everything else I have ever built. There are shared patterns and solutions but they are unique and require bespoke solutions. I'm not saying they need the wheel invented each time. In fact, I'm the first to argue that unless you are in R&D or seriously cutting edge, then almost everything you need is already done or the pieces exist to allow you to solve the problem quickly.

Recently, I'm seeing developers walk off and read about something and try it out. They then come back and tell me they understand it and have solved all the problems that us senior devs have been thinking through for the last few days. At first, I was super pleased. Yay, they have saved me time and given us a new perspective then I hear the explanation or solution and it's not quite right.

The concept has been explored and the idea implemented. It uses the right terms but in the wrong ways. It sets out the process or structure but only in a superficial way. It is so specific that it can not be generalised because instead of giving a solution, it has gotten to a solution without the understanding of the problem or the solution.

Now, I'm left trying to work out what was missed and I'm coming up with two things that are shining above everything. There is a lack of understanding of the problem being solved and a massive misunderstanding of the underlying pattern or technology being used to solve it.

There is no lack of enthusiasm or effort expressed. It is instead a knowledge gap.

At this point, I have to stop and start at the beginning again explaining what we are doing, what we want to do and how we might go about coming to a way of solving it. I don't want to say they wasted their time but maybe there is education in learning that throwing it away and starting again is also a skill. The big problem is that I can explain it to a person but without the foundation then I can't understand it for them.

There are basic concepts that you should have when you walk in to a software job. Liking tinkering with your PC at home is not enough. You need to understand computer science concepts. We need to have a common language. I have zero issue to helping a juniour understand a concept but I can't be explaining things to them that they should have found out about in first year computer science.

As our industry matures, we must start accepting a certain entry level of competency. Enthusiasm and over-confidence is not going to compensate for not understanding polymorphism or the difference between a has-a or is-a relationship between classes.

I can teach that too you but I shouldn't have to.

My head is in the cloud


At my current location, each work day feels like stepping back in time in to a world where we fought for hardware to run the simplest things on. In Sydney, Canberra and Melbourne I could walk up to my IT guys and ask for this server for that job as I built my application. With dedicated data centres employing high end funky virtualisation, it would take hours or days worst case.

That is what I expect at least from the IT guys in the company I work for. Especially the big guys.

Unfortunately, in Darwin I am more likely to get what I want in a small office where I can run down to Harvey Norman and grab a machine and combine that with a good MSDN subscription. There is at least a possibility of me achieving isolation of environments, added servers and more space to play in that world.

Where I am now, we are too big to allow anything to run on our network without the restricted, locked down and encumbered SOE. We are also too unimportant to get a place in our private or public clouds. It's a lose-lose situation.

There are many reasons for businesses to go in to the cloud but it is not being sold as a place for software development services to take place. At least, it is not being sold that way to the mid-sized companies who really truly need it. They can benefit the most without the hassle, price and justifications that they are making now. Sys admins will still be in jobs but they won't be racking machines in meatspace.

The scalability and elasticity of the cloud is perfect for software development. Even the benefits of highly automated behaviour that will allow the management and clustering that we need without knowing what we need ahead of time.

Right now, I have to predict all my development needs and then beg "please sir, can I have some more" if for some reason I missed out on something. We have to adapt and cater for the unpredictable. In the same way that we talk of agile software, we need adaptable and agile infrastructure for producing software applications.

Those of us inside mid-sized organisations can sell the business value or suggest cloudy solutions until the cows come home but until the big providers like Amazon, Microsoft and Google start selling the software services then the big wigs won't really listen.

Hurry up already. I am sick of begging for servers.

Sunday, 22 May 2011

Go Dig A Ditch


People keep on telling me that I shouldn't get upset about others in my industry who simply couldn't care less what they produce.

Apparently, people have different priorities.

The thing with priorities is that you are choosing to order the importance of several things. That does not automatically imply that there is only one thing that is important to you. People with children who work a day as a software engineer and do a good job, do not implicitly hate or undervalue their children. Those of us without children don't just have lives full of work and nothing else.

In fact, people with diverse interests and hobbies are often very good at their jobs because their lives are more balanced.

You can have multiple things that are important. That is the whole point of context. When you switch contexts, the focus changes. There is nothing lost in other contexts. It is not as though you love the other less. You do not have to choose.

There is one guy in Darwin who sparked this rant. He goes to work. He goes home. He doesn't put in any extra effort. He always asks why he has to do something out of his usual routine. He doesn't see the point of collaboration, information sharing, reuse of anything, or exerting any more effort than it takes to not fire him.

Working with him was difficult because he would resist the whole way. It was passive resistance. I always came across as a French marine dragging a Green Peace supporter from a boat. It makes those of us who care look like zealots, when all we want is for people to make the effort they are paid for.

What we do is an important job. We are professionals. We get paid well .We have a responsibility to give a good service.

If you don't want to contribute then you should go dig ditches. Get the hell out of programming. You are lowering the standard.

Sunday, 14 November 2010

Don't Panic

This is not a new area of discussion for me. You will see that a theme runs through my views on software development. It can be summed up to two simple words and one large exclamation mark: Don't Panic!

There will always be deadlines - be they realistic ones or complete death marches.

There will always be defects - found in testing or left to the point of blowing up in a user's browser.

There will always be uncertainty - from not deciding what colour to paint the bike shed to wondering if you should ever have become a programmer.

If you plan on staying around in the volatile world of software then you are going to have to learn to take a few deep breaths and deal with the problem at hand. Fainting at the slightest sign of a challenge is not going to help you work through that issue. Remember that unless you plan on never waking up from your fainting episode then the problem will be there when you are offered the smelling salts.

Do not become one of those people who stands back and has some other calm person fix your issues. Instead, be the calm one. Be the go to person. When the fit hits the shan, don't join the throng of zombie fearing masses. Step back and remember that you are building software, not searching for weapons of mass destruction. A bit of broken code or integration issues will maybe cost some money or annoy a few customers but nobody will die. It is software and it can be fixed.

Rectifying a situation and solving a problem is important but jumping at it with reactions rather than sanity will not bring peace to you or the issue.

What can you do?

  • Walk away for a minute and get your thoughts together;
  • Don't make changes until you know exactly what the problem is;
  • Find someone to discuss the issue with. Explaining it to others can help you sort through it. They may also see something or know something you can't see through the haze of stress;
  • Let the people who are going to be affected know that their may be an issue and actions are being taken to remedy it; and
  • most importantly, DON'T PANIC!

Acknowledge Me

Apple started a user experience trend many iOSes ago when it accepted Settings changes and did not ask for confirmation. Once the chang...