« first day (2258 days earlier)      last day (2688 days later) » 

1:00 PM
Why reddit.com/r/dotnet is so dead
 
@War Open to passing a delegate in as a constructor argument or something and ensuring IoC wires that up, but I don't think you can have the compiler enforce it
If that's what you want
 
Only live ppl there are from india
 
War
@ibubi i've been here before and that discussion about code patterns is a huge one that no-one seems to agree on
@TomW yeh having the compiler check my logic is not entirely important but it does give me peace of mind when I hand over my owrk to juniors to then extend in some way
 
Oh hmm, you could use a code analysis rule to enforce it
 
War
tbh I can happily work in more dynamic languages but I feel like type safety is a huge good thing for c#
 
1:03 PM
I've had some vague look at old-style code analysis, pre-Roslyn. Roslyn analyzers look more straightforward and powerful but I've never used them
 
>type safety is a huge good thing for c#
+++
 
You could definitely examine the code in an analyzer and prove that a particular method is called in a particular place though. And probably fail the build if it's really important for you
 
So, what I have is a few forms which use 90% of the same functions, but with different parameters and they also use 90% of the same windows-forms
 
@J.Doe got one error around the GBP saying: Can not implicitly convert type 'string' to System.Web.MVC.SelectList
 
And is anyone willing to review my code a bit? Or is there somewhere I can send my code to, where they review it
I got around 400 lines of code....
 
War
1:07 PM
I feel like this is a trick question / problem I have
 
@Dodi82 Do you have like this? model.FromCurrencies = new SelectList(listCurrency.Where(s =>s.YourDBCallForCurrency == "GBP").ToList(), "CurrencyCode", "Name");
 
War
I've basically got architecture that builds / works on components by convention
I imply a lot to save having to write tons of code
 
@War how is that impossible ?
 
Currencies model = new Currencies();
            model.FromCurrencies = new SelectList(listCurrency, "CurrencyCode", "Name");
            model.ToCurrencies = new SelectList(listCurrency, "CurrencyCode", "Name")
 
War
@Mathematics you posted 5 lines of config then asked "why is this being ignored" ... the only way to answer that is with a ton of follow up questions
 
1:08 PM
Convention first was a great thing. RIP in .Net Core
@Dodi82 So change like above
 
Ok Dokey O.O"
 
War
@J.Doe yeh these conventions are really how the architecture is bolted together in my case though ... if you want to build a new stack you do some very small things and a lot of infrastructure is provided for you, the idea being i've written it once, why waste the devs time writing boiler plate stuff over and over again
 
Ok I will catch up with guys later. o/
 
Is it smart to have a lot of code inside of my button?
 
Will be smart button
 
War
1:12 PM
@wouterdejong general rule of thumb no ... but it depends
 
@wouterdejong I would say definitely not. Forms are very difficult to test if they implement logic themselves
 
Why not but drag logic to other thread to not lock app
 
@TomW okay thanks
 
@J.Doe Joes, the error points at the "GBP"! It also didn't like the == as it said it can only be assigned to boolean! So had to change it to ="GBP"but the red cute underline stuck under GBP!
 
Something like Model-View-Presenter is a better pattern for forms applications
 
1:13 PM
I hate that pattern
 
I also got some code like this:
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
Can I delete code like this or...?
 
If not using delete trash
 
Or should I put those empty private voids at the bottom of my code?
I use the combobox1, but no code is inside it
 
If it does nothing, then yes it's useless, get rid of it
 
@Dodi82Can yo past here your model of Currency?
 
1:15 PM
@War
 
War
?
 
