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 Stop working so hard
You can artificially create this limitation without having a child.

If you make arrangements at 7pm (e.g. dinner or sports), it forces you to finish everything during the work day so you can go out at night. This deadline can create an artificial sense of urgency to be more productive at work.

wting··on Stackoverflow rolls out "Chat with an expert"
Flask started out as an April Fool's joke that eventually became a real product, there's no reason why the same can't happen with this.

https://en.wikipedia.org/wiki/Flask_(programming)#History

wting··on Trying something new with Github. Help make my US holiday awesome?
Without knowing you personally, it's hard to suggest things to do. I would suggest you check out wikitravel.org. I found it a great guide when I was backpacking through Europe.

http://en.wikivoyage.org/wiki/San_Francisco

Edit: Switched to wikivoyage due to comments below.

wting··on Bitcoin Hits $1 Billion
Right now there seems to be about 15M transactions total.

Number of Transactions

https://blockchain.info/charts/n-transactions-total

Transactions / Day:

https://blockchain.info/charts/n-transactions

Trade:Transaction Ratio:

https://blockchain.info/charts/tx-trade-ratio?showDataPoints...

wting··on Why You Make Less Money
There was a study on how real estate agents sell clients' houses vs their own. On average, agents will keep their own properties on the market ~10 days longer.[0]

If a client's house sells for $310k vs $300k, that's an extra ~$10k for the client. On the other hand, spending the additional time negotiating only nets the agent $300.[1]

Typically agents will sell additional houses rather than negotiate prices on sure sales. However their behavior changes when selling their own houses.

---

[0]: From Freakonomics as mentioned by vitalique and roel_v below.

[1]: Real estate agent fees are typically 6%, equally split between buyer / seller agents.

wting··on Godit - A very religious text editor written in Go
`gofmt` uses tabs, and is one of the few languages where it is idiomatic to use tabs rather than spaces.
wting··on Show HN: My side project – Do I need a visa for...?
Well you could follow the link they have to the DC Chinese Embassy: http://www.china-embassy.org/eng/visas/
wting··on Show HN: My side project – Do I need a visa for...?
http://travel.state.gov/travel/cis_pa_tw/cis/cis_1089.html#e...
wting··on Show HN: My side project – Do I need a visa for...?
I don't understand the presentation.

Allow the user to choose nationality from a drop down box, then show a world map colored various ways:

- green no visa

- blue for easy to obtain visas

- red for difficult to obtain visas

On a side note, it should probably be "United States citizen" and not "US". Also, US -> China is a very common route that requires a visiting / mailing your passport to a Chinese embassy to obtain a visa that you should probably have listed.

wting··on Ask HN: Have you been in a company with transparent salaries? Good?
This is a form of price anchoring.[0] By representing salaries as a fraction of CEO income, it makes all employees evaluate their worth relative to the CEO.

On the other hand, representing the CEO's income as a multiplier of the company's average income is standardized and represents a company-oriented view.[1][2]

[0]: https://en.wikipedia.org/wiki/Anchoring

[1]: https://en.wikipedia.org/wiki/Executive_pay#United_States

[2]: http://www.shrm.org/hrdisciplines/compensation/articles/page...

wting··on Ask HN: Have you been in a company with transparent salaries? Good?
This is a common view held by engineers. Engineers believe in meritocracy and thinks the market behaves the same way. "Build a great product and the customers will come."

Unfortunately this is consistently disproven in the market. Many technically better products do worse than competitors on the marketplace.

Marketing and sales has a significant impact on products' success. The average customer usually does not spend very much time evaluating alternatives based on technical merits.

wting··on Ask HN: Does anyone know what's going on at Coinbase?
Madoff is a straw man; he committed fraud.
wting··on Ask HN: Does anyone know what's going on at Coinbase?
If you can't afford to lose your investment, you shouldn't be investing at all.

Scared money is essentially lost money if you can't make rational decisions without being influenced by fear.

As for #2, that can be solved through self education. Why use an investment vehicle that you don't understand?

