« first day (2102 days earlier)      last day (3072 days later) » 

user47589
14:00
why do you ask, @Michael?
Just use symbols and avoid the whole awkward naming business.
Trying to figure out helpful names for variables and code comments.
I've been working on Pagination for a whileeee now and I'm coming to the end. I feel like I have lots of refactoring to look forward to.
@RoelvanUden What really messed it all up for me was not having proper elbow rests on my chair (now fixed). Keyboard and mouse are pretty much all that's left to fix, in the hopes the pain completely goes away
Which pain specifically?
It started on the wrists, it spread to the arm and hands (finger tips, etc)
Pain as in, like "pointy pain" (not sure how you say that in english :P)
user47589
14:07
"sharp" i think
@RodrigoSilva That is wristspreadnophobia. You'll be dead in one week. Contact your caretaker and make a will.
@RoelvanUden That's been taken care of, my family was already notified
@Amy actually, while on the topic (sorta). Let me ask your opinion. We ran into a dilemma where we need to display a feed of content. But the content can be of different types.

We thought about 2 options:
1) Create a Single ViewModel that contains a Property/Class of each "FeedType" and single View that has If/Else statements (and just bit of logic) to determine what to display based on "FeedType"

2) Create seperate ViewModels for each "FeedType" and separate Views for each of these ViewModels. The issue with this is all the Views would be very very similar, and would become very difficul
@RodrigoSilva standing desk
@Amy and here is what the view looks like: gist.github.com/mikey32230/89644d4e82d6358b7b9e62f92caa5a98
@Amy so.. its pretty grossish because of the if/else blocks and variables. but it does work..
14:13
@Antoine I guess that'll be my last resort, of sorts :P. I'll try to find the most suitable sitting conditions first
I've read that it works wonders though, once you get used to it
user47589
@Michael please address your question to the room in general instead of singling me out.
In my home I have a multi desk
Standing with an LCD and sitting I use the laptop directly
1 pomodoro cycle in each position
@Amy okay I will. Sorry about that.
14:29
I asked a question about why some of my JS was working. This guy then answers with a response that doesn't use JS and opens another window. I say I don't want it in another window. He tells me that I'd have to use JS for that.
These are the kinds of people I almost feel like hitting in the face.
That seems... Strict. Did you have any pain that made you come up with that scheme?
14:46
sounds like a problem with comprehension. It could just be that their grasp of English isn't great.
wait, is that @CharlieBrown lurking in the channel? :D
/creepin
user47589
who knows what lurks in the dark corners of C# chat
yo, can anyone explain why a deadlock happens here -> pastebin.com/cwvsKfAN ?
@Amy Toxic owls.
From the Moon
user47589
14:49
are the toxic owls from the moon nazis?
does methodAsync().Result; run the Task?
@Adrian it's not a deadlock - it's just not awaiting the result in SyncMethod()
yeah
it is, when you do .Result it waits for the method to complete and then returns the result
@Amy Panino.
14:50
it's like running it synchronously
is that so?
so it is
and yes methodAsync().Result does run the task. Very weird was that on my local machine it worked (with the first sync method) but when deployed it didnt
spent all day chasing down this bug
@Squiggle yes, that's actually true.
> Accessing the property's get accessor blocks the calling thread until the asynchronous operation is complete; it is equivalent to calling the Wait method.
user47589
calling .Result directly can sometimes cause a deadlock. blog.stephencleary.com/2012/07/dont-block-on-async-code.html
14:53
ah, yeah.
33
A: await works but calling task.Result hangs/deadlocks

Stephen ClearyYou're running into the standard deadlock situation that I describe on my blog and in an MSDN article: the async method is attempting to schedule its continuation onto a thread that is being blocked by the call to Result. In this case, your SynchronizationContext is the one used by NUnit to exec...

