« first day (4043 days earlier)      last day (900 days later) » 
07:00 - 11:0011:00 - 00:00

7:07 AM
Um... This is gonna sound stupid, but can Authentication be implemented in MVC by simply giving the user object an IsLoggedIn property, or do I need to compulsorily use Cookies or JWT?
 
7:29 AM
Hey @mr5!
 
mr5
o/
 
Good morning
 
Morning!
 
If all that is required is IsLoggedIn, I might aswell buy me some lunch with your bank account by just saying "yeah that's me"
 
lol
Alright! Got it :)
So, what's the standard authentication way?
Cookies?
Although I am trying to avoid that
 
mr5
7:34 AM
@kesarlingHe-Him the reason you want cookies to make Authentication or identify user that way is that there is no "shared" memory between client & server.
 
You can also store it in local storage
JWT isn't shared memory either though is it?
 
@Squirrelkiller As is store the cookie on the Client Side?
 
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
Yes store the token in the browser's localstorage
 
mr5
and inject malicious script to stole it
 
7:35 AM
But then can't that be replicated? Like Cookies?
@mr5 Yeah, exactly
That is why I was avoiding it
 
Replicate?
 
mr5
hmm, my memory is clouded rn. I already know the answer to this before.
 
Anything digital can be copied
Anything you give the client can be stolen by them, as it is theirs.
I can replicate cookies in my browser
 
Hmm... what about storing the Cookie on the server side?
 
mr5
7:36 AM
oh yeah, now I member!
through http headers!
 
Cause, there aren't gonna be more than 300 users in total
 
Then how to identify the user?
 
Oh yeah right!
silly me
 
mr5
using /path?user=kesarling
 
7:38 AM
wait, is that really possible?
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] Guys I need pointers.
I've got a SQL-Computed Column.
I've a DTO class with that Column Name as Property.
When add a new Entity to the DB ef tries to update the Computed Column as well
how to stop?
 
nicebank.com/pay/squirrels/lunch?user=mr5
 
@Squirrelkiller lol
 
@Botler Guess you gotta go C++ then
 
[Squirrel in Training] Nah just actually type in in google what i typed here aparently
[Squirrel in Training] Popped out when I added "computed column"
 
mr5
7:39 AM
/money_transfer?from=squirrels&to=mr5&confirmed=true
 
Another citizen helpedโœŒ
 
[Squirrel in Training] thx killerino
 
mr5
couldn't they just simplify the name, like [Ignore]
 
[Squirrel in Training] But then it wouldn'T get fetched right?
 
mr5
depends on my implementation ^^
I'd say, avoid .Include(). Just build the query yourself so there's little unknowns.
 
7:42 AM
[Squirrel in Training] Okay i was to happy, it's still tries to update :<
 
mr5
Pros of not using `.Include()`:
1. Less code
2. Not confusing since you will generate the query yourself.
Cons: many!!!!!
 
dotnet ef migration add StopAddingComputedColumn
 
[Squirrel in Training] ๐Ÿ˜‚๐Ÿ˜‚ killerino
[Squirrel in Training] Nah computed columns are awesome
 
mr5
that's a cons since it's unknown to you ...and me...
and everyone
 
Why not tho maybe it works :D
 
7:43 AM
[Squirrel in Training] zey fix a lot of problems
 
mr5
you can generate computed columns on a custom query wtf you talkin about
I'm not sure if I'm fitted with my work rn in my new company. Creating documents & communicating between non-tech & tech words is not something I am good at but I'm working on it.
 
@mr5 Sounds like you're a consultant. I hear those make they real moneyz.
 
mr5
oh fakk
you're right
It actually seems like I'm a consultant there
in this past month, I only write few lines of code and it's mostly me documenting and talking with POs and CTO
 
Employer-LPT: Don't call the position consultant so you can pay them peanuts
 
mr5
7:49 AM
what does that mean?
 
[Squirrel in Training] oh gawd why is it making such nonsense
[Squirrel in Training] WHY IS IT TRYING TO UPDATE xoxoxo
 
mr5
earlier, I was actually thinking of quitting again, but then I realize this is the way forward.
 