wting··on How is an ATM secure?
This happened at a Walgreen's nearby here in Austin.

There is an ATM just inside the doors and the storefront didn't have concrete poles out front. One early morning a pickup truck just reversed into the store, chained up the ATM and dragged it away.

There are concrete barriers up now.

wting··on I’m done with the web
Your (lack of) use of Google Now is unrelated to the difficulty of the problem.

Predictive analytics is an interesting engineering challenge, and is probably what appeals to the author. On the other hand, re-solving the same web problems repeatedly is not.

wting··on Just Use Sublime Text
Hooray, another tools discussion where nothing gets resolved.

Tools are a highly personal topic, what works for one person doesn't necessarily work for another.

My advice is to try using one and only one new tool a week. By the end of a month you'll have a good idea of what your own preferences are and the relative strengths/weaknesses of others.

With editors, that'd probably be a gamut of vim, emacs, Sublime, Eclipse, and Visual Studio Express. If you're a Java developer, IntelliJ is worth looking at.

> [...] I’m going to go search for how to do it. I’m probably going to learn something in the process. At year 4 of Vimming.

I don't get why this is a bad thing. I've been programming for decades and still learn new stuff every week.

It should be noted that vim and emacs definitely appeals more to the maximizer over satisficer personality:

https://en.wikipedia.org/wiki/The_Paradox_of_Choice:_Why_Mor...

wting··on Async I/O for Python 3
AFAIK, all PyCon 2013 talks were recorded and are being processed. Once they're finished the videos will be uploaded here:

http://pyvideo.org/category/33/pycon-us-2013

wting··on Google I/O is sold out
Unfortunately Google I/O has become a "why not" conference. I would love to go to Google I/O at current prices even if they did not offer any swag. Unfortunately that doesn't seem apply to most people trying to get a ticket. They really should get rid of the swag and/or add random programming challenges during the registration process.

I was able to reserve a ticket only to time out trying to pay with Google Wallet: http://i.imgur.com/vSCppd8.png

The problem is Google I/O is used to launch new products and hold tech talks. There's a lot of overlap of people who are interested in both, but now the audience has grown too big.

This was the same problem GDC was having a while back--too many attendees weren't interested in the game developing but were there to check out new games. Making GDC developers-only and creating PAX for product announcements was a great way to handle the issue.

wting··on Why Haskell Is Worth Learning
University of Texas at Austin teaches Haskell to 2nd year students in a required course: CS 337 - Theory in Programming Practice.

Programming Languages is also taught in Haskell, but it's an optional course and languages varies by professor.

wting··on 104-Year-Old Woman Forced to Lie about Her Age on Facebook
"Be liberal in what you accept, and conservative in what you send."

- Postel's Law

wting··on Why Python, Ruby, and Javascript are Slow
I have a few comments about some of the slides, feel free to correct any misunderstandings.

Dictionary vs Object:

Lookups in both data structures is O(1), the difference being the hashing cost (and an additional memory lookup for heap) vs a single memory lookup on the stack (1 line of assembly).

Squares list:

> ... so every iteration through the list we have the potential need to size the list and copy all the data.

This is no different than stl::vector which has an amortized cost of O(1) for a push_back().

It's not going to be as fast as C, but I'd also argue for a generator version instead:

    def squares(n):
        return (i*i for i in xrange(n))
One of the main reasons people choose Python is for expressiveness and not manually managing memory, although pre-allocation does seem like a good idea.
wting··on Bypassing Google’s Two-Factor Authentication
Multi-factor authentication means choosing from:

1. something you know (password)

2. something you have (phone, yubikey)

3. something you are (biometrics)

With Google's two-factor, logging in requires something you know (password) and something you have (phone). The 10 passwords should be locked somewhere physically safe as a fail-safe.

Two-factor authentication protects against password leaks and brute force password attacks.[0] It now takes two security failures to access your account rather than one.

On a side note, this is why secret questions are worthless as a security measure. Backing up a password with another mental fact is still single factor authentication.

