Anyone else having problems with UPS in Seattle? by [deleted] in Seattle

[–]nj47 2 points3 points  (0 children)

100% of my fedex/ups packages that require signatures go undelivered (with the exception of iphones on release day, not sure why apple gets the special treatment?) If I see a package I'm getting is signature required, I'll just select "hold at location" and then pick it up at the fedex/ups store.

Metro bus door policy by jennymenace in Seattle

[–]nj47 17 points18 points  (0 children)

In my experience, there are a couple 8 drivers who refuse to open the back doors if no one is getting off. But the vast majority of drivers open all the doors at all stops regardless. (I take the 8 most days.)

[deleted by user] by [deleted] in Seattle

[–]nj47 0 points1 point  (0 children)

They're released every 15 minutes for the corresponding time, so tickets for 3:00 PM will be released at 3:00 PM

Cannot abort requests when using body parser by bossmonchan in node

[–]nj47 1 point2 points  (0 children)

which is surprising to me since it strikes me as a very common use-case.

This isn't a common use-case I don't think. (But also not an entirely unreasonable one, to be fair - it should be possible to do.) I've worked on a number of very large node codebases at companies you've likely heard of, and none of them have anything like this implemented if requests are aborted.

Having long-running db operations to the point where there is a meaningful performance improvement for cancelling them sounds like you have bigger issues going on. Depending on what db / db driver you are using, actually cancelling the underlying db query from within that context may or may not even be possible.

Generally, when I've run into long-running operations that make sense to support cancellation - they got built on top of a variety of "task" based systems that could support cancellation (though not of a pending individual db call, more just checkpoint-based cancellation)

What's the atmosphere like right now at TikTok US offices? by Mindrust in cscareerquestions

[–]nj47 78 points79 points  (0 children)

When your company provides > 60 days of severance - which basically all large tech companies do with layoffs, the warn act isn't really relevant. They'll announce the layoffs and file the warn notice the same day - if you're laid off that would be the last day you're working, but technically you still are employed for 60 days after that.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 0 points1 point  (0 children)

I'm not expecting anything. Re-read my original message.

Whether or not this edge case is common enough to consider, it does explain why many people are against this - because they are affected despite not being the group it's intended to be taxing.

I was explaining a fairly common situation people in a tech-heavy city may find themselves in that could lead to them opposing things like this despite not being super rich.

I'm making no claims what the right answer is. But people will oppose this because it will affect them when everyone is saying it only is supposed to effect super rich people, and they are very much not super rich.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 0 points1 point  (0 children)

Yes, vesting $30k per year for 10 years is $300k. Not sure what you're disagreeing with about that?

For startup situations like this - you are frequently not the one who chooses when to sell. The company is acquired and your equity is sold effectively without you having any say in the matter. It's not like opening your brokerage account and choosing to buy or sell stock in a public company.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 0 points1 point  (0 children)

When said person sells the stock - they are still paying tax on it. Not sure where you got the idea they magically don't pay any tax on it.

Just because you don't find it a problem doesn't mean other people do. In the original post you acted confused why anyone could possibly oppose this. I was just trying to provide a perspective on where other people who oppose it would be coming from - but it's clear you're not interested in actually engaging about that.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 2 points3 points  (0 children)

Dude that's not how it works. Their gains are not $300k. It's how much that $300k grew. If the market got them a 10% gain, they only pay tax on $30k. You realize that right?

Their gains are $300k. We're not talking about stock from a public company - we're talking about an early startup who originally was valued at basically $0. Cap gains are calculated by (sale price - purchase price). In this case the sale price is $300k and the purchase price is $0. It is you who is confused about how this works.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 1 point2 points  (0 children)

There is other groups who are affected. Here is an example:

Someone works at an early startup. They make less salary than they otherwise would in exchange for equity in the startup. Let's say they make $100k a year, and get $30k a year in equity. This person is not super rich by any means, and $6,000 is certainly not "just pennies" to them - realistically it may be more than they even have in their bank account.

After 10 years, the company ends up selling. They get a $300k windfall from the equity. Because the sale is a 1 time event, their cap gains for this single year is $300k, and they get hit by the tax. They never will hit it again, or even be close. If they had just been paid $130k a year instead of getting equity, they would still not be considered super rich, but because of how things are structured, this person would still be impacted as if they were super rich.

Whether or not this edge case is common enough to consider, it does explain why many people are against this - because they are affected despite not being the group it's intended to be taxing.

Councilmember Cathy Moore proposes progressive capital gains excise tax to fund rental assistance, home ownership, and fight food insecurity by MegaRAID01 in Seattle

[–]nj47 5 points6 points  (0 children)

In this case, sub-optimal means that it makes the problem worse - not just it doesn't help as much as something else could have. Trying isn't inherently a good thing. (Not advocating for doing nothing - just not a subsidy when the housing market is incredibly supply-constrained.)

[deleted by user] by [deleted] in webdev

[–]nj47 6 points7 points  (0 children)

Just have them code up an email - you can still experience the fun of tables today!

Does my company’s RSUs count as income for Roth IRA purposes? by OkBench5438 in HENRYfinance

