HNHacker News
TopNewBestAskShowJobs

nateberkopec

3,366 karma · joined March 23, 2009

submissionscomments
nateberkopec··on Milligram: A minimalist CSS framework
Just the CSS, I don't think it would be fair to include the JS bit in the comparison if we're going to try to compare features on an equal footing.
nateberkopec··on OpenDoc
Steve Jobs' response to "What about OpenDoc?" at WWDC in 1997: https://www.youtube.com/watch?v=udyy2gQyNso
nateberkopec··on Milligram: A minimalist CSS framework
For anyone keeping track at home, Bootstrap is 25KB, gzipped, with all modules included. If you don't include all the modules/stylesheets, you can easily get it down to half that. Milligram is 2.7KB.

Still, I like the flexbox-based grid.

nateberkopec··on Rack-Mini-profiler – The Secret Weapon of Ruby and Rails Speed
There are similar MiniProfilers for Go, Node, and Dotnet: https://github.com/MiniProfiler
nateberkopec··on Rack-Mini-profiler – The Secret Weapon of Ruby and Rails Speed
No. RMP is disabled by default in production and must be enabled manually with `Rack::MiniProfiler.authorize_request` - so you can set it up behind a URL parameter, or something more secure like your already-built admin system or whatever.
nateberkopec··on Rack-Mini-profiler – The Secret Weapon of Ruby and Rails Speed
You can put `rack-mini-profiler` behind authentication. It is not enabled by default in production. I believe I mentioned this in the article, if not, it's in the README.
nateberkopec··on Rack-Mini-profiler – The Secret Weapon of Ruby and Rails Speed
Correct - that's exactly what I meant. Don't turn your SSL off on your production server just to run this gem - that'd be silly!
nateberkopec··on Rails 5.0.0.beta1: Action Cable, API Mode, Rails Command
You can just add each Rails framework to your Gemfile and be done. `require "rails/all"` catches load errors, so you don't need to require the frameworks manually in application.rb.

https://gist.github.com/nateberkopec/1184c81a92c10d84d779

nateberkopec··on Rails 5.0.0.beta1: Action Cable, API Mode, Rails Command
While you may disagree with DHH's reasons, you don't have to install or use ActionCable in Rails 5.

Here's a few ways to avoid it: https://gist.github.com/nateberkopec/1184c81a92c10d84d779

nateberkopec··on We ditched Google Analytics
An open-source, self-hostable solution providing 80% of common Google Analytics functionality seems doable to me.

Is there anything out there in this realm? If not, why not?

nateberkopec··on On apps that get acquired
The advantage of an open-source app is that there will almost always be a way to get your data out of the application/service if it does shut down.

With closed-source/proprietary apps, you're at the mercy of the provider for getting out any data.

nateberkopec··on Thomas Piketty: Clamping down with law and order will not be enough
I don't understand why we shouldn't believe what's coming straight out of ISIS' mouth.

ISIS has said they're killing us because of their interpretation of a book written in the first millennia. They say this every time they attack us. Yet (mostly on the left) we keep coming up with reasons why this isn't the case. "No, actually, you're not attacking us for that reason, really it's our fault because we gave the oil to the emirs."

When someone shoots up a Planned Parenthood, however, he doesn't even have to make a public statement and the same people are quick to blame Christian beliefs or rhetoric and immediately accept the ideological reason for the violence. Why don't we say that gunmen attack Planned Parenthoods because of income inequality in the United States?

Finally, is there anywhere to find the original article by Piketty in English? The linked version is in French.

nateberkopec··on Naval Academy reinstates celestial navigation
There's a reason certain ICBMs, like Trinity, still use celestial navigation. GPS can be disabled - but the stars aren't going anywhere.
nateberkopec··on Poster: Napoleon's March
I have this poster (from Tufte) - it's an extremely high quality print for the price.
nateberkopec··on Hacking Head Tags for Speed and Profit
Absolutely, that helps. But that doesn't help you if your page needs to make requests across 20 different domains.
nateberkopec··on Hacking Head Tags for Speed and Profit
That's too bad. I really like the concept of Google Tag Manager.

Are there are any "tag bundlers" that work? It seems like such a great idea.

nateberkopec··on Hacking Head Tags for Speed and Profit
Character encoding, then viewport tag.

Really, the viewport tag just needs to be before any CSS - external or inlined.

nateberkopec··on Hacking Head Tags for Speed and Profit
When I was writing about this, I didn't think the intranet case was so common. I may have underestimated that.

EDIT: Updated the article to mention intranets.

nateberkopec··on Hacking Head Tags for Speed and Profit
Man, this bit has gotten me flak everywhere. Here's what I think.

99.5% of websites that use this tag - it does nothing. Internet Explorer users don't set their own Compatibility View settings, so we can ignore that. Second, if you're cool enough to be on Microsoft's Compatibility View list, you're cool enough to know that you need an X-UA-Compatible tag and you know what it should be set to.

The problem I have is people blindly copy-pasting this value from whatever HTML5 boilerplate they got it from. I'm going to rephrase this section of the post to make my point more clear.

EDIT: Toned down my phrasing in the article to be more specific about when you can safely remove X-UA-Compatible tags. Yes, there's an argument that it doesn't cost you anything to keep it in there, but there's also arguments for ultra-short head tags (<4 KB) related to TCP windows, which I'll get into in another post.

nateberkopec··on A new approach to web performance
Authored by Google, how surprising.

Also, I'm not familiar with the W3C process, but since this is a working draft, I'd assume they're invalid until the draft is finalized.

nateberkopec··on A Guide to Fast Page Loads
I believe the encryption requirement was dropped at the last minute. HTTP2 will serve unencrypted connections.
nateberkopec··on A Guide to Fast Page Loads
Sure, check out the Navigation Timing API: https://developer.mozilla.org/en-US/docs/Web/API/Navigation_...
nateberkopec··on A Guide to Fast Page Loads
I wish I could find a font everyone liked that isn't Helvetica :(
nateberkopec··on A Guide to Fast Page Loads
> In fact, if your script is not async it's actively _bad_ advice because while the CSS load will start even before the JS has loaded, the JS will NOT run until the CSS has loaded. If you revers the order, then the JS will run as soon as it's loaded, and the CSS will be loading in parallel with all of that anyway.

Scripts without an async attribute will cause the browser to stop where it's at in the DOM and wait for the external script to download. The browser will not start downloading any stylesheets that come after the script tag until that's done. This is all straight from Google and can be verified in Chrome Timeline. https://developers.google.com/speed/docs/insights/BlockingJS

> So if you put your CSS link before your JS link and the JS is not async, the running of the JS will be blocked on the load of the CSS.

Downloading CSS isn't required to fire DomContentLoaded, so most browsers will download it in a non-blocking fashion. Chrome does not behave in the way in which you describe, which is shown plainly in the article. Again, this can be verified in Chrome Timeline.

All that said, I'm curious as to what browser engine you work when where what you said is the case - I don't doubt it, but you're not describing the way Chrome (and, I suspect, Webkit) works.

Right-o on the bit about DomContentLoaded, will fix.

nateberkopec··on A Guide to Fast Page Loads
Something is delaying the load event. You'll have to dig deeper to see what's holding it up - probably a network request for an external resource.
nateberkopec··on A Guide to Fast Page Loads
True, but that's a post for another day. We've still got another year or so until HTTP/2 gets mass adoption.
nateberkopec··on A Guide to Fast Page Loads
> On public CDNs- I mean public CDNs for common libraries (jQuery, Angular, Font Awesome) can improve page load time if a user already has the file. The more sites use the same public CDN, the more users benefit. But if a user doesn't have the file already, it's a loss. So, tradeoffs.

Even this has a tradeoff - if, for example, the other JS on your page require JQuery, you can't make the CDN copy of JQuery use an "async" tag, because you can't be certain of the order the JS will execute. And if you're not using the async tag, the first load will suffer.

nateberkopec··on A Guide to Fast Page Loads
I ragged on The Verge for taking 200ms to parse HTML, but if that's all The Verge was, it would be a ludicrously fast site. It's the 3.5 seconds of JS evaluation that tanks the site 's speed.
nateberkopec··on A Guide to Fast Page Loads
I wanted a guide that focused on the one thing all web developers have in common - the page construction process in the browser. We all use different servers, languages, etc.

HTTP2 will absolutely change a lot of how this works, you're right. I chose not to cover it as it won't be a real option for most developers until nginx supports it (still in alpha). The skills I'm teaching in the article re: the Timeline can still be applied when HTTP2 gains mass adoption, so you can test for yourself whether or not the recommendations in the article still make sense.

nateberkopec··on A Guide to Fast Page Loads
Ha, I should totally fix that. The site uses Jekyll, not Rails, which I'm used to getting the asset pipeline for free with!

Combining all the resources will include assets that aren't needed. Part of the reason I made the post about profiling with Timeline was so that you could test tradeoffs like this for yourself.

I don't know what you mean by reducing the utility of CDNs and caching though - surely having only one file actually increases the use of browser caching, since the browser will only make 1 request for CSS and serve the cached copy for every other page?

← PreviousPage 8 of 15Next →