Wolfram|Alpha

Ξ June 5th, 2009 | → 0 Comments | ∇ Software, Technical, Writing |

Thought it might be interesting to post these here. A two part article on Wolfram|Alpha I did for Computer Weekly [WARNING: may contain traces of coin tossing references].

Here’s a pdf of the first bit, and here’s a link to the edited version on Computer Weekly’s website.

And – wait for it …

Here’s a pdf of the second bit, and here’s a link to the edited version on Computer Weekly’s website.

Just in case you do compare the version, I should add that I did some minor edits after they were sent in.

 

Remember ALL Firefox Passwords

Ξ April 26th, 2009 | → 0 Comments | ∇ Coding, Geeky, Software |

There are a few websites that really piss me off – in that I cannot get Firefox to remember my username/password on them.  Ok, I understand why they’ve taken steps to prevent one from doing so, but, as I’m quite confident that I’ve secured my saved passwords, it pisses me off.

Anyway, here’s how to fix the ‘problem’.

1. Locate Firefox’s installation folder. Normally that’s C:\Program Files\Mozilla Firefox

2. Navigate to the components folder.

3. Open nsLoginManager.js in an editor.  As Notepad won’t do really, do this instead [if you've a proper editor, just go to step 4]:

3a) Select  Start | Run

3b) Enter cmd <enter or Ok>

3c) type cd C:\Program Files\Mozilla Firefox\components <enter>

3d) type edit nsLoginManager.js <enter>

3e) Go to step 4.

4. Find this:

    /*
     * _isAutoCompleteDisabled
     *
     * Returns true if the page requests autocomplete be disabled for the
     * specified form input.
     */
    _isAutocompleteDisabled :  function (element) {
        if (element && element.hasAttribute("autocomplete") &&
            element.getAttribute("autocomplete").toLowerCase() == "off")
            return true;

        return false;
    },

5. Change it to this:

    /*
     * _isAutoCompleteDisabled
     *
     * Returns true if the page requests autocomplete be disabled for the
     * specified form input.
     */
    _isAutocompleteDisabled :  function (element) {
        return false;
    },

6. Save the file [if you're following the 3x) steps above, select File | Exit, and when asked if you want to save the edited file, answer Yes.  To close the command prompt, enter exit <enter>].

Note that you might first have to change the file’s security permissions to do this [you DO if the save fails].  E.g., in Vista I had to A) right-click on the file [e.g., in Explorer] B) select Properties | Security. B) select Edit. C) select your username, D) change the persmissions to include Write access.

And you’re done – either start, or close/re-start Firefox!

n.b. If you want to know ‘why’ this works, see http://www.w3schools.com/tags/html5_input.asp – then autocomplete, disabled

Basically, by making these changes you’re saying that any element may be ‘auto completed’; so if an input field on a page includes <input autocomplete=”off” … />, when Firefox checks, the field will appear to be marked autocomplete=”on” instead.

 

Livescribe Smartpen – 2Gb Model

Ξ March 31st, 2009 | → 1 Comments | ∇ Geeky, Software, Technology |

So, I’m a bit of a gadget freak, but not the type that would buy any gadget – simply because it seems, um, cool [Mmmm].

I saw Livescribe’s Pulse SmartPen on a ‘must have’ list I stumbled upon; and, as my partner and I are both academics – and as such, both ‘send’ and ‘receive’ lectures/talks, we thought it worth investigating, and, to cut a boring story short, we decided [well she did – she’s got the money!], to buy one – the BIG 2Gb model.

Unfortunately, Livescribe – who offer the best price on their own products [duh!] – don’t ship outside of the USA. Something you only discover once you’ve got into the ordering process; once it’s in your ‘cart’. So, suggestion to Livescribe – perhaps make this ‘crystal’ on the initial Buy page?

After shopping around, we found that a lot of places in the UK were ‘out of stock’, yet ‘expecting delivery soon’ – which means, IMHO, avoid like the plague! If a website doesn’t say something’s in stock, one should move along.

We eventually went and found the 2Gb model on bitesizedeals.co.uk and, ordered the 2GB Bundle for £199 – saving £50 apparently. Which, if really true, is a great deal!

A couple of days later, our Livescribe arrived in a very big box.

The box contained:

  • 2Gb Pulse Smartpen [in a smaller box (above)]
  • 3-D Recording Headset
  • 5 x 200 sheet notebooks [dot paper], college-ruled, and colour coded
  • USB mobile charging cradle
  • Smartpen case
  • 2 x 3 black fine point ink cartridges + 1 stylus cartridge
  • Demo card and interactive stickers
  • Interactive Getting Started Guide

Note there’s no software provided – other than what’s resident in the pen of course. For the PC/Mac side of things you go and get the Livescribe Desktop software as a download.

The install of that was smooth, and the application looks and feels very professional.

I like software to be VERY intuitive [as I’m pretty sure you do], and so I never read a manual, unless I just can’t progress through simply figuring it out. I’ll have more on this aspect of the desktop software later.

When the pen was first attached, I went and found ‘Check for Updates’, and there were lots:

Sorry that’s a little small, but to get an idea of how many there are, notice the size of the scrollbar on the right of the list.

However, this is good news! I.e., it’s nice to know [or at least suspect] that Livescribe are keen to improve their product; and, as they do that, issue lots of updates. Of course, one could also take another view: that Livescribe ship buggy software – that is problematic, been reported n times, and, as a result, have been forced to make a very large number of changes to its product!  I never tried the pen with whatever versions of things it came packed with [so can’t comment on whether it seemed buggy at all], but I take the former of the two views expressed above.  And hey, why would you want to use a product’s software ‘as is’ when there are updates available; which will surely only improve things?

Anyway, the update was smooth.

So, now to try it!

The pen comes with a tutorial/quick-start thingmy which was well worth working through – and I won’t describe it here, and instead show you a picture of me working through it!

The tutorial was easy to follow, smooth, and, I think, pretty much walked you through everything you need to know to get ‘fully functional’.

Be sure to watch the videos of how the pen and the software works here – use the thumbnails at the bottom of the page to walk-through more-or-less everything to do with this gadget.

Ok, so in summary, the pen is awesome!  A truly remarkable and wonderful tool that I would recommend purchasing to anyone that takes notes.

But …

Criticisms:  I have but 3 [so far].

1. The desktop software is, IMHO, not *that* intuitive – and I still find my self clicking on non-functional items – and/or ‘right clicking’ on things to bring up a context-menu that simply don’t exist.  For example, to remove an item from the desktop software, or the pen, you have to highlight the item and then use the top-level menu to select the deletion option.  This really should be on a menu accessed via right-clicking on an item.

The desktop software seems well written, i.e., it’s ultimately functional, but, for me, well, it just doesn’t really satisfy.

2. It seems to me that there is an obvious missing feature.  You can tansfer your files to your Livescribe Desktop, and from there transfer them to your shared space on Livescribe’s own website via Livescribe Online [a really cool feature].  However, you cannot transfer files *back* to the pen once they’ve been moved off of it!  And that’s just dumb!

Ok, so with a 2Gb pen it might be a rare event – to move things off to make space – but, if you do, you’ll be stuck with never being able to use your hand-written notes with the pen ever again.  A few other people have noted their own surprise at this missing feature on Livescribe’s forum pages, and it seems that it might yet appear at some future date.  And that would be great!

3. Livescribe Technical Support seem to take around 24 hours to respond to queries.  Ok, so I only had two ‘trips’ to the support email address, but that was what I found – it’s sloooow!

Link: a YouTube search featuring the Livescribe Smartpen.

Link: google search for ‘Livescribe review’.

 

Daily Scans are Pointless

Ξ January 27th, 2009 | → 0 Comments | ∇ Geeky, Rant, Software, Windows |

“Daily Scans are Pointless” – to the tune of “Every Sperm is Sacred”!

I’m a real fan of AVG’s anti-virus [AV], but for the life of me I can’t understand why, by default, it wants to do a daily scan.

“Please note that by default, the Whole Computer Scan is already scheduled to run every day.”

Actually, I should briefly ‘back up’ and say that until fairly recently, I actually rated most AV programs as next to useless, and that it’s the operating system that should ‘get more a grip’ on protecting its users! I wrote a piece on this for Computer Weekly back in 2002 – although I can’t remember if it was published [I was doing ‘Thought for the Day’ things for them back then]. Anyway, I’ll post that in another article and link to it here.

Back to ‘scanning’ then!

Any decent AV program hooks into the operating-system and scans a file for viruses, etc. whenever it’s accessed. Therefore, why do a scan? If a file is infected, but not being accessed, why worry about it?

Of course, it may be that you’ve got a virus in some file, and yet it’s only recently that your AV’s been trained to recognise it [see the other article], but again, what’s the problem there? I repeat: if an infected file’s not being accessed, why worry about it – when and if it is accessed, it’ll be caught.

Think about how many AVG installations there are in the world. Think about how many people go with the default ‘scan every day’ option. Think about how much energy that uses! Think about all of the other AV vendors that also do daily scans by default now!

