HNHacker News
TopNewBestAskShowJobs

antoncohen

3,401 karma · joined December 8, 2010

Anton Cohen

Linux sysadmin

http://www.antoncohen.com/

submissionscomments
antoncohen··on Google Domains blocking all Gitbook URLS: post-mortem
Are they conflating domain registrars and DNS hosting? Did Google Domains block their domain at the registry level, like removing the NS records from roots? Or did they block is at the domain DNS level, like not resolving queries to Google nameservers for the domain?

I don't expect many startups or big companies use Google Domains for DNS hosting. AWS Route 53, Google Cloud DNS, or dedicated DNS hosting would be used for that. But I expect it is fairly common for startups to use Google Domains for domain registration.

antoncohen··on Police use of force policies can help to end police violence
This isn't true. Each year about 25% of people killed by cops in the US are Black, while Black people only make up 13% of the US population. The amount of people cops have killed has not decreased, at has stayed steady at about 1,100 for six years[1][2][3].

In addition to that, 20% of the people cops shoot at are unarmed[4][5].

[1] http://useofforceproject.org/

[2] https://www.washingtonpost.com/graphics/2019/national/police...

[3] https://www.theguardian.com/us-news/ng-interactive/2015/jun/...

[4] https://news.vice.com/en_us/article/xwvv3a/shot-by-cops

[5] https://news.vice.com/en_us/article/a3jjpa/nonfatal-police-s...

antoncohen··on What is the best and right way to open-source packages from a company monorepo?
A couple specific quotes that are relevant:

> If you are planning to regularly mirror the source from Google internal repos to public ones (or vice versa) Copybara provides workflows and tools for this.

https://opensource.google/docs/releasing/preparing/#tools

> Google-owned open source projects must be moved to third_party prior to being released under an open source license, even if Google owns 100% of the code, because the projects are expected to receive external contributions.

https://opensource.google/docs/thirdparty/

antoncohen··on Zero-day in Sign in with Apple
I think the write up is so short because the bug is so simple. Send a POST to appleid.apple.com with an email address of your choice, and get back an auth token for that user. Use the auth token to log-in as that user. It's that simple.
antoncohen··on CNN reporter arrested live on air while covering Minneapolis protests [video]
> Cops can hold you for some amount of time, generally around 24 hours without cause.

This isn't totally true, at least not for the casual use of "cause". Cops must have "reasonable suspicion"[1][2] to detain, during that detainment they can discover more information which creates "probable cause", and probable cause allows them to arrest.

My guess is they were arrested for what is commonly called "resisting arrest"[3]. The way resisting arrest laws are unfortunately written, obstructing an officer in their duty is enough, they don't have to actually be resisting arrest. Basically of the cops told the CNN crew to get off the street, and the crew didn't, that would be "resisting arrest".

Minnesota's law:

> obstructs, resists, or interferes with a peace officer while the officer is engaged in the performance of official duties

Note that they were arrested, you can hear an officer say they are under arrest, but they haven't been charged or convicted. I doubt they will be charged. It is up to the county district attorney to press charges (the same DA who isn't pressing charges against the officer who killed George Floyd).

The press in the US are usually given a lot of freedom, and are allowed to be in places that the police don't allow regular citizens (riots areas, wildfire areas, etc.).

[1] https://en.wikipedia.org/wiki/Reasonable_suspicion

[2] https://www.nolo.com/legal-encyclopedia/what-reasonable-susp...

[3] https://en.wikipedia.org/wiki/Resisting_arrest

antoncohen··on AudioMass – free, open source, web-based Audio and Waveform editor
I'd avoid WTFPL if you are serious about this as an open source project.

Google publishes their internal open source policy[1], i.e., what open source licenses can be used in Google software. I think it is a solid reference for what a good corporate open source policy is. It explains the reasoning, it isn't some crazy enterprise things that bans all open source (I've seen that), and it isn't some free-wheeling startup that allows everything with no scrutiny.

They ban the use of WTFPL code[2], and ban contributions to WTFPL code.

[1] https://opensource.google/docs/thirdparty/licenses/

[2] https://opensource.google/docs/thirdparty/licenses/#wtfpl-no...