Gotta love .NET's wacky tasks.
that smells a bit, but I can appreciate why it happens
that is... non-obvious
14:57
@Amy if I'm reading this correctly (which I might not be), the task ends up awaiting itself?
yeah it's very weird, especially because it does not do it all the time. when you do await something(); then something should execute on another thread (though it is not guaranteed). I guess if it does end up on another thread it works but if it doesn't then you have a problem
user47589
i dunno
user47589
i try to avoid async when i dont actually need it.
@mikeTheLiar essentially, yes. the task scheduler ends up using the same "synchnorization context" for both the calling code and the task, so the task can't run because it's waiting on the caller which is waiting on the task.
@Amy its pretty much never needed
15:03
It's Tasks all the way down.
what do you mean async is never needed ?
@Darth_Wardy If it was needed it wouldn't be a good practice
user47589
@Darth_Wardy that's the conclusion i've come to, at least in the context of web dev.
that said I pretty much use async all the time now
async/await is awesome
15:04
It's not needed, it's just considered to be a good thing if you do
I don't use async. Ever. Because I don't have performance issues. And async/await just adds more complexity with no added benefit (when performance is moot).
@RoelvanUden yeh if high load / concurrency is not a problem then you'd be ok
We have the best awaits.
Of course you could do it with TPL (ContinueWith .. ) but it makes code way clearer and easier to write. And I don't think there's any performance loss
I like tasks and async / await
15:05
In Haskell, everything is async
I wondered how long that would take
Exactly. Now, if async/await would actually enable me to have a single-threaded web app under IIS, I'd be all over it.
user47589
i had some async methods until i figured out how hard it is to use DynamicProxy2 with async methods.
15:06
@RoelvanUden What's the reason for wanting single-threaded?
@Darth_Wardy :P
@KendallFrey Avoid having to think about locking. You know, like nodejs.
Which is easy for desktop-apps and console apps and services.
But nearly impossible to achieve under IIS
lol precisely 38 people
user47589
one thread to rule them all
you're a minority @KendallFrey lol
15:08
That's the entire purpose of my life, bro
Except for the ciswhitemale part
user47589
@KendallFrey you remind me of i.imgur.com/mz4NoJO.gif
pure gold: "Finding a person who gives a shit about Haskell is an inherently NP-complete computer science problem."
that is a 6 year old post. there's gotta be at least 5 or 6 of those people now.
yeh they live in here
15:10
@Darth_Wardy No it's not. It's O(n) to find and O(1) to verify. Get your facts straight.
hey its not my blog post
Mondays suck
user47589
monday is just a frame of mind
15:13
cheers
Struggling a bit with this, I have two Bootstrap DateTime pickers that take a DateTime value in a Razr form.

But even though I can see the Outage Start and Actual BC values are populated before returning to the view, the DateTime pickers don't get populated with the model DT value
Did you look at the HTML/JS output?
My markup is fairly simple, not sure where the value setting went wrong
yes the output console gave no errors
in Chrome Dev tools
That's a fuckton of code. Did you debug it?
yes I'm going through it at the mo
also I did notice when I inspect the DateTime picker input element, the value is there, just not being displayed..
15:27
DateTime pickers and HTML forms are a nightmare unless you know exactly what you're attempting to accomplish
can you not use the default HTML5 <input type="date"> fields?
user47589
he might not. i can't, because i have to support IE8
also: beware of timezones, because client/server date handling wants you suffer.
IE8?
user47589
yeah
does MVC modelbinding use the format in a DisplayFormatAttribute when parsing incoming values?
user47589
lol
user47589
@StevenLiekens i dont think so.
good (ugt) night
fooking hell... i'm so glad i'm not IT
user47589
I'm glad I'm IT
15:42
omg Amy is IT! Run away!
not gonna tag me
We all float down here.
so our webserver is randomly unable to make outbound requests
and it's randomly able to make outbound requests
@mikeTheLiar my word that took a turn for the dark
it's obviously a DNS issue
no errors in the errorlog... windows can't figure out what the problem is...
DNS settings are same between this server and one that works
user47589
15:45
can someone help me translate some WPF?
user47589
toward the bottom, you see "DataTemplate.Triggers"
@Amy @JohanLarsson does a good amount of WPF
user47589
if I'm interpreting this correctly, all it's doing is setting the color to red for "inactive" riders. am i read this right?
user47589
i can't run the code unfortunately to observe the result.
15:47
@Amy yes that looks correct
user47589
ok, thanks
if the value is "N", it's set to a red background
i should totally dig up all the info i can on you now for making me look at xaml >.<
why not use a valueconverter instead of a datatrigger? out of curiosity
user47589
dunno. this is the WPF app i've been working on replacing
"Please restart the machine to apply these changes" "...um no thanks, let's not do that."
modernizing it?
user47589
pretty much. its becoming a web app
15:50
you could convert it to silverlight from wpf fairly quickly i'd think ;)
user47589
:p
the page disappeared....
user47589
i removed it
"www.google.com's server DNS address could not be found."
gotcha
Is it me, or is your pony angry? >.>
15:57
Don't make Amy angry. You wouldn't like her when she's angry.
user47589
I still feel bad about last time. Those poor children....
user47589
My lawyer told me they'll never walk again.
You mess with the pony, you get the friendship.
gaaaaaaaaaaasp! you trampled them!
!!friendship
15:59
@mikeTheLiar That didn't make much sense. Use the !!/help command to learn more.
@mikeTheLiar I get to be amy's friend if I mess with her?
Look at this code
16:03
if (IsFirstTimeLoad)
                if (Convert.ToSByte(cboFundNameType.SelectedValue) == (byte)FundNameType.Long)
                    txtFundName.Text = txtLongName.Text;
                else if (Convert.ToSByte(cboFundNameType.SelectedValue) == (byte)FundNameType.Medium)
                    txtFundName.Text = txtMediumName.Text;
                else if (Convert.ToSByte(cboFundNameType.SelectedValue) == (byte)FundNameType.Short)
                    txtFundName.Text = txtShortName.Text;
                else