You probably didn't hire as a consultant there, so you probably earn less than a consultant
@Squirrelintraining Did you add a migration though
@mr5 It is indeed. Good luck.
 
mr5
@Squirrelkiller it doesn't seem like they want me to know my position there, but why are they doing that?
 
Honestly they probably don't realize you're basically a consultant either lol
 
mr5
7:52 AM
@SiT I tell you, stop using .Include() it's shit.
 
Sometimes you need to .Include() stuff though
 
mr5
everything is achievable on raw query
and it's much more common
 
[Squirrel in Training] Quite often actually
[Squirrel in Training] Raw querey is ofc more performant
[Squirrel in Training] buut then actually
 
I mean, literally everything is achievable with a raw query, but that is not the point of EF
 
[Squirrel in Training] .Include() is quicker
[Squirrel in Training] what killerino is saying, if you need performance you'd go dapper
 
mr5
7:55 AM
nah, dev wise, you would spent a lot of time esp. for new like myself to build the relationship between models just to make that .Include work. Plus, those cases you mentioned earlier, that is unknown so there are more things to learn.
 
[Squirrel in Training] okay this is cursed!
 
mr5
on the other hand, on raw queries (but in LINQ style), you build the relationship through the query with their foreign ids. Computed values can be generated there too based on the model you're building.
 
What is LINQ style in this context?
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] I'm updating ~200k entities
I've batched them into 2k entities at a time to avoid timeouts and find bugs quicker.
Now It crashed on update.
Everytime I restart it crashes on the next 2.000 entries
[Squirrel in Training] like wadafaq
 
mr5
like, not string
 
7:57 AM
But a raw query is literally a string in a function expecting a string
 
mr5
to avoid crash, you do .Take(1999) so you don't reach 2000
welp, raw query for me is not using that relationship builder provided by EF and automating the query using that .Include()
 
I think when I have to update ~200k entities, I will make a raw query
EF isn't for bulk operations
@mr5 Nah that is still EF. Raw query is circumventing EF and writing your own SQL.
 
[Squirrel in Training] oh gawd i dont get it
 
Using .Include on the other hand can be faster than manually joining, since it will only be one call to the DB, while manually joinging (like e1.Where(e.fid == e2.id)) will do two calls.
 
mr5
8:03 AM
kek
depends though
 
Depends on whether or not you already made a call to e2 so you got them cached
.Include does not depend on that though, it directly makes a join on the DB
By bot is mocking me
I wrote a bot that, once a minute, GETs the microsoft website and tells me when the xbox series x halo edition is available
It has been pinging me for a few minutes
But I can't buy it because when I try to pay, that's when the transaction fails because there's no more available
And a few seconds later, my bot pings me again
Fucker
 
then you wrote that bot incorrectly :)
 
I did in fact not
I just wrote it lazily
 
mr5
maybe page is cached but data is not valid anymoar?
 
Nope, the reason is that the thing is indeed available when the bot pings
But then scalpers come and buy all the stock with their bots
 
mr5
8:09 AM
wat
 
I won't go there, my bot is just to notify me
Their bots actually buy
 
mr5
is that how in demand it is?
 
mr5
oh make sense
since you wrote a bot for it
kek
 
That is why they get bought for 550โ‚ฌ here, then get sold on ebay for double that
And it's not even released yet, those are preorders!
 
mr5
8:10 AM
then you should make a bot as well to auto buy ^^
then it will buy you 10_000x of it
 
No because that wouldn't make me any better than them
 
mr5
you join them
"if you can't beat them, you join them"
- SiT
 
you dont have to be better than them
 
[Squirrel in Training] ALSO WAFAFAQ
[Squirrel in Training] NOW ef core is ignoring my [NotMapped]
 
but if you want to, then just dont use an xbox
EF might actually be a totally broken pos
 
mr5
8:13 AM
what is pos?
 
EF is
 
point of sale obviously
And EF is pretty great
 
mr5
how tf EF is a POS?
ohh
like, pitching EF to the company right?
 
I would have to check for the latest version again, but the last time I did a thorough test of EF's capabilities, there were some seriously problematic issues with it
 
He's saying EF is a piece of shit because it doesn't always make perfect queries
 
mr5
8:15 AM
when I heard POS, I only thought about those machines from supermarkets
 
