HNHacker News
TopNewBestAskShowJobs

CodeAndCuffs

624 karma · joined August 8, 2017

submissionscomments
CodeAndCuffs··on AP stylebook new guidance avoids “assault rifle” as it “convey little meaning”
Per Wikipedia, "An assault rifle is a selective fire rifle that uses an intermediate cartridge and a detachable magazine"

Selective fire means it has a fire mode other than semi-automatic(one trigger pull fires 1 round), such as 2 or 3 round burst, or fully automatic.

The Assault Weapons Ban of 94 basically scored weapons based off of sometimes irrelevant features (e.g. pistol grips, bayonet mounts, telescoping stocks)

One popular work around these days is "AR-15 pistols", which have an AR-15 style lower and upper, but instead of buffer tube assembly being placed in the stock, it sticks out the read of the weapon. Some manufacturers make "arm braces" to "attach it to your forearm" that look a lot like stocks, but aren't, because that would make this a short barreled rifle.

As a cop, I had a Colt AR-15. This was not an assault rifle, as it was semi-auto only. If someone has an m2 50 caliber machine gun, that would not be an assault rifle, as the .50 is not considered an "intermediate cartridge". In the 90s, Colt made what appeared to be a smaller fully automatic M-16, which fired 9mm rounds. This was also not an assault rifle, because it fired pistol rounds, not considered intermediate cartridge. This weapon would be an assault carbine or a submachinegun.

The media use of the term 'Assault Rifle' has been a meme among firearms owners for years. This was a good call by the AP

CodeAndCuffs··on Origin of life theory involving RNA–protein hybrid gets new support
I'm skeptical of genetic theories constructed solely by a white supremacist [1]. A stopped clock is still right twice a day, but there's kind of a pattern of men who say "white people are superior and Jews are bad" also proposing other unfounded ideas in the name of "science".

Also he tried to get Jeffrey Epstein to fund this book. Neat.

[1]https://en.m.wikipedia.org/wiki/Jean-Fran%C3%A7ois_Gari%C3%A...

CodeAndCuffs··on Virginia police routinely use secret GPS pings to track people’s cell phones
Some Troopers have a Radar-detector detector (such as the VG-2).

There are Radar Detectors that have VG-2 (Radar detector detector) detectors on them.

I haven't heard of a radar detector detector detector detector. Such a thing would be pretty useless for a cop's intent and purposes.

CodeAndCuffs··on Virginia police routinely use secret GPS pings to track people’s cell phones
Reckless driving in VA is a class 1 misdemeanor. Punishable by confinement in jail for not more than twelve months and a fine of not more than $2,500, either or both.[1]

That said, many things are a class 1 misdemeanor. Usually reckless driving is a fine similar to that of speeding. I've seen judges with stances like "1 day in jail for every mph over X" where X is usually 90,95, or 100. I think the most I've ever heard of was like 3-5 days for 100mph+, and even that was served on weekends.

Well, I heard of one guy who was given 3 months for 76 in a 55 by a very old substitute judge, much to the defendant's, Trooper's, and clerk's shock. The Trooper made it a point talk to the defendant and inform he could talk to the court clerk about the appeal process. The defendant appealed it down to a fine of around $150.

[1]https://law.lis.virginia.gov/vacode/title18.2/chapter1/secti...

CodeAndCuffs··on Steam Deck reports are here
Steam and protondb really helps mitigate this. My Nvidia card that could run games well on Windows ran them acceptably on Ubuntu on steam. No extra setup or work, steam did it all. I believe via vulkan drivers and proton but I'm not 100% sure. And this was a few years ago
CodeAndCuffs··on Show HN: Koda, a typesafe functional toolkit for Python
x.map(f) doesnt mean "apply function f to each element in this list that we called x"

x.map(f) means "apply the function f to the value within x, where x is a container of some sort"

[].map(f) would do nothing, because there is nothing to pull out.

['adam', 'bill'].map(f) takes 'adam' out of the array, applies f to it, and puts it back in the array, then does the same with 'bill'.

Just(5).map(f) takes 5 out of the Maybe, applies f to it, and puts it back in

nothing.map(f) returns nothing.

So we can map functions to values in Arrays, map functions to values in Maybes and even map functions to values in Eithers. Each time the function doesnt care that the value is in a Maybe or an Array or an Either.

