Insightful, profound, generous, witty, genius; all words that might be used somewhere in this blog.
Wednesday, June 03, 2009
Publish and be spammed
Code review nowadays can be automated. Systems such as FX Cop and Style Cop will mercilessly tear your code apart and dispassionately explain how much of an idiot you are several times a day, if your software factory is running correctly that is.
How much of this automated code review is really useful though? Microsoft cite the need for uniformity in the code. Because they have such a huge code generating body of workers, the way code is laid out needs to be standardised, homogenised and sanitised for reasons of continuity within teams. but honestly, the rules can seem to be arbitrary on the one hand and just plain stupid on the other.
Mobile work forces can mean many diverse styles, where each coder is conscientiously doing what they think is best and still generating a confusing mish-mash of coding styles for the poor sod who comes after. This is why MS have produced these Machiavellian code checkers.
Working, as I do, in a company that has a large body of legacy code in many different technologies, coupled with a developer workforce who are just ordinary programmers with few aspirations to being the next Don Box, I see a huge amount of code that can only be characterised as absolutely bloody horrible! Given such standard of quality and quality of coder, how can I, as an architect, hope to bring this code into line with even the minimum of compliance to what would be considered as acceptable for the crew in Building 42, Microsoft Way, Redmond?
My conclusion is that sadly, the people that "manage" said body of code have a vested interest in defending the stuff because many of them wrote it. Secondly, the will to change must be coupled with the acceptance that something needs fixing and so, if externally, your architecture doesn't seem to be teetering on the brink of the omni-flush toilet, then the budget is rarely available to re-write the stuff. Budgets are always available however to maintain the awful rubbish for as long as it functions even partially.
So. What's the conclusion you may ask yourself? Well, software is politics because its about egos. People believe that their solutions, however nasty are the right way and elegant and good. Politics is a human condition and someone has to point a finger somewhere.
On the other hand, computers are next to gods in our society. They are always right and they know everything worth knowing, or at least have access to it, so, I have come to the conclusion that if you want code that is readable or maintains the minimum standards, then you should get FX Cop and Style Cop tied securely into your TFS build process and spam everyone who checks in code with all 23,000 warnings a day.
This way, you can sit smugly by in the knowlege that the rules these programs apply are despotic, uneccesary and often idiotic but, when the manager who wrote said crap moans about the time it takes to add a simple function to the code you can put your hand on your heart and say; "Sorry, it's not me, it's the software factory rules. We can't check in till the warnings are fixed."
Monday, June 01, 2009
That mashup called life.
This weekend I have been to see a band, The Enid, in the UK who have essentially been revitalized via the Internet I have used an "External Brain" in the form of Evernote to remember and organise my thoughts and sights into a searchable database. I have used my iPhone and its Internet connection for instant answers. Once again I have used a mixture of Microsoft, Apple and open source technologies to enable me to be connected 24 hours a day without having to carry a laptop or a big bag of electronic gizmos
When I drove from place to place I used a GPS for navigation and, more importantly, to avoid traffic and to find alternative routes. Finally, I think I had the most fun experience I have had in, well, decades I suppose when I danced the night away in a silent disco at the Wychwood Festival near Cheltenham in the UK. For those of you that have never seen one, a silent disco is one in which the revellers are all equipped with headsets that can receive one of several channels of music that can be as loud as one desires but does not annoy the neighours. When you remove the headset you are returned to a room containing perhaps a thousand people and a low hum of conversation punctuated by the occasional snatches of songs sung by the crowd. In any case, the deafening thump of base and ear splitting noise that has made the disco or club a health hazard is replaced by pure participatory fun and, who would have guessed, conversation.
As I live this technologically enabled existence I can truly say that computers, the Internet and the things which some people revile as a waste of time and which pollutes the human experience can be, and often is demonstrably a boon and a blessing.
Tuesday, April 28, 2009
Can Silverlight save the world?
You see, traditional internet systems, web pages and the like, are a "projected user interface" that really exists on the server and are constantly refreshed whenever we select another link or move to another part of the web application. If we think about the operations taking place here, we see that the server is sending out masses of data that is often duplicated. A web-page refresh from a dynamic site for example, sends the whole HTML data stream to the client each time. A click of the refresh button may not seem expensive but when we factor in the cost of transporting that information across thousands of miles of cable, the electrical burden becomes significant.
So, why might Silverlight save the world? Well, by making a large percentage of the intelligence of a web application reside on the client PC, the data burden is reduced over the network. Rather than re-sending all the HTML information for the pages the data is reduced to the necessary information such as data from web-services. Less data means less current to the data centers and less power for the network infrastructure.
Monday, April 13, 2009
A weekend without computers (except iPhones)
All three systems have performed well and I have identified some improvements to the system which will be implemented as soon as possible. First I am going to put the display of the web-pages used by the iPhone client into the web client component rather than call out to Safari. This will enable the client to remain up for longer.
I also need to put an image capture button on the beacon dropper so that users can add a snap to the beacon.
Interestingly again this week, even though I took a laptop with me, I didn't use it except to watch a DVD on Saturday evening. All of our out-and-about computing needs were serviced by the iPhones, including one little bug-fix that I did at a distance by driving my PC here via Logmein running on the iPhone.
Before I left I tried setting up ad-hoc distribution via an iTunes account on a PC. I packages the provisioning profile and the .app install file and mailed it to my wife who was able to install it to the iPhone using drag and drop via the iTunes account she uses on her PC. This means that I can indeed distribute this to up to 100 machines for beta test purposes.
If you know anyone who would like to participate in the beta test send mail to beta@trakkus.com where I will make all the necessary arrangements.
Friday, April 10, 2009
PC vs Mac
I think I can say with all honesty that I have been dispassionate and open in all of my attitudes towards platform partisanship. It was nothing more than an accident of fate that I began programming for Windows. Actually, I bought my first PC in 1985 to do cross platform development using z80 assembler running on Spectrum computers. In those days Windows didn't even exist and Microsoft was just a small company in the USA.
My first project as an independent consultant was on a mouse for that Spectrum system which I prototyped using an Apple mouse. I had seen Mac Paint and loved it so much I wanted to do something myself, just to see how and the AMX mouse was born from that.
Later, I worked in the printing industry that used Macintosh systems for page makeup but chose PC hardware instead because of cost concerns when we had to create hardware for the systems I was designing.
Throughout my professional life I have always been seen as a PC oriented person and have often had discussions with techno-bigots as to why I should align myself with the evil empire or how Macs were so easy and friendly to use. I have never subscribed to these ideas though, mainly because really, deep down, I am an embedded systems designer oriented towards hardware and I don’t give a monkeys nuts for such sentiments.
As you know, if you read my blog, my experiences recently have trended towards Apple development for my pet Trakkus project which I have used as a vehicle to enable me to keep up with the broad mix of technologies that my aging middle aged brain needs to absorb. I'll say up front that I really like my Mac. It’s a great little system and has a style of UI which is both simple and elegant. My requirements however do not rest with the need to look at my photos or browse the internet or read my mail.
I am currently typing on my PC while watching my Mac-Mini spinning its wheels in a shutdown sequence which has lasted fifteen minutes and seems to have no sign of ending soon. This is something I was assured by Mac-ites that never happened on a Mac and that Windows was the only system that would waste your time with such unnecessary rubbish.
I have also just wasted my entire morning trying to get my provisioning profiles for Trakkus updated so that I can distribute the software to some of my beta testers. Well, the view from the trenches is that it’s not easy, quick, simple or pleasant to work on Mac development. The development environment is positively stone-age in comparison to Visual Studio and the way that Apple contain and control every tiny aspect of things proprietary to apple is a huge barrier to adoption.
Of course, I intend to continue because I have a financial investment in this idea now and from my first tests I think that it could be a success. I think though that, after having done the research on the ground I now understand why Apple has such a small share of the market despite their obvious skills.
Apple’s adherence to an environment driven by lawyers, licenses, proprietary systems and manic protection of intellectual property has made an environment that is not easy to work in unless you are nothing more than a consumer. Microsoft’s attitude of enabling the developer to adopt their systems has made the process of development so easy that there is almost no second choice.
I can buy a PC from any one of several thousand vendors. I can only buy a Mac from Apple and at an inflated price in relation to the equivalent hardware in the IBM compatible world. My Mac Mini cost me a euro shy of five hundred and I just bought a well equipped ACER PC for my daughter with more memory, more hard-drive and a faster processor for a euro shy of three hundred just a week or so previously.
Seriously, Windows is a better environment, less constrained by legal idiocy, more productive, more accessible, cheaper, does not crash more often, does not take longer to shut down, takes a little longer to boot up – unless you’re running Windows 7 which is similar to the Mac, if not a wee bit faster- and wins hands down in my opinion.
To be fair, I love my iPhone. It is my most used piece of hardware ever. I like my Mac mini. It’s simple, elegant and fun to use. I think though, pragmatically, and as my tee-shirt currently reads; “I’m a PC”
Tuesday, April 07, 2009
Sneak peek..
To get a look at the system when its running simply hit this link too see a limited snapshot of my movements.
Please note that I have altered the values to protect my real position.
I still need beta testers for the system for a month or so and anyone who assists in this test will receive a complementary copy of the full version of the software.
Monday, April 06, 2009
Getting greater position accuracy from the iPhone
The CLLocation horizontalAccuracy setting is a double value that gives an estimated distance accuracy and there are some constants such as kCLLocationAccuracyHundredMeters or kCLLocationAccuracyTenMeters that you can compare the value with or just look at the value to see if it's within your desired accuracy.
If this horizontal accuracy is negative (invalid) or larger than you like, don't turn of the location manager yet. Leave it running and get a better reading.
Here's a snippet...
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
NSDate* eventDate = newLocation.timestamp;
NSTimeInterval howRecent = [eventDate timeIntervalSinceNow];
if (abs(howRecent) < 5.0)
{
if(!signbit(newLocation.horizontalAccuracy) && newLocation.horizontalAccuracy <= kCLLocationAccuracyHundredMeters)
{
[locationManager stopUpdatingLocation];
TUser *presentUser = [Singleton singleton].currentUser;
NSString *tlat = [NSString stringWithFormat:@"%+.6f",newLocation.coordinate.latitude];
NSString *tlong = [NSString stringWithFormat:@"%+.6f",newLocation.coordinate.longitude];
if(![tlat isEqualToString:presentUser.latitude] || ![tlong isEqualToString:presentUser.longitude])
{
presentUser.latitude = tlat;
presentUser.longitude = tlong;
[NSThread detachNewThreadSelector:@selector(submitLocation:) toTarget:self withObject:presentUser];
}
}
}
}
(hey, that's my first Cocoa code posting ;-) )
Trakkus tracked me.
I have an iPhone client that connects to services to report locations and to provide options such as chosing who is allowed to see where you are and to drop markers on the maps.
I have discovered that I can use an Apple application such as the iPod player or iTunes to listen to a podcast or some music and Trakkus will continue to run in the foreground and update positions.
This means that the system will indeed be useable for, say, my wife who may wish to see where I am on the way to or from work or for a parent to see where a child is, without having to reduce the functionality of the iPhone.
Sunday, April 05, 2009
Back for another round.
I was re-awarded Visual C# MVP again this month for 2009.
About time too!
Their site now has a set of extremely succinct videos on how to accomplish this task and what purpose the steps serve.
My test app for Trakkus is up and running and I am looking for iPhone owners to beta test it.
I cannot have an unlimited number of testers I have three spoken for already and so I would like a total of about 50 from various locations in the world.
If you have an iPhone 3G with the 2.2.1 operating system and an interest in testing a geolocation application then scootch over to http://www.trakkus.com and look at the details of the test.
I will only accept first comers and the application will be buggy ;-)
Friday, March 27, 2009
Mac from Windows?
The marketing approach of "Switch" and later "Get a Mac" that depicted Mac users as cool and trendy while the Windows user was a sad pocket-protector type had underlined that sentiment and served to widen the gap.
What has my overall experience been? Well, I will qualify my explanation with an anecdote. I bought my son a netbook for Christmas. An Acer Aspire One. My immediate reaction was to say that I would install Windows on it, upgrade the memory and fit it in with our internal IT system, I have a highly computer-dependent family. Well, on Christmas day, Robyn wanted, quite rightly, to play with his toy so he fired it up and ran the Linux that was pre-installed on the machine. 500 megs of memory and an 8 gig hard drive goes a long way on such a system and he discovered that it did absolutely everything he desired from a computer. If it floats your boat then that's what's cool.
My own out-of-the-box experience with the Mac was great. In ninteen minutes I had a machine that was ready to go and was usable for e-mail and browsing, it has a cool look and feel, its seriously quiet and if all I wanted to do was install some shop-bought software I would be quite happy. I discussed with Chrissy, my wife, that a simple little Mac would be all she needs and she agreed.
However, I don't need to run overpriced software or limit myself to mail and browsing. I tried the development environment and I don't need to go back to the days of Borland Turbo C++ thanks, I have still not managed to decipher the mysteries of the provisioning profile and I can say with all honesty and after having cracked that whip for a week or more that my experience so far of doing real computing work on a Mac sucks!
Would I "Switch"? ha ha, not on your nellie but wait, I am typing this out on a slim white keyboard with a "cmd" button ;-)
Last Will
It should read something like "Estimated time to end of infinity" and have a number like 6x10 ^ -75 % complete.
Then I can be dead in the same way as I live my life.
Looking at a progress bar that doesn't move!!!
Thursday, March 26, 2009
The Vogons are coming (AKA Apple iPhone provisioning profile)
I have been trying for a couple of days to put my new application on my iPhone to test it in the wild and I am finding the process of creating a provisioning profile, the fourteen certificates and the approval steps more than a little tiresome and I live in France so I should be used to gratuitously superfluous bureaucracy.
The docs read a bit like a Douglas Adams novel and I am currently in the process of making some compost out of one of the certificates to hide under my chair for a week. Unfortunately my grandmother is dead otherwise I could have simply fed her to the ravenous bugblatter beast of Traal which would, by all accounts, have simplified the process somewhat.
Ho-hum…
Tuesday, March 17, 2009
Damnit they're at it again!
Well, third time might be the charm. Maybe we should turn those radars outwards a bit more and buy new rolls of tinfoil to make hats with.
Tuesday, March 10, 2009
Its just a computer...
I have a project in mind which may be totally spurious but, if I'm lucky, might prove to be a commercial success despite my Portugese pal's misgivings.
Whatever the situation I find myself owning not only an iPhone but also a Mac Mini upon which I have just installed the iPhone developer kit.
When I suggested this to some of my friends, the sharp intakes of breath were heard more than once and some suggested I had been enticed to the Dark Side while others suggested that I had instead gone to the Light Side. Well, my philosophy is that it's just a computer. It is a processer, a bit of memory and despite all outward appearance is practically identical to what I am used to using since many years.
My only misgiving is that the whole project is a bit of a distraction for me because I am also well aware of the fact that I am behind the curve on the WPF and Silverlight front; two technologies that my graphical leanings have made dear to my heart, and that as suggested by Conan Doyle via the proxy of Sherlock Holmes, I think that brain capacity is a finite resource with which we must be organised and not fill up with unecessary information.
My current attitude to the whole Mac side of things, remembering that the original Macintosh inspired me to become a professional freelance programmer and hardware designer in the first place, and remembering that I have also owned an IMac in the past, is one of pragmatism. I need one with which to fulfil a specific need, ergo I have one. It's no more nor no less than another sink in which to pour my intellectual resources, such as they are, and I have long been agnostic about far more philosophically important things than a few logic gates in a pretty box.
I can report that the out of the box experience has been excellent. Nineteen minutes from unsealing the machine to having it live on my network and configured for my e-mail. I also like the fact that it is small and very very quiet; which is not a huge bonus considering that this room has five other PC systems humming away in it.
Looking at the Objective C++ development system I can see I have a lot of head scratching to do. I will just keep in mind that the Program Counter is advancing over the machine code in much the same way as I would expect it to.
Monday, March 02, 2009
We are truly SCREWED!
Well thank heavens for that!
This thing has the potential to totally destroy New York or London or Paris and has only just been discovered. Never mind the war on terror or piddling about with paltry concenes down here. Hows about spending a couple of billion on finding and deflecting these things?
You see, there's no excuse anymore for the idiot story that it's too expensive or not high enough priority. For an idiotic reason of a few fat-cat bankers lining their pockets, governments have the ability to discover a way to authorise trillions of Dollars or Pounds or Euros of -YOUR- money so that the bankers can continue to jilk you out of interest and charge you for spending your own money.
It won't be long before a rock half a mile wide lands in the sea just off Greenland.
Wednesday, February 25, 2009
Open source rears it's ugly head
I will say up front that I use open source software. I have contributed to it when I had nothing better to do and I am sure there is a place for it in technology but; and it's a big but, open source can never work for massive public services, large enterprises or for people that think it saves money over proprietary licensed software. Why? Well, because open source software is inherently altruistic. It must be because the writers of Open Source code must go into the job without the slightest whif of expectation of being able to make money out of it. Whether thay do or not in the end is niether here nor there. The idea must be born in total altruism and it may mature into a money making scheme later.
The problem then becomes the license. Open source licenses state that you should give back to qualify to use it. Public services and corporations don't like to give back, especially if it has anything to do with proprietary data. Now you can theoretically use open source code, modify it to suit your needs and never republish a single line. This however means that the code sits in the code vaults, requires a maintenance staff and, worst of all, diverges from the main-line over time. Simply because no two development teams ever have the same algorithmic philosophies. In the end, maintaining a staff of developers for an indeterminite period of time is often far less cost effective than buying a license and the occasional update.
Lastly, I have a moral objection to open source that many will disagree vehemently with but I don't care what you, dear reader, may say. I object to open source code because it devalues my job in the eyes of people who know SQUAT! about how to craft a good program. People like the shadow under secretary for digital media is a pencil pushing small-time politician who thinks that software is a free commodity that falls from the ether of the internet like rain from the sky and believes that the sheer volume of it must mean that some of it must be good in the same way that an infinite number of monkeys can whip out a few really good sonnets now and again.
Writing software is an art that requires skill and creativity. People today realise more than ever that skill and artistry are saleable commodities. Don't give too much away for free because it cheapens the market.
Off topic..
She never ceases to amaze and delight me!
http://blogs.myspace.com/index.cfm?fuseaction=blog.ListAll&friendID=181118149
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=181118149
Go on.. Give her some traffic! ;-)
For Mitsu
Linq to Entities. The full horror...
As it turns out, This might be great long term advice but IMHO right now. If you want a solution that works. Go with Linq to SQL. The offer is more mature and the clincher is that the Entities DLL's have a major fault inasmuch as they have been compiled without the attribute that enables them to run in medium trust environments so, GoDaddy for one will not allow these DLL's on their servers.