the bulk of the issues were caused by transactions not working
 
And it doesn't have exactly the interface the Wietโ„ข wants
@mr5 That is exactly what a point of sale is :)
 
literally, transaction rollback wouldnt do anything... at all!
 
mr5
@Squirrelkiller why are you confusing me?!?!?!
 
@Wietlol Guess you accidentally commited the transaction before rolling back then
 
8:16 AM
which means that migrations are broken and unstable
 
@mr5 Cuz it's fun of course
 
@Squirrelkiller if "I" accidentally did it, then "I" somehow added that in the source code of EF Core
 
mr5
EF is broken because they are forcing devs to implement the relationship builder and that .Include() and .ThenInclude() to automate the building of query. Other than that, I think EF would be okay without those.
 
and considering I am not a contributor to that library, "I" is not me
 
@mr5 You can totally use EF without those
 
8:17 AM
not EF Core
iirc
 
mr5
yeah, that's what I'm saying
 
core disabled the auto-including
 
I mean
It does include automatically if you want it to
@Squirrelintraining Don't let your kids hear that, that is their mom-speak
 
[Squirrel in Training] ahh killerino that explains why calling int virtual
 
mr5
8:20 AM
isn't curwa or kurwa a Polish word?
 
mr5
oui
 
For some reason that word works in both slavic and latin languages
 
mr5
@Squirrelkiller so I realize that virtual thing is heavily used by devs without actually knowing why. I tried removing it but it still works.
 
[Squirrel in Training] GOD CUKING DAMIT
 
mr5
8:22 AM
Then I proceed to completely remove the relationship builder and it still works.
what did you found out
 
[Squirrel in Training] @markiel i've upped your NotMapped
 
mr5
that was the computed field?
 
[Squirrel in Training] I swear by allah, I am going nuts
 
mr5
you should swear to cthulhu
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] I don'T get it...
I friggen removed the property from the model!

I must be doing something completly stoopid
 
8:27 AM
oh jesus
 
auto-migration?
 
when do you get this error?
 
[Squirrel in Training] When running the importer.
 
importer?
 
8:35 AM
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] Importer!
A little program that shoves data from one end to the other.
 
is this just C# code or an executable you downloaded?
 
[Squirrel in Training] C# code that we wrote ourself
 
so? when do you get this error?
 
[Squirrel in Training] A custom built solution for our customer to enjoy the quality of fresh data.
 
Just compute the damn display name in the application
 
8:36 AM
[Squirrel in Training] on .SaveChanges
 
have you isolated it to a single query?
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] For friggen frig killerino!
Horrible idea for multiple reasons.

Also I'v deleted the property and it still doesn't compute
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] @Wietlol I don't quite get the question.
Let me try to wrap my head around this:

I've got 200_000 entities to update
I batch themin 2_000 entity batches
It crahses on updating the first two thousands.
I restart, the first 2_000 work fine, it crashes on the 2nd 2_000
I restart, the first two 2_000 work fine now it crashes on the third.
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] I have a recursive loop that just treis to resave the batch in two smaller batches if it fails
SO I dont friggen get why it works on restart of the programm
 
1) Mark as computed
2) add migration
3) execute migration
 
[Squirrel in Training] scroll up killerino.
[Squirrel in Training] actually one of the first things i tried
 
8:46 AM
and you now commented out the property and it still gives you this error?
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] Yes 😂
Which is why I said i must be doing sth horrible stoopid wronk
 
what do you try to change?
what is the query you perform?
 
mr5
what is
 
[Squirrel in Training] context.SaveChanges
 
SaveChanges() is not a query
 
8:49 AM
[Squirrel in Training] It creates and executes the query.
 
can you actually share the code or are we going to guess how you just make errors up out of thin air?
I vote for the latter
 
[Squirrel in Training] I'd vote for the first thing, but saidly it's a no-no
 
so you dont want to solve it?
 
[Squirrel in Training] I do, but I am also bound to DSGVO and coperate policy
 
we dont care about abbreviations with more than 3 characters in it
 
8:52 AM
its alright ill only put the code snippet on twitter, instagram and snapchat
dw about it
 
