Recent submissions

Comment · 10 years ago
I've found it helpful to use relative numbering in normal mode and switch to absolute numbering in insert mode:

  set relativenumber nonumber
  autocmd InsertEnter * :set norelativenumber number
  autocmd InsertLeave * :set relativenumber  nonumber
IIRC this tip was from the Practical Vim book
Comment · 10 years ago
If you're getting more traffic than 1 request/s, it's less work to generate a static cached version on the cadence of ~1 second than to dynamically generate the content for each request.
Comment · 10 years ago
As developers, many of us work everyday on increasing page hits, creating more engaging user experiences. What are the ethical implications of this? At what point do we become responsible for users' addictive behavior?
Comment · 10 years ago
Comment · 11 years ago
Could this not also be used in the near future by, say, the LinkedIn app to identify "People You May Know"?
Comment · 11 years ago
This doesn't solve the problem where the parameters aren't checked at compile-time. Now, hopefully all your codepaths are tested so your builder doesn't throw exceptions in production.
Comment · 11 years ago
This is contrary to the OP's example, where he passes data and num to the constructor, which is how I've seen it used frequently. The Builder pattern is often recommended to "make code easier to read" and wouldn't be useful if many/most of those parameters were required.
Comment · 11 years ago
I used to be a fan of the Builder pattern (or Fluent Interface), but the ease of use for developers comes at the cost of no compile-time checking. Before, you just had to look up the constructor to see which parameters go where, with the benefit of type-checking. Now, you have to look up the Builder's methods to make sure you've filled in all required fields. The only case where I can actually advocate using Builders is when you have a mess of telescoping constructors.
Comment · 11 years ago
How do databases like MySQL store data efficiently for querying? It seems like something like protobuf would do well here, though you'd need to generate code for each dataset.
Comment · 11 years ago
I'm curious, what security measures are in place for human vote counters?
Comment · 11 years ago
Posting this from #! right now.

> Philip has mentioned that, since CrunchBang has been his project from the beginning, he would like to see the name separated from any derivative that succeeds it.

Not sure if the people responsible for this fork are aware

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton