2011-02-07

software that changes easily

I just read a blog : http://www.thoughtclusters.com/2011/01/software-for-multiple-customers/,
which talks about making software easy to change.

I think what he misses is that there are many levels at which the software can be made easy to change.
I think the level he is talking about is writing generic code, which allows developers to change the database implementation, or writing various configurable options.

If you do these things, it will take longer to go to market as the writer remarks.

You can however do other things, which will make the software easy to change.
  • A programming languages that allows changes to be made easily and safely
  • A powerful SCM tool that the developers actually know how to use.
  • tests that actually matter to the functionality of the product
  • A release process that has a fast track for critical changes
  • A lightweight release process
All of these things will make it easy to change your software, and therefore responsive to the customers needs.

2011-02-02

BPEL is not programming

In the brilliant MIT lectures (and book) Structure and Interpretation of Computer Programs, they talk about how to rate the worth of programming languages.

The two criteria are abstraction and combination.
  • Simply put, a good/powerful/useful language will allow you to use abstraction to simplify complex processing; ie hiding the details, while making the processing more general.
  • A good language will allow you to combine the language components in meaningful ways, that represent the relationship of those components. Good combination allows you to combine the user defined abstractions in the same ways as the built in language components. 
  • When abstraction and combination feed off each other, when you can abstract on the combination and combine abstractions; this is when you have a great language.
As this SOA guru says, BPEL isn't really programming.

The only kind of abstraction at all, is making a whole new service. Using the JDeveloper BPEL view, you can hide the details of the verbose xml source code; But then all you see is an overly simplified 'pictures of boxes' representations. For example an "assignment" block, with an optional user defined name. Simplified, yes; but not actually abstracted.
The lack of abstraction affects what little combination options there are.
BPEL gives you variables with XML types tied to your schema, other services which you can call, variable assignments, java code blobs, xsl transform, some simple exception handling, scoped blocks, and very simplistic control structures (if/else and loop), as well as a parallel block.

That may seem like a reasonable set of built in features, in particular the parallel block, but without subroutines or functions of any sort, without structures or objects; the kinds of combination are simplistic rather than simplified.
Each basic component can only be combined in prescribed ways with certain other built in components. This means that for example, the only data type is XML variable, so all of the transforms and assignments only operate on that one thing.
With no way to define new data types or functions, the kinds of combination are limited to the built in components, and the hard coded ways that they interact.

This language simplification doesn't even achieve the elusive idea of a "business person" being able to program in it. The overly simplistic nature of the language means that even programmers have a hard time with it.

A better way to attempt the non-programmer doing programming would be to develop an internal DSL, for the actual business domain. BPEL is not even close to something that high level. And it's not capable of building such a thing.

I don't think it actually deserves to be called a programming language.

It really does deserve the name BHell.

tablets are not taking over

Gah!, even paul graham has bought into the "tablets are taking over" bullshit.

I'm getting sick of this assumption that anything that apple brings out will be a complete success, and will change the computing world.

Tablets (whoever is making them) are just the next step for mobile phones in becoming more like the general computing device that most people have on their desk, or their lap.

The truth is, it was mobile phones that could do more than just make calls (ie feature phones), that really changed the mobile computing world.

According to wikipedia, in 2009 83% of all phones (in the US) were feature phones. It's only when a technology is ubiquitous, that its impact is fully felt.

And now, it's official; everyone in the world has a mobile phone, a fair number being feature phones: http://hothardware.com/News/ITU-Finds-2-Billion-Internet-Users-Worldwide-5-Billion-Mobile-Subscriptions/ . Ok not actually everyone (number of subscriptions != number of subscribers), but nearly one for every person.

It was when everyone started carrying a device around which enables one to take a video of an event, and send that video to all one's friends, or tweet to the world their every single thought and action; that's when things changed.

After that point, you are merely improving the user interface, adding more power, bigger screen, faster internet connection. It's all incremental (potential) improvement from there forward, not the giant leap forward that everyone seems to think it is.

I don't think that mobile devices which are deliberately crippled by having no call/sms/mms functionality, will have much of a future. This includes all "mobile" computers. It won't be long before "phones" have the computing power to do everything a netbook can do, and at that point, most people can do all of their computing on that one device.

These mobile computing devices will still just be called "phones" by most people, because whatever the device is, you'll still be carrying it around with you in your pocket like you carry your phone now. Even if you are using it for everything except making "telephone calls".

2011-01-19

code that will hack your mind

I've been reading an excellent book mind hacks on my kindle recently.

It describes the mind as a collection of parallel sub-processors which work together to form the conscious mind.
For instance there is a part of the brain which identifies shadows, and this processing is done very early in our visual processing. It is an over simplified process which helps to identify possible threats very quickly. A much more accurate process works on shape recognition, but this is also a slower process. This is a rational for people jumping at shadows, but quickly recovering.

