Domain Specific Languages vs. UML

I’ve been keeping a sceptical eye on Software Factories and Model Driven Architecture (MDA) for some time so I was very interested to see a Domain Specific Language (DSL) API spring up in the latest drop of Visual Studio. I thought I’d better do some reading around the area to try and understand its goals. During my "travels" around the web I came across the following blog, Jack Greenfield’s Blog. Amongst other things it talks about an on going debate about using UML for MDA (and for Software Factories in general) vs. DSL. Now all the arguments for and against each one are all very interesting and exactly the sort of thing to get real-ale drinking software architectures in a bother, however for me there is one clear advantage for DSL…the average user. I don’t think I’d be burnt at the stake for suggesting that as good as UML is, the majority of people successfully cherry pick UML in order to describe/document their solution, very few would take it through every stage. Again I don’t really want to get into a debate about why people don’t use UML I just want to state that, rightly or wrongly, people don’t believe it is some kind of silver bullet/fits-all language. This brings me to my point (hurray), so far I’ve been talking about people in the software business what hope have we in convincing Joe public to use UML? As much as we like to make our solutions generic it often becomes more complicated for the average user. Did the average user welcome the fact that they could use VBA in Word and Excel? Sure the developers (and hackers) did but did the average user? I’d suggest not. What the user wants is something that talks in the language they understand. So for Word they’d probably want something that talks about text changes, font formatting, picture adjustments, spelling, etc. For Excel formulas, statistics, graphs, etc. Now sure there is some common ground that could be exploited but basically the domains are different. So assuming that I’ve established that the user wants domain specific tools how to best address that? This is where the arguments of DSL vs. UML step in. But wait, if we can’t convince the software development community about UML how on Earth are we going to convince Joe public, surely it will be better to provide specialised DSL for the users problem domain? "But they’d have to learn a new tool/language for every one", I hear you cry. True, partly. This brings me back the cherry picking of UML. Personally I feel UML is too verbose and clumsy to be used "correctly", but what it is great at is conveying ideas and requirements without necessarily concretely specifying them. E.g. I can draw an interaction diagram describing how to spell check and save a Word document, but I wouldn’t feel it necessary to write out a full class specification for a Word document so I could include it in the interaction. I realise this might shock the purists but I’d argue that the real goal of UML is to successfully convey the requirements and to describe the solution. I believe it is successful at this because the concepts of shapes and flow are pretty easy to understand even without formal training. Therefore I believe that providing you implement your DSL using fairly simple concepts but still talk in the context of the domain you can take the reusable parts of UML and still provide the average user with a toolset they can understand.

Visual Studio 2005 and Remote Desktop

For some strange reason Visual Studio runs really poorly in a Remote Desktop session. I guess it’s something to do with not being the main interactive desktop? Anyway one way around this problem is to use the lesser known /Console flag when starting up the Remote Desktop client…mstsc.exe /console
 
This enables you to access the interactive console and VS2005 works again. Of course its also useful for grabbing the current users console but not great if you’re trying to share the machine. Still you’re unlikely to be wanting to share VS2005 between many users, it’s not exactly shy when it comes to resources.
 

Remote Debugging using Visual Studio 2003

I got into one of those situations when I need to debug a bit of software of a server but I couldn’t install Visual Studio. So for the first time I stepped into the world of remote debugging. It was actually fairly painless, although I did cheat and went the not-recommend route of adding, ahem, myself to the local administrators group.
The basic steps are…
  1. Install remote components (not full blown Visual Studio), found in the install root of VS. A bit annoying you have to install anything but the client was ok with this
  2. Add your interactive user into the remote servers "debug users" group (and possibly the administrators account or discover the permission necessary to access a running process)
  3. On the remote server run; msvcmon -tcpip -anyuser Note that you can specify the correct user but if you’re not too concerned about security then this is a simple short-cut. Also read what it says, it will stop listening after a period of time (15 mins by default) 
  4. In Visual Studio open the process dialog and type in the name of the server
  5. Attach to the process and off you go

