« first day (3749 days earlier)      last day (1417 days later) » 

mr5
mr5
01:48
TIL: biobreak
why is every corporate word needs to have censoring
 
1 hour later…
03:00
[kesarling] umm guys, how do you add to items to a div and place them at the opposite ends?
mr5
mr5
<div>
<!-- insert element here -->
...
<!-- insert another element here -->
</div>
[kesarling] two ends of a div ๐Ÿ˜…
mr5
mr5
</div>
</div>
lyk dis?
[kesarling] I needed justify-content
mr5
mr5
wat is dat?
03:15
[kesarling] style="justify-content: space-between;"
[kesarling] :wat:
mr5
mr5
how does it look like?
[kesarling] umm I am posting the image here on discord
mr5
mr5
I need enlightenment
I've been lost in HTML world for many years
mr5
mr5
plz no nsfw
03:17
[kesarling] image posted here
[kesarling] never. Don't Worry ๐Ÿ™‚
mr5
mr5
can't see
[kesarling] I told you
[kesarling] I am sharing on discrod
[kesarling] discord
mr5
mr5
no u don't
[kesarling] the chat box is so shitty
[mr5] yes u do
[mr5] lol
[kesarling] Pasting images is really annoying there
mr5
mr5
brb in meeting. sorry
03:22
[kesarling] yep
03:43
mr5
mr5
@d4rk4ng31 missing action attribute in form element.
@kesarling, I'll get back to you l8r since your question needs more calories to burn.
@Rena, doing that gives 404d4rk4ng31 50 mins ago
@mr5 :D
mr5
mr5
@d4rk4ng31 if it gives 404, look on the network call stack
then check if the request URL points to the expected endpoint.
use dev tools for this.
also, you might need to check the "preserve logs" (Chrome) or similar thing for other browser
04:00
@mr5 there's no @page directive
can that be the reason?
mr5
mr5
I have no idea what @page does.
It provides a path
to access the page
mr5
mr5
hmm, maybe try my suggestion? That would give us a quick hint why it doesn't work.
okay
get back to you in a mo
mr5
mr5
nth
04:10
@mr5 It redirects to https://localhost:5001/Partials/Search?SearchString=
mr5
mr5
which is?
there's no page at that location
As in
I haven't defined one
mr5
mr5
how about if you put action attr?
don't add trailing /
this is what I get after putting the action attr
If I add the @page "Partials/Search" directive, I get ViewData Model
null
error
mr5
mr5
<input> names mismatch prolly
scrum all meeting!!!!!!!!!!!!!!!!!!
why!!!!!!!!!!!!
04:17
Oh you poor dear
mr5
mr5
deer*
trust me, they don't
@mr5 :D
mr5
mr5
@d4rk4ng31 forms should contain elements that have names on it. these names are automatically passed on the endpoint specified from action attr.
basic fundamentals of html is still followed in Bl/Razor I think
<form method='POST' action='Page/Aa'>
<input name="haha" type="text" value="hu" />
</form>

would form the http request:
/POST Page/Aa
{
  "haha": "hu"
}
04:43
hey guys
morning!
here is at night :|
good morning :D
mr5
mr5
05:17
@kesarling, how about float: left/right?
[mr5] finally the meeting is over
mr5
mr5
05:44
oh god. another meeting
why are these people so much into talking.
Good morning
@mr5 In Blazor, submitting a form passes the value or model you specified it shall pass.
[Master Wayne] So if I send a text here, will it goes to SO as well?
[Master Wayne] cool ๐Ÿ˜Ž
mr5
mr5
@Squirrelkiller is the custom element attribute remain the same once it serves the client?
<input asp-for="@Model.SearchString" value="@Model.SearchString" ...
I see he have something like this but I think it gets converted to the basic html attribute.
06:08
<input @bind="@NewRank" id="new-rank" list="ranks" />
Bind to this:
private Rank NewRank { get; set; }
Or you make the fancy form thingy
<InputText class="form-control" id="username" autocomplete="true" autofocus="" placeholder="Username" @bind-Value="@loginData.Username" />
With the form around it specifying what gets submitted
<EditForm Model="@loginData" OnValidSubmit="DoLogin">
private readonly LoginData loginData = new LoginData();
Like I said before, except for lifecycle methods it's all explicit
mr5
mr5
So all those custom attributes are retained when it serves the client? But how does browser interpret those?
Or is there a backing JS that does all the magic.
No, the custom attributes bin the control to a value in the C# code
No JS - WASM
The InputText basically gets translated to <input type="text", getting all the html attributes. @bind-value makes a two way binding between that and the username in my DTO.
Then DoLogin sends that to the service, which in turn sends it to the backend using an HttpClient.
This is what the component does:
	private async Task DoLogin()
	{
		Console.WriteLine("Submitted login");
		var loginResult = await this.AccountService.Login(loginData);
		Console.WriteLine($"Login successful: {loginResult}");
		if (loginResult.Success)
		{
			OnLoggedIn?.Invoke();
		}
		else
		{
			fehlermeldung = loginResult.Message!;
			AlertService.Error(loginResult.Message!);
		}
	}
