The .NET development landscape is awash with some fantastic tools. Visual Studio itself includes a wide range of powerful tools but there are some great free and commercial third-party tools available, including some from Microsoft themselves. One I added to my toolchain some time ago is Microsoft's StyleCop, a source code analysis tool which helps enforce coding conventions. I have it enabled by default on every project I work on and I have found it very valuable in improving my own coding consistency. Like many of these tools it takes a bit of getting used to and gives you all sorts of grief when you first enable it, but once you get used to it and configure it to your way of working it just another unobtrusive, but powerful, part of the build process.
The only criticism I have of StyleCop is that it is very much a passive tool and doesn't give you any feedback until you force it to run. I have it enabled as part of the build process so it gives me feedback every time I compile. For years I have been a user and great fan of ReSharper and I love the dynamic assistance that gives me whilst I'm entering code. ReSharper supports third-party plugins but there has never really been a wealth of plugins for it.
Yesterday I was delighted to discover that Conchango have produced a StyleCop ReSharper plugin which causes ReSharper to dynamically apply StyleCop rules to your code as you type. As soon as you enable it you get little red wigglies (like the Word spellchecker) appearing under your code to warn you of StyleCop rule violations and because it is dynamic you can see and fix these before you even get as far as compiling the code. It's brilliant, I love it!!! In fact I would happily pay the licence fee for ReSharper just to be able to use this feature.
AgentJohnson is another neat little ReSharper plugin. I have to admit that I don't use many of it's feature but the context action which automatically adds explicit exception handlers for each exception that a method can throw is neat and definitely a time-saver.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
When I get the chance I listen to a broad range of IT-related podcasts. Just recently I've been catching up on some of Scott Hanselman's Hanselminutes podcasts. In one of the recent episodes I was intrigued to hear about User Voice, an online service which allows website owners to quickly and easily gather feedback and comments from users via a cool little widget that you deploy on your site (see image below). Users can post new suggestions and comments or rate existing comments posted by other users, allowing you to quickly gain a feel for the issues that are important to your users. Scott is using User Voice on his BabySmash site to get feedback on the software from users, but you could user User Voice to gather feedback about anything.
I was so impressed with User Voice that I went right ahead and set up an account for Codefounders. You'll now find the green feedback tab on the righthand side of the Codefounders website. My intention is for users to be able to leave feature suggestions and comments about Powerdown, but you can also use it to leave us general comments about our website, or any other aspect of Codefounders you feel moved to comment on. You can also view and post feedback via the Codefounders User Voice site.
I'm currently working on a website redesign project for one of our clients and they want to gather some feedback from their users regarding what they want from the new site. I've persuaded our client to put a User Voice feedback widget on their site so they can get ideas directly form users whilst they are right there visiting their site and they are fresh in their minds. I'm not sure how successful it will prove to be in getting the right sort of input from users but there's no doubting that User Voice is a fantastic idea!
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
I learnt yesterday that Lutz Roeder, who produces the Reflector tool for .NET, has decided that it is time to move on to other things and is ceasing further development on Reflector. If you're a serious .NET developer then you'll already know about Reflector; it is one of those must-have tools for .NET development and one that I use on an almost daily basis. Lutz has done an amazing job in producing and supporting this tool and making it freely available to the developer community for the last eight years or so and I'm sure many other .NET developers would join me in thanking him for his efforts.
However its not all bad news and this is not the end of the line for Reflector. Quite the opposite in fact. Lutz has reached an agreement with Redgate and they are going to support and develop Reflector from this point forward. This is fantastic news! I have mentioned Redgate several times on this blog before because they produce some really fantastic tools for .NET and SQL development and support the invaluable PInvoke wiki and PInvoke add-in for Visual Studio. I have every confidence that they will take Reflector forward to make it an even better and more useful tool and they have promised to continue making a free version available to developers, which is wonderful news.
In case you haven't used Reflector before, you can download it from the Redgate Reflector site. Reflector supports a plug-in architecture and there are a whole host of weird, wacky and downright useful plugins that you can also download for free.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
I came across an interesting post on Green Blog yesterday which postulated that the reason why most people don't care about the environment is because they don't care about themselves. It went on to suggest that they also don't take responsibility for making themselves happy, continuing in dead-end jobs and not pursuing their dreams, and that how they treat the planet is a mirror for how they treat themselves.
This post really resonated with me, particularly as I'd just finished reading an article in the current issue of Permaculture magazine which advanced similar sentiments, arguing that most people stick with jobs that don't suit them whilst their real passions have become hobbies that they do in their spare time. The article went on to suggest that if more people gave up the dead end jobs and concentrated on pursuing their passions this would drastically increase their 'contribution footprint', benefiting society and helping it address some of the current challenges, including the environmental ones. It doesn't matter what their passion and contribution is, the fact that they are passionate about it and motivated to pursue it can only help to move society forward.
Now this might all sound like new-age clap-trap but it does resonate with a number of the issues I've been pondering over the last few years. The reason I started Codefounders was precisely to enable my to follow my passion - I love writing software - to help escape a job that was no longer fulfilling me and, to a large extent, sapping my will to experience life to the full. I'm still not quite there yet and modesty prevents me claiming that my efforts have made society one iota better, but for some reason I find these two articles really appealing. I'm heading off on vacation soon so maybe a couple of weeks of relaxation will help me sort out some of my future plans and help me plot a more fulfilling future that enables me to follow my passions more.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
For many years now software companies have been engaged in the practice of dogfooding, actively using their own products to convey their confidence in them. I was interested to read yesterday that the UK Government is dogfooding its own IT carbon reduction strategies and aiming to become the first government in the world to make its computer systems carbon neutral (Whitehall bid to cut IT emissions). This is indeed a laudable aim, though at this point in time it applies only to the Department for the Environment, Food and Rural Affairs (DEFRA) and not the whole of the government but it is an excellent move in the right direction.
Apparently the move to a carbon neutral computing resource is to be achieved through a combination of offsetting, switching off unused computers and ensuring that servers don't remain idle overnight. According to the sources, UK government computer systems account for a whopping 20% of the total government carbon emissions which is probably a far greater proportion than for most other computing users. Turning off idle computers has a significant role to play in this strategy and it is reckoned that this will save 117,500 tonnes of CO2 each year, equivalent to removing 40,000 cars from the road. Not only is this good for the environment it should also be good for the taxpayer as there will be a similar significant reduction in the government's energy bill.
DEFRA haven't approached us with regard to using our Powerdown energy saving software as part of this strategy. My understanding is that they have invested heavily in new networking hardware to allow them to run a Wake-On-LAN based solution offered by one of our competitors. We think that Powerdown is a much more reliable and cost effective solution as it does not rely on Wake-On-LAN, which can be notoriously flaky, and will even work when computers are disconnected from the network. If the government are interested in using Powerdown we would be more than happy to talk to them.
And yes, Codefounders does eat its own dogfood too. We run the latest production and development builds of Powerdown on all of our client computers, both at home and in the office. We also recently published an article describing some measurements that were taken in the field on a customer's system to show how effective Powerdown can be in saving energy and reducing carbon emissions. Check out the article on our site for the full results and details of how we conducted the measurements.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
I've spent most of my day today trying to copy some files from one location to another using MSBuild. This is something I've done plenty of times before, but in this case I was trying to do something other than just copy an entire directory of files. I'll be the first to admit to being a bit thick sometimes, but MSBuild really does confuse me sometimes and I guess today was one of those times. MSBuild is certainly powerful but I find some of the operations a little counter-intuitive; I think it has something to do with my (mis)understanding of when/how some of the expression in the build file get evaluated.
The problem I was trying to address in this case was to delete all the files and subdirectories from the destination directory except for a specific subset of files/directories, and then copy a subset of files from the source directory to the destination directory. The image below, which shows the directory hierarchy in the destination directory, illustrates the scenario better
I needed to delete all the files in all the directories and subdirectories of the destination except for the files in the B2 directory. I then needed to delete all the subdirectories of the destination except for B and B2.
Whilst this is easy to accomplish with a few lines of C#, it is substantially more tricky with MSBuild and I couldn't make it work with a single list of files. One of the quirks of MSBuild is that to create a list of directories you have to start with a list of files and extract the directory metadata from each list item to create the list of directories, but if a directory has more than one file then it will appear in the directory list multiple times. If you set the <RemoveDir> task to fail on errors then it will cause the build to stop whenever it tries to remove a directory that it has already removed, which is always the case if the directory appears in the list more than once. Setting the task to continue on error seems like a bit of a nasty hack. Surely there must be a better way to define a set of directories which eliminates duplicates, but if there is I don't know what it is.
Anyway, back to the plot... Obtaining a list of all the files except those in the B2 directory is easily achieved by creating an item group and judiciously using the Exclude attribute to ignore the files in B2. But I also need a list of directories which have to be deleted. Using the file list metadata to create the directory list doesn't work because the directory B always appears in the list and the behaviour of <RemoveDir> is to recursively remove all directories. This causes B, B2 and the files I'm trying to preserve to be removed from the destination. Definitely not the outcome I was looking for. I haven't managed to solve the problem fully yet but I have a solution which works well enough for now. What I really need is a custom MSBuild task which does not delete directories recursively; why on earth did the MSBuild team not add that as a conditional switch?!
In total I reckon I've spent about 6 hours trying to MSBuild to copy my files and I wish it didn't have to be so hard. There was one bright point to the day though when I found that Partho P Das has created a freely available MSBuild Visual Debugger tool which is available on CodePlex. Admittedly it's not quite as fully featured as Visual Studio and is obviously a work in progress but it's a great little tool which lets you set breakpoints in MSBuild files and inspect properties, items and the call stack. My productivity in trying to solve this problem went up dramatically once I found Partho's tool. It's much quicker running and debugging a build file through his tool than it is through Visual Studio. If you find yourself working on MSBuild files then I wholeheartedly recommend you get hold of a copy of it as it will make your life significantly easier.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
Modern business, at least in the Western economies, is predicated on continued economic growth and returns for shareholders which often results in the the ability to generate profits being viewed as the only indicator of success. I may be odd, but I've never really subscribed to this point of view. Aside from the fact that I don't see how you can have infinite growth in a system bounded by a finite availability of resources, I think there are many more ways in which businesses can be perceived to be successful and valuable contributors to society and the lives of their employees.
I started musing on these ideas again today when I met with the owner of a successful local business. He was justifiably proud that he had grown the business from nothing to a £130 million+ annual turnover in under two decades, and we got talking about various issues. He recounted a story to me from his own business experience. He had been visiting a customer with a junior member of his sales team to attempt to close a deal with a potential customer. The customer wanted some bespoke work undertaken and, on the way to the meeting, the business owner and salesman had discussed how much it would realistically cost to undertake the work. They estimated £4,000 to £5,000.
One of the business owner's rules is never to answer the 'how much will it cost' question which most customers are naturally keen on asking, preferring to charge as much as he can reasonably get away with. So he was taken aback in the meeting when, asked how much the work would cost, the salesman replied 'Oh, £4,000 to £5,000'. Fortunately (from the business owner's viewpoint) the customer misheard the salesman and replied '£45,000? Oh we had budgeted £50,000 so that's ok'. The salesman quickly recovered his slip and commented that they would try to do the work for less than £45,000 if at all possible. A couple of days after the meeting the salesman contacted the company with an estimate for £38,000 and indicated that they were undertaking the work at an attractively low rate in the hope that further work might follow. The customer accepted the estimate, delighted to be getting the work done at what he perceived to be an attractive price and below his budget of £50,000. He was subsequently pleased with the work that was performed and placed another two orders at £38,000 each.
So what's wrong with this scenario? Nothing, apart from the fact that the business owner exploited the customer's misperception, lied about the attractive rate he was giving, charged 8 times over the odds and further compounded the error by doing it all over again on two further occasions. This business owner behaved no differently than 99% of businessmen whose yardstick of success is their profits and he acted in the best interest of maximising his performance against his success metric. In all other respects he is a decent, fair-minded human being but I believe this kind of business behaviour to be fundamentally unethical.
I have always tried to operate Codefounders as an ethical, fair minded business which acts with its customers best interests at heart and our aim has never been to generate maximum profits and returns for our shareholders. Had I been the business owner in the scenario above I would have corrected the customers mishearing and quoted the real price we expected to charge for the work. Taking the bigger picture, we have no idea of how the customer would have used the money saved if he had been charged the 'correct' price; it may just have helped boost his own profits or he may have used it to reward his staff in some way for all their hard work during the year. He may have used it to sponsor the local football team or help buy the play equipment which the local school could not otherwise afford.
To my mind the business which gives back to the community is significantly more successful than one which makes its shareholders a little bit richer (and yes, I know that all our pension schemes make their money from shareholdings in other companies, but that is a topic for some other time). Under UK law I believe that companies have a duty to maximise their returns to shareholders. I own 80+% of Codefounders and as the majority shareholder my direction for the company has always been to treat our customers fairly, make sufficient money to cover our costs, pay our staff a wage that affords them a comfortable standard of living and provide an enjoyable and motivational working environment. Hopefully that is your experience of our company if ever you do business with us. If we make excess income then I see no better way to use it than for the benefit of the wider community in which we operate.
The profit-focused mindset of Western businesses is very much an 'I'm alright Jack' mentality. The world faces a huge range of environmental and social challenges in the coming decades and the solutions to these will require much more collaborative and cooperative behaviours. Perhaps if businesses take the lead and focus less on their own financial success metrics and consider themselves successful if they make a positive contribution to society in others way we will beginning to move towards a community that can respond to those challenges.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
I finally got around to downloading and installing Firefox 3 today and on first inspection it does some to have a better look and feel and some nice improvement over version 2.
One thing I wasn't impressed with though was the installation process. Firefox uses a typical installation wizard but I was a little miffed to get to the final step before installation began to find a message indicating that Firefox was going to be made the default browser. Nowhere in the wizard did it give me the option of selecting whether or not I actually wanted Firefox to be the default browser, it just kind of made that decision for me and there was no option I could (de)select to tell it otherwise.
Now I know this isn't a life-and-death issue, particularly as I can always reset my choice of default browser after installation but it is an irksome irritation. I do quite a bit of work on web-based projects and I tend to install lots of browsers on my main development machine so that I can check that the web user interfaces I build work properly in all the major browsers. It gets to be a real pain in the butt if all the browsers continually engage in macho jockeying to be the top browser each time I upgrade one of them. So if any of the browser devs out there read this, please please please put an option in your installation routine that allows me to decide whether I want your browser to be my default.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
It's half term holidays which is giving me a break from my normally hectic schedule for some much needed family time. It's also a good opportunity to catch up on some reading and I've just finished reading Steve McConnell's Professional Software Development which has been on my reading list for some time. It's a very good book which makes an excellent argument for software engineering adopting the same professional ethos, behaviours and techniques as other branches of engineering. I fully intend to make my software engineering students read it and may make it the basis of one of my courses.
McConnell's argument is compelling but I don't think the state of software engineering education in UK universities is quite as bad as he seems to suggest that it is in the US. I fully support the call for professional qualification for software engineers but this raises some concerns for me with regard to the UK's professional accreditation body, the British Computer Society.
I have never been a member of the BCS (I came to software engineering from an electronic engineering background and gained my professional qualifications from the IET, a more traditional and longer established professional body which also represents the software industry as part of its remit). McConnell argues for a period of practice after graduation before professional status is attained; this is certainly the route I had to follow and it made me a better engineer. I have had dealings with the BCS in my professional capacity over the years and they have always struck me as being too keen to award professional qualifications without the need for a significant period of qualifying practice. As a result I sometimes get the feeling that they don't always act with the best interests of the public perception of the profession at heart.
Don't get me wrong, I fully support them in their role as representatives of professional software engineers in the UK but if they were to follow the more traditional qualification route, as espoused by McConnell , I think this would give UK employers greater faith in the professional qualification, bring bigger benefits to software companies and raise public confidence in, and awareness of, software development as a true engineering endeavour. It would be good to see them championing the kind of structured professional training and development that McConnell describes in his book.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
Not in the environmental sense unfortunately but in the literal sense.
Why so? I had reason to be doing a lot of web surfing yesterday and couldn't help noticing how many of the sites had logos, buttons, graphics and images in various shades of green. There has been a lot of backlash against companies overplaying their green credentials recently (so called greenwashing). Perhaps what we're now seeing is an outbreak of subliminal greenwashing?
At least the world is literally going green in a different sense as all the trees have finally burst into life and England's pleasant land is once again a vibrant and refreshing green. I love this time of year!
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
Around 7:50am today something unusual and noteworthy occurred. The issue of Peak Oil got an airing on Radio 4's Today programme. Many people are unaware of or unwilling to talk about Peak Oil, the point at which the world's oil supplies start dwindling and we have to start coping with the consequences of our entire Western lifestyles being supported almost entirely by oil. (Look around the room you are in now - can identify one object that in some way does not depend on oil for its creation or delivery to you? You might have to look hard). Admittedly the discussion on Radio 4 only introduced Peak Oil in the context of the current dramatic rise in fuel prices and not its wider context, but it is good to see the topic getting an airing.
According to the oil industry expert involved in the discussion we don't need to worry though as we're not going to run out of oil. That is a curious point of view and one that I find hard to defend. It takes millions of year to create oil from organic matter and, whilst it may be fair to assume that new oil is in the process of being created, we are using oil at an ever increasing rate which means that the current supply is effectively finite. The one sure thing about a finite resource is that if you continue to use it then it will run out at some point.
The oil industry analyst did have the courage to point out in the discussion that we currently have no credible alternative energy supply for powering our economies and that is a scary thought. To continue using up a finite resource without looking hard for alternatives smacks of bad housekeeping. Unless we start doing something to reduce our energy dependence now (which is why I create products like Powerdown) the consequences could be dire.
However the world after Peak Oil needn't be all doom and gloom. If you want a perspective on a happier and healthier future after Peak Oil and what can be done to reduce our energy dependency, take a look at Rob Hopkins' The Transition Handbook: From oil dependency to local resilience. I read this book recently, and a thoroughly optimistic read it is too. Rob argues for a reduction in energy dependency and a return to a more locally focused, decentralised and resilient economy. Living in a small rural area that still has some of that local focus I for one fully support that notion and can't wait to see Rob's vision come to fruition. Peak Oil might yet be the making of us.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
I am delighted to announce that we have today released an updated version of our Powerdown Energy Saving Software for Windows systems. Powerdown helps you reduce carbon emissions, minimise energy use and maximise cost savings by controlling the power state of individual computers. Idle computers are turned off or placed in a low power state and can be automatically restarted for maintenance or operational purposes.
Unlike competing solutions Powerdown does not rely on computers being connected to the network to achieve energy savings and it is also the only solution specifically designed with electrical safety and the needs of laptop users in mind. Powerdown can reduce IT energy consumption by up to 40% resulting in savings of up to £30 per PC per year and a typical payback period of less than 3 months.
This updated release offers greater reductions in energy use and carbon emissions for even greater financial savings. This release introduces the following features as well as a number of minor bug fixes and performance improvements.
centralised enforcement and optimisation of operating system power saving features allows Powerdown to automatically put computers to sleep when they are not required full Active Directory integration enables Powerdown to be automatically installed and easily configured in managed Windows domains Policy editing tool to simplify the creation and editing of Powerdown policy files Revised scheduling engine for improved handling of scheduled shutdowns and restarts With the introduction of this release Powerdown is now being made freely available to users with less than 10 computers and to educational institutions.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
One of my colleagues asked me today if I had any experience of installing Service Pack 1 on a 64-bit Vista machine. He is having great difficulty getting it to install; about half-way through the process the installation fails with a file permissions error. He's tried several fixes listed on the Microsoft web site but to no avail.
I had to admit that I have no experience of the 64-bit version of SP1 as I don't actually own any 64-bit Vista machines. I did suggest that he might like to try my foolproof method of curing all manner of Vista ills and it worked, so he was very pleased.
What's my foolproof way of curing Vista problems? Simple - run chkdsk and fix any errors it finds in the filesystem! I have noticed on a number of 32-bit machines that Vista is very bad for corrupting file information. I regularly encounter files that have no owners or ACL's associated with them, yet those files used to work fine. I don't know why it happens but maintaining file metadata integrity seems to be particularly problematic for Vista. Fortunately chkdsk cures the problem on almost every occasion so if you run into problems installing SP1 (or anything else for that matter) on Vista, you may wish to try this little trick first to see if it issues any problems caused by missing/incorrect file permissions.
del.ico.us |
Digg It |
Technorati |
StumbleUpon |
Furl |
reddit
More Posts
Next page »