Thursday, September 20, 2012

Cross Platform Development

More recently I have been playing with the range of projects from the Xamirin team, specifically Mono and MonoGame. Mono is a .NET equivalent framework that works across other platforms. Xamirin's tools even spread across the mobile space with MonoTouch and MonoDroid. Now, even though I've just been saying how good it is to look vary your experience with different tech, there are obviously major productivity advantages to being able to write same code in MS space and run it on other platforms whilst only having to worry about device specific UI and application life cycle events.

Cross platform work is very important these days. As MS is becoming less dominant across the varying devices people use in their day to day lives, being able to write software that will work on multiple is vital. With web development, this is less of a focus as what you make already 'works' across all devices with a browser. However, as the popularity of native apps on mobile devices has shown, the speed, responsiveness and UX on specific devices is still very important to the end user. The browser might one day prove to be place you can build anything once to run everywhere, however in my opinion at least, that day is not now, nor any time soon. Part of the reason for this is the tools and technology involved in web development. These tools have come a long way in a short time, however your basic combination of HTML, CSS and JS is still less than ideal, and to be honest, quite frustrating . I'll be the first to admit, I'm just not very good at CSS, where possible I leave it to people with a lot more talent than I. On the other hand, I've used Javascript quite heavily over the past 3-4 years I've been doing web development and I'd like to think I understand enough of how to use JS to write my way out of a lot of problems, however, rarely without feeling like I'm fighting with the nature of the language itself or the limited debug/support tools (these are improving at a good rate though). Dart is something that I very much hope continues to improve and gains popularity as giving developers options with web development will end up giving end users better solutions.

Scale of Project

One thing I will give Javascript/HTML5 is speed of development, with an important condition, Complexity. Javascript/HTML has the same advantage of most interpreted languages, which is that you can see the results of your work very quickly. However, something I've battled with myself and I'm sure others have also, is that it can be very easy to produce a 'write only' code base. The structure of your JS application is crucial to how maintainable your application will be. Though this is some what true of all modern programming, it is something I see other developers ignore. Backbone is probably my favourite framework that really helps with the structure of your Javascript application whilst not forcing the developer down a specific path.

Another aspect of Javascript I really enjoy is the openness of it's community. So many free frameworks have been produced of really high quality, making Javascript applications is getting easier and easier which I think has attributed to it's success. One of the speakers at Teched this year had a great line which I think is quite true, "The C++ game community scorns newbies. The HTML game community wants to give you a hug when you don't know "

TechEd 2012, Game Developers and Communication

Last week I was lucky enough to attend TechEd 2012 on the Gold Coast. If you follow my twitter feed, you'll know that I didn't have high hopes for it being anything but a giant sales pitch. However, thankfully, a few good speakers saved me from maintaining that impression.

Favourite Talks (no specific order)

Adam did a really good job at showing what was new in VS 2012 as well as being honest about what he doesn't like. Good use of open source tools (Glimpse) and promoting tools that help you be more productive. Amount of humor in the talks was awesome, enough to keep interest (it was the first session as well, not enough coffee) and very knowledgeable.

Aaron showed his expertise very well, assumed a decent level of knowledge for his talk, which was refreshing. He pointed out gotchas and short comings of Javascript and building windows 8 apps while showing how to make the most of what was at developers disposal . Was unapologetic towards XAML developers and I overheard a few developers comment on JS being 'still all over the place'. I think these two 'camps' of HTML5+JS vs XAML both have pros and cons. Right tool for the job, ignoring alternate tools completely for each task causes potentially missed advantages. 'JS is all over the place' is a common reaction when seeing a large application of JS as the structure of self executing functions. JS in general can look strange initially and can be hard to maintain a large system written in JS, however it's strength with development time and flexibility can't be ignored in my opinion. Aaron did a great job at getting through a lot in a single talk.

Patrick Klug - Windows 8 - Games

A presentation by a games developer at TechEd, for me made the experience far more enjoyable as I got the chance to talk with Patrick regarding ideas for game development and some of the harder and not so well seen aspects of indie game development. His experience with the Windows 8 Store gave a good insight to what other potential developers might expect. His change from C# development to HTML5 + JS was an interesting one to listen to as he is relatively new to the Javascript language. Patrick's game "Game Dev Tycoon" is currently available on the Windows 8 Store and I strongly urge people to check it out, even just to see what can be done in HTML5 + JS.

Nick Randolph - Mobile Development - Cross Platform

This was a very interesting talk, both in topic and reaction from other developers. This session was in a smaller room but it ended up completely full with people unable to get in. Talk mainly focused on the use of Mono tools with a solid example of code reuse across multiple platforms. Very balanced talk, warning of 'no silver bullet' but showing real productivity gains through use of these tools. Nick's talk used more Expression Blend than I've personally seen before and I've forced myself to try and use the tool a bit more as he gave great examples of how much easier this tool can make certain tasks. Though I still dislike Blend, it's starting to show it's advantages.. as long as I don't get lost in it's UI.

