Monday, January 31, 2005

Enterprise Library

MS have announced the release of the "Enterprise Library", which is essentially the consolidated v2 release of their Application Blocks for .NET (MS produced this new version in conjunction with Avenade, who had exclusive access to them for the first 90 days of their release). The blocks have all been largely rewritten to a consolidated & consistent design.

The "blocks" that form this initial release are:
  • Caching;
  • Configuration;
  • Data Access;
  • Cryptography;
  • Exception Handling;
  • Logging & Instrumentation;
  • Security.
No mention of the successor to the Updater block, although note that an alpha v2 release is available on the GotDotNet workspace ... assume that this will eventually be amalgamated into the Enterprise Library...? Note that ClickOnce in VS.NET v2 makes the Updater kind of redundant, so this may be the reason it's being kept separate.

Friday, January 28, 2005

Rebuttal to Amusing Article

Well, it seems that the article I mentioned in a previous post wasn't someone's idea of tongue-in-cheek humour; someone has written a rebuttal on DevX.

Wednesday, January 19, 2005

Amusing Article... Or is it?

I've just read a peculiar article on DevX: OOP Is Much Better in Theory Than in Practice.

I don't know what to make of it; it's either tongue-in-cheek (it is very funny, perhaps unintentionally so); otherwise, the writer is trying to make a "serious" point; if he is, then he's either lost the plot or has had his head in the sand for the last 10 years.

Some choice quotes:
OOP just introduces an unnecessary layer of complexity to procedure-oriented design.

In my view, confusing OOP with programming is a mistake. OOP is to writing a program what going through airport security is to flying.

A frequent argument for OOP is it helps with code reusability, but one can reuse code without OOP—often by simply copying and pasting.

[On encapsulation:] ...most programming is done by individuals. Hiding code from oneself just seems weird.

I've began to wonder whether OOP is simply the latest fad, like Forth, Pascal, Delphi, and other programming technologies before it. History has seen these "final best solutions" many times, when waves of professors applauded some idea (structuralism, Marxism, existentialism, logical positivism, etc.) only to turn like a school of fish when the next big idea came along.

To be honest, constructing a class often is fun. It's like building a factory that will endlessly turn out robots that efficiently do their jobs, if you get all the details right. You get to play mad scientist, which can be challenging and stimulating.

Nearly three decades ago the Basic language was introduced as a teaching tool—a way to teach programming to college students. Because its primary goal is clarity, Basic employed a diction, punctuation, and syntax that were as similar to English as possible. For a while it was a success, but things took a turn. [i.e. when C / C++ was introduced]

To me, hope resides in the computer itself, not us foolish humans. I expect the machine to eventually be capable of interpreting human instructions in human languages. When that happy day arrives, most OOP dogma will likely seem bizarre, wasteful, and irrational—just one more dead end in our fumbling efforts to
communicate with intelligent machines.

Is he for real, or what?

Tuesday, January 11, 2005

Where are MS Going With AntiSpyware?

There's a lot of conjecture about that MS are going to start charging for their new Antispyware program; fueling this is the fact that MS bought an antivirus company last year, and plan to release their own antivirus program shortly (in beta at least).

Here's the directions MS could go in:
  • Charge for Antispyware, and charge for subscriptions to its update service (in the manner of Symantec);
  • Bundle the software directly into the OS (in the manner of the XP firewall);
  • Integrate the software directly with IE, either as a "patch", or as part of a whole new version of IE (which is rumoured to be released with a "refresh" version of WinXP, which will also include the XP versions of "Avalon", and "Indigo");

So, which one's more likely?

First, I don't think MS are likely to force users to pay for an antispyware program, especially as spyware usually takes advantage of flaws in the OS and IE - there'd be an outcry & rejection of the software in favour of other company's offerings; besides, why should I move from my favourite Antispyware brand to MS's offering? What would be the point?

Second, bundling the software for free is likely to get MS into trouble; it may be seen as anti-competitive.

My own money is on MS integrating the software seamlessly into a new version of IE; IE has been blasted lately as outdated and insecure, and is losing browser market share to Firefox. What better way to fight back than by producing a brand new browser with lots of much-requested new features, and has security products built in? Note also that, when "Avalon" is released (& remember, it will run on XP), IE is going to require an update to IE, to integrate XAML-parsing tech.

So let's see what happens.

Monday, January 10, 2005

Support Wor Tony's Run

My friend Anthony will be running the London Marathon on April 17, to raise money for Macmillan Cancer Relief (and also celebrate his 40th birthday)!

All the best to Wor, and note that you can sponsor his run at http://www.justgiving.com/worsfundraiser and give money to a good cause!

Friday, January 07, 2005

66% of Microsoft Employees Prefer... Google!

...allegedly...

Personally, I can't understand why MS are bthering with MSN Search; it's like they're using it as a placeholder until they get WinFS / "Longhorn" out the door and introduce a bit of innovation (instead of just reproducing what's already there); and that might be a very long time indeed.

I found out a new (well, new to me) feature of Google the other day: type links: followed by a url and it will show you all the pages that contain links to the url.