does the lack of curlies cringes anyone else??
it does to me.
but only the outer ones
#gotofail
the inner ifs don't need braces imho
16:04
@milleniumbug ikr, my collegue won't accept my opinion
:(
I think they do
You can keep them on the same line to get the aesthetics
yeah, the outer one is the one that gets to me the most
But you can almost nothing by omitting them and open yourself up for a world of headaches later
@SamyS.Rathore I'd have to secretly figure out a way to make the build fail without curly braces
16:05
that's solvable with autoformatters and compiler warnings
stylecop
How can I politely ask him to not do that?
and my freaking server decides it's going to go play in the outside world for a while >.<
@mikeTheLiar gcc 6.1 can warn on this now
16:06
why can't it STAY out there?
!!afk nommin
16:45
Does anyone know specifically why if (!iVar) doesn't work with int? iVar?
@Sometowngeek Because ! doesn't go with int. Why would it?
it's a nullable int, hence int? iVar
You can only have boolean expressions inside ifs.
It's not like C and company, where zero is falsy and other numbers are truthy.
@Sometowngeek That still doesn't answer the question.
Do you want iVar.HasValue?
16:47
I'm trying to simplify my if expression into a shorter one instead of a ridiculously long one.
like iVar XOR jVar
that's a somewhat long one, but I have a longer one.
If it's that long, you could wrap it in a function.
if(IsWhatever(some, variables, go, here)) { DoStuff(); }
That works.
lol... I love how you come up with mock examples. :)
Thank you
Any time. Follow your dreams.
@KendallFrey I thought I could use simple if statements like if (!iVar) because iVar has the nullable notation.
hello pplsz
16:53
howdy
@Sometowngeek You're making some assumptions that don't make sense to me.
@KendallFrey, you are the haskell guy right?
@Sometowngeek those two concepts are fundamentally different things
There is no relation between if statements and nullable values
@Nathvi No, but I'd love to meet him
I mean, you like Haskell... ?
you program in Haskell ?
16:54
"because iVar has the nullable notation" is kinda nonsense.
obviously
@GrantHill not kinda. Complete gibberish.
user47589
ponies have the friendship notation
@KendallFrey Maybe some education would help instead of just stating how it appears to you.
It's why T-PONY is taking the world by storm.
16:56
@Sometowngeek ! is a unary operator that applies to bools. int? is not a bool, ergo, ! does not apply to int?
@Sometowngeek we're trying to tell you that you're forging relationships where none previously existed
user47589
@Sometowngeek it isn't how it "appears" to him.
Ok... maybe I'm not phrasing my frustration properly. I'll come back to it when I can form proper words to explain it.
This looks like a job for a type developer.
I think we need a type developer for this tutorial.
@GrantHill damnit
user47589
16:58
lol
Grant already answered my question. I am just being nice enough to answer @KendallFrey's question.
You beat me to it in spirit, though, Mike.
Types are the spirit of relationships.
user47589
what is the body of relationships?
@Amy the penis/vagina
17:02
How very hetero-normative of you.
/s
user47589
that went in an unexpected direction
user47589
taco taco
HTML 5 Compliant Taco
taco is the other chat room's safeword
17:04
This just makes me think of the pro-LGBT thing Chipotle did at some point where you could pick pins indicating whether you preferred tacos or burritos.
user47589
lol
Hi guys, I try to start with MVC. What do you use for gridview? did datatables.net is the best?
user47589
define "best"
I dont know where to start
user47589
every grid control has its pros and cons. there is no agreed upon "best"
17:17
your right
datatables have something not free, maybe thats the con
Her right what?
Amy has a very nice right.
Much better than her left.
She has the best right.
if I want something totally free, what should I look for?
user47589
look for something that's free.
user47589
17:21
there's a limited number of grid controls for MVC or JS.
user47589
define your requirements and look through the offerings online. we can't give you a better answer than that. if you ask a dozen people what the best brand of cookie is, you will get a dozen different answers.
except the answer is Oreo.
user47589
heretic
>Not making your own cookies
>2016
I know, I saw a little of different answer
user47589
17:22
> I saw a little of different answer
user47589
what
I mean theres a lot of place that said different things
Is there a simple way I'm overlooking to call Type.GetProperty() and get the "nearest" match in the hierarchy? i.e. if defined in current type, return that, otherwise check base class, then base of base, etc.
everyone had his preference. but usely its easy to found a list of free [whatever you want]
Part of the problem is the property is defined at different levels with the same name.
user47589
17:24
@KendallFrey is BindingFlags.FlattenHierarchy what you're looking for?
Nope, still throw ambiguous match
user47589
oh i see.
user47589
there's a BindingFlags.DeclaredOnly i think, which looks only at that type
right, that's what's currently in the code
user47589
if its not found, you'd have to check the base class, and so on up.
user47589
17:25
i dont think there's a simpler way than that.
mmk thanks
user47589
are these shadow properties instead of overrides?
yes
as per usual, not my idea
Nothing's ever your idea is it
user47589
I blame Zoidberg.
17:33
@Failsafe None of the crap in our code
can i get a high paying job where i don't need to have any ideas
i want one
You could be a professional athlete.
Or CEO
user47589
or a congresscritter
Or potential President of the US, apparently
17:33
hey CEO's have ideas
user47589
no, POTUS needs the best ideas
CEOs have ideas all the time, like "Let's charge into this technology" or "pay me more".
whatever makes the most money
@Failsafe "I should buy a boat"
user47589
a printing press makes a lot of money
user47589
17:34
you could become a printing press.
They did say you could be anything
You could make a mint if you work for the treasury.
user47589
100% of our money was made on printing presses
What about coins?
user47589
17:35
damn, i always forget about the coins.
We have the best coins
They've got presidents and shit on them. Unbeatable.
user47589
okay, so its only 99.999% of our money is made on printing presses.
Real talk though, we need to get rid of the $1 bill
And kill the penny while we're at it.
I like those Presidental dollar coins. I'd be happy to have those instead of bills.
17:37
real talk
we need to get rid of the $2 bill
You can have my $2 bills when you pry them from my cold, dead money clip
Those Canadian two dollar coins are neat.
Coins are just cooler than paper money in general.
Your money clip is alive!?
@Failsafe no. I just said that. Can't you read?
Bigger coins have a pleasant heft to them that bills just don't match.
17:38
Your money clip was alive!?
You needn't have been alive to be dead.
Let's move to a pure yap-stone based economy
@GrantHill me_irl
user47589
sometimes i think my purse eats things, my lip gloss tends to disappear like a fart in the wind.
@GrantHill Or just move to Canada. We're years ahead of you guys.
17:41
@Amy that's impressive
Your lip gloss is an airbender
That's what I'm saying. I love the idea of no pennies and one- and two-dollar coins.
user47589
we should get rid of the penny and the nickle
I love having a nice, hefty coin in my hand. Quarters are starting not to cut it.
I think we're gonna be abolishing nickels soon too
we should put money back on the gold standard
or some other finite resource
17:41
Let Roosevelt be at the bottom of something for once.
user47589
money has yet to be standardized by IEEE
@KendallFrey I thought the Canadian economy was entirely based on maple syrup, moose, and sexual favors from your mother?
I think we can squeeze more bits of precision out of our money by adopting a base-mantissa system.
@mikeTheLiar And Tim Hortons
Oh right, can't forget the Timmies
17:43
I have a Log4Net best practices question. I'm in charge of evaluating whether it's worth taking on the license and a dependency to replace our existing logging infrastructure or if I should write our own.

