HNHacker News
TopNewBestAskShowJobs

pak

4,759 karma · joined March 29, 2010

Assistant Professor at University of California, Irvine

Opinions posted here are my strictly my own, and not representative of any employer or organization that I am a part of.

https://tedpak.com

[ my public key: https://keybase.io/powerpak; my proof: https://keybase.io/powerpak/sigs/fEW8iI_3tD3E9XjbSaPJTDOtaai7TXU6j1QAezE82Xc ]

submissionscomments
pak··on Publish Anki flashcards to the web using Python + Sinatra
Hey, it seems to work now. The problem is that it relies on the HNSearch API (https://www.hnsearch.com/api) which seems to lag behind the official site by a few hours or more. I'd be interested in a Jekyll plugin that actually fixes this issue, ...or does everybody just roll their own?

If you're curious how it works, check out the JavaScript below the link, which swaps out the href if the page is found on HNSearch.

pak··on Brooklyn man arrested for flying drone over Manhattan
Not really. Unlike a water treatment plant, tunnel, power station, etc. that provides benefit to many residents, flying RC aircraft only provides benefits to the users and come with a host of externalities for everybody else. You might as well say "nimby" about guns or drugs.
pak··on Brooklyn man arrested for flying drone over Manhattan
Your emotions are coloring your ability to seriously consider how the 99% of urban dwellers who couldn't care less about being able to fly RC aircraft would feel about them being ubiquitous. I don't need to anticipate a bike hitting me from behind on the sidewalk because they are illegal there, and in the street, I look around (horizontally!) like every other pedestrian. I think that you also fail to understand how things like space, privacy, quietness, accountability, and yes, aesthetics are shared resources in a city that have to be carefully balanced among ALL people, not just an emotional or sarcastic 1%. To manage those concerns take resources, like police, city council members, and licensing.

Perhaps you would volunteer to test and license every operator and RC aircraft in the NYC for noise, safety, and flight-worthiness? And to respond to all of the reckless endangerment complaints that will happen anyway? No? Then I guess it will eventually cost me money. And no, I don't think every future reckless operator of an RC aircraft will be dumb enough to record his face on takeoff. It would seem that being able to control them from thousands of feet away, operator unseen, makes it a little harder to police than, say, a hit and run motorist, and the police already have plenty of problems catching them. But perhaps you are ready to volunteer your time and money to solve that problem as well.

Many people choose to live in the suburbs and rural areas (many more than in places with the density of Manhattan, for sure). There are already many different opportunities for kids there that don't exist in the city (why, my kid would like to ride his pony and his ATV on the streets, and go skeet shooting! why can't he?) I shed no tears for the sad future children of Manhattan who will be utterly deprived of the opportunity to fly their RC drones down avenues with hundreds of pedestrians. There are literally millions of square miles in the rest of this country where you can do that at a fraction of the risk. And if their parent really cares, they can drive ten miles into Jersey or upstate and do it in a large open park, the way any responsible person already does today.

pak··on Parsing JSON with a single regex
A great example of why you shouldn't, in fact, ever try doing this for JSON parsing within something important.
pak··on Brooklyn man arrested for flying drone over Manhattan
You're not quantifying correctly. Car accidents and bicycle accidents are currently more common than RC aircraft accidents partly because RC use is so uncommon. If you throw in a denominator of operator-hours, the picture likely changes. You should also account for the foresight and preventability afforded to potential victims. From the perspective of a pedestrian or property owner on the ground, it is a lot easier to anticipate and avoid an accident with something moving horizontally than something falling out of the sky. I can avoid stepping into a crosswalk if I anticipate a taxi will run the red light. I can't anticipate something falling on my head.

There are many reasons you might want to ban RC in an urban area besides safety. There's reasonable expectations of privacy for example; I don't think residents of apartment buildings would be amused by drones with cameras tapping on their windows. There's noise considerations. If there are drones flying unexpectedly between buildings and down streets, it's unsightly and distracting. Let's keep them in the suburbs or rural areas where less people will be affected by these externalities.

pak··on Why I Hate Frameworks (2005)
No, thank you. And this is coming from someone that read the OP years ago. The fact that short-term reposts gain so much volume on here indicates that front paging is incredibly stochastic. It's been this way for a while; submit a link once and it gets 0 comments, and the second time 130 comments, and the third 14 comments, all within a month and using the same title. As sad it is, the only way to fight through a stochastic system is to increase the frequency of posting everything so that on the average things break through for the "right" amount of time. Though, this doesn't bode well for the future of this medium.
pak··on Did Shutting Down Silk Road Make the World a More Dangerous Place?
> Using "natural states of being", however defined, to articulate rights in unnatural states of being (i.e. modern society) is a fallacy.

You're absolutely right, I'm muddling the concept of natural rights by doing that. (John Locke would be very disappointed.) The point I was trying to make was that many people do not realize that anonymity is something that society has to actually construct infrastructure for and support. To justify doing that, anonymity would either have to be deemed a "natural right" (something society considers every citizen is justly due, like in the US Bill of Rights) or the benefits and disadvantages must be weighed in every circumstance. I'm claiming that it is the latter and questioning why techno-libertarians usually assume the former. Then I'm raising that possibility that the calculus may just work out against allowing anonymity on some common communication mediums like the Internet.

As to your second point, yes, I agree that fear-mongering is unfortunately one of the many ways that minority viewpoints can hold sway over the public debate. I can't see much of a solution to it except time and a more robust democratic system, where you hope that eventually reason and the silent majority will prevail.

pak··on Did Shutting Down Silk Road Make the World a More Dangerous Place?
> From the natural right to free speech.

Hmm, I like where you started with this, particularly in suggesting that a free press requires anonymous sources and authors. It is really interesting to see how the Supreme Court has historically balanced this societal interest against individual rights in cases on e.g. libel, slander, whistleblowers, and so on. The tricky part is in claiming that all of this applies to the extent that you believe to communication specifically on the internet. One could argue, and this is the justification for the earliest wiretapping laws for phone systems, that electronic communications increase convenience but also the potential for abuse, and if people need sacrosanct anonymity there is nothing preventing them from sticking to meatspace communication methods.

This is kind of like the conflict between rights granted for free movement within the U.S. and the security requirements for travelers to show ID before boarding planes, etc. Is plane travel a natural extension of the right to free movement, or can you safely tell such people they need to walk, drive, etc.? It is a tricky call.

> we could have built an Internet of point-to-point wireless links... The government could outlaw such things, but that does not mean that the lack of such laws is an allowance, unless you think that all your rights are things the government allows

Also an interesting point, but within a certain context, isn't it hard to separate what I'm allowed to do from the government's protection of my doing so? This is the problem that less-government people face when waving their hands and claiming that everything could still work. It is hard to comprehend how much the collective safety and regulation of common goods provided by the current system affects what we currently do. For instance, if everybody started making microwave dishes that burned each other's pets and gave people cancer, I think we would begin to regulate those ISM bands more tightly. When I breath, am I not breathing clean air because the government won't let the factory down the street burn rubber tires out in the open and my neighbors from building or buying cars that spew fumes? I'm getting kind of hyperbolic here, but I guess my point is that the Internet that would exist with ZERO government support, and that includes eliminating all the transactions of currency for goods that keep those net-meshed wireless routers and computers running, creates a very different picture of the Internet from the one that exists now, if it would even function at all.

pak··on Did Shutting Down Silk Road Make the World a More Dangerous Place?
Both of your points are hyperbolic claims with no warrant.

> Communication mediums are the safest thing in the whole wide world.

Even though this is a strawman, since my arguing to the contrary does nothing to support that anonymity is or isn't a natural right, you're still completely wrong. Perhaps I can't literally shoot someone with a computer, but all kinds of violence is inflicted by communication. You can harass, threaten, and blackmail simply by communicating. The internet has been used to inflict sexual abuse, aid hate crime, and transmit child pornography. It can also be used to steal, commit fraud, and induce an unsafe panic (think of shouting fire in a crowded theater). These are all non-physical but violent acts; incidentally, anonymity aids in perpetrating every one of them. Saying that the internet is inherently safe, much less the safest thing in the whole wide world, is patently false.

> History is very clear on this: the biggest enemies of justice have been governments and state sponsored entities, every single time.

Perhaps you can add up the numbers and claim that more suffering has been inflicted in total by governments (in the course of wars, or whatever, some of which were more justifiable than others) rather than isolated individuals. You'd have a serious sampling bias, though, because we generally owe recorded history to the presence of a government, and people seem to have preferred throughout recorded history to form governments rather than live as individuals. So while this is a nice setup for an anarchistic manifesto, unless you are seriously willing to give up government and then move to Antarctica (which has pretty bad Internet, I'm told), it doesn't really make sense for this discussion.

