Better HN
topnewbestaskshowjobs
Log inSign up

thinkharderdev

1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions

https://www.thinkharder.dev

[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]

Submissions

comment 3y ago · link · parent

You don't necessarily declare the value at what you are actually willing to sell at. It's more like you declare it at the minimum value that nobody else is willing to buy at. If anything like this were actually implemented (which seems wildly unlikely for many, many reasons) the owner would have the option to update the declared value if they don't actually want to sell at the previous declared value.

So say you wouldn't sell your house for less than 500k but similar houses in your area are only selling for 350k. You would probably declare the value at $350k to minimize your taxes. If someone comes along and offers you $400k then you can either:

1. Sell to them, which you won't because 400 < 500

2. Update the declared value to 400k (and payer a higher tax)

comment 3y ago · link · parent

The difference would be that the fee you have to pay is scaled to the value someone else can get from the patent. So if you have a patent which is not valuable to you but is valuable to someone else, then you either have to sell the patent to them or pay a tax based on what value they could get from it.

comment 3y ago · link · parent

The point is that everything is always implicitly on the market at all times. So if you declare your house to be worth $X then you have to accept on offer of $X (or else declare a new, higher value going forward). When you're talking about people's home then obviously this would not be a practical system for many, many reasons. But in other domains it seems like a reasonable idea.

comment 3y ago · link · parent

> This inevitable consequence is that people would be forced to "value" their house at the maximum they think it might be worth in 12 months time or risk losing their home, or even higher to signal that they really don't want to leave their home, all the while paying more tax than they need to because the actual market price for houses would be lower.

This is mostly a thought experiment so there is not an actual detailed implementation plan by the authors. But my sense was that it's not that you actually have to sell immediately but more like someone can offer to buy at $X and then you either have to sell or $X becomes the new declared value for future tax payments.

comment 3y ago · link · parent

Unless the last sale was 25 years ago

comment 3y ago · link · parent

> If you dismiss any sentimental value, then it doesn't really matter, but real life is a lot messier than that.

I agree and in cases where sentimental value is a real concern I think there are obvious problems with this sort of system. But I also think there are a lot of domains where this isn't really a concern such as patents.

> The classic example is the poor person who inherits a nice house but can't pay the inheritance tax (and/or subsequent propery taxes), and is thus forced to sell the house in order to pay the taxman.

This is an entirely separate issue but this also seems entirely solvable in our current system of inheritance tax. You should just inherit the original cost basis along with the asset. So if you don't want to sell your inherited house you don't have to. But if you do then your taxes should be paid based on the original cost basis.

comment 3y ago · link · parent

They can't take it from you because you can declare a higher value. You would have to pay more in taxes on it, but it should still be profitable. The whole point though (according the authors) was that if it were MORE profitable to someone else (because they had complimentary assets or some ability to use it in way that you can't) then it is better for that person to buy it and create more value from it. To take a completely contrived and unrealistic example, imagine that you owned a piece of land with some rare plant that can be turned into a cancer cure. This plant ONLY exists on your land. Obviously this land is extremely valuable to someone who can actually bring the cancer drug to market. You can of course refuse to sell the land (it is your land to do with as you want) but it seems sub-optimal for society for you to do so. Under this system you would either have to pay a really high tax or actually sell the land to someone who can make the cancer drug

comment 3y ago · link · parent

> The other thing you can say about that is that it's guaranteed to assess property at values that are too high

How so? It seems like it would lead people to asses things at the "correct" value (eg the value at which you would actually sell the asset). So if you buy an asset for less than it is worth to you then you still have a valuable asset, you just need to pay a tax on that asset. Where this would obviously break down is with personal property that has some sentimental value. It would be unjust for people to either have to sell a treasured family heirloom or else pay an exorbitant tax to avoid selling it, but if restricted to domains where that is not a consideration (like patents or other corporate assets) it seems like a good system to me.

comment 3y ago · link · parent

Maybe, like any system it almost certainly looks better on paper than in practice and I haven't thought about it too hard. Mostly I thought it was an interesting idea.

> They declare a high price they're happy to walk with and then continue trolling people with their patent

They can if they want but by declaring a high price they are also then obligated to pay a lot of taxes. So the system disincentivizes both under and over estimating the value of patents. It also incentivizes property going to the highest value use. So if I can do something more valuable with your patent than you are able to do (for whatever reason) I can afford to pay for it more than you can afford to pay the tax.

comment 3y ago · link · parent

Yeah, like I said it has obvious practical problems when applied to things like primary residence so I don't think it would actually be a workable system for replacing existing property taxes.

comment 3y ago · link · parent

Years ago I read the book "Radical Markets" by Glenn Weyl and Richard Posner. One of the ideas was a system of property tax system in which you pay property tax based on a property value which you get to declare (rather than some assessment by a third-party or government agency). The catch is that you are required to sell to anyone who offers your declared value. So a bit like a land value tax but fully general (can be applied to anything) and also sidestepping the issue of how to actually determine the the "value" in land value.