antoncohen··on UFC files trademark for 'UFSEA' following satirical suggestion from John Oliver
The UFC does put on events in places without fighting regulations. For context, in most of the locations the UFC puts on events (fights) there are government regulation around combat sports, where a government commission sets the rules, and provides judges and referees.

When the UFC puts on events in unregulated locations they act as their own commission, following the rules of the Nevada commission or the rules of Association of Boxing Commissions (ABC). They hire experienced judges and licensed referees that would normally be used in regulated places like Nevada.

The UFC already contracts out to the United States Anti-Doping Agency (USADA) to do what is basically olympic level drug testing of all their athletes.

There are unified rules for MMA, set by the ABC. The UFC very much wants to be legit and legal, so "whatever they want" will be following established rules and regulations.

antoncohen··on Show HN: Simple-blogger – blog generated from GitHub project READMEs
I don't think so. This uses the GitHub API via browser side Javascript to auto generate a page, listing and rendering the READMEs in your recent repos. Plus listing and rendering the .md files in a special "blog-posts" repo.

This is similar to what some big companies do to render a projects page. A copied Twitter's[1][2] a while back when it was simpler[3][4].

[1] https://twitter.github.io/

[2] https://github.com/twitter/twitter.github.io

[3] http://antoncohen.github.io/

[4] https://github.com/antoncohen/antoncohen.github.io

antoncohen··on YouTube is deleting comments with two phrases that insult the CCP
The key thing here is that Ars Technica got YouTube to respond:

> "This appears to be an error in our enforcement systems and we are investigating," YouTube said.

antoncohen··on The US Army's earth-shaking, off-road land trains
There are a couple Australian TV shows about these trucks and truckers: Outback Truckers (on Netflix in the US) and MegaTruckers.
antoncohen··on What every software engineer should know about Apache Kafka
If you are on GCP I think the choice is simple, use Cloud Pub/Sub. Extremely simple, extremely reliable, extremely performant, fairly inexpensive, multi-region (global). No maintenance, no scaling, almost no tunables, it just works.

Google provides a Pub/Sub emulator for local development.

I don't really buy the vendor lock-in thing for Pub/Sub-like systems. The Cloud Pub/Sub usage pattern is basically the same as Kafka, you can have a library that abstracts away the differences. There are open source libraries that do that[1]. If you ever need to switch cloud providers, or want a messaging system to span cloud providers, you can switch without changing lots of code.

[1] https://github.com/google/go-cloud/tree/master/pubsub

antoncohen··on Five surfers drown in the Netherlands, getting into 'avalanche-like' sea foam
Surfers can't use traditional life jackets. Partly because of the bulkiness. But also because surfers typically need to be able to go under the water. The surface of the water when a wave breaks is very turbulent and powerful, and the white water is similar to the foam in this story -- too much air to float, too much water to breath. Surfers duck dive (or bail their boards) to get under the white water.

The same is true in a big barrels. If a surfer knows they won't make it, they will pin drop and try to get as deep into the water as possible. If they fall and stay on the surface of the water in a big barrel they will probably be swept over the falls and be driven down with crazy force.

The buoyancy of a traditional life jackets wouldn't be good for surfers.

What big wave surfers use is inflatable vests with CO2 cartridges[1][2]. They pull a tab to inflate, and another one to deflate. They have multiple CO2 cartridges, sometimes surfers will have to inflate to get to the surface, take a breath, deflate and dive back under water for the next wave, then inflate again, until a jet ski can rescue them.

But inflatable vests aren't a thing normal surfers need, they are only for big waves in deep water (Mavericks, Jaws, etc.).

There are also impact vests and wetsuits[3][4] that provide a more passive form of flotation, enough to raise an unconscious surfer to the surface. These are used in big waves, including ones in shallow water (Teahupoo, Pipeline).

[1] https://www.quiksilver.com/highline-pro-airlift-vest/

[2] https://www.patagonia.com/psi-vest-purchasing/

[3] https://www.patagonia.com/product/mens-yulex-impact-wetsuit-...

[4] https://buellsurf.com/collections/job-collection/products/rb...

antoncohen··on In Praise of AutoHotKey
The odd thing about that video is that Tom claims he uses Windows because 1) it is cheaper, and 2) it allows him to "bodge" (aka create quick hacks). And he explicitly dismissed Linux.

