Better HN
topnewbestaskshowjobs
Log inSign up

Merad

2,800 karma · joined Mar 14, 2015 (11y ago) · 772 submissions

Submissions

comment 4y ago · link · parent

I used to work at a company that had some LoB apps used on iPads in a manufacturing facility... if the user login failed and the first character of the password was upper case those apps would retry with it lower case.

comment 4y ago · link · parent

An unstart is a specific phenomenon where supersonic flow of air into the engine gets disrupted. It's very different from a compressor stall where the airflow _inside_ the engine is disrupted. Wikipedia has a pretty decent explanation: https://en.wikipedia.org/wiki/Unstart

comment 4y ago · link · parent

Even ignoring the fact that human euthanasia is illegal in most of the US, it's rarely that easy. Both of my paternal grandparents lived into their 90s but suffered from mental decline (different forms of dementia) and died as shells of their former selves. If you could have spoke to either of them at the end of their lives but with their full mental capacity, I suspect they would have said that they'd have preferred to die earlier rather than live through that decline... but in reality by the time anyone understood how severe their mental decline would become they were already well past the point that they could have consented to euthanasia.

In theory you could presumably have some kind of system where a person of sound mind could that said, in effect, "if my condition declines beyond _____ then I want to end it," but doing so would be an incredibly touchy subject even if euthanasia was legalized. Unfortunately there is a very real potential for such a directive to by abused by people motivated by greed (gimmie that inheritance) or who simply don't want to deal with an aging relative who needs more help but hasn't reached the point where their euthanasia directive should be triggered.

comment 4y ago · link · parent

Not to be an ass, but playing with css and html isn't programming. At all. It's making web pages. The web is so universal today that many people conflate "making web pages" and "programming". And there's nothing really wrong with that _if your goal is to learn to make web pages,_ but I'm pretty sure there are still more than a few people out there who want to solve problems with code, or just learn to code, with little or no interest in the web. Telling them to start with html + css is kind of like telling an aspiring painter that it's easy to start making sketches with a pencil and paper.

comment 4y ago · link · parent

> I'd like to ban all automatic, select-fire or semi-automatic firearms

You're looking to ban at least 75% of all guns in the US. It might even be more like 80-90%, but I'm too lazy to look for a source. How do you intend to accomplish that?

comment 4y ago · link · parent

Please don't waste everyone's time by asking questions if you're going to summarily dismiss any response you don't like.

comment 4y ago · link · parent

> Choosing to buy a gun should be thought of as one of the stupidest decisions the average person can make.

Yeah, we're not at that point. We aren't remotely close. Recently polling shows the country split almost 50/50 on support for stricter gun laws [0]. If we ever do reach the point where popular sentiment reflects your quote then you've _already_ won, and changing laws to ban guns isn't much more than an afterthought.

If somehow you managed to push through a gun ban before the country has changed, you're going to see a revolt. What do you do when police departments refuse to enforce the law? Probably entire state governments as well? Are you going to send in the army to go door to door confiscating guns? Assuming that the soldiers are willing to follow orders...

Barring a major flip in US culture - which doesn't appear to be remotely likely in the near future - the only possible outcome of a ban on guns is civil war. That isn't dramatic right wing propaganda. The right to bear arms is enshrined in the US constitution and upheld by the Supreme Court. You may not like the fact that it is, and you may not think that it should be _but it is_. If we reach the point where constitutional rights are meaningless then the entire US system of government has failed, and its demise won't be a pretty thing. I hope you're smart enough to realize that a US civil war in the modern era would be incredibly bad for everyone and would probably result in the deaths of millions.

0: https://news.gallup.com/poll/357317/stricter-gun-laws-less-p...

comment 4y ago · link · parent

