Better HN
topnewbestaskshowjobs
Log inSign up

gregplaysguitar

67 karma · joined Sep 9, 2019 (7y ago) · 37 submissions

Submissions

comment 1y ago · link · parent

The fact that it is both the end of coding as we know it and also just another tool is essentially the point of the post. It doesn’t quite come through in the title.

comment 2y ago · link · parent

Author here - this kinda feels like a controversial take, because so much productivity advice seems to focus on blocking out distractions. I'm not sure that it is though? Every high-performer I've spoken to on our team and outside seems to work on similar principles. I think the key is balance - as with most things. Would love to hear your thoughts.

3.

Interrupt-driven engineering: Working on what matters at Aha(aha.io ↗)

5 points · by gregplaysguitar · 2y ago · 1 comment

comment 2y ago · link · parent

> supports but ignores type annotations

That’s how TS works too though - compilation just strips the types via babel etc, with type checking a separate process. You opt in file by file by switching .js to .ts

comment 3y ago · link · parent

That sounds like a query planner… but it’s fundamentally not really what dynamodb is about. Query planners are amazing but the tradeoff is unpredictable performance - dependent on traffic, data size etc. Dynamodb offers “predictable performance at any scale” precisely because it doesn’t offer this sort of abstraction.

comment 3y ago · link · parent

In New Zealand - most layoffs I’ve heard about have been US companies trimming offshore staff. At least one high profile local startup has laid people off though.

Speaking as a hiring manager it’s definitely been easier to find people since around mid 2022

comment 3y ago · link · parent

The author isn’t claiming that micromanaging is good - it’s not. But I wholeheartedly agree that it’s better than being absent. Good leaders create great things by caring about the small details and taking responsibility for them. It’s a fine line between that and micromanagement, but I guess one mark of a great leader is that they’re able to tread it

comment 3y ago · link · parent

We used to use pgtap extensively, but ended up removing it in favour of testing queries as part our regular nodejs application tests, via a db client - the ergomonics of the test tooling is far better, and I don't think we really lost anything.

comment 4y ago · link · parent

Out of interest are you deploying exactly the same software to each instance? Or are there customisations?

My work deploys an instance per customer, and I haven’t encountered the same problem, but they number in the tens at this stage so not at the same scale yet.

Would love to hear any dos or don’ts you’ve picked up, being further ahead in terms of scale!

comment 4y ago · link · parent

Sounds like a “surf” truck?

https://surfskate.love/surfskate-trucks/

comment 4y ago · link · parent

It tells you how difficult the rapid is to paddle - 1 being basically flat water, 5 generally the highest that can be paddled. This website explains it https://gopaddling.info/river-gradings-simple-guide/

comment 4y ago · link · parent

There’s a lot of value in keeping data in the same format everywhere. Why “munge” it into some other format if there’s no actual need?

comment 4y ago · link · parent

“Flexibility” isn’t why nosql patterns are useful - at least not in the sense of fewer constraints on your data.

Imagine you’re writing an editing interface of some sort with images, text blocks etc. Each is conceptually a “node” but have different attributes. A single node table with a column per attribute means redundant columns. A table per node type introduces other problems because you need to query all your nodes together. Basically however you model this you end up with tradeoffs and real apps can obviously get much more complex - next thing you have 50 tables and a complex query just to get the data out.

Contrast to the other extreme - storing the whole thing in a single hierarchical json document. There’s no restriction on the data shape, and you can just pass the whole thing around as json. Versioning becomes much simpler because you’re versioning a single document. Your export format is just the json.

There’s tradeoffs of course, and often a middle ground is the right approach - but json columns with validation definitely have their place.

comment 4y ago · link · parent

Check out migra[1] - it covers most of that. One notable omission is column-level grants though - as far as I know changes to those aren’t detected

[1] https://github.com/djrobstep/migra

comment 4y ago · link · parent

Neither have a positive return as far as the gambler/insuree is concerned, if they do, they casino/insurer will not stay in business for long!

The difference is that one has a potential huge upside, the other prevents a potential huge downside

comment 4y ago · link · parent

Not apocryphal :)

