Posts Tagged‘visual studio’

The Subtle Forms of Not Invented Here Syndrome.

Whilst I haven’t had a real programming job in the better part of a decade I have continued coding in my spare time for various reasons. Initially it was just a means to an end, making my life as an IT admin easier, however it quickly grew past that as I aspired to be one of those startup founders Techcrunch idolizes. Once I got over that my programming exploits took on a more personal approach, the programs I built mostly for my own interest or fixing a problem. I recently dove back into one of my code bases (after having a brainwave of how it could have been done better) and, seeing nothing salvageable, decided to have a crack at it again. This time around however, with far less time on my hands to dedicate to it, I started looking for quicker ways of doing things. It was then I realised that for all the years I’ve been coding I had been suffering from Not Invented Here syndrome and that was likely why I found making progress so hard.

FrustratedProgrammer

The notion behind Not Invented Here is that using external solutions, like in the case of programming things like frameworks or libraries, to solve your problems isn’t ideal. The reasoning that drives this is wide and varied but it often comes down to trust, not wanting to depend on others or the idea that solutions you create yourself are better. For the most part it’s a total fallacy as any one programmer cannot claim to the be the expert in all fields and using third party solutions is common practice worldwide. However, like I found, it can manifest itself in all sorts of subtle ways and it’s only after taking a step back that you can see its effects.

I have often steered clear of many frameworks and libraries mostly because I felt the learning curve for them would be far too steep. Indeed when I’ve looked at other people’s code that makes use of them I often couldn’t make sense of them due to the additional code libraries they had made use of and resided myself to recoding them from scratch. Sometimes I’d do a rudimentary search for something to see if there was an easy answer to my problem but often I’d just wrangle the native libraries into doing what I wanted. The end result of this was code that, whilst functional, was far more verbose than it needed to be. Then when I went back to look at it I found myself wondering why I did things in this way, and decided there had to be a better way.

Fast forward to today and the new version of the application I’ve been working on makes use of numerous frameworks that have made my progress so much faster. Whilst there’s a little bloat from some frameworks, I’m looking at you Google APIs, it’s in the form of dlls and not code I have to maintain. Indeed much of the code that I had to create for handling edge cases and other grubby tasks is now handled much better by code written by people far more experienced with the problem space than I will ever be. Thus I’ve spent far less time troubleshooting my own work and a lot more time making progress.

I have to attribute part of this to the NuGet package management system in Visual Studio which downloads, installs and resolves all dependencies for any framework you want to install. In the past such tasks would fall to the developer and would often mean chasing down various binaries, making sure you had the right versions and repeating the whole process when a new version was released. NuGet broke down that barrier, enabling me to experiment with various frameworks to meet my end goals. I know similar things to this have existed in the past however I really only begun to appreciate them recently.

There’s still a learning curve when adopting a framework, and indeed your choice of framework will mean some design decisions are made for you. However in the short time I’ve been working with things like HtmlAgilityPack and Json.NET have shown me that the time invested in learning them is far smaller than trying to do what they do myself. I’m sure this seems obvious to seasoned programmers out there but for me, who was working with the mentality that I just needed to get things done, it never occurred to me that my approach was completely wrong.

I guess where I’m going with all this is that should you find yourself attempting to solve a problem the first thing you need to do is see if its been solved by someone else first. Chances are they’ve gone through the pain you’re about to put yourself through and can save you from it. Sure you might not understand fully how they did it and they might not do it the way you wanted to but those things mean little if they save you time and emotional capital. I know for myself if I had to redo everything I did previously I would be no where near where I am today and likely would get no further.

Building And Deploying My First Windows Azure App.

I talk a big game when it comes to cloud stuff and for quite a while it was just that: talk. I’ve had a lot of experience in enterprise IT with virtualization and the like, basically all the stuff that powers the cloud solutions we’re so familiar with today, but it wasn’t up until recently that I actually took the plunge and actually started using the cloud for what its good for. There were two factors at work here, the first being that cloud services usually require money to use them and I’m already spending enough on web hosting as it is (this has since been sorted by joining BizSpark) but mostly it was time constraints as learning to code for the cloud properly is no small feat.

