Hacker News new | past | comments | ask | show | jobs | submit | more soedirgo's comments login

Hard to talk about code comments without mentioning 'antirez's article [0] about this where he goes in depth on the different kinds of comments he used throughout Redis.

[0] http://antirez.com/news/124


Are you referring to snapshot testing[0][1]? i.e. you first "snapshot" the output of the function and commit it to VC, and each test run will run the same input and compare it against the "snapshot", failing and giving a diff if it differs.

I'm about to try it soon, seems like a good ROI as you said.

[0] https://jestjs.io/docs/en/22.x/snapshot-testing [1] https://github.com/mitsuhiko/insta


I think I am! Through convergent evolution at least - I hadn't found essays explicitly advocating it at the time.

My use case was comparing results from chains of Spark RDD & Dataframe transformations, so having fairly large realistc input/output datasets was part of the game, and the main reason that manually writing all expected results wasn't feasible.


Since we're in pedanticville, these aren't converses, but inverses. The converse goes "If you don't outsource X, then X is your core business".


I agree with this statement also. By writing code to do JSON parsing, JSON parsing is now part of your business.


Thanks, you are right. A converse is logically equivalent to an inverse, so I'm only half wrong. =)


Ah, yes, everyone knows the three values of Boolean logic...


true, false and null


Actually it's True, False, and FileNotFound. :o)

https://thedailywtf.com/articles/What_Is_Truth_0x3f_


True, False, Null and OffByOne


Hey folks, this is my internship project at Supabase, which you may have heard from its HN thread that got popular recently. We lean heavily on PostgREST, which is a Haskell tool (a wildly successful one!) that turns a Postgres database into a RESTful API.

We use PostgREST through our own client library as it's much easier to use. But it's in JavaScript, and I'm part of the Rust Evangelism Strikeforce myself, and the rest is history. ;)


There's also one for JavaScript: https://github.com/supabase/postgrest-js


It's the transpose operation [1]. See property 3.

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


Yarn 2 uses Prolog for workspace constraints.

https://dev.to/arcanis/introducing-yarn-2-4eh1#workspace-con...


I don't know how many people FB actually allocates for their main app, but this reminds me of a chapter in The Mythical Man-Month. It is said over 1000 people and 5000 man-years went into OS/360. I don't see it anywhere today.

Instead, the book proposes The Surgical Team, i.e. about 10 people taking specialized roles, with the system being the product of the mind of a few key people. I wonder how well this aged.


Fred Brooks was accurate about most things, yeah. It's hard not to envy him; he got to work with (and write a book with) Ken Iverson. Can you imagine? People back then really had all the luck!

...at least as far as computers go, anyway.


In Go, there's a standard project layout [1]. It'd be nice to have a project layout linter in Go Report Card [2].

[1]: https://github.com/golang-standards/project-layout

[2]: https://goreportcard.com


Just to clarify, that’s not an official standard at all (i.e: not supported by the go team). It’s a community project to establish some common layout.

Surely valuable, but to say it is actually a Go standard is misleading IMHO.


Ah! I stand corrected. Mea culpa.


  ;;; -*- lexical-binding: t -*-
isn't present until Emacs 24. After all these years.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: