HNHacker News
TopNewBestAskShowJobs

sratner

354 karma · joined July 17, 2007

YC Badge: 0xe4bad42969186ecba2eb7e70ef0ba8b8b7f7a82f
submissionscomments
sratner··on Google Hangouts temporarily won’t support phone/video calls on Firefox
This makes it sound like it was ever supported. The hangouts plugin has never worked in 64-bit Firefox on Windows.
sratner··on Why I Don’t Talk to Google Recruiters
This has worked quite well for me. I tend to ask one of two types of algorithm questions:

1. Pick a simple but relatively obscure data structure, something they are unlikely to have crammed the night before. I always start by asking the candidate if they are familiar with it; the answer is almost universally "no". I then pull out a wikipedia printout and a notepad, and spend 10 minutes explaining it to them, with diagrams. Once they are sure they have understood the basic operations, I ask them to implement one of these basic operation we just walked through. The amount of code here should be ~10 lines; keep on adding simplifying assumptions until it is.

2. Pick a fundamental data structure from a high-level language runtime, something you would use without thinking: python lists, javascript objects, that kind of thing. I emphasise that familiarity with said language is not required, and list some real-world properties and performance characteristics (access speed, iteration, ordering, mutation), as well as common and less-common use cases. I then ask the candidate how they think it is implemented under the hood (i.e., if you wanted these semantics in a language that didn't natively provide them, how would you do it?) I often don't have a full answer myself, so we brainstorm the requirements and implementations together; no code, just open-ended discussion. The best candidates have often emailed me afterwards, having looked up an actual open-source implementation.

sratner··on Callback Hell (2016)
This looks kinda like http://standardjs.com/, but not quite.
sratner··on GitLab Database Incident – Live Report
Additionally, I have taken up a habit of not abbreviating "production" and "staging", whenever possible. The fact that len("production") > len("staging") > len("dev") is a feature when you find yourself typing it into a terminal or db shell.
sratner··on Iranian MIT student goes home over break, denied return for spring semester
Are US natural citizens denied the ability to get a foreign citizenship?
sratner··on 2016 hottest year ever recorded – and scientists say human activity to blame
Here is one: http://sustainability.stackexchange.com/a/2736

tl;dr: upgrading to a newer car with better efficiency saves about 10% in lifetime carbon footprint, vs 25% that is used pre-purchase. This is ICE, but I would guess the manufacture and disposal footprint of an electric is even higher.

sratner··on Underscore is a keyword in Java 9, use this script to check your code (2015)
Neat, looks like newer versions detect and correct for it. TIL.
sratner··on Underscore is a keyword in Java 9, use this script to check your code (2015)
That's a fluke ;)

    $ node
    > _ = "hi"
    'hi'
    > _
    'hi'
    > foo = "bar"
    'bar'
    > _
    'bar'
(See mattnewton's reply for explanation.)
sratner··on Underscore is a keyword in Java 9, use this script to check your code (2015)
Interestingly, _ is already reserved in the node.js console, so you have to import lodash under a different name.
sratner··on H-1B Visas: U.S. Lawmaker Re-Introduces Bill to Tighten Rules
It is discriminated by city. Prevailing wage for the labour certification is a function of location, position, and level. I am assuming the article is just talking about raising the bottom end of the scale, but can't be sure - it is certainly light on details.
sratner··on Material Components Preview
For better or worse, there is reason behind the naming convention. It is known as BEM[1] -- block-element-modifier -- and I've seen quite a few design shops adopt it as standard.

[1]: http://getbem.com/naming/

sratner··on RethinkDB is shutting down
I currently pay someone else to host a rethinkdb cluster. I'd rather pay rethinkdb.com to do that, but they didn't offer.

I am sure they considered it and figured it wasn't a good model for them. It is unfortunate that I have (with much pleasure) used rethinkdb in several projects, yet haven't had a chance to pay them for a service that would be useful to me.

sratner··on The Moon Illusion, an Unsolved Mystery
It dismisses refraction because the size difference is not captured by a camera or other instruments.
sratner··on Proxy (YC S16) Is Digitizing Your Presence
You can set the detection range for your setup, or disable auto-unlock.
sratner··on Proxy (YC S16) Is Digitizing Your Presence
Can do either - hands-free, or require a second factor like screen unlock and manual tap. If your phone is stolen, the first thing you'd want to do is revoke your account authorization (via web or another device), just as you would to protect your email accounts and anything else sensitive. If you are more paranoid, remote wipe - many companies have that as a policy already.

We don't store credentials on the phone, and the tokens we issue for each interaction are short-lived.

sratner··on Proxy (YC S16) Is Digitizing Your Presence
We use a one-time token for each interaction. We don't use Bluetooth encryption, but the tokens are signed and cannot be replayed/transferred, so intercepting one is near-useless.
sratner··on Nova Credit (YC S16) Transfers Immigrant's Credit History Between Countries
I wish you guys were around a few years ago :-) It is a bit absurd how hard it was to even get a prepaid (!) phone plan when I arrived. A very welcome change.
sratner··on Google Duo, a simple 1-to-1 video calling app
Not for 64-bit it doesn't.
sratner··on Android N is Nougat
So was KitKat.
sratner··on I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA
Yes; in addition you might want to ask your accountant about FBAR and FATCA reporting requirements. Those usually kick in if the sum of maximum balances of your foreign holdings over the year exceeds 10k (including retirement and market accounts, and yes, this does apply if you move one dollar between ten thousand accounts over the course of the tax year).

Edit to add: As a US citizen you are required to pay taxes on worldwide income even while not living in the US. As a US tax resident, you are required to pay taxes on worldwide income only as long as you remain a US tax resident, i.e. you file a US tax return.

sratner··on I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA
You may find these resources useful:

http://eliasbizannes.com/blog/2012/07/how-to-become-a-full-t...

https://geoffmcqueen.com/2011/09/28/e-3-visa-for-australians...

Essentially, you elect a board that hires (and, importantly, can fire) you.

sratner··on Ask HN: What font do you use while programming?
Input Mono with settings:

    --asterisk=height
    --i=serifs_round
    --l=serifs_round
    --zero=slash
    --lineHeight=1.4
sratner··on Flexbox-layout: Flexbox for Android
Not very well, but you can start with [1] and explore the LayoutParams hierarchy from there.

[1] http://developer.android.com/guide/topics/ui/declaring-layou...

sratner··on Flexbox-layout: Flexbox for Android
The "layout_*" attributes are a bit special in that they are specified on an element, but are provided by the element's container. Rather than affecting the element and its children, such attributes affect the element's relationship with its container/siblings. So in this case, the attribute is "alignSelf", but it is defined and understood by FlexboxLayout rather than the TextView that specifies it.

Perhaps this isn't the best implementation of such namespacing (maybe they could've done something more with xmlns?) but I find the visual and semantic distinction useful when reading and writing layouts.

