Showing posts with label Computers. Show all posts
Showing posts with label Computers. Show all posts

Saturday, February 21, 2009

Google JavaScript error AGAIN

What the hell Google? A JScript error again? Last week it was AdSense, this week it is in the Followers gadget.

I just happened to look at my blog before thinking about posting something and up pops a JScript error and then a blank blog page. Nice. Upon debugging I see the error is in this line:
google.friendconnect.container.renderUrlCanvasGadget({'id': 'gadget-canvas'})

Which look like it might be the Followers gadget. I disable it and no more error. So not too hard to get by, but what the hell is with all these scripting errors?

I think there might be some kind of problem with the QA and deployment strategy over at the big g…


[Edit] I went and put the gadget right back again, and the error does not reoccur… I can’t see that line of code anywhere at all, so I don’t know if that was not the problem or if it was fixed quickly or if adding and removing it updated the code or what… Gotta go.

Tuesday, February 17, 2009

Lotsa windows

I just had a weird occurrence… I was in gmail, clicked to archive a message, and it started to open a bunch of new windows with one certain address:
http://mail.google.com/mail/#..&remote_iframe_0@2&1&0&%7B%22s%22%3A%22resize_iframe%22%2C%22f%22%3A%22remote_iframe_0%22%2C%22c%22%3A0%2C%22a%22%3A%5B199%5D%2C%22t%22%3A%22r0rtgf-lsmnyy%22%7D

It got to about 20 or so before I managed to kill it with taskman.

Saturday, February 14, 2009

Batteries

The battery meter on my laptop is playing up.

It seems to think the battery is always at 100%. The hours remaining displayed changed, and seems to be about correct, but the percentage is always at 100%. I am guessing that that is why it keeps shutting off with no warning. Hrm.

I had other stuff to post, but I am at 100% (18 minutes) so I butter go plug in.

Wednesday, February 11, 2009

Merging Help files

This may take several minutes...

Boy you are not kidding… Why does this always take so long? And why can’t you do it in the background? I don’t need the help right now, but I would like to do something else with my machine.

Changing the console font

You can add new fonts to the list available in the cmd.exe preferences screen.

First you want to find a good mono-spaced font like Consolas and install it.

Then you need to add a new String Value to the registry under HKLM\Software\Microsoft\WindowsNT\CurrentVersion\Console\TrueTypeFont called 00* with a value of the exact font name (eg Consolas)

Something needs to happen before the font can be used, I am not sure what, but a reboot achieves it (logoff does not), so a reboot is next.

Finally, you can pop open a command prompt and change the preferences to use the new font. You might need to do this a couple of times if you use different ways of getting up a command prompt: the run command, the shortcut in accessories, or a shell extension - because of the way the system applies the preferences according to window title and not the actual executable.


* the default TrueType font is specified by 0, so the next needs to be 00, if you want to add another you can add 000 etc.

AdSense JScript error

I don’t know wether it is just IE7 or what but I do seem to be getting a lot of JScript runtime errors on lots of different sites… I have opened a few in the debugger and found them to be, for the most part strangely, coming from within jQuery…

Now the AdSense stuff on this blog has started to have an error:

The bit where it barfs is:

<script>tick('1ad')</script>

with:

Object expected

so meh, not finding the tick function. I have not changed anything, but I am beginning to wonder if it is not something that I have done to this machine. Perhaps I am just paranoid, but I do seem pretty capable of some kind of voodoo against windows installations…


[Edit] S’not just me - there are some posts on the AdSense Help forum (which has a JScript error, haha) about this already (Recent Javascript Errors in Ads, Javascript errors, JavaScript error <script>tick('1ad')</script>) but no response from Google so far...


[Edit] Silently fixed by Google. I did not keep a copy of the offending source file from this morning, but looking at the same file generated just now, they seem to have totally removed the call to tick. That function by the way ends up injected into your main page and seems to be for storing timestamps for certain actions like the first load, the first time the page is scrolled, the load time of each ad etc.) Poor form really… perhaps an explanation will surface soon.

Tuesday, February 10, 2009

Multiple selection

I was watching someone the other day trying to select a number of different files from a directory to copy somewhere else. She had about four goes at it, control clicking on each file she wanted, skipping over the ones she didn’t, then accidentally clicking without holding control somewhere and undoing all of her selections, before she gave up and copied them one at a time.

Just now I was trying to move some gmail ‘suggested contacts’ to ‘my contacts’. I had never used that interface before, but I don’t like it. You select each contact by checking its checkbox, but for some odd reason they have made clicking on the name of the contact select the checkbox also – and unfortunately deselect all of the other ones! The nice thing, usually, about a list of checkboxes is that they avoid the accidental de-selection that is so easy with the control click way of doing things…

