Tuesday, December 15, 2009

Windows 7 USB blues

I have a Windows 7 x64 OS installed on my Acer x1700 quad core machine and I keep losing the external USB drives for no apparent reason. They just stop working without any error or warning.
I have seen that this has also been a problem for other people so it may be something real as opposed to just my bad luck.
I have just turned off the legacy USB support in the bios and will do some more tests to see if this made a difference. I may post here or tweet (@bobpowell1) the results...

Friday, December 11, 2009

iPhone auto brightness


This is a great feature and althouh many people say it seems to do nothing I think that it works so well that it is unobtrusively cool.

The feature takes a reading of ambient light when the phone wakes from sleep but it also periodically adjusts brightness when you go say from a dark room to a well lit one.

You can see the effect like this.

Sleep the phone and do to a dimly lit place. Wake the phone and see the screen brightness. If you then turn on a bright light or move to a mote brightly lit room then you will see the brightness increase to suit the current conditions.

The phone doesn't seem to be so keen to reduce brightness when awake but it always adjusts on waking.


Tuesday, December 08, 2009

Sus reprobo totus erudio

I have had a few requests concerning the latin motto I display so proudly on my blog.

To be honest I don't know if its the best possible translation but essentially it means...

"Pigs reject all education" or more properly in good old Isle of Wight-ese...

"You can't educate PORK"

Carduino, more from the brainstorm...

I have another idea which will be easier to implement in the short term and enable me to put together some of the systems I need to accomplish the larger task.

I want to make a CO2 economiser which will turn the car engine off and back on again when sitting in traffic.

Because the Land Rover clutch is so heavy and Paris is so full of BLOODY TRAFFIC LIGHTS!!!! I habitually shift into neutral when waiting in traffic. I also often switch the motor off entirely, especially if there is a little down grade towards the lights because I can often roll most of the way instead of sitting with the engine running.

So, I need to detect the car's speed to see if the thing is moving, I need to detect the revs to see if its at idle, I need to cut the fuel to stop the car and I need to see if I have put my foot back on the clutch so it can restart again.

For this I need a sensor for the engine revs which can come from the tacho. I need a relay on the electric solenoid diesel fuel cutoff to stop the motor and a relay for the starter motor.

I bought a couple of reed relays this week and I will start looking into the logistics.

Meanwhile, I have an app key from the nice folks over at Pachube so I can start putting a web-service on my Arduino and creating an interface.

I really want to see if the Pachube system can serve up WSDL so that I can easily write a nice application using Visual Studio 2010 directly for the web-service reference and resulting API import.

While Microsoft applications are lovely on a client or web think how much more loveley it would be to create such a tightly integrated system with a web service running a car engine!

Its so cool I'm positively shivering!

Friday, December 04, 2009

Arduino Sketch for Visual Studio 2010

Here is a link to the Arduino sketch template project for Visual Studio 2010.

Thanks to this original post on the Arduino Playground for the idea.

Project Carduino

Many years ago I was a professional electronics designer creating embedded systems for music, add ons for home computers and other good stuff. I recently bought an Arduino board to play with and intend to add computerised goodies to my car. A Land Rover Discovery 300 TDI.

A recent modification to the car was to remove the cooling fan which is belt driven and add a second hand electric fan which relieves about 8% of the engine load making the car more efficient. An important aspect of engine efficiency is good temperature control especially when towing a load, which I often do, I want to make a temperature monitor with an arduino I also regularly drive the 200+ miles from Paris to my real home in Brittany so I would love a cruise control for it which, I believe can be done with the Arduino as the brains.

I need a throttle position sensor to detect actual power settings and so the cruise control can detect if I want control back. I also want a brake sensor, tied to the brake light switch to immediately turn off the control if I brake. I need an engine speed detector connected to the tachometer or crank sensor in case I put the clutch in while the cruise control is on.

