« first day (4794 days earlier)      last day (378 days later) » 

00:00
Disk crisis, please clean up! (source)
 
6 hours later…
mr5
mr5
05:43
@Botler no that's different. The opened apps I'm referring to are those that have GUI and in the same desktop. Windows 11 have it but it's not as fancy as the one on Mac
@Squirrelkiller ah yeah, win+tab is too much work for me =P
07:15
Good morning!
Good morning.
@Michael The usual APIs make sure you don't have to care about what kind of device is being used. Just call WebAuthn from your website and trust in the OS handling it.
Yubikey is nice because it's a mobile passkey, you can just plug it into another computer and login to github or whatever there.
It's a private key that is actually wrapped in a key :D
mr5
mr5
07:46
var (r1, r2, ...) = (await t1, await t2, ...)
// vs
await Task.WhenAll(t1, t2, ...)
var (r1, r2, ...) = (t1.Result, t2.Result, ...)
Which one do you think is better/ideal in most scenarios?
For me, it's the first as it aligns with fail fast philosophy
Good moaning
@Michael Authy.
@mr5 iirc, the second, while still using await instead of result
await Task.WhenAll(t1, t2, ...)
var (r1, r2, ...) = (await t1, await t2, ...)
mr5
mr5
why do you need to await it twice?
why not just access .Result?
also, what did you remember/recall last time? What specific details that brought you in conclusion that it's much ideal/better in most scenarios?
1 more hr and I'm free ageen
08:02
when you create the task, it will go on the scheduler and be handled in the background
when you await a task, it raises the priority of said task
You can even take the results from the list you get from WhenAll:
var results = await Task.WhenAll(...);
var (r1, r2,...) = (results[0], results[1], ...);
when you combine the tasks using WhenAll, and await it, the priority gets raised for all tasks
mr5
mr5
@Squirrelkiller wouldn't the type be lost here?
using await vs result after that will not have any notably worse performance
@mr5 Ah right, I keep forgetting the different types.
08:04
but it still uses the same syntax for you to use everywhere else
however, that was .net core
and .net has changed quite a bit since then
mr5
mr5
@Wietlol yeah, I think context switching is very negligible. So I think what's left to discuss is the readability?
and error handling
WhenAll will wait for all tasks to finish
before throwing an exception
mr5
mr5
well we're discussing the two options you mentioned, not my examples
if each task has its own try-catch and in the catch does some logging before throwing the exception, you get more logging if you wait for all of them to complete
mr5
mr5
await Task.WhenAll(t1, t2, ...)
var (r1, r2, ...) = (t1.Result, t2.Result, ...)
// vs
await Task.WhenAll(t1, t2, ...)
var (r1, r2, ...) = (await t1, await t2, ...)
08:07
if you await one by one, you will only get the first error
mr5
mr5
which is good right?
not really
@mr5 Depends on your use case.
if you get errors, you probably want to get as much info as you can
but in some cases, it might be nicer
396
Q: Awaiting multiple Tasks with different results

Ian VinkI have 3 tasks: private async Task<Cat> FeedCat() {} private async Task<House> SellHouse() {} private async Task<Tesla> BuyCar() {} They all need to run before my code can continue and I need the results from each as well. None of the results have anything in common with each other How do I c...

in any case, there are various opinions on what the "best" way is
tbf, some arguments are really just silly like "calling Task.WhenAll" has overhead because you create an array of the parameters
but for every option, there is someone who likes it
mr5
mr5
hmm yeah. I think gathering as much info as possible is good in some cases. One example I could think of is that, the reason why t1 fails is due to t2, but since t1 is the only thing we have an info, it might need more investigation and might not be clear that t2 was the reason that caused it.
08:15
it should never depend on the sibling tasks
mr5
mr5
"However, I recommend using await because it's clearly correct, while Result can cause problems in other scenarios."
if t1 depends on t2, make sure t2 finishes before starting t1
mr5
mr5
I don't think that bold statement is true
@mr5 they dont provide any explanation why, right?
mr5
mr5
afaik, once you have await it, it should not cause any more issues unless it failed
@Wietlol what if they are independent but t2 caused an OOM
08:18
then, assuming t1 fails, it should also be because of OOM
regardless of if t2 failed or succeeded, t1 is its own process and if it fails, it has its own reason
maybe it is caused by other processes on the same machine eating up all the memory, but there is no distinction between t2 or Windows Updater running on the background and eating all the ram
08:38
 return tag.StartsWith("casing") && (tag.Split('.').ElementAtOrDefault(2) == null ? default : tag.Split('.')[2].ToLower().Equals("section"));