This all has just reminded me that it would be nice to have an explorer extension that made selecting multiple files more forgiving. Maybe by altering the selected state in a more robust way. You could do undo and redo of selection, you could do add to and subtract from selection, you could keep selections or save and re-load them… you could make it usable. As it is, it is just about inevitable that someone not hugely skilled with the mouse will loose all of their selections if they are trying to select a non-trivial number of files together.

SQLServer 2005

Having failed to install SQLServer 2008 – don’t ask, I grabbed the 2005 dvd and ‘installed’ it… But the server setup could not find any of the client msi files. I looked at the directory structure on the disk and where they used to have Server and Client directories, there are now Server and Tools. I am not sure if that is the problem but I went into the Tools directory and ran the setup there. It got some way through its install, but still could not find the msi for the native client, and the ‘workstation, books online and development tools’ installer would not run. So I went spelunking in the \Tools\Setup directory and ran a few msi files by hand and now it seems to be happy.

Yay, I have my SQL Server Management Studio!

The msi installers that actually managed to do something were: \Tools\Setup\sqlncli.msi and \Tools\Setup\SqlRun_Tools.msi though there may be other stuff missing… we will see.

Monday, February 09, 2009

Office Live

I have a new install of Microsoft Office Word 2007 with the Office Live plug-in installed. The Office live splash screen comes up and I was having trouble configuring it – it could not seem to deal with my Live account that had a Gmail address… anyway, that is sorted now (though all my cookies are gone in the process), but the splash screen still comes up each time. I thought it was because the sign-in process was failing, but I am all set up now and it is still showing up every time I open word.

Fortunately I have found the solution on TechNet: Get Started with Office Live.

The workaround is to create a registry key called OfficeLive under the key HKEY_CURRENT_USER\Software\Microsoft.

Group policy

I hate that the group policies specified for our domain accounts have the Internet Explorer home page locked down, and the web proxy enabled. Those settings though are just registry entries, and as there is no inherent security on registry editing, you can just go back in and edit them after login.

After some time interval though I have noticed that there must be a gpupdate or something that resets the keys to the values defined by the policy. I just wrote a quick VBScript to ensure that my preferred settings are made after login.

Set shell = WScript.CreateObject("WScript.Shell")
 
shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page", "http://www.google.com.au", "REG_SZ"
shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Default_Page_URL", "http://www.google.com.au", "REG_SZ"
shell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Search Bar", "http://www.google.com.au", "REG_SZ"
shell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"

Most of the time when I pop open IE it is to go to Google. Plus the group policy had some stupid HP news site specified, and several times over the last week their first displayed news story was some model in a state of partial undress – difficult it is when the company policy enforces a breach of company policy…

Thursday, February 05, 2009

Windows Live Writer and Blogger formatting

I think I have it worked out.

There is a Blogger setting that stuffs up edits done with Live Writer. Settings > Formatting > Convert line breaks needs to be set to No. Then you don’t seem to get the double line spacing.

The trick with WLW seems to be to let it put in paragraph tags and to never ever edit the post in blogger. Or at least to never switch between the blogger html editor and the compose editor – that really screws things up.

In the end, WLW is still in beta so there are issues. Undo does not do what I would expect. You can’t just type away and press enter to get a new paragraph… Seems like for the first paragraph you have to hit enter then the down arrow otherwise the insertion point is above the first paragraph container. Odd.

I will just resign myself to being careful with the editor, then being prepared to fix the mark-up by hand.

The CodeSnippet pug-in works best if you do not embed the styles but copy them to your template to be re-used. That is how I wanted to do it anyway. Here is a little code snippet:

// Check for required fields
foreach(var f in from f in TheForm.Fields
                 where f.RequiredForEmail
                 select f) {
    prop = requestType.GetProperty(f.Name);
    if(prop == null || prop.GetValue(data, null).IsBlank()) {
        Ok = false;
        break;
    }
}

CodeSnippet plug-in

Dammit. Those code snippets look so nice in Live Writer… grr. They get all sorts of horrible linebreaks and the formatting does not work at all. Work dammit!

Explorer:

Live Writer:

Grumble.

Friday, January 30, 2009

WindowsUpdate

Installing Studio and stuff on my new desktop (laptop is almost officially dead) I was having a problem with Microsoft Update...

The website has encountered a problem and cannot display the page you are trying to view. The options provided below might help you solve the problem.

The error code is 0x8007000B. Looking in the WindowsUpdate.log shows:

WARNING: DownloadFileInternal failed for http://download.windowsupdate.com/v8/windowsupdate/b/selfupdate/WSUS3/x86/Other/wsus3setup.cab: error 0x8007000b

