Sunday, October 31, 2010

Silverlight Slideshow control

The full source code for the Silverlight slideshow control and the explanation of how to pass parameters from an ASP.Net site to a silverlight control enbedded on the page is explained in this article You can download from the bottom of the page.
Enjoy!

Friday, October 29, 2010

Silverlight slide show control.

I wanted to provide something akin to a powerpoint presentation on a page today so I thought of a simple Silverlight control that takes an XML file and provides images and captions. I'll post the code on my site.
Take a look...

Page of shame

I had a great thought... For spammers who insist on contacting me via my contacts pages and offering me one time only 50% money off extra special deals on paid directed traffic etc. etc. I will put their e-mail address on a page that robots can harvest. Muhaahaahaahaa...

Thursday, October 28, 2010

The best quote ever?

Of Keith Richards: He's got a face like a prune's wallet.

Wednesday, October 27, 2010

Creating properties for list objects? Don't use a setter.

Browsing code today I noticed a potential problem that can cause horrible consequenses if not fixed.

An object exposes a list like so:

public List<Wimwam>Wimwams{get;set;}

which may seem to be quite normal until you look again a the the implications of the property. Here, it is the content of the property being set, namely the collection object itself! This means that it is perfectly possible for a class to fill this list carefully and then have some outside actor change the list under it's nose. This clearly breaks the rules of encapsulation and is a potentially serious bug.

That collection property should in fact be read-only. That is to say that the list itself is not read only but the property to obtain that list should only provide a getter.

The correct way to create the class and the list would be as follows:

public class Doodaa
{
    private List<Wimwam> _wimwams = new List<Wimwam>();

    public List<Wimwam> Wimwams{get{return _wimwams;}}
}

In this way, the class encapsulates the list in such a way that the reference to the list object cannot be changed. The contents of the list therefore remain under the ownership of the class.

Tuesday, October 26, 2010

Arduino Visual Micro addin for Visual Studio

Visual Micro has done some great work helping to integrate Arduino development into the Visual Studio IDE with a really cool addin. I must say that I absolutely love this kind of tool that brings an esoteric and quirky programming system to a mainstream audience.

There is one little problem with the addin inasmuch as it was built for a thirty two bit OS. I have Windows 7 64 bit installed so my directory layout is a bit different. I modified the addin such that it loads the DLL from the standard install directory on my 64 bit system.

The updated addin code can be downloaded from my site. I will of course send it to Visual Micro too who can keep up that fantastic work!!!

More on the awfulness of Safari

I posted earlier (yesterday? it all seems so far away) about what a useless result Safari gave when used to view an ASP.Net web site. Just as an experiment I went over to my site stats and looked at the browser and operating system stats for the various sites I manage. I was more than a little surprised, although I can't imagine why I suppose, to see that whereas Apple operating systems constitute a small percentage of users who view the sites, of those fewer than fifty percent of those people actually use the Safari browser!

That is truly an inditement of that miserable excuse for a browser. What makes me laugh too is the way Apple have tried to push it along with iTunes to PC systems all over the place. I guess that quality really does matter eh?

On Mac systems it seems that Firefox, Chrome and Opera do quite well. I haven't tried Chrome on ASP.Net yet. Hmmmm... Despite the motto of "Don't be evil" I still hear a faint Muhaahaahaa in the background whenever I think of Google so I haven't had the courage to install Chrome yet.

Architecture Matters blog

This blog has been an adjunct to my web site I suppose. The reason it exists is because I was too lazy to write a blog engine of my own, a task that I started but never finished due to pressures of the day job, and the fact that this all integrates so nicely with my mobile lifestyle.

As you know, Even though I do an amount of technical stuff here and it is after-all an MVP blog, I sometimes get sidetracked by personal interests and so, the content here is mixed.

My day job is taking on a new significance these days. I am still working, at least part time, in the banking and finance sector doing work for a big bank in France but I have seen a resurgence in other requests from clients around the world through my company, Daraize Technologies, where I am C.T.O.

As a result of this and the desire to create a technology only blog I have asked our webmaster to add a link to a new blog I will be working on, The Architecture Matters Blog.

The idea is to create a regular series of articles dedicated to the diverse subjects of software architecture as a big picture subject.

You may be interested to look at it yourself.

A little late...

Looking back at Ray Ozzie's tenure as Chief Architect at Microsoft one wonders just what it was all about. Bill Gates, although being the definition of the word nerd and the worlds uber geek was outspoken, opinionated, interesting and a great ambassador for his company. Something that I cannot say about Mr Ozzie. His blog has just been updated with it's second post in five years. Admittedly, he says some interesting things but really, how in the heck can someone in such a position be so quiet?

Live person verification

I just added a quick article on doing capcha style live person verification.

Google really needs a meta hint tag...

