Aug 172010
 

The government have announced that they plan to ban clamping cars who park illegally in the new year. The excuse is that “rogue” clampers are endemic to the industry and despite a number of attempts at cleaning up the industry, they survive. Of course anyone who has been clamped is celebrating.

But is it really a good thing?

We have heard on the news from clampers and victims of clamping, but we have not heard from anyone who employs clampers to protect their property. And it is not always evil people who see a money-making opportunity. Sometimes there are good reasons to protect against illegal parking.

Many people perhaps do not realise just how aggravating and potentially dangerous illegal parking can be. Taking an extreme at the low end where clamping currently is not employed (but should be!), my flat is in a block which has a small narrow courtyard behind the building which is open to the road.

There are admittedly no notices up to indicate that parking is illegal, but you would have to be really dumb not to realise that it is private property. Parking there not only means that the council frequently finds it difficult to collect the rubbish, but the area is supposed to be kept clear as it is a fire exit and access for fire engines in the event of a fire. People parking there put the resident’s lives at risk.

Do they care ? Don’t make me laugh. On almost every day, there will be two or three cars parked there.

Aug 112010
 

Ten years ago? Bloomin’ heck! Still as this still seems to get frequent hits, I suppose quick update is in order – I no longer use the Unicomp “naked” but go through a Soarer converter which is an easier way of mapping the keys and allows macros to be added.

Thanks to these guys (the thread eventually gets to the meaty details), I have changed my Unicomp 122-key keyboard (UB40T56) from a funky “be friendly to Windows IBM Terminal emulators” mode into something a little more interesting. Specifically each key should be sending a unique keycode – which if you select the right model from Unicomp, you’ll get.

This can be done by opening up the keyboard and removing the jumper from JP3 (just below a small chip and close to the scroll LED). In addition, it is strongly suggested that you set the kernel parameter “atkbd.softraw=0” which can be done with Ubuntu 10.04 with the following :-

  1. Edit /etc/default/grub and change the variable GRUB_CMDLINE_LINUX_DEFAULT to include “atkbd.softraw=0” at the end of what is already there.
  2. Finish editing and run grub-update and finally reboot.

Without this, showkey -s only shows the scancodes of keys that the kernel knows about – not what scancodes are sent by the keyboard! It is possible to show the unknown scancodes by enabling the i8042 module debug mode, but atkbd.softraw does the same thing more effectively.

This is currently a work in progress, and will need further checking before it can be taken as gospel, but …

Group Key Make Break Keycode
Function Keys
F13 5b db
F14 5c dc 95
F15 5d dd 183
F16 63 e3
F17 64 e4
F18 65 e5
F19 66 e6
F20 67 e7
F21 68 e8
F22 69 e9
F23 6a ea
F24 6b eb
(next row) F1 3b bb 59
F2 3c bc 60
F3 3d bd 61
F4 3e be 62
F5 3f bf 63
F6 40 c0 64
F7 41 c1 65
F8 42 c2 66
F9 43 c3 67
F10 44 c4 68
F11 57 d7 87
F12 58 d8 88
Left Keypad (Top left is “Esc”)
Esc 7e fe 121
Cent 76 f6 85
Print Screen 72 f2
Pause e1 1d 45 e1 9d c5 119
Print 74 f4
Help 6d ed
Record e0 2a e0 37 e0 b7 e0 aa 99
Play 6f ef
GUI (Windows) 75 f5
Menu 6c ec
Editing Pad (between QWERTY and Number Pad)
Backtab 5a da
Insert e0 49 e0 c9 104
PageUp e0 51 e0 d1 109
(next row) Blue Return e0 4f e0 cf 107
Delete e0 52 e0 d2 110
Page Down e0 53 e0 d3 111
(next row) Up Arrow e0 48 e0 c8 103
(next row) Left Arrow e0 4b e0 cb 105
Home e0 47 e0 c7 102
Right Arrow e0 4d e0 cd 106
(next row) Down Arrow e0 50 e0 d0 108
Number Pad
(top row) End 01 81 1
Scroll Lock 46 c6 70
(shifted Scroll Lock) Number Lock 45 c5 69
/ 37 b7 55
* e0 c5 e0 b5 98
(next row) KP-7 47 c7 71
KP-8 48 c8 72
KP-9 49 c9 73
4e ce 78
(next row) KP-4 41 cb 75
KP-5 4c cc 76
KP-6 4d cd 77
+ 4a ca 74
(next row) KP-1 4f cf 79
KP-2 50 d0 80
KP-3 51 d1 81
Enter e0 1c e0 9c 96
(next row) KP-0 52 d2 82
KP-. 53 d3 83
  • Group. To break things up a little, I’ve grouped the keys into the 5 separate parts of the keyboard – the function keys, the keypad to the left, the qwerty pad, the editing pad, and the number pad (“keypad”). The details of the qwerty pad will be the last as the other groups are more interesting (‘qwerty’ keys just work).
  • Key. This is the label on the key on my keyboard. This may be different on different variants so in all cases I have started with the top left, worked left and down (the “qwerty” row before the “asdf” row).
  • Make. This is the scancode produced when the key is pressed.
  • Break. This is the scancode produced when the key is released.
  • Keycode. The configured keycode produced on the Linux console. The red cells are values that are wrong, but in addition many are missing because they are not produced on a keypress. I say wrong because the keycode gives a result that does not match the key legend – in some cases dangerously wrong such as PageDown generating Delete. One thing to be aware of is that you must use “showkey -k” at the console to get the same numbers I have – X seems to add 8 to each keycode.

Three interesting oddities here … F14 and F15 have somehow been graced with keycodes by default; their scan codes must coincide with keys defined on more popular keyboards. And of course Num Lock and Scroll Lock sharing the same key is a little … odd. And lastly the Record key is effectively sending two keystrokes in one.

Fixing The Wrong Keys

The first place to start is to map the keys that return a keycode that represents a key other than that written on the keycap – such as the key marked “End” which thinks it is an “Esc” key. I have left out two of the wrong keys from this group as they fit better into the next section.

The wrong keys can be fixed with the following commands :-

setkeycodes 7e         1    # Esc
setkeycodes e049      82    # Insert
setkeycodes e051     105    # PageUp
setkeycodes e052     111    # Delete
setkeycodes e053     109    # PageDown
setkeycodes 01       107    # End
setkeycodes 37        98    # KP-/
setkeycodes e035      55    # KP-*
setkeycodes 4e        74    # KP--
setkeycodes 4a        78    # KP-+

I have left out a couple of the wrong keys from this section as they do not return dangerously incorrect values, and they fit more logically into the next section (being Record and Blue Return).

Dealing With The Extra Keys

Now onto dealing with the extra keys. The tricky bit here was coming up with new keycodes for these keys that did not conflict with existing keycodes, and were reasonable. This is effectively impossible, as xmodmap -pk appears to show no significant range of unused keycodes although some of the used keycodes are for things like “Shop” buttons!

So I picked a range with a larger number of useless key symbols and some unused ones :-

setkeycodes 5b       222    # F13
setkeycodes 5c       223    # F14
setkeycodes 5d       224    # F15
setkeycodes 63       225    # F16
setkeycodes 64       237    # F17
setkeycodes 65       238    # F18
setkeycodes 66       228    # F19
setkeycodes 67       229    # F20
setkeycodes 68       230    # F21
setkeycodes 69       231    # F22
setkeycodes 6a       232    # F23
setkeycodes 6b       233    # F24
setkeycodes 72        99    # Record (after keyswap)
setkeycodes 74       209    # Print
setkeycodes 6d       138    # Help
setkeycodes 6f       239    # Play
setkeycodes 75       234    # Windows (GUI)
setkeycodes 6c       240    # Menu
setkeycodes 5a       235    # Backtab
setkeycodes e04f     236    # BlueReturn

Once this has run, we can look at fixing the X mappings … which is why F17 and F18 are out of sequence in the above! One key has to be (at least until someone comes up with a better solution!) sorted out with a keycap swap. Take the keycap from the Record key and swap it for the one marked “Print Screen”. This is because the scancode for Record is effectively two scancodes in one and attempting to remap it will result in strange things happening.

Sorting Out X11

Once you have a set of keycodes that don’t do funny things under X (for instance F17 and F18 when in sequence produce not a keystroke under X11 but some other event), you can move onto configuring the X keyboard. The following attempts to map as close to the keycaps as possible without going to extremes :-

xmodmap -e "keycode 230 = F13"
xmodmap -e "keycode 231 = F14"
xmodmap -e "keycode 232 = F15"
xmodmap -e "keycode 233 = F16"
xmodmap -e "keycode 245 = F17"
xmodmap -e "keycode 246 = F18"
xmodmap -e "keycode 236 = F19"
xmodmap -e "keycode 237 = F20"
xmodmap -e "keycode 238 = F21"
xmodmap -e "keycode 239 = F22"
xmodmap -e "keycode 240 = F23"
xmodmap -e "keycode 241 = F24"
xmodmap -e "keycode 217 = Print"
xmodmap -e "keycode 9 = Escape 3270_Attn"
xmodmap -e "keycode  93 = cent bar"
xmodmap -e "keycode 175 = 3270_Record"
xmodmap -e "keycode 175 ="
xmodmap -e "keycode 247 = 3270_Play"
xmodmap -e "keycode 242 = Super_L"
xmodmap -e "keycode 248 = Multi_key"
xmodmap -e "keycode 243 = 3270_BackTab"
xmodmap -e "keycode 118 = Insert 3270_Duplicate"
xmodmap -e "keycode 112 = Prior 3270_Jump"
xmodmap -e "keycode 117 = Next 3270_Rule"