Also, and anyway, scanning on any modern Windows machine could be greatly speeded up because the operating-system can keep a journal of exactly what’s changed on a drive – that’s over reboots too. This technology has been there since Windows 2000, so why scan everything anyway? Only scan what’s been changed/added if you want to find ‘new stuff’ – but again, why even bother with that? Wait until an infected file is accessed – and fix it then!

 

Death at the Speed of Light

Ξ January 27th, 2009 | → 0 Comments | ∇ Geeky, Software, Technical, Windows |

This missive from 2002 is here simply because it’s referenced from this.

Or, was it this? Dunno … I’m as ‘confused’ as normal!

Antivirus programs cannot truly protect you and, at worst, lure you into a false sense of security; and, I’ll tell you why…

The State of ‘Play’ Today:

• Way back, computer-viruses were transmitted via floppy disk – slowly, from one machine to another.

If the virus was known, and the destination machine had an up-to-date anti-virus program on it, further spread could be prevented as an infected file was accessed.

• Then came networks – but these too could be kept reasonably safe, so long as the ‘entry-point’ (floppy disk-drive) onto that network was protected – as above.

• Then came the Internet – in lots of ways the Internet is just a big network – the ‘EWAN’ – the ‘Extraordinary-Wide-Area Network’. Now it’s getting kinda tricky to protect yourself.

The main thing is that, in order to catch a virus, your anti-virus program has to first know that it exists.

It’s like the way the Flu jab works – you get innoculated against the strain that is predicted to hit the country: not ‘the Flu’ per se. However, if a different strain hits you – well, you’ll get the Flu! Viruses – real or cyber – have signatures, and you can only be immunised against known entities.

With the Internet, it’s quite possible that you’ll get hit by a new strain before an antidote can be prepared by your anti-virus program’s vendor.

Take the way viruses use email programs to move themselves about nowadays – it goes like this:

• Someone gets a virus (somehow)
• It does its damage and then emails a copy of itself to everyone in his or her contacts-list/in-box, etc.
• When the recipients get it, it does the same for them – this is Exponential!

So, in no time at all, it spreads (successfully) like wildfire – as, remember, we’re pretty much all connected at the speed of light now – and your antivirus hasn’t been informed about this new strain yet!

Anyway, some poor soul ultimately discovers that this thing is a self-replicating virus – and (if they can be bothered – as it’s too late for them) they notify Norton, Symantec, AVG, blah blah blah. In a bit, they all confirm that it is indeed a virus, and work out a fix – time ticks by. They then issue this on their web-sites. Hopefully, you’ve got an ‘Active Update’ kind of program running at your end (or do you have to periodically check for updates yourself!?), and quite soon (this is usually based on a pull rather push model – so you probably update once in 24 hours) you’ll get the fix! However, will it all be too late when it arrives? You bet ya! The likelihood of this is almost certainly proportional to the value of your data of course!

So, are anti-virus programs really worth having? Well, broadly speaking, I say ‘no’. What’s needed is better technology – viruses could be caught by the operating-system – and they should be!

In order for a virus to work, it needs to be executed: either directly, or by some other already-executing-process. Now, the operating-system is the thing that creates processes; and as such it can learn what they access. So, if the operating-system were a bit more picky about what processes it’ll start ‘automagically’, well … these things could be caught very effectively.

Imagine, you double-click what looks like an Excel file-attachment appearing in your email. However, the operating-system sees that the file is actually an executable. Next, it checks to see if this executable has been run on your machine before and, if it hasn’t, it simply asks you – “Are you sure you want to run this PROGRAM?”. You answer ‘no way’. Problem solved. How about if the virus infects Excel itself – and runs as some sort of extension to the program though? Well, hopefully you’ll have run Excel a few times before, and the operating system can learn about its habits? For example, should Excel now try to access your Firefox settings, or start trawling your folders for a Microsoft Money file, one would hope that the operating system might think that this is all a bit peculiar, and ask you about it [suspending Excel while it consults you of course].

Alternatively, this kind of approach – where the operating-system is rather more proactive – could be extended to anything that has write-access to your hard disk. After all, no write-access = no-damage [writing to a port, i.e., writing ‘across the wire’ is a write operation of sorts, and as such is not permitted]!

Written in 2002

 

Oxford Geek Night 10

Ξ January 19th, 2009 | → 0 Comments | ∇ Coding, Geeky, Oxford, Programming, Software, Technical |

