- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
As well, query functions that return a boolean result are generally suffixed with "p", as in "listp", which tells you if its argument is a list. LISP hackers will use this when speaking, as well, such as "lunchp" (pronounced "lunch-pee")
to ask if you want to go have lunch.
cjs
Admin
What I saw in Delphi code maintained by my friend:
Admin
ID as in "Please show me your ID." stands for "Identification Document(s)"
Id is short for Identity ..and so *should* be the correct capitalisation [8-|]
Admin
Because of problems with the Oracle SQL*C precompiler (aka proc) on Linux,
a lot of my source files start with the following sequence:
(note: the second part is only active during precompilation, so the wrong type for stderr doesn't matter)
#ifndef STUPID_PROC
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#else
extern double rint(double);
extern void *calloc(int, int);
extern void *stderr;
#endif
Admin
oops, the forum software ate stdio.h, stdlib.h etc.
<stdio.h><math.h><stdlib.h><ctype.h></ctype.h></stdlib.h></math.h></stdio.h>
Admin
In my old VB6 days I used to have fun calling error traps things like "Hell", "Bed", "The Pub" and "TheBackOfTheClass", so that you could write lines like "On Error Goto Hell", etc.
Ha ha ha! I kill me!
Admin
C++ CORBA ORBs rely heavily on reference counting. When looking through the generated code from ORBIX (I think) I discoved the functions used to inicrement and decrecment the reference count for an object were
bump()
andgrind()
, respectivly.That always amused me.
Admin
Admin
I saw something like this before. When I was in a large project (accessing SAP with Delphi), Hayo, our QA man, always experienced a crash when he selected a menu item. Nobody else could reproduce this error. Then one of our SAP specialists helped him debugging the code, especially on the SAP machine. Then they found a line in the source, which says something like
and in the if-block there was some illegal code, so the execution crashed, whenever Hayo called it.
Some idiot must've added this line after a hard struggle with Hayo (who doesn't fight with the QA?). After correcting the line, the application ran without any problems, even for Hayo :-)
Admin
Vim Intellisense:
http://insenvim.sourceforge.net/
-Richard
Admin
I like naming my VB6 error traps "EH" (for Error Handler). It adds a nice feeling of befuddlement, I think - error? eh? what?
Admin
> Hence, foo_bar.fooId = foo.fooId is better, imo, than foo_bar.fooId = foo.id.
But even better is:
foo_bar.id = foo.id
which is what the discussion is about.
Admin
Bram ought to be writing native intellisense support himself as it is the number one feature on: http://www.vim.org/sponsor/vote_results.php
Admin
I had a post-doc project which consisted of taking over a project left by a previous post-doc. It was a bit of chemistry-related software. I found the names of variables relating to reactions were almost impossible to use. I forget the specific qualifiers used, but they were things like "NextToDisplay" and such.
What I do remember quite clearly is that the variable names had five different ways of indicating they were reaction variables. One name was "<qualifier>Reaction", another was "<qualifier>Reaxion". There was also a "<qualifier>Reactn", "<qualifier>Rctn", and a "<qualifier>Rxn". This made it almost impossible to do anything but cut-and-paste to get the name of a particular variable.
The thing that made it worse was when I looked in a header file and discovered why there were five forms of "reaction":
int <xxx>Reaction;
int <xxxxxxx>Rctn;
int <xxxx>Reaxion;
int <xxxxxxxx>Rxn;
int <xxxxx>Reactn;
That's right: that previous fellow had sacrificed maintainability to make all those variable names the same length, all nice and neat, where they were defined in the header file.
Admin
A "powerful" tool with an impossibly steep learning curve is nonetheless a bad tool. Less time spent learning a tool is more time spent on development.
Admin
This sounds too good to be true. If it works with GVim, that means I can actually code stuff on my 100 MHz laptop when I'm not on my main box. Thanks for the head's up!
Admin
Admin
At my current (soon to be former) job we have the following class/interface struture helpfully developed by a consultant that left within 3 months of my hiring.
TerminalOne -> This class is the first terminal in our series
TerminalTwo -> This class adds support for running 2 terminals at the same time
Terminal2 -> This class is the second terminal in our series
Terminal3 -> This adds support for cross terminal talk, something that was required when running 3 or more terminals at the same time
TerminalThree -> This class is the third terminal in the series
T1T, T0T, T2T, TAT, TBT, TCT, C0X, C1X, CaX, CbX -> These as the class names for various sub-terminal types typically based off TerminalOne or Terminal2 super classes.
Try reading through code sprinkled like the following:
if (T1T == true)
C0X member = new C0X(T1T);
Admin
uhhh, I think the main reason for wanting to join these two is that foo has a 1-to-N relationship with foo_bar, thus foo_bar.fooId is a foreign key reference to foo's id. Therefore, foo_bar.fooId = foo.id sets the pace for clarity.
Admin
I did something like this for myself. Only in my case, the username was my own, and the code inside the if opened an XTerm window on the caller's machine. Thus I was able to fiddle around (say: do some maintenance) on even the production machines. Luckily, no QA or security guy ever found out about this [<:o)]
Admin
Could be worse. Lispers often abbreviate the term 'S-expression' (the parenthesized lists that make Lisp programs) as 'sexp'. Take a guess how that is pronounced...Thekthpy?
Admin
win32 only :(
Admin
Actually, it IS win32. Windows 98 SE barely runs on the poor thing :-D
Admin
When I've got foreign key relations, I usually have the tables called [foo]s and [bar]s -- e.g. books, copies, then the "id" fields called [foo] and [bar] -- e.g. "book" in the "books" table, "copy" in the "copies" etc. That way if I want to make a foriegn key reference, e.g. to say which book a copy is a copy of, then the field in "copies" is also called "book" -- and maps to the "book" field of "books".
Of course, I only started playing around with SQL a couple of weeks ago, so what do I know? Is there a reason not to do this?
Admin
Did it occur to you that the account might belong to your boss?
Admin
If you look thru alot of my code that uses Reflection, I like to use:
Assembly myAss = Assembly.GetExecutingAssembly();