Right now, I have a class that wraps the Log4Net logger. It's in its own project that has the Log4Net NuGet package installed and a Log4Net.config file. Everyone that needs logging references this project and uses the class. Is this going to work in the long run? I'd like to avoid having to install Log4Net in every project and copying a config file.
Well the wrapper is still going to need a config and log4net
Yeah. I'd like to only have it in one place.
I was having some problems earlier with log4net looking in other projects for config files, but those seem to have vanished.
user47589
i want to be paid in salt like the roman soldiers thought they were.
@GrantHill I'm just not sure what problem you're solving here. Multiple solutions are going to be using your logging wrapper? What if the need their own logging settings? I think it just has a potential to become a giant mess.
Eventually you're going to end up with the same problems that log4net and config files are solving for you
Not multiple solutions. Multiple projects in the same solution. Is the best practice for every project to have the log4net package installed and have its own config file?
user47589
17:47
that's basically what the Common.Logging library is, just an abstraction on top of an abstraction
The end goal here is to have a flat file our clients can send to us when something goes wrong, which I realize might make Log4Net overkill.
Right now, we log to the Windows event log, which our clients might not have access to and would have a hard time emailing to us.
Nah log4net is exactly what you want I'm pretty sure
@GrantHill usually, we do have every program reference log4net and/or nLog directly.
user47589
Just use log4net directly
and put the log4net configuration into the app.config
user47589
17:48
its not worth the time to abstract it out
Now, we will want to change log settings while the application is running, so we can't just put it in the app.config.
@MichaelEdenfield Every program, or every project?
every project, sorry.
user47589
put it in a separate log4net.xml
user47589
you don't have to put the logging configuration in the app.config
That's what I'm doing right now.
(Watch doesn't work otherwise)
17:50
you can tell log4net to monitor your app.config / web.config for changes.
just like a separate config
but it works either way.
it's mostly a non-issue for web apps because changing web.config causes IIS to recycle your app anyway
user47589
yeah
This isn't a web app, for one. I thought I read somewhere that Log4Net can't monitor App.config specifically.
user47589
thats the core reason i put logging cfg in a separate file
6
Q: log4net doesn't watch my app.config

FabianI configured my log4net to watch on changes made to the app.config file. [assembly: log4net.Config.XmlConfigurator(Watch = true)] When I run my app and change things in the config file, these changes only take effect when I restart my app. Why could this be? Is there also a way to tell log4ne...

6
A: log4net doesn't watch my app.config

Igor BrejcAccording to log4net documentation, the Watch feature does not work for application configuration files (app.config, web.config): Because the System.Configuration API does not support reloading of the config file the configuration settings cannot be watched using the log4net.Config.XmlCon...

Second answer.
17:53
but that answer is incorrect. if you run log4net.Config.XmlConfigurator.Configure(); in your Main it will treat your app.config like any other file.
we've used it
it can't do it through System.Configuration directly, so just using the attribute isn't enough.
I'm trying to find the project now. we usually don't need to do it.
Huh. I'll give it a shot in my little test project here.
we switched over to nLog a while back, so I may be misremembering.
Does the log4net configuration stuff have to be in the startup project's App.config?
if you want to put the configuration in the app.config then it has to be in whatever config file the executing assembly uses.
user47589
We use NLog
17:58
we switched to nlog for 2 reasons:
1. by default, nlog reads nlog.config; for log4net you have to do some stuff to read a separate config.
2. nlog had a nuget package way before log4net.
i lied. 3 reasons.
3. log4net 1.4.10 took forever to get released and 1.4.9 was a .NET 2.x library, plus it had a dependency on System.Web, which meant you couldn't use it with the .NET 4 "client" profile
#3 is no longer an issue, but by the time it was fixed we'd moved on
user47589
NLog's API just feels easier to remember.

« first day (2102 days earlier)      last day (3072 days later) »