Apparently you can start the remote process off from Visual Studio too, but for some reason it wouldn’t let me specify the location. Since I was using Remote Desktop to control the program on the server it wasn’t a problem.

Wake Up On Lan

Recently I’ve wanted to remotely start up machines, either because a machine the other end of VPN is down or I can’t be bothered to walk upstairs and turn on a desktop file server whilst using a laptop! What started off as a simple process seemed to have a number of gotcha’s that I thought I’d record.
 
The basic premise is that if your machine has a network card that support Wake Up On Lan (WOL) then if you enable this setting you can…wake the machine up via the network. There seem to be various ways of doing this but I chose the "Magic Number" approach using a utility called MC-WOL.EXE.
 
The basic steps in using this little program are:
  1. You first need to discover the MAC address of the network card in question. To do this I ran a command window on the target machine and entered "IPCONFIG /ALL". Note down the address of the card, it’s not the IP address but a series of hex numbers normally "-" separated.
  2. Ensure the machine’s BIOS is configured to accept WOL. This usually requires rebooting your machine and going into the "setup" for the BIOS. Locate your network settings and ensure that WOL is enabled. Note that on some systems you can have conflicting settings. So Wake Up from Hibernation settings often conflict, see you BIOS/Motherboard settings for more details.
  3. Switch your machine off and run MC-WOL from another machine.

This should work, however there are a number of gotcha’s.

  1. Firewalls. I only use this via a LAN or VPN so I’ve not had this problem but for sensible reasons a firewall can get in the way of your call. This is good news since you don’t want people on the internet starting your machines up.
  2. "Soft" and "Hard" shutdowns. This was the first time I’d come across this concept. You can shut a machine down in two different ways. For example, pressing Shutdown in Windows produces a Soft shutdown and the machine can normally be woken up. Hold the power button and switching the machine off results in a Hard shutdown and it won’t wake up. This is annoying since the reason you want to wake a machine might be because someone’s turned it off or ’cause of power cut, et al.
  3. Operating System settings. The BIOS changes aren’t always enough. Sometimes you have to go into Hardware Manager, select the network card and look at its settings. My cards have "Use Magic Number" or "Enable WOL". As you see there doesn’t seem to be a standard so look for something that sounds like Wake Up…not great instructions but there you go.

Testing for Safari when you don’t have OSX

Developing using Microsoft technologies can make it expensive to test your site for other browsers and platforms. IE, Firefox and Opera can ease (or maybe that’s make things harder) to test your site. However, the big bugbear is OSXs Safari. Well until the OSX86 project managers to make it legal to run OSX on any PC I think it boils down to…
  1. Buy a Mac – nice if you afford it
  2. Use a screen shot service – pain to use if your site has any kind of dynamic changes, lets face it they’re a pain to use full stop
  3. Use another KDE based browser

Option 3 is the one I’m currently recommending. Safari is based upon the KDE browser engine, so why not use another browser that uses the same fundamental rendering engine, e.g. Konqueror. Well, the first problem is if you’re running Windows there currently isn’t a version for good ole’ Windows. The answer is turn to Linux, well sort of. My advice is to get hold of the VMWare player with a downloaded image of your favourite flavour of Linux, mine is Ubuntu (if only for the name). Install Konqueror and off you go, Safari like browsing without OSX. It’s not a 100% guarantee, but you’ll iron out the most obvious problems.

 

 

Search Engine Optimizations

I was "lucky" enough this weekend to attend a local seminar small businesses. One of the lectures was on Search Engine Optimisations (SEO). The audiance was a mixture of people who just about knew what a keyboard was ranging to people writing classic ASP code. As you can imagine the range of questions was equally varied. However, the lectured dealt with matters pretty well and although he did give a few ideas about how to, "drive traffic to your site" overall I’d have to agree with Hannah Watkins from Clear Breeze Design when she talks about "How can I get to the top of the search engine rankings". You can attempt to discover all the tricks you want, but ultimatley the only sure way to get a good ranking is to have relevant content.