Better HN
topnewbestaskshowjobs
Log inSign up

oftenwrong

15,025 karma · joined Apr 22, 2012 (14y ago) · 2,479 submissions

sfir6i2z@mailer.me
Submissions

541.

The Screenreaderizer(vasilisvg.github.io ↗)

1 points · by oftenwrong · 5y ago · discuss

542.

The Dangerous Rise of the Supersized Pickup Truck(bloomberg.com ↗)

4 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

I find that documentation doesn't help if it isn't conveniently where you need it to be. Don't just put everything into the company wiki. It might be better to write that information into a code comment, a README, or a commit message.

comment 5y ago · link · parent

Regarding the thoughts on migrations, which I 100% agree with, one strategy for cutting down the steps in a migration is to make the application compatible with the schema both before and after the migration. This can either be done by checking the migration sequence number, or by detecting the actual schema change. Using the author's example, where the migration involves a transition from an old table to a new table, you would make the application able to read/write using any combination of the tables. Then you can run your migration and/or move data. Later on, clean up the conditionals in the application code.

---

And on a different topic:

The Java SQL/database library, jOOQ [1] comes with a code generator that allows you to generate Java classes corresponding to your schema. This is pretty cool because it enables type-safe query building. It's a bit like connecting Java's type system to the database's type system. I find this to be really useful for ensuring correctness.

And if you're taking the approach from the first half of my comment, you can generate code any versions of the schema you need in the application.

[1] https://www.jooq.org/ jOOQ is really cool for a lot of reasons. The code generator is just one piece of it. For example, it can be used to translate between different vendors' dialects.

comment 5y ago · link · parent

This is not as self-explanatory as you seem to think...

comment 5y ago · link · parent

A bunch of databases support XA transactions [1], or otherwise have generic support for 2PC that can be hooked up to an external transaction manager [2].

In theory, we could build support into most systems. It does seem like this idea has lost momentum, though. I am not sure why.

[1] https://en.wikipedia.org/wiki/X/Open_XA

[2] for example, https://www.postgresql.org/docs/13/sql-prepare-transaction.h...

547.

Mapped: Historical public transit systems vs. their modern equivalents(theguardian.com ↗)

1 points · by oftenwrong · 5y ago · discuss

548.

CoolClimate Maps: Average US Household Carbon Footprints(coolclimate.org ↗)

2 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

How about a checkbox?

[x] Mute microphone

(apparently HN doesn't permit the checkbox character)

comment 5y ago · link · parent

This is one of the benefits of Cognitive Complexity:

https://www.sonarsource.com/docs/CognitiveComplexity.pdf

>Switches

>A `switch` and all its cases combined incurs a single structural increment.

>Under Cyclomatic Complexity, a switch is treated as an analog to an `if-else if` chain. That is, each `case` in the `switch` causes an increment because it causes a branch in the mathematical model of the control flow.

>But from a maintainer’s point of view, a switch - which compares a single variable to an explicitly named set of literal values - is much easier to understand than an `if-else if` chain because the latter may make any number of comparisons, using any number of variables and values.

>In short, an `if-else if` chain must be read carefully, while a `switch` can often be taken in at a glance.

comment 5y ago · link · parent

You might be able to negotiate a lower rate for Cronhooks. Never hurts to ask.

comment 5y ago · link · parent

The author is an HN user:

https://news.ycombinator.com/user?id=danShumway

553.

git-subrepo: A Git Submodule Alternative(github.com ↗)

3 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

The main antipattern of smart fridge startups is building something that is not a must-have. Re-ordering milk automatically or inventorying the fridge from an app is more like a neat trick than something people actually need. It addresses a minor problem, and therefore does not inspire an expensive purchase or subscription fee. Even if a company absolutely nailed the functionality, I doubt many people would be willing to pay much for it.

comment 5y ago · link · parent

Auth0's GitHub account and documentation basically sold me when I was comparing auth services.

comment 5y ago · link · parent

It's no different than any other "build vs buy" decision. If you think you can provide your core offering AND implement complex authentication requirements half as well as a dedicated authentication-SaaS company, good luck. Businesses "buy" because it's the low-risk path.

comment 5y ago · link · parent

That's a bad wager to make. In B2B it's not unusual for small, under-resourced companies to have big customers that all require an integration with their own identity solutions.

558.

The Design Is the Implementation(danshumway.com ↗)

30 points · by oftenwrong · 5y ago · 2 comments

comment 5y ago · link · parent

It's disappointing the Flutter team members haven't addressed this justifiable concern about their big-picture strategy. I would really like to hear what they have to say on this.

560.

SoilGrids: A system for global digital soil mapping(soilgrids.org ↗)

1 points · by oftenwrong · 5y ago · discuss

comment 5y ago · link · parent

https://github.com/rothgar/awesome-tuis

comment 5y ago · link · parent

Relevant:

http://carlos.bueno.org/2010/09/paper-internet.html

https://www.lowtechmagazine.com/2019/03/printed-website.html

comment 5y ago · link · parent

Schemas are similar to databases in mysql. They serve as a namespace. In mysql you can have a database `foo` and a table `foo.bar`. In postgres you can have a schema `foo` and a table `foo.bar`. In postgres you can have multiple databases in a cluster, and multiple schemas within each of those databases.

comment 5y ago · link · parent

That's quite brilliant, actually!

comment 5y ago · link · parent

I don't blame YAML for Helm's approach. I'm also not anti-templating, but templating the DSL as a string, and manually setting the indentation level strikes me as a particularly hacky approach. Compare with something like https://jsonnet.org/ (no endorsement), which let's you do the same kind of substitution, but directly in the structure of the data.

comment 5y ago · link · parent

    {{ toYaml .Values.labels | indent 4 }}

    {{- include "grafana.labels" . | nindent 4 }}
Building data structures by piercing together strings like this is a bit questionable.

567.

Every Big Vehicle Should Look Like the Weird New USPS Truck(curbed.com ↗)

13 points · by oftenwrong · 5y ago · 1 comment

comment 5y ago · link · parent

>pizza and most (American) Chinese food; those kept reasonably well in insulated or even warmed bags.

I don't necessarily find those to be good examples. A pizza fresh from the oven will steam its delicate crispiness away in a box. The same applies to a fried dumpling.

On the other hand, a non-crisp dish like a vindaloo or a soup will arrive almost entirely unchanged.

When I order anything time-sensitive, I prefer to get it myself. That minimises the amount of time it is sitting (e.g. awaiting a driver). I like to arrive early, so I can take it away as soon as it leaves the kitchen.

569.

Fossil: Rebase Considered Harmful(fossil-scm.org ↗)

11 points · by oftenwrong · 5y ago · 4 comments

comment 5y ago · link · parent

Their site doesn't provide any opinion styling. Blame your client.
1
181920
83