This results in a keyboard that more or less matches the key caps. For some of the blue symbols, you press the key in combination with shift.

The number pad could do with a little more attention in the realm of X-mapping, and there are a few blue symbols on the main qwerty pad that might be usefully mapped, but this is sufficient for my purposes.

Jul 312010
 

Today we hear that Ian Huntley is to claim compensation for the lack of care that allowed another inmate to slash his throat in an attempt on his life.

No problem. Just pay out.

Then seize the money under the proceeds of crime act – after all he wouldn’t be in prison if he hadn’t committed the Soham Murders, and the other inmate wouldn’t have slashed his throat if he hadn’t been a notorious murderer.

But the prison authorities should be hauled onto the carpet to query why this attack on him happened. He may be a notorious murderer, but he is entitled to protection from other inmates no matter how bad his crimes were.

Jul 242010
 

This is not so much a review, as a collection of random thoughts that occur to me as I get used to my iPhone4. As such, you may well see it change over the month ahead as I get used to it.

Firstly, the shiny glass back cover means I cannot just put the new iPhone on the arm of my chair. The old iPhone (a 3G) sits quite happily there, but the new one is far too keen to slide off. Worth bearing in mind if you’re used to a “sticky” iPhone – wouldn’t want you to have an accident with a brand new phone!

Next is the special coating the glass gets to prevent fingerprints. Nice try, but they can still appear. Of course today my fingers are especially sweaty and greasy so although some prints are showing up, the screen is a good deal better than older iPhones would have been.

Finally (for now), and this one is hardly Apple’s faulty, but there are some applications out there that lose data when you go through a backup old phone and restore to new phone. This is definitely a bug in those applications, and I’m sure they know who they are, because better written applications didn’t lose a bit of data. Apple itself does in fact lose passwords, but I would guess this is a security measure to ensure that stored passwords can’t be “hacked” by restoring a stolen phone backup onto another phone.

The new iPhone does not give an initial impression of being significantly smaller than the old iPhone – even though for the first weekend I was shuffling between old and new phones. But it does seem a lot smaller as soon as you start carrying it around – it feels quite a bit smaller in the pocket.

The known problems with the aerial are obviously a serious issue for those effected, but I suspect the number of sufferers is smaller than the impression given online. After all complaints are louder than the sounds of satisfaction. Certainly I have not seen the issue myself.

Jul 242010
 

Some geezer called Digby Jones has been pontificating about how Universities should be looking at offering more vocational qualifications. Fair enough; anyone no matter how ignorant is perfectly free to ramble on about anything they want to. But should we pay attention ?

Well the idea of offering vocational qualifications is such a great idea that Universities have been doing it for centuries – they call it the “degree”. One of the first degrees ever offered at any of the truly old Universities was a subject called Theology, which doesn’t sound especially vocational now (although it is – what qualifications do you think are useful for Bishops?), but was very vocational at the time. The Church (of Rome then) was desperate for more educated priests – there are records of Bishops insisting that uneducated priests be sent to various Universities to get a basic education, and of course the career prospects for an educated man at the time were pretty much limited to the Church or the Law. And of course Universities offered degrees in Law too.

It is easy to see how the “hard” subjects such as science, engineering, geology, etc. are very much vocational, but all of the so called “soft” subjects are very much vocational too. In some cases the vocational aspect of degrees such as history, or philosophy are not immediately of use to business but that does not make them any less vocational (historians need job training too!), or any less valuable.

And more than that, a degree is about teaching someone to think and study on their own, and  work on projects with other people. Are these not skills that businesses need ?

Our friend Digby insists that Universities should be talking to businesses about what subjects they should be teaching students to assist business. Well first of all, business is not the only type of organisation to take on graduates – Universities have a responsibility to train students going into government, the church, and Universities too! Secondly Universities are perfectly willing to talk to businesses about the degrees they offer.

Perhaps it should be businesses who should be a little more pro-active about talking to Universities!

If Digby Jones were to come up with a half decent degree proposal, he would probably find any number of academics knocking on his door ready to turn it into a course. And if the market finds it good, he will find students eager to sign up and qualify as “Digby clones”.

Yes the free market is at work within the University sector (complete with government interference) – students choose which degree courses they want; popular courses survive and prosper and unpopular ones wither and eventually disappear. One of the long running criticisms of Universities is that they do not turn out enough good scientists and engineers; well to fix that we need to make the students opt to go for those degrees.