When people bring up this I don't think they realize that there are already very few limits on what you can own in the US... if you have the money. There's nothing inherently illegal about owning fighters or tanks, for example [0] [1]. If you browse through [2] you'll find plenty of examples of fully functional civilian owned large caliber cannon and artillery. So if you want your jet or tank to be fully functional that's totally doable. Cannons larger than .50 caliber and any kind of explosive (exploding rounds, bombs, missiles) are perfectly legal, but they're classified as destructive devices that require ATF approval and $200 tax to purchase (that's $200 per bomb or projectile). Of course if you're in a position like Mr. Private Air Force in the first link, you can get to buy these things pretty freely without the tax or oversight.

As for needing more than 5 rounds for self defense, well, it's a bit tongue in cheek but I go along with this logic: https://www.reddit.com/r/liberalgunowners/comments/am4epf/en...

0: https://www.thedrive.com/the-war-zone/32869/this-man-owns-th...

1: https://www.hotcars.com/here-are-the-worlds-largest-private-...

2: https://www.forgottenweapons.com/category/artillery/

comment 4y ago · link · parent

> If you find yourself in a situation like the article, don't wait until someone died to deal with those things.

You may not have a choice in the matter. My own dad is 75, my mom passed away two years ago. I've tried several times to nudge him in the direction of dealing with some of his stuff, but he's not interested at all. He's not willing to part with any of mom's things because I think he feels like that would be some kind of betrayal of her memory. I hope he'll get better about that with time, but there are still plenty of things that are "his" that he doesn't want to let go of. We had a debate just a few weeks ago about a push mower that's been used maybe twice in the last decade. I told him that he should sell it or give it away while it can still be useful to someone, he insisted that he might need it someday. He won't... he has a riding mower and weed eater for maintaining his yard, and he's almost at the point where he can't use them. My parents weren't hoarders by any means, but they both grew up poor in the 1950s which left its mark on them, and living in the same home for nearly 50 years gives you the chance to accumulate a lot of stuff.

comment 4y ago · link · parent

I'm going to assume you aren't American, because it sounds like you're working off of some fairly skewed views of the country. The vast majority of gun owners are pretty much normal people who don't want to shoot anyone for any reason. The vast majority of HoA's are not overbearing or crazy. The Venn diagram of "crazy gun owners willing to shoot anyone on their property" and "over the top HoA's" is going to show essentially no overlap. The former almost always live in rural areas and the latter are usually found in upper class suburban neighborhoods.

comment 4y ago · link · parent

2 acres was the total farmland, they would rotate which areas they used so on any given year only 30-40% of it was actually growing crops. They never sold anything that I can recall, but they loved being able to give extras away. Both of them grew up in the 50s on farms in the south. They both saw their dad have to transition away from full time farming and get a day job, but in both of their families the farm remained a big source of supplemental income that involved the whole family. Interestingly both of them were the first in their family to go to college because they didn't want to be trapped in the rural farming life. I guess they were still pretty fond of it though because after they married they decided that their dream home was a small farm, which is where I grew up.

comment 4y ago · link · parent

100%. Growing up my parents were hardcore gardeners (arguably smalltime farmers) with about 2 acres of farmland and an additional 2 acres of fruit trees. We'd eat pretty heavily out of the garden from the late spring through the fall, and would have potatoes, apples, canned/frozen goods through much of the winter... but it was an enormous amount of work. In the spring and summer basically any time that it was viable to work in the garden on the weekends or in the evenings, we were out working in the garden.

comment 4y ago · link · parent

What type of workflow do you use where you regularly want to commit only some of your changes to a file? I honestly don't think I've ever had that need.

comment 4y ago · link · parent

I think the accuracy should be fine, cell phones typically have a GPS accuracy of 5-10 m. The problem is that you won't be able to rely on it. You probably won't have any GPS signal at all in an underground parking garage, and even in an above ground parking deck you will likely have poor or no signal due to being surrounded by steel and concrete.

comment 4y ago · link · parent

