[Dictionary]

Dictionary

Tuesday, August 12, 2003

Here you have a list of indispensible defintions from the world of computers and programming. Keep it handy.

AddressOf
What a precise choice of name.
In VB5/6 it should have been "AddressOfProcWhenPassedAsArgument". The whole thing was a big hack. The designers of VB understood that VB programmers needed addresses of functions in order to play with the Windows API, so they gave us that beast. But it came in a manner that even C programmers might consider "unsafe". Variables have a type that describes, roughly speaking, memory size and layout. C has pointers, which are also typed, for the same reason. VB doesn't have pointers, much less typed pointers. But AddressOf gives you exactly a typeless pointer. This dawned upon Microsoft, so they designed AddressOf so that you could only use it when specifying arguments to a procedure call. This limitation could easily be hacked arround, however.
In VB.NET, it should be called "DelegateOf". That's what it returns.
Curly Brace
Of interest to C and Java programmers. VB has more sophisticated block-structure keywords. Pascal is more verbose with its "begin" and "end;", but gives as little information about the kind of block as C or Java.
(a pair of curly braces viewed with a microscope, courtesy of Bell Labs.)
Dim
An old rumour has it that in Basic, you need to declare an array with Dim. They say the keyword comes from "dimension", since arrays have dimensions. Later, Dim would be used for explicitly declaring other kinds of variables as well.
That's crap. Dim is really short for "diminish". This is best explained by an example: If you write "Dim A As Integer", you have effectively "diminished" the meaning of "A". Before the declaration, "A" can mean a lot of things: "A-Type personality", a baby's first word, nationality sticker for Austria. Afterwards, "A" is a variable of type Integer with local scope, period.
Implementation
(1) A buzzword by uttering of which one states to be above coding. Developers easily get excited when they consciously have achieved a level of abstraction comprehensible by any twelve-year-old - "implementation", a part of the process, distinct from design, testing, etc. But this sort of abstraction is clearly not an end in itself.
(2) The inner workings of a piece of software, as opposed to the term "interface". This is often another instance of the mind going berserk with abstraction - "See, a class that implements IAbstractOpenComponent can be anything". Indeed, it will frequently do anything but what you'd expect, so if problems occur, be prepared to hear them say, "Well, at least it compiled OK!".
IntPtr
In the .NET framework, there's a type called IntPtr. It's supposed to be a general pointer type for high-level languages, and in any case, it's better than a VB6 Long. But what fine individual came up with such a name? For one, to some people this word will sound like "pointer to int" - nope, that's not so. Secondly, the size of the pointer depends on the platform - it's either 32 or 64 bit wide, so the "Int" part is potentially misleading, because C#, for example, defines "int" as value of a specific size (unlike C). Finally, why point out that pointers are actually integral numbers? I've never heard of a system where memory addresses are expressed by floating point numbers or string keys (or even booleans, for very small devices).
Netscape
An Acronym for "Never try to escape from the design stage". Or whatever.
Object
An instance of a class.
Microsoft often talks about the "the Collection Object" or "object instances". In the Java world, on the other hand, people can't seem to abandon the term "class" ("this method returns a class"). According to Bill and Scott, a class could very well be an instance of an object. You get to wonder why they aren't best friends.
Others confuse objects with references, which leads to monsters like "null objects", or tautologies like "an object's runtime type".
Object Orientation
There are several popular views on this:
(1) The fundamentalist view: Reality is object-oriented. If it can be done by a class, do it with a class. Do not mix in functional code, as this would require greater effort (in other words, throw away your tested functional code and be in for a complete rewrite in OO). Give your classes names that end in "Helper", "Assistant", "Manager", or even "ExecutiveVicePresident".
(2) The esoteric view: Everything is an object, even when it's not. Call it a "class" (which implies it's a type) even if it's not supposed to be instantiated; call it a "method", even if all the data the routine works on is passed to it explicitly; in short, talk about "static methods" and claim they're substantially different from free-standing functions. Name your classes "Math", "System", or "Util".
(3) The hacker's view: When you get down to it, all the code is functional anyway. Write "OO" Code in C, and use gross pointer or memcpy hacks in order to achieve "polymorphism". Do whatever it takes to mimick features that object-oriented languages offer. Pretend that "OO is a mindset, not a technology".
(4) The told-you-so view: "Inheritance is more dangerous than spaghetti code".
(5) The holier-than-thou view: OO is bad, because it "doesn't address concurrency".
(6) The rejectionist view: Don't even bother with OO. Heck, don't bother with anything.
Procedure Attributes Dialog Box
Used in VB5/6 to mark a property as "Default", enter a description, or tell the compiler that a method returns an enumerator for use with For-Each. Infamous for the Procedure-ID combo box, with such entries as "(Default)" or "BackColor".
If you're confused now, remember that this dialog box is also known as the "Dialog box from hell".
Static
(1) C, C++: An object (in the C sense: a variable, a function) whose scope is restricted to the current translation unit.
(2) C, C++, Basic: A local variable that maintains its value across calls.
(3) C++, C#, Java: A shared member of a class.
(4) (non technically): storage that is not allocated dynamically.
As for (3) C++ and Java coders have further opportunity of obfuscating their code by calling a shared member from a reference of the class type. VB.NET allows the same nonsense with Shared members.
Sun
The big yellow ball you see in the sky during the day.
Verbosity
A programmer who likes typing chooses a language that's verbose. Try to convert the String "1" to a (primitive) boolean in Java:
Boolean.valueOf("1").booleanValue()
But VB is catching up (this is an unusual, but syntactically valid example):
Default Protected Friend NotOverridable Overloads Overrides ReadOnly _
    Property Item(ByVal index As System.Int32) As System.Object _
    Implements Design.Academics.Collections.IReadOnlyList.Item
    Get
        Return Nothing
    End Get
End Property
Add to that just a few .NET custom attributes, and you'll hopelessly confuse anyone trying to maintain the code. The real danger of this, however, is a regression into minimalistic C style, where identifier names have no more than one letter if the variable's scope spans less than 200 lines of code.
Visual Fred
What some people call Visual Basic.NET because of the imcompatibilities it brings. The name was chosen because VB.NET supports Free Fredding.