HNHacker News
TopNewBestAskShowJobs

megrimlock

299 karma · joined September 10, 2010

nondeterministic automaton
submissionscomments
megrimlock··on Maybe we're in a bubble but it doesn't matter
This may sound crazy, but there are people drawn to accounting or insurance who are simply numerate, who love numbers and precision and carefully designing rules that accomodate the fascinating special cases of the real world, and who do enjoy that kind of work. It sounds dreary and gray, and we like to scoff at it as bean-counting, but it does appeal to a certain detail-oriented mindset that isn't all that far off from some forms of engineering.

Here's another view: Accounting is the instrumentation that lets you make sure the machine (the business) stays calibrated, and that the inputs match up to the outputs.

megrimlock··on Nokia Maps 3D (WebGL)
Thanks for the details! This technique works surprisingly well. (One of the artifacts I was able to find is at the base of the Bay Bridge in SF's SOMA -- there's a vertical wall that has the street surface projected up along it rather than an actual hole underneath the bridge. That does seem like a challenging case for airborne lidar + stitching.)

Another impressive spot is the top of the Stratosphere Tower in Las Vegas -- it manages to capture the spike at the top fairly well. It'd be interesting to know how much hand-editing they did for sites of interest like that, and how they represent hand-edits in a way that can be re-applied when new lidar datasets come in.

megrimlock··on Being recruited in the USA
The underlying problem in tech hiring is that it is difficult to assess candidates in an interview format. Many of the skills and personality factors that make someone a success are dependent on context. Transplanting an engineer to a new context is uncertain, even for putative rock stars.

Many of us have presumably seen our share of brilliant people flame out because they could not adjust to the ambient value system, and figure out how to get the right things done. Often these people flourished in a prior context: school or another company with more or fewer constraints.

Assessing that context match is hard. The most successful way is to have a mutual trial period (ex: internship). Failing that, in interviewing for a full-time position, the closest you can get seems to be by trying to simulate what it'd be like to work together. That's why you try to throw them at coding exercises or difficult problems. "Brain teasers" are silly but coding challenges where you see how far they can go with some direction are actually pretty useful. They give you a large dynamic range within which to quicky hone in on someone's current skill level. More interesting than their current skill level is how quickly you think they can progress, and so that's what you try to simulate in an interview.

megrimlock··on Google is working on integrating terminal emulator into Chrome
Yeah, Chrome represents a pretty different model from most desktop apps we run. Chrome's seamless auto-update has brought web-app style continuous iteration to the desktop. That means continuous change, and presumably improvement, but also no real ability to opt-out of new features/bloat and newly introduced bugs.

This was a brilliant move for Google because it removes the friction they face to push web-client functionality where they want it to go. For example, I woke up one day and suddenly I could run all these new webgl apps. We have all granted them implicit license to push code out to all our desktops -- at the cost of no longer controlling what version and bug/feature tradeoff you are running.