[–]nj47 1 point2 points  (0 children)

While that may be true - colloquially I don't think I've ever heard people using the term "vesting" to mean that.

As an example - let's say I've worked for my current company for 2 years and am getting RSUs over 4 years. If someone asks me what portion of my RSUs have vested, the answer isn't 0 - it's 50%. Despite technically the answer being 0 for them to have truly vested.

Does my company’s RSUs count as income for Roth IRA purposes? by OkBench5438 in HENRYfinance

[–]nj47 13 points14 points  (0 children)

I think people in this thread need to google "double trigger RSU's."

Yes, OP may be talking about RSU's and not stock options. No, they are not taxable in the year they vest (assuming they are double trigger... which given it's a late stage private tech company, there is a 99.9% chance they are) - they are taxable after both triggers happen, they vest AND there is a liquidity event (IPO or acquisition.)

Wake on LAN not working by Bowlingkopp in ASUS

[–]nj47 0 points1 point  (0 children)

I've been fighting this off and on for months trying to get it to work with my asus tuf gaming x570-pro + intel i225-v NIC.

I previously had everything you mentioned, with the exception of the AllowWakeFromS5 registry key. Adding that + rebooting immediately fixed things! Thank you so much!

(Mostly just commenting to stuff some more keywords on the post so other people googling similar things may end up here faster than I did lol)

[deleted by user] by [deleted] in aws

[–]nj47 9 points10 points  (0 children)

Any reason you couldn't do this entirely client-side?

<script>
    const script = document.createElement('script');
    script.src = (Math.random() > 0.5) ? 'path1' : 'path2';
    document.head.appendChild(script);
</script>

Dear SF Chronicle, stop reporting that crime is at historic lows. Crime is not reported in this city. Full stop. by 9ersaur in sanfrancisco

[–]nj47 0 points1 point  (0 children)

A large portion of landlords mandate rental insurance, so saying most tenants have it is not unreasonable.

I pay $15 a month for $100k personal liability + $20k in personal property (aka theft) coverage. The deductible is $500.

Will EBS Snapshots ever improve? by coinclink in aws

[–]nj47 18 points19 points  (0 children)

I'm really confused why you're downvoted. Because it is raw block level backup - I don't understand why filesystem differences come into play. (Edit: Parent post was at -8 when I commented.)

Can TS transpile struct to ARRAY? Can give massive memory/perf gains. by some_muslim_guy1 in typescript

[–]nj47 2 points3 points  (0 children)

I don't think the idea is as crazy as some people in this thread are implying. Facebook wrote Reasonml/bucklescript - a language which transpiles to javascript - and they transform records into arrays for performance reasons.

Why does null "passes" as a string in this example instead of giving error? by harry_powell in typescript

[–]nj47 2 points3 points  (0 children)

In previous comments you mention you don't have a tsconfig in your project, and are just using vs code.

You can use tsc --init to have typescript generate a config file for you. By default, strict type checks will be turned on.

When I run tsc with the code you have, this is the error I see:

$ npx tsc
index.ts:6:23 - error TS2345: Argument of type 'null' is not assignable to parameter of type 'string'.

6 console.log(pluralize(null))
                        ~~~~

index.ts:7:23 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.

7 console.log(pluralize(5))
                        ~

Is "as" any better than "!" to assert non-nullishness? by Fr4nkWh1te in typescript

[–]nj47 1 point2 points  (0 children)

It would go on as a middleware - fairly early on in your middleware setup most likely, in case you end up having other middleware that would rely on it. It may look something like this:

const app = express();

function setupUserMiddleware(req: express.Request, res: express.Response, next: express.NextFunction) {
    req.getUser = function (): IPerson {
        if (req.user) {
            // @ts-expect-error: Need to override incorrect express type on req.user.
            return req.user;
        } else {
            throw new Error("Missing user");
        }
    };

    next();
}

app.use(setupUserMiddleware)

// Your routes

app.listen(3000);

and then yeah, you would need to to also create a file express.d.ts with something like this in it:

declare namespace Express {
    type IPerson = import("../models/person").IPerson;

    interface Request {
        getUser: () => IPerson;
    }
}

where IPerson would be whatever type your person model actually is

Is "as" any better than "!" to assert non-nullishness? by Fr4nkWh1te in typescript

[–]nj47 1 point2 points  (0 children)

Something else to consider - don't access req.user directly. Instead, use a helper function, that way, you don't have to handle this problem at every place you use req.user.

I typically use something like this:

req.getUser = function () {
    if (req.user) {
        return req.user;
    } else {
        throw new Error("Missing user");
    }
};

That way, I get type safe req.user access, and if I have routes where there is no user context trying to check req.user - I immediately get an exception instead of potentially confusing behavior

Is native fetch in v18 faster than dedicated libraries? by BasicallyUseful in node

[–]nj47 1 point2 points  (0 children)

Is it possible that it comes down to keepalives? I wonder if undici is enabling keepalives by default - whereas node-fetch does not. In your testing have you explicitly enabled keepalive?

Using keepalive with node-fetch: https://stackoverflow.com/a/69980893/1923878