CodeAndCuffs··on Please make a dumb car
Same for our 2021 Mazda crossover. Lcd screen but no touch screen. Just a spin/tilt/press knob for media/settings. Climate control is a dedicated physical panel. It was a big selling point fornus
CodeAndCuffs··on The cost of cloud
Part of the issue I see overlooked is the cost of acquiring and losing physical assets. If you have an onsite data center and a meteor hits it, how bad off are you?

Disclaimer, I barely passed my aws associates cert and have 0 qualifications to weigh in on this subject with any authority. It's just a point I've seen glossed over before. Yeah your data center is cheaper to run, but is it cheaper to replace?

CodeAndCuffs··on What They Did to the Kids
Newton was an alchemist, but thats irrelevant to his claims regarding physics. If you have criticism of the article, this is a great place to put it, but an ad hominem doesn't help anyone.
CodeAndCuffs··on Anti-Patterns to Avoid in Lambda Based Apps
You've put one of my biggest frustrations into words very well. Someone trying to learn about serverless architecture is immediately going to run into the serverless framework which will often have nothing to do with what they're trying to accomplish.

Or trying to learn about the CLI (Command Line Interface or Common Language Infrastructure)

A group is trying to propose a standardized language for querying graph databases, ala SQL. They decided to call it Graph Query Language. This has nothing to do with the GQL spec, which itself has nothing to do with graph databases.

The biggest obstacles in this field really feel self erected sometimes.

CodeAndCuffs··on Reasons Truck Drivers Walk Out the Door [video]
I've worked at truck weight stations.

On multiple occasions we've had truckers come in to get their ticket for overweight trucks, and I've had to leave the room due to the smell.

We're not talking about, "Oh, I forgot to put on deodorant" or "we need to spray air freshener when they leave". It was "If I stay in here I'm going to start gagging".

Painting with a broad brush is bad. The vast majority of truckers were perfectly kind, clean, great people. But I don't think there is any demographic that I've interacted with that has had a higher percentage of offensive smells coming from them. So while I strongly disagree with the "No Truckers" rule, I can understand where the motivation could come from.

CodeAndCuffs··on Mister Rogers had a simple set of rules for talking to children (2018)
The Esquire article on Mr. Rogers, "Can you say Hero?"[1] is one of the best things I've ever read on the internet, and would highly recommend everyone to read.

1: (Esquire page is sign-in only, but I found a mirror) http://www.thedqtimes.com/pages/castpages/other/fredrogersca...

CodeAndCuffs··on Ask HN: Why is Confluence Wiki Search so bad?
The API for writing docs/content to confluence is the worst i've ever seen. You are expected to use their custom syntax which then gets converted again before rendering.

The docs for the POST content literally says to write what you want in confluences WYSIWYG, then do a GET API call to see what it should look like.

CodeAndCuffs··on Ask HN: Why is Confluence Wiki Search so bad?
IMO bitbucket is okay. Its UX for PRs is amazing, 1000x better than Githubs. Especially its side by side diff.

This concludes, and fully encompasses, everything good that I have to say about Atlassian products.

CodeAndCuffs··on Epiousios
God provided food to the Jews as they wandered the desert, after leaving Egypt. Manna, which was this magical bread-like substance, fell from heaven. The translation of Manna is basically "What is it?".

A huge amount fell. God told them to eat their fill, but don't save it. The hungry wanderers ate to their contentment, and some of them stored the left over manna in jars. That leftover manna was rotten and spoiled the next day, but God sent them more.

God could've dropped magical non-expiring bread. Instead he dropped preservative-free no-shelf-life bread, and told them to trust that he would provide for them.

I've always interpreted the "daily bread" as being a reference to the manna. It seemed like it was acknowledging that they need to trust God day-to-day. It's not a one time "Here is the solution to all future concerns", its a daily trust.

So I think the debate is, if one wants to have it, is the prayer saying "give us our bare minimum to survive" or "give us our plenty that comes with an implicit trust that the plenty will continue"

But its a weird concern to have IMO. Especially since Jesus likely never spoke the word epiousios at all, he probably said something in Aramaic or Hebrew or something. I'm also in the "This wasn't a literal 'say these words' guide, it was an example." Both instructions seem in line with the rest of what Jesus was teaching; be thankful and trust God.

CodeAndCuffs··on Hiring Developers: How to avoid the best
Leetcode measures nothing but your most basic understanding of a languages syntax, and your ability to memorize leetcode questions and common interview algorithms.