Other Google features that I use on a regular basis: site: (search only the specified site, e.g. site:www.microsoft.com tablet pc form factors - try it, it works better than Microsoft's own site search!) and define: (get a definition for a specified word, e.g. define:ontology).

I use Google along with LostGoggles (formerly known as MoreGoogle), and I can't imagine using another search engine. The only feature I want now is a temporal dimension to the search, but I guess I can wait for that.

Why Tablet PC Will Succeed

A lot of people a sceptical about Tablet PC; sales are still quite low, although the major manufacturers are producing 3rd generation products, and the idea of a tablet PC - while not yet mainstream - is definitely here to stay.

Personally, I'm tempted more and more to buy one. The idea of being able to sit in my lounge, an aeroplane seat or a meeting doodling notes and e-mails, then surfing the web on a device that fits neatly into my lap, really appeals. I still take a lot of notes and sketch designs on paper - because it just feels more natural and is quicker to do (struggling to express yourself in an unfamiliar drawing tool, and you quickly lose your train of thought and inspiration).

Anyway, here's some predictions on how the Tablet PC will move in the next 18 months:
  • The "slate" design will win over the "convertible" model (tablets come as either a keyboard-less slate, which you can visualise as a "big screen PDA", or a model with a keyboard that folds back against the screen to give you a slate); the reason I say this is because the whole purpose of a slate is to have a device that you draw on and can cradle confortably in your arms, & convertible models are just oo bulky and heavy; you can easily plug a laptop-style keyboard into a slate - see the Motion M1400 gallery for how this works;
  • PDAs will begin to fade away & Tablets will fill the void; PDAs are too small to serve any useful function except storing your contacts and giving you a basic e-mail browsing experience, i.e. the same functionality mobile phones now offer; but a 12" screen allows you to do much more, and is lighter and more portable than a laptop;
  • Devs will stick to standard form factors for the forseeable future - I just can't imagine being able to develop off of a tablet... yet consultants will find these things really useful...

So what needs to change for the Tablet to hit the mainstream?

  • XP Tablet Edition needs to be incorporated into XP Home / Pro; the Tablet Edition of Xp was a bit of an experiment by MS, hence they released a separate version of the OS to cater for the Tablet PC; but if this is going to work in the long term, pen & ink needs to be a standard OS service;
  • The handwriting engine needs to be customisable to the user's writing style, to make it more effective;
  • ActiveSynch needs to be enhanced to synch not just PDAs to a main machine, but tablets too; for instance, I have a main machine at home that I have all my files on; I'd love to be able to work on a tablet on those files, then synch them back to the main machine, so if I feel the need to work at a desk with a larger screen I can do this without having to pull out my pen drive and manually copy files around.
  • The Tablet manufacturers need to create docking solutions that allow you to dock a tablet and use it as a desktop, with an external screen, speakers, etc this is almost there, & I think Motion Computing is definitely moving in the right direction with this;
  • The prices are going to have to come down; at the moment, the machines are under-specced (to bring the size down), and overpriced - something's gotta give;
  • More people need to be shown the virtues of the Tablet PC... just use OneNote & I think the cogs will begin turning;

Thursday, January 06, 2005

MS Anti-Spyware Beta

The beta version of the new MS anti-spyware software has been launched... follows on from Microsoft's acquisition of Giant Company (the anti-Spyware tool maker).

How Many Assemblies?

Back in the day, when VB was king, there was a simple model for the creation of an app's components: a single monolithic exe containing all of an app's logic. Sure, you might be using an n-tier model, and perhaps your back-end logic consisted of several components; but that UI was just one big file.

Even now, there are people around who still advocate this approach (such as Gavin, who I mentioned in a previous post). These folks prefer it this way because it's the way it's always been for them. When they load up a solution containing multiple projects, they take offense.

Let's clear one thing up first: a single monolithic assembly will perform better than several assemblies. There's an overhead in locating, loading, and initializing each assembly, so if you have just one it's obviously going to be faster. Yet, by the same token, if you ditch the n-tier model and lump everything onto a single server (i.e. the way mainframes work) you could also improve your performance by removing network latency (obviously, under load, this model won't work unless you have serious hardware). Another thing: on the client, where there's just a single user, the overhead of loading an assembly is pretty much nil.

Thing is, performance isn't the reason folks blench at the many assembly approach; it's simply because they're not used to it, and find it tricky navigating around the code; oh, and it takes Visual Studio longer to load the more projects you have in your solution. It's too much of a culture shock... so let's just have one project with everything in it. Better still, why not just shove all your logic behind the events in each form; why have multiple classes or methods when you can just have masses of code behind your event handling methods?

The approach I take is:
  • Develop reusable components; if certain custom controls are generic and can be used in other apps, put them in a separate assembly - you can't reuse them if they're embedded in an exe; similarly, if your app uses encryption then it makes sense to put encryption code (or even all code that relates to security) into a separate assembly, and so on; components should be small and specialised i.e. they do one thing and they do that one thing well;
  • Use object oriented principles; split your component into small, highly specialised classes - don't be tempted to just have a single class (who would do this?), or vaguely specified classes whose names end in Helper, or Utilities that contain unrelated flotsam and jetsam (i.e. don't treat classes as just things you put methods in - they are entities); like you, a class must have purpose in order to exist;
  • Methods should also be small and highly specialised; never put anything more than calls to methods into event handlers behind controls in forms; methods should never get very large if they only serve one specific purpose; write one thing once only, and reuse it (i.e. never duplicate logic, as it makes your code impossible to maintain and introduces bugs); you'll also find your code starts to become more readable - a small, specialised method will have a very specific name, making it immediately obvious what it does;

If you do this, you'll be amazed at how reusable your code becomes, from the method level up to the component level.

Wednesday, January 05, 2005

Another Shrimp?

Gambas is Visual Basic for Linux! In the author's own words:
I took from Visual Basic what I found useful : the Basic language, the
development environment, and the easiness to quickly make programs with user
interfaces.
But I dislike the very bad level of common Visual Basic
programmers, often due to bad pratices imposed by the bugs and strangeness of
this language. So I will try to make Gambas as coherent, logical and reliable as
possible, and I hope that Gambas programmers will make effort in return ! ;-)

Apparently it's been 3 years in the writing... I wonder if Gambas will do for Linux what VB did for Windows app development? Note there's also a similar (non-open source) tool called KBasic, which aims to support MacOS in the future.