Whereas App Store apps, where the user controls updates, are somewhere in the middle of this shrinkwrap vs. web app continuum. You get the constant nagging to download version N.epsilon.epsilon of iTunes, with 20 pages of block text describing updates that are only interesting if you are the person driving Apple's grand product strategy, but you at least get the ability to say no thanks, don't ask me again. (Of course they will ask you again, but that's just due to inevitably skewed incentives.)

megrimlock··on Manufacturing "A Minimal Pen" in China, failures and successes
One nice thing about the book is that it gives sympathetic economic context to some of these issues, humanizing what might otherwise seem like utter fraud. Briefly, it's a combination of:

- inevitable human motives when faced with a chance to escape poverty

- different cultural expectations about what it means to deliver on a manufacturing contract (i.e. does it have to always be exactly to spec, or can it just be roughly equivalent in the important ways)

- different cultural focus on surface appearances vs. less visible qualities

- information asymmetry between local operators and distant foreign counterparties

- greed on the part of foreign counterparties, which the Chinese manfucaturers exploit to get deals and then ruthlessly trim back everywhere they can get away with, backing off only when they push too far and get called on it

What's almost as interesting are the similarly misaligned incentives within the foreign counterparties. Western capitalist companies are unabashedly greedy, short-term (gotta make the quarterly numbers), share-price-oriented, and have all their own dysfunctions as a result. That's not to say the kickstarter guys are guilty of any of that -- just that there's plenty of parties trying to screw the other on both sides of this international dynamic, and finding a truly honest partner is difficult in business anywhere.

megrimlock··on Manufacturing "A Minimal Pen" in China, failures and successes
For anyone who found this tale interesting, "Poorly Made in China" is a well-written and eye-opening account of similar antics.

http://www.amazon.com/Poorly-Made-China-Insiders-Production/...

Much like the kickstarter project mentions, this book covers repeatedly broken promises, misleading claims (like the laser etching that turned out to be CNC), continuous reassurances followed by convenient disappearances, completely mythical factory sites and machinery, supposedly mechanical processes that turn out to be skilled hand-labor, and the need for vigilant and cynical quality control. It makes a convincing argument that once you account for the cost of all these shenanigans, export manufacturing is nowhere near as good a deal as it seems.

megrimlock··on Walt Disney Animation Studios Open Source Software
Sony Pictures Imageworks also does this: http://opensource.imageworks.com/

As has ILM: http://www.openexr.com/

Beyond benefiting from open source and wanting to give back, these studios use lots of software with different features and file formats to work on the same assets. It's really helpful when they can use the same techniques or files across multiple packages. They open source this tech in the hope that it will be adopted more broadly among the software packages they use. Hence Alembic, OpenEXR, etc.

megrimlock··on Resigned
You're right that "fractal" is a bit sloppy here. It's always been a tawdry analogy when used like this that will annoy anyone who likes their words to have meaning.

But I think his underlying point is that Apple consistently executes similar values and priorities in many different areas -- for a company of its size, it's amazingly coherent and consistent.

Compare them to HP, where the CEO kills an entire product division that their webpage is still breathlessly promoting for days afterwards, which makes it seem like no one knows what the hell is going on over there and that they don't really believe in anything they do. As soon as Apple announces something, its whole public persona is consistent with that. It's kind of amazing. At the very least, you can count on being consistently annoyed with their values.

megrimlock··on Windows 8: Building robust USB 3.0 support
Command queueing allows the device controller to handle requests out of order. Since it has intimate knowledge of the hardware it can order requests for maximum throughput.
megrimlock··on Google +1 is failing, miserably
If that's the case then I wonder if my search results will end up populated solely by witticisms and novelties. In my experience so far +1 seems mainly used as a polite nod or chuckle, because its primary effect is that it's visible to the person who said the thing you approve of. Something like del.icio.us seems much more likely to identify timeless great content worth sharing -- it's a bookmark to come back to rather than a nod of social approval.

If you were designing a search algorithm it does not seem like you want want to give much weight to an embedded easy approval button (reddit, digg, +1, like, etc.) compared to something that requires more investment of someone's time and thought, like making a del.icio.us bookmark. I mean, half the time you have to go try to remember what your password was, then have them send you a password reset mail, then re-login -- now that's a bookmark I care about.

megrimlock··on The Tale of OpenGL vs. Direct3D
The space of OpenGL programs that fail to produce anything visible onscreen is surprisingly vast.
megrimlock··on What to Say To Someone Who is Sick
Consider that small talk can simply be a token gesture of openness to someone, a chance to engage them and try to take the conversation to a more interesting place. Few people can't jump straight to deep topics all the time and the people who do can be annoying.
megrimlock··on What to Say To Someone Who is Sick
That sounds really frustrating. Have you asked them why they didn't offer, in a non-accusatory way that won't put them immediately on the defensive? They may feel guilty and too ashamed to speak of it now. I can imagine the last thing you want to do is go over this experience with them, but the fact remains that you all hold a shared experience with your mother and there's still the chance to connect with them over that, and honor her memory that way.

Sorry, I don't mean to be presumptuous; I just think this kind of thing is so rarely discussed until you're in the middle of it.

megrimlock··on What to Say To Someone Who is Sick
We all know things really happen in primes. It's numerology you can believe in.
megrimlock··on HP TouchPad: Shipping July 1
I enjoyed reading your comment from my pre, while sitting in the park on a nice day. I agree that the fanfare over gee-whiz features is just hype. What should interest you is the potential, though unlikely emergence of another serious competitor. As with copy/paste, multitasking, notifications, and over-the-air updates, having competitors that show that Apple is not the only place great ideas come from can only be good for us all.
megrimlock··on Trying Haskell
Genuine appreciation for concise recapitulation. I felt I could hear the Tivo fast-forward beep-boop sound while reading your comment.
megrimlock··on Pioneer Anomaly Solved By 1970s Computer Graphics Technique
Ambient occlusion (as the term is typically used) is a way to approximate local reflection of uniform inbound (aka ambient) light. It does this by measuring how much of the exterior environment is visible at each point, as a way to modulate an ambient lighting term.

It doesn't really simulate how light bounces locally around an object, nor light emitted by an object. Rather than a light transport simulation it's more of a clever CG approximation hack that looks great and is pretty cheap.

But to the real point I think you were trying to make: yes, there have been a lot of strides in simulating light since the 70's, and more advanced techniques exist that should give more accurate results.

megrimlock··on Save your Cleverness
Start by talking to them about how you think they are really good at solving problems -- and how one of the challenges you hope they can solve is producing work that others on the team can understand and extend. They may need to first hear you acknowledge that they are talented and that you admire their work -- and then that you wish their work was more accessible to the rest of the team. The idea is that most good engineers will want to produce work that others can understand and appreciate. You just need to make it clear that you consider that part of the domain of problems they should be keeping in mind.

If this goes well, you might also want to acknowledge that this may mean taking less sophisticated, less forward-looking approaches. A lot of over-engineering is like over-training a model to historical data, assuming the future will be exactly like the past. Anyone who's worked on software for very long will be acutely aware that needs change over time.

megrimlock··on Dudes, this is so not REST
Slide 87 of the pdf has the best summary, but the main thing w/r/r REST is that get/put of entire resources can be too heavy.

1. custom methods let you get/put specific fields, without having to transfer the whole thing or split resources up as you add new methods.

2. custom methods avoid needing to implement complex or heavy state mutations on the client. the example was rotating an image 90 degrees; you wouldn't want to download an entire full-res image to your wimpy battery-powered phone, rotate it, and re-upload it when you can just do that on the server.

(... of course this should just update some orientation metadata instead of resampling the image -- it's just an example)

megrimlock··on Pinboard Creator Maciej Ceglowski Talks About Why Boring Architecture is Good
Yes, this approach is ideal when you are one person working consistently on the same project, and have much of the design in your head, which is feasible when you keep the code size small.

It suffers when you have multiple people working simultaneously, or if you have to take a break before returning to the project. In those case, a secondary automated statement of what the system should do is quite useful.

megrimlock··on Pinboard Creator Maciej Ceglowski Talks About Why Boring Architecture is Good
Use caching as a last resort, not as a fundamental design strategy

Resist excessive abstraction

Set performance targets for yourself

Excellent points for making any software perform well. I am working on performance in a non-web app that suffers greatly from over-abstraction, and over-caching to hide the overhead. Since design is subjective, railing against this got me nowhere -- but setting performance targets truly shifted the focus of the team. Now instead of debating how many internal layers we need and how to name them, we focus more on our runtime budget, and how to make the hardware solve the problem in that time.

megrimlock··on CPython to LLVM to Javascript - Python in the browser
It's kind of fascinating to peruse the generated js, if you are at all familiar with the CPython code:

http://syntensity.com/static/python.js

Also geeky fun to try to recognize what constants like 4294967295 correspond to -- it's all over the place!

And lots of literal char* strings encoded as integer sequences:

  >>> s = [111,98,106,101,99,116,46,95,95,102,111,114,109,97,116,95,95,32,119,105,116,104,32,97,32,110,111,110,45,101,109,112,116,121,32,102,111,114,109,97,116,32,115,116,114,105,110,103,32,105,115,32,100,101,112,114,101,99,97,116,101,100,0]
  >>> ''.join(map(chr,s))
  'object.__format__ with a non-empty format string is deprecated\x00'
megrimlock··on Delegate or die: the self-employed trap
Yes. The majority of "recommendations" we receive were provided as a polite favor to someone's former co-worker, relative, neighbor, etc. These are rarely better than random applicants, perhaps because they trying to exploit social connections rather than relying on the strength of their work. It's important to sniff out these obligatory "Sure, I'll pass your resume on" recommendations from truly vouched-for "We must hire this person" statements that can be truly valuable.

Also, be wary of recommendations from people who work in a different part of your company. They may think they understand what you do when they don't, and use up your time with unqualified recommendations. Learning how to politely decline can save a bunch of time.

megrimlock··on Ask HN: How do you manage chores, bills, and guests with your roommates?
Google Docs spreadsheet, one sheet per month, with shared write access. Easy to handle both recurring expenses and one-offs (hypothetical keg party, hypothetically broken window from hypothetical keg party). Also easy to factor in percentage shares -- we go based on relative income because some of us make 2x what others do, but we're redistributionists like that. Only downside is that people who aren't typical hyper-fastidious programmer types may accidentally mess with the formatting or formulas without realizing it.
megrimlock··on Why Chinese Mothers are Not Superior (from a female Chinese engineer)
HN expects a higher level of argument than unsubstantiated claims and lazy categorical insults. Please raise your game.
megrimlock··on OKWS, the Ok Web Server (behind OK Cupid)
Is your objection just to C++ syntax in general (in which case: total agreement) or something particular about OKWS? It seems pretty self-explanatory, as far as C++ goes:

  okclnt_t *make_newclnt (ptr<ahttpcon> x);
This declares a function that makes a new client from an http connection. It returns a raw pointer, so I presume the caller is responsible for the client lifetime. Whereas the connection argument is some ptr template, which I expect is a ref-counted or otherwise managed pointer, which suggests the client will keep the connection object alive. This is copying the ptr value, which if this is a ref-counting ptr would do an unnecessary extra ref-count during the function call, so they might want to pass it as a const-ref instead.

  okclnt_simple_t (ptr<ahttpcon> x, oksrvc_simple_t *o) : okclnt2_t (x, o), ok_simple (o) {}
This is a constructor to make a simple client from an http connection and a simple service. The only thing unusual is that a _t suffix usually suggests a typedef, and I don't think you can use a type alias to define a constructor.

I haven't looked at the API or done any web programming; I thought it was interesting what I could tell from this snippet regardless.

megrimlock··on Ask HN: What are the best technologies you've worked with this year?
You might be interested in boost::optional, even if only as a point of comparison: http://boost.org/doc/libs/1_38_0/libs/optional/doc/html/inde...
megrimlock··on Is ‘moderate drinking’ really good for the heart?
See "Lies, Damned Lies, and Medical Science": http://www.theatlantic.com/magazine/archive/2010/11/lies-dam...
megrimlock··on Sorting Algorithm Animations
What's the best way to instrument an algorithm for visualization? Snapshot its state at periodic, well-named points, and render illustrations?

I can imagine doing this with an A* search: snapshot the graph, including which nodes are open or already visited, along with the heap ranking of the next nodes to visit. You might also want to show all the newly neighboring nodes and annotate them with their updated cost estimate.

megrimlock··on Ditching 200K of C++ for 30K of Scheme
I think your advice holds in general, but one interesting exception can be implementing a model, in the MVC sense. This can require a lot of communication across the language wrapping, and definitely become a hotspot. This is less of a problem in toolkits that retain state, but then you pay a cost in maintaining duplicate representations.
← PreviousPage 3 of 4Next →