Click here to Skip to main content
15,890,438 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: The Lounge - Why It's a Warm Place Pin
W Balboos, GHB22-Jul-20 10:04
W Balboos, GHB22-Jul-20 10:04 
GeneralWSO CCC OTD 2020-07-22 Pin
OriginalGriff21-Jul-20 21:35
mveOriginalGriff21-Jul-20 21:35 
GeneralRe: WSO CCC OTD 2020-07-22 Pin
Kornfeld Eliyahu Peter21-Jul-20 21:42
professionalKornfeld Eliyahu Peter21-Jul-20 21:42 
GeneralRe: WSO CCC OTD 2020-07-22 Pin
OriginalGriff21-Jul-20 21:52
mveOriginalGriff21-Jul-20 21:52 
GeneralRe: WSO CCC OTD 2020-07-22 Pin
Kornfeld Eliyahu Peter21-Jul-20 22:24
professionalKornfeld Eliyahu Peter21-Jul-20 22:24 
GeneralRe: WSO CCC OTD 2020-07-22 Pin
musefan21-Jul-20 22:20
musefan21-Jul-20 22:20 
GeneralRe: WSO CCC OTD 2020-07-22 - we have a Winner! Pin
OriginalGriff21-Jul-20 22:29
mveOriginalGriff21-Jul-20 22:29 
GeneralConfused by team mate... Pin
Super Lloyd21-Jul-20 16:33
Super Lloyd21-Jul-20 16:33 
At work I have a team mate.... (nothing ground breaking so far), of which I have a certain opinion I shall keep to myself...

Anyway his latest antic is that he found this code confusing!
C#
static void FilterList(List<Foo> list)
{
    for (int i = list.Count - 1; i >= 0; i--)
    {
        if (Remove(list[i]))
            list.RemoveAt(i);
    }
}

And he shared with us his improved version! OMG | :OMG:
C#
static void FilterQueue(List<Foo> list)
{
    var q = new Queue<Foo>(list);
    for (int N = q.Count; N > 0; N--)
    {
        if (Remove(q.Peek()))
        {
            q.Dequeue();
        }
        else
        {
            q.Enqueue(q.Dequeue());
        }
    }
    list.Clear();
    list.AddRange(q);
}

needless to say, I am not impressed...
But more than I am .. speechless... where did he come up with that from?!

And before you suggest it, the change has nothing to do with possible performance enhancement (beside it's slower for small list like the one I am using in that piece of code and business data), he find his alternate code simpler to read and understand somehow! Blush | :O

Wow, mind blown...
Anyway, I should not get so upset and dismissive.. maybe he is learning, this time?
I doubt it and he is kind beyond hope at this stage.. but one never know! Blush | :O
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!

GeneralRe: Confused by team mate... Pin
Garth J Lancaster21-Jul-20 17:06
professionalGarth J Lancaster21-Jul-20 17:06 
GeneralRe: Confused by team mate... Pin
Super Lloyd21-Jul-20 18:41
Super Lloyd21-Jul-20 18:41 
GeneralRe: Confused by team mate... Pin
raddevus22-Jul-20 3:05
mvaraddevus22-Jul-20 3:05 
GeneralRe: Confused by team mate... Pin
abmv22-Jul-20 4:28
professionalabmv22-Jul-20 4:28 
GeneralRe: Confused by team mate... Pin
raddevus22-Jul-20 4:29
mvaraddevus22-Jul-20 4:29 
GeneralRe: Confused by team mate... Pin
honey the codewitch22-Jul-20 5:11
mvahoney the codewitch22-Jul-20 5:11 
GeneralRe: Confused by team mate... Pin
raddevus22-Jul-20 5:15
mvaraddevus22-Jul-20 5:15 
GeneralRe: Confused by team mate... Pin
honey the codewitch22-Jul-20 5:23
mvahoney the codewitch22-Jul-20 5:23 
GeneralRe: Confused by team mate... Pin
honey the codewitch21-Jul-20 17:15
mvahoney the codewitch21-Jul-20 17:15 
GeneralRe: Confused by team mate... Pin
Super Lloyd21-Jul-20 18:40
Super Lloyd21-Jul-20 18:40 
GeneralRe: Confused by team mate... Pin
Richard MacCutchan21-Jul-20 21:47
mveRichard MacCutchan21-Jul-20 21:47 
GeneralRe: Confused by team mate... Pin
honey the codewitch22-Jul-20 4:54
mvahoney the codewitch22-Jul-20 4:54 
GeneralRe: Confused by team mate... Pin
Richard MacCutchan22-Jul-20 5:04
mveRichard MacCutchan22-Jul-20 5:04 
GeneralRe: Confused by team mate... Pin
Dave Kreskowiak21-Jul-20 17:32
mveDave Kreskowiak21-Jul-20 17:32 
GeneralRe: Confused by team mate... Pin
Super Lloyd21-Jul-20 18:34
Super Lloyd21-Jul-20 18:34 
GeneralRe: Confused by team mate... Pin
Jon McKee21-Jul-20 19:46
professionalJon McKee21-Jul-20 19:46 
GeneralRe: Confused by team mate... Pin
Super Lloyd21-Jul-20 19:50
Super Lloyd21-Jul-20 19:50 

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.