sratner··on A polyglot's guide to multiple dispatch – part 4
Really enjoyed this series. Previous parts:

https://news.ycombinator.com/item?id=11526923 [Intro, C++]

https://news.ycombinator.com/item?id=11541526 [Python]

https://news.ycombinator.com/item?id=11571451 [CLOS]

sratner··on Proposed JavaScript Standard Style
I thought so too at first, as those were the only things that disagreed with my previous style. However, I've been using "standard" for a bit now, and have to say that both of those decisions have really grown on me in light of ecma2015 features. Space after function name works well with generator functions and yield. Semicolon placement has become somewhat less consistent with the new object literal and class syntax and skipping them everywhere has saved me from constantly trying to remember whether I need one after a particular function or method definition.
sratner··on Czech Republic, seeking a snappier name, considers a change
But... Russians did invade your country.
sratner··on U.S. Drops California Case Against Apple After Accessing iPhone
> A good government is made up of active voters.

Another thing Australia has, besides IRV, is compulsory voting.

sratner··on Micropackages and Open Source Trust Scaling
I suspect you aren't seeing much discussion because those who have a reasonable process in place, and do not consider this situation to be as bad as everyone would have you believe, tend not to comment on it as much.

For the sake of discussion, here is my set of best practices.

I review libraries before adding them to my project. This involves skimming the code or reading it in its entirety if short, skimming the list of its dependencies, and making some quality judgements on liveliness, reliability, and maintainability in case I need to fix things myself. Note that length isn't a factor on its own, but may figure into some of these other estimates. I have on occasion pasted short modules directly into my code because I didn't think their recursive dependencies were justified.

I then pin the library version and all of its dependencies with npm-shrinkwrap.

Periodically, or when I need specific changes, I use npm-check to review updates. Here, I actually do look at all the changes since my pinned version, through a combination of change and commit logs. I make the call on whether the fixes and improvements outweigh the risk of updating; usually the changes are trivial and the answer is yes, so I update, shrinkwrap, skim the diff, done.

I prefer not to pull in dependencies at deploy time, since I don't need the headache of github or npm being down when I need to deploy, and production machines may not have external internet access, let alone toolchains for compiling binary modules. Npm-pack followed by npm-install of the tarball is your friend here, and gets you pretty close to 100% reproducible deploys and rollbacks.

This list intentionally has lots of judgement calls and few absolute rules. I don't follow all of them for all of my projects, but it is what I would consider a reasonable process for things that matter.

[edit: I should add that this only applies to end products which are actually deployed. For my modules, I try to keep dependency version ranges at defaults, and recommend others do the same. All this pinning and packing is really the responsibility of the last user in the chain, and from experience, you will make their life significantly more difficult if you pin your own module dependencies.]

sratner··on How to Pass a Programming Interview
Right; my "false" applies to the entire statement (if p then q).
← PreviousPage 3 of 5Next →