Better HN
topnewbestaskshowjobs
Log inSign up

peterjmag

1,529 karma · joined Dec 30, 2010 (15y ago) · 254 submissions

I'm a frontend/UI hacker. I moved from Colorado to Berlin in 2013, and now I work remotely for DigitalOcean: https://www.digitalocean.com/

https://twitter.com/peterjmag

https://stackoverflow.com/cv/peterjmag

http://peterjmags.com

hi@peterjmags.com

Submissions

comment 6mo ago · link · parent

Looks like the site's struggling to keep up with the traffic. A couple mirror links:

https://web.archive.org/web/20260505052217/https://www.thatp...

https://archive.ph/sM7O5 (missing images and styling, but the content all seems to be there)

comment 8mo ago · link · parent

It’s my first time playing any Civ game ever. I’m currently at the top of the scoreboard for reasons entirely unbeknownst to me. My advice for anyone else considering playing their own game: form an alliance with the server admin.

comment 1y ago · link · parent

Not sure if the link was changed by the mods or something, but just a heads up that your quote's from the iFixit article [1], not the EFF one [2]

[1] https://www.ifixit.com/News/110039/double-trouble-for-repair...

[2] https://www.eff.org/deeplinks/2025/06/right-repair-law-washi...

comment 2y ago · link · parent

Somebody pushed it up here: https://github.com/amix/photoshop

But that might be violating the Computer History Museum's license: https://github.com/amix/photoshop/blob/2baca147594d01cf9d17d...

5.

Tell HN: How to make macOS restore windows to their respective desktops

1 points · by peterjmag · 2y ago · discuss

comment 2y ago · link · parent

This post prompted me to fix a problem I’ve had for literal years. Forgive the tangent, but I’m so happy that I needed to share. I imagine I’m not the only one who’s run into this particular issue, so hopefully it’s helpful for others too.

If you’d prefer, feel free to skip over the story to the links at the bottom.

I use a single large(ish) monitor and multiple virtual desktops, or “spaces” as macOS calls them. I have Chrome windows on all of my desktops. When I quit Chrome with ⌘Q and then relaunch it, it collects all of my Chrome windows onto one desktop instead of restoring them to the desktops that they were on previously.

For something like 14 years(!), this has driven me up a wall.

Notably, it doesn’t happen when Chrome relaunches to update itself or when I reboot my machine. In those cases, the app happily restores all my windows to their respective desktops. It’s almost as if it’s taunting me: “oh sure, I can do what you want, I just choose not to sometimes.”

Every once in a while, I go down a rabbit hole, trying to find a solution. I always come up empty-handed. Usually I just find a small handful of other people complaining the same issue. It was never a particularly easy thing to google, and it didn’t help that that it wasn’t clear who was even at fault. Was it a Chrome thing? A macOS thing? Maybe some combination of both? Or even worse, maybe it was a “wontfix, works as intended” situation?

Over the years, I’ve learned to cope. I rarely quit Chrome anyway, aside from updates and reboots, so the itch wasn’t that strong. Or maybe the itch just became part of me. Who knows.

But today, reading this post about things that suck in macOS, I thought of my own thing that sucks in macOS. Like remembering an old friend. An old friend who drove you crazy but who, nonetheless, you cared about.

And today, for old times’ sake if nothing else, I once again googled some combination of the words “Chrome”, “restore”, “windows”, “multiple”, and “spaces”. And folks, this time, I found it.

There’s a setting called NSWindowRestoresWorkspaceAtLaunch. (How had I never found this before? It’s so simple!) You can change the setting for any app, not just Chrome.

https://superuser.com/a/1490087/77154

In case the Stack Exchange network finally succumbs to whims of private equity or otherwise gets lost to sands of time (it’s a fear I have), here’s a gist with the same instructions:

https://gist.github.com/f-steff/0163e0c1ed174e8ab7b33101ab47...

I can also put to rest my internal “feature vs bug” debate. Here’s Apple’s response to a bug report from the Chrome team (presumably from before they added the NSWindowRestoresWorkspaceAtLaunch setting):

This issue behaves as intended based on the following: Application restart does not preserve space assignment. We are now closing this bug report.

https://issues.chromium.org/issues/40531488#comment57

