HNHacker News
TopNewBestAskShowJobs

mrtbld

959 karma · joined December 1, 2011

submissionscomments
mrtbld··on Car has more than 1.2M km on it – and it's still going strong
The odometer most likely have not been replaced too
mrtbld··on I no longer build software
The person is not a maintainer of the project but the one who opened the issue.
mrtbld··on Researchers “see” through walls using ambient Wi-Fi signals and a smartphone
But without the wifi key it's gibberish and you can't recognize MAC addresses, right?
mrtbld··on Google's 20th Birthday
The US version is a bit different: https://www.google.com/doodles/googles-20th-birthday-us

The map on the doodle page is for the presented doodle only.

mrtbld··on Ask HN: Were you happy moving your API from REST to GraphQL?
How do you do caching with your GraphQL APIs ? I guess you can't leverage HTTP-level caching.
mrtbld··on Working with time in Postgres
Well I would use timestamptz, using user's timezone only to convert for display. Use cases for timestamp are very limited.

Just make sure you include a timezone info in string representations in your SQL queries. For example '2000-01-01T00:00:00Z' where Z stands for UTC. Otherwise that would insert a timestamp into a timestamptz column, in which case postgres uses local timezone setting for conversion, implicitly; this is not what you want.

See http://phili.pe/posts/timestamps-and-time-zones-in-postgresq...

Also you should use an equivalent type in you app, i.e. python datetime with tzinfo or JS Date. And beware of UTC offsets: they can't handle DST. Python pytz and JS moment-timezone provide DST-aware timezone info (which is built-in in postgres).

Edit: if you can rely on your users system time for display that's even better because you wouldn't have to explicitly deal with those DST-aware timezone info.

mrtbld··on Be Careful with UUID or GUID as Primary Keys
> Also any sane person would never sort random values.

I think sorting by a arbitrary, unique value as the last sorting dimension is useful to ensure you always get the same ordering when first dimensions are equal. For instance sorting users by (last_name, first_name, user_id) ensures homonymous users don't move around in the list from request to request.

This is quite a sane thing to do, don't you think?

mrtbld··on Working with time in Postgres
> Postgres has two types of timestamps. It has a generic timestamp and one with timezone embedded in it.

That's not correct, timestamptz doesn't have a timezone embedded in it. It's just that it's timezone-aware. A timestamptz corresponds to a universal point in time that have many human reprensentations, one for each timezone. psql uses the default timezone of the postgres instance to convert a timestamptz to a displayable string, so timestamptz are always displayed with a timezone, but that info does not come from the stored value.

Timestamptz needs timezone information only for operations that would give different results in different timezones, e.g. display as string, extract the day part, add a 1-month interval (DST info needed), etc. Comparing two timestamptz however doesn't require any timezone info.

The difference between timestamp and timestamptz is not about what they store, but about how they behave.

Edit: In my experience, this is not always obvious because postgres uses the default timezone of the instance whenever it needs such info with timestamptz operations. Using an explicit timezone often requires convoluted code.

mrtbld··on Python moved to GitHub
Perhaps because explicit is better than implicit.
mrtbld··on JavaScript GameBoy Advance Emulator
Link to code: https://github.com/jsemu/gba
mrtbld··on PHP: md5('240610708') == md5('QNKCDZO')
But beware, with strict comparison: 1 ≠ 1.0 (because int ≠ float).
mrtbld··on Reverse OCR
Perhaps this could lead to a new kind of captcha that only bots can solve. I doubt it would be efficient, though.
mrtbld··on 9m.no – Short URLs for the Unicode Age
> tounge-in-cheek

“tounge”, typo or some play-on-word I don't understand?

mrtbld··on My Ideas, My Boss’s Property
Try this: http://web.archive.org/web/20140414122508/http://mobile.nyti...
mrtbld··on Understanding IP, TCP, and HTTP
> There’s a misconception that restarting the (HTTP) request will fix the problem. That is not the case. Again, TCP will resend those packets that need resending on its own.

But that's not true if the connection is interrupted at the socket level, right?