So I tried to download that file in ie and get:

Access to http://download.windowsupdate.com/v8/windowsupdate/b/selfupdate/WSUS3/x86/Other/wsus3setup.cab has been blocked by WebMarshal

Ah ha!

(P.S. I don't remember the blogger editor being this bad... the format of this post is terrible right now.)

[Edit] Formatting maybe fixed...

Friday, August 15, 2008

Magic mystery fields

[Just found this draft post that I was waiting to post for some reason... it is from the middle of last year. Almost just a rant but I typed it up so I may as well post it.]

Liaising with customers, particularly ones who are managers of their company - highly experienced in their own field, though not in IT - can sometime suck.

I constantly find myself having to explain in detail why something cannot work that exact way or why something is a problem that needs to be worked through. Their opinion seems often to be that I don't want to do it or that I say it can't be done because I don't know how. Usually it seems to stem from the problem of what is easy for humans, or obvious to us on paper is not something that the computer can do or represents some information that the system does not have.

An example from today: Employees have 4 digit employee numbers, their cards have a single digit issue number that is used after their first replacement. When they lose their card again and get a new one the issue number increments. So employee 1234's first card is 1234, their second is 12341, third is 12342 etc. (Whoever thought this kind of arrangement was a good idea needs their fingers broken.)

There are two problems that I tried to broach today (right now, before they break the system). There will soon be the need for 5 digit employee numbers (we are up to like 8500), there seem to be some people with more than 9 cards (21, 51!). The system (of course, as it stands) cannot tell the difference between employee 10001 and the second card of employee number 1000 (also 10001). The second card of employee 10001 (100011) and the 12th card of employee 1000 etc.

Trying to explain that the system cannot just take off the last 2 numbers when the person has had more than 10 cards and take of the last 1 number otherwise, did get a little frustrating. Basically when there are 2 dynamic length fields in a composite id, without any other information it is not possible to reliably extract them.

Sunday, May 18, 2008

One bad apple?

It's funny, just about every website you go to sign up on that wants your email address gives you those TWO boxes to fill in. Email and Verify Email. I don't who started this, or why everyone thinks they should follow, but I wish it would stop.

I understand where this malady came from: it was some smart web monkey seeing the Password and Validate Password combo and adopting it. But I don't think they quite understood why this mechanism is needed in that case. Just to be explicit - it is only needed because you can't read what you just typed in in the Password box. For the email address, I can re-read that just fine thanks.

Besides, I figure if you can't either type in your correct email address, or read that is not correct and correct it, then you failed my minimum user requirements. There is a certain limit to how far you need to go holding people's hands.

Wednesday, September 19, 2007

So don't press that button!

It was (probably) Murphy who said (something like) if there are two ways to do something and one of them with have disastrous consequences, the probability that someone will do it that way is 1. Thus, all good programmers ensure that pressing the wrong button at the wrong time will not cause things to blow up. Lumped in here are things like checking input, clicking in the wrong spot, pressing the delete key at the wrong moment. For these things and more we can ignore, correct or confirm inputs. Good. But you can't be pissed off when you click the wrong, but valid from the context, button and that functionality completes successfully.

For instance, there is functionality A and functionality B that both act on the current input. These functionalities are both executed thousands of times per day, there is no way to tell from context (previous operations) which one is more likely, and there is no time to have a confirmation. So when you have operators that click B when they mean A (and not notice - it is not like you can't cancel you B and put in an A) you have a training issue. There is nothing the system can do about it! That is not the worst of it though. What I really love is the service calls and bug requests saying that the reports for the operations on a certain terminal are “all screwed up, there are B's where there should not be.” So I take the 10 minutes that it takes to verify that there were no problems with the processing and what I find amounts to “That place where there was a B is because the operator pressed B.”

“Why is my transaction cancelled?” Because the operator cancelled it.

“Why did the upstairs bell ring?” Because the person pressed the top button.

“Why is there a charge of $0.01 on my credit card?” Uhh, because the cashier ran a transaction for 1 cent on your card?

Tuesday, July 31, 2007

ClickOnce - or: how to instafuck your whole installed base with one click of the mouse!

Fuck me that was fucked.

We are rolling out a new version of a program which is updated via ClickOnce. We currently (luckily) have about 12 of 80 machines installed - the rest are using the old, manually updated software. I am actually pretty glad that we had today's problem today and not in a couple of days time when the whole thing was rolled out - _that_ would have been a major shit fight.

This morning I got a request for changes. Nothing huge. Thought it would be a nice demonstration for the live update feature of the new system. 10 minutes to code. Took my time testing, 1 hour. Published the changes onto the beta site, let the test machines auto-update. Cool. I sign off on the mods, the client give the go-ahead for live. I publish on the live server. Sweet. Now I keep a test machine connected up to the live publication just so I can have a last minute test to make sure all is well. I go and run the client on that machine. The auto-update barfs. Crap. I go to look in the program group for the program. The machine freezes. Crap crap. I reboot and try again. No go. Now I am starting to get a little worried. I connect up to one of the client's live machines which is not being used at the moment and let the auto-update run. Barf. Crap crap crap. Machine freezes. Fuck. I try to uninstall the program, the item does not disappear from the control panel. I try again. Freeze. Reboot. Uninstall. Okay. Now I reinstall the new version, and it works. However the calls have started to come into the call centre... “We logged out and logged in again and it did its auto-update and now the computer is broken”. Fuuuck. So the technicians get to work some overtime uninstalling the broken update then reinstalling it from scratch, and I get to do some overtime to work out why the fuck it did not work.

After a 30 or so re-deployments in different configurations I find out that some kind soul has installed Windows Installer 3.1 on my testbed. I add it as a prerequisite so it gets installed first - now the auto-update works. So that is why my initial deployment test did not fail - there seems to be some kind of problem with the default version of Windows Installer, and I didn't see it because the testbed already was using a later version. I go check in with the technicians and we run a test on a machine that was not yet fucked up - installed Windows Installer 3.1, then let the auto-update run - no problemo. Fuck. I wanna break someone's fingers!

So after an hour of downtime for > 10% of the system I know what we have to do - re-do the install from scratch with Windows Installer 3.1 as a prerequisite. We have to start again because it has to be installed as Administrator. I am not going to be popular with the technicians...

I used to like ClickOnce. But now I am not so sure. It is very difficult to integrate into a responsible deployment strategy. When the whole system is deployed that way, how can you test a new update? I have never seen a case where the re-install (rather than the auto-update) does not work, so you can't just say that if the clean install works the auto-update will work. So imagine that all the machines are deployed from the live site - the auto-update is kind of all or nothing, you can't point a few machines at a different server to make sure the update works. I guess you could copy the live site to a test site, install from there, then update the test site and let an update go through. There is also no rollback. Once you let the update go, it's gone baby.

Just goes to show you - must have test machine that is identical to the live. Well, I'm off to padlock up the test machine... where did I put those thumbscrews?

Friday, June 01, 2007

Hungarian notation

This (useful) notation prefixes each variable with a label or tag indicating the kind of information that is being stored - what is its purpose.

KIND. Not type. Please, either go and read the original (Simonyi) specification of Hungarian or just don't use it.

Calling your variables bSomething or iNumber or lpszBlahBlah is worse than useless.

Friday, May 25, 2007

ReSharper - Awesome, Expensive, Slow

ReSharper (R#) is great. The refactorings and code completions and cleanups and warnings are truly awesome. I now really want all the code that I work on to pass with few or no warnings. But I am going to have to uninstall it for two fairly mundane (i.e., should be easy to fix) reasons:

  1. It totally has screwed up all of the keyboard shortcuts. Even after flipping back to all VS 2005 shortcuts there are some things that don't work, and worse, there are many nice features of R# that are no longer available at the touch of a button.
  2. God damn it's slow! Not on a new file, or a small file. But on big old files that have lots (200 or more it seems) warnings. Each time you make an edit to the file it re-analyses it which takes a looong time. (7000 line file, 280 warnings, 15 seconds)

These should both be reasonably easy to fix:

  1. Don't frig with the shortcuts! Give me a list of functions for which you would like to add shortcuts and I will assign them. Maybe this is doable by the end user - I'm sure that I could eventually get my old studio shortcuts working again, but I am not paying US$250 for a tool only to spend hours repairing the damage it has done.
  2. Let me disable the automatic analysis of the current file. Maybe in that nice little coloured box at the top of the colour bar there that had a hand icon but does not seem to actually DO anything.

I have used R# for a couple of days now, and I love it! You have a convert people! But I CAN'T use it like it is.

Wednesday, May 23, 2007

Web 2.0 style guide

Orange! Light green! Dark blue! Light blue!

Very faint diagonal or way off-centre circular gradients.

Dark text on light same coloured background.

Dotted (light coloured) borders (and horizontal rules).

Shiny glass or gel (jelly!) looking buttons (that are not usually buttons) and text.

Text sitting on a shiny table and all manner of other (3d) surface effects.

Big bold headlines. Often multiple down or diagonally across the page.

Smaller (gray) body text with lots of white padding.

Many pointed stars.

Cute icons.

No underlined links.

Digg this, post on reddit, blog this, tag on del.icio.us, etc., etc., etc. buttons.

I'm not saying that any of this is good or bad, just what I have been noticing.