comment 3y ago · link · parent

https://archive.ph/ld0KF

comment 4y ago · link · parent

The original document being commented isn't available anymore. Luckily, the Internet Archive has a copy:

https://web.archive.org/web/20000517232106/http://webreferen...

Digging around a bit more, the original webreference.com (along with this article) existed until around April 2020. It's since been replaced by a generic landing page with a prompt to "subscribe to be the first to know when we relaunch". Shame that the article's URL doesn't work anymore after being maintained for 22 years. I imagine the domain was sold or something?

https://web.archive.org/web/20200330143723/http://webreferen...

comment 4y ago · link · parent

Double clicking selects a word, and triple-clicking selects the whole line. If I double- or triple-click-and-hold, I can drag the mouse to expand the selection word-wise or line-wise, not just character-wise. This works with the paragraphs of text in the body of this blog post, too.

I had no idea that you could end with a drag to expand your selection by word or by line like that. That's really cool. (The author's using Linux, but it works on macOS too.)

comment 4y ago · link · parent

Were your kids pronouncing island like "iz-land" or "eye-land"? Just asking because other people in the thread seem to be focusing on the "H" sound rather than the fact that "Island" is the German word for Iceland. Another fun layer of confusion for multilingual kids :)

comment 4y ago · link · parent

For anyone who's curious, here's a video of the Easter egg in action, along with a some more interesting backstory on Jacques Servin, the programmer in question: https://www.youtube.com/watch?v=x4mh7Pc5MSI&t=495s

comment 5y ago · link · parent

The parent commenter is talking about the "currently online" indicator, which can't be disabled. From a (strangely worded) WhatsApp doc:

> Please note you can't hide your online.

https://faq.whatsapp.com/general/chats/about-last-seen-and-o...

comment 5y ago · link · parent

Totally agreed that it's invasive. Same for the "typing" indicator, which also can't be disabled. If I'm writing something longer than a sentence or two, I usually just compose it somewhere else and then copy/paste it into WhatsApp, just to avoid feeling observed.

The fact that those two things can't be disabled actually makes me want to use WhatsApp less. I doubt I'm alone in that. Makes me wonder if Facebook's "engagement" stats account for those types of disincentives.

comment 7y ago · link · parent

I disagree — those issues are totally for the company to solve. Or at least, the company should be prepared to meet employees halfway. If a North American company is going to insist that I work North American hours whilst living in Europe, I'm just not going to work there. And I'm sure I'm not the only one who feels that way.

I live in Europe and work for a very remote-friendly, NY-based company, and I work pretty normal European hours. I have 2-3 hours of overlap with the various members of my team, and that's all I need. (In fact, I'm more productive in the morning here because it's easier for me to focus when our group chat is mostly quiet.)

Of course, it's not as simple as saying that you can work from anywhere for anybody at any time, but I don't think it's fair to say that timezone issues are not for the company to solve.

comment 7y ago · link · parent

I like function components too, but I've seen some interesting arguments against using them:

https://medium.freecodecamp.org/7-reasons-to-outlaw-reacts-f...

And I wish I had a reference for this, but I seem to remember reading that any future performance optimizations that could be applied to function components could probably also be applied to class components (at least ones that contain only a render() function and nothing else).

In any case, I'm hoping that React eventually gets to a point where developers don't have to make a choice between class and function components, and the compiler or the runtime makes that decision for us on a per-component basis.

EDIT: As an example, here's a Babel plugin that takes care of the conversion for you at compile time: https://github.com/remcohaszing/babel-plugin-transform-react.... Not sure what its heuristics are for determining what should and shouldn't be converted though, if any.

comment 8y ago · link · parent

I think GitHub's great, and I'm mostly okay with having to rely on it heavily at my day job, but I dislike how code reviews + PRs are necessarily tied to branches.

What are the chances of GitHub introducing stacked diffs (or a similar abstraction) as an option? It'd be great to try out this workflow on a non-trivial project, but it seems like a hard sell organizationally when it involves migrating to and supporting a completely different tool like Phabricator or Gerrit.

comment 8y ago · link · parent