I find Google ad placement increasingly annoying as the advertisement delivery seems not to be at-all in keeping with the site content on my pages or on the blogs.
More often than not I have technical articles and posts which would benefit from ad placement pertaining to the subject. For example someone reading a technical blog might actually be more interested in buying software components online than ordering a pretty Fillipina girlfriend. (well, you're supposed to be at work after-all)
Google would therefore benefit a great deal by enabling subject hinting on the sites that would allow a webmaster to target a proportion of the ads for a certein genre and which they could then "pad out" with the other inconsequential and ridiculous bla bla that they seem to be serving these days.

Spam really can be controlled!

I have been an active participant online for twenty years now and interestingly I receive little or no spam mail despite having a reasonably high profile inasmuch as bots that harvest e-mail addresses have plenty of access to my posts and blogs.
I think that a major contributing factor to my low spam count is that I use my own domain name and refuse to use Hotmail, Google or Yahoo etc for mail.
I run my mail server on Godaddy's secureserver which itself has a spam filter that catches 90% of Nigerian 411 spans and Viagra adverts and the remaining immunity I can only attribute to my use of an obfuscated mail address for forum posts in which I use @_spamtrap_bobpowell.net which a live person could easily fix and which robots seem too stupid for still.
Finally, the contact page on my site has a simple "capcha" system that I created to do live person verification. The result is that I probably get 3 spam e-mails per day.
I would kindly ask that you wags out there like my pal Ricky etc do not go subscribing me to every list available. :-)




Windows Phone 7

Will kick Apples butt if Steve Jobs doesn't recover from his severe recto-cranial inversion and allow Flash and Silverlight onto iPhone and iPad.

Surprisingly, Safari on the iPhone handles the site I mentioned in an earlier post much better, although it still had a problem with font sizes and pagination, but without active content the effect is lost.

I'd love to see Microsoft hire the quick pwn boys to create a jailbreak install for Phone 7 that ran on the Apple hardware.


Monday, October 25, 2010

Opera does it right too!

Just tested the same site in the Opera browser. It works a treat, Even ran the Silverlight without a hitch.
What use is Safari??

BlogEngine

Going nuts today trying to integrate BlogEngine.Net into a site.
A nice drop-in blog component would be great.
Life is never easy it seems.

ASP.Net and Safari. Not good bedfellows.

I've been working on an ASP.Net website this weekend. It's just a simple site with a few pages but it uses ASP.Net menu components to provide the page navigation. I tested it on a PC with both IE and Firefox. The site looks as good as I expected it to.
Just as an afterthought I tried the site from my Mac using Safari. The result was not at all optimal.
Menus and breadcrumb trails lost their colour mouseover elements and the font sizes were not at all respected.
Apple... could do better it seems.

Friday, October 22, 2010

So, gravity is stronger than a vacuum.

The results from LCROSS are in and... The moon is not a useless lump of uninteresting regolith after all.
The moon is smothered in resources from Ammonia to Xenon all frozen or chemically bound in compounds found on the surface. There is water too, in quantities that make living on the moon and wanting for little a very tantalizing prospect.
Elon Musk has the right idea by investing in space. Governments are too concerned with elections to take risks or make mistakes. Private enterprise is the only way for space to be exploited properly. If anyone has a job for an old programmer on the moon, let me know ASAP.

Thursday, October 21, 2010

Wednesday, October 20, 2010

Is Sarkozy the new Thatcher?

I don't often talk politics but the situation in France is really getting to me so here goes.
In the 1980's and early 1990's I lived in England under the reign of Margaret Thatcher and her right wing government. Over the space of my youth until adulthood, the right wing managed to turn a proud country into a nation of downtrodden sychophants who accept that the poor should be made poorer and the rich made richer and that public opinion should be squashed by force.
Thatchers utter destruction of unions followed by the putting in place of safeguards to enable many forms of public assembly to be tightly controlled -even brutally put down- and the consequent construction of a CCTV surveillance system that communist China would be proud of has served to keep the populace in line, even through the supposedly socialist government that followed it.
In 1993 I voted with my feet after the British people voted conservative again and elected John Major to deal out more punishment and to ride roughshod over ordinary folk, of whom I was one. One reason I came to France was because I loved the way ordinary people were still able to express displeasure at the government and how, if elected officials didn't make some compromise, a good demonstration, followed by a bit of civil disobedience and maybe a lorry load of cow crap in the local council office lobby soon put things right.
Today however, Sarkozy is behaving in a more and more right wing manner. The virtual pogrom against Romany people was something one might expect to hear of from middle european countries, not France. Now, quashing unarmed public demonstrations and blockades of fuel with what are effectively SWAT teams makes the appearance of a "conservative" government look more and more like a fascist state.
The social security and pension system in France takes vast chunks of money from wage earners. With employers contributions, the cost of a wage is almost twice the takehome pay and that doesn't include any eventual income taxes that might be paid. French people live for and plan for their "Retraite" and to raise the pension limit will cause problems.
I will be honest and say that I hope the French people can hold out against Sarkozy's brand of Thatcherism and remain a free and proud people who are able to give their elected officials the finger from time to time. Vive La France!

