Click here to Skip to main content
15,893,663 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: Do you Program in Paragraphs or Sentances? Pin
Slacker00731-May-18 9:27
professionalSlacker00731-May-18 9:27 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
dbrenth31-May-18 7:31
dbrenth31-May-18 7:31 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Marc Clifton31-May-18 9:05
mvaMarc Clifton31-May-18 9:05 
JokeThat's not the question Pin
CodeWraith31-May-18 7:40
CodeWraith31-May-18 7:40 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
W Balboos, GHB31-May-18 7:40
W Balboos, GHB31-May-18 7:40 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Scott Serl31-May-18 7:43
Scott Serl31-May-18 7:43 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
RandyBuchholz31-May-18 7:55
RandyBuchholz31-May-18 7:55 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Marc Clifton31-May-18 8:40
mvaMarc Clifton31-May-18 8:40 
Sentences. I use Linq, extension methods, and fluent style, meaning methods often return this rather than a value, which can be accessed through a getter property if necessary.

And tuples! I love tuples! Again, a useful, common to other languages not just C#, that the juniors have never seen.

The result looks a lot more like F# with its continuation and partial closure syntax.

Sadly, even though the code "reads" easily enough, it boggles the mind of the junior devs.

And the really sad thing is, the junior devs don't even know about the null continuation operator, so the first question I get is, WTF is ?.

As per my previous post, there's dumbing down, and then there's just lobotomy dumb. The null continuation operator is such a nice shorthand vs. cluttering code with if-else statements. So you'll see a lot of my code that looks like GetXmlElement(Constants.MyElement)?.Value ?? Constants.MyElementDefaultValue); but again, the junior devs are totally flustered by the ?. ?? notation.

Oh well, they need to learn. This notation (or equivalent) is common enough in other languages nowadays, so LEARN, GFD!!!!

[edit]And worse, the juniors have never been mentored to NOT code literal strings, so their code is littered with literals. Dead | X| And of course, when something needs changing, you have to search the entire code base for all references. Dead | X| Dead | X|

[edit]
For example, I find this totally readable:
new List<Control>()
{
    tbCashDrawerOnes,
    tbCashDrawerTwos,
    tbCashDrawerFives,
    tbCashDrawerTens,
    tbCashDrawerTwenties,
    tbCashDrawerFifties,
    tbCashDrawerHundreds
}.ForEach(ctrl => ctrl.TextChanged += (_, __) => ignoreCashDrawerTextBoxEvents.Else(() => UpdateCashDrawer()));

But it is esoteric, I suppose.
Latest Article - Building a Prototype Web-Based Diagramming Tool with SVG and Javascript

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802


modified 31-May-18 15:02pm.

GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Marc Clifton31-May-18 9:11
mvaMarc Clifton31-May-18 9:11 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Richard Deeming31-May-18 9:49
mveRichard Deeming31-May-18 9:49 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Marc Clifton1-Jun-18 2:19
mvaMarc Clifton1-Jun-18 2:19 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
RandyBuchholz31-May-18 10:05
RandyBuchholz31-May-18 10:05 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Munchies_Matt31-May-18 17:56
Munchies_Matt31-May-18 17:56 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
GenJerDan31-May-18 20:15
GenJerDan31-May-18 20:15 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
kalberts1-Jun-18 6:44
kalberts1-Jun-18 6:44 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
soulesurfer31-May-18 22:25
soulesurfer31-May-18 22:25 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
RandyBuchholz1-Jun-18 1:59
RandyBuchholz1-Jun-18 1:59 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
soulesurfer1-Jun-18 2:01
soulesurfer1-Jun-18 2:01 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
RandyBuchholz1-Jun-18 2:05
RandyBuchholz1-Jun-18 2:05 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
maze331-May-18 23:06
professionalmaze331-May-18 23:06 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Jacquers31-May-18 23:42
Jacquers31-May-18 23:42 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
kalberts1-Jun-18 3:11
kalberts1-Jun-18 3:11 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Sander Rossel31-May-18 23:45
professionalSander Rossel31-May-18 23:45 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
kalberts1-Jun-18 3:01
kalberts1-Jun-18 3:01 
GeneralRe: Do you Program in Paragraphs or Sentances? Pin
Sander Rossel1-Jun-18 3:09
professionalSander Rossel1-Jun-18 3:09 

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.