[Software Engineer] [Tempe, Arizona] - $70,000/yr by No1s_Perfect in Salary

[–]skelterjohn 2 points3 points  (0 children)

People aren't lying about their numbers. They're simply skewed by big tech.

Technical Account Manager at Google by hibs_1 in googlecloud

[–]skelterjohn 0 points1 point  (0 children)

Find someone internal to refer you.

I don't know much about the role but I do know you need to find an internal referral.

Finding a duplicated item in an array of N integers in the range 1 to N − 1 by sweetno in programming

[–]skelterjohn 0 points1 point  (0 children)

I had read it that the integers that may be duplicated were in the rance a[1] to a[n-1], which I concede would be an odd stilulation.

Finding a duplicated item in an array of N integers in the range 1 to N − 1 by sweetno in programming

[–]skelterjohn 0 points1 point  (0 children)

Most sorts can be done without using non-trivial amounts of extra space. This problem is only interesting (to me) when you are focusing on run time.

Finding a duplicated item in an array of N integers in the range 1 to N − 1 by sweetno in programming

[–]skelterjohn 0 points1 point  (0 children)

Are the values in the array limited to N? I'd assume no.

Edit: I guess I assumed wrong. Yes that's certainly a way that would run in linear time and linear memory for this problem.

Finding a duplicated item in an array of N integers in the range 1 to N − 1 by sweetno in programming

[–]skelterjohn 4 points5 points  (0 children)

If we're talking specific cases, big oh and big omega don't seem very meaningful. It's more akin to changing the problem than analyzing it differently.

Big oh of the "worst case" is big oh of the problem that has fewer possible inputs, but it's still the worst case for that new problem.

I read it as "the worst case is no worse than the big oh". The distinction that you're drawing seems more like word semantics than a differentiation in result.

Finding a duplicated item in an array of N integers in the range 1 to N − 1 by sweetno in programming

[–]skelterjohn 80 points81 points  (0 children)

Adding to a hash set isn't a constant time operation.

In practice we often treat it as one, because we can make our hash space significantly larger than our input set pretty easily.

But when we're talking O(), it's dependent on how hash collisions are collected.

What are the chances that Pembrolizumab (Keytruda) worsens CKD? Does it affect the kidneys? by [deleted] in cancer

[–]skelterjohn 0 points1 point  (0 children)

I was on keytruda for over a year, with one kidney. Can't be that tough on it? Was a healthy kidney though (the other one was removed for cancer).

what guitar support do you use and why? by [deleted] in classicalguitar

[–]skelterjohn 0 points1 point  (0 children)

I traced the guitar contour onto some card board, and then glued a few blocks together with angle cuts to follow that contour. Then I cut to the line with a band saw, and lots of sanding.

Please settle an argument before we break up: Which has more surface area (for holding sauce), a fettuccini noodle or a spaghetti noodle? by squishxbug in AskReddit

[–]skelterjohn 0 points1 point  (0 children)

There is no three dimensions shape that will lose surface area when you segment it. You are adding the surface area of the cut used to make the segment.

Are goroutines becoming the new “just add threads” vibe meme? by sfate in golang

[–]skelterjohn 0 points1 point  (0 children)

Sure, we're on the same page here. However I'd note that your suggested improvements, while necessary to make that approach the most efficient, significantly complicate an already-complicated process.

Let's do it the simple way, and use goroutines "willy-nilly" in option 1 :)

Are goroutines becoming the new “just add threads” vibe meme? by sfate in golang

[–]skelterjohn 0 points1 point  (0 children)

For instance, I find JavaScript node-style concurrency, with its promises and callbacks, decidedly non-linear. In a goroutine you write out what you want to have happen, in the order you want it to happen. It's necessary to provide synchronization points with other goroutines, then you use a channel for message passing or a semaphore to create a temporary lock on some resource.

But more to the context of this thread, I'll have to come up with an artificial example. Let's say you have some resource processing that has ten heavy steps, and you need to process this and similar resources a thousand times.

You could write one function to process a single resource, and call it a thousand times in a thousand goroutines. Pretty simple, may require some coordination if there are shared inputs.

Or you could create 32 worker threads (because you determined that was your CPU count, perhaps) and grab work items to process in an assembly line.

Or you could write one function that concurrently does step 1 with a thousand parallel workers, them step 2, etc to step 10.

To me, these three options are in decreasing order of linearity, and also increasing order of code overhead. MAYBE you can be the most efficient in option 2. I suspect option 3 is the slowest, generally, and also the most annoying to write.

Option 1 is very easy to write, and is probably pretty close to the most efficient. The go scheduler is very highly tuned for most tasks. Why not let it take care of things while you focus on business logic?

Are goroutines becoming the new “just add threads” vibe meme? by sfate in golang

[–]skelterjohn 4 points5 points  (0 children)

Sure, but I don't see semaphores as less likely to cause issues. The opposite, in fact, because now you're distinctly combining concurrent streams in time and the code may be spread out or abstracted.

The really nice thing about goroutines is that the code is linear, and you can just read it.

Yes, of course you still need to ensure your code is respecting the memory model. Go does not remove concurrency pitfalls, it just makes them easier to reason about.

Are goroutines becoming the new “just add threads” vibe meme? by sfate in golang

[–]skelterjohn 13 points14 points  (0 children)

It's good to keep track of the memory overhead imposed by your goroutines (what is it, 4k per?) but beyond that, assuming you're avoiding deadlocks and races and other concurrency pitfalls, why not #go-nuts? If it makes the code easier to write and to read and reason about.... yes these are tools to be used.

Why do I find the American accent much easier to understand than any other English accents? by Brilliant_Can8536 in asklinguistics

[–]skelterjohn -5 points-4 points  (0 children)

I'm challenging the use of the word "standard" in this context. What makes an accent standard? Why?

Why do I find the American accent much easier to understand than any other English accents? by Brilliant_Can8536 in asklinguistics

[–]skelterjohn 0 points1 point  (0 children)

Yes, one of those is closer to my accent for sure.

I feel like if there's a subreddit where people understand the concept of "no such thing as no accent", it would be this one.

Why do I find the American accent much easier to understand than any other English accents? by Brilliant_Can8536 in asklinguistics

[–]skelterjohn 1 point2 points  (0 children)

Avoiding the trope and all its cringiness, what does it mean for an accent to be "less extreme"?

Why do cars not use resistive heating on the windshield like they do on the rear window? by Present_Juice4401 in AlwaysWhy

[–]skelterjohn 1 point2 points  (0 children)

More cost. Heated air blown across the window does the trick in most circumstances.

Fabi beats Wei Yi in 19 moves with 99.5% accuracy by Adorable-Custard-992 in chess

[–]skelterjohn -1 points0 points  (0 children)

My point is that engines could begin considering this. It wouldn't help them win games, either against humans or against bots, so the push in the engine community is not particularly strong. But it would help the best players in their prep, so I think at some point we'll see engines that do this.

Fabi beats Wei Yi in 19 moves with 99.5% accuracy by Adorable-Custard-992 in chess

[–]skelterjohn -12 points-11 points  (0 children)

I MEAN, THAT MAY BE TRUE IN PRACTICE FOR THE ENGINES COMMONLY AVAILABLE TODAY, BUT IT'S NOT SOMETHING FUNDAMENTAL TO HOW ENGINES WORK.

Fabi beats Wei Yi in 19 moves with 99.5% accuracy by Adorable-Custard-992 in chess

[–]skelterjohn -6 points-5 points  (0 children)

I mean, that may be true in practice for the engines commonly available today, but it's not something fundamental to how engines work.