The only people to ever write a merge sort are either in/preparing for an interview, and John von Neumann.

If someone can fizzbuzz with a for loop, recursion, and a list comprehension, they probably know enough of that language to do your junior/mid-level job. If they get a problem they don't know, throw their hands in the air, slam their desk, and start crying, you may not want to work with them.

That should be the goal of interviews. Not flexing obscure language details or academics. You need to see if you can tolerate/enjoy working with this person, and how they handle a problem they don't understand. More time on the job is spent trying to figure out why this API isn't working, and discussing solutions, than writing sorting algorithms

CodeAndCuffs··on Jet Li rejected The Matrix as he didn’t want his kung fu moves recorded (2018)
I've trained on and off for the years. Probably only 100ish hours of mat time. I'd rolled with mainly white and blue belts, the occasional purple, and maybe 1 brown. Even with that, I understood that there are some serious levels to this.

Then last year I rolled with a black belt. It was like a different game. I'm a big dude, but I could not move this guy. It was like trying to move a car, it just rocked a little as he looked at me with amusement and pity. He did the same stuff I know, just better. And he knew what I was thinking before I knew it. He's got top half guard, and Im fighting for an underhook. As I think, "Ok, he cant choke me with 1 hand, he won't go for the brabo", he goes, "You know I can still sink this with 1 hand, right?".

He did, and he looked bored doing it.

CodeAndCuffs··on Drones may have attacked humans fully autonomously for the first time
The problem with mines is the indiscriminate murder. The mines can't be hacked, but they don't know the difference between an enemy soldier in $YEAR and a playing child in $YEAR+10
CodeAndCuffs··on Become Shell Literate
Cant we make this argument for any level of abstraction?

A lot of people start out with shells and end up being unable to understand how to construct a switch or adder in logic gates. A shell is a great tool but shouldn't be a crutch.

CodeAndCuffs··on Notes from a Flat Earth Conference
You may enjoy some of Pete Enns' books. Namely "The Bible Tells Me So", Which dives into biblical inaccuracy head first. It's not a "Oh well, if you apply some mental gymnast it's okay" book. It's "Here's a bunch of reasons inerrancy makes zero sense and here is why that's okay and doesn't mean God isn't real".
CodeAndCuffs··on OpenDyslexic: A Typeface for Dyslexia
It has, and I use, the mono version. Also, ive seen decent arguments in support of non monospace, as it makes typos of text that should be the same, but isn't, more aparrent when on adjacent lines. But I've been using mono for a while and never had an reason to try non-mono
CodeAndCuffs··on OpenDyslexic: A Typeface for Dyslexia
I was told I have dyslexia at a really young age. If so, it's really minor. I'll occasionally have to pause to remember which way a b goes versus a d. Sometimes I'll mix up in reading something like a license plate number.

This is all super anecdotal, but I've lost countless hours debugging stuff, only to find that ive called fidnAllDocs instead of findAllDocs. Even when looking for a typo in that specific variable, I'll miss it multiple times.

A while back I switched to open dyslexic in my terminal and editor. This issue has gone from every couple weeks to practically never.

Some people hate it, but it's definitely worth a shot

CodeAndCuffs··on Study of over 1m people finds association between lifespan and blood iron levels
Hey friend. You're 100% right for pointing out that this stuff is addressed in the paper. I think the sarcasm is a disservice to everyone, both you and the parent comment included. Further, he may not have had (or may not have) the time to fully analyze the paper, and may be asking if others are aware if that specific concern is addressed, which seems like a reasonable comment.
CodeAndCuffs··on Hack of 251 Law Enforcement Websites Exposes Personal Data of 700k Cops
There are 700000 cops in America. I can name maybe 200. I've personally worked with maybe 50. I investigated 1, and could find no evidence of crime, though he realistically was likely committing some.

Out of 700000 cops I guarantee some are the scum of the earth who should be locked away forever. I don't know where they are. I can't effect that

It's like getting mad at the manager or an applebee's in Chicago because the waiter spit in your food at an olive garden in Seattle.

CodeAndCuffs··on How Bad Antitrust Enforcers Kill People
Wasn't there a drug that all of Europe said was super safe, but the FDA held out on for years, and it ended up causing terrible birth defects?

