Sign In
Fabulous Adventures In Coding
Eric Lippert's Blog
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
Aargh! (8)
accuracy (6)
anonymous types (3)
Arrays (8)
ASP (11)
AStar (5)
Async (15)
bad jokes (14)
Begging the question (4)
Benford's Law (3)
Best Of FAIC (12)
Big Words (5)
Books (22)
Breaking Changes (24)
Brittle Base Classes (6)
C# (317)
C# 4.0 (39)
C# 5.0 (9)
Cargo Cult Programming (4)
cast operator (3)
Channel 9 (6)
Charts (4)
closures (3)
Code Generation (10)
Code Quality (29)
COM Programming (57)
Conditional Operator (3)
Continuation Passing Style (11)
Conversions (16)
Covariance and Contravariance (22)
customer service (4)
declaration spaces (5)
Dialogue (14)
English Usage (11)
exception handling (9)
Floating Point Arithmetic (14)
grammars (9)
graph colouring (5)
Hashing (8)
High Dimensional Spaces (5)
Immutability (27)
integer arithmetic (5)
Interviewing (8)
Introduction (6)
It Hurts When I Do This (5)
Iterators (10)
JScript (93)
JScript .NET (29)
keywords (4)
Lambda Expressions (20)
Language Design (59)
local variables (3)
localization (3)
Mathematics (14)
Memory Management (13)
Metablogging (9)
Mistakes (4)
Music (6)
myths (7)
namespaces (5)
Non-computer (37)
Optional arguments (5)
Overload Resolution (9)
Pages (25)
Performance (48)
precedence (4)
precision (7)
protected (7)
Puzzles (46)
queries (3)
quotable quotations (4)
Quotes (3)
Rants (51)
Rarefied Heights (51)
Recursion (26)
reference (4)
Regular Expressions (13)
Relationships (4)
Salt (4)
Science (12)
scope (5)
Scripting (189)
Security (46)
shadowcasting (6)
SimpleScript (30)
Software development methodology (13)
Static Methods (6)
Threading (18)
Topological Sort (4)
Type Inference (17)
type safety (4)
unsafe code (4)
Value Types (11)
VBScript (80)
Video (12)
virtual dispatch (9)
VSTO (10)
warnings (5)
What's The Difference? (11)
Zombies (4)
Archive
Archives
February 2012
(3)
January 2012
(5)
December 2011
(9)
November 2011
(4)
October 2011
(3)
September 2011
(3)
August 2011
(2)
July 2011
(5)
June 2011
(3)
May 2011
(7)
April 2011
(6)
March 2011
(9)
February 2011
(8)
January 2011
(7)
December 2010
(4)
November 2010
(8)
October 2010
(11)
September 2010
(8)
July 2010
(7)
June 2010
(7)
May 2010
(10)
April 2010
(9)
March 2010
(10)
February 2010
(8)
January 2010
(8)
December 2009
(5)
November 2009
(9)
October 2009
(9)
September 2009
(8)
August 2009
(9)
July 2009
(9)
June 2009
(12)
May 2009
(9)
April 2009
(9)
March 2009
(10)
February 2009
(4)
January 2009
(7)
November 2008
(2)
October 2008
(5)
September 2008
(4)
August 2008
(1)
July 2008
(2)
June 2008
(3)
May 2008
(11)
April 2008
(3)
March 2008
(2)
February 2008
(5)
January 2008
(5)
December 2007
(7)
November 2007
(5)
October 2007
(13)
September 2007
(3)
August 2007
(6)
July 2007
(2)
June 2007
(7)
May 2007
(4)
April 2007
(9)
March 2007
(2)
January 2007
(5)
November 2006
(3)
October 2006
(1)
September 2006
(1)
August 2006
(1)
July 2006
(2)
June 2006
(4)
May 2006
(5)
April 2006
(3)
March 2006
(4)
January 2006
(1)
December 2005
(7)
November 2005
(7)
October 2005
(9)
September 2005
(8)
August 2005
(9)
July 2005
(7)
June 2005
(7)
May 2005
(7)
April 2005
(12)
March 2005
(7)
February 2005
(6)
January 2005
(13)
December 2004
(9)
November 2004
(3)
October 2004
(5)
September 2004
(7)
August 2004
(14)
July 2004
(10)
June 2004
(11)
May 2004
(20)
April 2004
(26)
March 2004
(32)
February 2004
(14)
January 2004
(16)
December 2003
(7)
November 2003
(13)
October 2003
(32)
September 2003
(36)
VBScript
MSDN Blogs
>
Fabulous Adventures In Coding
>
VBScript
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Fabulous Adventures In Coding
Precision and accuracy of DateTime
Posted
over 2 years ago
by
Eric Lippert
30
Comments
The DateTime struct represents dates as a 64 bit number that measures the number of “ticks” since a particular start date. Ten million ticks equals one second. That’s a quite high degree of precision . You can represent dates and times to sub-microsecond...
Fabulous Adventures In Coding
As Timeless As Infinity
Posted
over 3 years ago
by
Eric Lippert
33
Comments
User: Recently I found out about a peculiar behaviour concerning division by zero in floating point numbers in C#. It does not throw an exception, as with integer division, but rather returns an "infinity". Why is that? Eric: As I've often said, "why...
Fabulous Adventures In Coding
Bug Psychology
Posted
over 3 years ago
by
Eric Lippert
30
Comments
Fixing bugs is hard. For the purposes of this posting, I’m talking about those really “crisp” bugs -- those flaws which are entirely due to a failure on the developer’s part to correctly implement some mechanistic calculation or ensure some postcondition...
Fabulous Adventures In Coding
Reading Code Over the Telephone
Posted
over 4 years ago
by
Eric Lippert
25
Comments
In my youth I once attended a lecture given by Brian Kernighan on the subject of code quality, which was very influential on my attitudes towards writing legible code. One of the things that Kernighan recommended was to endeavour write code that was so...
Fabulous Adventures In Coding
Do Not Call IsBadFooPtr, Indeed
Posted
over 6 years ago
by
Eric Lippert
11
Comments
Here’s a story that I said a long time ago that I was going to tell you all , and then promptly forgot about it. Raymond Chen’s blog entry today reminded me of it, because this is the story of how I found out the hard way that IsBadFooPtr is bad, bad...
Fabulous Adventures In Coding
Checking For Script Syntax Errors, This Time With Code
Posted
over 7 years ago
by
Eric Lippert
9
Comments
A number of people asked me to clarify yesterday's entry. Rather than try to talk you through it, I think the code is straightforward enough to speak for itself. Here's a little skeleton that I just whipped up. #include <stdio.h> #include <activscp...
Fabulous Adventures In Coding
Checking For Script Syntax Errors
Posted
over 7 years ago
by
Eric Lippert
8
Comments
A reader asked me recently whether there was a way to check a chunk of JScript or VBScript for syntax errors without actually running the code. I'm sure that there are many third-party tools which you could find that do this. If you have your own script...
Fabulous Adventures In Coding
Implementing Event Handling, Part Two
Posted
over 7 years ago
by
Eric Lippert
3
Comments
It's been an insanely busy month for me, between having multiple out-of-town guests, throwing a party for the people who couldn't make it to the wedding, and oh yeah, getting up to speed on the C# compiler and trying to understand the implications that...
Fabulous Adventures In Coding
250% of what, exactly?
Posted
over 7 years ago
by
Eric Lippert
27
Comments
I just got a question this morning about how to take two collections of items and determine how many of those items had the same name. The user had written this straightforward but extremely slow VBScript algorithm: For Each Frog In Frogs For Each...
Fabulous Adventures In Coding
VBScript Default Property Semantics
Posted
over 7 years ago
by
Eric Lippert
11
Comments
Here’s a question I recently got about VBScript, where by "recently" I mean August 28th, 2003. This code works just fine: Set myObject = CreateObject("myObject") myObject.myName = "Eric" WScript.Echo myObject ' myName is the default property, so prints...
Fabulous Adventures In Coding
Scripting Type Library Constant Injection Performance Characteristics, Part One
Posted
over 7 years ago
by
Eric Lippert
1
Comments
(Sorry about the title. I work for Microsoft; we like nouns .) Over a year ago now a reader noted in a comment to this posting that defining named constants using Const in VBScript or var in JScript is way, way faster than importing a type library...
Fabulous Adventures In Coding
Bad Recursion Revisited
Posted
over 7 years ago
by
Eric Lippert
20
Comments
We have internal email lists for questions about programming languages. Here's one that came across recently that I thought illustrated a good point about language design. An interview candidate gave the following awful implementation of the factorial...
Fabulous Adventures In Coding
How Do Script Engines Implement Object Identity?
Posted
over 7 years ago
by
Eric Lippert
7
Comments
I've talked a few times in this blog about the semantics of the equality operators in various languages. (Such as here , and here .) Recently a reader asked me how JScript implements object identity. That is, given two objects, how do we know if they...
Fabulous Adventures In Coding
Binary Files and the File System Object Do Not Mix
Posted
over 7 years ago
by
Eric Lippert
33
Comments
OK, back to scripting today. But before I get back to scripting issues, one brief correction. An attentive reader noted that "The Well-Tempered Clavier" was in fact designed to sound good on a "well tempered" instrument, not an "equally tempered" instrument...
Fabulous Adventures In Coding
VBScript Quiz Answers, Parts Eleven and Twelve
Posted
over 7 years ago
by
Eric Lippert
7
Comments
11) X and Y are both Booleans. Which of the following always assigns True ? Why? (a) Z = Not X Or Y = X Imp Y (b) Z = X Imp Y = Not X Or Y (c) Z = X Eqv Y = Not X XOr Y (d) Z = Not X XOr Y = X Eqv Y (a) assigns False if X and Y are both False ....
Fabulous Adventures In Coding
VBScript Quiz Answers, Parts Nine and Ten
Posted
over 7 years ago
by
Eric Lippert
7
Comments
9) Which of these statements is syntactically legal? Why? (a) Const Z = -+-+-+-10 (b) Const Y = 2 + 2 (c) Const X = .1e310 (d) Dim W(+10) (a) is legal. The rest are illegal. (a) is legal because you can put as many unary positive or negative operators...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Eight
Posted
over 7 years ago
by
Eric Lippert
7
Comments
8) Which of these programs is syntactically legal? (a) Class Bar Function Foo End Function Function Foo End Function End Class (b) Class Bar If Blah Then Function Foo End Function Else Function Foo End Function End If End Class (c) If Blah Then Function...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Seven
Posted
over 7 years ago
by
Eric Lippert
9
Comments
Before I get into today's entry, a brief editorial comment: Pestilence is a frickin' pain in the rear . Famine was no problem at all, Rodney didn't touch me once, and Master Kaen fell to my powerful fists, but two Amulets of Life Saving, one Wand of Death...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Six
Posted
over 7 years ago
by
Eric Lippert
14
Comments
This question was designed to highlight some of the oddities in VBScript's rules for what makes a legal identifier. 6) Which of the following are syntactically legal? Why? (a) Explicit Error (b) For[i=1]=[To[1]To[1] (c) For i =.For To Step Step Step ...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Five
Posted
over 7 years ago
by
Eric Lippert
1
Comments
5) Which of the following statements are guaranteed to never print False ? Assume that On Error Resume Next is in effect. (a) If x = x Then Print True Else Print False (b) If CStr(x) = CStr(x) Then Print True Else Print False (c) If True Or x Then Print...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Four, Plus, More Trivia!
Posted
over 7 years ago
by
Eric Lippert
4
Comments
Last night I gave away more copies of my book at our Visual Studio Tools for Office developer lab, but this time I made the trivia questions a whole lot easier. I played five rounds of "Odd Man Out" -- you know, like from Sesame Street. One of these things...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Three, and RegEx Memory Leak
Posted
over 7 years ago
by
Eric Lippert
1
Comments
Co-Winner Nicholas Allen's prize is en route to his home now. Steven Bone, I need your mailing address still. Before I give the answer to #3, a quick note. NTBUGTRAQ is reporting a memory leak in the VBScript regular expression parsing code. I took a...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part Two
Posted
over 7 years ago
by
Eric Lippert
13
Comments
When you're getting close to shipping a beta for a big product, the dev team is either insanely busy tracking down last-minute issues, or deathly bored. This week was one of the insanely busy weeks! Lots of late nights. It looks like next week should...
Fabulous Adventures In Coding
VBScript Quiz Answers, Part One
Posted
over 7 years ago
by
Eric Lippert
7
Comments
There were a grand total of eight entries to my VBScript quiz -- I think I made it too hard! Congratulations to Steven Bone and Nicholas Allen, who both got all twelve right, with more-or-less correct explanations of what was happening here. Guys, send...
Fabulous Adventures In Coding
Win Fabulous Prizes!
Posted
over 7 years ago
by
Eric Lippert
9
Comments
I want to do a long -- potentially very long -- series of blog articles about the fundamental theoretical nature of formal computer languages, and the practical problems in producing compilers for them. To kick this off in a lighthearted way on a Friday...
Page 1 of 4 (80 items)
1
2
3
4