While this would pose obvious practical problems as a system for property taxes, it seems like it might actually be a good system for patent taxes. Basically, you should have a to pay a patent tax to hold a patent. You can declare whatever value you want on the patent but have to also be willing to sell the patent at that declared value (or maybe just license it). I haven't thought it through really (just an idle thought) it certainly seems like it would basically destroy the business model of "patent trolls" and curb the practice of major tech players accumulating a huge portfolio of dubious patents as a cudgel they can threaten smaller competitors with.

comment 3y ago · link · parent

Depends on the code and whether you are doing a release or debug build. I work on a very large rust project (~1m LoC) with a lot of dependencies. We've split it into multiple crates and the compile times don't really frustrate my dev workflow (incremental compilation works well and debug builds are pretty fast anyway). But building in our CI pipeline where we do a fully optimized build (single codegen unit, LTO enabled) it takes a while (~30m) which is annoying when you are waiting for a hotfix to be ready. It's also incredibly resource intensive (mainly linking with LTO enabled) so we've been the bane of our platform teams existence since we need something like 50GB of memory in our build container to do a full release build :)

comment 3y ago · link · parent

Not sure if the parent's concern is valid but I think the argument would be that companies can conspire to all suppress wages so they don't have to compete on comp. That would be hard to do now because they can't "officially" conspire in this way (eg sign a binding contract with each other) because that would be illegal. Without an enforcement mechanism it is too easy for any one company to defect from the "gentleman's agreement" and offer higher wages. If all salary information was public though, then as soon as one company defected and offered one high-value employee a higher salary everyone else would immediately know it and start competing on salary again. So that makes the informal agreement more stable and leads to lower wages.

comment 3y ago · link · parent

> Well, basically you then need to chase them as a dev manager

What you are describing, following them around to observe what they are doing, sounds a lot more like "chasing them" than asking a couple of follow-up questions in the standup.

comment 3y ago · link · parent

But you don't just have their online status. You can still talk to people even if you're not in the same room. You can ask them questions about what they've tried and see if they're making any substantive progress from day to day. When they say the problem is difficult in the daily you can ask followup questions to see if they've really thought about the problem hard. If on day 4 all they can say is "it's difficult" then they are clearly not working very hard on trying to solve the problem. Once they finally do finish you can ask details about why it was so hard and judge for yourself whether it was genuinely a tricky problem or they were just slacking off.

These are all things you should do as the team lead or manager whether you are in person or remote.

comment 3y ago · link · parent

Yeah, I can see that and in most cases that's true. But I also understand the anger of people who were legitimately bait-and-switched. For some people it may be a big deal, if they have to move to work in the office for example. But even if it's not a big deal, it's shitty to have someone reneg on a deal with you. And that's especially true if you feel (right or wrongly) that it's for bullshit reasons.

comment 3y ago · link · parent

Not sure how it works everywhere, but in many cases it's not just money they give you. They basically reimburse you for particular moving expenses.

comment 3y ago · link · parent

How is that dealing with it exactly? Are they able to somehow assess productivity better when people are in the office? How?

Some are arguing that people are just naturally more productive in office than at home. I don't necessarily but that argument but it at least makes sense. If what you're worried about is people slacking off at home then I don't quite see how RTO is a solution to that. I've worked with people in that past who showed up to the office every day and played poker online, browsed reddit and watched videos on YouTube.

comment 3y ago · link · parent