also, you can isolate and reproduce while removing the context of your business
I mean, it is like me saying: "I have an exception when I click the "Run Program" button in Rider, how do I fix this error? NullReferenceException: Object reference is not set to an instance of an object."
and expecting you to know which line of code I have to change to solve it
obviously, the SaveChanges throws the error, but it is not the query
 
[Squirrel in Training] Oh that's easy, it's on the 42nd line
 
it is, in fact, not
my classes often dont even have 42 lines
 
[Squirrel in Training] welp the exception occures on .SaveChanges it might originate on sth similar to context.people.AddPeople(newPeople) but that is just pure logic
 
9:07 AM
and which person would the error throw for? and what sql query corresponds to that person being inserted?
 
[Squirrel in Training] i don't f'n know ever since it works fine the next time around
 
how about you put it in a transaction and rollback after the savechanges so that the database wont get changes between runs?
keep in mind that this might actually not do anything whatsoever, depending on which version of EF core you use
 
[Squirrel in Training] I thought ef core uses transactions behind the szene
 
mr5
x has been used a lot on loops so he decided to make it a static
 
@Botler but can you do a rollback on them?
 
mr5
9:13 AM
I used to code like this but that was when I'm still newbie.
 
meanwhile, I am reading C#10 features
 
mr5
but this guy has been coding for decades already
 
some are quite nice actually... really not useful in 99.9% of the cases, but still cool features
then there are the features that are categorized as "Ok, Java wins, we are copying more features"
and then there are the features that are categorized as "we also have to care about people who are stupid enough to not use an actual IDE"
 
[Squirrel in Training] it shound to automaticcaly on failure wiet
[Squirrel in Training] I'll add exokucuit ones
 
it should on failures, but your transactions' scopes are too smol
 
mr5
9:16 AM
what's exokucuit
execute cookies
execute biscuits
exit on biscuits
 
[Squirrel in Training] u are to amol
 
no, I is not a mole, I is lion
> Remember, this feature is only available in .NET 6. Not .NET 5, not .NET Core 3.1, or any other version you can think of. 6.
dang it, why do they make a feature and then remove it in .net 7?
 
[Squirrel in Training] which feature?
 
mr5
like completely remove or deprecated?
 
mr5 you gotta work on your sarcasm detector
 
mr5
9:27 AM
[Obsolete("No use")]
System.Wietlol.Execute()
@Squirrelkiller dunno. I think he's serious
 
they finally added Date and Time structs
someone has to be whacked for naming it "DateOnly" and "TimeOnly" though
do I call my classes "CustomerOnly" and "PetWithoutWings" and "CarThatDoesNotFloat" ?
they try to make it clear that it is a .net 6 feature, which I would have assumed from a post that introduces and explains new features in .net 6
 
mr5
ImFlyingWithoutWings
 
however, they overdone it a bit and apparently stated that it works for ONLY 6 and not any other version you can think of
such as... .net 7
 
mr5
is that what you're referring that has been removed on .net7?
 
it probably wont be removed, but the article has been written either by idiots or for idiots
 
mr5
9:36 AM
where did they stated that it will not be available on net7?
that's weird.
 
the question now is, when do we have a MonthDay type and a ZonedDateTime and all the others?
 
"only .NET6" implicitly excludes any newer version aswell as older versions
 
mr5
ohhhhhhhhhhhhhhh
lol
but it's not from the official devs though
so he's just probably not good with English like me
 
it is quite well written
the article, not .net 6 though
 
9:41 AM
What are you doing reading up on this stuff on unofficial sites
 
because the official site does not include everything
 
it does include this particular one tho
 
mr5
why are you working in C# now though
I thought you hated it
 
he does
he hates it more than he hates his life
 
9:45 AM
^
but I hate everything
 
he just doesnt want to admit its superior to java thats all
 
just not everything equally
because C# isn't superior to Java
but maybe I am wrong and Java is shit... I suppose that is the reason C# is copying more Java features over to C#
 
mr5
have you tried Rust? I haven't heard a single rant from it yet.
aside from the learning curve
 
I have heard of Rust...
not a fan
 
Went through some small tutorials, feels like C++ but got rid of the manual memory management
 
