HN user

peterbe

1,145 karma

Blog: https://www.peterbe.com

Posts48
Comments210
View on HN
video-to-screenshots.peterbe.com 1y ago

Show HN: Web app to make screenshots from a video file without a server

peterbe
1pts0
www.peterbe.com 3y ago

Show HN: You Should Watch

peterbe
5pts0
www.peterbe.com 4y ago

Show HN: DocsQL

peterbe
3pts0
www.peterbe.com 4y ago

Tips and tricks to make you a GitHub Actions power-user

peterbe
1pts0
www.youtube.com 4y ago

Look cool knowing where the word GREP comes from?

peterbe
3pts0
www.ilovemdn.org 5y ago

Thank You MDN

peterbe
1283pts319
www.peterbe.com 8y ago

“tl;dr; I see little benefit in using a CDN at this point.”

peterbe
7pts2
www.peterbe.com 9y ago

Fastest way to find out if a file exists in S3 (with boto3)

peterbe
1pts1
www.peterbe.com 9y ago

Show HN: Podcasttime.io

peterbe
1pts0
www.peterbe.com 9y ago

10 Reasons I Love create-react-app

peterbe
1pts0
www.peterbe.com 10y ago

CSS Bloat Comparison

peterbe
1pts0
www.peterbe.com 10y ago

How to track Google Analytics pageviews on non-web requests

peterbe
2pts0
neopythonic.blogspot.com 10y ago

Inspirational “speech” by the founder of Python

peterbe
2pts1
www.peterbe.com 10y ago

Advanced Closure Compiler vs. UglifyJS2

peterbe
10pts4
headsupper.io 10y ago

Show HN: Send emails when Git commits contain certain keywords on pushes

peterbe
6pts0
www.peterbe.com 10y ago

LocalStorage is fast

peterbe
2pts0
autocompeter.com 11y ago

Show HN: Fast autocomplete service written in Go and JavaScript

peterbe
76pts47
www.peterbe.com 11y ago

Web performance playground for using AJAX or not

peterbe
1pts0
htmltree.peterbe.com 12y ago

Show HN: Tool to turn your HTML into a collapsible tree

peterbe
36pts22
www.peterbe.com 12y ago

Grymt – because I didn't invent Grunt here

peterbe
1pts0
wishlistgranted.com 12y ago

Show HN: Mashup of Amazon.com's wish list and Balanced Payments

peterbe
51pts41
www.peterbe.com 13y ago

What stumped me about AngularJS

peterbe
2pts0
www.peterbe.com 13y ago

This site is now 100% inline CSS

peterbe
2pts0
med.stanford.edu 13y ago

Question everything; especially organic food options

peterbe
1pts0
www.peterbe.com 13y ago

All your images are belong to data uris

peterbe
2pts0
msujaws.wordpress.com 13y ago

Tools & Processes for ensuring software quality at Mozilla

peterbe
1pts0
www.peterbe.com 13y ago

My new web marketing strategy: Begging

peterbe
38pts22
www.peterbe.com 13y ago

Real-timify Django with SockJS

peterbe
1pts0
www.peterbe.com 13y ago

Is Nginx obsolete now that we have Amazon CloudFront?

peterbe
75pts61
aroundtheworldgame.com 14y ago

Help me make this HTML5 game more addictive

peterbe
21pts24

It's pseudo code. The real code is TypeScript React and looks very different and it wouldn't serve the article to take snippets from that code to explain how it works.

They hi-jacked the browser's `/` key to focus the field, which is something I hate.

You're not the first one to point it out. Please join github.com/mdn/yari to raise your voice. It's an Open Source project after all.

They should have just had the search field focused automatically

Why? There's a lot of JS to load to make that work. If you never need to do a search (e.g. from a Google search) it would be a potential waste.

Also, I'm confused, I thought https://mdn.dev/ was the new thing because Mozilla was stepping back from MDN. Is it a fork?

That domain is just an alias we don't currently use. It's still the old MDN from Mozilla. No fork.

Can you scroll to the bottom of that page and use the "Report a problem with this content on GitHub" link?

The raw content is not Markdown. It's HTML with some macros (called kumascript macros).

And yes, you can "host MDN locally" now. Before you had to write a web scraper, now you can just iterate over the files after a `git clone`. But you might need Yari to build the raw HTML to fully formed HTML that you can open in your browser.

It's not that easy. We have 60+k pages carried over from 15 years of organic evolution. It's unstructured and messy. A move away from HTML to something "more popular syntax" (like Markdown) is NOT easy.

This is just the beginning. Finally we can do the kind of web performance improvements we couldn't do on the old platform. But to boot, we gained 10-20% on the First Render metrics. And because of the whole new way we deploy, we went from a 27% hit ratio (of popular pages) to 96% in the CDN. That means ~70% of the time you gain about 300-500ms on the initial load. And besides, before, cold cache misses in the CDN would result in a backend server rendering whereas now a cold cache miss just means an S3 lookup.

PostgresSQL is better. We're all aware of that. But it's miniscule in importance. Especially if you use the ORMs and other decent tooling. The move to git isn't MySQL's fault. It's so more and bigger than that.

1. That's right! But it's not really on the roadmaps either. One can hope that someone in the community writes a fancy web app wrapper for GitHub's API or something.

2. Yeah, it's really really convenient to submit a quick PR entirely in the GitHub Web UI. But I admit, we have some work to do make the previewing experience a bit better.

What's cool about git as a persistent storage, is that you can use vscode, emacs, vim, or notepad. Or you can write a little web app that starts a WYSIWYG editor on localhost:8888 or Heroku and have it dump to the file system and then you just need to write a script that takes care of submitting the PR from there.

Thank You MDN 6 years ago

It has nothing to do with donors. The less people use Firefox to search Google and click ads on that, the less money Mozilla gets. 90% of the revenue depends on that. When nobody can even go to vacation destinations, they won't click those hotel/travel ads.

The article is just anecdote, not really good testing.

Mayhaps. Or, just a snapshot from the trenches of real application development.

We all have to make choices. Different pros and cons. Before jumping into, perhaps run some tests with real stuff and change direction based on that.

In application development is usually doesn't matter what the core difference is between two databases because there are drivers and mappers that you more or less have to use. I.e. the Django ORM makes PostgreSQL convenient.

Hey, Original blog post author here.

What a lot of people don't understand is that you want it both. The resilience of Postgres and the speed of fetching from Redis.

You have data stored. You want to retrieve it as painlessly (shorter time, less CPU usage, less complexity, etc.) as possible. What are the options? How much faster is Redis? How much RAM is that going to eat up? Different tools have different properties. Run some tests to answer some of those questions. Don't just guess. Sure Redis is going to save some time, but how much? Do you know by heart?