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 In praise of... text files and protocols
As a nitpick, your JSON example uses single quoted keys, and it is mandatory for keys (and all strings) in JSON to use double quotes. Some parsers don't care, for instance if they are part of a full JS engine that can interpret beyond JSON's subset of JS object literal notation, but others will choke.

I guess this actually helps prove your point since text formats do tend to invoke intuitions that may cause one to stray outside of the strict specification.

pak··on A Game to Make Games
Well produced video and website, simple and honest presentation. Seems to build a lot on the appeal of Minecraft, but considering how popular Minecraft is that's probably a very smart move. Hope it works out! I'd try it out if there were a Mac version.

Looking at the time-lapse of using it [1] it's certainly not a "game"; you need to have patience and dedication to make anything serious. If there were any friendlier looking interface for learning the principles of 3D editing and animation, though, I sure haven't seen it. Could perhaps inspire a lot of kids from middle-school age and up.

[1] http://www.youtube.com/watch?v=r1QbJO3y_O0#!

pak··on Poll: What's Your Most Disliked Programming Language?
You're actually not too far off on your assessment of Delphi. Compared with all the .NET languages that sprang up to replace it, it's painfully verbose, inexpressive, and starved for community support.

On the other hand, what it still does well, decade after decade, is pump a 30MB native standalone executable from millions of SLOC in minutes, one that will run on any Windows box without installing any libraries or runtimes. That is, in its own way, impressive. Many businesses still depend on it and instead of an OSS community you wind up licensing libraries from the few remaining dev shops.

pak··on Python Scripts for Downloading files via SFTP
Um, instead of using Python and the pexpect module, just use /usr/bin/expect by itself. The Expect language is very simple [1] and could cut this script down to less than 10 lines, if all you need to do is automate a couple transfers.

The paramiko module is the "right" way of doing this in Python, and probably only appropriate if you need to integrate SFTP transactions into a larger, longer-running application.

Edit: I might add the use of a password in a command line argument is not advisable because it will get logged everywhere and show up in things like top, etc. Probably better to hardcode it or put it in a 0600 file.

[1]: http://en.wikipedia.org/wiki/Expect (In fact, there is a complete example for automating SFTP right in the article).

pak··on Inception Explained: a really cool scrolling animation of the plot
But Arthur's level at that point is the hotel level; he never goes any deeper. He is at the exact same level when the second kick of hitting the water occurs, and for some reason that one wakes him up. He wouldn't experience any of the deeper kicks because he is not asleep in the hotel level, he is setting up all the explosives on the elevator.
pak··on Defining Property
I like this essay for using a brilliant analogy to illustrate a hard problem. Despite painting such a pretty picture, though, it winds up not really addressing any of the issues it brings up.

What the essay proposes is the replacement of one nebulous standard ("property") with a few others: "not warping society," "when it works," and "common sense".

From the point of view of PG or anybody else in the Valley, what the AA's are doing may feel like forcing everybody to breathe through tubes. And this essay will easily appeal to anybody else that has grown up with the internet, simply for eliciting such a colorful depiction of our emotions when confronted with end-user-hostile DRM and bills like SOPA.

From the point of view of a media conglomerate, "warping" society is sort of their M.O., although they might more comfortably describe this as "advertising" and "developing consumer loyalty". It isn't common sense that a media company shouldn't change society to make money, because they've been doing this since radio and movies and television were invented. This goes double for new media and the internet. For instance, isn't Facebook undeniably trying to change people's expectations on what personal information they should be sharing with the world?

So all that's left is the essay telling us what we already know: that technology is making certain kinds of property irrelevant, and society needs to adapt to this change. How, and when, and what we should actually be doing, are all left as an exercise for the reader.

pak··on Defining Property
Whoa there. People, especially children, die every day because they can't afford food, clean water, or vital medical care [1]. So, are all of those suddenly communal property in your world? Who gets to decide how much of each of those resources each person deserves? Saying a commodity is "invalid" just because children are dying from not having it quickly leads to absurd situations like making organs communal property. What should be communal vs privately owned is contested every day at every level of government--this is a complex issue with no simple standards that can be universally applied.

[1] http://www.globalissues.org/article/715/today-21000-children...

pak··on Scientists Claim Brain Memory Code Cracked - 6 bit bytes
FTFA: Hameroff, senior author on the study, said "...We MAY have a GLIMPSE of the brain's biomolecular code for memory."

I know Hacker News prefers the original headline, but there has to be an exception for ScienceDaily, PhysOrg, and any other blog that tries to write linkbait summaries of peer-reviewed research articles.

This is the dingding step of the eternally true http://www.phdcomics.com/comics.php?f=1174

pak··on SSH Key Audit on Github (required)
Some people try to pool local commits into larger, less frequent pushes and pulls so the number of push/pulls is perhaps less relevant than their cumulative size. But pushes/pulls will never correspond well with user involvement because people use github for all kinds of scenarios. For instance, I might be developing branches that I don't want to push or pull to github yet--maybe I don't even intend to ever make them public. However, I may still want people to clone from my github repo and report issues to me.

The amount of time between someone getting an email from github and re-activating their account is probably the best metric github will ever have on users' attachment to their accounts.

pak··on SSH Key Audit on Github (required)
As an interesting side effect, they will have pretty exact stats on how many active users they have; might help them sunset old accounts or move them to the slowest servers.

(Because of the offline nature of most git actions and different habits on pushing/pulling, it's probably hard to otherwise estimate how much a user cares about their github.)

pak··on How easy is it to buy YouTube views? $46 for 20,000 easy.
Is this to juke the stats to make a video seem more popular than it is? If you divide that out it's about $0.05 per 20 views. I think you could ask somebody on Mechanical Turk to open 20 browser tabs and let them sit for 2 minutes with bids of about a nickel.
pak··on Why Are Lawyers So Expensive Even With The Excess Supply Of Lawyers?
So, Forbes is republishing Quora answers now? This must be part of that new strategy where they try to gain more traffic (http://www.forbes.com/sites/kashmirhill/2012/02/16/how-targe...) with other people's content (http://www.nytimes.com/2012/02/19/magazine/shopping-habits.h...).
pak··on How to Find Facebook Users on Match.com by Using Face Recognition Tools
I thought you were kidding, but the LED idea is already a real product.

http://translate.google.com/translate?u=http%3A%2F%2Fwww.obe...

pak··on Tower.js - JavaScript Framework for Node.js modeled after Ruby on Rails
>The bulk of today's web devs are coming from Rails

Ahem, you're exaggerating there just a little bit. There are probably around a dozen web frameworks that are competing for the spotlight right now. With Zend, CI, Django, Symfony, Struts, Cake, etc. all equally if not more popular it's hard to say Rails has the "bulk" of today's web devs. I wouldn't even go as far as saying that the bulk of today's web devs appreciate MVC.

pak··on FBI Turns Off Thousands of GPS Devices After Supreme Court Ruling
I'm interested in how

> a person has a reasonable expectation of privacy in the totality of their movements, even if those movements are in public.

translates to actions on the public internet. This has potentially huge ramifications if it were to apply to the web, where the "totality of one's movements" can be much easier to track and perhaps even more revealing than where my car goes.

Can the FBI, by this standard, potentially need a search warrant to:

1. attempt to create a complete profile of my semi-public internet content (surreptitiously friend me on Facebook, follow my Twitter feed, and monitor all other sites where I am active for recent posts)

2. look at the browsing history of a public terminal I regularly use at a library

3. capture packets I'm sending over unencrypted WiFi in my home

None of these things are very much private nor does any involve any trespass by an investigator--perhaps 3 carries the greatest expectation of privacy by the average technically uninclined citizen. A lawyer could argue, however, that in capturing one or more of them, the FBI approaches capturing nearly all of what somebody does on the internet.

I think the Supreme Court has done a very interesting (and perhaps unprecedented?) thing here in creating an expectation of privacy in a public environment by invoking the work totality. With cameras getting smaller, and networks wider, and databases larger, it only seemed inevitable that within a few decades, all of our public movements within urban centres could and likely would be recorded. Similarly, people are already to starting to consider the internet to be "forever," since content never seems to be really "deletable," and Google/Facebook increasingly lower the effort needed to profile somebody's web content. Tell me that in a few decades, our movements on the internet will not be as important as our movements in the physical world, if that isn't already the case.

I hope this decision is the seed of a legal philosophy that could impede the continued erosion of privacy-in-public by everyone's smaller chips and bigger hard drives. In my mind, the freedom for people to interact in public without fear of lifelong ramifications is vital to democracy and societal progress although less and less people seem to agree with me. So, maybe this is my desperate optimism talking.

pak··on The Markdown Mindset
I love pandoc too, and there are three things that would make me absolutely giddy if they were added:

1) Proper reference support. In LaTeX you can use things like \ref{fig:foo} to insert autonumbers for things like Figure X and Table Y. (Which is awesome, because if you move a figure, you don't have to change all of your numbers around.) There's no Pandoc markdown equivalent, so this gets lost if I convert to e.g. HTML. I have to work around this with a script that looks for this LaTeX snippet and does the counters before passing to Pandoc.

2) Better footnote output for LaTeX. Right now, if you use a [^foo] footnote mark twice, you will get two \footnote{}'s in your LaTeX (and therefore a repeated footnote message in your output) instead of a \footnotemark for the second one.

3) Better metadata. Both Jekyll and MMD are so much more flexible about the metadata you add at the top of a document; Pandoc seems to think the only items I'll ever need are author, title, and date. If I could only add things like addresses, enclosures, salutation lines, and extra variables my templates could adjust to, I could produce more sensible templates for formats like business letters.

pak··on Splash screens == sloth
Surprisingly, NTFS does allow for transactions [1] and this feature is implemented since Vista, while as far as I know, HFS+ on Macs has no comparable feature. Therefore what you say may in fact be true.

I'm curious if cutting the power on a Mac while it's moving files into place will break a software update, or if the whole package receipt mechanism prevents that from occurring.

[1] http://en.wikipedia.org/wiki/Transactional_NTFS

pak··on Berkeley DB Architecture - NoSQL Before NoSQL Was Cool
I just found these two little jewels and have been using them to provide fast access to a haystack of images (GB to TB size, each image about ~1KB). I am curious to hear what others think about moving from Tokyo to Kyoto--the website says Kyoto is recommended, but there is a real dearth of information about Kyoto (at least in English) out on the web, compared with the scattered breadcrumbs that you can sort of piece together for information on Tokyo. Most of those breadcrumbs are unfortunately silly benchmark articles instead of real experiences.

Also, I already did have one Tokyo Cabinet Hashtable go corrupt on me--which caused certain operations to lock up the CPU indefinitely. Hmm, that didn't ease my conscience. However, it was completely recoverable with "tchmgr optimize". It'd be nice to google for more war stories, but like I said... breadcrumbs so far.

pak··on From the IE Team: Google Bypassing User Privacy Settings
And once Google and Facebook find a workaround for that setting, they can add a fifth option: really really block all third-party cookies.

Seriously, the answer here is that if a browser wants to block third-party cookies by default, it should go all the way and do so, no exceptions. If social networks want to plaster the entire web with their buttons they can try asking browser users to change the setting back.

pak··on From the IE Team: Google Bypassing User Privacy Settings
The problem is, blacklists need to be maintained, create a single point of failure (in terms of both access and trust), and rapidly grow out of control. See virus scanners, spam filtering, CRL checking for SSL, MSIE Phishing Filter, etc. all of which work either sporadically or at the unrelenting expense and pain of some central party.

I think MS probably needs to acknowledge that P3P is broken, and change the default so it doesn't affect third party cookie acceptance. Administrators for Windows environments that think otherwise can override the default by deploying a group policy.

pak··on Twitter to move away from Hashbangs
Wouldn't they have to, to support browsers without pushState? And even if they used terrible JavaScript hackery to get around that (serve same content for every URL, have clients AJAX in content based on location.href) how would they support web crawlers? I thought the whole point of the hashbang was that you would get the original content (or an equivalent representation) by removing it from the URL, so I'd think they still support backend rendering at some level.
pak··on Using CSS without HTML
Right, proposed in October 2010. It would have been unfair of me to pick on IE6 for not supporting it. The IE6 era is when I most vividly remember javascriptsource.com and friends touting things like onclick="alert('Not allowed!'); return false" as ways to "protecting" your content.
pak··on From the IE Team: Google Bypassing User Privacy Settings
Hindsight is always 20/20 and norms change quickly on the internet; we could say equally critical things about Telnet and FTP.

I agree that P3P clearly needs some rethinking to stay relevant. Especially now that the cat's out of the bag on how to bypass it. (Microsoft's immediate response is to set up yet another blacklist system... some cultures just never change.)

For everyone's entertainment, the OP's comments linked to an amusing satire of P3P called P5P, or the "Pretty Please Platform for Participating Publishers." This is possibly the best collection of protocol tokens I have seen since RFC 2324.

http://pastebin.com/ijjRKvUB

pak··on From the IE Team: Google Bypassing User Privacy Settings
This is not a reply to your comment! See http://pastebin.com/raw.php?i=qV5bkCjG for more info.
pak··on Using CSS without HTML
This would have been the ultimate trump card back in the days when websites tried to prevent people from stealing their JavaScript and images by disabling things like right click and using twiddly bits of obfuscation. View source, eh? There is no source, punk!

Of course, the Link: header hadn't even been proposed yet, and the whole "DOM scripting" movement plus tools like Firebug/Webkit inspector has turned obfuscation of web content into a pointless exercise. So, like the author says, this is just a fun parlor trick.

pak··on Do the dead outnumber the living?
"Out of all the people that ever were, almost all of them are dead. There are way more dead people. ... You're just dead people that didn't die yet."

It's a bit from a Louis CK routine, and the numbers appear to back him up.

pak··on Facebook hit git performance issue on large repository
Why is a single repo required for everybody to see all the code? Tools like gerrit and github can handle multiple repos and provide commit access for multiple repos among a large group of people. If it were my company, I would keep separate repos but allow read and merge requests for all employees. That keeps everybody involved in projects across the entire company, but also allows them to notice when individual projects get spaghettified and thereby deserving of some cleanup/breakup into components. A GB-scale codebase does not help smart, new employees grok what the hell they can contribute.
pak··on Minecraft Physics
Minecraft does have terminal velocity, though (it's obvious from the very first shot showing the pole while falling), therefore it does have some implementation of air resistance. So as soon as the video says "assuming air resistance to be negligible," it's oversimplifying, as Minecraft clearly does not have negligible air resistance.
pak··on The Real Problem with Facebook's Timeline
Back when Facebook was still wet behind the ears, before the whole apps platform was created, such "power user" features were occasionally available... via SQL injection. Ah, those were simpler times.
pak··on Why does that QR Code go to justinsomnia.org?
This only supports my long running contention that normal people (outside of Japan) do not understand QR codes, and wherever they are printed, you would be better off writing a short URL. They are 1) opaque, 2) ugly, 3) impossible to memorize, 4) confusing to non techies and 5) no faster than typing the URL for the majority of viewers.
← PreviousPage 7 of 26Next →