Click here to Skip to main content
15,900,108 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: WHats Kortrijk in Belgium like? Pin
dan!sh 9-Feb-14 18:55
professional dan!sh 9-Feb-14 18:55 
GeneralRe: WHats Kortrijk in Belgium like? Pin
Erudite_Eric9-Feb-14 21:01
Erudite_Eric9-Feb-14 21:01 
GeneralI hate it when I am too clever for my own good... Pin
OriginalGriff9-Feb-14 4:59
mveOriginalGriff9-Feb-14 4:59 
GeneralRe: I hate it when I am too clever for my own good... Pin
PIEBALDconsult9-Feb-14 5:05
mvePIEBALDconsult9-Feb-14 5:05 
GeneralRe: I hate it when I am too clever for my own good... Pin
OriginalGriff9-Feb-14 5:17
mveOriginalGriff9-Feb-14 5:17 
GeneralRe: I hate it when I am too clever for my own good... Pin
PIEBALDconsult9-Feb-14 5:57
mvePIEBALDconsult9-Feb-14 5:57 
GeneralRe: I hate it when I am too clever for my own good... Pin
OriginalGriff9-Feb-14 6:36
mveOriginalGriff9-Feb-14 6:36 
GeneralRe: I hate it when I am too clever for my own good... Pin
harold aptroot9-Feb-14 5:33
harold aptroot9-Feb-14 5:33 
Ah yes, the good old "you can't do math with generics". There are some little libraries that allow you do it, implemented like a bunch of these:
C#
static T Add<T>(T a, T b)
{
    if (typeof(T) == typeof(int))
        return (T)(object)((int)(object)a + (int)(object)b);
    else if .. etc
}

which makes some people angry, but it works.

Btw, that's my favourite test code for decompilers. That weird double cast is often decompiled incorrectly.

However, I'm going to have to file this all under YAGNI. Apart from highly exceptional circumstances, there are only two types you're ever going to put into your MovingAverage: int and double.
GeneralRe: I hate it when I am too clever for my own good... Pin
OriginalGriff9-Feb-14 5:44
mveOriginalGriff9-Feb-14 5:44 
GeneralRe: I hate it when I am too clever for my own good... Pin
Kornfeld Eliyahu Peter9-Feb-14 6:38
professionalKornfeld Eliyahu Peter9-Feb-14 6:38 
GeneralRe: I hate it when I am too clever for my own good... Pin
PIEBALDconsult9-Feb-14 6:44
mvePIEBALDconsult9-Feb-14 6:44 
GeneralRe: I hate it when I am too clever for my own good... Pin
Kornfeld Eliyahu Peter9-Feb-14 7:02
professionalKornfeld Eliyahu Peter9-Feb-14 7:02 
GeneralRe: I hate it when I am too clever for my own good... Pin
PIEBALDconsult9-Feb-14 7:07
mvePIEBALDconsult9-Feb-14 7:07 
GeneralRe: I hate it when I am too clever for my own good... Pin
Kornfeld Eliyahu Peter9-Feb-14 7:18
professionalKornfeld Eliyahu Peter9-Feb-14 7:18 
GeneralRe: I hate it when I am too clever for my own good... Pin
Jörgen Andersson9-Feb-14 9:07
professionalJörgen Andersson9-Feb-14 9:07 
GeneralRe: I hate it when I am too clever for my own good... Pin
Kornfeld Eliyahu Peter9-Feb-14 9:22
professionalKornfeld Eliyahu Peter9-Feb-14 9:22 
GeneralRe: I hate it when I am too clever for my own good... Pin
Jörgen Andersson9-Feb-14 9:49
professionalJörgen Andersson9-Feb-14 9:49 
GeneralRe: I hate it when I am too clever for my own good... Pin
Kornfeld Eliyahu Peter9-Feb-14 9:53
professionalKornfeld Eliyahu Peter9-Feb-14 9:53 
GeneralRe: I hate it when I am too clever for my own good... Pin
Jörgen Andersson9-Feb-14 10:10
professionalJörgen Andersson9-Feb-14 10:10 
GeneralRe: I hate it when I am too clever for my own good... Pin
Brisingr Aerowing9-Feb-14 6:52
professionalBrisingr Aerowing9-Feb-14 6:52 
GeneralRe: I hate it when I am too clever for my own good... Pin
Mike Hankey9-Feb-14 7:23
mveMike Hankey9-Feb-14 7:23 
GeneralRe: I hate it when I am too clever for my own good... Pin
Andy Brummer9-Feb-14 14:57
sitebuilderAndy Brummer9-Feb-14 14:57 
JokeRe: I hate it when I am too clever for my own good... Pin
TnTinMn9-Feb-14 17:44
TnTinMn9-Feb-14 17:44 
GeneralRe: I hate it when I am too clever for my own good... Pin
BillWoodruff9-Feb-14 21:35
professionalBillWoodruff9-Feb-14 21:35 
GeneralRe: I hate it when I am too clever for my own good... Pin
OriginalGriff9-Feb-14 21:43
mveOriginalGriff9-Feb-14 21:43 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   482 votes