HNHacker News
TopNewBestAskShowJobs

jpochtar

584 karma · joined October 10, 2013

I'm https://jpochtar.me/ and I like devtools

https://calendly.com/jpochtar

submissionscomments
jpochtar··on Cog: Use pieces of Python code as generators in your source files
I hear LISP has a pretty good macro system...
jpochtar··on Object-Oriented Programming is Bad (2016) [video]
http://paulgraham.com/avg.html
jpochtar··on Pagedraw is shutting down and going open source
Yeah we didn't do it for the hipster cred— we did it because I agree with PG that some languages are better than others, and Coffeescript is just better than Javascript.
jpochtar··on NYC Open Letter to Jeff Bezos
Do you... live in New York? I don't mean to be rude but you say "our" culture can't handle 25,000 high earning employees. 25,000 new high earners would be utterly unnoticed in the sea of Wall St.-ers. Honestly I think it'd improve the high-earner culture here if anything...
jpochtar··on Pagedraw is shutting down and going open source
Yeah it's not super clear, but that list isn't of independent points: it's the steps we used to ensure a new feature is good code. "ignore performance" is explicitly step 3 of 5, where step 5 is "then you optimize"
jpochtar··on Pagedraw is shutting down and going open source
Ironically, Knuth's full argument is exactly what we're saying, and what @abraae's taking out of context to criticize.

See https://medium.com/@jaredpochtar/on-performance-and-software... and the full section on https://medium.com/@gabriel_20625/technical-lessons-from-bui...

> Most of the code we wrote was fast enough (<2ms) that making it faster wouldn’t be noticeable, so it would definitely be a waste of time to optimize. Making code that’s 0.1% of your runtime 100x faster only makes your latency <1% lower.

jpochtar··on Pagedraw is shutting down and going open source
We pretty explicitly said "hey, the web is a regression from the 90s... let's just make a company that fixes that"
jpochtar··on Pagedraw is shutting down and going open source
lol no, I wrote that and it's a typo :P
jpochtar··on Pagedraw is shutting down and going open source
x-posted to medium: https://medium.com/@jaredpochtar/on-performance-and-software...
jpochtar··on Pagedraw is shutting down and going open source
Hi— Jared from Pagedraw here. (Stunned that this is the top comment on HN.) I stand by what we wrote 100%, but to add some color:

I don't want you to think we didn't care about performance. We did— a lot. We just think most people do performance optimization badly.

There's a lot of superstition on the internet about how to structure your code so it's fast. In our experience, following this advice usually does not make your code fast. Most people have bad intuition about performance.

To counter this, you have to constantly measure the performance of your code.

There's 2 parts to this idea.

1. Most things are fast enough that optimizing them is not worth making the code less readable, and is a waste of time.

2. Measuring, rewriting, and repeating is the right way to do performance anyway, full stop. There's lots of superstition around performance, which is absurd because it's extraordinarily measurable.

For point 1:

We goalled on a clear and flexible style, which helped us move incredibly fast with very few people. See https://norvig.com/spell-correct.html for an example of a golden piece of code in this style. Rewriting for performance takes moves us away from that goal.

Most of the code we wrote was fast enough (<2ms) that making it faster wouldn't be noticeable, so it would definitely be a waste of time to optimize. Making code that's 0.1% of your runtime 100x faster only makes your latency <1% lower.

It's not because we're brilliant coders: we just realized that most of the code we wrote ran on arrays with few enough elements that even O(n^2) algos could run in <1ms. Some of the code we wrote ran on a server, where network was the dominant factor, and we could always just scale up our servers with money. Some of the code ran on click, where it could be as slow as 5 seconds without the user really caring.

For point 2:

There's no such thing as “fast” code and “slow” code— you can put in the work to optimize any piece of code, and make it incrementally faster.

Because you can put in work to optimize any particular code, we either budgeted hours of engineering time for performance, or set performance goals. In either case, you want to spend your time optimizing the code that's the slowest, so you get the most “bang for your buck.”

Most people have terrible intuitions about performance. We certainly did— if we'd prematurely optimized the things we'd thought were going to be slow, we'd have wasted a ton of time

I felt there were lots of superstitions about performance that were just wrong. For example, considering big-O time complexity was often wrong for us, because our n was usually pretty low, so we were dominated by constant factors.

Performance is incredibly measurable. You should always measure, rewrite, and repeat until you hit your perf budget. Otherwise you're just shooting in the dark.

Because we goalled on clean code, tearing and replacing whole subsystems for performance was relatively easy.

jpochtar··on Pagedraw is shutting down and going open source
Thank you! I'm one of the cofounders— keeping LoC low was one of our primary measures of code quality.

> we were too focused on the technical side

Yes. Oh boy we were.

> should probably pick the most boring stack

Agreed. I'd worked in the Coffeescript compiler so it was "boring" for me, but you should pick whatever's "boring" for you— likely not Coffeescript

jpochtar··on Pagedraw is shutting down and going open source
http://www.paulgraham.com/avg.html is how we felt about Coffeescript + JSX
jpochtar··on Pagedraw is shutting down and going open source
This is correct. We wanted to preserve the pre-shutdown homepage, but there is no future development planned.
jpochtar··on Pagedraw is shutting down and going open source
Yes, it's the final app from Pagedraw... but we encourage forks! There's some good stuff in there :)
jpochtar··on Pagedraw is shutting down and going open source
We thought so too. The key idea in Pagedraw is you could design in the positon:absolute world designers think in, and we'd translate it into the Flexbox world apps need.

Ultimately we didn't get all the way there, which is part of why we closed up shop

jpochtar··on Pagedraw is shutting down and going open source
It was both of those two things— we wanted to do right by our users who trusted us with a dependency, but also because we think we did some things differently than your average WYSIWYG builder, and wanted those ideas to help move the standard forward.
jpochtar··on Pagedraw is shutting down and going open source
Thank you! I was worried this would be too subtle :D :D
jpochtar··on Why I prefer objects over switch statements
Take it one step further, and move the switched-over value to the top:

  ((o) => o[expr_to_switch_over()])({
    opt1: () => {
      stmts();
    },

    opt2: () => {
      stmts();
    },

    opt3: () => {
      stmts();
    }
  })
jpochtar··on Why a modern language like Kotlin makes a developer more productive
In 5 years, we’re going to have another post like FooLang is 3x better than Kotlin. And in another 5 after that, BarLang is 4x better than FooLang. And so on. In 30 years, we’ll finally just be at LISP.

Jump ahead 30 years and just use LISP already.

jpochtar··on Why I Write CSS in JavaScript
Thought experiment: imagine doing React development with all inline styles. Someone invents CSS. Would you use it?

Of course not: CSS is a bad idea in 2019. In 2004 it solved some of the problems we have React to solve today, but much, much weaker

jpochtar··on Amazon Pulls Out of Planned New York City Campus
This move will keep more tech in SF and not in NYC, beyond just Amazon. For every Amazon we lose, we lose 50 startups to the valley. I can't believe NY politicians let this happen.
jpochtar··on An Open Source UI Builder for React
this comment, alone, made it all worth it :)
jpochtar··on Things I Don’t Know as of 2018
As a new web developer: what can I do once I know how to config these things, that I don’t get as part of CRA?
jpochtar··on Equivalence of State Machines and Coroutines
The Program Counter (PC) register is some of our most important state! Ever since Gotos were considered harmful, we've forgotten that it's just another register.
jpochtar··on Re: “‬How does writing CSS in JS make it any more maintainable?”
In about 5 years, we're all going to be on inline styles in JSX (or equivalent), flabbergasted that we ever thought CSS was a good idea. Calling it now.
jpochtar··on From Nand to Tetris: Building a Modern Computer from First Principles
Once you’ve learned programming, this book is maybe the perfect survey course to understand systems. It gave me a framework for understanding all the layers from CPU to ReactJS that 4+ years of college never could so concisely
jpochtar··on OOP vs. Functional Programming (2014)
Can you help me understand the pullqoute? I didn’t understand what he’s talking about at all. Is it about not having to recompile?
jpochtar··on Life on the Dirtiest Block in San Francisco
SF is just worse at running itself than NY, Tokyo, and every other major city in the world. If we could accept that, we could could learn from and copy them to fix the city.

YIMBY is too incremental— turn SoMa into mini-Manhattan to jump SF 100 years into the future!

jpochtar··on Show HN: Uplink – Build Reusable Objects for Consuming Web APIs
Most of the time we use json+http, we need an RPC mechanism, but are afraid to say it because the web people were duped into thinking REST is good.
jpochtar··on The “Developer Experience” Bait-And-Switch
It's an incentives problem.

We could solve it if we checked performance like we do unit tests, and held developers accountable to a literal performance budget set by the business.

> Few teams I’ve encountered have actionable metrics associated with the real experiences of their users.

Imagine getting latency numbers on load times, bundle sizes, TTI, and so forth on every commit. PRs that blow the performance budget would be immediately flagged. You could plan for performance like any other business cost.

Even nontechnical business leaders can understand reports like "3s load time", and set tech team goals based on a relationship between load times and lost sales. "Load time must be under 2s, even on old Android + Edge" is something everyone can understand.

The article is right: what's most pleasant for the developer isn't necessarily what's best for the business. If metrics like load times are only being seen by developers, the developers have a moral hazard: either they

1. make choices that benefit themselves, at a cost to the business

2. make their own lives voluntarily worse, without recognition

The article is right again that sometimes, better DX is in fact worth worse performance for the user. As with anything, it depends on the business.

But businesses won't accurately and fairly decide on their preferred tradeoff if only engineers are in charge of it.

We need better performance infrastructure!

← PreviousPage 3 of 5Next →