They say you learn something new every day.

Posts tagged ‘code’

Dynamic Vbscript Arrays (25/06/2013)

For some reason, you can’t do this in vbscript:

x = 15 
Dim demoArray(x) 

It throws this error:

Microsoft VBScript compilation (0x800A0402) 
Expected integer constant

Instead, you have to do this:

x = 15 
Dim demoArray() 
ReDim demoArray(x) 

Hi again, Fidelity (09/02/2012)

I think I was too quick to re-judge High Fidelity. It’s actually really good.

Or rather, it’s got really good. I think, thinking about the beginning, it has got better. And there are definitely some bits that could probably do with a slight tweak. But other bits that are like this, that are just fantastic:

First of all, — actually, first of all and last of all — this business about not sleeping with Ian. How do I know she’s telling the truth? She could have been sleeping with him for weeks, months, for all I know. And anyway, she only said that she hasn’t slept with him yet, and she said that on Saturday, five days ago. Five days! She could have slept with him five times since then! (She could have slept with him twenty times since then, but you know what I mean.) And even if she hasn’t, she was definitely threatening to. What does ‘yet’ mean, after all? ‘I haven’t seen Resevoir Dogs yet.’ What does that mean? It means you’re going to go, doesn’t it?

‘Barry, if I were to say to you that I haven’t seen Reservoir Dogs yet, what would that mean?’

Barry looks at me.

‘Just … come on, what would it mean to you? That sentence? ‘I haven’t seen Reservoir Dogs yet?’ ‘

‘To me, it would mean that you’re a liar. Either that or you’ve gone potty. You saw it twice. Once with Laura, once with me and Dick. We had that conversation about who killed Mr. Pink or whatever fucking color he was.’

‘Yeah, yeah, I know. But say I hadn’t seen it and I said to you, ‘I haven’t seen Reservoir Dogs yet,’ what would you think?’

‘I’d think, you’re a sick man. And I’d feel sorry for you.’

‘No, but would you think, from that one sentence, that I was going to see it?’

‘I’d hope you were, yeah, otherwise I would have to say that you’re not a friend of mine.’

‘No, but — ‘

‘I’m sorry, Rob, but I’m struggling here. I don’t understand any part of this conversation. You’re asking me what I’d think if you told me that you hadn’t seen a film that you’ve seen. What am I supposed to say?’

‘Just listen to me. If I said to you — ‘

’ — ‘I haven’t seen Reservoir Dogs yet,’ yeah, yeah, I hear you — ‘

‘Would you … would you get the impression that I wanted to see it?’

‘Well … you couldn’t have been desperate, otherwise you’d have already gone.’

‘Exactly. We went first night, didn’t we?’

‘But the word ‘yet’ … yeah, I’d get the impression that you wanted to see it. Otherwise you’d say you didn’t fancy it much.’

‘But in your opinion, would I definitely go?’

‘How am I supposed to know that? You might get run over by a bus, or go blind, or anything. You might go off the idea. You might be broke. You might just get sick of people telling you you’ve really got to go.’

I don’t like the sound of that. ‘Why would they care?’

‘Because it’s a brilliant film. It’s funny, and violent, and it’s got Harvey Keitel and Tim Roth in it, and everything. And a cracking sound track.’

Maybe there’s no comparison between Ian sleeping with Laura and Reservoir Dogs after all. Ian hasn’t got Harvey Keitel and Tim Roth in him. And Ian’s not funny. Or violent. And he’s got a crap sound track, judging from what we used to hear through the ceiling. I’ve taken this as far as it will go. But it doesn’t stop me worrying about the ‘yet.’

The conversation here is amazing and very funny. And the way it jumps from the thought process to the conversation is very neat. I think that’s an interesting trick to segue between sections. It’s so slick you nearly don’t notice it.

I also love the rhythm of the conversation. Both speakers are pulling in different directions and it works so well. You get a feel for their characters, as well as being driven forwards by the plot.

I think the other two things to take away from this is the variance and rhythm of the sentences. You can have simple sentences with long words, or you can have long sentences with simple words.

I ran High Fidelity through the Uber Word Count tool that I wrote a while back. The tool, I notice now, needs some tweaking and styling. And I’m glad I can see that now, as it means I’m better than I was when I wrote it.

To be honest, it didn’t really tell me that much, other than most of the words were very short, but it was interesting to see the results. And how long the novel was, and how many different words were used.

I think if there’s one thing to take away from this, though, it’s conversation. Conversation, conversation, conversation in novels.