[0]: Unless the attackers were able to attain your fail-safe passwords, but unlikely given the entropy and presumably Google's security.

wting··on The best programmers are the quickest to Google
No.

I've been contributing to the Rust compiler in my spare time, and needless to say documentation is quite lacking. In fact, the Rust source code itself and git diffs are probably the best documentation available since everything is still changing.

In this context, you don't have the luxury of using Google for examples of common actions.

I'm also an undergraduate security researcher. In this position, you are at the forefront and Google doesn't help. Reading papers helps a little, but there's always the chance that someone else beats you to the punch and publishes first (happened to me 4 months ago).

wting··on The best programmers are the quickest to Google
It's trained pattern matching gained through experience, i.e. machine learning.

What you said in the GP post stands true, it's important that beginners learn the correct patterns (look up documentation for idiomatic examples) and not false ones (blindly copy and pasting code).

You see this all the time in casinos; their goals is to reinforce poor pattern matching behavior. From roulette tables' results signs to bad poker players chasing terrible odds, the human mind has the ability to disproportionally increase the significance of selected memories.

wting··on How to build a news app that never goes down and costs you practically nothing
No, given a bunch of Apache logs I needed to find the top 10 queries that met conditions A and B.

1. grepping for conditions and extracting the query with sed

2. appending a char to a flat file (i.e. increasing query count by 1)

3. sort by largest files and get the top 10

Parsing log files[0]:

  for ./*.log -type f -exec echo 1 >> $(grep cond_A {} | grep cond_B | sed -E "s:.*(query).*:./results/\1.txt:") \;
Finding top 10 results:

  ls ./results/*.txt -Sl | head
[0]: Untested code, and it only grabs one line per log file instead of grepping all matching lines in the log file. I'd have to move the grep to the outside and loop the `echo 1 >>` command, but you get the point.
wting··on How to build a news app that never goes down and costs you practically nothing
The file system is the original "database". I solved an interview question recently using a few Linux utilities, pipes, and flat files. It was a bash one liner that impressed the interviewer, but then he asked me to solve it the "real" way.

Both databases and file systems use B-trees to implement fast read / writes, it's just that SQL databases enforce structure. OTOH, using flat files moves data checking into application space and losing certain ACID properties.

Similar trade offs are made between NoSQL and SQL, dynamic and static languages, but I digress...

wting··on Slate: a Mac OS X window manager for power users
I usually have 1-2 windows of documentation on one screen and 2-4 terminals open on another.[0]

This allows me to prototype, compile, test, build, look up info with minimal window switching. The biggest advantage is never having to hunt for the correct window--everything is one keyboard shortcut away.

[0]: http://i.imgur.com/xctkdtq.png

The empty black box is due to my right monitor being in a vertical position.

wting··on Tips for work-life balance
25 minutes is too short, but I've found that a 90 / 15 minute cycle works for me.

I highly recommend this Pomodoro extension:

https://chrome.google.com/webstore/detail/strict-pomodoro/cg...

You set the minutes per cycle and what sites to block. Once a cycle is started it blocks those sites until the timer is up.

wting··on Shell startup scripts
With today's tools it's not that difficult to sync your shell environment. Keep your config files in a private git repo and add a few lines to your .bashrc that does the following in the background:

  - git (pull|rebase|reset --hard) from repo
  - recreate all symlinks
Any time you make changes, push it up to the repo. An alternative for some is to symlink against files stored in Dropbox.
wting··on Is 2013, the year of Linux gaming?
3D desktops are not at the responsiveness level of Windows or OS X despite improvements over the years.

As a result, there is still a significant amount of Linux users using 2D desktops. For example, I'm using Gnome 3 fallback (i.e. classic mode) with xmonad. I know quite a few running AwesomeWM with no DE, and others using Ubuntu 2D.

That being said, setting up xmonad or AwesomeWM requires a higher initial investment but you gain more control and efficiency in the long run. It's the same argument for using vim/emacs over notepad.

← PreviousPage 8 of 10Next →