For example, if the device switches from 3G to Wi-Fi, or from Wi-Fi to wire, then I believe, its hardware address changes, its IP address changes and the socket becomes stale. But the TCP connection, would it be closed right away or would it hang until some timeout? (And does it depend on the OS?)

mrtbld··on The descent to C
> Java throws away its type information when compiling to byte code, and then the JIT reconstructs the types at runtime

Is it a fictive analogy or is it actually how the Java VM behaves?

mrtbld··on An engineer's emergency kit business card
I think it is because of the Blogger's "Dynamic Views" template your blog uses. Maybe another (more classic) template would be better for cross-device compatibility.
mrtbld··on Simpsons in CSS
You're right. I know that CSS needs to be applied to a document; without a document there's nothing to be styled.

Still, to me saying that something is in "pure" CSS would imply that the HTML is not more complicated than e.g.:

  <div id=homer></div>
(I guess that making a drawing such as the ones in the OP using only one div would not be possible until browsers accept pseudo-elements to be defined on top of other pseudo-elements.)

I understand that by "pure" the author meant "without using images". But IMHO using dozens of empty div elements isn't "pure" CSS.

mrtbld··on Simpsons in CSS
While I appreciate the effort, claiming that is it "pure CSS" is not true. The page is made out of 235 divs, and divs are not CSS but HTML.
mrtbld··on Why the last 20% of work takes the same amount of time as the first 80%
How to measure a project's progress? If time is your metric, then the last 20% should be done in 20% of the total time. (And that's right, when the OP says she was 80% done, she actually was 50% done.)

If your metric is something else, what could it be? And perhaps it is not the best metric after all: a loading progress bar that goes quickly to 80% and then slows down (by a factor of 4) until the end may not be the best progress bar after all.

I guess that the difficulty is to get a precise idea of the time you need to finish something.

mrtbld··on Don't Comment Your Code - Write Better Code
That's right, and I think that was the point of the author:

> I may put a few words in a comment to explain why the code is doing what it's doing. If I find comments answering 'what' or 'how', I take that as an indicator that the code is not written well enough.

mrtbld··on Buttons with built-in loading indicators
Not on Firefox. It doesn't use the pseudo-class :focus{outline} for buttons' dotted line, but the pseudo-element ::-moz-focus-inner on which a border is applied.

Note that the dotted line appears inside the button, around the text, and not around the button like :focus{outline} would do.

mrtbld··on Buttons with built-in loading indicators
On Firefox, a dotted line appears around the button's text when it has focus (after click for instance). IMO, it ruins the nice clear style of the buttons.

You can remove it with the non-standard `button::-moz-focus-inner{border:0}`. Then you could define some style for `button:focus{...}` to help keyboard navigation.

mrtbld··on 3D Printing Vending Machine on the UC Berkeley Campus
This seems cool, but I was wondering: Why is it called "3D printing" machine and not "sculpting" machine?
mrtbld··on [dead]
(Pardon my french,) WTF is this followgen thing that breaks the browser's scrolling?

Here's the original page: http://www.wired.com/science/discoveries/news/2006/01/70015?...

mrtbld··on 'The Single Most Valuable Document In The History Of The World Wide Web'
> The basic concept of hyperlinking had an origin at least as far back as 1960 by Ted Nelson for Project Xanadu.

This reminds me of a quote from Tim Berners-Lee:

“Most of the technology involved in the web, like the hypertext, like the Internet, multifont text objects, had all been designed already. I just had to put them together.”

http://www.achievement.org/autodoc/page/ber1int-1

mrtbld··on Released my startup MVP Outpost, begging for feedback
I would add: “person to person services” → “person-to-person services”.
mrtbld··on This is what a DDoS attack looks like
He wanted to write "disclosure" I guess. (He's not a native English speaker.)
mrtbld··on Google Trends for Android Version Names
Trends for "gingerbread", "gingerbread android" and "gingerbread recipe": http://www.google.com/trends/explore#q=gingerbread%2C%20ging...
mrtbld··on Google Trends for Android Version Names
Oh, I see. And I have to admit, the comment you wanted to post is more humorous than mine!
Page 1 of 2Next →