But his example, creating an emoji keyboard, would be far easier with Linux. And Linux is cheaper (in terms of money, not necessarily time). Someone in the YouTube comments actually posted how to do it in Linux, which is basically:

    xinput list
    xkbcomp $DISPLAY mapping.xkb
    vim mapping.xkb
    xkbcomp -i <id from xinput> mapping.xkb $DISPLAY
antoncohen··on Collision Course: a type of road junction that is dangerous for cyclists (2018)
On this intersection the cyclists that got hit were on the main road, meaning they wouldn't have to stop.

If a cyclist on the minor road had a clear view, slowed down down, and looked both ways, they wouldn't need to come to a complete stop. A cyclist treating a stop sign like a yield sign is pretty only endangering themselves. A motorist plowing through a yield sign that should be a stop sign, or plowing through a stop sign, that is dangerous to other people.

antoncohen··on Collision Course: a type of road junction that is dangerous for cyclists (2018)
As an American I find it very odd that they blame the angles of the roads for making it dangerous. Until recently that intersection had no stop signs. One road had a yield, meaning most of the time no one stops in any direction, on either road. That gets drivers in the habit of not stopping.

Maybe if varies by state, but I grew up in a rural area of California, but every intersection I can remember has had at least one road required to stop (either a two-way stop sign, four-way stop sign, or traffic lights).

I get that stop signs are nearly illegal in the UK and some other parts of Europe, but that is the problem. In the US a driver on the minor road has to stop, look both ways, then proceed. It is to much safer than the driver on the minor road getting in the habit of not stopping and just plowing through a road that has the right of way.

antoncohen··on Python 2 Is Dead
Python tried to pull a Perl 6 and failed. Python 3 was done as a flag day, a big breaking change you need to switch over to. Originally Python 3 and Python 2 lacked features that would make it possible to write code that is compatible with both versions (like `u"foo"` syntax). Slowly they added things to Python 2 and 3 to make it easier to slowly transition.

But it was still full of unnecessary breaking changes.

- The `print()` function is nice, but they could have left in the `print` statement for a transitional (deprecation) period. Or left the `print` statement in, and advise against its use.

- A lot of the incompatibilities are just stdlib modules being moved around unnecessarily. They could have made both import paths work for a transitional (deprecation) period. Or let the old paths continue to work forever, and just document usage of the new paths.

- All the new features in Python 3 (async, nice helper functions, etc.) are compatible with Python 2. They could have added them to Python 2.

The only true breaking change was unicode literal strings. But again, that could be handled with a slow transitional (deprecation) period. The Python 2 stdlib could have been made compatible with both types of strings (as nearly all third-party libraries have). And users could have been told to `from __future__ import unicode_literals` for a transitional (deprecation) period, to ensure their code is compatible before it becomes the default.

Basically Python 3 could have been a single hard breaking change (unicode literal strings), with a smooth transition. Instead they decided to make Python 2 and 3 diverge from each other, making it harder to do the transition.

antoncohen··on Paketo: Modular Buildpacks in Go
Some feedback on the page. I think I'm squarely in the target audience. I'm familiar with Heroku Buildpacks. I wrote my own tool to generically build projects by detecting languages, build tools, etc. I based the detection of Heroku Buildpacks. And I packaged the tool into builder images.

But reading this page, I can't tell what Paketo Buildpacks do, when I'd use them, or how I'd use them. Usage examples would probably help. Some clear call out of "You want to do X, we solve that".

For examples of why this page is hard to understand, see these sections:

- What are Buildpacks? - Basically says "CNCF Buildpacks are an evolution of buildpacks"

- What are Paketo Buildpacks? - Basically says "they use Cloud Native Buildpacks"

- Why Paketo Buildpacks? - Basically says "unlike other buildpacks, we are better buildpacks"

Even knowing what buildpacks are in general, and building container build automating for a living, I can't tell if I have a use for Paketo Buildpacks.

antoncohen··on Small business rescue earned banks $10B in fees
This article and the Bloomberg article[1] that is currently on the front page.

From this NPR article:

> We funded more than twice as many loans for smaller businesses than the rest of the firm's clients combined," the bank said in a statement to clients. "Each business worked separately on loans for its customers. Business Banking, Chase's bank for our smaller business customers, processed loan applications generally sequentially"

Note "Each business worked separately on loans" and "processed loan applications generally sequentially". They divide their consumers up into large business and small business groups, assigning dedicated staff to each group. There are far more small businesses, making the queue for small businesses much deeper. Even though there were more workers (staff) pulling from the small business queue, there weren't enough to make up for the discrepancy in queue depth.

From the Bloomberg article:

> More than 300,000 customers of JPMorgan’s business banking unit, which serves smaller firms, applied for loans through the Paycheck Protection Program

> By comparison, about 5,500 larger, and sometimes more sophisticated, customers of the commercial banking business applied for funding.

> The data reveal that, in the race to get a loan in the first-come, first-served program, larger businesses had a leg up over smaller ones -- even when applying through the same bank.

> its commercial bank, with fewer clients, was able to process applications faster, said a person familiar with the matter.

[1] https://outline.com/HacVTV

antoncohen··on Small business rescue earned banks $10B in fees
Lawsuits claim banks prioritized loans to large businesses. JPMorgan disputes those allegations, claiming it processed loans fairly. By fairly it means it put all the small business loans in one large FIFO queue, and all the large business loans in a separate much shorter FIFO queue. Effectively prioritizing large business loans.
antoncohen··on Apple engineer in need of OSS maintainers
California Labor Code section 2870[1] states:

> (a) Any provision in an employment agreement which provides that an employee shall assign, or offer to assign, any of his or her rights in an invention to his or her employer shall not apply to an invention that the employee developed entirely on his or her own time without using the employer’s equipment, supplies, facilities, or trade secret information except for those inventions that either:

> (1) Relate at the time of conception or reduction to practice of the invention to the employer’s business, or actual or demonstrably anticipated research or development of the employer; or

> (2) Result from any work performed by the employee for the employer.

> (b) To the extent a provision in an employment agreement purports to require an employee to assign an invention otherwise excluded from being required to be assigned under subdivision (a), the provision is against the public policy of this state and is unenforceable.

Large companies like Apple and Google get away with broad rules that effectively ban unapproved open source contributions because nearly every type of software can be said to "Relate at the time of conception or reduction to practice of the invention to the employer’s business, or actual or demonstrably anticipated research or development of the employer".

If you work at a small company in California, I suggest pushing back on any rules like that. At my current company the employment contract they initially sent me required me to notify them in writing every time I created any work I felt was protected by section 2870 (any personal open source, any music, any writing, anything that could have a copyright). I had that paragraph removed from the contract. The burden should be on the company to enforce their copyright ownership, and provide evidence of ownership, the burden shouldn't be on me.

[1] https://leginfo.legislature.ca.gov/faces/codes_displaySectio...

antoncohen··on Earthly – Makefile Meets Dockerfile
This essentially looks like a Makefile where the tasks (targets) are run inside Docker containers. That is useful, I've definitely written Makefiles where tasks run in containers, and I wish it was easier.

But does this actually replace Bazel? Without language specific rules, like knowledge of dependencies, can it build a full dependency graph? If I have a monorepo with many packages, can Earthly build only what needs to be built, and always build what needs to be built?

antoncohen··on Trello handed over my personal account to my previous company
Trello sent me this email today:

> Using a work email address with Trello

> At least one of the email addresses linked to your account belongs to an organization:

> <redacted>.com

> This usually means it's a work email. If this organization begins using Atlassian products while this email address is linked, your account could become managed by that organization, which means you could potentially lose access. If you don't use Trello for work, just select a non-organizational email.

In my case the "organization" is my personal domain. I'm guessing they classify any email address that isn't with a common free email provider to be a work email address.

antoncohen··on Show HN: Spatially aware group video calls from the browser
I think the idea is really great for private parties. Zoom and similar conferencing systems don't work well because either everyone is the same volume and it is just loud noise, or it mutes everyone but the loudest person, which kills lively conversations.

I really like the idea of being able to mingle, and "walk" around to chat with different groups, all at the same party.

