Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Jeffrey Friedl

    regex.info · Personal blog · on HN since 2009

    Jeffrey Friedl, author of Mastering Regular Expressions, writes about regexes, photography, Exif data, and cycling in Japan.

    Visit blogHN submissions
    ProgrammingWriting & Thinking
    What HN says

    HN commenters recommend his regular expressions book and link his site for tracing the origin of the "now you have two problems" quote.

    Stats for nerds
    84HN people shared it
    25linked in comments
    690story points
    Nov 2025last shared
    2009people per year2025

    Top posts on HN

    1. 1
      Source of the famous “Now you have two problems” quote (2006)
      51 people · 552 points · first shared 2009 · 117 comments on HN
    2. 2
      More Details on the Insidious iOS Snap-To-Road “Feature”
      1 person · 87 points · first shared 2016 · 48 comments on HN
    3. 3
      Discovering and Cycling Japan’s Biggest Climb
      1 person · 26 points · first shared 2018 · Discussion on HN
    4. 4
      Vice magazine outs John McAfee's location in Exif data
      1 person · 9 points · first shared 2012 · 2 comments on HN
    5. 5
      An Analysis of Lightroom JPEG Export Quality Settings
      2 people · 5 points · first shared 2018 · 1 comments on HN
    6. 6
      Delta Airlines: Gauging the Quality of Your Customer-Service Representatives
      1 person · 3 points · first shared 2018 · Discussion on HN
    7. 7
      Informal GPS Logger Test: iPhone 4s GPS is Shockingly Good
      1 person · 2 points · first shared 2012 · Discussion on HN
    8. 8
      My Visit to a Japanese High School (2008)
      1 person · 1 points · first shared 2013 · Discussion on HN
    9. 9
      Digital-Image Color Spaces
      1 person · 1 points · first shared 2011 · Discussion on HN
    10. 10
      Testing a Couple of Watches
      1 person · 1 points · first shared 2014 · Discussion on HN

    What HN people wrote when they linked it

    • jacobolusDec 2015

      A tricky thing w/r/t browsers is that they are often really crappy at figuring out what color space a PNG image is supposed to be in. I think they often intentionally strip out the color space info from PNG images for the sake of helping PNG images blend smoothly into CSS / Flash / etc., for which they also don’t do correct color management. [The CSS spec says that colors should be interpreted as sRGB, but browsers don’t actually follow the spec.]

      As a result of this problem, it’s difficult to judge whether image resizing specifically is being done incorrectly, or whether the image is just being interpreted incorrectly at any size.

      You’ll notice if you open your first test image (http://www.4p8.com/eric.brasseur/gamma-1.0-or-2.2.png) in Apple’s Preview app, you get the correct behavior, but this is different from the behavior in Safari, for example, which shows something incorrect at every size. Stranger still, the behavior in Safari is roughly “correct” while resizing a browser window, but as soon as you let go of the mouse, it reverts to being incorrect.

      There are multiple possible ways to embed color space info into PNG images, and the PNG spec is actually really terrible and confusing on this subject which results in lots of inconsistencies from one implementation to another. If I remember correctly some of them are treated better by browsers than others, but I’m not sure if there’s a way to encode images such that it will be handled properly everywhere (I mean,…

    • burntsushiJun 2024

      Yeah I didn't mention Friedl because I've dumped on him in the past, and didn't want to belabor it. But Friedl definitely didn't start this. According to him, he was just using what was common vernacular even back then: http://regex.info/blog/2006-09-15/248 (Note that blog is from 2006, but he's actually quoting himself from ~10 years prior to that in 1997.)

      But... he is the one who ultimately installed this ambiguity into a classic book that is still read to this day. So I think he can at least be blamed for popularizing the confusion. And especially since the entire book is framed around "NFA" and "DFA" regex engines. It's not like it was just some one-off mention. The mix-up is baked into the conceptual fabric of the book. The landscape also looked different back then. It predated RE2 for example, and RE2 is, I think, principally responsible for bringing "backtracking semantics" to finite automata oriented engines. So Friedl's book is forever stuck in a false dichotomy that only happened to exist back when he wrote it.

    • omegoteAug 2013

      I've built a couple of Chrome extensions and is something I really recommend. It's easy, useful and satisfying (if you have a userbase).

      An example. I love checking the EXIF data of the pictures on the internet to know more about how they were shot. I use Jeffry Friedl's Exif Viewer (http://regex.info/exif.cgi). The process was: right click on the image, open in new tab, click a bookmarklet, new tab opens with the exif. Then, I decided to create a super simple Chrome extension that adds an option to the context menu of all images that opens the image in the exif viewer.

      You can check the (minimal) code here https://github.com/JoseTomasTocino/send-to-exif-viewer, as well as the link to the chrome web store https://chrome.google.com/webstore/detail/send-to-jeffreys-exif-vie/gogiienhpamfmodmlnhdljokkjiapfck

    • DonHopkinsMar 2022

      Great pun on Jamie Zawinski's comment about regular expressions from the discussion about embedding Perl in Emacs:

      Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.

      The article quotes it, but doesn't mention the source. Jamie says he was repurposing an older "sed" quote. Safe testicle-free link:

      http://regex.info/blog/2006-09-15/247#comment-3085

      I bet I've written more and harrier PostScript code than he has, though! And as a monster raving loony, I'll defend PostScript as being “readable” any day! ;)

      https://www.donhopkins.com/home/pub/NeWS/litecyber/cyber.ps

    • ZancariusFeb 2012

      Your comment reminded me of Jamie Zawinski's tongue-in-cheek quotation "Some people, when confronted with a problem, think
      'I know, I'll use regular expressions.' Now they have two problems." (http://regex.info/blog/2006-09-15/247)

      Jestful, off-the-wall comments aside, I love regex. It takes away a great deal of the drudgery associated with processing volumes and volumes of text. I can't imagine not having it.

      (Aside: Now that you mention it, I can think of a couple people who aren't programmers who use regex pretty frequently because it makes their life a little easier even if it isn't highly advanced, super-dense regex.)

    • baneSep 2015

      A fantastic resource for understanding this weird market is the "Buying a House in Japan" playlist on this youtube channel [1]

      He goes through lots of this weirdness in the Japanese market as he looks to buy and restore an older home.

      I suspect there's a "let's boost GDP with more construction" problem in Japan. It's resulted in lots of fantastic infrastructure, but also bizarre half-formed highways, unfinished bridges, paved over rivers and other things built way out in the countryside. [2]

      1 - https://www.youtube.com/playlist?list=PLE0D149A2A50898A3
      2 - http://regex.info/blog/2007-03-25/403

    Related

    Coding Horrorblog.codinghorror.com2.1k people

    Farewell Stack Exchange

    Coding Horror
    Personal · last shared 2026
    jwzjwz.org880 people

    Watch a VC use my name to sell a con

    jwz
    Personal · last shared 2026
    Daring Fireballdaringfireball.net1.8k people

    Facebook is an attack on the open web

    Daring Fireball
    Personal · last shared 2026
    Ignore the Codeignorethecode.net112 people

    Oberon (2009)

    Ignore the Code
    Personal · last shared 2026
    John Regehrblog.regehr.org401 people

    Teaching C

    John Regehr
    Personal · last shared 2026
    Strangely Consistentstrangelyconsistent.org24 people

    You're in a space of twisty little mazes, all alike

    Strangely Consistent
    Personal · last shared 2026
    Hillel Waynehillelwayne.com294 people

    1/0 = 0

    Hillel Wayne
    Personal · last shared 2026
    Joshua Davisjoshldavis.com24 people

    The Path to Dijkstra’s Handwriting (2013)

    Joshua Davis
    Personal · last shared 2026