Click here to Skip to main content
15,867,308 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Names Pin
grralph122-Apr-21 14:05
grralph122-Apr-21 14:05 
GeneralRe: Names Pin
Mike Winiberg22-Apr-21 21:21
professionalMike Winiberg22-Apr-21 21:21 
GeneralRe: Names Pin
grralph122-Apr-21 23:56
grralph122-Apr-21 23:56 
GeneralRe: Names Pin
honey the codewitch23-Apr-21 2:01
mvahoney the codewitch23-Apr-21 2:01 
GeneralRe: Names Pin
Stefan_Lang2-May-21 3:02
Stefan_Lang2-May-21 3:02 
GeneralRe: Names Pin
Mike Winiberg2-May-21 5:32
professionalMike Winiberg2-May-21 5:32 
GeneralRe: Names Pin
Stefan_Lang4-May-21 1:41
Stefan_Lang4-May-21 1:41 
GeneralRe: Names Pin
Mike Winiberg4-May-21 5:12
professionalMike Winiberg4-May-21 5:12 
I don't disagree with you, or the use of helpful hints like you suggest. But whilst your suggestion (and indeed hungarian notation etc in general) provides useful prompts and hints to the coder it doesn't address type safety and in fact can be counterproductive in non typesafe languages:

I hit this kind of thing a lot in an elderly VBA codebase that I maintain and develop for a client. GUIDs can be represented (validly) as either a string (in 3 different formats FFS!) or as a BYTE array. When reading a GUID from SQL Server into a table and thence into a form and onwards into code you usually get a string, but sometimes (I presume depending on the temperature of Bill Gates' shower at the time the code runs) you get a BYTE ARRAY - all of these can appear in the variable you assign them to if it's a Variant, and you can only find out which one you get by testing the type of the variable after assignment, or when an exception is raised on use! However, if you are attempting to assign the GUID to a string and it arrives as a BYTE array it doesn't cause an exception, instead you silently get a GUID consisting of '??????' 8)

I have spent many many hours tracking down strange bugs caused by this behaviour.

If (as I have discovered in code I inherited) errors have been disabled so that (unless the error is actually fatal) code continues with the statement after the one where an error occurs, you are falling down a rabbit hole with no bottom!

Note that although you may get a BYTE array GUID, this cannot be assigned to a GUID column in a table, so you have to convert it to a suitably formatted string (and the formatting acceptable depends on whether the table is local or on the SQL server).

Working on code like this when it is full of incredibly long-winded, supposedly 'typed' variable and function names is just adding insult to injury! 8)
GeneralRe: Names Pin
Stefan_Lang4-May-21 8:48
Stefan_Lang4-May-21 8:48 
GeneralRe: Names Pin
Mike Winiberg4-May-21 10:38
professionalMike Winiberg4-May-21 10:38 
GeneralRe: Names Pin
Mike Winiberg4-May-21 11:11
professionalMike Winiberg4-May-21 11:11 
GeneralRe: Names Pin
Sander Rossel22-Apr-21 9:24
professionalSander Rossel22-Apr-21 9:24 
GeneralRe: Names Pin
grralph122-Apr-21 14:04
grralph122-Apr-21 14:04 
GeneralRe: Names Pin
Wizard of Sleeves22-Apr-21 20:52
Wizard of Sleeves22-Apr-21 20:52 
GeneralRe: Names Pin
grralph123-Apr-21 0:28
grralph123-Apr-21 0:28 
GeneralRe: Names Pin
Stefan_Lang2-May-21 3:17
Stefan_Lang2-May-21 3:17 
GeneralRe: Names Pin
Daniel Will22-Apr-21 21:22
Daniel Will22-Apr-21 21:22 
GeneralRe: Names Pin
grralph122-Apr-21 23:59
grralph122-Apr-21 23:59 
GeneralRe: Names Pin
Member 1068017923-Apr-21 2:56
Member 1068017923-Apr-21 2:56 
GeneralRe: Names Pin
Rusty Bullet23-Apr-21 3:09
Rusty Bullet23-Apr-21 3:09 
GeneralRe: Names Pin
BernardIE531723-Apr-21 5:00
BernardIE531723-Apr-21 5:00 
GeneralRe: Names Pin
grralph123-Apr-21 22:36
grralph123-Apr-21 22:36 
GeneralRe: Names Pin
Member 986208223-Apr-21 5:26
Member 986208223-Apr-21 5:26 
GeneralRe: Names Pin
grralph123-Apr-21 22:43
grralph123-Apr-21 22:43 
GeneralRe: Names Pin
Kiriander23-Apr-21 6:48
Kiriander23-Apr-21 6:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.