Sunday, October 17, 2010

Hiker killed by mountain goat

While the ignominy of such a death may be shocking to the poor victim and his family, for whom I have the utmost sympathy, one wonders why a magnificent wild beast should be killed because it poses a risk to hikers who have the temerity to infringe upon it's domain.
Hiking is, after all, a way to get closer to nature and, despite the childrens picture book view of real life that we seem to adhere to these days, nature is wild, rugged and often savage.
If someone strays into the domain of a Lion or Tiger and is eaten for his stupidity people are not surprised but, when the agressor is a lowly goat people are horrified. Herbivores are quite capable of defending themselves and their territory. They are used to dealng with savage tooth and claw predators to survive. They should not be underestimated.

Thursday, October 14, 2010

Downtime

So, My site has been inoperative for the longest time in ten years, due to Visual Studio 2010's apparent inability to publish to an FTP site without crashing.
I am currently uploading via FTP using a direct client but effectively, since Tuesday night, BobPowell.Net has been dead in the water.
Note to MS. Could do better!

Tuesday, October 12, 2010

Website broke

Oops. Thanks to all of you who mailed me so quickly to tell me the site is broken. I am working on it and will upload again ASAP.

I think this problem stems from my upload being interrupted.


A tool to convert .HTM files to ASPX

Well, it may be a little late but if you read my latest article in my ASP.Net section of my site you'll see why a certain reluctance to make this change came about.
It has always been a laborious task to make such a change, especially if you want to apply some sort of master page strategy to the HTML pages on the site.
Being a lazy person at heart, rather than do the job with repetitive and boring hands-on editing I have created a little utility program that can convert all the .htm pages on a site to ASPX while applying a master page if required.
I ran this on my own site and it seems to be OK, at least for my purposes. I still need to tidy some pages but the bulk of the work was done automatically. Just right for a lazy old duffer like me.

Windows Phone 7 SDK

I reported last week that the Windows Phone 7 SDK includes Visual Studio 2010 express. This is true, the downloader will get those components from the server when you run the web-based download. It is also true however that if one already has Visual Studio 2010 installed, as I have with the Ultimate edition, the installer does not setup the VS2010 part.

This is reassuring but, for people who still have limited bandwidth this may be a problem. Last week I was downloading via my tethered iPhone so I cancelled quickly.

I just installed the SDK on my desktop machine over the DSL line so it was less painful.

Thursday, October 07, 2010

Hungarian Sludge.

I used to have a calculator that used reverse Hungarian notation. I loaned it to a pretty girl once and she never spoke to me again. The idea of Hungarian sludge has impinges upon my consciousness and may be as hard to remove as the real thing.


Splash.. the saga continues

Well, I wonder if the scientists who published the idea that Saturn's rings were created by a moon or large asteroid falling into saturn were inspired by my blog post?
Hey, remember you saw it here first. The'yre handing out Nobel prizes at the moment, perhaps I can pick up the astro-physics prize ;-))

Windows phone 7 developer tools...AARRGGHH

Just checking out Scottgu's blog and noticed the link for Windows phone 7 dev tools.
They immediately try to download Visual Studio 2010 express.
This is obviously a no no if one already has 2010 ultimate installed.

New life for an old laptop

Some years ago I bought myself a lightweight laptop that I thought would be good when commuting or travelling on business. As it turned out, the Phillips machine was actually pretty useless with a short battery life and a bit slow.
Recently, I took up the commuting lifestyle again but I took the plunge and wiped the laptop, installing a 64 bit Windows 7 Ultimate OS on it. It's a diferent machine! it's fast, shuts down quickl, boots up quickly, resumes from hibernation reliably and is generally usable after years of me complaining about it.
(The battery life is still useless but I may buy a new battery because this one is obviously tired)

Congratulations to Microsoft for getting Windows 7 right!

Tuesday, October 05, 2010

Software technology patents are BOGUS

Patents are a great thing when they cover some innovative mechanical process that is not obvious in nature. They can also be a great thing for certain algorithmic processes if that algorithm took a lot of thought and work to come up with. Patents that cover the positions of pixels on a screen however are totally bogus. Todays news about Apple being liable to pay 600 million dollars for the infringement of patents that describe Cover Flow etc are ridiculous!
In the same way that patents which might cover a certain sequence of my D.N.A, patents which ultimately concern the colour of certain pixels on a screen are totally frivolous. Compettition to greate great UI is a great goal for designers of good software but to patent the positioning of a button or the method of a user interface is too much.

Facebook "Like" button as an ASP.Net control

Fiddling with my site today I decided to create a master page with a Facebook "Like" button on it. This turned out to be harder than I thought because the Facebook developer site spits out a dedicated iFrame for the page URL you enter.
I thought to myself that a simple ASP.Net user control could be the solution so I went ahead and wrote one.
Check it out! http://www.bobpowell.net/likebutton.aspx