antoncohen··on Show HN: Spatially aware group video calls from the browser
I agree. Even after approving the camera and mic, the way it was presented makes it seem like the camera is only going to be used for controlling the emoji. But that isn't the case, the camera video is shown to other people.

I feel like there shouldn't be a #public room. It is basically Chatroulette.

antoncohen··on Deprecating password authentication in GitHub API
The main way I've found this to be annoying is GitHub "Deploy Keys"[1]. They treat them similar to users, so you need a unique deploy key per repository. That is pretty annoying when trying to authenticate something like a CI server.

The main alternative is "Machine Users"[1], which are actually normal user accounts. That means they have the same policies as regular users, like mandated 2FA for an organization. And to manage them you have to log-in as that user. That makes it a pain for a team to manage a Machine User.

GitHub really needs to have Service Accounts that belong to an organization, and can be managed by admins of the organization (without having to log-in as the Service Account). The Service Accounts should be able to have SSH keys and API tokens associated with them.

[1] https://developer.github.com/v3/guides/managing-deploy-keys/

antoncohen··on Untangling microservices, or balancing complexity in distributed systems
Thank you. This is the core of it[1], IMO:

> Back in the day, we’d spin up a microservice that did one, small thing just like that. We had a bunch of small services built and maintained by one person. This was great for autonomy, iteration speed, learning and making devops a no-brainer. You could spin up a service anytime: but you’d be oncall for it.

> Now, as my area is maturing and it’s easier to look ahead, as we create new platforms, we’re doing far more thoughtful planning on new services. These services don’t just do one thing: they serve one business function. They are built and maintained by a team (5-10 engineers). They are more resilient and get far more investment development and maintenance-wise than some of those early microservceis.

[1] https://lobste.rs/s/mc3k1c/at_uber_we_re_moving_many_our

antoncohen··on Newly unemployed New Yorkers are being frustrated by 1970s-era technology
I think this depends on how it is maintained over time. If there are a collection of Java microservices maintained by dedicated team. And over time they upgrade from JDK 11 to JDK 13. Add features, fix bugs. Rewrite some services in Go. Then rewrite some in whatever the hot language is after Go. Then port to ARM. Then migrate from AWS to the next thing. And so on. If that is what they do, I think they will be fine. A dedicated team, constantly maintaining and evolving the system.

On the other hand, if they write the Java microservices now, running on JDK 11, on Intel x86-64, and then never touch it for 40 years. That will be like some COBOL+mainframe setup that no one knows how to fix, change, upgrade, redeploy, etc.

The tech companies using microservices generally have teams that constantly evolve their products, and over time they end up completely replacing services with new services, underlying infrastructure with new infrastructure, and so on. They will be fine with their Java microservices.

Governments that fund a project once and never touch it again, their technology will always be hard to maintain in 20+ years.

antoncohen··on How I lost control of our bank accounts to a phone scammer
True. The form also asks for SSN, DOB, address, phone number, etc.
antoncohen··on How I lost control of our bank accounts to a phone scammer
I'm going to correct myself. My family member didn't get scammed!

There is a government agency cold emailing people, telling them to fill out a form that that asks for Bank Name, Account Number, and Routing Number.

https://imgur.com/a/5loIfnW

Way to teach people to be safe.

At the same time the IRS is telling people to avoid scams by not clicking links in emails: https://www.irs.gov/newsroom/irs-issues-warning-about-corona...

antoncohen··on How I lost control of our bank accounts to a phone scammer
Yesterday a family member got scammed out of banking information in a COVID-19 related scam. These scams are rampant right now. I think it is worth warning family and friends that might be unaware.

Banks sometimes make it hard to do the right thing. Last year my bank called me, I didn't answer the unknown number and they left a message. The message had a phone number to call and a case number. I'm not going to call a number someone gives me, so I called the main number and asked to be transferred. After a few transfers to the wrong people, it eventually became clear they couldn't transfer me to this particular fraud department.

I physically went into a bank branch. A very nice banker there tried to call them for me, spent 20 minutes on hold and being transferred around. They were able to confirm the call was real, and what it was about. But the final conclusion was, there was no possible way to reach the person in this fraud department, they had to call me. We arranged a 1 hour window where they would call me and I'd be sure to answer the phone.

← PreviousPage 3 of 14Next →