r4m0n changed the topic of #kspmodders to: Technical discussion ONLY (KSP related or not), for random shit-talking, join #shitshow (seriously)
<Majiir>
Also: The way you've written this, the 'speech.SpeakAsync' call will *start*, and at the same time, the Task.Delay will start for the next loop. If you want the speech to complete _before_ you start counting 5 seconds again, you need to 'await' the speech.
<Majiir>
So this is more of a behavior question than a threading one.
<SilverFox>
doesn't matter when battery low status is given, the exact timing isn't an issue for such a non-timing critical application
<Majiir>
Sure, but this is a very useful skill to learn if you experiment with both ways
<SilverFox>
but I'll make mental note of that await for speech for future projects
<Majiir>
Like if you can fully grok this with tasks, you're better than all my outsourced Indian and Vietnamese developers
<SilverFox>
..jesus
<Majiir>
just not necessarily better than the Ukranian and Polish devs
<Majiir>
You're already better than the Florida devs
<SilverFox>
wait, isn't there one dev with the name..
<SilverFox>
that *name* that is good, and is known for having "the name"
<Majiir>
Our Ukranian devs also think all the Florida devs are Indian contractors because they're so bad at software
<SilverFox>
just.. how bad are florida devs?
<SilverFox>
surely they're better than I am.. I'm not that good
<Majiir>
Well, their product is an emergency notification system to warn you about things like hurricanes, and their operations offices and datacenters are all in hurricane paths
<SilverFox>
..........
<Majiir>
So during hurricane season, they have to shut down or fail over to other locations
<SilverFox>
why even have the systems there to begin with?
<Majiir>
Well if you put all your offices in a hurricane path, it's easy for you to sell to local customers who worry a lot about hurricanes.
<SilverFox>
interesting
<Majiir>
The moral of the story is to use tasks and listen to the architect when he designs your new system
<SilverFox>
so just make small meaningless sales offices and "off-shore" your centers?
<Majiir>
That's what a competent organization would do.
<SilverFox>
kek
<SilverFox>
btw I'm going to await the speech, let's see how well this goes
<SilverFox>
I'll prove I'm not as good as you think I might be
<Majiir>
The reason is: 'SpeechAsync' is a lie. It's not an async (i.e. Task-based) API.
<Majiir>
So to get a nice Task-based API, we wrap the _synchronous_ version with Task.Run(), and then we can await it, or not, as we please.
<Majiir>
The return type for Speak and SpeakAsync is 'void' btw
<Majiir>
but a proper async API would return 'Task'
<SilverFox>
right
<SilverFox>
so basically my version wasn't much different from yours?
<SilverFox>
just using a lamba instead of a delegate?
<Majiir>
The only important difference is you should use 'Speak' instead of 'SpeakAsync'
fcbayerndm has joined #kspmodders
<SilverFox>
oh right
<SilverFox>
fixed
<SilverFox>
hey Majiir, can ye give me a quick coding challenge?
<Majiir>
Write an app that can accept a list of URLs as command-line parameters. It should download each URL and print the result to the console, but it should only be downloading up to 5 at the same time. If more than 5 URLs are given, it should wait for one download to finish before starting the next.
<SilverFox>
so by download you mean just take in the HTML code, or file download?
<Majiir>
What's the difference?
<SilverFox>
okay
<Orum>
why not just write a script for that?
<Majiir>
Orum, the idea is to practice managing concurrency while doing I/O
<SilverFox>
oh is that the main focus here?
<Majiir>
You might build something like, say, a microservice that reads off a queue and makes HTTP callbacks with retry logic, error notifications, etc -- and that will use all the same skills as this, except companies will pay you mad money to build it.
<Majiir>
(and that's not a trivial case you can just script up)
<SilverFox>
I need to learn regex for this.. rip
<Majiir>
That... is not how I would solve this problem :|
<SilverFox>
well, how do you know what is being fed is a URL?
<Majiir>
Put the command line args in quotes, that'll make that part easy
<Majiir>
You get to assume that people are using your app correctly
<SilverFox>
oh hell yeah
<SilverFox>
why are the command line args in quotes?
<Majiir>
They might not need to be. Just helps in case you have spaces in your URLs (which you shouldn't but meh)
<SilverFox>
okay, I'll assume quotage
kronal has quit [Read error: Connection reset by peer]
kronal has joined #kspmodders
<SilverFox>
Majiir, are there any restrictions you're applying?
<Majiir>
Only what I've stated above?
<Majiir>
And, like, actually code it yourself and don't just use another program that does it?
<Majiir>
but use whatever libraries you need within reason
<SilverFox>
okay
<SilverFox>
I'll also try to not just copy paste code snippets within reason
kronal_ has joined #kspmodders
kronal has quit [Ping timeout: 190 seconds]
<Majiir>
Copy-paste is fine if you understand it
<Majiir>
I doubt you'll find a ready-made copy-paste of the whole app
<SilverFox>
well I just got the URL downloader working, so that's about 25% of the work done
<Orum>
Is it possible, or perhaps I should say how probable is it, that difference devices with the same platform will produce different results in OpenCL?
<SilverFox>
Majiir, random question, what is the average hourly wage for a junior dev? I know it's in a salary, but what is the hourly pay?
<Majiir>
Depends on the area. In Boston, a junior dev can get anywhere from $70K to $90K per year, working 40-45 hours a week with 2-4 weeks vacation plus other benefits (healthcare, 401(k), etc)
<Majiir>
Outside the city, that might be less, like $60-75K
<SilverFox>
let's say Im a junior dev at your company
<SilverFox>
I just want to see how much money you've spent on me making this thing
<SilverFox>
so far it's been like, an hour, and I feel like I already should've gotten this done
<Orum>
$235,267,322,824.45
<Majiir>
Roughly $40/hr?
<Majiir>
Interns are like $25/hr
<SilverFox>
would I be hired as an intern?
<Majiir>
If you lived in the area you could easily come in as a junior
<SilverFox>
legit?
<SilverFox>
I have the qualifications to be a junior?
<Majiir>
If you didn't fuck up the interview and put together a reasonable CV/resume/portfolio/etc, yeah
<SilverFox>
sweet
<Majiir>
Like if you get bored of the medical thing, look into software, I'm sure Toronto doesn't suck
<Majiir>
Might not pay as much as Boston
<SilverFox>
I interview okay, but resume is definitely not my strong suit
<Majiir>
The U.S. has unusually high software salaries and Boston has unusually high salaries in general
<Orum>
there's like, thousands of resume templates out there
<Orum>
or do you mean having stuff to put on a resume?
<Majiir>
I do a lot of interviews, and resumes don't matter in the ways you might stress out about
<Majiir>
Just make the resume honest and to the point and that will help a lot
<Majiir>
Even explicitly writing out "I have no professional software experience, but I've done a lot of hobby programming with these kinds of projects:" will make a really good resume
<Majiir>
as opposed to trying to fake it
<SilverFox>
oh, nice, that'll help then
<SilverFox>
I would add my personal projects, but they're shit
<Majiir>
Similarly, don't show up 25 minutes early for an interview
<Orum>
KWS?
<Majiir>
Show up like 2 minutes early
<SilverFox>
KWS is shit
<Majiir>
or 5 minutes late
<Majiir>
I love when a candidate is 5 minutes late
<Orum>
QFT....
<SilverFox>
what is QFT?
<Orum>
Quoted for truth
<Majiir>
Just talk about KWS anyway
<SilverFox>
I have the Human Simulation and Diagnostic Tool I'm working on
<Majiir>
It's hard to put in words just how shit most applicants are
<SilverFox>
I could easily talk about that
<Majiir>
I've had principal engineer candidates (people with my title) who can't code as well as you. Granted, we didn't hire *them*... but someone did
<SilverFox>
it's nice knowing I have potential jobs
<Orum>
jesus that's sad
<Orum>
(no offense SF)
<SilverFox>
how the fuck do queues work
<Orum>
FIFO, FILO, FINO...
<SilverFox>
oh nvm got it
<Majiir>
I had a candidate who told me that he'd build restaurant order-handling software by having a microservice for an Oven
<SilverFox>
"enqueue" is the word I was looking for
<Majiir>
and when you want to cook things, they get sent to the Oven microservice
<Orum>
what the fuck?
<SilverFox>
what about things cooked not in the oven?
<SilverFox>
and what is a microservice?
<Majiir>
Well you have a different microservice for that
<Orum>
something needlessly overcomplicated
<Majiir>
It's like an application that does just a single thing
<SilverFox>
I mean..
<SilverFox>
that does sound grossly overcomplicated, but I appreciate modularity
<Orum>
KISS is underrated
<SilverFox>
Majiir, I *almost* have this figured out
<SilverFox>
there must be a more elegant method of doing the queue and dequeueing system..
<SilverFox>
preferrably if there is a method that can be triggered when the task is finished, and then I can use that method to dequeue that task from the inProgress list
GlassYuri has joined #kspmodders
<SilverFox>
Majiir, could an interview for the job be done online rather than in person, and if I pass, then I could come down with a work visa or some shit? or does your company not do that kind of stuff?
<Majiir>
Yea nah
<SilverFox>
sheeeiiit
<Majiir>
We also don't have budget for juniors atm I don't think
<Majiir>
We're about to blow our senior engineer budget on a devops engineer plus an intern
<SilverFox>
this is all just hypothetical anyways, I just like having options just in case
<Orum>
devops seems like hell
<Majiir>
Devops can be neat
<Orum>
how so?
<Majiir>
It can be very satisfying when you roll out a new solution for how things are configured, deployed, upgraded, etc
<Majiir>
It's like other parts of engineering in that you get to take shitty things and make them better
<Majiir>
Depends on the company and the job immensely though
<Majiir>
If you're doing something like migrating your platform to containers, that's awesome
<Majiir>
If you're just merging branches all day, that sucks
<Orum>
sure, but I imagine you're always at odds with the programmers and the clients/management
<Majiir>
Nah, programmers need and love devops
<Majiir>
Clients/management don't see devops, they interact with the engineering managers
<Orum>
need, maybe...
<Orum>
I just picture a devops guy hanging over a programmer's shoulder asking, "Is it done yet?"
<Majiir>
It's usually the other way around :)
<Orum>
heh
<Majiir>
I'm formally an engineer or architect but I end up doing a lot of the devops crap because someone has to
<Majiir>
It's honestly not bad
<Orum>
yeah, I don't think people go to school for devops
<SilverFox>
can I devops?
<Majiir>
No
<SilverFox>
cool
<Orum>
it's more like, "I got stuck doing this..."
<Majiir>
Orum, I feel the same way about QA
<Majiir>
A good engineer can do devops, a good engineer can do QA
<Orum>
yeah, true
<Majiir>
A good engineer may find themselves doing one or both
<Majiir>
but they'll also go and engineer some software
<Orum>
kind of like staff augs for consulting gigs
<Majiir>
Dedicated QA/devops don't tend to casually go engineer software
<Majiir>
That said, I know some lovely people who just do QA or devops and can't write software
<Majiir>
so my professional opinion is a bit at odds with my anecdotal experience
<Orum>
do they enjoy their work though?
<Majiir>
Yeah
<Orum>
hrm, alright then
<Majiir>
I can't say that I understand it, but maybe I will some day
<Orum>
I wonder what the best way is to make one hell of a jagged array.... an array of vectors?
<SilverFox>
Majiir, do you have any other coding challenges?
<Orum>
I can give you one :D
<Orum>
but not in C#, I have no use for that :\
<Majiir>
I need to get some sleep. Dance class tomorrow. \o/
<SilverFox>
noice
fcbayerndm has quit [Quit: fcbayerndm]
Majiir is now known as Snoozee
Orum has quit [Read error: Connection reset by peer]
GlassYuri has quit [Ping timeout: 182 seconds]
GlassYuri has joined #kspmodders
kronal has quit [Read error: Connection reset by peer]
kronal has joined #kspmodders
kronal has quit [Quit: Leaving]
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 383 seconds]
RandomJeb has joined #kspmodders
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Ping timeout: 190 seconds]
Kracc has quit [Read error: Connection reset by peer]
BasharMilesTeg_ has quit [Read error: Connection reset by peer]
angavrilov|phone has quit [Read error: Connection reset by peer]
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Read error: Connection reset by peer]
GlassFragments has joined #kspmodders
GlassYuri has quit [Ping timeout: 182 seconds]
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Read error: Connection reset by peer]
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Ping timeout: 190 seconds]
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Read error: Connection reset by peer]
m4v has quit [Ping timeout: 198 seconds]
m4v has joined #kspmodders
mkv has joined #kspmodders
m4v has quit [Ping timeout: 383 seconds]
mkv is now known as m4v
m4v has quit [Ping timeout: 186 seconds]
m4v has joined #kspmodders
GlassFragments has quit [Read error: -0x1: UNKNOWN ERROR CODE (0001)]
Orum has joined #kspmodders
m4v has quit [Ping timeout: 186 seconds]
m4v has joined #kspmodders
<Orum>
sometimes I wonder if lambdas were created for the express purpose of putting ascii art in programs, like =[=]()-> and } ();
<Orum>
oh god, emoji-based code is a real thing... D:
m4v has quit [Ping timeout: 198 seconds]
m4v has joined #kspmodders
Rokker has quit [Quit: Connection closed for inactivity]
m4v has quit [Ping timeout: 182 seconds]
m4v has joined #kspmodders
mkv has joined #kspmodders
m4v has quit [Ping timeout: 190 seconds]
mkv is now known as m4v
<Orum>
hrm, is it appropriate to call a destructor explictly if it writes data/cleans up on destruction, and you're going to effectively (and always) terminate the exeution on the next line, or is it prefered to just scope with {} to get the implicit destruction?
<Orum>
I'm guessing the latter is preferred, although more confusing to read...
m4v has quit [Ping timeout: 190 seconds]
m4v has joined #kspmodders
icefire has quit [Quit: gone]
kmath has quit [Remote host closed the connection]
kmath has joined #kspmodders
icefire has joined #kspmodders
mkv has joined #kspmodders
m4v has quit [Ping timeout: 383 seconds]
mkv is now known as m4v
Orum has quit [Read error: Connection reset by peer]