« first day (3615 days earlier)      last day (1325 days later) » 
00:00 - 12:0012:00 - 21:00

mr5
12:04 AM
@Wietlol hey
 
ohai
 
mr5
I just published a smol library. Can I have your opinion from it? Do you think it would be useful?
 
> validationService.For(this)
.AddRule(e => e.FirstName, new RequiredRule())
.AddRule(e => e.LastName, new LengthRule(50))
.AddRule(e => e.EmailAddress, new RequiredRule(), new LengthRule(100), new EmailFormatRule())
preferably, you would have a single instance for the validations
 
mr5
y tho
 
I made that mistake in my database lib, where I make a linking object for each column for each instance
figured it wasn't a great idea afterwards
I suppose this is more of a usage issue, but always keep in mind that examples is what people rely their design on
 
mr5
12:10 AM
I was thinking of having a dedicated instances of that service for each class model that needs it.
 
I suppose it is useful...
 
mr5
do you mean singleton instance of the validation service?
 
the lib
 
mr5
do you find the readme.md or examples easy to understand?
 
I might suggest returning an optional error object instead of a boolean
perhaps even a list
lists make it easier to compose them
 
mr5
12:13 AM
it also has a list of error messages. the .FirstError is just a shortcut for ErrorMessages.FirstOrDefault()
 
replacing bool IsValid(T value) with IList<ValidationError> Validate(T value)
 
mr5
@Wietlol are you referring to the overridden bool IsValid(T value)?
 
ye
 
mr5
welp, it seems if I do that, the users of this lib would need to put more work for the validation implementation?
the idea is, each validation model (LengthRule, RequiredRule, EmailFormatRule for example) would be limited to a single error message and single condition as much as possible.
 
you could make a child interface, overriding the behavior, making it simpler to work with by instead exposing a bool IsValid(T value) method
the problem with it is that your error messages are static
an error message should be given the information of the failure
for example
@Wietbot evaljs java.lang.Integer.parseInt("test")
 
12:20 AM
java.lang.NumberFormatException(For input string: "test")
 
mr5
I also included this in my example to somehow overcome that thing: ErrorMessage => string.Format(Strings.MaxCharacters, max). This will show more context, in this case, the users will be informed of the max characters allowed.
 
as opposed to
@Wietbot evalcsharp Int32.Parse("test")
 
System.FormatException(Input string was not in a correct format.)
 
the C# message is a generic message, it conveys the reason of the failure
the Java message is a bound message, it conveys the reason of the failure and the information of the failure
you should always include as much non-sensitive information in error messages as possible
 
mr5
hmm
 
12:23 AM
in your case, you might even want to try to pass the property
 