Next I need a stepper motor drive to work the throttle with a fail-safe mechanism that will release throttle control if the computer dies and which will not effect normal throttle operation. Then finally I want the whole kit and caboodle to provide a web service so I can connect it to a touch screen computer running Windows 7 and generating WPF graphics for user feedback and control

Effectively, in my spirit of "it's just a computer, integrate it!" I expect this to be a really interesting project.

Wednesday, November 25, 2009

Yay for global warming...

It's Beaujolais Nouveaux season in France and this year's bumper grape crop, due largely to warmer weather and a little more rain in the summer months has produced some truly outstanding Primeur wines. If you see a sign for these wines at your local store. Don't be shy. Buy a bottle. You'll not be disappointed.

Wikipedia plateaus...

With a distinct slowdown in the creation of new articles, perhaps now is the time to evict some of the Wikipedia content nazis and start opening up the field.





Tuesday, November 24, 2009

So, my Mac is not perfect after-all

Today, my Apple Mac Mini crashed, locked up, totally unresponsive and needed the dreaded four-second power button to reset it and regain control.

This is not the first time.

The Mac is not infallible, is is not fashioned by gods, it isn't the thinking man's answer to the evil empire of Microsoft.

Once again. It's a computer that runs software which occasionally bombs. Cool!

Tuesday, November 17, 2009

Listbox's annoying habit

Am I the only person annoyed by the behaviour of the WPF ListBox?

Create a page with a ListBox, define a nice DataTemplate Stick some data in the DataContext and... nothing happens.

So much for the DataContext being the center of the universe eh?

You have to specifically declare if you want what ought really to be the default behaviour.

Thursday, October 29, 2009

The war of B.S.

I'll give anyone and everyone a fair hearing. I try to be even handed in most matters so, today, while driving home I decided to depart from my usual diet of science and news podcasts and listen to some Apple technology stuff instead. You see I have recently become motivated again to get my iPhone app and website finished so, after intalling visual Studo 2010 and setting too on the silverlight web site, I thought I would get up to speed on the apple side of things, as I seem to have a foot in both camps.
I listened to the unofficial apple weblog. Blimey what a mistake that was! Three idiots who couldn't even decide on what technology they should use to run their voice chat session. Apparently they were so useless that they couldn't even make Skype work for them and there were literally minutes of awkward silence and blabbering about how they sounded like chipmunks to one another. They also ranted on about the evils of Microsoft in their best scary evil empire tones.
Well, I'm sorry guys but even though I like my little Mac I have no possible intention of joining the one sided techno bigot society that so many Mac users seem to inhabit. Damn it people. Get a life! it's a computer. The most stupid chunk of logic going. They even use the same CPU now so the arguments over the merits of one instruction set over another are moot.

Windows 7 Starter edition on Acer Aspire One basic



I had been intrigued for a while about the possibilities of running Windows 7 on a netbook so I decided to install it onto an Acer Aspire One which I bought for one of my children a while back and which is gathering dust now after my son got an iPhone for his mail and facebook chat.




I got Windows 7 Starter from MSDN and put it onto an 8 gigabyte USB key using the instructions found on Kevin's weblog (http://kmwoley.com/blog/?p=345) These instructions are clear and concise and worked first time.




I plugged the newly loaded USB key into the Acer and reset the machine, pressing F12 at boot so that I could select the correct boot device.




Surprisingly, the install didn't complain about the fact that the disk drive or SDD on the acer is only 8 gigabytes. Nor did it have any objection to the size of the RAM which is the pathetis standard 512 megabytes. My son used the machine with the standard Linux install for a few months and had Firefox installed for browsing. With Linux there seemed to be no problems but, I will be honest I wondered if Windows 7 would choke on the machine.




The install continued flawlessly for about an hour whereupon the machine rebooted and the Windows 7 desktop appeared. I must admit to being flabbergasted. My pal at work, Michel Perfetti, a fellow MVP has recently bought a 64 meg SDD and 2 GB memory before he even considered installing 7 on his EEEPC so I think I might just wave this little gem in his face on Monday.
You can see here, the performance score which is a resounding 1.0 but only because the Aero desktop performance is not good. 3D performance is 3 and the hard disk rate is 5.3