My first foray into developing stuff for the cloud, specifically Windows Azure, was back sometime last year when I had an idea for a statistics website based around StarCraft 2 replays. After finding out that there was a library for parsing all the data I wanted (it’s PHP but thanks to Phalanger its only a few small modifications away from being .NET)  I thought it would be cool to see things like how your actions per minute changed over time and other stats that aren’t immediately visible through the various other sites that had similar ambitions. With that all in mind I set out to code myself up a web service and I actually got pretty far with it.

However due to the enormous amount of work required to get the site working the way I wanted to work it ultimately ended up falling flat long before I attempted to deploy it. Still I learnt all the valuable lessons of how to structure my data for cloud storage services, the different uses of worker and web roles and of course the introduction into ASP.NET MVC which is arguably the front end of choice for any new cloud application on the Windows Azure framework. I didn’t touch the cloud for a long time after that until just recently when I made the move to all things Windows 8 which comes hand in hand with Visual Studio 2012.

Visual Studio 2010 was a great IDE in its own right the cloud development experience on it wasn’t particularly great, requiring a fair bit of set up in order to get everything right. Visual Studio 2012 on the other hand is built with cloud development in mind and my most recent application, which I’m going to keep in stealth until it’s a bit more mature, was an absolute dream to build in comparison to my StarCraft stats application. The emulators remain largely the same but the SDK and tools available are far better than their previous incarnations. Best of all deploying the application can’t be much simpler.

In order to deploy my application onto the production fabric all I had to do was follow the bouncing ball after right clicking my solution and hitting “Publish”. I had already set up my Azure subscription (which Visual Studio picked up on and downloaded the profile file for me) but I hadn’t configured a single thing otherwise and the wizard did everything that was required to get my application running in the cloud. After that my storage accounts were available as a drop down option in the configuration settings for each of the cloud roles, no messing around with copying keys into service definition files or anything. After a few initial teething issues with a service that didn’t behave as expected when its table storage was empty I had the application up and running without incident and it’s been trucking along well ever since.

I really can’t overstate just how damn easy it was to go from idea to development to production using the full Microsoft suite. For all my other applications I’ve usually had to spend a good few days after I’ve reached a milestone configuring my production environment the same way as I had development and 90% of the time I won’t remember all the changes I made along the way. With Azure it’s pretty much a simple change to 2 settings files (via dropdowns), publishing and then waiting for the application to go live. Using WebDeploy I can also test code changes without the risk of breaking anything as a simple reboot to the instances will roll the code back to its previous version. It’s as fool proof as you can make it.

Now if Microsoft brought this kind of ease of development to traditional applications we’d start to see some real changes in the way developers build applications in the enterprise. Since the technology backing the Azure emulator is nothing more than a layer on top of SQL and general file storage I can’t envisage that wrapping that up to an enterprise level product would be too difficult and then you’d be able to develop real hybrid applications that were completely agnostic of their underlying platform. I won’t harp on about it again as I’ve done that enough already but suffice to say I really think that it needs to happen.

I’m really looking forward to developing more on the cloud as with the experience being so seamless it really reduces the friction I usually get when making something available to the public. I might be apprenhensive to release my application to the public right now but it’s no longer a case of whether it will work properly or not (I know it will since the emulator is pretty darn close to production) it’s now just a question of how many features I want to put in. I’m not denying that the latter could be a killer in its own right, as it has been in the past, but the less things I have to worry about the better and Windows Azure seems like a pretty good platform for alleviating a lot of my concerns.

Gamification Doesn’t Always Make Sense.

When I first started hearing about achievement systems I honestly thought they were a total waste of time. I usually play games just for the sake of playing them, not because I want to have some kind of meta-performance tracker that I can show off to my friends. I did start to warm to them when the encouraged novel or interesting kinds of game play like many of the achievements in Team Fortress 2 did. It wasn’t long after achievements caught on that the whole gamification movement took hold and all new start ups started adding game features to their products.

Now I wasn’t immune to this either. When I was working on Lobaco I thought it would be a great idea to add in some achievements in order to encourage people to participate in local discussions. Indeed I was going to take it a couple steps further and have things like local leader boards and titles based on your overall score in a particular area. All of these things were done in the name of increasing user engagement as many studies and successful start ups have shown that game like elements keep people coming back. Of course everyone then saw it as the panacea to their ills and game elements started appearing in places that they really shouldn’t.

