timv
Joined 14 years ago
Joined 14 years ago
But if the best alternative is to sort the whole collection, then Quickselect doesn't introduce a new problem. You either accept that modifying the collection in place is an acceptable behaviour (and describe that in your API docs) or you make a copy of the collection and operate on that.
Given a choice between quickselect and quicksort, quickselect will get the answer with less overhead and no additional constraints (because it's essentially the same algorithm with unnecessary steps removed).
There are alternative approaches that don't require a full copy/sort, but they either require a partial copy + partial sort, or multiple passes through the collection.
Quickselect is fairly simple to understand if you already understand Quicksort. You use use a binary division but you avoid sorting sections where the order doesn't matter.
Let's start with a 7 element array
[ 2, 4, 7, 5, 3, 6, 1 ]
We pivot on the mid-point (5) so that values less than end before it in the array and numbers larger end up after it [ 2, 4, 3, 1, 5, 7, 6 ]
Since 5 is now at an index greater than the midpoint, you know the median must be less than 5, so you don't care that 7 and 6 aren't sorted.We pivot the first partition (first 4 elements) on 3 and get
[ 2, 1, 3, 4, 5, 7, 6 ]
We don't care that 2 and 1 are unsorted, because we know that the median is > 3 (3 is at index #2 and we want index #3), so the median must be 4This was the biggest (1) complaint for me - in light of what you discovered from your actual support experience, why was your expectation so off?
Was it that you expected support to be full of "how do I do this complicated thing?" questions that can be answered by an expert? That's an unrealistic expectation, but I guess now you know.
Or was it that you really thought that customers would be happy if you just took the time to explain your pricing model to them (also unrealistic).
It is kind of obvious from the types of emails you get, and the types of responses you give that it was not going to lead to strong customer relationships. If all you're doing is writing a 100 words to say "No, I'm not going to do what you want" that's not going to make things better.
(1) Actually 2nd biggest - the biggest was talking about "buying Castro" but having no explanation/links about who the author is, what Castro is, or how/when/why it was bought.
For what we needed, we intentionally wanted both people to be at the same terminal (it was going to be used to give shell access to a specific unix account that ran a critical system).
That mean that we could implement it as a setuid (root) binary that required both users to authenticate. It had a config file that worked like sudoers, and defined a list of commands that could be called, how many people were needed to authenticate, and which unix groups they had to belong to.
If one of the possible vendors convinces you that that they have a next gen model that is so powerful it found 20+ year old bugs in a hardened operating system, that would undoubtedly have an influence on your decision even if you are only buying the current model.
The choices therefore are:
1. No bound check
2. Bounds check inserted, but that branch isn't covered by tests
3. Bounds check inserted, and that branch is covered by tests
I'm skeptical of the claim that if (3) is infeasible then the next best option is (1)
Because if it is indeed an impossible scenario, then the lack of coverage shouldn't matter. If it's not an impossible scenario then you have an untested case with option (1) - you've overrun the bounds of an array, which may not be a branch in the code but is definitely a different behaviour than the one you tested.
Why do you say that?
At least in Australia, drinking fountains ("bubblers"!) are fairly non standardised. I don't recall seeing many with that rubber top, but the rotating release mechanism is pretty common. I'd say press buttons are more common but both are typical.
Still not US$14k, but not quite the $25k it is in other markets.
I guess Nintendo don't see enough left over space to bother trying.
If the switch had been a failure, then a lot of households that currently have a switch (only) would have bought a different console and that would likely have been a PS5 (even if they held on to their previous generation console, and waited a couple of years until the PS5 price dropped below $500)
I have a PS4 and a Switch at home. The kids play the switch and occasionally play on the PS4. I can't justify buying a PS5 because there's only so much gaming time available, and family gaming is covered by the switch and my personal gaming is good enough on my PC. Take the switch out of the equation and that changes.
PS5 is winning the AAA console lane, no doubt. But Sony could have been making more money if they could also own a significant portion of the family console lane.
That requirement forces phones to have some degree of special handling for emergency calls. It may have required (or been interpreted to require) that a phone make emergency calls over 3G if VoLTE was unavailable. I can imagine someone deciding that means "lets just use 3G for all emergency calls" because who ever expected a case where 4G was available and 3G was not.
"Overcharging" is a concept without a precise meaning. The SSO-capable version has a feature that cost money to build and support. That it is sold at a higher price (often alongside other enterprise features that cost money to build and support) is not proof that they are overcharging.
Any company that is tying to recoup the costs of building those features will charge the customers that use those features. The existence of a price differential between the 2 editions does not tell you whether they are overcharging.
I wonder whether you could get the benefits of weighing the evidence collectively but reduce the influence that 1 or 2 dominant jurors might have.
If 2 or 3 independent groups reached the same conclusion, does that increase the chances of them being correct?
Sydney, Australia
Email: my-hn-username (at) adjective.org
-------------------------------
Current:
- Elastic (elastic.co)
Previous:
- Prospection (prospection.com.au)
- Site Tour (sitetour.co)
- ActiveGrade (activegrade.com)
- Dragonfly Technologies (dragonflytechnologies.com.au)
- Carpadium Consulting (carpadium.com)
- Macquarie Group (macquarie.com)
-------------------------------