This stuff makes me wonder!
I can’t believe that for SP1 [Office 2007] that there are 322Mb of actual code changes – I mean the complete bloody product is only [only!] 532Mb to begin with! [BTW, despite what the text says regarding Ultimate Extras, the chosen updates were *just* the Office 2007 SP1 updates]
So what we’re getting here is component updates as opposed to, for want of a better term, code updates – it goes like this:
- Microsoft fixes a bug with a code change.
- The code is recompiled – the result being, of course, that the entire component changes [of which the fix is a tiny part].
- The entire component is then wrapped-up in a Microsoft update, and then the update is downloaded and installed by the consumer.
What *should* happen is:
- Microsoft fixes a bug with a code change.
- The code is recompiled – the result being, of course, that the entire component changes [of which the fix is a tiny part].
- The difference between the now out-of-date component and the ‘new’ is determined – this is called ‘a delta’.
- The delta is then wrapped-up in a Microsoft update, and then the update is downloaded and installed by the consumer. The update is of course a little ‘smarter’ now – as the installer has to ‘patch’ the old component with just the changes – rather than replacing the complete thing.
Now I *know* that Microsoft can do this sort of thing, so why don’t they? I’d certainly like to know how much extra energy and bandwidth would be saved if they did it the right way!
For ages, at every boot, I’ve run a small program called TempClean: all this really does is to clear my Temp folder of stuff that’s left over by programs that don’t clear up after themselves [like a man]. Ok, so it does a little bit more than that [unlike a man] – but that’s its main function.
Anyway, I’d be really interested in knowing how much litter [unwanted files] you have on your Windows machine, and so rather than ask you run the real TempClean [it doesn't have an installer - just save it somewhere and run it!] – which you might be unsure/wary off – here’s a small VBScript ‘script’ so that you can find 0ut for yourself. BTW, this doesn’t remove anything!
Here’s the code:
dim fso
dim fld
dim fle
dim l
set fso = CreateObject("Scripting.FileSystemObject")
set fld = fso.GetSpecialFolder(2)
wscript.echo "Your Temp folder is set to: " & fld.path
sub walk(fld)
wscript.echo vbCrLf & "Looking in: " & fld.path
if fld.files.Count > 0 then
for each fle in fld.files
wscript.echo vbTab & "Found: " & fle.name
l = l + fle.size
next
else
wscript.echo vbTab & "No files found"
end if
for each fld in fld.SubFolders
walk(fld)
next
end sub
walk(fld)
wscript.echo vbCrLf & "The total bytes taken up by your temp files is: " & l
All you need to do to run this is:
- copy ‘n paste it into Notepad [or just download it here];
- save it as, say, tempfiles.vbs;
- run it from a Command Prompt [I'll assume you know how to open a Command Prompt, unlike a woman, to quote Colin Hay "or a woman, if you are one" ... ask a man"].
For example, if I’d saved it to my root folder on C, I’d run it like this, in a DOS/Command prompt:
C:\cscript tempfiles.vbs

BTW, cscript is a Microsoft VBScript interpreter that you’ll almost certainly have on your machine already.
Note again that running this script doesn’t remove anything – it just reports what you’ve got hanging around, and that’s taking up space unnecessarily. And, on that last bit, you might like to output the results of running this to a file – else the output might disappear off the top, never to reappear!
You could do that like this:
C:\cscript tempfiles.vbs > dump.txt
The > redirects the output into a file call dump.txt. So you can then open dump.txt in Notepad and have a look at what you’ve got hanging around – which you might find A) interesting, and B) a lot!!
BTW, if you’d like to remove these temporary files, you can just add either these two lines after the l = l + fle.size, e.g.
l = l + fle.size
on error resume next
fso.deletefile fle
Or, if you want to do a proper job [like a woman], download and run the real program [link to TempClean above].
Please post up your results, from whichever method, and in summary preferably!
Been playing around with Eclipse today.
It’s been a long time since I last used it, and I’m pretty pleased with all the improvements that have been made to it since I last looked.
However, that said, I did spend about an hour trying to resolve an error in a simple ‘Hello World’ type C project. The error was:
/mingw/lib/libmingw32.a … undefined reference to `WinMain@16′
The test file was simply:
#include
int main(void)
{
puts(“Boo”);
return 0;
}
I googled for the solution [as you do], and tried all manner of things suggested, including having to add libraries and linker/compiler flags. Nothing helped.
However, in playing around, I noticed that I hadn’t saved my source file; test.c file. Surely it can’t be anything as silly as not doing that? Surely the Eclipse IDE will automagically save my file before running the compiler?
You’ve guessed the answer already haven’t you! Yup, on saving the file, and THEN selecting Project | Build All, everything worked! Duh!
P.S. the above applies to version: 3.4.2 Build id: M20090211-1700. And with MinGW installed.
I rarely ever ‘click’ things on my own websites/blog – but I just did, and I found the link to be bad – - – BAD LINK!!
Some things I *should* have patented!
and
My Binary Watch Training Program

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!
Bloody hell!
Just been watching the Royal Institution’s Christmas Lectures and saw a demonstration of a tool called Dasher.
Very cool, but a bit of a kick in the nuts, and a wake-up call for me really. The reason? Well, I had a system doing more or less the exact same thing in 2000 [it was better than what was demonstrated too]! I even showed it off to various Computational Linguistics folk at Oxford [who said "nice, but" ... [who'd use it|so what|it runs on Windows!|you've got too much spare time on your hands|etc]].
Crap!
It’s a bit ‘old hat’ nowadays, but, as I was perusing ThinkGeek the other night, and saw that this item was still a decent seller [indeed, top of the list in ‘watches’]; I thought I’d post a link to the BinaryWatch training program!
This is for this type of watch

Here’s a picture of the running training program.

Here’s the link to the program – zipped, and it should standalone [XP, Vista].
A new series, Britain from Above starts on the BBC one this Sunday at 9.00pm.
In the main, GPS data is used to reveal traffic-information; on the sea [through the Dover straits], in the air, and even by London cab-drivers. The GPS data are overlaid, and visualised against a backdrop of the country. Additionally, there’s an interesting bit showing how the telephone system lights up during a working day.
A taster clip on the programme is here.
Going back to taxies, it reminded me of a piece of game-theory software I once wrote for a professor of economics here at Oxford. He had too many variables for which he/we needed to find some sensible constraints/limits for, or, better still, turn into constants! The game was about n cab-driver’s choice of strategies, as they drove around Belfast … such that they weren’t A) robbed [of their cash] B) robbed [of their cash *and* their taxi] C) shot, killed, i.e., robbed of their cash *and* their taxi *and* their life] You get the idea. The game-theory bit worked alongside a social sciences experiment examining moreorless the same thing [except that their experimenters had to be in Ireland].
Anyway, watching the clip, I couldn’t help but be reminded of that system, as it played itself on our cluster many 1000s of times a second, in either role; the cab-driver or the robber [and later the police], and in how it might suddenly switch into some very complex behaviour; perhaps as a result of a robbery, generated randomly by the system. Oh, fun times indeed!
I had a donated version of this which used os.walk(), but I couldn’t figure out a way to prevent that recursing [I believe os.walk() always decends].
Hunting around – and not knowing anything about Python really – I found os.listdir()
So, I modified what I had been given.
I wish I knew how to retrieve the match from the files ‘collection’ !
if sys.argv[1] in files:
import os, sys
for dir in os.getenv('path').split(';'):
for files in os.listdir(dir):
if sys.argv[1] in files:
print dir + "\\" + sys.argv[1]
Ok, so I got paranoid after posting the earlier .c version!
Also, the functionality has altered a little, in that this one does just return the first match – it checks each path specified in PATH. It also does a ‘Not Found’ thingmy if, um, the program wsn’t found.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
void whereis(char const * const prg)
{
char * path = NULL;
char * buff = NULL;
char * part = NULL;
int n = 0;
int i = 0;
int found = 0;
// PATH exists? AND if it does, it's not zero length?
//
if((path = getenv("PATH")) != NULL && strlen(path))
{
// Split PATH on each ;
//
while((part = strtok(path, ";")) != NULL)
{
n = strlen(part);
// strlen() will return zero if we just found a ; or a ;; etc.
//
if(n != 0)
{
// Is this bit of the PATH slash terminated?
//
i = part[n - 1] == '\\' ? 0 : 1;
// Alloc space, + 1 for the '\0'
//
if((buff = calloc(n + 1 + i + strlen(prg) + 1, 1)) != NULL)
{
// Copy in the various bits.
//
strcpy(buff, part);
if(i == 1)
{
strcat(buff, "\\");
}
strcat(buff, prg);
// MS specific 'does it exist' stuff.
//
if(_access(buff, 0) == 0)
{
// Yes, it was found!
//
puts(buff);
// Flag we found at least one match.
//
found = 1;
}
free(buff);
}
else
{
puts("Couldn't allocate enough memory!");
}
}
// Continue strtok()
//
path = NULL;
}
if(found == 0)
{
printf("%s not found\n", prg);
}
}
else
{
puts("PATH is empty");
}
}
int main(int argc, char * argv[])
{
if(argc < 2)
{
puts("Arg required");
}
else
{
whereis(argv[1]);
}
return 0;
}
Next Page »