I am totally impressed with the ability of Windows 7 to install and function so well on such a tiny footprint. Well done Microsoft!

Wednesday, October 28, 2009

Visual Studio 2010 Beta 2 "Go Live"

In the past, Microsoft have been almost too careful about licensing for beta versions of tools and frameworks, stating clearly that beta test versions should not be used for production code. The Visual Studio 2010 beta 2 however has a "Go Live" license which enables us to legally use the beta version of the system to develop line-of-business applications and even to get support for the beta version tools and frameworks.

As someone who is very concerned with code quality and application reliability in my daily job I see this move as a testament to Microsoft's testing and quality regime. In the past, the traditional view of Microsoft software has been to wait for the service pack or version 2.0 before adopting for front-line applications. However, with the emphasis that Microsoft and indeed other software providers place on testing and quality these days, we can be more confident that the first release of a product will be useable and indeed reliable.

I have used Visual Studio 2010 in both pre-beta and beta versions for a while now and I can say that the new features in Visual Studio show a marked emphasis on enabling the developer to understand their code and increase quality by systematic testing and reliability checking. I also know from sources within Microsoft that the Team System improvements, some features of which have been included as standard in Visual Studio 2010, are based on Microsoft's use of their own product; eating thier own dogfood. This gives me even more confidence in the tools. Rest assured that you too can be confident in the new reliability and usability of Visual Studio.

Sunday, October 18, 2009

Dangerous trends

I guess I have been priveliged to have lived in the countries which claim to be the bastions of freedom and equality. I was born in England, lived in America and have adopted France as my home. I am also a technology freak who has WiFi networks at my house and children who enjoy music.

Recently in the news, there have been numerous stories, notably the new laws in France and now the Mandleson copycat crimes in the UK, in which big government has interceeded on behalf of the all-powerful music and film industry to both demonise and punish illegal downloaders by providing sweeping powers to "disconnect" repeat offenders who are caught downloading copyright material from the internet by revoking their right to an online account.

In the case of the laws in France and now it seems in the UK too, the burden of proof of guilt seems to have been removed and the only requirements to having ones internet rights revoked are to have been named in a complaint by a copyright holder. In some cases, the laws which have been proposed are so one-sided that even an unfounded accusation of guilt by a third party can be enough to cause this disconnnection.

While some may say that this is all very ethereal and not something which will affect a great majority of people and that the no-smoke-without-fire rule can happily apply to those no-good teenage hackers anyway, I see this as a very dangerous trend which serves to eat away even more at the right of someone to face their accuser and to require reasonable proof of a crime having been committed before arbitrary punishment is meted out. When this attitude is allowed even for what may seem to be the smallest crime, due process for all other matters is eroded and the foot of despotism placed firmly in the door of civilisation.

We have recently seen cases for exactly similar "crimes" which have wildly differing outcomes depending on the faces in the dock. In the case of Pirate Bay, the defense of being nothing more than a provider of links to materiel hosted elsewhere failed because the defendents were young, hip and openly defiant. In other cases, ISP's who have been accused of facillitating copyright theft have successfully defended their cases by claiming to be nothing more than "conduits of content" This clearly shows that the law for big business is different to the law for the common man.

More and more today, we are seeing the prase "human right" associated with The Internet. The european courts are currently considering whether online access is indeed a human right. One could argue that as access to legal materials in written form is a right of all accused who may wish to instruct their lawyers or to better defend themselves is considered as a human right in western civilisation, then access to the internet should fall into the same category.

I have a reasonably secure wireless network. I use a good secure twenty plus character passphrase scheme on my networks with WPA-enterprise 2 encryption, a firewall and MAC address permissions on my DHCP server so that passing hackers cannot piggy back on and steal my network bandwidth. I wonder however if this is enough to protect me.