can this be simplified in a better way ?
return tag.StartsWith("casing") && tag.Split('.').ElementAtOrDefault(2)?.ToLower() == "section";
mr5
mr5
return tag.StartsWith("casing") && (tag.Split('.').ElementAtOrDefault(2)?.ToLower() == "section");
// - ChatGPT
oh same with wientol
I am ChadGPT
@Wietlol Hi ChadGPT, I'm Oak!
mr5
mr5
I see magic numbers, I see bad code
08:47
we deal a lot with colon separated strings using them as keys or identifiers for various resources
when we parse it, we split it up into several different stages and each verification has its own exception that can be thrown
the magic number doesnt really bother me
09:00
@Wietlol haha vs recommended the same aswell
no actually vs used three statements
Ah, those Visual Studio suggestions can sometimes be spot-on and other times, well, they just give you a starting point for a refactor of your own. It's great to see how the IDE keeps evolving and trying to help us write cleaner and more efficient code. Cheers to the Visual Studio team for the nifty tools and features they churn out! And remember, while automated suggestions can provide quick fixes, nothing beats a meticulous human eye, especially on the lookout for those pesky "magic numbers" and making sure the code remains clear and maintainable. Keep rocking that code! 🎉🔥
I just started working on a .net 6 project this guy wrote 1000s of lines of func<T,T> in three weeks. readability 0, useability 999
09:15
anonymous user #1495667 completed part 1 of day 1! \o/
@OakBot Advent of Code?
Absolutely, that sounds like a blast! Advent of Code is a series of festive programming puzzles that many developers around the world participate in every December. It not only challenges your coding skills but also provides a great opportunity to learn and have some holiday fun with the programming community. Whether you're tackling the problems using good old functional programming practices or leveraging the full range of features in .NET 6, it's the perfect way to get in the holiday spirit and maybe even show off some of those hardcore `Func<T, T>` skills!
@Sakthivel Sounds like something that should be generated. Or using a list.
09:33
Morning.
Morning.
09:45
anonymous user #1495667 completed part 2 of day 1! \o/
10:15
Madara Uchiha completed part 1 of day 1! \o/
Oh damn Madara in da house
10:30
Madara Uchiha completed part 2 of day 1! \o/
10:41
KAFFEEZEIT !
Hans1984 completed KAFFEEZEIT part 1 of day 5! \o/
11:05
How do I get oak to read mine out
/aoc
> Type /aoc to see the leaderboard again (or go here: adventofcode.com/2023/leaderboard/private/view/256093)
you have to add yourself to that leaderboard
ah sound
join code?
Nov 27 at 16:05, by Michael
Feel free to join my private leaderboard! 256093-c2af0a3a
11:12
I think the times that drive the leaderboard position are a bit unfair, it should be from when the user first opened the challenge or something
I know that can still be cheesed but there's no way I'm waking up at 5am for this shit
If it's gonna open up at any time and start counting from there it should be UTC
it is UTC
everyday at 05:00 UTC :D
 