mr5
9:51 AM
I've joined Rust server in Discord and sneak up on some group talks. They're talking about Maths. I couldn't understand a single thing.
 
on the other hand, I am more of a high level language user
I care about that my code does what I want it to do, not having to care if I want to use references or values, or where my memory comes from or how my memory is pooled or where my functions come from
I just want it to work
 
mr5
Power-Shell
 
low level languages and low level features in higher level languages dont really trigger any interest from me
and on the high level language features, languages like C++, Rust and C# really dont do that well
in that case, I prefer a language like Kotlin or Java
 
mr5
how about Swift?
 
especially Kotlin for Java
isnt swift specifically for apple systems?
if so, it can burn in hell
just like every other apple product
 
mr5
10:02 AM
Swift copies the parenthesisless invocation of function
 
[Squirrel in Training] @Wietlol I hacked my problem into oblivion
 
ah, the "groovy" approach
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] Yeap,
I've set up a `DbCommandInterceptor` with wich i am just deleting any reference to "displayName" in the sql command text
 
Damn
Why not just write raw SQL at this point
 
mr5
@Wietlol when I searched for groovy language in Google search, almost all results points to Java syntax. Why is that?
 
10:16 AM
Groovy is a dynamic JVM language
it is Javascript's Typescript for Java
        dynamic         static
JVM     Groovy          Java
JS      Javascript      TypeScript
Typescript and Groovy are both supersets of their respective origin language
 
[Squirrel in Training] cuz i'd also have to write logic to update child entities, keep ids ect.
[Squirrel in Training] to much work
 
so, almost all valid Java code is also valid Groovy code
 
mr5
oic
but is Kotlin too?
 
looking at swift, it is shite
Kotlin is not
the syntax in kotlin is massively different
 
mr5
so in Groovy, it will be Groovy > Java > bytecode
 
10:19 AM
nope
Groovy -> JVM bytecode
same as Java and Kotlin and all other JVM languages
 
mr5
and why is Java relevant to Groovy
 
because it is the Java ecosystem
most users, at the time of groovy release at least, were using Java
Groovy is just Java as a dynamic language
 
mr5
I was thinking it's like a SASS of CSS
 
so having the same syntax is a design choice
 
mr5
what do you mean by dynamic then?
 
10:21 AM
I mean
dYnAmIc
 
mr5
my first thought was it's a language that will be transpiled to another first
 
well... that is true for almost every language
C# is transpiled to CLR
Java is transpiled to JVM bytecode
C++ is transpiled to x64
a language is either transpiled or interpreted
(the above is not always true, for example, those languages can also be transpiled to WASM or arm, etc, in which case they dont get transpiled to CLR, JVM bytecode and x64)
but generally speaking,
Java transpiles to JVM bytecode
Groovy transpiles to JVM bytecode
Kotlin transpiles to JVM bytecode
and the way JVM bytecode compilation works, you can compile in parallel
so, the javac, kotlinc and groovyc can compile their files and then everything works together
 
mr5
ohh I got confusion
yeah, you were referring to types
 
types?
 
mr5
when you said dynamic and static language, you're referring to the types, no?
12 mins ago, by mr5
I was thinking it's like a SASS of CSS
Or TS to JS
 
10:36 AM
mostly
def b = [:]
b.name = "mr5"
b.knowsGroovy = false
bois.add(b)
groovy has some interesting features actually
class Test {
    def methodMissing(String name, args){
        println "Method ${name} was called"
    }
}
def t = new Test()
t.foo() // prints "Method foo was called"
also, expansion objects
^ traits
 
mr5
oh
that looks similar to Gradle syntax
It's now very confusing actually
kek
So Gradle actually uses Groovy syntax
 
yep
 
mr5
and Gradle is the build tool name
 
Gradle is just a groovy script
you can also use a build.gradle.kts which uses kotlin syntax
in the first code snippet, you can see a piece of gradle build code and you can switch between groovy and kotlin
 
mr5
10:52 AM
val smokeTest by configurations.creating {
    extendsFrom(configurations.testImplementation.get())
}
how does this work?
what does by do here?
 
iDunno :D
by is a delegate
 
07:00 - 11:0011:00 - 00:00

« first day (4043 days earlier)      last day (900 days later) »