https://freakonomics.com/2013/10/what-makes-people-do-what-t...

comment 4y ago · link · parent

They mentioned that most of the services are on-demand pricing, that’s why it’s cheap for a personal instance. Production presumably costs much more due to much higher usage.

comment 4y ago · link · parent

fwiw plenty of overseas companies are hiring remotely in NZ these days, some explicitly eg atlassian, gitlab, but anecdotally, many others are willing to hire here even though their job ads say US only. This is pushing salaries up in a big way - not to parity, but a heck of a lot better than it used to be. Worth looking around if your salary hasn’t changed in a few years :)

comment 4y ago · link · parent

IMO the best way to use this is as a way to determine what’s changed between your canonical dB schema (well organised and easily understood DDL) and migrations (which are what gets deployed, but don’t work well as a dB reference). So you edit the schema, then use migra to generate a candidate migration for the changes which you review before deploying.

Tusker (mentioned in other comment) does it this way; my company has used the technique very successfully for several years via some lightweight tooling built around migra.

comment 4y ago · link · parent

We do get very occasional issues in our React app, but not enough to outweigh the benefits of things staying up to date.

comment 4y ago · link · parent

I used to do this before I discovered renovate [1] - now we spend time working on major upgrades but minor are generally automatic (assuming they pass tests)

[1]: https://github.com/renovatebot/renovate

comment 4y ago · link · parent

Ah ok, interesting - I haven't tried Aurora, my company uses a mixture of RDS postgres and Dynamo. Cockroachdb and Yugabyte also seem like good options but a harder sell for us not being AWS native.

More generally though, all of these "newsql" offerings feel a little too good to be true for me, I can't see how you could really have all the relational integrity of postgres with the elastic scalability of a distributed DB without trading something off. Am I too cynical?

comment 4y ago · link · parent

Out of interest, have you considered moving to a "serverless" db like Aurora Postgres or even DynamoDb, to avoid the cost of unused database capacity at idle times?

comment 4y ago · link · parent

I’ve heard lots of people claim that yarn gives no advantage over npm anymore, as of a year or two ago. But in 5 or so years of using yarn every day, on numerous projects, I’ve probably nuked node modules a couple of times, and never even considered deleting yarn.lock. Maybe yarn is still superior in this regard?

comment 4y ago · link · parent

I heard an interesting comment recently from Derek Collison (creator of NATS[1]) that durability and delivery requirements can have the unwanted side-effect that one consumer can adversely impact all the others. It didn’t immediately make sense then, but this seems like a succinct illustration of the point!

[1] https://NATS.io

comment 4y ago · link · parent

Just noting that Graphile also uses transactions - that’s a given for this sort of tool I’d say.

comment 5y ago · link · parent

> write _all_ your tests without ever having to truncate/delete tables between tests

This is exactly what we do, and it works really well. We essentially spin up a new tenant for each test suite. Forcing all tests to pass regardless of what other unrelated data is in the db is a great way to ensure cross-tenant data isolation.

The other underrated benefit is that you don't need a separate test database for local development - local dev instance and tests can use the same db. This means you can work on db changes in one place and see their impact on both tests and the running application.

comment 6y ago · link · parent

The idea of a grand coalition _seems_ odd, because I think we’re all accustomed to our major political parties fighting rather than cooperating, but if they can work together isn’t that a rejection of extremism on both sides and an embrace of centrism, which, perhaps, is what the German majority actually want? I know very little about German politics so I’m just asking the question here - but I’m genuinely curious, what’s the downside?

comment 6y ago · link · parent

The current New Zealand government is the first in 26 years of MMP where a party gained a majority alone. The previous was made up of 3 very different minority parties. In every other election, the largest has sought the support of smaller parties to govern. I can’t speak for other countries, but MMP has not lead to instability here.

comment 6y ago · link · parent

Looks like an interesting and potentially useful tool! I periodically use schemaspy to generate an ERD but have often thought it would be great to do this as part of our CI process, so we have an always up-to-date diagram to refer to.

One suggestion, you should remove the footer on your landing page if all the links just point to `#`...

12