HNHacker News
TopNewBestAskShowJobs

krebby

511 karma · joined December 14, 2012

https://github.com/akre54
submissionscomments
krebby··on D4 – Declarative Data-Driven Documents
That's fair. Keep in mind that d3's major use case has historically been for building interactive data visualizations with dynamic data. Viewed through that lens, its data binding is a pretty integral part of the design.
krebby··on D4 – Declarative Data-Driven Documents
I haven't but it looks cool. Can you share how it'd solve those problems?
krebby··on D4 – Declarative Data-Driven Documents
I don't agree that D3's data binding is especially odd. It isn't as straightforward as React's vdom descriptor, but it's not especially complicated: https://bost.ocks.org/mike/circles/
krebby··on D4 – Declarative Data-Driven Documents
This is a good start but it glosses over the hardest part of making React work with D3, which is animations. Most animations you want to do with D3 don't fall neatly into categories you can use with CSS animation (namely updating paths and entering / updating / exiting animations).

React as an ecosystem is pretty fantastic but the React animation story is still pretty terrible unfortunately. "Portals" / "reparenting" is a majorly hacky way of getting an element from one part of the DOM to another, and even React Motion, which solves a few of the animation gripes, is hard to use, slow, and brittle in my experience. There just isn't a good substitute for the enter-update-exit selections that make up the core of D3.

My usual workflow is to get as much DOM building done in React as I can, with D3 filling out the tricky bits. D3's lifecycles and direct DOM manipulation are much more complicated to reason about than React, on the whole.

krebby··on D3 v4.0.0 released
I agree, though I've found that the animation story with React for anything even mildly complex is still pretty terrible.

My day job is building big data visualization applications with lots of D3 and React, so I have a lot of opinions about this.

If you can get away with using CSS transitions or react-motion in your app, and you don't need D3's enter-update-exit selections, I feel React's declarative syntax is a much simpler mental model and is consistent with how the rest of my app works. But anything complex you'll need to drop out of React and build your DOM in D3, which has a very different notion of element lifecycles than React and doesn't allow you to reuse any of your other React components.

krebby··on Why Team Happiness Can Be the Wrong Thing to Aim for [video]
Most vimeo videos nowadays are sent in html5 video tags. If you're reading HN, you're probably pretty comfortable in chrome's console. Just find the video element and adjust the `playbackSpeed` variable (default 1).
krebby··on A cool way to use natural language in JavaScript
I'm the opposite. I'm a native English speaker but I put my phone / computer in German so I can keep up my language skills. It constantly teaches me new constructs in German just by using my phone, and by this point most of the concepts have become second nature to me.
krebby··on How to Make Pittsburgh a Startup Hub
ctrl-f Duolingo. No matches.

Aside from Duolingo (who have been there for ages) and Uber (who aren't really based there) what's so exciting about Pittsburgh?

krebby··on Oracle seeks $9.3B for Google’s use of Java in Android
Best quote from this video (there are a ton): "Don't make the mistake of anthropomorphizing Larry Ellison".
krebby··on The Sad State of the Backbone Ecosystem
Most one-off discussion has moved to Gitter. It's not an open platform but the channel is better maintained because Gitter has modern features like email notifications.
krebby··on The Sad State of the Backbone Ecosystem
I'm not sure what you mean by that last part. We removed the jQuery dependency in View [0] and History [1], and I wrote a small shiim to allow Backbone Views to work with vanilla JS [2]. No schism, just not a huge paradigm shift either (which is a good thing).

[0] https://github.com/jashkenas/backbone/pull/3003

[1] https://github.com/jashkenas/backbone/pull/3006

[2] https://github.com/akre54/Backbone.NativeView

krebby··on The Sad State of the Backbone Ecosystem
Backbone is a fundamentally different paradigm from React, so as you point out it won't always make sense to borrow ideas from React or other one-way frameworks.* I find its usefulness waning these days for big projects, but it's absolutely my go-to for most small apps (I do a lot of client work). It's just easier to work with and less boilerplate when you don't need the strictness that React enforces / encourages.

As others have pointed out, having a stable API is a wonderful thing for a vast majority of projects. Backbone is stable because its ideas are battle-tested and the concepts are all there. People are seeing less usefulness for Marionette / Chaplin / Aurora, and I don't think that's all that bad.

* Disclosure: I'm a core contributor to Backbone.

krebby··on Creating a Lightsaber with Polymer
Not necessarily. It's just funny that they're bragging about choosing these particular technologies when they've all fallen out of favor in the last year and a half or so. Odd to see in a tech demo writeup like this.

My point (downvotes aside) is that Polymer (or any UI library -- react, angular, whatever) is overkill for this type of application. Without digging too deep into their source, it seems like it could've been done easier and cleaner in vanilla JS and ThreeJS.

krebby··on Creating a Lightsaber with Polymer
Fun app, but it's like they chose all the buzzwordy tech from two years ago that frontend devs no longer use. Bower? Jade? Gulp? CoffeeScript? Polymer?

And for what? The mobile page is just a single button with an accelerometer listener and websockets / webrtc glue, it shouldn't need any of those. The desktop page is mostly Three.js for loading and rendering the textures, and also the communication with the phone. What advantage does Polymer have over just writing normal ThreeJS and some vanilla js?

krebby··on D3.compose – compose reusable charts and components with D3.js
I hear this often but I'm not sure I agree. With almost all of these charting libraries you quickly run into the law of leaky abstractions. Most of the examples of things you'd want to do are written pretty clearly by Mike himself. They are easy to adapt by changing a few things around, instead of sticking with an inflexible abstraction.
krebby··on D3.compose – compose reusable charts and components with D3.js
The next version of D3 will be modular, with the different parts broken out into separate packages (i.e. shape utils separate from databinding utils). Currently I'm using D3 piecemeal with React with a good deal of success.
krebby··on Condé Nast Buys Pitchfork Media
To advertisers? Absolutely not.
krebby··on Show HN: Barter Hack – trade your technical skills for other people's
There's also OurGoods, a more generalized (and less programmer-specific) swap network. It's been around for a while and has a thriving community.
krebby··on New React Developer Tools
Any plans to make it integrate a little nicer with Immutable.js? Currently it's impossible to update Immutable props and have them reflect live in my app through React Devtools the way that you can with plain JS datatypes.

What would be really awesome is if there was something similar to Chrome Dev Tools' "store as global variable" feature, so that I could edit props in the console and then pass back to React.

krebby··on Nuremberg: A Fair Trial? A Dangerous Precedent (1946)
Anyone interested in this story might also be interested in Hannah Arendt's Eichmann in Jerusalem (famous for its "banality of evil" thesis). She regarded his trial as nothing more than a show, a kangaroo court, meant to act as catharsis for the Jewish people and a world looking for a figurehead to blame.
krebby··on The New York Times Makes 17k Recipes Available Online
This used to exist in Gojee, with ingredient tagging. AFAIK they abandoned that feature to focus more on recipes and discoverability.
krebby··on One man's obsession with rediscovering the Doves typeface
Last year I found just the typography in a PDF (http://www.sinnebild.se/font/large/dove.pdf) with the typeface embedded. It's a beautiful font that works incredibly well for a number of projects.
krebby··on ES6 in Depth: Classes
That's what a debugger (or a stack trace) is for. Who debugs just by line numbers anymore?
krebby··on Why Web Pages Suck
We ran an A/B test at a former employer a few years ago that showed that the popover was somewhere in the range of 1.5x to 2x as effective at getting signups than anywhere else in the page (sidebar, header, footer). I left the company shortly afterwards, but I'd assume the trend doesn't hold and may even reduce engagement long-term. We also cookied visitors to avoid annoying our users.
krebby··on Google launches Uber rival RideWith
Google Maps already uses some data from Waze (like route closures and accidents) though I really wish the Waze directions were fixed to match Google Maps. A combined app (or at least more unified set of two apps) would be amazing.
krebby··on Inceptionism: Going Deeper into Neural Networks
This one too: https://photos.google.com/share/AF1QipPX0SCl7OzWilt9LnuQliat...
krebby··on Inceptionism: Going Deeper into Neural Networks
Agreed. These are just amazing. Someone linked above to the source images on Google Photos, but even those aren't especially high-res. Would be awesome if Google released the originals.
krebby··on From Asm.js to WebAssembly
You're talking about implementing your own GC inside JS. A valid use case, but a niche one. JS the language doesn't really need to expose GC internals. JS the compile target does. (Though it can be worked around).
krebby··on From Asm.js to WebAssembly
You and I had this exact conversation at Eataly a few months back. WeakMaps are cool, but JS is a garbage-collected language. All you have to do to GC something is stop referencing it.

WeakMaps are only really useful when you don't control the referenced object's lifecycle. Even then, you can simply invert your map or check in your callback.

krebby··on Duolingo Raises $45M, Now Valued at $470M
The website currently provides clickable symbols. For mobile it's as easy as switching the language on your keyboard.
← PreviousPage 3 of 5Next →