At Oxford Geek Night 10, I’m giving a talk – if you can call it that; as actually it’s more like an ‘elongated cough’ … it’s a 5 minute spot! I mean I’ve told jokes that were longer than that [and if you weren't there, 'yeah': well - they were actually very well received! {for geek jokes}]. However, what can one say in five minutes – esp. when one has lots to say on the subject at hand? Ok, so it makes one ‘concentrate’ – but what to leave in and what to leave out? FIVE MINUTES! [G]eeeeek!

So, I’ll be [speed] ‘talking’ on some subset of subset of subset of subset of the Windows 3.0 development experience [mainly] … you know the kinda thing: ‘hidden stuff’ [oh how we wanted to switch some stuff on in the final build!!!]; stuff that went into its development; stuff that certainly *wasn’t* appreciated at the time! Blah …

However, I think folks might be more receptive now – but we’ll see!!! Blah again!

I’ll be taking a few ‘trophies’ along though …. like a few things I made sure I ferretted away at the launch on 22nd May 1990 – ahem – several copies of the ‘on the day’ [and for one day only] Windows 3.0 box – complete with the ‘I witnessed the Event’ stickers. Oh, and my ‘Magician’ shirt! Side point: I also have a ‘MakeProcInstance Spoken Here’ shirt somewhere I think — um, maybe – I emptied what was probably a fair fraction of a quarter of a ton of old Microsoft shirts into Oxfam’s clothing recycle thingmy a while ago – of course I did have a little ‘I bet they’ll be collectable sometime’ in my mind; but, hey, there ya go! At least I’ve kept the very personal ones.

I do hope it goes well, and that I get some very ‘deep’ questioning – esp. from the girls! Hey, that’s OK – Baby Love‘ll be flying back from ‘Up North’ while I’m in Oxford!

 

Whereis.exe in Java

Ξ July 6th, 2008 | → 0 Comments | ∇ Coding, Microsoft, Programming, Software, Technical |

Following on from my Where.exe post, I thought I’d knock up another version; in Java this time.

This was actually done using Visual J++ … a simply wonderful product in my opinion.  Pity it went the way of the fairies [thanks Sun!].

  • As this was done in VJ++, I couldn’t use the String split() method [I believe that appeared in a later JDK].  However I reckon the tokeniser does a better job for me here; and is the right choice imho.
  • I also had some trouble finding a way to read my PATH environment variable.  Seems like this ability is not built into Java. Still, GetEnvironmentVariable came to the rescue.
  • I also used just static methods throughout – that saved me one line of code in not creating an instance!
  • One other thing. When it first ran, it threw exceptions [WinIOException]- which took a little debugging.  After some head scratching, I realised it was due to my path containing a sub-path that pointed to a non-existent folder.
import com.ms.wfc.io.*;
import com.ms.win32.Kernel32;
import java.util.*;

public class whereis
{
    public static void main (String[] args)
    {
        findIt(args[0]);
    }

    static public void findIt(String arg)
    {
        StringBuffer strBuf = new StringBuffer(2000); 

        int ret = com.ms.win32.Kernel32.GetEnvironmentVariable("Path", strBuf, strBuf.capacity()); 

        StringTokenizer st = new StringTokenizer(strBuf.toString(), ";");

        while(st.hasMoreTokens())
        {
            whereisWorker(st.nextToken(), arg);
        }
    } 

    static private void whereisWorker(String path, String file)
    {
        try
        {
            FileEnumerator e = new FileEnumerator(File.combine(path, file));

            while(e.hasMoreFiles())
            {
                System.out.println(File.combine(path, e.getName()));

                e.getNextFile();
            }
        }
        catch(WinIOException e)
        {
            // Can get here if a segment of the PATH doesn't actually exist!
        }
    }
}

 

Whereis.exe

Ξ July 1st, 2008 | → 1 Comments | ∇ Coding, Geeky, Programming, Software, Technical |

A recent article on one of my favourite blogs was this:

A 90-byte “whereis” program

Sometimes people try too hard.

You can download a C# program to look for a file on your PATH, or you can use a 90-character batch file:

@for %%e in (%PATHEXT%) do @for %%i in (%1%%e)\
   do @if NOT "%%~$PATH:i"=="" echo %%~$PATH:i

Which is neat – but – I thought I’d knock one up in good ol’ VB6 as a console app for comparison

Here’s the code:

Sub Main()

    Dim fso As New FileSystemObject

    Dim s   As String: Dim sa() As String

    Dim n   As Integer

    sa = Split(Environ("Path"), ";")

    For n = 0 To UBound(sa)

        s = fso.BuildPath(sa(n), Dir$(fso.BuildPath(sa(n), Command$)))

        If fso.FileExists(s) Then

            Do

                Call fso.GetStandardStream(StdOut).WriteLine(s)

                s = fso.BuildPath(sa(n), Dir$)

            Loop While fso.FileExists(s)

        End If

    Next n

End Sub

That’s all you need in a module with a reference to the Microsoft Scripting Runtime.  Once built as

where.exe

it’s just a case of using

editbin.exe
editbin /subsystem:console where.exe

I actually think this is more readable than Raymond’s batch file – but then again – I would!

Anyway, here’s some output – just to prove that it works!

C:\>where *ir*
C:\WINDOWS\system32\BDir.dll
C:\WINDOWS\system32\firewall.cpl
C:\WINDOWS\system32\fsquirt.exe
C:\WINDOWS\system32\ir32_32.dll
C:\WINDOWS\system32\ir41_32.ax
C:\WINDOWS\system32\ir41_qc.dll
C:\WINDOWS\system32\ir41_qcx.dll
C:\WINDOWS\system32\ir50_32.dll
C:\WINDOWS\system32\ir50_qc.dll
C:\WINDOWS\system32\ir50_qcx.dll
C:\WINDOWS\system32\irclass.dll
C:\WINDOWS\system32\irftp.exe
C:\WINDOWS\system32\irmon.dll
C:\WINDOWS\system32\irprops.cpl
C:\WINDOWS\system32\itircl.dll
C:\WINDOWS\system32\kbdir.dll
C:\WINDOWS\system32\msvcirt.dll
C:\WINDOWS\system32\MSVCIRT.PDB
C:\WINDOWS\system32\MSVCIRTD.DLL
C:\WINDOWS\system32\MSVCIRTD.PDB
C:\WINDOWS\system32\nddeapir.exe
C:\WINDOWS\system32\nvcpluir.dll
C:\WINDOWS\system32\redir.exe
C:\WINDOWS\system32\scredir.dll
C:\WINDOWS\system32\sirenacm.dll
C:\WINDOWS\system32\sqlunirl.dll
C:\WINDOWS\system32\vdmredir.dll
C:\WINDOWS\system32\wshirda.dll
C:\WINDOWS\Nircmd.exe
C:\WINDOWS\Prairie Wind.bmp
C:\WINDOWS\UninstallFirefox.exe
C:\Program Files\Windows Resource Kits\Tools\crutredir.dll
C:\PROGRA~1\ATT\Graphviz\bin\circo.exe
C:\Program Files\Windows PowerShell\v1.0\about_environment_variable.help.txt
C:\Program Files\Windows PowerShell\v1.0\about_Execution_environment.help.txt
C:\Program Files\Windows PowerShell\v1.0\about_Redirection.help.txt
C:\Program Files\QuickTime\QTSystem\Ir41_qc.dll
C:\Program Files\QuickTime\QTSystem\Ir41_qcx.dll
C:\Program Files\Microsoft Visual Studio\Common\Tools\IROTVIEW.EXE
pfirewall.log
pfirewall.log.old
redir.exe

C:\>

 

Things I Should Have Patented?

Ξ June 20th, 2008 | → 0 Comments | ∇ Books, Coding, Geeky, Maths, Microsoft, Software, Technical |

It’s on another page on peetm.com, but as I’ve been asked where it was lately, I’ll just link to it here.

 

Focal and the PDP-8

Ξ March 18th, 2008 | → 1 Comments | ∇ Books, Coding, Geeky, Oxford, Software, Technical, University |

One of the cool things about being at a university [still] is that people discard rubbish that’s someone else’s ‘treat’.

Recently I found a ‘Programming Languages’ Volume 2 manual for the PDP-8 – and it’s become my essential bedtime reading for now.

The book’s full of great stuff about how you should ensure that you’ve a teletype attached, and that you’ve got the steam-pressure just right before turning the thing on in the first place!

PDP-8 Programming

It takes me back to a time when programmers were, um, ‘novel’, men were ‘chaps’ and girls wore petticoats [actually, I got a bit carried away there!]

On languages, the book talks mostly about Focal; which I’d forgotten about altogether [a blessing really], here’s the Focal code for the Towers of Hanoi …

The Towers of Hanoi in Focal

I loved the PDP-8 though – keying in the bootstrap and forgetting to load the punched-tape was a great way to spend a half hour or so [oh, how I WOULD LAUGH at times like those!]

PDP-8

If you fancy playing with a real PDP-8[E] albeit remotely, then have a look here [you can even watch the machine operate via a webcam]: http://www.pdp8online.com/run.shtml

 

Next Page »
  • Groupings

  • Old Stuff

  • Blog Roll


    Top BBC Tech News Items
    Craigslist ends adult service ads

    PS3 hack escapes court challenge

    Memristor revolution backed by HP