Flying a small plane like this really isn't all that hard as long as a) the weather is good, b) the plane itself is working normally, and c) you have a basic understanding of how the controls work. When people are learning to fly for their private pilot's license it's not terribly unusual for people to solo (be competent enough to fly alone) after 5-10 hours of instruction. Granted many people do take longer, but it's often because their instruction is very spread out. At typically > $150 per hour many people can only afford a few hours of lessons per month.

comment 4y ago · link · parent

Typically you want concurrency checks to be based on something managed by the database (rowversion and xmin being the go to options) rather than timestamps, because timestamps can lie. IME at least, last modified timestamps are usually more like a record of "has this record logically changed" rather than a literal "has the row been modified," so it's not unusual to have things like internal data operations that modify a row without setting the updated timestamp. The ETag header [0] is meant for carrying this info, but TBH I don't think I've ever actually seen it used. Most of the time resources that need concurrency checks end up carrying around a version property or something similar.

The back end really has to make the determination of what resources need protection from concurrent updates and enforce it, because of the above and because if you're going to let the client decide whether or not to participate in concurrency checks you really end up with no protection at all.

0: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ET...

comment 4y ago · link · parent

Nope, they're very different things. Database transactions protect you against data corruption if two commands try to modify the same row at the same time. Concurrency checks (which are arguably poorly named) prevent changes from being overwritten because someone attempts an update based on stale data.

Imagine that you're using an app to manage customer information. For whatever reason you need to update Jane Doe. You pull up her records and start to make the change, but then realize you're late for a meeting. Afterwards, you finish your changes but you notice that someone accidentally entered her name as lowercase ("doe"), so you correct it and save. Cool! Except it isn't cool, because while you were in your meeting she called in to change her name because she got married and is now Jane Smith. You just reverted her back to Jane Doe. If the app included concurrency checks, it would've used something like the SQL Server rowversion column type or the Postgres xmin system column to detect that Jane's data had been modified after you loaded her user record, and you'd have gotten an error prompting you to refresh the page and make your changes again.

It's one of those things that happens a lot more often than you might think in the real world, but yet it's rare enough (or not considered a major problem) so that many apps get away with ignoring it entirely.

comment 4y ago · link · parent

XML is too flexible for its own good. It's not hard to come up with a simple XML schema for basic data that's functionally equivalent to json, but there are probably a dozen different ways that you could structure the schema to achieve the same result. And of course with XML being XML, most people trying to make that "basic type" schema would probably end up throwing in extra metadata, events, or things of that nature.

comment 4y ago · link · parent

That's why I tend to prefer using PUT for idempotent updates... at least the semantics are (should be?) a little more clear. But if you really want to avoid users stomping on each other's changes you basically have to implement concurrency checks throughout your whole application.

comment 4y ago · link · parent

4-5 years ago (when the popularity of node was skyrocketing but es6 was still relatively new) I remember some people arguing passionately that it was good to maximize code reuse, i.e. better to pull in a package with one utility than to write 5 lines of code in your own application. I think it was mainly a symptom of the gaping holes in javascript's standard library... thankfully that attitude seems to have mostly died off.

comment 4y ago · link · parent

Good callout! Using verbiage like "sponsoredby" or "sponsorof" in the url could help clarify the relationship and make it read more literally, i.e. to answer "does marcus sponsor marc" you could use meta/users/marc/sponsoredby/marcus or meta/users/marcus/sponsorof/marc.

comment 4y ago · link · parent

I'm approaching 40 so I don't really disagree with you, but I do find it fascinating in its own way. I tried TikTok a couple years ago and deleted it after a week. I could tell that it was massaging my brain in the right ways to keep me scrolling and scrolling so that I ended up wasting tons of time in the app, and I didn't like it. The guy from TFA is essentially hijacking the algorithm to help break people free from the endless scrolling and time wasting that's encouraged by the algorithm. I assume he's benefiting from it, of course, but still it's an interesting commentary on the modern world that young people especially have to wade through.

