Click here to Skip to main content
15,893,381 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: Some people... Pin
CDP18021-Mar-17 0:21
CDP18021-Mar-17 0:21 
GeneralRe: Some people... Pin
W Balboos, GHB1-Mar-17 0:22
W Balboos, GHB1-Mar-17 0:22 
GeneralWSO CCC 1/3/17 - SOLVED Pin
PeejayAdams28-Feb-17 22:13
PeejayAdams28-Feb-17 22:13 
GeneralRe: WSO CCC 1/3/17 Pin
Duncan Edwards Jones1-Mar-17 0:58
professionalDuncan Edwards Jones1-Mar-17 0:58 
GeneralRe: WSO CCC 1/3/17 Pin
Roo Walker1-Mar-17 1:11
professionalRoo Walker1-Mar-17 1:11 
GeneralRe: WSO CCC 1/3/17 Pin
PeejayAdams1-Mar-17 2:37
PeejayAdams1-Mar-17 2:37 
GeneralRe: WSO CCC 1/3/17 Pin
Mel Padden1-Mar-17 4:02
Mel Padden1-Mar-17 4:02 
GeneralThe (strange) case against very long and explicit variable names, with Math Pin
Super Lloyd28-Feb-17 13:09
Super Lloyd28-Feb-17 13:09 
I am working with Xamarin forms and there is a problem with FormsAppCompat size after softkeyboard is shown on screen.
There is a bit of a fix copied verbatim all over the web which can (also) be found there:
Accommodating The On Screen Keyboard in Xamarin Forms - Xamarin Help

My particular beef is with those lines copied in so many places
C#
int usableHeightNow = computeUsableHeight();
if (usableHeightNow != usableHeightPrevious)
{
    int usableHeightSansKeyboard = mChildOfContent.RootView.Height;
    int heightDifference = usableHeightSansKeyboard - usableHeightNow;

    frameLayoutParams.Height = usableHeightSansKeyboard - heightDifference;
This looks painfully complicated, doesn't it? That's probably why it has been copied verbatim in so many places.

Now, as a thought exercise let's use those so called "evil and short and meaningless" variable names
C#
int a = computeUsableHeight();
if (a != usableHeightPrevious)
{
    int b = mChildOfContent.RootView.Height;
    int d = b - a;

    frameLayoutParams.Height = b - d;
what is immediately visible now?
well frameLayoutParams.Height = b - d = b - (b - a) = a hence the all thing can be simplified to:
C#
int a = computeUsableHeight();
if (a != usableHeightPrevious)
{
    frameLayoutParams.Height = a;

All of that to say that those "long and meaningful" variable names are really an hindrance...
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!

GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Brisingr Aerowing28-Feb-17 13:13
professionalBrisingr Aerowing28-Feb-17 13:13 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
PIEBALDconsult28-Feb-17 14:03
mvePIEBALDconsult28-Feb-17 14:03 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
raddevus1-Mar-17 5:48
mvaraddevus1-Mar-17 5:48 
JokeRe: The (strange) case against very long and explicit variable names, with Math Pin
Vivi Chellappa28-Feb-17 15:46
professionalVivi Chellappa28-Feb-17 15:46 
JokeRe: The (strange) case against very long and explicit variable names, with Math Pin
Super Lloyd28-Feb-17 16:40
Super Lloyd28-Feb-17 16:40 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Michael Martin28-Feb-17 18:05
professionalMichael Martin28-Feb-17 18:05 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
V.28-Feb-17 19:38
professionalV.28-Feb-17 19:38 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Mark_Wallace28-Feb-17 21:08
Mark_Wallace28-Feb-17 21:08 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Jörgen Andersson28-Feb-17 19:45
professionalJörgen Andersson28-Feb-17 19:45 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Nicholas Marty28-Feb-17 20:36
professionalNicholas Marty28-Feb-17 20:36 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Jörgen Andersson28-Feb-17 20:38
professionalJörgen Andersson28-Feb-17 20:38 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
megaadam28-Feb-17 22:20
professionalmegaadam28-Feb-17 22:20 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
StM0n28-Feb-17 19:48
StM0n28-Feb-17 19:48 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Mark_Wallace28-Feb-17 20:34
Mark_Wallace28-Feb-17 20:34 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Nathan Minier1-Mar-17 1:20
professionalNathan Minier1-Mar-17 1:20 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Richard Andrew x641-Mar-17 1:45
professionalRichard Andrew x641-Mar-17 1:45 
GeneralRe: The (strange) case against very long and explicit variable names, with Math Pin
Gary Wheeler1-Mar-17 2:44
Gary Wheeler1-Mar-17 2:44 

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.