I mean, a lot of people don't "work" in the office either. You're either using some sort of concrete metrics to try and measure productivity or you're not. "Bob shows up to work every day" doesn't actually tell you much about whether Bob does anything useful while he's there. I don't think figuring out who is productive and who is not is substantially different for an in-office job vs remote job. One might even argue (I'm not sure I would, but it seems plausible at least) that it is harder to measure in office. You might be tempted to rely on things like "butt in seat time" (whether they are doing productive work or just browsing reddit) or who tells funny jokes at happy hour.

comment 3y ago · link · parent

What does this have to do with anything? Obviously there are jobs where WFH is not possible. Nobody is disputing that. Should we all be required to wear uniforms to work because some jobs require that? Some jobs require you to be clean shaven, should that requirement be universal as well? Or what about working night shifts? Doesn't seem fair that nurses have to work overnight shifts while pampered office worker get to work regular daytime schedules does it?

And for the record I have worked restaurant, retail and construction jobs in the past.

comment 3y ago · link · parent

Really? Video conferencing seems dramatically better to me than 10 years ago. Zoom is pretty great and various tools for screen sharing are much more prevalent now. And the one thing I really missed about working in an office (being able to whiteboard something) is mostly solved now with an iPad + Apple Pencil.

comment 3y ago · link · parent

How would you do that with UUIDv7 though? I see how using sequential IDs would obviously leak that information, but if all you leak is the timestamp the ID was generated, how do you then infer anything about the rate of ID generation?

comment 3y ago · link · parent

> whose storage in virtual memory are somehow fundamentally locked to a specific CPU core

There are some pretty common reasons why a future in not Send:

1. It is reliant on some thread-local state in which case you can't move it to another thread 2. It uses something which relies of being single threaded for sounds. An example would be `Rc` the standard reference counted pointer in the std. It uses a `usize` for the refcount so it is not safe that have two `Rc` for the same data on different threads. If you need a reference counted pointer that is thread safe you need to use `Arc` which uses an `AtomicUsize` for the ref count and so is Send.

> I just need to be able to await the other routine and resume when it completes, not somehow make the two runtimes merge into one unified one and violate their constraints. The ONLY data from my coroutines which should end up on a different thread is what I explicitly pass to the routine, not my continuation.

Sure, and you could do this in Rust now perfectly fine. Spawn a future on a separate runtime (or a CPU intensive task on a regular thread) and await the result on the current runtime. But by default what happens whenever you hit an `await` is that the coroutine is suspended and goes onto the runtime's run queue until it is woken back up and gets rescheduled. In Tokio's multi-threaded runtime it can be rescheduled on next wake on any worker thread so it must be `Send`. If you use the single threaded tokio runtime there is only one thread so it doesn't need to be `Send`. And even in the multi-threaded tokio runtime you can still spawn tasks that are pinned to the current worker thread using LocalSet.

In writing application code this is (to me at least) mostly a non-issue. Most futures will be Send anyway so the Send bound is not a big deal. But if you do have something that is not Send then you can always use LocalSet to spawn it. The issue I think is really in writing library code where you start to have to add Send bounds everywhere so it jives with multi-threaded runtimes. Like say you have a trait with a method that returns a `Stream` but the concrete type of the `Stream` is not important as long as it produces the required output. So you have

``` trait MakeThingStream { fn make_it(&self) -> Box<dyn Stream<Item = Thing>>; } ```

Well now all the compiler knows is that the output implements `Stream<Item = Thing>`. But this may not be Send so you'll get compiler errors if you try to use this in a multi-threaded runtime. So you add Send/Sync bounds:

``` trait MakeThingStream { fn make_it(&self) -> Box<dyn Stream<Item = Thing> + Send + Sync>; } ```

Great, now it plays nicely with multi-threaded runtimes but even if it's being used in a single-threaded runtime you still require the Send/Sync bounds.

comment 3y ago · link · parent

Sure, you could implement your own sleep functionality that way and it would be independent of the async runtime but the async runtimes already provide that out of the box in a way that doesn't require spawning a new thread so that is typically what gets used.

comment 3y ago · link · parent

It does. Under the hood it may just be creating a kernel timer but something needs to actually wake the task back up when the timer elapses, which is what the runtime does.

The solution would probably just to create standard interfaces in std for this so you could just do `std::async::sleep(Duration::from_millis(100)).await` and just delegate the implementation details to the runtime (or something like that).

comment 3y ago · link · parent

In rust it is yes because rust statically guarantees that you don't have data races (in safe rust at least). So you have marker traits `Send` and `Sync` which indicate that a type can be sent between threads (Send) or shared between threads (Sync) safely. So for a multi-threaded executor which can scheduler tasks on different threads when they resume has to make sure futures are `Send` whereas a single-threaded executor does not have that constraint.

comment 3y ago · link · parent

Furlough can be very different. Usually "furloughed" employees are still employed and continue receiving benefits (health insurance, etc). I guess if there were no benefits they would be the same though.

comment 3y ago · link · parent

I think it just means "let go not because of individual performance" as opposed to "fired" meaning "let go because of bad individual performance."

It think of it in the sense that you are talking about though because I grew up with a lot of people in the building trades. They often use "laid off" to mean basically "there's not enough work so I'm not getting hours until there is more" (eg temporary). But I think that is pretty specific to those industries where there is pretty fixed pool of labor and the work is highly seasonal.

comment 3y ago · link · parent

Where it has tripped me up in the past it has been because of the way the compiler rewrites async code and you implicitly capture scope at await points. So you code doesn't compile because "future is not Send" and it's not immediately obvious why. And then it turns out that 100 lines previously you had a parking_lot::Mutex local variable which got captured in scope. So you need to refactor a bit to make sure that local variable is out of scope at your await point.

comment 3y ago · link · parent

This has not been my experience at all. Delegating compute-intensive tasks to rayon inside a tokio runtime is not particularly hard (assuming you can pipeline things to separate IO and compute effectively).

A pattern that has worked quite well for me is to use

``` struct ComputeTask { some_state: SomeState, completion: Sender<Output>, }

impl ComputeTask { fn run(self) { .. do you compute-intensive stuff

     self.sender.send(output);
  }
}

async fn do_stuff() -> Result<Output> {

let (tx,rx) = tokio::sync::oneshot::channel(); let task = ComputeTask { .., tx }

  rayon::spawn(move || task.run());

  rx.await
}

```

1
567
24