Returning finally to my original point, which is that I have a wireless network and teenage children I face two immediate problems. The first is that my kids have already downloaded copyright materials even though I told them not to. They are however children who, had they committed some terrible crime, would be treated as minors, unable to be made responsible for their actions. The second is that even though I have done the best I can, restricting access at my router to filter out sites which host torrents or links to torrents, but with the plethora of file sharing methods available, I cannot be certain that an enterprising teenager or drive-by hacker cannot get the latest film or music bootleg online.

Where would this leave me in the case of being accused of having downloaded copyright materiel? I live my life on the internet. I work as a provider of software and need the information on the internet to do my daily work. If I lost my right to have a DSL account, I would lose my livelyhood as surely as if you were to cut off my hands and put out my eyes. Would this matter to a pencil pusher lawyer in a music or film company? I rather think not. They would be quite happy to infringe my human right to an income I'm sure.

http://news.bbc.co.uk/2/hi/technology/8305379.stm

Wednesday, October 14, 2009

Viagra

Huh? I have EIGHT children!
Can you possibly be serious?

Wednesday, October 07, 2009

News just in..

Using the new free Microsoft Security Essentials a trojan downloader that was not seen by AVG (which I pay for!) was caught and removed.

Swings and roundabouts?

Easy schmeasy

As I grow older I become more and more suspicious of things that proclaim themselves to be "easy" One may say that this is just because I am older and therefore more mentally enfeebled than I may have been. However, the evidence has shown that things which try to be easy to use can become a downright pain in the butt when the algorithms used to make decisions are just plain stupid.

I have recently upgraded my PC in the manner to which so many of us are accustomed to a more recent, four core processor with a good amount of memory. Of course I used Windows 7 as the operating system and very good i is too, with nice graphics and sixty four bit goodness running all the little cores as it should. My old machine, which I have had for a few years now, has a couple of hard discs and a ton of data that I don't want to loose. So, what did I do? I thought "I'll use Windows Easy Transfer to get my data onto my new machine!"

This is where the whole "easy" premise fell flat. I bought a Belkin Easy Transfer cable for the princely sum of thirty eight euros and inserted the disk for the install. The installer told me that because my machine was running vista there was no need to install software and that the dongle on the Belkin cable held the plug 'n' play application. Ok, I plugged in the cable and the software immediately assumed that my old computer was my new computer and that I wanted to transfer too it. Wrong!

I started easy transfer on the new machine and it told me that i had to install the latest and greatest software on the old one. A process I had earlier been told was uneccesary - ho hum.

So, after copying the software, installing it on the old machine and starting the proccess I had to wait for about half an hour while the system decided what I should transfer. Ok, I want my account but not my wifes, the old admin or the guest account. Moreover, I want some documents but not settings for my ATI graphics card because the new machine has an NVidia card. All this means selecting from the several hundred tickable boxes and an hour or so of triage I get what I want reduced to a couple of hundreg gigabytes and... The blasted easy transfer client on my old machine crashes with a data execution exception. AAARRRGGGGHHH!!!!

So much for "easy"

Friday, August 21, 2009

Africa gets fibre optics

Dear friend,
My name is Bob Powell, Until recently I was manager of a large goat farm in the southed part of England. Unfortunately the kind man who owned the farm and the eleven thousand goats of which I was so proud to look after on a daily basis has died of an overdose of cheeseburger and left me and my poor goats in a very poorly and destitute state.
I am writing to you in great confidence because I know you are a good person and you love goats as much as I do. My situation is delicate as you realise that goats are prized in England and the UK border is controlled very strictly to prevent our livestocks being whiffled out of the country by any old Toms Dicks and Harrys.
I am preparing to send all eleven thousand one hundred fifty nine good goats to a cruel goat farm in the hills of Iceland so you see all papers are done for export but my lovely goats will alls be roasted in some awful volcano powered Icelandic factory who has no more cods to render.
At great risk to myself I am prepared to sends these goats to you instead. Please dear friend. If you are a good lover of goats and can think of a use for these poor unfortunate beasts just send me your address and they are yours. To verify the exact address for uk customs please include your bank address, account number, sort code and any PIN codes that you may have in your possetion.
Yours truly, in faith and peace,
Mr Bob.

Wednesday, June 03, 2009

Publish and be spammed

For many years now I have believed in the principle of "Publish and be damned" which I learned from my days in software engineering working with Stingray Software. I had never experienced having to write code that someone else would code review or criticise in any way. When I actually had a team of people to tell me what was wrong with the code I had slaved over in my darkened home-office, I grew both professionally and personally.

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.

A recurring theme on this blog is how technologies can change ones life in a positive way. I think that during my life I have avoided computer games but may actually spend more time interacting via the computer than even hardened gamers.

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?

A recent article on the CO2 cost of spam, 17 million tons of the stuff apparently, and a conversation I had with a friend about the economic advantages of parallel processing systems made me think about how technologies such as Silverlight, Ajax and Flash can act to reduce the carbon emissions associated with internet operations.

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)

So during the Easter break we went to our old house which we're renovating and tried out Trakkus on three clients. To test the system properly my wife and son have signed up for iPhone accounts, they have the 8 gig versions which are on special offer of 99 euros at the moment. Even with my entire music collection, some of which I never-ever listen to, on my 16 gig model I have 6 gigs free so it seems that one would have to be a serious memory hog to use up even the eight gigabyte model.

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..

Would you like to see how Trakkus looks in real life? Well, for a short time I am going to allow anyone to view where I go when my iPhone client is turned on.

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 iPhone client for Trakkus uses the CLLocationManager to obtain readings. The classic method for getting the reading is to set the location manager going and wait for it to call back your delegate, didUpdateToLocation, with a reading. At this point you can immediately turn off the location manager by calling the stopUpdatingLocation method or you can check the accuracy of the location you have to see if you like it.

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.

Trakkus is my pet project. It's social networking and geolocation. (See here...)
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.

There are few things that make me proud in my professional life but the Microsoft MVP award is one of those things that just makes me hugely happy.
I was re-awarded Visual C# MVP again this month for 2009.

About time too!

I guess I wasn't the only person to have problems with the complexity of the Apple developer program's ad-hoc provisioning profile which is used to put programs you write onto an iPhone for testing.
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 issue of the hardware or operating system one uses is almost a religious one in today's technology polarised world. I have heard people discuss the merits of their particular machines with a fervour that almost ended in fisticuffs between seemingly civilised people over the placement of a menu item or the fact that the boss of the company was widely considered to be the real-life model for Damien Thorne.

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

When I die I want a gravestone with a progress bar on it.

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)

As you may know from this blog, I am a new Apple iPhone developer.
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!

Yet another 20 meter wide or Tunguska class asteroid, 2009 FH will pass close to the earth tonight. Once again I find myself incredulous that when the boffins at NASA can find a spec of paint 0.3 centimetres across in orbit that they can't find a chunk of nickel steel weighing about thirty thousand tons!

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...

As you may know, if you've read these pages in the past, I have an iPhone which I think is now my most used piece of hardware.

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!

"There's no danger of a collision, but newly-discovered asteroid 2009 DD45 will come close enough today when it flies by our planet 72,000 km (0.00048 AU) away"

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

An article today by the BBC suggests that the UK government, or at least, the opposition, think that open source is a great idea and will adopt it "when it provides value".

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..

I am sitting here doing my newsgroups and my blog while my darling wife edits HTML for her myspace page.

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

My comment on windows forms controls was a joke!

Linq to Entities. The full horror...