This is awesome! I particularly like being able to spin up a local instance of GraphiQL against any endpoint (with auth headers and everything). I tried it with GitHub's GraphQL API, and it took me less than a minute to get going.

comment 8y ago · link · parent

Agreed, that's obnoxious. I bypassed it with Google's cache: http://webcache.googleusercontent.com/search?q=cache%3Ahttp%...

comment 8y ago · link · parent

Strange, I'm getting a 404. If anyone else is having the same problem, here's Google's cached version: https://goo.gl/BmbnJ2

comment 8y ago · link · parent

Ah, and they just published some of the resulting drawings:

https://interaktiv.morgenpost.de/mauerzeichnen-auswertung/

comment 8y ago · link · parent

Berliner Morgenpost published a cool little interactive thing last week where you draw where you think the wall used to be and it tells you how close you were:

https://interaktiv.morgenpost.de/berliner-mauer/

(German only, but the headline basically just means "do you know where where the wall divided Berlin?")

I've lived here for a few years, but I found it really challenging myself!

comment 8y ago · link · parent

This is one of my all-time favorite things on the internet. I was so inspired by it that I did a sort of half-formed "installation art" piece using it for a college class back in 2011. I projected the site onto a wall, hooked up some speakers, and prompted people to touch any of the videos, but I didn't explain anything else beforehand. When someone touched one of the videos, it would start, and when someone touched the same one, it would pause — just like a large touchscreen.

It's amazing what you can create yourself with this, but imagine what it's like when you have a large group "composing" it together, and then collectively deciding when to end it (or not!). Watching people go "ah ha" and then starting to communicate wordlessly to create their own piece, unique to their particular group, was so rewarding.

In hindsight, I wish I'd recorded it! (And if I were to do it again, I'd definitely want to get in touch with the creators and get their permission first.)

comment 9y ago · link · parent

Yep, fair point — I should have probably called them "restrictions" instead of using "ban" and "outlawed".

comment 9y ago · link · parent

In addition to the other suggestions, it might be worth contacting your representative to voice your support of legislation to repeal the existing statewide ban. For instance, this bill was recently introduced in the state senate:

https://leg.colorado.gov/bills/sb17-042

That particular bill ultimately failed, but it was on the right track.

comment 9y ago · link · parent

They did in Chattanooga, but not before trying to sue the city four times:

https://motherboard.vice.com/en_us/article/ezpk77/chattanoog...

A couple shorter articles on the same topic:

https://www.theverge.com/2015/5/1/8530403/chattanooga-comcas...

https://consumerist.com/2017/04/11/comcast-introduces-gigabi...

comment 9y ago · link · parent

Good find! I was curious too, and that does seem pretty small. I wonder how many people NextLight employs and contracts out in Longmont?

comment 9y ago · link · parent

Theoretically, yes. In fact, Senate Bill 152, passed in 2005, already outlaws municipal broadband. From the article:

Colorado has a state law requiring municipalities to hold referendums before they can provide cable, telecom, or broadband service. Yesterday, voters in Eagle County and Boulder County authorized their local governments to build broadband networks, "bringing the total number of Colorado counties that have rejected the state law to 31—nearly half of the state's 64 counties," Motherboard wrote today.

As far as I know, there have been attempts to make it impossible for a community to opt-out, but nothing's been successful yet. In fact, most recently, it looks like the tide has been turning in favor of repealing the ban state-wide (which wouldn't be surprising considering the 31 counties that have already opted out). Here's a bit more info:

https://co-wa.org/2017/01/26/senate-bill-152-primer/

comment 9y ago · link · parent

I'm pretty proud of my hometown for passing this measure! Longmont, a town 30 miles south of Fort Collins, passed something similar a couple years ago, and it sounds like it's been pretty successful so far[1], so I'm excited to see where this goes.

[1] https://news.ycombinator.com/item?id=15570559#up_15573817

29.

Voters say “yes” to city-run broadband in Colorado(arstechnica.com ↗)

789 points · by peterjmag · 9y ago · 218 comments

comment 9y ago · link · parent

For those who haven't seen it, here's a great illustration of what that data looked like for one person back in 2009:

http://www.zeit.de/datenschutz/malte-spitz-data-retention

I can imagine that it's only gotten more granular and comprehensive since then.

12345
9