It's easy to say that a group is unnecessarily cautious/reckless until that cautiousness/recklessness saves lives or kills people. Hindsight 20/20 and all.

CodeAndCuffs··on One billion Android devices at risk of hacking
I'm not super familiar with how Android does it's versioning, so I may be off base here.

The article mentions the S6 being vulnerable, but it had its last update 6 months ago. It also says versions below 7.0 are vulnerable, but the S6 supports 7.1. It also says the most vulnerable are phones from 2012.

I don't think it's unreasonable to say an 8 year old phone may have some security vulnerabilities. I personally don't know anyone with an 8 year old phone. I'm sure they exist, but I don't think this is an Android exclusive issue.

Further, Android is the defacto default OS for phones. Every shovelware burner sitting in a bin at the convenience store is running some version of Android. Saying "1 billion are vulernable" is surprising in that it's only 1 billion.

These include the phones that cops hack into by placing the phone in a machine that tries every pin combo between 0000 and 9999 until it unlocks.

CodeAndCuffs··on Aeropress – Why is a simple coffee maker such a hit?
Can't read it, but I do own an aeropess and you nailed it. Similar/better quality compared to a French press, but easier to clean. Costs like 30 bucks, comes with like 200 filters. Breaking it would require significant and directed effort.
CodeAndCuffs··on What to do if you’re stopped by the police
From your link:

"A common trope amongst police officers in the United States is the aphorism: "If you lie, you die." This is indicative of the essential need for trustworthiness in the job—police officers are society's observers, enforcers and professional witnesses—and a warning that any deliberate falsehood can undermine the officer's continued usefulness, resulting in termination. Such terminations have been judicially enforced.[20]"

I personally know of 3 cops who lost their job for dishonesty. It's not even stuff like planting drugs, but turning in fake tickets (court copies never submitted, just office copies).

Further, look up the Brady List. In everywhere I've worked, if you're on it, the Commonwealth's Attorney will not take your cases. Period. If your lawyer loses a case where the witness is a cop who has lied intentionally on record, you have a crappy lawyer or a terribly corrupt judge AND jury

CodeAndCuffs··on What to do if you’re stopped by the police
Former cop here: You're right on the first part.

Until you realize your friend left his gym bag with weed in it in your trunk. That looks bad man, and comes back on you. My best seizures came from consent searches. I've also had cars that I've stopped where I was darn sure they were moving something in it, but I didnt have PC, and I didn't have a dog nearby that I could get in reasonable time. I asked for consent, and got told "No" in no uncertain terms. They left on their merry way, and I still wonder sometimes if a compartment full of stolen guns was in that dang car.

Sometimes we have a reason to be suspicious, sometimes were just guessing. Just to account for confirmation bias, I'd ask for consent to search completely randomly. Sometimes I got it, spent 10 seconds searching, and was done. Sometimes I didn't and said have a nice day. Sometimes I got the consent and a stolen gun and some hard narcotics

There have been a few cases where we had enough PC to search a residence, and asked for consent. Each time it was an unusual circumstance (e.g. the roomate was selling drugs or wanted or something). Each time we were in and out in 10 minutes. If we had been told to get a warrant, we would've had to detain the home owner (which in this case means hang out with him in our car or in his yard, casually talking and killing time) while we go to get a warrant.

This means driving to the magistrates office 45 minutes away, writing the affidavit, waiting in line, doing the hearing, then driving back, maybe 2-3 hours total. If during that time the homeowner goes "Hey, screw this, just search it", we won't, as we don't want it to seem like coercion. Once consent is denied, we aren't going forward without a warrant.

So again, general rule, "Dont talk to the police, assert your rights". Except when maybe you should. If you come home and your spouse is missing and blood is everywhere, you are a suspect. Heck, at the beginning, you are probably THE suspect, but you may want to talk to the cops to help them figure out where your wife went. If the cops want to look in your house for a stolen gun that your shady roommate allegedly stole, it may be BS to just search your house, or they may just want to check that 1 room, get that stolen gun, and go.

CodeAndCuffs··on What to do if you’re stopped by the police
I believe that entering a plea doesn't count as testimony, thus isnt subject to perjury laws. Most of my cases were plea deals before trial, or were cases where the defendant did not testify. Saying "not guilty" also doesn't necessarily mean you didn't do anything, you may honestly believe at that point, and make the argument, that the thing you did was not illegal.
← PreviousPage 2 of 3Next →