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 Three Design Hacks from Apple
Just as a counterpoint, here's my anecdote. I'm no Apple fanboy, but I like their hardware enough to buy it for work-related purposes. My trackpad for a recent MBP had lost its "click", obviously this is a rather disturbing thing on a trackpad that is 100% button. It was a few days out from warranty end. I took it to a local store (US), a black shirt takes my name and says it'll be about 15 minutes. My name goes up on the board, I replicate it for the Genius, and he is satisfied with it being a hardware failure. At this point I mentally prepare myself to lose my computer for at least a week, but no! He says not only do they have the replacement part in-store, but they also have a tech certified to do the replacement. Apparently it will take an hour.

I go out into the mall to kill an hour, eat some lunch, and come back. Just like he said, it is all set. I walk out the door with a brand-new feeling MBP--after they service it, they polish it down with some kind of cleaner that leaves everything shiny again. A nice, and appreciated, small touch. I was impressed.

pak··on Things Real People Don't Say About Advertising
But you couldn't put those sayings on stock photos and have it work so well.

This blog works because the "fakeness" of the stock people nicely parallels the ridiculousness of the slogan to create a satirical meta-advertisement... about advertisers.

Unless you make satirical apps for app developers, or satirical science papers about scientists, you're not duplicating the irony of this blog.

pak··on Production is Red, Development is Blue
I've seen it used to manage deployments, and it's not perfect, but it's a lot better than expecting a whole team of engineers to muck about on the production servers and remember to get everything just right.

In fact, an expect script [can be] nicely self-documenting, because somebody can look at it and see "oh these are the steps to deploy X" because the scripts basically read as "at the foo prompt, enter bar" over and over again, with some branching to handle varying responses (missing prereq, error messages).

The "ultimate" in building environments would probably have to be something more comprehensive and declarative like bcfg (http://trac.mcs.anl.gov/projects/bcfg2) which I have seen in action and it works but is very XML-heavy.

pak··on Show HN: Tweet a photo every time your mac wakes up with a simple hack
"I have made a terrible mistake."
pak··on Projects: hijack (Hijacking the iPhone earphone jack)
I have no experience with the App Store approval process but it seems like this might fly. It just uses the audio jack as any custom mic/headset might; conceivably they could use valid API calls to just play or listen for sound and/or drive a constant powering voltage.
pak··on The Security Threat of Forged Law-Enforcement Credentials
An impossible threat to fix, for all the reasons discussed in the article and comments. The only disincentive you can rely on for somebody showing you a fake badge is the small comfort that it is a huge felony for the guy to do so, so he's either really a cop or willing to face some hard time. Either way, resisting is not a good idea.

Having a lawyer on retainer and speed dial might help you catch some of the BS and/or protect yourself, but most Americans can't afford that. A (supposed) cop can easily claim PC to prevent you from calling anybody else.

pak··on Google Removing H.264 Support in Chrome
Because it locks people out of Apple mobile devices.
pak··on Verizon iPhone 4
Well, you can demonstrate this already either with normal Bluetooth tethering or with MyWi after jailbreaking.
pak··on Production is Red, Development is Blue
Or for those less python-happy: just use expect

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

Slightly weird syntax, but learnable in a few hours. You are likely to already have it on your machines.

pak··on The Slippery Slope of an App Store, and Why Windows Should Never Adopt It
Did he seriously write that entire article without bringing up Steam?

Wake up and smell the coffee, Windows users: you've had an app store for seven years now, and its primary target (gamers) are actually pretty damn happy with it now. If they branched out and sold regular apps (not that they would, it seems too dilutive for the brand) you'd basically have a pretty competent Windows App Store. (I can see it now: "Achievement Unlocked, 10 page paper")

pak··on Old-style Mac OS X Leopard Exposé in Snow Leopard
You mean the yellow buttons don't work, or command M, or something else? I haven't tried this hack yet.

Edit: tried it, and those two things do work.

pak··on Old-style Mac OS X Leopard Exposé in Snow Leopard
Agreed, they took literally the most immediately identifiable property of a window--its size--and threw it out in favor of a grid with text labels that I never read. The only justifications I can conceive of are that they wanted to give each window an equal click target, or that somebody really wanted text labels. Neither really impresses me. The old layout was a better visual metaphor too, akin to spreading out everything on a table; the animation for the new layout gives me a headache.
pak··on Old-style Mac OS X Leopard Exposé in Snow Leopard
In case you were serious, I would have you go down in flames trying to use that as a defense for all of the UX changes in Windows Vista. You have constructed a rhetorical question with no sane answer, kind of like the prosecutor asking the defendant, "Have you stopped beating your wife?" when he has never done such a thing.
pak··on Electric sheep
In case you are thinking of running this, it is fantastically memory/disk space expensive. The fractals are rendered as movies and saved to your disk.
pak··on Zed Shaw & Dan Kaminsky Talk About Autho.me on Twitter
Yes, this is why Twitter without intelligent clients reformatting all of this garbage (I have to read this backwards to make any sense of it) is unenjoyable for most power users.
pak··on Things You Might Not Know about jQuery
IIRC from the last time I browsed through jQuery source, attr('css', ...) is used internally but didn't look like it was meant to be exposed as a public method. And I never remember seeing this sort of special case in the docs. So, I wouldn't recommend using it in kosher jQuery code. A lot of things in this article seem a little dated; almost every tutorial now covers the $(function() {}) shortcut, and event binding is something I wouldn't know about jQuery? Really.

Note to jeresig: this article illustrates a beef I remember passing on when the jQuery docs reorganized; it works well as API reference now, but before, introductory text for each section of the docs describing things like event namespacing made for a nicer introduction to beginners like me, as well as the structured sub-organization of methods within each section. Now, it's more of an alphabetical method soup, so a lot of beginners probably never bother to learn that event namespaces exist, or what the jQuery event object does. For example, you can only get to the documentation on the event object from within the documentation for methods like .bind(), which I find odd. (How would a beginner know that it even existed unless they went specifically to the .bind() docs in an alphabetical list of other cooler sounding methods?)

pak··on The progress bar illusion
Ehm, I beg to differ. Booting off a regular drive (non-SSD) can produce pretty variable times, depending on if you just installed something, fragmented the drive with some large files, etc. I remember many startups on my old PowerBook G4 running Tiger where the bar would reach the end and keep pulsing for another twenty seconds, much to my confusion/amusement.
pak··on The progress bar illusion
Also, the progress bar that they used to have for starting up OSX (removed in Leopard I think?) had no actual relation to anything the machine was doing, it was just timed to move across at a particular rate based on the average startup speed of your computer.

http://daringfireball.net/misc/2005/04/tiger_details#waiting...

A completely fake progress bar--it was just something for you to look at.

pak··on Common Application Users Find a Glitch
You mean lower-bound. current_length should be greater than what you calculate given any my_text with >1 char words. So you will wind up giving the students more than you can fit, not less than they should have. That's just as bad as truncating without warning.
pak··on Common Application Users Find a Glitch
I wish it were this simple, but you forgot about word-wrapping. Also, what to do in the event that space_left is negative, but the user hasn't reached 150 words.

(Also, it's layout for print, so better to think in terms of pts or picas.)

pak··on Common Application Users Find a Glitch
I think it's a overflow issue. The print preview flows the text in some box on a page, and if you have lots of wide characters it gets cut off because they didn't anticipate the max y-height 150 words can consume.

The Times was a bit imprecise in how they used the kid's words to explain the bug (about par for their technical reporting, unfortunately). The way they write it, it sounds a lot like <textarea maxlength=1000></textarea>, but if you think more about the explanation of the wide characters and the "print preview" it can't be that.

Overflow issues are actually not trivial to fix, as opposed to the claims some people are making here about "just count the words". Without allowing an excessive amount of space or allowing for more flexibility in the way it lays it out (flowing across multiple pages, etc.), it can be hard to estimate how much space to give for something as vague as a 150-word limit. If the Common App instead specified a 1000-character limit, the programmer/designer could take the widest character like "W" and determine the max y-height for 1000 W's.

pak··on Wall St. Computers Read and Trade on the News
I appreciate that the Times calls this what it is: an arms race, and it got me wondering, has there ever been an arms race that has benefited humanity?

Competition over tangible consumer technology, I understand. An arms race (what this is, because most would call finance markets a zero-sum game) I do not understand.

This sort of algorithmic black-box HFT with uncontrolled news feed input is like mutual assured destruction, all over again. What is it going to take to give the financial industry a sense of responsibility?

pak··on First we built an API, then we built a CMS
If you're writing an article about an API and show example input like that, people will think it's JSON, but it's not.
pak··on First we built an API, then we built a CMS
will never cause problems since we're not evaluating those as Javascript anyway

A lot of JSON libraries, e.g. json_decode in PHP, refuse to parse JSON without double-quoted keys. I'm actually curious what you are using to parse it (that isn't running on JavaScript) that allows such things. I don't know the details of your API, but is this an object that you intended to be passed to a jQuery method that re-encodes it with JSON.stringify before sending it to your API?

pak··on First we built an API, then we built a CMS
Ahhh! Invalid JSON in your examples! Please double quote all string values in your JSON, both keys and values, otherwise one day you will use a reserved word in JavaScript as an unquoted key and some client out there is going to be very sad.

It seems strict, but JSON is a subset of JavaScript's object literal syntax. See http://json.org/

pak··on A few tips for Web API design
No, SOAP is for businesses that need a clear data contract in place when doing inter-business data integration with real money on the table. That's why it's been used in business APIs for nearly a decade. REST has nothing that parallels the functionality of a WSDL and all the tooling that has been built up around WSDLs. Without a WSDL, you don't have a computer-interpretable spec for the presented API, you have a bunch of human readable documentation, and REST has a huge gap between principles imposed by the philosophy and the protocol that allows for a wide variety in how APIs are designed. I don't think you understand the whole code auto-generation thing; SOAP can't generate much of the client-side code. It might generate the function signatures or an object that has the methods presented by the API. On the server-side, you can usually auto-generate a WSDL from a class definition or vice versa, which is a handy way to start turning that data contract into an implementation.

SOAP isn't going anywhere in the big-business world, but for smaller businesses/apps that can play faster and looser with data integration, I absolutely agree that REST is a simpler and more pleasant choice to work with.

pak··on Interesting New Startup
What the heck is an "iTouch"?

Using correct brand names conveys trustworthiness.

pak··on Title Junk
I apologize for the snark. It was directed at Gruber, not your post. I'm actually glad you pointed out the incompleteness of his example, and the frustration of my post stemmed from how most forget to look for this in every other line of Gruber's writings and suck down the subtle shilling without thinking about it.
pak··on Title Junk
No, thank you, I was indeed being imprecise, you are correct that double colon doesn't exist as punctuation in English or Hebrew grammar so it's not a "punctuation symbol". I guess I meant "programming symbol", but it is also used in other contexts such as ratio equivalence in math, or abbreviating analogies e.g. dog:house::fish:bowl. I guess I don't know what to call it, really.
pak··on Google Living in a Dream World - Why Android/GoogleTV/Chrome are Failing
MG Seigler: the trollmaster at work. Add this man to your "banned from my internet" list.

More bare assertions than anything else you will read today.

Best comment from Bamd:

The article makes a lot more sense coming from MG if you know that his original title was "Google is Dead."

Then he realized that quarterly results will be out before too long, which might make the article look a little silly, remembered some things from watching Inception again last night, and bam, here we are.

← PreviousPage 17 of 26Next →