I will update this blog with Channel 9 links as they become available.

Another thing I took away from Teched was the importance of communication within software development. Whilst on the plane to the Gold Coast I started reading Jeff Atwood's - Effective Programming: More Than Writing Code. Early in this book, Jeff highlights the importance of communication and how sites like Stackoverflow make programmers better communicators. It really does improve your ability as a programmer immensely. Once you try to convey a programming concept to another developer, it makes you think about that topic in a more fundamental way. I have found a few times while trying to explain why I chose one solution and not another, just the act of explaining gave me a deeper understanding of the different parts involved. It can also uncover problems that perhaps have been glossed over.

Though I might seem like a bit of a sheep, I strongly agree with Jeff's sentiment. One of the major reasons I'm making another attempt at regular blogging in fact. 

Sunday, September 9, 2012

Open Source and Quality

Open Source Software

When I first started in software development, I worked in a large enterprise environment. Lots of terms were getting thrown around and accepted by other developers around me. Phrases like, "Enterprise solution" and "Commercial Quality" which I also accepted, but didn't really think too hard about. One thing I did notice after a while was that these terms were primarily used by people trying to persuade others. However, this was not before I had sadly formed misgivings of my own regarding open source software due to the relationship I had created between quality and cost. This equality compare has done alright by me is some other aspects outside software development, but within software development, this rule, in my opinion, should be thrown out. 

Yes there might be more 'turn key' commercial solutions out there than open source ones, but a lot of them are getting a good run for their money by open source options. One of the best example of this in the .NET world would be ServiceStack

In June this year, my then colleague and friend, Adam Baxter and I attended (and very surprisingly won several categories) GovHack 2012. Although both of us put quite a bit of effort into our project (WeatheredOak), being able to produce a useful and functional application in 2 days would not have been possible without OSS options. We did use a large chunk of Microsoft tech (as both of us work professionally as .NET developers), however we leveraged ServiceStack very heavily to achieve the core of our project. Our API may not be a particularly good example of how to use ServiceStack (designed, built and documented in 2 days, give us a break :P), however it does provide a solid example how effective it is in just getting something done!

I had used ServiceStack before the event, however it really is its simplicity that makes it such an effective library of software. And it's that simplicity that really stripped back any remaining belief that there is this invisible separation of the quality of 'Commercial', 'Enterprise' and OSS I still had. Here was a piece of a software that was easier to use, faster and more extensible than it's commercial counter parts (WCF, Web API etc). I had used other open source libraries before, but ServiceStack solidified this realization and led me to experiment far more widely with OSS and more languages than I have done in previous years.

Microsoft Blinders

Starting off my professional career as an ASP.NET developer with my only other experience being in games development, I had very little confidence in what I was doing. I basically tried to keep my head down and learn as much as I could about the tools I had in front of me. Don't get me wrong, ASP.NET and MS tools are generally pretty good, but I became complacent with looking for the Microsoft solution rather than thinking about the problem my self. It wasn't until more than a year later that I started getting jack of fighting a framework rather than it helping me to achieve what I was trying to do and look further than one vendor.

This MS blinders effect of not looking past what MS offers/endorses is something I've noticed in developers of all levels of experience and all too common in the environments I usually work (Gov/Enterprise). And (most of the time) it doesn't come from some insidious ploy to sell more MS licenses, it just comes from developers who haven't known anything else. This doesn't mean you aren't a productive developer, but I know when confronted with a problem that needs some creative thinking, I would much rather have varied experience over 5 people suggesting the same solutions. Scott Hanselman (some what ironically), has a great quote that applies when he was talking about constructing a resume. "Do you have 20 years experience or do you have the same 1 year of experience twenty times?". Although MS technologies change and grow, I think sticking to them as your sole provider of tools limits a developer in experience in the same way of 20 x 1 years experience. 

I would strongly urge any one who is purely a .NET developer to look outside the box and not just what comes "out of the box", you will become a better developer for it. Maybe start with ServiceStack

Open Source, Cross Platform and Software Architects

I haven't posted in over a year, however I thought it's about time I try to get more into writing down some of my internal arguments regarding software development. I started this blog focusing on the XNA framework, which was something I was having a great time with as a hobby about a year ago, however, it's something I've had less time for lately. So, in an effort to get myself to post more often, I've change the title and purpose of this blog on a much wider range of topics on software development. So, on with what's currently occupying some of my brain space.

I am currently writing 3 blog posts about the subjects of Open Source Software, Cross-platform development, and The role of a Solution/Software Architect. I was going to just do one post with a few paragraphs on each, but as a wrote them I think they each need to be explored a bit further. Also, Now that I have posted this, I would look mighty stupid if I didn't finish them soon and left this as my last post for another 12 months :).