Click here to Skip to main content
15,914,608 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: Oracle pains Pin
Rajesh R Subramanian11-Sep-19 17:40
professionalRajesh R Subramanian11-Sep-19 17:40 
GeneralRe: Oracle pains Pin
ZurdoDev12-Sep-19 0:56
professionalZurdoDev12-Sep-19 0:56 
Generaldo any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 6:36
mvahoney the codewitch11-Sep-19 6:36 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Gary Wheeler11-Sep-19 7:26
Gary Wheeler11-Sep-19 7:26 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
PIEBALDconsult11-Sep-19 7:56
mvePIEBALDconsult11-Sep-19 7:56 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Ron Anders11-Sep-19 8:02
Ron Anders11-Sep-19 8:02 
GeneralRe: do any of you others have little coding mantras that save your behind? PinPopular
Sander Rossel11-Sep-19 8:06
professionalSander Rossel11-Sep-19 8:06 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 4:43
kalberts12-Sep-19 4:43 
Sander Rossel wrote:
The popular "if you're doing single line if statements you're doing it wrong."
I had done quite a bit of Pascal programming when C came onto the scene. I have heard numerous arguments in favor of C, as opposed to Pascal.

One of the major arguments against Pascal was "All that writing! All those keywords! It is almost like COBOL!"
Essentially this referred to BEGIN-END. One-keystroke braces makes programming sooooo much faster...

I have argued a lot about the impact on productivity from two or three extra keystrokes. Or fewer! Before C, no modern language required parentheses around a condition! No modern language required putting braces (or other delimiters) around single statements! The parser expects a block, and a single statement is a block!

Then came this craze for LOC/day prouctivity measure. "My LOC/day is bigger than your LOC/day! So there!"
The more lines you can spend on trivial things, the better programmer you are. Rather than
C++
if ExpectedRainfall > 0 then BringTheUmbella;
you write
C++
if (ExpectedRainfall > 0)
{
  BringTheUmbrella();
}
- some programmers would even give the "if" its own line, putting the condition on a separate line. And lots of C programmers consistently add blank lines around every conditional statement and every loop.

In the days of hardcopy listing, I frequently printed out source code double-spaced to give the impression of a lot of blank lines to make the code more readable. Screens were 24 lines tall at that time - that is not much. I wanted it to display 24 useful code lines, not twelve blank lines. I wanted that IF statement to use one of the 24 lines, not 4 or 5, plus a blank line.

With C, we replaced a four-character keyword with two sets of (), one set of {} and 3-5 more line breaks, to reduce all that typing of writing "then"... But the modern mantra is "doing it like that single-line Pascal statement is wrong! The 4-5 line (+ blank line) solution with three sets of delimiters added is the right way to do it".

I miss Pascal!
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Maximilien11-Sep-19 8:08
Maximilien11-Sep-19 8:08 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
OriginalGriff11-Sep-19 8:20
mveOriginalGriff11-Sep-19 8:20 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Marc Clifton11-Sep-19 9:03
mvaMarc Clifton11-Sep-19 9:03 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 9:12
mvahoney the codewitch11-Sep-19 9:12 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 5:07
kalberts12-Sep-19 5:07 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Jörgen Andersson11-Sep-19 9:11
professionalJörgen Andersson11-Sep-19 9:11 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 9:14
mvahoney the codewitch11-Sep-19 9:14 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 5:14
kalberts12-Sep-19 5:14 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 5:26
mvahoney the codewitch12-Sep-19 5:26 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
kalberts12-Sep-19 11:57
kalberts12-Sep-19 11:57 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch12-Sep-19 12:02
mvahoney the codewitch12-Sep-19 12:02 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Rick York11-Sep-19 10:10
mveRick York11-Sep-19 10:10 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 10:17
mvahoney the codewitch11-Sep-19 10:17 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Rick York11-Sep-19 13:26
mveRick York11-Sep-19 13:26 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
honey the codewitch11-Sep-19 13:30
mvahoney the codewitch11-Sep-19 13:30 
GeneralRe: do any of you others have little coding mantras that save your behind? Pin
Tony.ADV12-Sep-19 8:35
Tony.ADV12-Sep-19 8:35 
PraiseRe: do any of you others have little coding mantras that save your behind? Pin
Kent K12-Sep-19 2:49
professionalKent K12-Sep-19 2:49 

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.