« first day (3831 days earlier)      last day (1331 days later) » 
05:00 - 11:0011:00 - 23:00

5:31 AM
Good morning
5:49 AM
@mr5 How about using Debug.Assert(inp != null);? Not entirely sure what it does though lol, I just know it shuts up analyzers.
 
1 hour later…
6:56 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
morning
7:09 AM
Hey any of you ever implement a fallback mechanism for Images?
So we have differnet cultures eg german (de) , Netherlands , India (in), if a person has selected a culture say German, and that particular image does not exist is German, it should fall back to english
what are some good architectural practices there?
Get image from server endpoint, server gets image, if object is null return default image
Also no idea lol
No just the server logic
to return the correct image
e.g. Android does it automatically
1) Have default image cached
are there any known good practices
No no
2) return repo.GetImageOrDefault(queriedLanguage) ?? cache.DefaultImage
7:15 AM
I am asking If I am to design service which finds which Image to send
Service sounds good
Server side code
Controller knows how network works, service knows business logic (if there is no specific image show default image)
Okay, I think maybe my question is way too wide
Thanks for your help
I'm also in a lecture so you'll get only trivial answers from me :D
7:24 AM
@anand_v.singh A common way is to use a <img src="de.png" data-fallback="en.png /> and hook the OnError event to load data-fallback into src.
1) But then you have two calls form client to server
2) He said server side code
/shrug
@anand_v.singh you need a general way to describe your fallback chain of cultures
generally speaking, a list of cultures
then, you can decorate your services with a waterfall service that will repeat the call with each culture on the same (normal) service until it found a result
7:50 AM
[Captain Obvious] Sounds like something that the localisation service should sort anyway
8:17 AM
@Wietlol Thanks this is what I was thinking of as well, I know microsoft does this as well and thought if they had something on it, but it seems it should be relatively easy so am going to build it myself
just a few hints:
- use an IList<CultureInfo> as you are to expect multiple fallback cultures, for example de-AT -> de-DE -> en-US
- make the waterfall service generic (not related to culture)
- dont flerken change the CurrentCulture
Hmm the last point is quite nicely timed as I was planning on sending the actual culture back but doesn't make sense as the frontend is not going to use it
the major question is "how do you identify the images that need to be loaded?" and "how do you choose the image by culture?"
FFS using coverlet for netcore so now I can finally use the newer package .collector and it turns out this one can't output results to console yet
Like wtf give it an experimental tag and don't make it the default for new projects if it's not feature complete
mr5
mr5
8:40 AM
@CaptainObvious injecting throwables at runtime. hmm I think I would like it to be explicit.
@Squirrelkiller that's what I am trying to avoid unfortunately. Anyway, as I can't see any official way to do this, I just made my own: Contract.NotNull<T>(), Contract.ThrowIf(Exception?) :)
Why is it generic though?
mr5
mr5
So I could have the type info
even if it's null
not really sure though if it will work all the time.
afaik, some scenarios are not going to catch the real type at runtime
But why do you need type info in basically a null check?
Also runtime is the only time you can get the "real" type
mr5
mr5
To have a more useful info on the exception message?
oh no, mr5 has caught the javavirus
mr5
mr5
8:45 AM
ah, what I mean is getting the type name using typeof(T).Name
he wants actual useful exception messages now
mr5
mr5
:D
to be fair, I am not sure if the type is that much of useful information
mr5
mr5
I'm not sure if that's useful enough
considering that you already have the line number of a specific statement
8:46 AM
NotNull(object obj) => if(obj == null) throw new ArgumentExeption($"Tried to pass null as {obj.GetClass().Name} ya dumbnut");
$"{nameof(obj)} is null"
sounds more correct to me...
^
Might depend on the use case though
mr5
mr5
but it will resolved to "obj" right?
@mr5 do you by any chance know Kotlin's NPE message?
@mr5 absolutely
mr5
mr5
@Wietlol nope
8:48 AM
ah
@Wietlol "may be null so I won't compile ya dumbnut"
mr5
mr5
@Wietlol then it is not useful
@Squirrelkiller although that is correct most of the time, you still have the "bang" operator
mr5
mr5
if there's a way to get the variable name passed as an argument, as in similar name to how it's written in code, then that would be useful
which is useful in cases where you, as the developer, are quite certain that it cannot be null, but are apparently wrong...
and the error message is absolutely amazing
8:50 AM
@Wietlol For this I am creating a json with same keys in multiple cultures, and the values of those keys are file names, if file name is not present, it will fall back to the next culture, if filename is present but image is not, it falls back but also generates a server log that notifies service team that maybe an Image is missing, and if complete failure in all fallbacks we throw an error
That is my idea
[Captain Obvious] @mr5 it's not injected at runtime
mr5
mr5
ah injected at compile time :D
[Captain Obvious] It's injected as part of the build process
[Captain Obvious] So it is fairly explicit
mr5
mr5
I'll have to think that thoroughly first.
Although I am already using one of its library: PropertyChanged which has the same behavior.
@Wietlol do you think I will be jailed if I didn't pay AWS?
for Contracts.NotNull(), perhaps just send the name/useful information as parameter
like
8:56 AM
What's cheaper: AWS or paying off the judge?
Contracts.NotNull(url, "url")
@mr5 you are still not paying?
mr5
mr5
but AWS is being unfair. I only used their FREE tier service for few days and I got charged for $24 already.
yeah
not even a week of use.
again, you didnt only use the free stuff
...really?!
you selected bigger machines, which are not part of the free tier
8:59 AM
Ah. Not free then.
or you mean after you got rid of the t3.mediums?
mr5
mr5
yeah with that part, I already terminated it. But still my bills are still growing in the free services they claim.
Yeah I already get rid of those t3.scams
any specific service you are getting paid for?
mr5
mr5
Over the quotas
I would just stay away from beanstalk
9:00 AM
Uh..charged*
mr5
mr5
@Wietlol eww
who does this kind of thing
Is there a [CallerMemberName] but for param names?
as I said earlier, I use the backbone services of AWS, which are by far cheaper than the fancy "AWS-fix-my-shit" bigger services
mr5
mr5
yeah
@Squirrelkiller I was going to say that
@mr5 "C#"
you gotta make a few "eww"s now and then
mr5
mr5
9:03 AM
I'm starting to like some Kotlin features tbh.
Unless you learn to just check on the borders
mr5
mr5
And realized there's a lot of missing features needed in C#
Enable nullability, just check stuff at the outer borders of your application
you mean nullable references?
9:05 AM
even then, you still gotta validate your input
Not sure how often i have to repeat check on the borders
there is hardly any difference between String? and String
Yeah just static analysis
both are still nullable at runtime
static analysis is wrong 50% of the time
The fuck kinda code do you usually write where static analysis is wrong 50% of the time
9:06 AM
and when it is null, it will only fail as soon as it is dereferenced, which might be way out of the scope of it being set
mr5
mr5
49.9%*
@Squirrelkiller like.... literally any code
mr5
mr5
I have the <Nullable>enable</Nullable> set already.
I still think some scenarios are not fully covered of the static analysis
FYI: This is AWS "FREE" tier.
Which specific services are you using
Also if you're absolutely sure just send them an email and they clean it up
9:10 AM
[Captain Obvious] Should use Azure, where you can avoid getting billed for the "free" stuff if you run out of free
[Captain Obvious] Also, the [Authorize] attribute is dumb
[Captain Obvious] It doesn't allow you to specify multiple roles without having it as a hardcoded comma delimited string
[Captain Obvious] Fuck that
Why? [Authorize] is just the opposite of [AllowAnonymous]
mr5
mr5
@Squirrelkiller From month to date, all services, based from the billing info are coming from free tier stuffs
I thought you specify a policy, and that policy can have multiple roles or something?
@mr5 That is not a specific answer
@mr5 FYI, that is not "AWS free tier"
Yeah that's a billing chart lol
9:12 AM
that is the billing chart based on your entire usage of AWS, which probably includes stuff from the free tier, but apparently also from the other services
[Captain Obvious] Yeah but policies are hard
[Captain Obvious] Roles are ez
[Captain Obvious] Did you run more than one ec2 instance or something
mr5
mr5
next page is 0%
so I am guessing all services I am using are free
The fuck are doing in ECC
9:14 AM
[Captain Obvious] Because 750hr is ~1mo 100% uptime
@mr5 can you screenshot your RDS and EC2 instances overview?
mr5
mr5
I only used it for like 10days now. And my backend is just doing simple stuff. Just authorize and GET ffs
of both phillipines and ohio region
[Captain Obvious] lol why are you using ec2 for that
mr5
mr5
I terminated all EC2, EB, RDS on Ohio.
It's all from SG region now.
9:16 AM
oh ye, sinagpore region then
mr5
mr5
EC2 is required I think whenever you host your .NET there
EC2 is indeed required when you want to host your .NET stuff on EC2
EC2 is not required when you want to host your .NET stuff on Lambda
EC2 is VM's, right?
EC2 is not required when you want to host your .NET stuff on Fargate
@Squirrelkiller yep
mr5
mr5
This thing @Wietlol?
Sorry for flooding of images.
9:20 AM
@mr5 You're right just give us your credentials :P
mr5
mr5
Well, this is surprising, I have some services running on HK
mr5
mr5
=P
HongKong
Singapore has 2 Instances running...
also... "Instances: 2"
9:21 AM
That is twice as much as free tier
mr5
mr5
I got billed $0.66 from HK
Yeah but they are free right?
can you screenshot the instances overview?
One is free
well... the first 750 hours is free
750h/month means you can either have one instance running all month or two instances running half a month each
9:22 AM
if you have 2 running, then you spend all those hours in the first halve of the month
it is not 750 hours per instance per month
that would be...
silly
at best
Do you have like, temporary credit cards or something? Just make a whole new account per instance you'd like to run for free :D
mr5
mr5
How do I configure an environment such that it would run both auth server and web API though?
@mr5 Yup there's your charges right there
I mean, just host them on two different ports?
probably the elastic IP might also be charged
I remember something of the routing/ip stuff I used was pretty expensive...
also... I was stupid
tried to make things public that shouldnt be public
mr5
mr5
9:25 AM
ah fuck AWS
I'll switch to Heroku
mr5
mr5
I am not going to pay them :D
> Imma buy 2 computers
... oh shet, I have to pay?
oh, then fuck you
- mr5
mr5
mr5
f u bezos
I see some comment from reddit that they also didn't pay and still alive.
does Heroku give you a free virtual machine per virtual machine?
mr5
mr5
9:28 AM
I am not sure how it is configured there.
Yeah, and also with this AWS scam, that kid from Discord got scammed of $30 also because he tried that free tier ahahaha
again, you are not playing in a sandbox, you are playing in a supermarket
you should not touch everything that looks shiny
Free VM per VM plz mr bezoz
if it is shiny, you probably have to pay for it
Hey does Azure have any always-free compute resources?
Hi
9:32 AM
I feel like it's the only big cloud provider without that, or I'm missing osmething
iDunno, Azure pricing overviews are always a mystery to me
don't any of you suffer from midlife crises?
if I can find them at all
I think Azure has something of a free VM
mr5
mr5
@Shad I am suffering in all aspects you could think of
at least for a year or so
9:33 AM
oof
@Shad I'm not sure when midlife starts, but you bet I'm sad I can never in my life play football again
why?
I thought I was the only one, I kind of have arithritis now in my left knee
Had an accident because I was stupid at 26y/o
oh
you can play FIFA! <3
So now I can't even carry heavy things down the stairs
9:35 AM
ah
> For instance, you get 750 hours of Windows Virtual Machine for free. You can spend these hours over 12 months.
(750 hours per month... I assume)
Ok but that's just free for 12 months
not official sources, but again, Google cannot find the information of the free tier on Azure
[Captain Obvious] There's 3 tiers to the free tier
9:37 AM
one thing that Google is very proud of having found is "yOu CaN cReAtE aN aZuRe AcCoUnT fOr FREE!!!"
like... the first 6 results (including ads) are basically that
[Captain Obvious] There's stuff you get with your $150 or whatever of free money for the first month
[Captain Obvious] Then there's stuff that's free for the first 12 months
[Captain Obvious] Then there's the stuff which is free forever
[Captain Obvious] (or if you have a VS enterprise subscription then you can just use the free credits included with that instead)
$200 for the first month?
ok, next project: automatically create a new Azure account on a monthly basis
XD
[Captain Obvious] From the thing:
mr5
mr5
9:39 AM
sign me up
[Captain Obvious] Creating an Azure free account is one way to access Azure services. When you start using Azure with a free account, you get £150 credit to spend in the first 30 days after you sign up. In addition, you get free monthly amounts of two groups of services: Popular services, which are free for 12 months, and 25+ other services that are always free. Free services are based on resource and region availability.
ok... perhaps not
1) Make a GCP free4ever VM
2) Make a bot that periodically creates new sandboxes in MS learn and deploys everything to the sandbox and changes dyndns
mr5
mr5
or just deploy your .NET in Heroku and everything is free 4ever
Wait what
mr5
mr5
9:44 AM
only catch is that your instances is going on idle mode
giff free stuffs
how is life tell me?
@Wietlol Taht would make an evil captcha
that is an evil captcha
@mr5 still only 1 free VM
same on AWS
except that on AWS, it wont sleep
Do I have to add a credit card to use AWS free4ever?
9:53 AM
in theory, yes
but apparently, you can add one that already expired
mr5
mr5
@Wietlol not really. I have 10 web servers running there. Some are 5 years old already and still accessible.
I just only found out you could host .NET in Heroku using Docker
ah
looks like Heroku Dyno is more similar to AWS Lambda than AWS ECC tho
why you crazy about aws?
I mean everyone
why not?
full stack dev should know this?
*know
10:00 AM
maybe know what they do in general
mr5
mr5
cuz izz a buzz word in resumes in FAANG companies =D
but only if you really are gonna use it, you should know more about it
hmm
such as, you dont get a free VM per free VM that you ordered
yeah you guys were discussing about this
mr5
mr5
10:02 AM
I could just use 000webhosting to get stuff done but I'd like to learn AWS for my resume so there's that :D
ikr!
mr5
mr5
Aren't the new gen of devs are all after FAANG?
again, if you want to learn AWS, then learn AWS and not learn "whatever I already know and let AWS do that"
so, learn Lambda, S3, Api Gateway, CloudFormation
woh
mr5
mr5
yeah I am still thinking if I should pursue using AWS cuz I got discourage with their charges
10:04 AM
not EC2, Elastic Beanstalk and... whatever
what I would do:
1, remove all AWS usage you have atm
2, setup a budget limit of $10 per month
3, get started with https://www.serverless.com/
mr5
mr5
$10 / mo is still huge
I'm poor af
then... lower
mr5
mr5
1. do not pay bezos
2. fuck him that's why
3. ...
4. AWS resume where?
is that , thing a European and . an USAnian thing?
If I use serverless.com, then I can't put AWS in my resume doh
of course you can
mr5
mr5
and I will not be using IS4 and ASP?
10:09 AM
indeed
mr5
mr5
heck
you wont be needing them
mr5
mr5
that's a completely new stack
I like C# doh
IS4 and ASP will be replaced by API Gateway
aka, AWS
you wanted to learn AWS
mr5
mr5
I mean, I could just use PHP and MySQL and be done for this in just a week. But I like the hard way
10:10 AM
then go learn AWS
dont go "oh, I dont want to step outside of my non-AWS stack"
@mr5 Pluralsight is free for april, use that t put some AWS on your resume
mr5
mr5
That's the advice of FAANG according to YT
according to who on YT?
I bet YT didnt give that advice
mr5
mr5
Joma, Techlead, and some guy from Google I forgot
What's FAANG?
mr5
mr5
10:12 AM
I mean YouTube creators :D
mr5
mr5
yep
Facebook
Amazon
Apple
Netflix
Google
Apple was the one I was missing
mr5
mr5
sad Satya not included
10:14 AM
FANGAM includes Microsoft
Big Tech, also known as the Tech Giants, Big Four, or Big Five are the largest and most dominant companies in the information technology industry of the United States, namely Amazon, Apple, Facebook, Google, and Microsoft. Since the end of the 2000s, these five have been, besides Saudi Aramco, Tesla, and Tencent, the most valuable public companies globally, with each having had a maximum market capitalization ranging from around $500 billion to around $2 trillion USD at various times.Some have speculated it may not be possible to live in the digital world day-to-day outside of the ecosystem created...
"also known as Big Four or Big Five"
I mean... can you just pick a number?
isnt it Big Six now anyway?
mr5
mr5
Maybe MS was not initially part of it?
also, why is Netflix in there?
@mr5 neither was Apple
mr5
mr5
Hey, also Tesla wasn't even there.
Netflix is just a BigData logging application
... that streams some video now and then
mr5
mr5
I'd like to be employed there someday. Maybe if I'm 80 years and my social communication is fix.
Yeah Netflix is very strange to be there.
It's just very strange to me that my boss is expecting me to release version x.x.x while not asking me about the status at the end of the day.
So I made the initiation and he got surprised why I am telling it to him.
10:28 AM
to host website for free I have options like 000webhosting, github pages and wordpress right?
Yup
Gitlab Pages too
mr5
mr5
Hey, don't forget about Heroku. It's a real deal free.
Don't trust AWS. AWS is asshoe
Unless you have money
like me.
wait
What does this sentence imply: "Unless you have money, like me"
Should the last part be "like me" or "unlike me"?
I want it to mean that I have no money. That's all.
10:45 AM
hehe
unlike me
mr5
mr5
yeah. I got confused with that part lol
05:00 - 11:0011:00 - 23:00

« first day (3831 days earlier)      last day (1331 days later) »