Computing: Prevention vs Cure
Prevention is better than cure is one of those age old sayings mostly linked with medicine, well I think it also needs to be applied more in computing.
At current the computing industry thrives on cure, entire industries have been built on cure. In this case the cure Im referring to is applications that compensate for the inefficiencies or inadequacies in other software or areas of computing.
The problem I have with cure is much like in medicine the cure can often have undesired affects and only partially resolve the issue. Prevention is better because it stops the problem in its tracks and never lets it occur in the first place. The problem with prevention though is its hard to implement and often has no commercial or financial benefit when compared to cure.
A good example of cure is virus scanners. Here we have a world wide industry employing tens of thousands of people and making millions of pounds a year protecting us from inefficiencies in operating systems; They are providing the cure for a problem that would be much better served if it was prevented. Prevention in this case is a much more difficult problem to solve and even the current cures don’t always resolve the issue fully. Like cures virus scanners often have undesirable affects like slowing down computers or making a false positive for an important application or part of the operating system.
The prevention solution to replace virus scanners is a hard problem to crack. Many people argue that operating systems like Linux and OSX don’t suffer from viruses which isn’t entirely true and there is the argument that because of their relatively low market share compared to Windows that virus writers are less likely to target them in the first place.
I wrote an article a while back about the Mac app store and in that I put forward the idea that Apple could potentially lock down the OS in such a way that a virus would not be able to run at all. I then became aware some time after the initial announcement of the mac app store sandboxing which will be a further attempt to stop malware and viruses from running on the system. I see this as Apples attempt at creating a prevention rather than relying on the cure of virus scanners.
Behind all of this we also have a moral dilemma. If a company can modify their software to provide a prevention rather than relying on a third party cure should they do it and more importantly should they be allowed to do it? For example, say that tomorrow Microsoft announce that Windows 8 will be using some new revolutionary technique that means that viruses and malware could no longer exist on their systems should they be allowed to ship it? Now you may think I’ve gone mad here and you might be saying to yourself of course they should ship it who wants viruses and malware on their systems and who wants virus scanners slowing things down? Well removing the need for that virus scanner removes the need for that world wide industry employing tens of thousands of people and making millions of pounds every year; with the way the global economy currently is the last thing we really want to be doing is destroying industries over night. Don’t get me wrong I’m all for change and I think as technology progresses we will see a lot of changes in the world like this, but it doesn’t mean that the question shouldn’t be asked.
Another case of prevention vs cure can be seen from the recent articles going around the internet about turning comments off on blogs. I posted a reply to these articles in general, and it highlights to a degree what I’ve been talking about here, in this case using spam filters and moderation as the cure to a problem that needs a prevention (The article outlines a potential prevention).
There is of course the commercial argument for cure over prevention. There is more money to be made from cure than prevention. Making an OS that is already market leader no longer require a virus scanner is probably not likely to make that market share any greater, it might make the customer more happy with the product but it’s not likely to make any more money where as a virus scanner can have reoccurring revenue charging a customer a monthly fee to get the latest virus definitions to keep their systems safe. So this begs the question of is there any real motivation to do the hard thing of implementing prevention?
While I’ve only listed virus scanners as the main culprit here there are many other examples throughout computing, email spam filters, firewalls, tools to detect memory leaks in software, the list goes on and on.
I’m sure as time goes by more and more problems will move from cure to prevention as generally speaking prevention gives the user a better experience and creates a better more efficient system.
While the problem of prevention is a hard one I think it also creates more interesting and unique solutions and a certain level of elegance and efficiency that interests me greatly.
Adding accuracy to bug reports and helping users
Earlier in the year I posted about helpful software errors, this article builds on this and offers a discussion into making it as easy as possible for users to submit relevant issues with software but at the same time making the information as useful as possible to the developer.
Let’s outline some of the things that could be done.
Gather anonymous statistics
There are already lots of applications out there that gather anonymous statistics about their usage. This can be very useful for finding out simple information like how often a feature is used and how people get to that feature (so many apps still have 100 ways of doing the same thing). This can be useful when devising test plans or when deciding if features should be dropped or if features should have more time spent on them.
In application issue submission
The first time I saw this happen was in one of the Windows 7 betas, they added feedback menus to all windows so that users could submit bug reports or feature requests from a relevant place. I think it would be useful for applications to have a feedback button on all of its major features so users can quickly file bugs and feature requests that can automatically be categorised based on UI elements. Combine this with the anonymous data gathering and it gives you an idea of priorities when fixing bugs or implementing new features. It could even be possible for users to view other users submitted issues for a feature allowing them to up vote the problem or even provide additional feedback to the issue. It would also be possible to give feedback to the user on the status of their issue via the application itself. This kind of system brings the support system right into the application itself rather than forcing people to find the application support somewhere else, it also gives a sense of good customer support to the user as they feel they have visibility as to if their issue is being addressed.
Application container
I know this kind of thing can in theory be done in .NET and I assume depending on security restrictions it could probably be done in other VM based languages. You could run your application in a container that recorded the state of the application, so basically stack traces and memory contents. This data could then be played back later while the application was attached to a debugger to see what the user did to create the issue and what state their application was in. Microsoft already provide such a container but licensing means it can’t be used in a shipping product. A less full blown equivalent could be a way of recording what buttons were pressed and when as well as values entered via the keyboard this would then allow you to recreate the application state rather than record it directly. There are obvious security and privacy concerns related to this kind of recording but it could be possible to implement it in such a way that the user could explicitly turn the feature on to help diagnose a problem.
Well that’s a short list of potential starting points to allow better more accurate issue capture in applications.
Re: Chess Timer
A friend recently posted about using a chess timer in software development. This is my argument against the conceptual need for it.
The main reason stated for the timer is to indicate when development has had to stop on a project due to needing external events to occur, those events could range from a decision being required to something being signed off to requiring a piece of information.
It is stated by the writer to his own admission that he is bad at estimating development timescales and I believe this is the problem here and why the timer is required.
If you can’t estimate your own timescales then how do you organise your workflow and the workflow of people around you? Time wasted on waiting for decisions can be massively reduced by knowing your timescales because if you know your timescales you understand the extent of the work you are doing and the key bottleneck points, if you understand them then you can make people aware of decisions that need to be made in advance to when you need them reducing any time waiting for things you require to continue.
This obviously won’t eradicate all wasted time, there will always be situations in the development cycle where unforeseen problems will occur but even these can be massively reduced with correct specification of the work to be done and by keeping a tight iterative process where problems from the previous iteration can be addressed while another iteration is being implemented.
In conclusion I think the timer isn’t required if time is spent at the specification phase to identify as many as the problem areas as possible. Development should then be done in tight focused iterations and most importantly good time estimates are given so that all people in the development are aware of when information is required.
Game graphics
Well I’m now a registered Apple developer and can run my code on devices, even with this advancement it appears the game won’t be done before I’m 30. Having two kids is a lot more time consuming than I originally thought and being ill for around a month on or off hasn’t helped things either.
In the grand scheme of things that doesn’t matter one bit, my 30th was always really a soft target. The most important thing is to try and produce the best possible product I can and it’ll be the only way I’ll make any kind of success of this business. Just doing it to get something into the app store isn’t the attitude to take.
This brings me on to the subject of graphics. Even though my game is primarily 2D I’ve decided I will create the majority of the graphics in 3D. I’ve chosen to use Blender at the moment but I may look what other offerings are around although I suspect that most other software have high licence fees for commercial use.
Hopefully over the coming weeks/months I will start to create the overall look and feel of the game and will be able to post some graphics and maybe video as the game begins to evolve.
The Game
As I mentioned a couple posts back I am attempting to make my first iOS game before I’m 30. So far things are going pretty well, I’m nearly reaching a point where the first phase of game code is complete. Once this is done I will effectively have a product that is functionality what I want.
Next I’ve got to move onto giving the game a consistant look and feel and start developing the actual graphics, at the moment I’m using place holds for everything and it intentionally looks awful. Once the first lot of real graphics are complete I’m hoping that will kick of a slowly reducing cycle of tweaking code and tweaking look and feel until I’m eventually happy with everything and am ready to release the game.
The issue I have now is if I will actually be able to get this all done by my 30th and at the moment I think it will be close but will probably fall just past my birthday, what with climbing, work and my second child arriving soon my free time is slowly shrinking but I am determined that this game will get finished as close to my 30th as possible.
Once I get the first lot of real graphics up and running I’ll start posting some screen shots of how things are going and maybe even some video.
Goals
It’s nice to have goals in life, something to aim for. I’ve been noting down various things I want to do for some time now but have never really got around to doing any of them, so I decided to pick 3-4 goals off my list and see if I can achieve them this year. So without further a do in no particular order here are the goals I’ve picked for myself.
- Write a game for the iOS platform and get it into the app store before I’m 30.
- Create a website from scratch using some new and up to date web technologies.
- Climb a V5 before the end of June and climb a V7 before the end of the year.
So there are the goals, now I’ve just got to achieve them.
The big 30 seems to be my scary age and for whatever reason I felt I needed to have some kind of personal achievement under my belt before I get there. I love games and I also love my iPhone so I thought what better way to achieve a goal then to make a game for my iPhone and most importantly get it onto the app store. While it would be great for it to become an over night success and allow me to retire on a desert island somewhere I very much doubt that will happen and have my mind firmly in reality, a few sales would be good enough for me, just to know that some people out there have bought and enjoy something that is 100% mine is good enough. I’ve already started writing the game and so far it’s actually starting to come together OK, I’ve still got lots to do but I feel I’ve managed to learn enough Objective-C and Cocos2D to be able to get past that beginning stage when you’re learning a new language or framework, less time looking at documentation and more time creating. Once I have anything even slightly impressive to show I’ll get it posted on here for all to see.
Before I went to University I used to do a bit of web design here and there for local companies, it was just as the Internet was becoming more widely available in homes across the UK (good old 28.8) and web pages were mainly HTML and some images. Well since then the Internet has become a different place and I’ve become out of touch with the languages and techniques used to make web sites. While I don’t really need to learn any of these for the job I do, I feel that I’m ignoring a huge amazingly interesting media. Therefore I decided some time back that I wanted to get back in touch with some web goodness. I already have an idea for a site I’m going to make, it won’t be huge but it will allow me to experiment with a whole lot of front end web technologies as well as having a play with some cloud based services. I will be doing the back end for the site using the Python API for google app engine, I’ve never written anything in Python before so I thought it would be a fun experience and opportunity to learn something new. At the moment I believe the front end will be a combo of HTML, CSS and JQuery/Javascript with some form of AJAX to get the data from the back end. The domain name and everything else is sorted and now I’ve just got to get coding. I’ll probably be keeping this one under wraps until it’s ready to launch with maybe some progress updates as I go. Might even do a retrospective post once I’ve finished.
I’ve been rock climbing (bouldering to be more precise) since late October last year and it has become somewhat of an addiction and obsession. For those who know anything about bouldering I’m currently climbing at around V2 with a few V3 climbs under my belt. I would like to be climbing V5 by the end of June, no particular reason for the end of June just a time I chose to give me a target. I’m not currently sure if I’ll get this one as I’ve got to gain a lot of strength and technique to be able to achieve it but it’s always good to have something to work towards. I’m going to be changing my training from two days a week to three and I’ve purchased a recommended book on technique and training, so hopefully all those things combined will bring me towards my goal. If I managed to achieve V5 by the end of June then the next target is V7 by the end of the year, this will be a hard one as from seeing other people climb and generally looking at the routes I’d say there are some reasonable steps in ability between certain grades, V3 seems to be the first step (at least for me) then V5 then V7, so I’ll have to really push myself to get there by the end of the year, we’ll just have to see how it goes.
iPhone, Android, Windows Phone 7 developer argument
I’ve been seeing a lot of arguments flying around blogs and twitter just lately about which mobile platform is best to develop for and how supposedly certain platforms are destine to fail so all developers should jump ship and move from platform X to platform Y.
I’ve just started doing some iOS development myself and I’m already pretty convinced that once I manage to finish my project I will probably have a go at porting it to another platform. You know why? Because regardless of how good I think platform X or Y are or for that matter how bad they are there are, people out there using it and not just a few people a significant number of people.
In my mind apps be they native to a platform or web based are all about spreading an idea to as many people as possible implemented in the best way possible. As a business it is surely dangerous to ignore a platform due to your own personal perception of it. I can understand why a business might not release on every platform because it takes time and resource to port these applications (web based ones maybe not so much), but I think it would be wrong to ignore them through some kind of loyalty to a particular brand.
Over the years I’ve developed in lots of different languages on many platforms. I’ve made various APIs for customers to use and have had to port them over to various languages and platforms and regardless of my views on those platforms the point is that customer is using it, and they probably have very good reason to be using it.
As developers I don’t think we should be taking sides, brand loyalty and being a fan boy is for the end customer, our beliefs as a customer and as a developer should be kept separate and as we develop our software we should be more bothered about how many people we can spread our idea to than what we think about the platform we are developing on. I know it can be hard when the tools are useless and the platform feels clunky but the point is someone out there loves it and uses it everyday and they want to be part of your idea and maybe as developers we’re being a little selfish if we don’t let them in.
Helpful software errors
As software engineers do we think about software errors enough?
When I say software errors I’m not talking bugs or crashes, I’m talking about the everyday errors that occur because a user has done something wrong or their system is incorrectly configured. Often you’ll find that when writing software you automatically write the code in such a way to best accomodate things when they are going right and sometimes not as much care and consideration is taken when handling the errors that could occur.
My example of this will be MS SQL Server Management Studio. I’ve been developing software for many years and apart from a few courses at university I’ve pretty much managed to avoid any database work. Well a few months ago a project I was working on required me to start playing about with SQL server and this is really the inspiration for this article.
I can’t entirely remember what it was that I was trying to setup but I remember it being done mostly in SQL Server Management Studio and nearly every time there was an error or an issue I was presented with essentially what is a .NET stack trace. Now some of these stack traces were useful as the exceptions that had caused them had useful descriptive information included in them, but others were completely useless in assisting me with working out what had gone wrong. Usually it involved a few minutes googling the issue and I would be able to find the answer which was usually located in the MS Technet documentation. The thing is if they know what the cause is and they know how to solve it then why not include it in the application?
I realise that in large tools like SQL Server Management Studio that lots of different error states could occur and including all that documentation as part of a standard install would make it massive. At the same time sometimes you are provided with a link to take you to more information, I find that 9 times out of 10 that link takes you to a page that claims there is no more information on the error you are having yet searching the site manually usually presents the answer you are looking for.
With complexity comes errors so I believe the route to at least begin to alleviate the above problems would be to attempt to reduce complexity in products or at least shield it from the user. Secondly trying to better document common issues that could occur so that they can be solved more easily, and thirdly include systems within the application that can detect error states and explain the potential problems to the user before they become real issues.
While software now is 100 times more user-friendly than what it was 10 years ago, it still has a way to go and maybe that would be helped if as software engineers we started to spend a bit more time thinking about what happens when things go wrong in our applications.
Jack of all trades or master of one?
In software development is it better to be a Jack of all trades or a master of one?
For years I’ve always thought that having a broad set of software development skills is better than being specialised in one particular language or technology, however now I’m starting to question that.
I started doing what I would call proper software development when I started my university course (all those many years ago), up until that point I’d played around with various bits and bobs but never really made anything worth while. Back then everything was new and exciting and learning as much as possible about as many technologies as possible was the thing to do. Over a couple of years I covered many different languages and various associated libraries and ended up coming out of university with a love of C/C++.
Since I’ve been working I’ve encountered many other languages and libraries and I’ve noticed that I spend more and more time learning the latest and greatest of these libraries and languages to keep up with technology. I’ve also noticed more and more specialists appearing and a greater tendency for people to pick a technology and stick with it come hell or high water.
This is why I’m starting to question if it is better to know a little of everything that’s out there or if it’s better to concentrate on one particular area. For example what do employers prefer to see? I interview people every so often as part of my job and I must say that my preference used to be towards people who had a reasonable base understanding in a single language who have then dabbled in several others, however as the company I work for grows my attitude has changed and I now feel that I would prefer people who are more focused in particular areas as it’s only when you start getting in-depth into a technology that you learn its quirks, the kind of things that have a lesser experienced developer debugging problems for hours when in reality there isn’t actually a problem but it’s just a quirk of the framework or because it’s being used in a way that wasn’t intended and it doesn’t want to play ball.
I suppose what I’m saying in many ways is that with languages and libraries expanding at an exponential rate it’s starting to get more and more difficult to know a bit of everything to the level where it can be useful in a real world production environment, where as someone who has dedicated all their time to a specific technology is much more likely to be useful in those difficult situations that can occur and would be more likely to be aware of the issues in the first place and make sure they don’t occur.
While I’m starting to see more advantages to specialising in a single technology I can also see a lot of risks involved. It’s all well and good being an expert in a technology but if no one is employing in that field it’s not going to be overly useful, also there is the issue of flooding the market with expert developers in a single language making employment difficult to find if you chose that technology. You could also potentially lose flexibility by ignoring other technologies or take projects down long and painful routes that could have been solved in a better way had a more appropriate technology been used.
I suppose what might be best is to have maybe two/three technologies as your expertise and then a good overview of what else is available. Maybe it should be Jack of all trades master of some. Reminds me of something a university lecturer once told me. “The difference between a developer and an engineer is that a developer forces it to work and an engineer picks a technology that allows it to work elegantly”.
Stackoverflow the RPG of internet forums
I’m sure by now everyone has heard of and probably has used Stackoverflow, for those that haven’t it’s a forum style site where people ask software development related questions and more usually than not get actual useful answers. The main key to this is the community driven system that basically means that bad answers (and questions) get put to the bottom of the pile while the goodness floats to the top.
While having a browse around the site a few days ago it got me thinking about how their reputation system works and how in many ways the entire site feels like a big RPG where the point of the game is to help people out.
For an explanation of the reputation system and the awards you can get go the the FAQ section of the site and it lists everything in detail. Basically you can gain reputation points for asking good quality questions or giving good quality answers so this is essentially the same as gaining experience points in an RPG. Once you have a certain level of reputation you are allowed to do additional things on the site and new options are opened up to you, much like leveling up in an RPG. There are even additional achievements for performing certain tasks. Just to finish it off you can also trade some of your reputation points to encourage people to answer your questions.
The above is probably something everyone has already observed and I’m just being a bit late to the game, but I love the way that by intentionally or unintentionally making the site like a game they seem to have brought the best out in people. In the little amount of time I’ve been properly using the site I have to say I hardly ever see any spam or flame wars or me too posts, pretty much all of the content is of a decent quality and I think to a degree it’s because of the RPG game nature of the site. People love to grow a character, gain experience and unlock new adventures and features and more often than not they are very protective over that character and generally won’t do anything to endanger it, seems much the same on stackoverflow, people love to gain reputation points to the degree where sometimes it can be a race to see who can provide a high quality answer to a question first. It would be interesting to know if there were any statistics out there about how quickly questions get answered and those answers get accepted.



1 comment