Click here to Skip to main content
12,623,930 members (29,298 online)

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
AnswerRe: Interesting technique used in some Legacy code! Pin
Super Lloyd18-Jun-14 21:35
memberSuper Lloyd18-Jun-14 21:35 
GeneralRe: Interesting technique used in some Legacy code! Pin
Stefan_Lang20-Jun-14 5:34
memberStefan_Lang20-Jun-14 5:34 
GeneralRe: Interesting technique used in some Legacy code! Pin
Super Lloyd20-Jun-14 6:26
memberSuper Lloyd20-Jun-14 6:26 
GeneralCodeProject Daily News - The only newsletter I would, deliberately, subscribe to Pin
Adam Tibi11-Jun-14 0:25
professionalAdam Tibi11-Jun-14 0:25 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to Pin
HomerTheGreat11-Jun-14 0:42
memberHomerTheGreat11-Jun-14 0:42 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to Pin
PIEBALDconsult12-Jun-14 4:08
memberPIEBALDconsult12-Jun-14 4:08 
GeneralRe: CodeProject Daily News - The only newsletter I would, deliberately, subscribe to Pin
OriginalGriff16-Jun-14 6:28
protectorOriginalGriff16-Jun-14 6:28 
GeneralEnhanced Password Security Pin
Bernhard Hiller10-Jun-14 22:08
professionalBernhard Hiller10-Jun-14 22:08 
The other day, a customer complained that we - sometimes, but not always - wrote the password of their Hospital Information System (HIS) in our log files in clear text.
Heh? Just another customer telling us bullshit!?
Alahs, right he is.
When our application starts, it logs some general information, e.g. hardware, OS, and Environment Variables.
And in the section of the Environment Variables, sometimes there was an entry like
HIS_PWD=CUSTOMERS_HIS_PASSWORD
The customer found then out that it did not happen when he started our application from the start menu or from its desktop item. It only happened when he started it from the HIS (as the doctors normally do: the HIS can provide us with context information like the patient the doctor is working on).
Well, a process inherits the environment from the process it was started from, including all its Environment Variables.
Do you see what happened here?
It's really a great idea to store the clear-text password as an environment variable, it is absolutely safe there.
JokeRe: Enhanced Password Security Pin
Kornfeld Eliyahu Peter10-Jun-14 23:17
professionalKornfeld Eliyahu Peter10-Jun-14 23:17 
GeneralRe: Enhanced Password Security Pin
Eddy Vluggen11-Jun-14 1:29
professionalEddy Vluggen11-Jun-14 1:29 
GeneralRe: Enhanced Password Security Pin
Trajan McGill11-Jun-14 4:07
memberTrajan McGill11-Jun-14 4:07 
GeneralRe: Enhanced Password Security Pin
PIEBALDconsult11-Jun-14 13:02
memberPIEBALDconsult11-Jun-14 13:02 
GeneralRe: Enhanced Password Security Pin
PIEBALDconsult11-Jun-14 13:10
memberPIEBALDconsult11-Jun-14 13:10 
GeneralDateTime.Now vs. GetSystemTime Pin
Bernhard Hiller30-May-14 1:17
professionalBernhard Hiller30-May-14 1:17 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Pete O'Hanlon30-May-14 2:05
protectorPete O'Hanlon30-May-14 2:05 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Bernhard Hiller2-Jun-14 1:30
professionalBernhard Hiller2-Jun-14 1:30 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Pete O'Hanlon2-Jun-14 1:32
protectorPete O'Hanlon2-Jun-14 1:32 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Jörgen Andersson2-Jun-14 22:11
professionalJörgen Andersson2-Jun-14 22:11 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Bernhard Hiller2-Jun-14 22:35
professionalBernhard Hiller2-Jun-14 22:35 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Jörgen Andersson2-Jun-14 22:56
professionalJörgen Andersson2-Jun-14 22:56 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
BobJanova2-Jun-14 1:51
memberBobJanova2-Jun-14 1:51 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Rob Philpott10-Jun-14 6:20
professionalRob Philpott10-Jun-14 6:20 
GeneralRe: DateTime.Now vs. GetSystemTime Pin
Eddy Vluggen6-Jun-14 6:11
professionalEddy Vluggen6-Jun-14 6:11 
GeneralSuccessfully writing to a string literal Pin
Indivara19-May-14 0:44
professionalIndivara19-May-14 0:44 
GeneralRe: Successfully writing to a string literal Pin
Freak3019-May-14 2:45
memberFreak3019-May-14 2:45 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 4 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid