« first day (4112 days earlier)      last day (829 days later) » 

4:59 AM
 
 
2 hours later…
mr5
7:49 AM
@Wietlol can you do var numbers = { 1, 2, 3 } though
imo, it's non ambiguous and not verbose
how do you describe it in a single word?
 
concise?
an example of ambiguity is new though
 
mr5
> Cannot initialize an implicitly-typed variable with an array initializer
stupid C#
 
new { a = "a", b = "b" } is for creating an instance of an anonymous object
while new MyClass { a = "a", b = "b" } is for creating an instance of the MyClass class
but "MyClass" is now optional, so you can write
new { a = "a", b = "b" }
 
mr5
while (new MyClass { a = "a", b = "b" });
ftfy
 
MyClass is not a boolean though
anyway, to avoid the ambiguity, you must do new() { a = "a", b = "b" }
 
mr5
8:09 AM
ew
looks like a hack
 
Hi all,
I want to handle network calls exceptions, is there a way to know the exception reason (ex: "no such host is known", "No connection could be made", "not found".. etc) they are all request exceptions
 
hello all
 
mr5
o/ all
@mshwf via exception type maybe?
 
I have an old project that programed by .net4.5.2 with UnityIOC.
Now I need update it to 4.6.1 and use ms di
How can i combine Unity with msdi
 
@mr5 yest but they all have the same type: HttpRequestException
I want to know wheather the exception is due to unknown host, wrong port, not found resource, the only way to differentiate between them is by the ex.message
 
mr5
8:15 AM
which http client are you using?
 
System.Net.Http.HttpClient
I use: _client.SendAsync(..)
 
mr5
@mshwf for "no such host is known", you could make a specialized service here, like implement a DNS check before proceeding with the request. For "no connection could be made", you could make a general handler for it by using some timeout calls for both read & write to the network stream. For "not found", this looks like a specific HTTP status codes, and thus should be done after header request has been responded.
 
8:59 AM
[Squirrel in Training] 😂😂 yes
 
@mshwf why though?
 
@Wietlol to show and log meaning and customized errors
 
meh
show errors and log meaning should work regardless of which error is thrown
for customized errors, you can just "translate" the message
 
@Never.More ms di have a smaller feature set. You should reevaluate if you can transfer to ms di
 
mr5
9:23 AM
@Wietlol whenever our PO ask me questions, I feel very intimidated and it's always a hard question. What should I do?
is there some software jobs where only technical questions and answers are allowed
 
Lol nope
The point we have a job is we can translate business requirements to machine language
Hence, business questions
 
mr5
10:14 AM
I'm really bad at it to the point where I pretend I'm thinking on answer but actually I don't know how to answer it.
and fortunately for the PO, we have another dev who can answer the question really well
I'm not sure if it's the language barrier or just me being dumb
makes me question if I really fit for the role
 
Or maybe you're just not that interested in the business side of things, which is complicated when talking to people outside the dev team but generally ok too
Just gotta find a good fit where there is somebody else who does the business communication part, like your colleague
 
mr5
yeah. my previous jobs, I don't need to answer business questions.
but it's still unavoidable though
and I always got lucky someone is always answering it for me.
for a small team we have right now, PO questions makes me scared.
I'm looking forward to the day I could answer confidently. Maybe I just need extra extra experience. Who knows.
 
To work towards more business-understanding, you could try framing both the language of your code and of your thoughts more domain-like.
e.g. instead of saying "check this return value for null" go for things like "make sure we got a value from the database/webservice"
 
mr5
hmm, I think that's easy for me if the question is asked in written, and answer needed to be in written as well, but doing it impromptu is very different for me.
 
That would get easier too if you try to form your thoughts in domain-language too
2
 
mr5
10:26 AM
how about intelligently asking questions? most of my questions goes something like: if you need design like that, should we position it like this or like that? in my head, I'm going full facepalm.
 
Things liek that make total sense though, design is always in the eye of the beholder^^
Could frame it like "would you prefer this one or that one?"
 
mr5
yeah, but those are something very trivial questions, like come on, ask a more important question like your colleague.
 
These questions are important too
 
mr5
We could have refined the tickets more if I just ask those important questions. It always ends up being on hold because the important questions will pop out itself after I'm already doing it.
 
It all depends on what you're working on
Ah I see
 
mr5
10:30 AM
Do you think I'm doing very poorly in terms of the issues I'm describing here?
on the other stories, I've made some ridiculous MRs
I submitted an MR and merged it, but with our branching strategy, it's going to be problematic so I reverted it. But the issues have been fixed, so I need to revert the revert again.
 
@ntohl thanks
 
10:46 AM
@mr5 Nah seems good. For the record, I like doing stuff in the backend and other ppl doing the frontend stuff, I never think about where something has to go until I'm there and then I'm like "wait so do I just send the other stuff down or do I put it to the right or what"
 
mr5
@Squirrelkiller man, thanks for reassurance that I'm not alone on this. I guess I'm just always doing it but knowing you do it sometimes too, it's less worrisome now ^^
 
 
2 hours later…
12:23 PM
@mr5 I'll take a look. Thank you sir
 
1:16 PM
does someone here know anything about getting the response from an HttpWebRequest?
 
1:50 PM
read the response?
what have you tried so far?
 
so what I'm actually trying to do is catch a 404 before the page can, so basically I can be like:
if (((HttpWebResponse)req.GetResponse()).StatusCode == HttpStatusCode.NotFound)
    throw new WebException();
but the page always finds an exception when I'm doing the .GetResponse() bit and I don't know how to get around that
 
167
A: How to get error information when HttpWebRequest.GetResponse() fails

Darin Dimitrov Is this possible using HttpWebRequest and HttpWebResponse? You could have your web server simply catch and write the exception text into the body of the response, then set status code to 500. Now the client would throw an exception when it encounters a 500 error but you could read the respon...

 
merci
 
 
1 hour later…
3:19 PM
[Captain Obvious] Cake is pain
 
I wanan make gay
CAKE
WTF
 
I like cake
 
[Captain Obvious] its so dumb
 
3:42 PM
what is Cake?
baby dont hurt me, dont hurt me, no more!
 
3:54 PM
Isn't using IOptionsSnapshot<ServicesEndpoints> updates ServicesEndpoints from appsettings.json, in every request, if injected in a scoped service?
 
@Botler did you bake it wrong? :0
 
[Captain Obvious] Build scripts
[Captain Obvious] In fairness the issue I'm hvaing is mostly because of dotnet
 
understandable, dotnet is also pain and dumb :)
meanwhile me: "ooh, time to try out this feature from C#9"
C#9: "ye... we didn't actually think it through yet, so it will probably be introduced in C#15 or something"
 
uhh wait you're not talking about food cake?
 
I thought he was talking about coingecko.com/en/coins/pancakeswap
 
4:09 PM
ohfk just found out ffmpeg 5.0 came out a few days ago
 

« first day (4112 days earlier)      last day (829 days later) »