HNHacker News
TopNewBestAskShowJobs

wting

2,962 karma · joined June 20, 2012

io at williamting.com

https://github.com/wting

[ my public key: https://keybase.io/wting; my proof: https://keybase.io/wting/sigs/yTnPQ0DZR5vV9WRhYq8SP7V56pyKc3Z8fMQQE9cADBQ ]

submissionscomments
wting··on Project Fi by Google
For family plans T-Mobile's Simple Choice Plan beats Google Fi in most respects:

- No contract

- Unlimited domestic talk, intl talk from US to ~100 countries

- Competitive intl talk

- Unlimited domestic + intl text

- 2.5GB 4G LTE data

- Unlimited domestic + intl 2G data (128Kbps vs Google's 3G 256Kbps)

- Use any GSM phone, not just Nexus 6

- Phones purchased from T-Mobile come with Wi-Fi calling

Most of my family members portion is $30 / mo. Some higher bandwidth users pay $40 / mo for 4.5GB LTE and data rollover. Our family travels a lot in Asia, having unlimited data / text is really useful.

However Google Fi looks like it's really appealing for low usage, single individual plans.

wting··on YAPF – A formatter for Python files
FWIW, at Yelp we built and open sourced pre-commit (http://pre-commit.com/) that runs a bunch of hooks on git commits. One of the most commonly used hooks is `autopep8 -i` which will automatically formats code on commit.

As yapf documentation has pointed out, pep8 is vague about certain things (i.e. indention). Yelp prefers an indention style where multiple arguments are broken up 1 per line and has a pre-commit hook to automatically enforce that. yapf is also opinionated about indentation, preferring vertical alignment. I've run it on an open source project to illustrated the differences (YelpDent vs yapf indent):

     def remove_user_data(dryrun=False):
         if platform.system() == 'Darwin':
    -        data_home = os.path.join(
    -            os.path.expanduser('~'),
    -            'Library',
    -            'autojump')
    +        data_home = os.path.join(os.path.expanduser('~'), 'Library',
    +                                 'autojump')
        elif platform.system() == 'Windows':
            data_home = os.path.join(os.getenv('APPDATA'), 'autojump')
        else:
    -        data_home = os.getenv(
    -            'XDG_DATA_HOME',
    -            os.path.join(
    -                os.path.expanduser('~'),
    -                '.local',
    -                'share',
    -                'autojump'))
    +        data_home = os.getenv('XDG_DATA_HOME',
    +                              os.path.join(os.path.expanduser('~'), '.local',
    +                                           'share', 'autojump'))
wting··on Notes from Facebook's Developer Infrastructure at Scale F8 Talk
This sounds a lot like Steve Yegge's Grok:

http://bsumm.net/2012/08/11/steve-yegge-and-grok.html

It's unlikely that his version will ever be open sourced or usable outside of Google though.

wting··on On Secretly Terrible Engineers
That may have been the case for 2006 Google, not 2015 Google; there's ~18000 engineers now.

I helped a classmate who didn't understand basic programming concepts batting 1/20 in full time interviews before getting and accepting a Google offer.

That was when I realized how far Google's hiring standards have fallen.

wting··on Joyent Moves to Establish Node.js Foundation
GitHub's Pulse tab is a pretty good way to get a quick, high level comparison: http://i.imgur.com/zNWj776.png
wting··on The Parable of the Two Programmers (1985)
Related Hacker News comment: https://news.ycombinator.com/item?id=8941621

From 'Software Requirements & Specifications' [0], by Michael Jackson (not that Michael Jackson, and not the other one either), published in 1995, a parable [1]:

'What do you think?' he asked. He was asking me to tell him my impressions of his operation and his staff. 'Pretty good,' I said. 'You've got some good people there.' Program design courses are hard work; I was very tired; and staff evaluation consultancy is charged extra. Anyway, I knew he really wanted to tell me his own thoughts.

'What did you think of Fred?' he asked. 'We all think Fred is brilliant.' 'He's very clever,' I said. 'He's not very enthusiastic about methods, but he knows a lot about programming.' 'Yes,' said the DP Manager. He swiveled round in his chair to face a huge flowchart stuck to the wall: about five large sheets of line printer paper, maybe two hundred symbols, hundreds of connecting lines. 'Fred did that. It's the build-up of gross pay for our weekly payroll. No one else except Fred understands it.' His voice dropped to a reverent hush. 'Fred tells me that he's not sure he understands it himself.'

'Terrific,' I mumbled respectfully. I got the picture clearly. Fred as Frankenstein, Fred the brilliant creator of the uncontrollable monster flowchart. 'But what about Jane?' I said. 'I thought Jane was very good. She picked up the program design ideas very fast.'

'Yes,' said the DP Manager. 'Jane came to us with a great reputation. We thought she was going to be as brilliant as Fred. But she hasn't really proved herself yet. We've given her a few problems that we thought were going to be really tough, but when she finished it turned out they weren't really difficult at all. Most of them turned out pretty simple. She hasn't really proved herself yet -- if you see what I mean?'

I saw what he meant.

[0] http://www.amazon.co.uk/Requirements-Specifications-Software...

[1] http://www.win.tue.nl/~wstomv/quotes/software-requirements-s...

wting··on “What happens when you type Google.com into your browser and press enter?”
Could you expand into why you think this question is indicative of a workplace with "little-to-no learning" on the job?

I ask this question to new grad candidates with no expected answer in mind. The goal is to establish some level of technical competency and discover the candidates' interests. Do they talk about kernel, network, backend, frontend, etc?

The percentage of candidates who can spend more than 1 minute answering is abysmally low. If I get a curt response I'll follow up with relevant questions to the position they're applying for.

wting··on Would You Bet $100M on Your Pet Programming Language? (2007)
Yelp is a multi MLOC Python code base. AFAIK YouTube is slowly being ported from Python to Go.

There are plenty of other large codebases in dynamic languages:

  - Wikipedia and Facebook written in PHP
  - Twitter was originally written in RoR
To be honest, it's my personal opinion that good static languages (i.e. type inferenced) are better than dynamic languages. I believe it's situational compared to traditional static languages (e.g. Java, C++).
wting··on When in Go, do as Gophers do
You can embed metadata with sum types on a return object. You can then use the metadata programmatically to increase correctness, enhance readability, and reduce boilerplate. This blog post goes into more details:

http://fsharpforfunandprofit.com/posts/recipe-part2/#series-...

wting··on Permissions asked for by Uber Android app
This is not something new. I've had LinkedIn and Facebook do this with my personal contacts.

I use disposable emails for every site (www.spamgourmet.com). After installing LinkedIn and Facebook Android apps they started recommending adding old coworkers that I have 0 mutual friends / connections with.

wting··on The optional “else” in Python loops
Raymond Hettinger has suggested that instead of `else:` the keyword should have been called `nobreak:` which conveys intentions better.
wting··on Differences between Python 2.7.x and Python 3.x, with examples
> However, it is also possible - in contrast to generators - to iterate over those multiple times if needed, it is aonly not so efficient.

You can reuse a generator multiple times via itertools.tee():

https://docs.python.org/2/library/itertools.html#itertools.t...

wting··on Redesigning The World Cup 2014 Brazil
In American sports, the home team is always on the bottom. "New York playing at Dallas."

If what @surreal says in a sister comment is true, then they could do the same thing for FIFA.

wting··on Smashing Swift
A functor is a thing that can be mapped over. For example:

    map abs [-1, 2, 3] => [1, 2, 3]
Arrays are the simplest example, but it looks like an iterable. However functors retain shape whereas iterables don't. For example if we had a tree (represented visually):

    oak = -1
          / \
         2   3
If we used oak as an iterable, we would lose the structure of the tree:

    map abs iter(oak) => [1, 2, 3]
However if tree belongs to the functor typeclass (i.e. implements functor interface), then:

    map abs oak => 1
                  / \
                 2   3
The alternatives to functors are:

1. mutate the existing data structure

2. copy a new one and then mutate (two passes)

3. create a new one while mutating (one pass, increased complexity / bugs)

wting··on Founder Depression
> If you ask a founder how her startup is going, the answer is almost always some version of “Great!”

This is not founder-specific but a fairly typical American greeting. "How's it going?" "Pretty good, you?" "Not too bad, how 'bout the weather / sports team?"

By comparison, the next time someone initiates the standard greeting try responding with something out of the ordinary. "I'm having a difficult time with foo" or "My wife and I just did this". Breaking the pattern will result in a lot more meaningful conversations.

wting··on Priceline to Buy OpenTable in Deal Valued at $2.6 Billion
> Whoever wants to replace OpenTable needs to replace all of this at once. Not only that, they need to convince a restaurant to ditch practically their entire IT stack, retrain all of their employees in the new system, and do so without service or quality interruption.

Yelp acquired SeatMe[0] (front of house management) last year to expand into this market, and Yelp Reservations[1] was launched last month. These two products combined function as an OpenTable replacement.

Disclaimer: I work at Yelp.

[0] https://www.seatme.yelp.com/

[1] http://officialblog.yelp.com/2014/05/yelp-reservations-new-f...

wting··on Swift is not
Maybe Swift is in reference to developer speed.

From a PL / compiler standpoint it's pretty obvious that Swift is not going to match Objective C from a performance standpoint. That's why Apple used a micro benchmark comparing a static, compiled language vs a dynamic, interpreted language (Python) for marketing purposes.

> We can’t know exactly what’s going on behind the scenes, but my hunch is some of what we take for granted in Objective-C – the straight C scalar data types – are actually classes in Swift. And the more you rely on classes, the more Automatic Reference Counting is in there somewhere, retaining and releasing like there’s no tomorrow, often for no good reason.

If they switched from primitive types to classes for built-in types, that means vtables and an additional memory lookup per element access weakening caching and memory locality.

Creating a Swift int would involve instantiating a class, incrementing the ARC count, and storing data compared to only storing data for primitive types. That explains why appending Swift's Ints to an array is so much slower than NSNumber.

On a side note, this isn't as much of a problem with Java—despite everything being implemented with vtables—because of JIT and better CPU branch prediction.

Disclaimer: I have no Objective C / Swift experience.

wting··on OS X Yosemite
Thanks! I've tried finding a solution multiple times but I guess my Google-fu wasn't up to the task.
wting··on OS X Yosemite
My 15" rMBP running Mavericks randomly reboots on occasion, and to this day still requires me to manually disable / enable WiFi almost every time I open the lid.

Meanwhile Homebrew is a poor substitute for aptitude and PPAs, multi-monitor support is relatively poor (xmonad excels here), and the Apple keyboard is missing a bunch of keys I use on a regular basis.

wting··on HomeKit
That's happening in the auto industry. Many cars feature Apple integration while Google is leveraging Android:

http://www.theverge.com/2014/1/6/5279116/google-open-automot...

https://www.apple.com/ipod/car-integration/#mercedes

wting··on HomeKit
If you feel compelled to mention Google Hangouts, you should note that Google abandoned XMPP federation after 8 years (2005 - 2013) since other companies built walled gardens and leeched users instead.

http://www.zdnet.com/google-moves-away-from-the-xmpp-open-me...

https://en.wikipedia.org/wiki/Google_Talk

wting··on The Wrong Way to Treat Child Geniuses
I don't have the citations on hand, but someone looked into the breakthroughs scientists discovered in their 20's and those in later stages of their career.

The types of papers published from younger scientists (Einstein, Newton) were more abstract, while those published from the older generation were those that could only be realized from decades of hard work.

wting··on The Wrong Way to Treat Child Geniuses
> People complimented me on being smart, but smart isn't something you can control, so I learned tricks to maximize how smart I appeared. That included jumping in to anything that came naturally to me and avoiding anything else. I basically never learned to work at anything, to endure frustration, to sit with failure and get past it.

This is a pretty common mistake made by parents and teachers during child development:

http://nymag.com/news/features/27840/index1.html

wting··on The Wrong Way to Treat Child Geniuses
There are diminishing returns for being more than one or two standard deviations of intelligence above average IQ.
wting··on Why Ada isn't Popular (1998)
> I disagree strongly with exception versus error codes. It sounds reasonable until you look at what real programmers (the kind that isn't perfect) will do and how it affects production code.

I prefer option types or checked exceptions, but mentioned return codes because Go is making them popular again.

The most recent GnuTLS bug comes from an ignored return code:

http://blog.bro.org/2014/03/dissecting-gnutls-bug.html

wting··on Why Ada isn't Popular (1998)
Yeah, the wording kind of sucked there. It's better stated as, "Dynamic language users prefer to handle type errors at runtime or through testing instead of at compile time."
wting··on Why Ada isn't Popular (1998)
I like to categorize many features that lower initial difficulty as "deferred technical debt." There are type system features that ensure a higher degree of correctness, but it's not fun debugging compiler errors when you're trying to get something working.

For example, being forced to handle errors immediately via return codes or option types is not "fun". By comparison, exceptions act as a giant GOTO and no one blinks an eye.

Dynamic typing is also another form of deferred technical debt. It is preferable to handle type errors at runtime or through testing instead of at compile time. People who claim very few bugs are a result of type errors typically do not have experience with ADTs or stronger type systems than Java / C++ / C.[0]

> Most programmers think that getting run-time errors, and then using a debugger to find and fix those errors, is the normal way to program. They aren't aware that many of those errors can be detected by the compiler. And those that are aware, don't necessarily like that, because repairing bugs is challenging, and, well, sorta fun.

I don't think this attitude has changed in the past 16 years. People prefer to debug a run time stack rather than deal with compile errors, perhaps even more so with the rise of dynamic languages.

[0] Clojure community likes to argue that bugs arise from mutability more than type safety, but I don't have not experience to comment either way.

wting··on Don’t Believe Anyone Who Tells You Learning To Code Is Easy
> I can fix anyone's code, even when I've never used the language before [..]

You can jump into any codebase and solve core architectural problems like precise garbage collection, eventual consistency, or miscellaneous dead locks? I'm not making up contrived examples, these are some of the problems my friends and I are currently dealing with at work for different companies.

> I would only have a vague idea of how to do a integer => string conversion with base N without googling it. So am I shit? Am I suddenly a useless programmer because lazyjones only likes people who studied CS?

I've never had to do integer => string conversion until asked in an interview either and I still did it. It's not a difficult problem. Anyone with a basic understanding of division and string manipulation should be able to reason out a solution.

> You have picked an arbitrary, and extremely rare in the programming world, standard. No-one needs to write their own string handling routines any more.

I wrote my own C++ string library before std::string was introduced. I contribute to Rust which has its own string, big number, vector libraries and much more. The web site I work on gets >130M monthly uniques and we have extended Python's string, dictionary, iteration, and datetime modules because the standard library isn't enough.

> [Programming languages are] all pretty much the same after you've used 3 or 4.

Then you haven't used enough languages. Try functional programming via Haskell, or dependent typing via Coq, or concurrency via Erlang, or memory safety via Rust.

The world is a really big place. I know people infinitely smarter than me doing incredible things, and there are many more like them. Stop being limited by your own experiences.

wting··on The desktop and the developer
He prefers a tiling windows manager at the application level rather than within tmux.

People make a big deal out of tmux's split screens, but my workflow is much more flexible with xmonad and GNU screen (with the caveat that it requires more upfront).

wting··on Why I push for Python
If I had to overly generalize, programmers tend to fall into the "builder" and "curiosity" camps.

I grew up using a Borland C++ compiler that didn't list which line numbers were missing semi-colons. I didn't mind going over my code to find the missing semi-colon, but plenty of my classmates were frustrated. They weren't interested in how compilers worked, how code was parsed and debugging information was lost in the transition. They just wanted to build a game, a web site, something.

At college I had a difficult time with Scheme and looked down at it. Where's the manual memory management? The pointers? The for loops? Scheme abstracted away a lot of plumbing and let users focus on algorithms.

Nowadays I think Python is the ideal first language followed by C and Haskell. It's starting in the middle, and then moving towards opposite ends of the programming spectrum: systems and functional programming.

Some make the argument that CS students should be dedicated enough to plow through an introductory course taught in Java / C++. I think that's an elitist attitude. CS is not growing in popularity despite increased demand[0], and new students should be welcomed instead of facing artificial filtering measures like "dedication". At the same time, this is not a proposal to water down the major--just a plea to ease students in instead of kicking them off a cliff and hoping they can fly.

Edit: Another front page article (https://news.ycombinator.com/item?id=7760790) discusses this issue:

> One might also argue that these tools are simple enough once you learn to use them. I would only point out that, emperically, that bar is too high. Despite the clear benefits, the vast majority of the world was chosen to remain illiterate. Even tools for which there is a clear need (eg version control) have largely failed to make a dent. Clearly there is a need for a less hostile programming environment.

[0] http://www.itworld.com/big-data/418701/american-college-stud...

← PreviousPage 3 of 10Next →