pak··on Did Shutting Down Silk Road Make the World a More Dangerous Place?
Here's a question for the techno-libertarians stepping up to say the government has no right to shut down sites like Silk Road. Where do you derive this supposed natural right for anonymity on the internet? Life, liberty, freedom from discrimination, due process--these things I understand, and there are well supported philosophical frameworks (rule utilitarian, Kantian, libertarian etc.) for deriving them from first principles. I can also understand a society guaranteeing a right to privacy in limited circumstances: crimes affecting children are one obvious example, records of education and medical treatment are another. In each such situation, the benefits, harms and impact on the rights of the public and the individual have been weighed.

But an anonymous free-for-all exchange being a natural right? We aren't born anonymous. In the "state of nature," without government, we are in no way anonymous. The fact that the internet sometimes allows us to be is in fact a very artificial circumstance that society has allowed to happen. Whether we like it or not, governments are ultimately the overseers that permit networking infrastructure comprising the internet to be built. That isn't some natural right any more than building a nuclear weapon in my backyard is a natural right. Society has weighed the pros and cons and decided that this particular set of technologies is on the whole good. That it might in fact want to limit the level of anonymity on the network seems reasonable, in the same way that making people put license plates on their cars is reasonable.

I'm not supporting the idea of a government ID to access the internet (although some first-world countries already require some level of this), or nationwide surveillance a la China or the NSA. Anonymity no doubt has societal benefit, in that it has fostered great works of creativity (from Mark Twain down through Anonymous). Unfortunately, society depends on accountability, and accountability and anonymity are competing principles in the construction of a just society. Neither of them are natural rights on their own.

pak··on You Can't JavaScript Under Pressure
Anytime where you are trying to "collect" features of an array into one final value, and the collection function can be sensibly applied to the elements in any order as long as some interim value is passed along (e.g. summing, maximizing), the reduce paradigm is appropriate and can be more readable.

The bonus upside is that these paradigms also make parallelism quite simple, should it later be necessary.

pak··on You Can't JavaScript Under Pressure
Cool project, but all the warnings on that page about the edge cases make me concerned about trying to exuberantly move to ES5, and so I just stick with Underscore and the same level of JavaScript syntax I've been writing since 2005. (sigh)
pak··on You Can't JavaScript Under Pressure
It's problems like 5 that make me sad that IE <9 doesn't have Array.prototype.reduce.

    return i.reduce(function(prev, next) {
        if (typeof(next) == "object" && next.length) { return arraySum(next) + prev; }
        if (typeof(next) == "number") { return next + prev; }
        return prev;
    }, 0);
Something that simple needs to be shimmed on earlier IEs. In fact, I had to look up Array.prototype.reduce for this since I usually use Underscore's. Javascript problems...
pak··on Steam Controller
I've played some FPS games with a trackpad for lack of having a mouse available, and on a larger, higher precision one (e.g., Macbook size) it was not a bad experience at all. You can move a finger a lot faster than a whole arm. Reflex high-res motion at the pro Counter-Strike level isn't likely, but for the casual gamer, trackpad FPS control absolutely seemed plausible. So I believe this kind of input will work for many games that need pointing, and I also believe it will solidly outpace analog sticks for FPS games.

The Halo two-analog-stick model that has taken over the genre was always awkward and imprecise compared to keyboard/mouse (probably most of the skill in Halo was simply getting used to the stick dead zones and the acceleration/deceleration of the look field). I will be happy to see it fade away.

pak··on The weird, counter-intuitive science of traffic jams
Too many unsynched traffic lights in a grid formation often results in you sitting at a red light with no traffic moving in front of you, which is infuriating and inefficient. (Case in point, besides LA, is Toronto which seems to be designed this way on purpose.) This situation is alleviated by stop signs or traffic circles that give you the ability to advance when there is, in fact, no cross traffic.
pak··on TrueVault – HIPAA compliant data storage
If the email server was provided by his workplace, then it was likely secured and HIPAA compliant. Most hospital email services are. Once the file is on his hard drive, most hospitals will require that the user uses some kind of encryption if it contains PHI. They enforce this by training and recertification procedures every year or so.
pak··on Why does NASA use gold foil on equipment and gold-coated visors?
Most sunglasses are intended to reflect or absorb UV. As you can see in the OP, gold is only good at absorbing IR, which the atmosphere (and clouds and trees) do a decent job of absorbing when we are at ground-level. The gold would be more style than function for non-astronautical activities.
pak··on Show HN: TextIt – Visually build SMS applications anywhere in the world
A very similar-looking product for phone applications, called QuickFuse, is here: http://quickfuseapps.com/

I think the diagram-as-programming concept has some legs for certain high-business-value, low-complexity applications. One of them is voice applications, and another is probably SMS applications. You can imagine many others: email workflows, document workflows, query tools...

It comes down to the age-old problem of how to represent and store logic in a fashion that end users aren't afraid to manipulate.

Disclosure: I worked on QuickFuse.

pak··on LegoDuino: Lego + Arduino for a 9 year old
> One lesson I learned (after burning my fingers to the metal spring of one of the batteries) is that lithium cells can generate high currents when shorted out. Because the enclosure covers part of the battery holder, it's much harder this way to short out one of the batteries while replacing them.

I always wondered why many parallel AA battery holders have adjacent batteries facing in opposite directions. The little diagram and discussion here made me realize it's not just about shortening the wires on the outside, it's also a safety issue. Even in the revised design that he used, there is still one diagonal battery position that would short out the circuit.

Never discount the battery holder in any electronics project: it's one of the few mechanical parts that you are guaranteed to interact with every week or so. If they are always corroding or losing contact (or burning your fingers), it really takes the joy and polish out of the product.

pak··on Prism Button
Problem: Surveillance of all internet activity by a third party is bad!

Solution: Inject third party JavaScript into as many websites as possible!

pak··on 25 year-old's company makes millions on cracked iPhone screens [video]
The capacitive technology that powers multitouch screens requires (or works much better with) glass, I believe. Also, LCD technology itself requires glass. The less and thinner the layers, the closer it feels like your finger gets to the image, and the better the UX is. There are iPhone cases that essentially do what you are suggesting with a plastic overlay.
pak··on NeoCities
You are the man for doing this. If only others, including myself, were so brave for every web project that they attempt.
pak··on NeoCities
Ruby's syntax is beautiful once you've realized two things:

1. How blocks work, and how their minimalist syntax is beautiful. You see absolute value bars but believe me, getting used to that barebones function syntax is a gift. (No other programming language that I know of has an absolute value operator with vertical bars so it is not as hard as you think.)

2. Every time you see a dot, do NOT think attribute access. Think message sending a la Smalltalk.

Suddenly then, things like the tags.collect! line become pretty for encapsulating a callback on one line unlike the ugly function() {} crud of JavaScript, and things like defining a newtags= method become sensible, because everything including traditional attribute getting and setting reduces to message passing.

pak··on The Mac Pro from an audio pros perspective
Best part about hosting on a headless laptop: built-in UPS in case you have a power dip or somebody knocks the power strip out.

I've wondered: if computer makers sold laptops with lights-out-management and detachable displays, would people would repurpose them into makeshift mobile servers and design entire server farms around them, like they have with the Mac Mini. You could have a work/coding environment where if somebody needs to take home the dev server to hack on it overnight, they pull it out of the rack, slap on a display, use it any other laptop, and bring it back in the morning to plug back in.

pak··on Evidence that the NSA Is Storing Voice Content, Not Just Metadata
I disagree. You give a situation which is suggestive of the person learning they have cancer, and is a perfect example of how mass tracking can expose personal but information about our lives that we would rather keep private (particularly medical information, which I believe is the most vital kind of privacy threatened by these mass tracking schemes). But I wouldn't say that conclusion that you suggested is solid. It is equally plausible that the diagnostic center told the patient that results were negative, and the call to the mother was to reassure her and to the surgeon to cancel a preemptive appointment made by the doctor.

> The conclusions which can be drawn from that meta-data are far more solid than can be drawn from listening in to any or all of the phone calls.

This is just false. If you were a lawyer trying to draw a portrait of intentions with the metadata in court, obviously it would help your case if you could play the tapes and show what was said in each of the calls, so the other side can't propose equally valid situations like I did and create reasonable doubt.

I think we can be so fascinated by the power of having data, that much like the other powerful forensic tools used in the courtroom, we are eager to connect all the dots like we see TV shows like CSI doing. It can be difficult to remind people that more data (particularly meta-data and not content) produces more plausible hypotheses as often as it narrows them down.

pak··on You commit three felonies a day
The CFAA is probably a good place to start, since its concept of a "protected computer" essentially covers every computer on the internet, and its definition of authorized/unauthorized access is quite vague, and so left open to interpretation through case law. And there haven't been so many cases, so the precedent on many things is unclear.

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

Try (a)(2)(C) on for size. If you have a jailbroken phone, its manufacturer might claim that you have unauthorized access to information on a protected computer, even if you are its owner (that's exactly what Sony argued against George Hotz, and they settled out of court, so we'll never know what the courts would have said about that argument). If you have any computer in your house that you modified in a way the manufacturer did not authorize, similar arguments may apply.

pak··on Improving the security of your SSH private key files
Can't TPM be used for this? It could verify your /boot with keys external to the disk itself. I'm not sure if somebody has actually built a solution that uses it yet.

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

pak··on This Is What One Half Second of High Speed Trading Looks Like
If we eventually decide that all of this ridiculously fast bid/offer blitzing by our HFT overlords is a destabilization risk to the economy [1], couldn't we start taxing these transactions, or the bids/offers themselves? This level of high-frequency noise being thrown into the market can't reasonably go on increasing forever, right... at some point we just bury ourselves in a never-ending war of inscrutable, difficult to predict machine trading algorithms, and nobody will be able to translate market movements into anything linkable to reality, right [2]? Shouldn't either market operators or the government at some point in the future start dialing back the traffic with penalties on the sheer number of actions taken?

... or is that just an insane non-starter, since it affects too many rich people in the finance sector and their colleagues rotating through the current regulatory structure?

I think it's an interesting long-term problem faced by society to decide whether we are OK with investment markets becoming completely impossible for "normal", human investors to navigate. It's already rapidly going that way--the capability to profit is already wildly tilted toward firms that act at HFT volume. If a poker site became overrun by bots to the extent that it was no longer fun for humans to play, they would fight back against the bots (as most do to some degree). But with investments... we may be getting to the point where the average day trader needs a 3000U server farm to compete effectively, and then I question whether we've lost sight of why we subsidize and spend money regulating that market at all. It's like a chess league where the grandmasters get to use computers as aids, and the newcomers have to play blindfolded.

[1] Nothing catastrophic has happened yet, but there have been a few flash crashes that have necessitated trading to be shut down, and having to "roll back" trades is never perfectly equitable and only decreases confidence in a market.

[2] Some of those flash crashes were traced back to one overzealous seller that threw HFT's for a loop (read http://en.wikipedia.org/wiki/2010_Flash_Crash -- it is quite interesting). I shudder to think of a day when the market fluctuates wildly and the data is literally too complicated for regulators to trace it back to any identifiable cause. That day is closer than anybody in finance is likely to acknowledge.

pak··on Unicorn
Oh my god, there actually is an Apache HttpClient library [1]. I was going to say "this would be as confusing as if somebody made a HTTP client library named Apache," but it's already been done, and of course it's a Java library. RoflFactories...

[1]: http://hc.apache.org/

pak··on Ruby is too slow for programming competitions
Yeah, I did consider optipng/pngcrush. In the end it was a tradeoff between running time and space. I could afford the space but not the time. When I added in pngcrush, because it brute forces a whole bunch of compression routines on each tile, running times went up dramatically and I preferred having the job complete in days as opposed to weeks. It might be something to consider if we generate more tiles on a faster cluster.
← PreviousPage 5 of 26Next →