good morning
i missed you
 
    public class Currencies
    {


        [Required(ErrorMessage = " message")]
        public int FromCurrencyId { get; set; }
        public SelectList FromCurrencies { get; set; }

        [Required]
        public int ToCurrencyId { get; set; }
        public SelectList ToCurrencies { get; set; }

        //[Required(ErrorMessage ="Please enter a numeric value")]
        //TextBox accept an input
        public double ConversionTo { get; set; }

        //Output value
        public double ConvertedCurrency { get; set; }
 
@Dodi82 Do you have this? model.FromCurrencies = new SelectList(listCurrency.Where(s =>s.CurrencyCode == "GBP").ToList(), "CurrencyCode", "Name");
 
What do you guys think about this piece of code
        private string ExtraCollommen() // hier wordt de SQL string gemaakt om extra collommen te laten zien in de datagridview
        {
            string extracollommen = string.Empty;
            for (int i = 0; i < checkedListBox1.CheckedItems.Count; i++)
            {
                extracollommen += "dbo.nieuw.[" + checkedListBox1.CheckedItems[i] + "] as \"nieuwe " + checkedListBox1.CheckedItems[i] + "\",";
                extracollommen += "dbo.oud.[" + checkedListBox1.CheckedItems[i] + "] as \"oude " + checkedListBox1.CheckedItems[i] + "\",";
Could I refactor this?
 
1:17 PM
Ugly strings
 
magic strings
 
Use C# feature - $
 
what is ugle about it?
 
looks like magic string stuff, which is bad
 
Yep
 
1:18 PM
but i can't read german
 
its dutch :P
 
Heil hitla
 
okay, lol
 
lmao xD
 
C# match frei
 
1:18 PM
also, it looks like you're constructing C# in strings?
 
SQL
 
I am constructing string for SQL
 
noooo
 
there isnt another way to do this
i guess
 
@wouterdejong Not more elegant? extracollommen += $@"n.[{checkedListBox1.CheckedItems[i]}] as 'nieuwe {checkedListBox1.CheckedItems[i]}'";
@wouterdejong For SQL you can simply use LINQ
It prevent SQL Injection
 
1:21 PM
even that is bad, because it's not using parameterized inputs
 
@J.Doe Thank you sir, im going to try that
@SteveG So, I should make 1 function for both with parameterized inputs?
 
@J.Doe Dodi said no, because in my previous code I select the whole list in the FromCurrencies!!
 
Tip, if ou dont want know anything about SQL but just use data take Entity Framework
 
War
@J.Doe by declaring an item var you could shorten those lines huge amounts
 
1:24 PM
+
 
War
var item = checkedListBox1.CheckedItems[i];
extracollommen += $@"n.[{item}] as 'nieuwe {item}'";
much more readable
 
Can be but not necessary
But i like readable code
 
War
i'm generally a fan of readability ... the compiler will optimise that out anyway
 
Yep, agree
 
I agree too O.O"
 
War
1:27 PM
no idea what this code is doing though
seems to be appending col lookups to a SQL string
what's wrong with linq ?
 
assuming he doesn't know about ef
 
@War Thank you
 
@Dodi82 listCurrency is full list currency, so we taking only GBP currency by LINQ model.FromCurrencies = new SelectList(listCurrency.Where(s =>s.CurrencyCode == "GBP").ToList(), "CurrencyCode", "Name");
 
War
var table = Db.Get<T>();
var stuff = table
   .Where(condition)
   .Select(i => new { col1 = i.col1, col2 = col2 })
   .ToList();
@SteveG same can be done with straight up linq to SQL
 
I HATE HTAT FORMATTING
Better :3 var stuff = table.Where(condition).Select(i => new { col1 = i.col1, col2 = col2 }).ToList();
 
War
1:30 PM
not as clear though
 
For me best to read
 
I think you're the only one
 
War
more so when the line is like 500 chars long (many of my queries get pretty big)
 
When i see newline formatting in LINQ i wanna kill someone
 
@War linq2sql is gross and an abomination
 
War
1:31 PM
@SteveG no objection here
I use EF though ... which is considered by many to be just as bad
 
@J.Doe I feel the same about multiple method calls per line
 
War
@J.Doe its a coding standard here ... because it makes sense
here's an intersesting one I do a lot though ...
 
@TomW Brofirst
 
War
if(condition) MethodCall();
 
"As of .NET 4.0, LINQ to Entities [rather than LINQ to SQL] will be the recommended data access solution for LINQ to relational scenarios."
 
1:32 PM
condition ? MethodCall()
 
War
many gripe over the lack of braces others don't like the one line
@J.Doe that's not valid c#
 
Yep, need "else"
But u know what i mean
 
new line linq formatting <3
 
I liek querrry syntax da best
 
D:
 
War
1:34 PM
also ive taken to doing ...
 
i hate query syntax too
i'm just a hater
 
I hate JS
I hate PHP
 
War
void foo() {
   // js
}

void Foo()
{
    // c#
}
 
I hate Trains
@War Wohoho
 
War
helps me mentally "know" what code i'm writing
 
1:35 PM
@War renty
 
JS + Typescript tho
 
War
don't use typescript atm
haven't yet found a need to pull it in
 
IKR
 
TypeScript \o/
 
War
it's basically just programmer candy on JS from what i understand
 
1:36 PM
i like writing all my programs in straight up assembly
it takes me 10x as long, and my boss gets pissed
but whatever
 
But job security man
 
100x as long
 
Do you have big boss
 
@J.Doe I am going to demolish it
Break it into peices
pieces*
 
@Dodi82 Easy, keep claim
Show error
 
1:38 PM
@J.Doe Apparently his majesty is very slow to wake up whenever I try to run the get stupid action method for the first time
Sorry, i am talking about the web service
 
I'll just throw this out there, but when you hate something without understanding it, you're just a little kid throwing a tantrum whom refuses to learn. Hating is seldom useful, but when you do, at least understand what it is you're hating. @J.Doe
 
Value cannot be null.
Parameter name: source
 
War
@RoelvanUden +1
 
What if you hate something because you can't understand it?
 
War
I hate not understanding problems
but rarely do I hate the problem
 
1:40 PM
That's no reason to hate something, you hate yourself for not understanding :d
 
@RoelvanUden Im hating only what i know and understand. Hating about misunderstood is lame
 
Is it not justified to hate something that is hard to understand?
 
Not in my opinion.
 
no, its not (usually)
 
War
I hate expression trees for being hard to understand ... but I understand them and accept they are doing something complex so ultimately my hate is rationally reduced
it's more like mild annoyance
 
1:42 PM
@J.Doe I like your way of thinking and I BELIEVE most people will agree with you and I am one of them
 
I Now got it to this
private string ExtraCollommen(string tablenieuw, string tableoud) // hier wordt de SQL string gemaakt om extra collommen te laten zien in de datagridview
        {
            string extracollommen = string.Empty;
            for (int i = 0; i < checkedListBox1.CheckedItems.Count; i++)
            {
                var extraColom = checkedListBox1.CheckedItems[i];
                extracollommen += $@"{tablenieuw}.[{extraColom}] as 'nieuwe {extraColom}',";
                extracollommen += $@"{tableoud}.[{extraColom}] as 'oude {extraColom}',";
 
Better but use Linq mby
 
War
whats he doing with the result
 
Please wake up before December ends !!
 
Im not sleeping
@War Execute querry?
 
1:45 PM
Not you mate, I am signing for my API
lol
 
War
feels a bit odd building a query with strings like this
like a php way of working
 
Yep, old times before 2009 was the same
And then LINQ and EF comes to my heart
 
I have the following options: 1. Meet Jaccob in Costa 2. Carry you working on my Web app 3. Go to finish my daily 10 run
 
And i loved them
 
War
@Dodi82 costa
but then i'm lazy
 
1:48 PM
@War Hell Yeah
I suppose not to drink coffee because I have abscess and the dentist prohibited me even to touch it
 
jrh
Quick question, if I find a link only answer that's valuable (for now), is it best to edit text from the page into the answer, post a new answer with text from the page, or just leave it alone?
 
If its popular you can help, if not leave
Time to help some ppl in JS
They cant into proper questions
 
@J.Doe You hate JS because there are a bunch of people that use it in a stupid way? I guess you must hate cars too, because there are lots of people that truly misuse them and drive like lunatics. Totally reasonable ;-)
 
the js hate bandwagon
daily reminder of the fallen objects and arrays of {} + [] & [] + {}
 
2:03 PM
renounce JS. Hail Haskell
 
Hail Haskell
 
i'm not a fan of JS either TBH, but thats because im not good at it. I've spent more time trying to unit testing javascript than i ever want to ever again
 
JS is a terrible language
I still love using it
 
wtf your profile pic
KILL IT WITH FIRE
 
@SteveG something something unit testing your mom
 
2:06 PM
@SteveG Don't you have a hat yet, Steve?
 
god dammit, i have no come back
lol
no, i'm a very mature adult who doesn't like hats
 
Well it would help if I made a better crack than "something something" I guess
 
@War we can question anything
 
/gif silly hats only
ugh
 
this ain't slack pal.
 
2:07 PM
!!giphy silly hats only
 
Awesome I just got a gold badge
time to change hats
 
@RoelvanUden Im writing in JS very often and trying to avoid stupid and unnecesary libs (specially whenrelased ecmascript 6). But not bunch of ppl but entrire community of JS is sick about additional useless stuff. For every task, even simple one page site they using React, Angular2 etc. (fun thing https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f)

I can not like JS. Plz guyz, dont become like them
 
You must be a god walking among mere mortals.
 
Wait are we back on the anti-JS circle jerk?
like it ever ends around here
 
2:15 PM
Im god of freedom of inteligence
Everyone have in heart anti-JS piece
 
There is no small irony in the fact that you misspelled "intelligence".
4
 
lol
 
No, i was serious
Just shit happens
Like JS
And we cant do anything about that
 
JavaShit.
 
Ok, its escalating
So
 
2:19 PM
You can edit messages for up to two minutes after they're posted BTW.
Press up to edit your last message, keep pressing up to cycle through all available messages.
 
I'm not sure what you're hating so much. You hate there are many options?
Well, shit, life is full of options.
 
I dont have life bro
 
I'm not your "bro".
 
pal
 
buddy
 
2:20 PM
mate.
 
Stop that, stop that. This is getting far too silly.
 
i guess his problem(and mine) is that its hard to start learning js with so many libraries and language sets
 
bye
 
like es5,es6,typescript etc
 
o/
 
2:21 PM
why don't i get a trophy?
 
Don't be like that please.
 
ES, typescript are great
 
@Michael are you participating in Winter Bash?
 
But nobody is forcing you to use any of that @Proxy.
 
So, i can not use slang like "nigga"?
 
2:21 PM
@J.Doe consider this your one warning.
 
Don't want to use TS/ES2015/ES2017/Babel? Then don't. It's that simple.
 
@J.Doe No
 
It was joke
 
i know i'm just saying its hard to start when your presented with so many options
 
What difference does that make?
 
2:22 PM
and have no knowledge about the subject
 
!!giffy what difference does it make
 
@SteveG No way
 
hoor
 
Well, I'd rather have many options than none.
 
@mikeTheLiar ah, I see. I have been absent
 
2:23 PM
funny enough, i'm writing js and it's not doing what i want it to do
it's hard to argue that i like it at this moment
 
i never said its bad but hard to chose
 
Im creating a mess in church of anti-js
Follow me
Follow C#!
 
@Michael the trophy hat is one of the easiest to earn, you earn it automatically when you get any other hat.
 
_.find(_.pluck(po.lineItem, 'subId'), function(element) {

               return element;
            })
         };
i expect this to pluck all the sub id's out of a child collection, and then return the first that is truthy
 
If you want a trophy just vote on something on meta, you get a hat for participating on meta and you get a trophy for getting a hat.
 
2:24 PM
maybe return element; isn't looking for a truthy value
 
+
 
What the actual fuck
 
Why you deleting my posts?
Whats wrong with you?
 
Why do you think
 
So take me to jail for telling a jokes
But wait, you cant
 
2:28 PM
Enough with the "just a joke" defence. It's bullshit.
 
omg just boot him already
 
We've had the room frozen for less.
 
Its only words
 
So yes, you get a warning from me too. Consider that the final one. :-)
 
2:30 PM
You can stop me
 
@J.Doe racism and jokes about mass murder are too much, man. This is Stack Overflow, not 4chan.
 
You have a question? @J.Doe
 
You're quite right we can. So stop being an idiot, or leave
 
Done. Consider it stopped.
 
We have a winner.
 
2:31 PM
brb, stand up. Need a backup janitor.
 
That dude get booted?
 
ya for the time being he will return
 
he's about to be suspended for a half hour
and done
> This user has been automatically suspended for posting inappropriate content and cannot chat for 29 minutes.
 
Which one was the flag of death?
 
Happy Holidays
 
2:34 PM
@BenFortune read up ^ shit talks js at all possible chances (even in js room, he's just been ignored thus far). kick on sight.
when we give you RO in js 😃
 
> when
D:
 
Ahh we can RO all the Rooms
 
RO all the rooms!
 
are we still shit talking js?
 
@misha130 are we ever not?
 
2:35 PM
s/js//
 
oh boy I can't wait to spew my endless knowledge about my js adventures and how bad it is
 
Do SO rooms have insta-permabans or does the user have to go through a couple of temp. bans before that happens?
 
@hilli_micha Temp, then a moderator can step in for repeat offenders.
 
So Owners of rooms can only do temp and then SO Mods can perma?
 
It escalates. First kick is 1 minute, second 5 minutes, third 30 minutes + moderator warning.
 
2:37 PM
room owners can 'kick/mute' someone from a room.
 
Or something along those lines.
 
A validated flag is auto 30 minutes
 
there is no room perma ban
 
moderators can ban people from all of chat
 
you're banned from the entire chat or not at all
 
2:37 PM
That's 10k+ users
 
rooms can limit access but that system is broken
 
but there are no permanent bans. they always expire.
they might expire in, like, 7 years...
 
I got banned once from an mmo when I was 13 for hacking
 
Were you?
 
I log in every year to check if I am still banned
I was.
and I am.
 
2:38 PM
i got banned from a garena dota room only
 
@hilli_micha also, if a user flags something you said as inappropriate and enough other users agree with them, that's a short-term chat ban
 
I used to be a butthole when I was a teenager, I'd play Counter-Strike:Source and mercilessly troll people and get perma-banned. I've obviously since then grown up, but I still try to join a server every now and again and get hit with "YOU'VE BEEN PERMANENTLY BANNED". I typically think, "God damn it, 15 year old me.."
 
Grown up? Hah. Hah. Hah.
 
You could spoof yourself I am sure that IP address has changed
 
i used to be a butthole, wait, nevermind, i still am
 
2:40 PM
Everyone has one, some people are one.
 
Others like the taste of them
 
@Juanvan Bans are tied to your SteamID, which I'm still using the same one. So those bans will follow me forever lol.
 
i'm an asshole to assholes, karma right?
 
@mikeTheLiar what the hell, now I am offended
 
Ahh @hilli_micha that is true
 
2:41 PM
@RoelvanUden Pls, I'm an adult and everything. I pay bills im super grown up :(
 
I used to trade window scam people on D2. #rebel
 
you obviously dont pay enough bills
 
I pay a mortgage.
 
@hilli_micha Oh then I'm a grown up too
 
I'm ~1/3rd through my life
once I get to the half way save point I'll call myself an adult.
 
2:42 PM
Well I'm an adult. As for being grown-up, it's rather elusive.
 
My humor is extremely childish, that's about the extent. I'm grown up enough to try and see issues and matters through other peoples perspective though, which is the most important thing I feel.
 
Agreed. But meanwhile I'm watching cartoons so fuck it all.
 
jap cartoons*
 
To 99% of the world, a cartoon is a cartoon, and for kids.
I jizz in my pants when someone gets it. Thanks @misha130
 
I can relate
 
2:47 PM
something something Clerks animated series
something something bojack
something something archer
 
My name is Rob,
I'm no adult.. I'm just a fella.
I think that farts should be funny and memes be dank
I think mortgages are bad, and frenchfries, well,
I think they're just a little bit better.
 
Ho hum is it Turkey time yet!
 
Turkey is a lame meat. Beef is where it's at.
 
yeah thats why I eat 1 of them once a year
 
fuck beef, pork is the king of tasty flesh
 
2:52 PM
No way, Steak king of the meats.
 
Also duck.
 
venison is like beef but better
 
Lamb is great too
 
@KendallFrey a lot of people are sensitive to the gaminess
 
I've never had a venison steak but I imagine it would be glorious
 
2:53 PM
I mean, I like venison
I've had venison steak
 
@mikeTheLiar instead of the farminess?
 
The thing about venison steak is you can't cook it less than medium
Unless you're looking to pick up parasites
 
Is there any way to fil-in the "create table" automatically? imgur.com/a/tYz9U
 
fillet steak with a mushroom sauce...best meal ever
 
Venison is pretty darn good. I've also had Elk, it's..not..
 
2:56 PM
Also let's remember that Kendall thinks a burger with chocolate peanut butter cups is good.
 
@KendallFrey non kosher
 
He also thinks fries with gravy and cheese curds is good. what a weird-o.
 
that's why it sucks to be Jewish
 
By the way, I retract my statement, Beef is good but Sushi is king.
 
@hilli_micha Why did you emphasize curds?
 
2:57 PM
@KendallFrey must not make extremely inappropriate joke
 
Because the word curds sounds absolutely disgusting.
 
@hilli_micha Sushi isn't meat
 
no, in all seriousness pork is cheap meat
 
@hilli_micha what if the curds are moist?
 
@hilli_micha You're thinking of curdle, as in what spoiled milk does. Cheese curds are not like that.
 
2:59 PM
I know what cheese curds are, but the word itself makes me gag. Same with the word custard
 
Actually that's how curds are made
And it's not when it's spoiled
It's deliberately curdled. You strain the curds out.
Then you have curds (the chunks) and whey (the liquid).
 
@mikeTheLiar That's how most cheese is made
 

« first day (2258 days earlier)      last day (2688 days later) »