Archive

Archive for the ‘Work’ Category

Awesome – GMail Drag & Drop Attachments

April 16th, 2010 2 comments
Categories: Computers, Work Tags:

Word 2003 – Elusive White Space

November 19th, 2009 No comments

Oh thank fuck for that!

For a while, I’ve had a problem with Word 2oo3. Whenever I started a new document based on the Normal Template, I could see the vertical ruler, but I could not see the margins at the top and the bottom of the page. This meant that whenever I typed anything, the text appeared at the very top of the page. If I clicked the ruler, and tried to drag the margins, nothing happened.

Today, I had to write a new document, and it needed to look professional, so I decided that I needed to fix it. The Microsoft Office website was a heap of crap, so I Googled it and quite quickly came across the following page:

Elusive White Space.

A quick click at the bottom of the page resolved the issue for me!

Turns out, I hadn’t buggered up my template, Word was doing that by design. Genius……

Categories: Computers, Work Tags: , ,

Hmmmm

September 4th, 2009 No comments

Last night, for a work function, I got to stay in the Hilton Metropole in Brighton. Very nice!

I had a great time there, room was comfortable, etc. Except I was somewhat baffled by the need to have two specimen jars in the bathroom….

Categories: Humour, Work Tags:

VBScript function IsNumeric

August 18th, 2009 No comments

Brilliant.

Last night, we discovered that the VBScript function “IsNumeric” is a little more clever than you’d like, but there’s also no simpler version either.

Consider the following scenario.

We have the user input in a bit of text on screen. We need to process that (client-side), and part of that processing needs to find out if it is a number or not (i.e. if it’s a number, do this, otherwise, do that.)

Last night, we encountered a problem with the word “65d1” – clearly, it’s not a number (the “d” gives that away,) however, IsNumeric says that it is. If you CInt(“65d1”) you get 650. WTF?

A little more testing reveals the following:

CInt("65d0")  => 65
CInt("65d1")  => 650
CInt("65d2")  => 6500
CInt("65d-1") => 6

So obviously that “d” refers to “*(10 ^ following number)” – however, I can’t find a reference for that.

A bit of googling turns up this page , which shows that adding a space at the front doesn’t stop it from being classed as numeric.

The only real clue to what is going on is to read, and interpret, the MSDN reference page which states:

Returns a Boolean value indicating whether an expression can be evaluated as a number.

And there-in lies the answer – that expression can be evaluated as a number, not that it is a number.

Fortunately, there is an implementation listed on the first page which shows you an alternative way to get the job done.

I’m now wondering if there are other things that you can enter that will affect an number in that way. I tried

CInt("6*5")

but that just errored. I’m wondering whether “e” has a similar effect.

Update: Yes, “e” (at first glance) appears to have an identical effect to “d”.

CInt("65D1") => 650
CInt("65D1") => 6500
CInt("65E1") => 650
CInt("65E1") => 6500

Debugging Client-Side VBScript

August 4th, 2009 No comments

Having used client-side VBScript for years at work, I discovered the joys of the Microsoft Script Debugger several years ago. Unfortunately, until now, I’ve been unable to get the debugger to invoke when I desired (rather than having to wait for a crash!)

Several times, I ran across web pages saying that you just type “debugger” – however that only works with Javascript and not VBScript. I also found loads of references to Server-side debugger with ASP.Net – again that doesn’t work with client side.

But, finally, today I managed to find an article which actually explains the process, and marvellously, it’s not difficult and it’s (logically) a one liner.

So I can reveal that to invoke the debugger in client-side VBScript, all you type is…..

stop

Huzzah!

Reducing My Bandwidth

July 7th, 2009 1 comment

I’m facing a rather practical problem at work, and it’s kind of highlighted to me one potential downside of AJAX based websites and Web 2.0.

I was recently shown a chart of bandwidth usage and number of web hits for people in my department at work. This made me immediately think that I should start to reduce my non-work web traffic to avoid showing up as a major blip on the radar.

One simple way I realised that I could do this was to reduce the amount of RSS feeds that I unnecessarily subscribed to, and to reduce the number of times I refreshed the feeds.

Then I realised, that every time I displayed a feed, I would cause my hits to go up. If looked at a feed in my RSS reader (the “Sage” plugin for Firefox,) I would cause an HTTP request for the page, and a request for every image. If I went away from the feed and then back to it, then I’d refresh everything again. If there are 100 RSS items in the feed, each with (say) 3 pictures in, that’s a lot of web requests. Couple to that, the “Read” status was based off of your browsing history, I have my suspicions that every time I marked a post read (even though I didn’t read it,) it caused a web request as well.

Since upgrading to Firefox 3.5, Sage has unfortunately stopped working, so instead I switched to Google Reader, which I was hoping should off load some of my hits to the Google servers and instead I would just see the changes.

Then I realised that all of these wonderful AJAX websites that I use are going to be doing the same damn thing. Every time an AJAX request is sent, that’s another hit. Thinking of GMail, that sends an awful lot of requests. Google Reader seems to be even worse – every time I scroll past a post I don’t want, it gets marked as read – that’s an AJAX request. It refreshes the posts list a lot too, that’s more requests. I’m now wondering too, whether the RSS feeds aren’t just parsed locally on your PC, and you’re still doing the same number of requests.

Unfortunately, I can’t find any technical reference for Google Reader to explain how many requests are made, and from which location (my PC or Google Server.) I guess Google aren’t really ready to give out the information to some of their architecture.

Even now, typing this blog entry, WordPress is continually using AJAX to save a draft version and to provide a word count.

It seems that the one downside to the Web 2.0 world is that if you’re being monitored in terms of bandwidth usage or number of web requests, AJAX (and the like) are most definitely not your friends.

For now, if anyone can point me in the direction of an RSS reader that definitely does cache images (and other embedded items,) and does not make web requests to mark something as read (and is also “trustworthy” in terms of security and preferably on some Free license) that would be helpful

Categories: Computers, Work Tags:

Getting Fed Up With Word

January 8th, 2009 No comments

The past few weeks, I’ve had to use Microsoft Word a bit so that I can write up some specifications for other people to review, comment, enhance, reword, approve, you name it.

I am now soooo fed up with Word, it’s unbelievable.

The problem is, you can change things. There’s no structure system that you can use to force a document to do exactly what you want. Instead, you’re left with a series of stupid handling issues which lead to inconsistent documents across a department and people banging their heads on their desks in frustration.

Take, for example, my incident yesterday. Having reworked an existing specification from the ground up, I found cause to delete the final section of the document. This section was in landscape orientation, not portrait, because it contained some screen mock-ups (no complaint there). When I came to delete the sections, it changed every single section to be landscape, and changed the Page Header to be something completely different – in fact, it changed it to something that was not visible in the document to begin with, so I couldn’t even correct that.

I remember getting frustrated about this kind of thing before. That was whilst I was doing my final year project for my degree. I switched from Word to LyX.

Using LyX worked great for me, and I couldn’t have produced my final report without it, but I don’t think it would work in an office environment.

I think too many people are used to WYSIWYG, and not WYSIWYM (What You See Is What You Mean), and so would be constantly frustrated with the inability to see what your document looks like in Real-Time.

What I would love, is a cross between the two.

I would love to be able to create a rigidly structured document, where no one can change the text position, change the font, change the font size, mess with headers, etc – at least not without having to update a template. But as I’m typing, I’d love to see what that document would look like once printed, not the LyX modus operandi of “enter text, preview the DVI file”.

Couple that with a few more features, such as Word’s “Track Changes” and LyX’s far superior cross-reference and footnote handling, and you’re on to a definite winner.

Finally, just because you have to work with the rest of the world, some form of export to Microsoft Word format would be great.

Hey, Rich, feel like resurrecting “SLaTe”?

Update:

Ooh, apparently LyX now supports “Track Changes”. A lot can happen when you don’t use a bit of software for 6 years!

Categories: Computers, Work Tags: , ,