And this is the service called by it:
		public async Task<Result<Player?>> Login(LoginData loginData)
		{
			Console.WriteLine($"AccountService: Login {loginData.Username}");
			var loginResult = await http.PostAsJsonAsync("/api/Account/login", loginData).Deserialize<Result<Player?>>().ConfigureAwait(false);
			if (loginResult.Success)
			{
				state.SetLoggedIn(loginResult);
				var hubMsg = await hub.Login(Guid.Parse(loginResult.Message!));
				Console.WriteLine(hubMsg);
			}
			return loginResult;
		}
I definitely gotta work on the hub login though, can't retain that across a restart of the backend currently, should tell the client to re-login on reconnect...
mr5
mr5
06:24
@Squirrelkiller these are loaded in the client side?
@mr5 Correct, all this happens without calls to the backend, up until the httpclient and the signalr hub are called
Lets you change stuff in and restart the backend without reloading the client
Blazor can also be installed as a PWA, but I haven't added that to my project yet
mr5
mr5
@Squirrelkiller cool! Well, knowing that now, I think JS can be avoided now?
06:39
Mostly, yes. Still need it to access the browser's localStorage or sessionStorage for example.
mr5
mr5
Or C# does not have DOM manipulation capability still?
It does not
Although I still haven't found out what that restricts for me
mr5
mr5
06:51
I feel like I'm listening to radio station now in meeting.
lol first time scrum?
mr5
mr5
yeah
they are just having fun while all of us new comers have no idea what's happening.
Don't worry, just don't say anything if you have nothing to say. Even people working scrum for years still make the mistake to say something even if they don't have important information, just for the sake of saying something.
Like, a daily should be like a minute per person probably. We have 7 people and need 15 minutes minimum, sometimes 30 minutes.
mr5
mr5
Ah we've done that earlier already. New sprint has/have just started and we're about to pick user stories (new jargon!) now.
Ah I see, the long meeting^^
mr5
mr5
06:59
But there's this another meeting with which is not included in Teams Calendar.
mr5
mr5
It seems like this is happening almost everyday.
1 daily sprint meeting every morning + 1 long meeting with unknown purpose.
Tbh, I'm hating this setup. I like to be productive. I want code code code not talk talk talk.
We have another short meeting after the daily to talk about...just stuff that comes up but doesn't actually have anything to do with the sprint. Like when we have a new server up and want to share the infromation or something.
Yeah I know that feeling. Scrum seems to put way more admin work on the devs so that the business people have better numbers to plan with.
It has advantages too though: I feel like I know most things happening between me and the customer. It's a strange feeling.
How long do you guys sprint?
mr5
mr5
For the daily sprint, it says 15 mins but in actuality it's ~25mins
And for the sprint planning 2hrs 30mins, but earlier, it took 3hrs+
So for today, there's like 3 meetings.
I started logging in at 9:45am, it's 3:13pm now and I haven't done any productive thing yet.
07:16
Nah I mean the sprint itself, the interval at which you close tickets and pull new ones into your sprint board, the interval at which you have sprint planning. 2 weeks? 4 weeks? 1 week? I hear it's usually like 2 weeks. We do 4 weeks though because our application is huge and needs a week of testing for release alone.
And yes, on sprint planning day I get almost nothing done
But I got used to the idea that the time is not mine, and other people decide how I should spent the time I'm at work. So if they want me to do 20% admin work per week, then I shall do 20% admin work per week.
mr5
mr5
I am still confused at this point tbh. The last sprint planning (?), us new hires only got involved in suggesting what points should be assigned to the discussed US. It took about 2 weeks I think before we have another.
The sprint planning is different today since there are no US points assignment, only task assignment or picking up which US we like.
Ah I'm confused the difference between that two.
@Squirrelkiller wfh setup also?
Admin work to me sounds like slacking ^^,
How can you call a class constructor based on the paramter type, while the class is unknown?
Is it possible in some way if the class inherits from a baseclass/interface?
which is known
Yes, as long as you know the signature
public T GetObject<T>() : where T : new
=> new T();
The where T : new guarantess that T has a constructor
Or, well, that it is a class
@mr5 Yup, have been working from home 99% since march last year
@mr5 More like figure out where to book time, where to send a ticket to next, what Ticket to take next... also everything that happens in sprint planning.
07:36
@Squirrelkiller Hm not sure i get it
I have something like this:
class Opel : Car {}

class Volvo : Car {}

class HandleVolvo
{
HandleVolvo(Volvo volvo)
{

}
]

class HandleSaab
{
HandleVolvo(Saab volco)
{

}
}

static void Main(string[] args) {

...
var return = (Car)response;

//Call correct Handle-class based on Car
}
Hm, how can i format it nicely
ctrl+k
You can also edit essages
class Opel : Car { }