The processing is done in parallel, but some results override others. A good experiment (illusion) to show this edge case is the colour and words recognition problem .
One sub-process of our mind is reading the words, (and normally brings the sound of each word into our mind as we read them).
Another part is recognising the actual colour of the text, and converting that colour sensation into a word.
In this case the illusion is caused by the sub-process that is reading the words overriding the colour recognition sub-process.
This collision shows the importance of these automatic processes in how we read and understand text.
There are other sub-processes which can collide with our word recognition, one of which is for recognising shapes. Our mind automatically looks for a meaningful shape in the image, which seems to have a white background and black foreground. It is only when our word recognition sub-process comes in that you can see the white word on black background. Once your mind has locked onto the word, it's difficult to see the amorphous black shape that you originally saw.

Now, we've all seen optical illusions before and it seems hard to believe that any of this affects you in your normal day to day life. These edge cases (illusions) are rarely seen in reality, mostly because when we're reading any substantial body of text (like this blog), it's pretty much always in black and white, and any images are nicely separated from the text. Even the structure of the text, the shape of each line and paragraph is pretty standardised. This ensures that our shape recognition sub-process doesn't interfere with reading, except when scanning through a body of text for a particular section. That's all true for almost all natural language that we encounter.

It is not the case for programming languages though.

This is the real reason that programmers get into so many arguments of tabs-vs-spaces and IDE wars over code auto-formatting, and syntax highlighting. It also explains why different languages are fought over so vehemently when it seems to outsiders like the similarities are greater than the differences between them. I want to show why all of this stuff really does matter.

It's all about hacking our minds.

The following points may seem stupidly obvious, or obviously wrong, but since there hasn't been any research into this that I know of, they're have to be assumptions.
  1. When reading code, the mind uses same processes as when reading natural language.
  2. Some part is trying to recognise whole words, and define the meaning of the word.
  3. Some part of brain is trying to say each word (token) out load, with punctuation either ignored or used to structure the rhythm of the word sounds.
  4. Some part is looking for meaningful shapes in the code, to determine relatedness and structure.
 This has some implications for source code.

2. implies that words (tokens) must have meaningful names, which sounds stupidly obvious; but it's something people still ignore. They must be obvious and simple names that we recognise instantly. Otherwise we work against the automatic word recognition our minds have.
3. implies that our source code should be pronounceable. Actually speak your code out loud. Does it make sense to someone else if you say it out loud? Does it flow properly, or does it have a stunted rhythm.
4. implies that blocks of code should have a meaningful shape. People are aware of this when it's done badly, but it's rarely seen as an image problem. Usually it's treated more like structuring paragraphs, when we should be using the source code and punctuation to show pictorially what the code means.

I would really like to have some code examples here, but that would actually require getting this stuff right. Which means lots of experimentation.

I will,

if I get time,

... later.

java design principals

The design principals behind smalltalk could easily describe the design principals behind java.

keyboard of the future

I've had a few years of very painful RSI in my forearms, due to working in a stressful office environment, spending most of my time at a desk with a mouse and keyboard.
In a constant search for things to help with the pain, I've gone through a long list of pointing and typing devices.
I've tried split keyboards, sideways mice, trackballs, rollermouse; even using a web cam to track head movement to control the mouse.
I was most recently using an ergonomic keyboard at work kinesis-freestyle with a extra touchpad and a microsoft ergonomic keyboard (at home).

after reading the-keyboard-cult  I thought I should try mechanical keyboards.
I looked at daskeyboard, happy hacker, miniguru (which may come out in kit form) and some others, but they were either very expensive or ugly.

Then I found the razer blackwidow.

I have a couple of razer gaming mice at home, and hard mice mats which are both great. So I thought I'd give the blackwidow a go.
  • It has mechanical switches (Cherry MX Blue) - clicky and tactile.
  • It is fully and easily programmable - I set up my dvorak+Caps is ctrl setup in a manner of minutes
  • It's all black - matte keys and gloss body
I'm very happy with it!

I'm not sure about the other mechanical keyboards available, but this one allows you to program every single key with a different key or macro for each profile (apart from the FN which is used to select profiles). It will even switch profiles automatically for different programs.

best part is, I got one from CPL for only $109 :D

I've heard some people complain about the noise level, but I wouldn't say it would bother anyone.
The feel is very much like a mouse click, and as a result I do think it makes a difference in how heavy handed my typing is.
I think that only pushing on the keys until the click is felt (and heard) should make a difference to my RSI as well, as it is more gently on the fingers.

Looks great, feels good, will save time (via macros) and doesn't cost $350 :P

I can't imagine going back to my old keyboards ..... I may just have to get one for home as well ;).