HNHacker News
TopNewBestAskShowJobs

afshin

688 karma · joined September 1, 2009

submissionscomments
afshin··on Shuttle - A simple SSH shortcut menu for OS X
You can change the TextEdit preferences to always open files up as plain text instead of rich text if this annoys you, by the way.
afshin··on Why Geeks Get Bullied (It's Not Necessarily for Being Geeks)
"Blaming it on class and gender roles is one of those things that urban intellectuals do to maintain their status among urban intellectuals. Maybe he should analyze it from a Marxist-feminist perspective for good measure."

I don't suppose the irony of this statement escaped you.

afshin··on Are You a JavaScript Guru? Try This Test
Bravo.
afshin··on Incoming: A Native Gmail iPhone App. Finally.
Search is great with iOS for the messages you already have, but it doesn't work at all for "continue search on the server". If the Gmail app fixes that, it's a major feature.
afshin··on Sarah's Non-Traditional Job Search Experiment
I eventually came around to doing the same thing on my domain after about a decade of web development work, too.

I wonder how many other web developers have spartan pages like this.

afshin··on Why I left Google. What happened to my book. What I work on at Facebook.
That's a fair point. But it's still probably preferable to them using their talents to design increasingly convoluted financial instruments for ripping off suckers ... which is the other thing the most talented members of this generation seem to be doing.
afshin··on Annoying.js: How to be an asshole
They don't touch your actual clipboard, they modify your selection instead, so it works cross-browser. Tynt is the company selling this shit.
afshin··on Byte-saving techniques in JavaScript
The problem with this technique is that it will not work for large numbers (in my build of node, for example, the largest number it will work with is 2^31 - 1:

  (Math.pow(2, 31) - 0.1) // base number
    2147483647.9
  ~~(Math.pow(2, 31) - 0.1) // works!
    2147483647
  (Math.pow(2, 31) + 0.1) // base number
    2147483648.1
  ~~(Math.pow(2, 31) + 0.1) // doesn't work!
    -2147483648
afshin··on Chris Dixon, I love you man but you are wrong
Maybe you're right about that, but as long as employees like him, who are very dedicated to their companies, exist, then his point stands, I think.
afshin··on "... so now I will jiggle things randomly until they unbreak" is not acceptable'
I think the idea is that being curt is a mild evil that is tolerable if the information contained has a high probability of being valuable. But if the person being curt (or even rude) has no particular bearing/merit in the listener/reader's mind, it just comes off as pushy or presumptuous, sometimes to the point where you are tempted to ignore what's being said altogether.

It's not ideal, but I think the basic version is: I trust you enough to put up with your "brutal" honesty, vs. who are you and why are you being a dick?

afshin··on RouteMap, a new open source client/server-side JavaScript URL Mapping Library
Thanks for the suggestion. We haven't actually decided on the larger project's testing scheme, but once we do, we'll definitely be adding tests to RouteMap as well.
afshin··on RouteMap, a new open source client/server-side JavaScript URL Mapping Library
Yes, thanks for pointing that out. This is only one side of the coin. The other side is a server that will answer all of those requests.
afshin··on RouteMap, a new open source client/server-side JavaScript URL Mapping Library
Yes, this is possible.

If you do capability detection by checking to see if window.history.pushState exists, then you can configure RouteMap.handler to be tied to history events. Otherwise, you can set the prefix by calling RouteMap.prefix('!').

EDIT: I re-read your question, and I think that I misunderstood. I do think what you're asking is possible, and what I stated above is a piece of what you'd need to do. Basically, instead of simply binding RouteMap.handler to either onhashchange or onpopstate, you'd probably have to write an event listener for both of those methods + a window onload handler all of which send their respective portions of the URL that you care about to RouteMap.handler.

afshin··on Move Lang
This language seems an awful lot like JavaScript, except you can set default values for arguments, all arguments get passed in via an object literal, and "function" is called "^"

Oh yeah, and no semicolons.

afshin··on Dual Uprisings Show Potent New Threats to Arab States
Here's my comment below with direct quotations from that article. If you're going to argue that I'm being nebulous, then you should perhaps have read the article a little more carefully. As for "scoring political points", I'm pointing out what I understood to be a matter of public record and common knowledge. Having had to look into it more to satisfy commenters here today has not revealed much evidence to the contrary.

http://news.ycombinator.com/item?id=2217424

afshin··on Dual Uprisings Show Potent New Threats to Arab States
Really? Are we reading the same article? Here are some direct quotations.

* The "Iraqgate" scandal revealed that an Atlanta branch of Italy's largest bank, Banca Nazionale del Lavoro, relying heavily on U.S. government-guaranteed loans, funneled over US $5 billion to Iraq from 1985 to 1989.

* Saddam's elite troops received instruction in unconventional warfare at Fort Bragg

* The United States assisted Iraq through a military aid program known as "Bear Spares", whereby the U.S. military "made sure that spare parts and ammunition for Soviet or Soviet-style weaponry were available to countries which sought to reduce their dependence on the Soviets for defense needs."

afshin··on Dual Uprisings Show Potent New Threats to Arab States
I posted to a sibling of this comment, but here's the link again just in case you miss it:

If you are nitpicking over the use of my quantifier "entirely" I'll retract that. The evidence, though, is pretty clear:

http://en.wikipedia.org/wiki/United_States_support_for_Iraq_...

afshin··on Dual Uprisings Show Potent New Threats to Arab States
If you and _djo_ are nitpicking over the use of my quantifier "entirely" I'll retract that. The evidence, though, is pretty clear:

http://en.wikipedia.org/wiki/United_States_support_for_Iraq_...

afshin··on Dual Uprisings Show Potent New Threats to Arab States
American and Soviet policies supported the Iraqi prosecution of the war while funds to Iran were frozen and embargoes were placed.

I believe you're being overly specific in your definition of what constitutes something more than mere partisanship. I think it's a reasonably safe statement that the war would likely not have happened without American blessings.

It is, of course, more complex because of the involvement of the Soviets, but I think in this case both the Soviets and the West wanted to contain Iran and both politically and materially encouraged Iraq to wage war.

afshin··on Dual Uprisings Show Potent New Threats to Arab States
Here's somebody else's research on the subject:

http://www.iranchamber.com/history/articles/arming_iraq.php

It seems pretty well cited. That citation itself came from this Wikipedia article:

http://en.wikipedia.org/wiki/Iran–Iraq_War#U.S._support_for_...

afshin··on Dual Uprisings Show Potent New Threats to Arab States
The Shah of Iran was a dictator who only came to power because of an American/British orchestrated coup. He was overthrown against American wishes, and the government that came to exist in Iran is reactionary and hostile to the West as a direct result.

This is a case of a homegrown movement to overthrow a dictator. The resultant government is not necessarily what the West would prefer, but that is a consequence of being (rightly) seen as the funders and supporters of both the previous dictator and the instigators of the war waged by the next-door neighbor (Saddam Hussein's Iraq, whose military was entirely funded by Western powers and was once among the most powerful in the world).

afshin··on Mike Elgan: Why Nokia is toast
I went into this article deeply skeptical because every tech journalist out there is trying to make their mark on this story. But I think Elgan is exactly right about what strategies can win the mobile market, what Nokia has done wrong, what it can do in the future.

All that remains to be seen is which way Nokia chooses to go.

afshin··on Backbone.js Tutorial with Rails Part 2
I think you're talking past each other. If you want to build a web-based spreadsheet application, you neither "progressively enhance" nor do you "gracefully degrade". Your browser is either a supported runtime or it's not.

Sure, if you're building a content site, you will want to have progressive enhancement, but if you're building a client-side application, SEO concerns and the other concerns of content-delivery sites are less relevant.

afshin··on Briss Trims PDFs so They Fit Better, Are Easier to Read on Your Ereader
Clever name ... a little crass.
afshin··on How to create a startup country
Yes, they do. But that's quite an exception.
afshin··on How to create a startup country
The best discoveries of these startups, like in any industry, will be copied by the market leaders — the countries of today.

That seems to be patently false. If better ways of governance really were infectious, governments would be roughly converging in their policies. At the very least, for example, similar governments (let's say western democracies) might all have universal healthcare.

afshin··on What to Read to Get Up to Speed in JavaScript
I don't disagree with you on that point. Two books should be plenty. I'm only pointing out that there's a lot of utility in learning about JS as a programming language, completely divorced from DOM stuff.
afshin··on What to Read to Get Up to Speed in JavaScript
I think people coming from most other languages that have objects get very confused about prototypal inheritance. The significance of first-class functions is also not obvious to people who don't come from a functional programming background.

I think you're right insofar as it's easy to "get going" with JS and see things happen in a web page. But if you're looking to actually learn how to build non-trivial apps, a solid grounding in the language is pretty key.

afshin··on How To Handle Lawyers Threatening You
This seems like a really easy way to dig yourself into a deep hole. Why not build a relationship with a decent attorney if you're in the habit of getting intimidating messages from lawyers regularly?
afshin··on Brake lights sensitive to braking force
This is a really useful idea and gives useful more fine-grained information without compromising the overall message: "I'm slowing down."

Along a similar vein, I want car horns to be as loud inside a car as they are outside, to ensure they're only used for emergencies. I live in a city and car horns dramatically reduce quality of life because "no honking, $350 penalty" are never actually enforced by the police.

← PreviousPage 3 of 5Next →