class Volvo : Car { }

class HandleVolvo
{
	HandleVolvo(Volvo volvo)
	{
	}

	class HandleSaab
	{
		HandleVolvo(Saab volco)
		{
		}
	}

	static void Main(string[] args)
	{
		...
		var  return = (Car) response;

		//Call correct Handle-class based on Car
	}
}
Thanks! Seems io cant edit it again
Anyhow, in the main, i dont know which handle-class to call
I want to be able to initialize the correct class based on the constructor parameter type
I don't completely get your class structure here
HandleVolvo is its own class
HandleSaab is an internal class of HandleVolvo?
hm i see there is some typo here
hold on
You can also make a gist: gist.github.com
I see. Unfortunately like this, you can't automatically decide on which HandleX class to use.
But that is not good design
Try to write a HandleCar class (or method) that handles a Car, no matter which car.
Then if you find differences, those are things you could solve through inheritance
e.g. AdvertiseCar might do something like adDisplay.AddTitle($"Awesome {car.BrandName} for sale super duper cheap!!")
So the method only knows that a car has a brand.
But the car itself knows its brand. So the method gets it from the car.
Hmm i see
08:13
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
4 hours later…
11:49
henlo
hello
12:01
@Zacharias this is usually where you would introduce a factory
a CarHandlerFactory
which has a method public ICarHandler Create(Car car)
which would probably have a switch case for the type of car
and return the appropriate car handler instance
this would require that all handler classes implement the interface VolvoHandler : ICarHandler
even only to act as a marker interface
this way, you dont have to abuse inheritance
and you keep responsibility separated
and keep proper Open-Close on the individual handlers
12:39
@DAustin You did what?! I made an analogy for 3 months notice after wanting to quit being like staying with your other half after requesting a divorce, you must have made one heck of a deal for things not to end. Congrats, and I hope it works out well for you.
@Squirrelkiller I did it >:3
I'm black back
3
!~shiba
lel
no ears
12:43
you heard the man
!~shiba
@Freerey Good job! Turns out I had to kick someone else's butt lol
[Hans1984] ahh 2 shibas
[Hans1984] ears missing now
@BlackPanther Tbf: at a certain level, it's all about the money
4 ears you dumb bot
fix it
:===========(
dont make me look stoooopid
botler:"bots cant change their minds so humans cant change their minds aswell"
12:55
hopefully I'll have pt2.5 up by Friday
Oh part
Ok I get it
headpats
mr5
mr5
headbonks
go to horny jail
facepalms
13:00
I once made a post on fb when I was like 16 about something a bus driver said
*A kid said "some boys like other boys" and the bus driver said "that's not how God intended"*
*-facepalm-*
some total boomer asked "lol did you get in trouble?" and I'm wondering how I would get in trouble
they somehow thought I meant that I smacked my palm to their face
lel
stupid keedz
13:25
[Squirrel in Training] stoopid keds
14:09
point
15:08
[Squirrel in Training] how does discord process this?
[Squirrel in Training] This makes me sad :<
โ€ฎit works here still at least โ™ฅ
for some reason I'm reminded of the agony of sending emojis to someone who still used a flipphone in 2014
"lol boxes"
I think around that time I probably still used text-emoji anyway lol
for the most part I did, too
it just felt more tedious to go into a separate menu in the keyboard to get emojis
 
1 hour later…
16:36
WHY IS LADY GAGA SINGING MY NATIONAL ANTHEM
 
1 hour later…
17:45
[Not Li] WAHAHAHAHAHHA
[Not Li] OH CANT YOU SEEEEEEEEEEE
[Not Li] (I don't actually know the anthem, don't hurt me)
18:13
wwow
clears throat sila narodnaya Nas k torzhestvu kommunizma vedot--
[Not Li] GOD SAVE OUR GRACIOUS QUEEN
 
4 hours later…
mr5
mr5
22:18
Just found out you can define relationship in EF then you can just use .Include to generate the queries for you.
But I seem not to like that approach cuz I wouldn't be able to practice my SQL skills and I am doubting the generated SQL behind.
I like the LINQ query syntax though.
[Not Li] You've only just discovered this?
[Not Li] Also
[Not Li] The entire point of EF
[Not Li] is that you dont need to write raw SQL
mr5
mr5
Yeah
I like to write in LINQ
23:31
[Captain Obvious] EF is love, EF is life
[Captain Obvious] Anyone who uses SQL style linq is wrong and should feel bad though
[Captain Obvious] "fluent" linq is where its at
[Captain Obvious] Ef core + SQL server + code first + migrations = ๐Ÿ˜๐Ÿ˜๐Ÿ˜
[Captain Obvious] EF for all the magic that it does
[Captain Obvious] And then once its doing its thing in prod, you go into SSMS and check the query store, see what indexes it tells you to add, then go into the code for the model and write those indexes in, do a migration and redeploy and then its the same but better

« first day (3749 days earlier)      last day (1417 days later) »