comment 4y ago · link · parent

Like many things, it might be simple and intuitive _once you already know how it works_. Looking at it for the first time, my reaction was similar that of the GP. My $0.02: if the question is "using meta storage, does user marcus sponsor user marc?" I would propose a url like meta/users/{username}/sponsors/{username}, or meta/users/marc/sponsors/marcus. To me, at least, that url states a few things:

* meta/users/marc <- the user we're querying, and where we can get his info

* meta/users/marc/sponsors <- every user who is a sponsor of marc

* meta/users/marc/sponsors/marcus <- is marcus one of marc's sponsors?

Of course it wouldn't be a forum oriented towards developers if 10 users didn't hold a dozen conflicting opinions.

comment 4y ago · link · parent

I mean no offense, but this is insane. I have a cat that I love like it's my child, so I sympathize with where you're coming from, but come on. You're basically saying that people with legitimate medical conditions caused by your pet's presence should just suck it up because at least they aren't going to die. All so you can travel with your pet. Talk about a lack of empathy...

comment 4y ago · link · parent

I'd be willing to bet the "hit the countermeasures immediately" reflex was because they were landing. Low altitude, low speed, no ability to maneuver. If somebody was shooting at you in that situation the missile would be on you in seconds and countermeasures are the only chance you have.

In a more normal combat situation there's a lot more human judgement needed in the use of countermeasures. For example if a fighter locks you up and fires a missile from 50 km away and you fire chaff immediately you might temporarily disrupt their lock, but it's likely that the chaff will disperse and they'll be able to re-lock you before the missile gets anywhere close. You can't just fire them off continuously because it's a limited consumable.

comment 4y ago · link · parent

Unless you have supercruise capability (which only four fighters in the world have) flying supersonic consumes and enormous amount of fuel, so flying any distance at supersonic speeds pretty much requires aerial refueling. IIRC you also need special permission to fly supersonic in US airspace. If you're limited to subsonic speeds then there's really no advantage provided by a fighter. Private jets can fly at similar high subsonic speeds (0.9-0.95 mach or so) and are usually cheaper and more efficient to operate than fighter jets.

comment 4y ago · link · parent

Where are you getting the 2.5m figure from? The article you linked doesn't give a figure as far as I can see, but it says sediments have been found 4m above _current_ tide levels and that water went 29km inland in Scotland. Both of those figures seem to be at odds with a relatively small 2.5m tsunami (for comparison, the Fukashima earthquake produced a 15m tsunami).

comment 4y ago · link · parent

He has told people almost that exact thing. I recall an interview from about a decade ago where some asked RMS a question similar to the one the GP mentions, but their phrasing was more like, "I need to make money from software to feed my family." RMS' answer was that the interviewer's ability to feed their family was less important than free software.

RMS' heart is mostly in the right place, but he's a fanatic who is 100% out of touch with the real world.

comment 4y ago · link · parent

> Battery electric mowers can run forever with a single spare battery because the batteries charge faster than they're drained.

The problem with electric tools is that the battery life heavily depends what you're doing. I also have an Ego mower (the top model/largest battery as of 2020). The only way my battery might actually last the advertised hour (with a ~40 min charge time) is if I religiously mowed twice a week. I'm usually lucky to get 30 minutes of real world mowing, but sometimes it's less than half of that. I used to prefer mowing in the morning to avoid the heat, but any amount of moisture in the grass slaughters the battery life. Likewise if the grass is higher than normal, say goodbye to the battery life. All in all my electric mower is quite a bit inferior to a decent quality gas mower, but not inconvenient enough (so far) to push me to switch back.

comment 4y ago · link · parent

Neat idea, but it seems to me like a critical part of making a new language of any kind is documenting it so that others can learn it and use it. On that note, can anyone explain the syntax that seems to use pipes in a function declaration (i.e. every function in the readme example other than fib)?
1
111213
26