I came across one such example this morning in my usual troll for blog fodder. Microsoft, for some strange reason, decided to code up an achievement system for Visual Studio, their flagship development environment. It looks to be an extension to Visual Studio itself and currently only works if you’re coding with Visual Basic or C# (arguably the most common languages though). There’s dozens of achievements already in there and even a leaderboard of the top 15 people who’ve gained the most achievements. Taken at face value I can see this being a good thing by encouraging good programming habits through achievements.

Microsoft’s implementation is anything but that.

Many of the achievements are either pointless, inane or actively encourage bad coding habits. 50 projects in a solution? A class that has every kind of scope in it? I can foresee situations where these things might happen (but they still shouldn’t) and it begs the question as to why these were added in. The flip side of this is people creating one shot projects in order to get these achievements (which everyone on the leaderboard has done) which makes the achievements even more meaningless. Indeed the whole idea just seems like a poorly thought out attempt at getting into the gamification scene, one that will be rightly ignored by most proper developers.

Just like in Lobaco where adding in game elements didn’t make complete sense (at least not at the great expense of other features, which it did) there are many times where the gamification of something just plain won’t work. If the core of your idea is based around a game idea then it probably makes sense to include achievements. If it does not then realistically you shouldn’t be adding them in until you’ve done everything else possible to deliver a good product/service to your end users. Attempting to keep people interested with cheap tricks like gamification won’t work if the underlying product has no redeeming value, nor if the core use of the product isn’t a game mechanic itself. The sooner people realise this the better as the spread of crappy, tacked on game mechanics is really not doing anyone any favours.

Take Off The Blinkers.

Look I’m not going to say that I’m above rabid fan boy-ism. In fact there are multiple occasions where I’ve made up excuses for some of my companies of choice (notably Bioware and Sony) but I usually at least take the time to find out all the facts before disregarding them completely. Mostly I do this so I can use my opponent’s position against them, much like I’m doing in a fledgling tweet battle with one of my friends, but if I come across a hard line fact that I can’t get across I’ll do the requisite back flip and change my position on the matter. Like I did when the iPad sold like hot cakes.

However the latest storm comes from none other than the fan boys of that company. A couple days ago Apple released their latest version of their Integrated Development Environment (IDE) Xcode 4. Personally I wasn’t excited about the release since if I had my way I’d do everything in Visual Studio (and it means yet another 4GB download, eurrgh) but some of the features piqued my interest. The integration of Interface Builder into the core Xcode application is a welcome change as well as the improvements to the debugger and an intelligent error detection engine. I haven’t yet had a go with it but the reviews I had read so far are positive so I’m sure it will make my iPhone coding life a little easier.

However Apple made the controversial move of charging $4.99 for it through the Mac App store (it’s still free to developers who are paying $99/year). Whilst the barrier to entry for Xcode is well above that thanks to the Apple hardware tax it still pissed a good number of enthusiasts off since Apple doesn’t ship a compiler with OS X, leaving many to either go without or go the dark route of installing GCC themselves. Personally I didn’t care either way since I’m already well over $4000 in the hole just for the privilege of developing for iOS but what got my goad up was when people started comparing it to Visual Studio’s pricing.

Now since Visual Studio is aimed at corporations its pricing is, how would you say, corporately priced. The cheapest version you can find on the site is $549 a whopping 110 times the price of Apple’s offering. Now whilst I could argue that the value of Visual Studio is well worth the price of admission (and it is, even if it’s just for the debugger) you’d have to be a loon to pay that price if you just wanted to develop apps for a single platform. The reason behind this is because Microsoft offers up special platform specific versions of Visual Studio for free under the Express line of their products. There are 4 different versions on there currently and combined they cover pretty much all types of development on the Windows platform. Apple does not offer Xcode free in any form anymore so realistically the comparison to Visual Studio is apples to oranges, as one is either 110 times the cost or reversed its infinitely more expensive (literally).

Perhaps I’m getting too worked up over an issue that in reality means nothing, since most people who are retweeting this nonsense are probably not developers. But still when people show a blatant disregard for simple facts (hell even a simple Google search) it gets me all kinds of angry. Couple that with a complete lack of other inspiration for today’s post and you get this ranty, nigh on pointless post about Apple fan boys. I probably shouldn’t be so angry at those people who are simply retweeting the nonsense but it’s this exact kind of me-tooism that causes the kind of zero-value blogging that’s reducing the signal on the Internet to be nigh on indistinguishable from the noise.