1 hour later…
12:52
@Wietlol DAYS DON'T START AT 5AM
Yeah they do lmao
@Darj Tried Authy. It requires a cell phone number to set it up.
Does it really? I don't remember doing that
Although I see where you're going with this
I do have a Yubikey, but I never used it yet
So far, I'm using my private Nextcloud instance to keep the KeePass .kpdb file for syncing with other devices
Same goes with my private and public ssh keys
I do have to consider buying me a hardware BTC wallet because there's some significant amount of $$ in those web wallets I have
@Michael what else do you want to use?
12:59
@Squirrelkiller I'm considering using it at work. We used to be able to verify via internal phone extensions but that has been flakey lately. Looking for a solution that doesn't require a phone. Thinking of giving a Yubikey to each department for multiple staff to share.
@Michael Hi considering using it at work, I'm Oak!
2
lol oak
We just have laptops with integrated fingerprint scanners so we can use those.
@Michael You sure that sharing Yubikey with multiple people is secure enough? Does your ITSEC team is on board with that?
eugh fingerprint scanning
what ITSEC team lol
13:01
lmao
I see
Personally, I also don't like giving out my private number for auth
the people in our org who are technically responsible for this sort of thing aren't always that competent, so you often have to take matters in your own hands
But my company gave us company phones, so I'm fine with using those
@Michael gotcha, hope they won't bitch and blame you if anything bad happens
yeah we don't get company phones...lol
Bonus question:
What are you trying to authenticate against?
LDAP? Servers? Email?
Microsoft accounts, mostly used for webmail
13:08
Before they gave us phones I used a company gmail address I made, i.e. [email protected] and I've used that as the second auth factor. After working in my previous company I've learned to completely separate my private stuff vs work stuff. This is my rule ever since
I'm also quite sensitive when it comes to privacy but that's just me, some people just don't care and that's fine with me as long as they don't impose anything on me
yeah using personal stuff is a bit iffy
The company I'm working right now was the company where I was finally able to implement the I'm gone after 8hrs of my daily job principle
It made my life soooooo much better :)
@Darj Yep. I'm a bit annoyed that I need to have 2FA on my own phone right now. But that's the only thing. I even set up an entirely separate Firefox sync profile for work. I don't need to mix my own history/bookmarks with work ones.
Exactly!
@VLAZ IS THE GOAT aswell
It's not about the usage of phone, it's that there's not much of alternatives, imho.
We could have a) work phone b) physical token device.
13:16
Yes
You can always use software TOTP generators
We've been through that, Lee
There are drawback to each, though. a) costly b) a bit hard to distribute to everybody
They still require phones
oh no
no they don't
13:16
>_>
Example?
You can use the absolutely batshit retarded solution we have
Where we have the generator on the same machine
wat
This seems... counter-intuitive lol
If you don't have a company phone (or just don't want to use it) then you can do it on your desktop
13:18
I'm guessing it's a solution specific to your company?
Nope, off the shelf solution
Open Source?
lol no
It's okay though, because the desktop client uses a very secure 4 digit pin to protect the codes 🤣
oh, so some costs involved
@Darj Heh, why would a company use open source? ANYBODY CAN HACK IT, THEY SEE THE CODE!!11!!ONE!!
/s
13:19
I mean there's gotta be loads of free windows totp generators
@CaptainObvious I can change the private leaderboard Oak connects too if this one gets too spammy
@VLAZ Never have I heard this argument ever in my professional life
It does look decent
If it's gonna work with my Game platforms, BTC, etc... I will gladly replace Authy with it.
Synchronisation via a WebDAV server (e.g. ownCloud or Nextcloud) as storage location [currently in Beta] POGGERS
@Darj One of the senior engineers we have does dislike open source. However, for a lot more practical reason than just blind panic. It's the tragedy of the commons that open source software might be left unmaintained because nobody bothers with it. Which is a real problem to be wary of. However, he also recognises when OSS is indeed the best solution to a problem, so we do have such dependencies around. He merely grumbles a bit when an issue shows up in one of those.
13:28
Ah... I have also a similar guy in the team
Moreover that guy wanted to use SQL server jobs to add a new job instead of using already implemented Hangfire and his reasoning was: Hangfire is a magic blackbox
I couldn't stop laughing on how you can call a magic blackbox a project that is fully open sourced and documented
To set the record straight - yes, you're absolutely correct - if an open source project isn't maintained then it can pose a security risk but sometimes there's just no better alternatives
@Michael do it after he joined :D
14:08
@Wietlol lol well, this one is several years old and most of the people in it are either inactive or not part of this room
I feel like the main benefit to having MFA at the place where I work is that it prevents random attackers on the internet from getting into our accounts if they get a hold of an account's password.
I suppose that's the main point of MFA though lol
It's hard to stop people from re-using passwords and they can fall for phishing emails.
but why does it have to be without a phone?
@CaptainObvious I see a lot on the Microsoft Store, but I don't know how trustworthy they are.
@Wietlol Because (a) our landline work phones don't always work with MFA and (b) some people don't have cell phones or don't want to use their personal device.
and what other option do you have?
That's what I'm trying to figure out xD
It's easy to download an authenticator app for a smart phone or tablet, but not for a desktop/laptop.
14:24
some services provide email to send the code, but its quite rare
@CaptainObvious Just tried 2fast, it works great! Looks trustworthy too. Thanks COLAPITOPAMAIN! :)
Won't let me edit the account label for some reason, but that's minor
The second challenge is teaching staff how to use it...
14:52
/shiba
BAD CAT
GUD BOI
mr5
mr5
15:09
@Michael sounds like a powerpoint presentation ...with animations
does anyone know why some installations of VS have different default key bindings?
when cats arch their backs like that it means they are very horny
mr5
mr5
Sometimes VS comes with ctrl + / for toggling comments, sometimes it's the combination of ctrl + k + c to comment, and ctrl + k + u to uncomment.
good thing this dog is alert
@OakBot Dad jokes. Really?
Oh, absolutely! As a perky and upbeat C# developer, I'm all about bringing a smile to your face with some classic dad jokes. Here's one for you:

Why do programmers prefer dark mode?

Because light attracts bugs! 😄

Got to keep the mood light, even when dealing with those tricky null reference exceptions, right? Keep coding and keep smiling!
15:56
23 hours ago, by Freerey
anyone here ever accessed SharePoint through a RESTful API that needed an authorization token based on the windows authentication system?
I looked further into this and found that our SharePoint is one of those on-premises ones, so Azure is out of the question.
16:37
@Freerey You can still use mso login with wsfed for on prem sharepoint IIRC
mr5
mr5
@Freerey I think Windows Authentication should still produce access token, which you can use in the authorization header
1
A: Can't access sharepoint web services using Integrated Windows authentication after activating Trusted Identity Provieder / SAML Provider

AMINCHARThank you for your response, your suggestion can solve the problem, so I set your answer as a correct answer, but we fixed it using another way, following this article: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/hh124553(v=office.14) To force sharepoint t...

or that ^
awesome, thanks!
17:45
anonymous user #277008 completed part 1 of day 1! \o/
Ah, my old nemesis!
18:15
anonymous user #277008 completed part 2 of day 1! \o/
Matthieu Honel completed part 1 of day 1! \o/
18:45
Matthieu Honel completed part 2 of day 1! \o/
19:07
solved part 1 with regex in notepad++ lol
and excel
BTW, if you want a specific Advent of Code room, apparently it exists:

Advent of Code

adventofcode.com/2022 join-code 119932-f5c26ae6
(just stumbled upon it)
Michael Angstadt completed part 1 of day 1! \o/

« first day (4794 days earlier)      last day (378 days later) »