Better HN
topnewbestaskshowjobs
Log inSign up

jdxcode

1,380 karma · joined Mar 19, 2020 (6y ago) · 457 submissions

https://github.com/jdx
Submissions

comment 3y ago · link · parent

They nailed the back-end stuff. I would not have come up with such a good, simple plugin design. But yeah, there are several UX issues like this. Part of it is because it’s written in bash, but ones like this I really couldn’t explain.

I’m trying to fix them while also supporting their syntax where I can, muscle memory is strong. So I support “plugins install” and “plugins add” If you notice any aliases that you think should exist, please mention them.

182.

Show HN: Asdf Clone Written in Rust

79 points · by jdxcode · 3y ago · 35 comments

183.

Show HN: Chim(jdxcode.com ↗)

1 points · by jdxcode · 4y ago · discuss

comment 5y ago · link · parent

Yeah, the word “current” in the headline is doing some heavy lifting

comment 5y ago · link · parent

> I absolutely hate this kind of nitpicking, and am loathe to see it enforced, especially if the org has the bright idea to try to wire this up as a precommit hook.

I find this so strange. I also loathe nitpicking about syntax which is precisely why I think this would be a great tool!

I work in JS now on a large team and one of my least favorite activities is trying to find consensus on which linting rules we should/shouldn’t adopt. It’s such a waste of time!

comment 5y ago · link · parent

This is a clear violation of the first amendment, right?

comment 5y ago · link · parent

I would assume the biggest roadblock is they actually build physical products

comment 5y ago · link · parent

Every time that Chrome updates I have to give it macOS permission to access my location (if I want my location available to any web page at least).

Is there a way to make this permanent anyone is aware of?

comment 5y ago · link · parent

iCloud photos aren’t just jpegs in a directory

comment 5y ago · link · parent

and decades of lead time since they've been doing cable internet

comment 5y ago · link · parent

Well not all injection vulns deserve this level of scrutiny.

I'm not familiar with that vuln, but I don't see how it could be the "same mistake". My guess is there simply wasn't support for parameterization or there was a non-obvious concatenation problem when building the query string—but please correct me if I'm wrong.

This instance is novel because the parameterization protection was removed in favor of concatenation and that the vuln is so obvious a first-year CS student wouldn't struggle to identify it.

comment 5y ago · link · parent

I get so busy I rip out query builders to SQL concat strings all the time. /s

That’s like going 120mph and telling the cop you were just “distracted”.

You’re correct that we often make mistakes when we’re busy, but this isn’t that. This is OWASP #1 and the most plain example of it.

This is not a “mistake” that engineers make, this is unethical to allow this to go into production. He even has a stackoverflow answer where he explains this exact problem: https://stackoverflow.com/questions/11554015/syntax-sql-wher...

If you think I’m wrong, then what could an engineer be responsible for? Literally nothing ever?

comment 5y ago · link · parent

Of course they can change hands outside the ledger. We could create paper wallets and exchange them on the street and the blockchain isn't going to know that happened. A tumbler is just a more complex version of that.

Imagine this scenario: You have 10 BTC of illegal funds you'd like to launder. I, and 3 of my friends each have 5 BTC and they're all wanting to do the same.

I transfer some money into a new wallet from 2 of my friends and give it to you. Your money goes to me and 1 of my other friends.

This way the blockchain has no link between your source funds and the money that you received.

This is a simple example. If you split the money into random amounts and do this a few times with new wallets each time it can easily become untraceable.

comment 5y ago · link · parent

A well written Tumbler wouldn’t connect any of your money to your own wallets, it’s not hard to think how an algorithm would do this. Just keep an internal ledger and make sure the money doesn’t come back to the source.

Ross probably could’ve even made his own tumbler. Giving out his money to anyone that sends him some would be a naive way to think about it.

In terms of amount, I don’t think it would be hard with all the illicit activity on bitcoin to launder even this amount of money, but it’s not like he would need all of it right away.

Anyways, this is in response to “isn’t this a public ledger?” To which the answer is, “not if you make part of the ledger private—outside the blockchain—it isn’t.”

comment 5y ago · link · parent

I don’t understand either. It says private.sh can’t see your query but the “search provider” can, so that’s the other end.

What the heck is a search provider though?

EDIT: looks like it’s “gigablast”. I don’t understand why I just wouldn’t use that search engine directly?

comment 5y ago · link · parent

While it doesn’t make sense how a mistake like this could happen, I also don’t think this could be intentional either. I don’t see why anyone would throw their reputation into the gutter like that.

Imagine trying to explain this to a future employer.

comment 5y ago · link · parent

tumblers exist

comment 5y ago · link · parent

I used https://github.com/nekobato/deno-xml-parser which worked fine for my use-case. It's 1 TS file with no dependencies.

comment 5y ago · link · parent

Note that it’s unclear which regions this could be because this was only a string found when deconstructing the release.

comment 5y ago · link · parent

> If you so much as have a single @ts-ignore or "any" in your code base, then all bets are off on correct behavior.

I've been writing a ton of TS since 2016 and in most of those projects we've had liberal use of 'any' or even incorrect types (!). It's still far better than vanilla JS. The argument that "it doesn't work all the time therefore it's worse" makes no sense to me.

Ultimately the issues you're talking about make logical sense academically, but nobody has ever raised them as problems in the real world that I've ever encountered.

Full typing makes my job easy, but a little bit of typing is still better (in most cases) than no typing at all. There is an argument to be made about simplicity for small codebases, but those aren't the ones I'm talking about.

comment 5y ago · link · parent

I've been on teams building web applications for 14 years and not once have I seen someone simply rip out a query builder like this in production code and replace it with a non-parameterized string—let alone someone with 20+ years of experience.

Accidents and SQL injections happen, usually because of non-obvious query-building but this is a different level.

comment 5y ago · link · parent

Yes, and I'd argue this was beyond a simple "mistake", it's borderline negligence for anyone but a very junior engineer: https://archive.vn/oxbck

EDIT: that link isn't working, but here is a screenshot: https://imgur.com/4lyElZI

comment 5y ago · link · parent

The major flaw in your argument is that you can't do #2 with rent control in the picture. From the economist[0]:

> Rent controls are a textbook example of a well-intentioned policy that does not work. They deter the supply of good-quality rental housing. With rents capped, building new homes becomes less profitable. Even maintaining existing properties is discouraged because landlords see no return for their investment. Renters stay put in crumbling properties because controls often reset when tenants change. Who occupies housing ends up bearing little relation to who can make best use of it (ie, workers well-suited to local job opportunities). The mismatch reduces economy-wide productivity. The longer a tenant stays put, the bigger the disparity between the market rent and his payments, sharpening the incentive not to move.

[0] https://www.economist.com/leaders/2019/09/19/rent-control-wi...

comment 5y ago · link · parent

"I'd like to move out of my rent-controlled apartment in SF because my job is in Mountain View, but I don't want to walk away from this rate."

comment 5y ago · link · parent

assuming you meant

  let myColor: Color | undefined;
I don't understand what the problem is. Native JS would require you to define the starting scope of the variable (unless you're relying on global scope!).

Then you declare what the type is: Color or undefined. The state of the variable can be one of two things. Perhaps I've been writing TS for too long but I think I'm missing the problem here.

comment 5y ago · link · parent

that's an odd take considering the article is comparing JS/TS which have an identical amount of curly brackets
1
678
16