I have a pal who I respect. He's a consultant for Microsoft France who told me that it'd be a great idea to use Linq to Entities rather than Linq to Sql. Why? Well, because Linq to Entities is the official way of the future and it seems silly to have two highly similar implementations of the same thing so Linq to SQL was going away.

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.

Tuesday, February 10, 2009

Incredible lightness of being

I have a few moments to kill her at Techdays Paris while I wait for my friend Mitsu to give his presentation so I thought I would edit a quick post. What is surprising about this is that for the firtst time in ten years or more after conferences on two continents, I am here without a laptop! All my needs for comminication and such are served by my phone, the iPhone.

Not carrying the weight of a laptop in my bag or having it on my lap cooking my legs is a real luxury.

Saturday, January 31, 2009

The pain of session variables in LINQ

Linq to Entities rocks. Seriously, but there are a few little bugbears.

One of them is in how errors are reported in a totally misleading manner.

Consider this little snippet of code.


var q=from t in MyEnities.SomeEntitySet
where t.ID==(int)Session["userid']
select t;

if (q.Count() > 0)


q.Count threw an exception that said:

LINQ to Entities does not recognize the method 'System.Object get_Item(System.String)' method, and this method cannot be translated into a store expression.

This drove me mad for hours because I tried everything such as verifying that the session existed, that the variable was real, was of the right type and was of the value I expected. All to no avail.

In the end I solved the problem by first saving the session value into a local variable which I then used in the LINQ expression.

It seems to me that this has to do with the order of how things are evaluated within a LINQ expression and may even constitute a bug in the language. Why? well because it seems obvious now that the direct value from the session variable is somehow used before the cast operation by the LINQ parser and so an exception that seems to have no real relation to actual circumstances is thrown.

I hope that this helps to trap similar errors for people hunting for hours on Google like I did.

Wednesday, January 28, 2009

Fire and forget storyboards...

I have fallen deeply in love with Silverlight and it's evident, in Silverlight 2 at least, that one cannot do everything in XAML and there is still an element of code needed to do a job.

Because of the lack of triggers in the same sense as those that exist in WPF, Silverlight can be a pain when we need to create dynamic animated effects. However I had an idea that leans heavily upon the joys of garbage collection and anonymous methods to provide a fire-and-forget style storyboard which can do animations and handle its own events.

One little job I recently accomplished with this was to create some animation effects that had two stages; for example, to fade one element out and replace it with another.

The joy of this technique is that we can build a storyboard and the associated animation details dynamically, set it running and then just forget it while it does its thing. After the events have fired the whole thing -should- be reclaimed and garbage collected. (He said, wondering about shooting himself in the foot.

Here's some XAML...

<UserControl x:Class="FireAndForget.Page"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Width="400" Height="300">

<Grid x:Name="LayoutRoot" Background="White">

<Ellipse Fill="red"/>

<Button Content="Click Me" Width="100" Height="25" Click="Button_Click"/>

Grid>

UserControl>

And here’s the button click code..

private void Button_Click(object sender, RoutedEventArgs e)

{

Storyboard sb = new Storyboard();

DoubleAnimation da = new DoubleAnimation();

da.BeginTime = TimeSpan.FromMilliseconds(0);

da.Duration = new Duration(TimeSpan.FromMilliseconds(1000));

da.From=1;

da.To = 0;

sb.Children.Add(da);

Storyboard.SetTargetProperty(da, new PropertyPath("(UIElement.Opacity)"));

Storyboard.SetTarget(da, this.LayoutRoot.Children[0]);

sb.Completed += delegate(Object o, EventArgs ea)

{

Random rnd=new Random();

((Ellipse)this.LayoutRoot.Children[0]).Fill = new SolidColorBrush(Color.FromArgb(255, (byte)rnd.Next(255), (byte)rnd.Next(255), (byte)rnd.Next(255)));

sb = new Storyboard();

da = new DoubleAnimation();

da.BeginTime = TimeSpan.FromMilliseconds(0);

da.Duration = new Duration(TimeSpan.FromMilliseconds(1000));

da.From=0;

da.To=1;

sb.Children.Add(da);

Storyboard.SetTargetProperty(da, new PropertyPath("(UIElement.Opacity)"));

Storyboard.SetTarget(da, this.LayoutRoot.Children[0]);

sb.Begin();

//done!

};

sb.Begin();

}

Good eh?

Tuesday, January 06, 2009

Oh the shame!!

Ok, I admit it, I'm a child of the sixties. I have grey hair, I'm overweight, I'm nearly fifty and probably in line for a major mid-life crisis. I also work as a software architect on a job that requires that I become intimately familiar with the in's and out's of.. wait for it... VB6! Is it any wonder I am going insane??

Today, my pals at work had a great laugh at my expense. I was quite happy to show them my new pages on my site, yeah, the ones with the Silverlight banners.. and after a couple of seconds, they laughed so hard that one of them fell off his chair.. Seriously.

So my Silverlight efforts are too "bling bling". My site has a 1970's look 'n' feel. My banners are crass and I have no taste in, well, in anything much!

I live and work in the country of my own country's traditional enemy. I speak their language and accept their customs. I even listen to their ever-so twisted version of history with good humour. I suppose that I'll just have to accept the fact that my site is "moche". Anyone want the code?

Sunday, January 04, 2009

Silverlight fulfilment!

Well, you can see the difference in times between these two posts. That's how long it took Don at Brinkster to get my IIS all configured for Silverlight. [Well, this isn't actually true because I made a draft of the previous post from my iPhone this morning and finished it up a few minutes ago. Don took precisely 6 minutes and 20 seconds to fix my site]

I must say that Brinkster have really made leaps and bounds on the quality of their hosting and particularly their support.

I use GoDaddy for some of my sites because, well, let's face it, they're cheap and cheerful but for all my mission critical stuff I use Brinkster. Even though it costs just a little bit more it's worth the money for the level of support that these guys give.

You can see the new silverlight XmplXaml page by following the link..

Silverlight frustration

This holiday I decided to join the horde of silverlight and WPF bloggers and article authors because I thought that the technology is sufficiently mature to at last allow serious work to be undertaken using them as a medium. As a result my development site on my PC with some examples of animated Silverlight banners and such. As I mentioned before, I have experienced a certain amount of frustration at the lack of currently valid material, especially for Silverlight, so I have written a little application that serves a similar purpose to good old reflector but with a twist

The application, which I call XmplXaml, uses reflection to discover the properties of an object and provides a simplified view of the various collections and the types they can contain. So, rather than a class hierarchy you can see the Xaml hierarchy of tags. Running this application on PathGeometry for example, gives a rather nice view of the different PathSegments we can use and their relation to the root object.

So, now to the contunuing frustration part.. My bobpowell.net site is hosted on Brinkster and has been for many years now. I uploaded my new applications only to find that they haven't enabled silverlight on their servers. AARRGGHH!

I will either have to rename all the XAML files to XML, a soloution I am not happy with because I like the idea of doing everything directly from Visual Studio, or to get my old pal Jared over at Brinkster to have his team set up the silverlight MIME types properly. Failing that, I'll have to move my site to a server that supports them. That would be a shame because I like the Brinkster setup.

Here's a little screen-shot of my utility to be going on with...




Thursday, January 01, 2009

Misinformation is driving me insane!

I am heads down on a bunch of ASP.Net, WPF and Silverlight projects at the moment and I can categorically state that the amount of useless chatter on the web pertaining to all the previous beta versions of WPF and Silverlight technologies is more than a little annoying.

Try any simple search for information and you'll be swamped with good looking content that, after you read a few lines, turns out to be for Silverlight 1.0 beta versions and has absolutely no relevance to anyone using the technology on front-line applications today.

I call upon all authors and bloggers to clean up their blogs and remove every article that still turns up with old and confusing information about uselessly dead beta versions.

Oh.. happy new year too!