mr5
do you think I should make the ErrorMessage a List<string> instead of string only?
but it's already shown in here:
ValidationService_PropertyInvalid(object sender, ValidationResultArgs e)
{
    switch (e.PropertyName)
    ...
 
property 'LastName' with value 'mr5' did not satisfy the length constraint of 'min=5'
IList<ValidationError>
 
mr5
e.PropertyName and e.FirstError/e.ErrorMessages
 
or something
 
mr5
it's like a key/value pair already
 
12:25 AM
can you nest validators?
like... make a validator for Person
and have that validator validate the name of the person
and the date of birth
etc
 
mr5
can you give a code example?
 
prolly not...
 
mr5
I'm kinda confused with nested validators...
how would it look like?
new RequiredRule(new LengthRule())? like this?
 
perhaps something like this
validationService.For(this)
	.For(e => e.Person, v => v
		.AddRule(e => e.Name, new RequiredRule(), new LengthRule(50))
		.AddRule(e => e.DateOfBirth, new PastDateRule())
	)
	.AddRule(e => e.EmailAddress, new RequiredRule(), new LengthRule(100), new EmailFormatRule())
 
mr5
ahh
 
12:30 AM
when you have a property of a non-primitive
 
mr5
nope. it can't do that.
but they can do that when implementing the IsValid(T value) level.
 
hmm...
 
mr5
bool IsValid(Person value) {
     // messy code
too bad, it would likely end up messy tho
 
they can only return true or false though
if you could return a list of violations, then they could
 
mr5
yep. you're right. I should prolly think about how it should handle that.
 
12:33 AM
what you could do is not use this in the For(this) as well
 
mr5
hmm
why not?
 
perhaps just For<ItemsPageViewModel>()
 
mr5
the reason I use it is to register for the propertychange of that instance.
 
but I am not familiar with INotifyPropertyChanged
 
mr5
that thing is pretty popular with MVVM devs though. I think my lib only caters those devs
 
12:35 AM
if you can just make a IValidator<T> (in your case IValidator<ItemsPageViewModel>), then you can do validator.RegisterFor(this)
and re-use the object
not hard coupling it
 
mr5
but validator.RegisterFor(this) would make it coupled it also?
 
make the validators know how to validate, not which instance to validate
validator.RegisterFor() would couple it
but it makes the validator re-usable
it allows you to create a validator without instances of your model
 
mr5
yeah like in the bootstrap section right
hmm
 
mr5
12:51 AM
.AddRule(e => e.Person, new PersonRule())`
...

PersonRule : MultiPropRule<Person> {
    // validate each property here using property as key, and value as error message
}
@Wietlol watchu think?
 
uhm... iDunno
value as error message?
sounds abusive
 
mr5
it's similar to what you suggest. I think I need to do it first then show you later.
lol. it sounds the same from what you suggested: IList<ValidationError>
 
not sure how ValidationError looks like though
 
 
4 hours later…
 
2 hours later…
6:34 AM
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
9 hours ago, by Hozuki
'Cause a console application doesn't have a UI? :\
^ this
9 hours ago, by Captain Squirrel
WHY IS IT SO DIFFICULT TO OPEN UI TO SELECT A FILE IN A .NET CORE CONSOLE APPLICATION
Kieran - he pops in in the middle of night to flame
Roel - he always watches chat and never sleeps
Sounds lika a horribly pharsing for a school task.
And as if you should use `static` which really doesn't make any sense.
 
what's ur go to function to return day of week where input is month/day/year?
ex: 9-7-2020 --> Monday
 
Good day bois.
@Squirrelintraining I'm always watching.
 
6:53 AM
@Hozuki Big Roel is watching you 👁
@Adan stackoverflow :D
 
found it!!!
 DateTime dateValue = new DateTime(2008, 6, 11);
      Console.WriteLine(dateValue.ToString("dddd"));
 
yo
yo yo
yoooooooooooooooooooooooooooooooooooyoooooooooooooooooooooooooyoooooooooooooooo
 
7:19 AM
morning
 
7:37 AM
@CupOfJava Get out of 'ere!
Welcome Ceptus!
 
squirrels -_-
 
 
Java coders :-P
 
p3k mimi
@mr5 BRING P3K BACK!!!
How dare he leave chat?
 
I missed mr5
I need to wake up earlier
 
7:48 AM
Like philipne early?
 
wazzup
 
exactly
 
He'll probably be back shortly
 
@Cleptus Don't lie we all know java desktop apps are supreme XD
 
totally. Get with it man, java desktop apps are hip and rad
 
7:52 AM
what happened in the last 5 months? People are starting to treat java like javascript.
 
in what sense?
how do people treat javascript?
 
a lot of people don't like javascript
 
is javascript the new PHP now?
 
god no, PHP is king
 
A lot of people don't understand JavaScript.
 
7:59 AM
I only accept my error messages in Hebrew
 
it has its fair share of oddities
I've never seen a language deal with scope quite like javascript
 
The only problem I have with JS is debugging
 
8:16 AM
@Hozuki For a good reason
 
@Neil let and const solve everything.
but people still insist on using var
 
It's not just var roel..
 
It's the prototype-this? Use arrow functions.
 
It's not just the prototype-this
May I remind us all of the watman destroyallsoftware.com/talks/wat
 
8:32 AM
That's not scope, that's type currying.
Which you can avoid by not being a complete retard, or using typescript.
 
> currying
😂
 
good morning
 
Fit's more than anyhting else.
 
That's... the name of this.
 
I thoguth concurrency?
Or wait
No that was sth. else.
 
8:34 AM
@Hozuki yep, they did the best they could with that
 
Concurrency is two things happening at once w/o multiple threads, then it'd be called multi-threading.
 
Coercion is what I meant
 
they couldn't change the behavior of var, so they did the next best thing
 
yep.
 
Good morning :D
 
8:39 AM
Moin Turtle.
May I ride you?
3
Speaking of turtles, Avni is lurking!
 
What a f*cking power move
2 mins ago, by Squirrel in training
May I ride you?
Maybe I misjudged you squirrels
 
^ This url is great
> /ive-made-some-pretty-bad-choices-in-my-life-but-having-a-turtle-as-a-form-of-transportation-tops-them-all-its-not-logical-money-saving-or-conven.jpg
 
lol
 
kame means turtle ;)
 
I'm dying XD
 
8:46 AM
1 hour ago, by Neil
user image
 
I don't want to live in this world anymore
what is up with people that believe in the chad meme and the word "cuck"
 
It's part of the meme apparently
 
it seems as if its shoehorned into places it doesn't need to be
 
shoehorned, I like that word
 
shoehorns are probably one of the most under-appreciated objects
 
8:55 AM
@CupOfJava 😂
Shoehorn Bundy!
 
I have never owned, used, or appreciated a shoehorn in any way.
 
You're missing out Avni.
 
Do you wear dress shoes?
 
I prefer wearing flexible shoes.
I think the only time I did was at my wedding.
 
He wants a shoehorn, the kind with teeth. People should be beat up, for statin' their beliefs. He wants a shoehorn, the kind with teeth, 'cause he knows there's no such thing.
 
8:58 AM
Oh, wow, I don't know this song but I saw it and said "those really looks like TMBG lyrics".
 
very keen of you
 
They have a distinctive style.
 
indeed
 
@AvnerShahar-Kashtan Shoehorns just help you put your shoes on without bending down
 
I only know two albums of theirs (though I love them both), but every time I tell myself to go and listen to more, I get daunted by the sheer mass of material.
@Squirrelintraining I wear sneakers and sandals. I'm good either way.
 
9:00 AM
they've made so many good songs
 
never heard of TMBG before
am I living under a rock?
 
shoehorns protect the sole of your shoes
 
@AvnerShahar-Kashtan Even in that case, really just makes easier
 
you've probably heard them before, but didn't realize
Remember the title song of Malcolm in the middle? That was a TMBG song
 
I suppose I dont know many song writers in any case
 
9:01 AM
Along with Weird Al, they're among the old guard of geek rock.
 
@Wietlol Well you're from the netherlands, so yes?
 
@Neil ye... no
 
ah well it was a popular show in the States
 
@Neil And what about bird house in your soul? - forgot the acutal name
 
Their cover of Istanbul (Not Constantinople) is their most famous song, I think, but they have many good ones.
 
9:01 AM
I suppose I should watch TV now and then :D
 
or am i mixing bands again?
 
@Squirrelintraining That's the name - I just put that song on :)
 
@Squirrelintraining Yep, that's a good one
 
I think they're great because they balance silly/quirky/geeky lyrics along with actual musical chops. Again, like Weird Al Yankovic - he's silly, but both at his parodies and polka-covers show how well he understands the styles and genres he covers.
 
I like snowball in hell too
 
9:04 AM
That's what separates cringy novelty music from good humorous music - being musicians that do humor, rather than comedians putting jokes to music.
 
Also I was really big into Weird Al when I was younger
 
@Neil He has plenty of material I still think is cringy, or at least worthy of an eye-roll, but a lot of honestly good parodies and pastiches.
Like his 11-minute epic reworking of R. Kelly's Trapped in the Closet.
 
yeah, that's my reaction nowadays too. It's a bit cringy honestly, but I guess my taste has changed over the years
I still remember them fondly though
 
lately, I have been quite into DJ Cummerbund
I havent found any other artists that do something like that
 
@AvnerShahar-Kashtan I used to listen to that song so often when I was high at university 😂😂
Good times
 
9:07 AM
@AvnerShahar-Kashtan that was the only time I used shoehorn
 
So I'm going down to cowtown, the cow's a friend to me. Lives within the ocean and that's where I'll be beneath the waves the waves.. and that's where I will be. I'm coming down to the cow beneath the sea..
yeah, the lyrics are weird with a capital W
 
Is there a good video for learning "advanced" C# topics?
Any recommendations?
 
just look up videos about specific C# advanced topics and you'll probably get a better detailed explanation of each like LINQ or delegates
 
I solved 450 C# Katas on CodeWars now. :)
 
@ntohl Right? I mean, it was a great night and I had a lot of fun and we've talked about doing it again, me and my wife, just for fun's sake, but I don't think just for an excuse to use a shoehorn is a good enough reason.
 
9:11 AM
@Neil could you recommend a youtube channel?
 
@kame not C# specific, but I would recommend looking into the Single Level of Abstraction principle
 
imagine to divorce just for sake of using a shoehorn
 
most programming principles are quite interesting to look into
 
@kame this is going to make me sound like an *sshole but read the manuals they go pretty in-depth on even complex parts of the language.
 
@kame honestly, don't know any good youtube channels for that. Just search on youtube and pick amongst the more popular ones
 
9:12 AM
@Wietlol Thank you :)
 
I've never been a big fan of videos for learning programming material
 
no one-box?
oh wait, that only works with actual replies
 
you can skip around a lot more easily with a written article
 
@Wietlol lul
 
9:13 AM
@Neil this is true. Could you recommend your written article sources then? :)
 
again, it has been a while :)
if I found a good written article, I've long since forgotten the link to it
the article is in my brain, which is far more easily accessible than a website
 
I recommend Stephen Clearey's blog for articles related to async/await and asynchronous programming in C#.
 
and yes, the official documentation should not be overlooked.. the more experience I've had as a programmer, the more I tend to prefer direct documentation over tutorials and such
 
@AvnerShahar-Kashtan that's a masterpiece.
 
9:16 AM
Is anyone here a paying customer of Azure?
 
tutorials tend to not quite work as indicated or fail to explain key concepts
 
@Neil years ago the Microsoft tutorials looked so boring and overloaded. :/
 
@CupOfJava I think I have a recurring monthly $0.50 bill for a DNS entry.
 
not tutorials --> documentations
 
true, but if you know what you're looking for, you can skip to the "best part" ;)
 
9:17 AM
@AvnerShahar-Kashtan Have you used firebase as well?
 
Specifically, go to the sidebar on Clearey's blog and read the "Popular Posts" and read through some of the Series there. Good overviews of the Task Parallelism Library and async/await, including internals.
 
@CupOfJava Nope, except in a short tutorial they made us go through to familiarize us with GCP concepts.
 
really, not like there's this clear division between basic and advanced concepts.. there are just concepts you understand and concepts you don't
Focus on the ones you don't understand
 
@kame what type of C# programming are you trying to do?
 
9:20 AM
@CupOfJava Hmmmm, no specific type
 
@CupOfJava String type
 
:)
 
lol
 
I solved many Code katas in CodeWars and want to do something other now. Maybe a little project.
 
@Neil I'd agree there isn't a clear-cut distinction, but most people would agree that data types and control flow are more basic than, say, yield iterators or task parallelism.
 
9:21 AM
I need a project idea.
 
But in between it's more of a gray area, yes.
 
@AvnerShahar-Kashtan I don't know if I would call those things "basic". They're just used in every language and the first things you would learn
 
build a e-commerce store application
 
@Neil Yes, that's commonly refered to as basic. :)
 
but basic implies it's simple. We all learned programming through the eyes of a novice and had to understand these things like anything else
 
9:23 AM
@kame build e-commerce store in Blazor
 
it's just difficult to see well-understood concepts as "hard"
 
In the context of the question, the fact that they're fundamental, that they serve as the foundations of what you learn later, means exactly that @kame has probably learned them already, and is now seeking "advanced" topics, meaning ones that aren't the first you learn.
 
fair enough
 
"basic" and "advanced" doesn't necessarily mean "simple" vs. "difficult".
 
@ntohl This looks interesting :D
Thanks for all your help :)
 
9:25 AM
idk how I feel about Blazor
 
Another great TMBG song:
> Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of
 
@AvnerShahar-Kashtan I need to look into this now and then...
 
@kame THere is this one guy hang on... through the power of waiting you wonÄ't notice the wait Tim Corey
This guy is good
 
I also like the well researched Mammal.
 
That must have been a newer album, I had never heard that one before
 
9:36 AM
It's actually from Apollo 18, their fourth album from 1992, right after Flood.
 
I think flood was the last album I had
or rather, that my older brother had
I was 10 in 1992
 
CD players were still relatively new in 1992, and you could see they were experimenting with the possibilities of the medium. In addition to the 16 regular tracks, they also had 21 tiny tracks (around 5-10 seconds) at the end of the CD, so that if you played the album on Shuffle, you got those tiny songlets between the full songs.
I was 13, but I think I only listened to it around 1996-7.
It's a great album - a good version of The Lion Sleeps Tonight and lots of good songs.
 
I think with CDs going the way of the dodo that we'll never really ever get the same feeling you get when you buy a CD from the music store again
I remember legit spending hours in music shops carefully determining which CDs I wanted to spend my precious money on
 
And the generation before would tell about the feeling of putting a vinyl record on the record player for the first time, placing the needle carefully to hear that crackle and hiss.
 
it's true
 
9:46 AM
and cds sound quality is still higher than mp3...
 
I had a record player growing up that I got from my older brothers
we had a Bad album from Michael Jackson that I sometimes listened to..
It's a damn shame we didn't keep it. Even when not in mint condition, would have sold for a pretty penny
 
I scrached the sh*t out of our records
 
I also remember downloading mp3s and making a collection
it got so big that I had burned several CDs worth of mp3s alone
then Metallica and some other bands made a point of denouncing the downloading of mp3s and a petition started that they would never buy Metallica albums ever again :D
I signed that petition too
Never bought another Metallica or any other album after that
 
10:12 AM
@Neil I remember selling burned CDs in high school
 
not a lot of people had a CD burner when those started being available
the first ones were also very slow if I recall
then you started seeing like 2x, 4x, 8x, 16x
 
wasn't everything slow lol
 
true, but you would put a CD to burn and like let it go for a while, or maybe just to me it seemed like a while
everything seems to take twice as long when you're younger
 
yeah
 
10:35 AM
@Neil To be fair, though, most of their albums after that were crap.
 
yep, they kind of faded out of the lime light after that
 
Though to be fair, I'm never been a big metal fan, but I do like their earlier stuff.
 
I usually take my metal medium as well
 
Ba dum tss
Did you hear about the midget palm reader who was found to be conning people? She's a small medium at large.
 
smh
 
10:40 AM
I'll be here all week, don't forget to tip your waitress
 
How are you guys doing with the virus?
 
@CupOfJava Resigned acceptance of the worst. You?
 
I'm pretty sure I had it
I was sick for a week and a half with all the symptoms. it sucked but it also could have been the flu
 
11:16 AM
:/
 
such
a lame
pun
 
@Freerey Was part of a great sequence of puns aimed at the fourth wall.
It was Futurama's first episode after being renewed.
 
which time after being renewed?
was it that 2008 movie or the 2010 series revival?
 
I think it was the 2008 movie, but I haven't watched them in a while.
Yeah, it was in Bender's Big Score, the first movie.
 
speaking of stuff that got cancelled: went and played some club penguin server for the first time in a decade
remember how Amy grew her hair really long over the course of a few years and then Bender burned it in a few seconds?
 
11:38 AM
@AvnerShahar-Kashtan One of thje best shows ever!
 
y'know what, though? If futurama were still around, it would have probably garnered its own R&M-style fanbase where the fans think they're super smart just cause they watch a show
 
@Freerey no
 
I..
I don't remember that scene :o
 
11:53 AM
anyone else think Amy was cute? no? ok...
 
Everybody thinks that!
 
@Freerey I only get this level of comedy because I have 3000 IQ
Actually, now that I think about it wasn't this show literally written by rocket scientists or something.
 
@CupOfJava No it wasn't.
It was written by that simpson guy.
 
00:00 - 12:0012:00 - 21:00

« first day (3615 days earlier)      last day (1325 days later) »