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
    R

    Redcode

    redcode.nl · Personal blog · on HN since 2010

    A Dutch developer blogs about Java programming, including how he built a Shazam-style music recognizer and the patent issues that followed.

    Visit blogHN submissions
    ProgrammingPrivacy & PolicyWeb Development
    What HN says

    HN links it for "Creating Shazam in Java" and the follow-up on patent infringement threats; commenters note no lawsuit appears to have followed.

    Stats for nerds
    20HN people shared it
    13linked in comments
    560story points
    Nov 2014last shared
    2010people per year2014

    Top posts on HN

    1. 1
      Creating Shazam in Java
      9 people · 470 points · first shared 2010 · 42 comments on HN
    2. 2
      Why is this Java raytracer slower than the JavaScript version?
      3 people · 48 points · first shared 2012 · 1 comments on HN
    3. 3
      Great Code Is Written Twice
      1 person · 15 points · first shared 2011 · Discussion on HN
    4. 4
      Female coders, lighten up
      1 person · 13 points · first shared 2012 · 15 comments on HN
    5. 5
      Dinosaurize your street
      1 person · 5 points · first shared 2010 · Discussion on HN
    6. 6
      Tool to turn your iphone location tracking into a map
      1 person · 3 points · first shared 2011 · Discussion on HN
    7. 7
      Fact: The Agile movement is a marketing stunt from 3M #arthurfryday
      1 person · 2 points · first shared 2012 · Discussion on HN
    8. 8
      Creating Shazam in Java - Patent Infringement
      6 people · 1 points · first shared 2011 · Discussion on HN
    9. 9
      Patent infrigement (part 2)
      4 people · 1 points · first shared 2010 · Discussion on HN
    10. 10
      Devoxx 2011: Shazam-like in Java talk
      1 person · 1 points · first shared 2012 · Discussion on HN

    What HN people wrote when they linked it

    • zio99Jul 2012

      I've spent some time pondering over this, so here's my 2 cents:

      1. Build your product first.

      2. It's expensive. If you still believe your idea is unique[1], hire help.

      3. Algorithms are not patentable. Systems and methods are.

      See: http://paulgraham.com/softwarepatents.html

      If you want to patent an algorithm, you have to frame it as a
      computer system executing that algorithm. Then it's mechanical;
      phew. The default euphemism for algorithm is "system and method."
      Try a patent search for that phrase and see how many results you
      get.

      4. It's a long process. See PG's footnote:

      [3] Applying for a patent is now very slow, but it might actually
      be bad if that got fixed. At the moment the time it takes to get a
      patent is conveniently just longer than the time it takes a
      startup to succeed or fail.

      and this: http://paulgraham.com/startupfaq.html

      There are two kinds of patent suits:
      1. Random people suing you in the hope of getting money.
      2. Competitors suing you in order to destroy you.
      Until you're successful, you won't have to worry about the first
      type. And once you are successful, you'll inevitably have a lot of
      them to deal with, valid or not. So fatalism is the right plan for
      type 1 suits.

      and the classic: http://paulgraham.com/wealth.html

      One way to put up barriers to entry is through patents. But
      patents may not provide much protection. Competitors commonly find
      ways to work around a patent. And if they can't, they may simply
      …

    • willvarfarMay 2013

      Update: I posted a link to some source code that implements the Shazam algorithm:

      https://news.ycombinator.com/item?id=5724442

      About the patent lawsuit thing:

      As I understand it, Shazam sold their patent to Landmark Digital Services, which are a part of BMI the record label. They kept an exclusive license to make Shazam-like software for phones.

      You can imagine BMI wanting it to make money from how a service such as Youtube fingerprints and detects copyright infringement...

      And it was this BMI company that were trying to get this blog post explaining the patented algorithm removed from the internet.

      One post from the BMI lawyers to Roy in the Netherlands was particularly broad bullying:

      > Mr. Van Rijn,

      > The two example patent numbers that I sent you are U.S. patents, but each of these patents has also been filed as patent applications in the Netherlands. Also, as I'm sure you are aware, your blogpost may be viewed internationally. As a result, you may contribute to someone infringing our patents in any part of the world.

      > While we trust your good intentions, yes, we would like you to refrain from releasing the code at all and to remove the blogpost explaining the algorithm.

      > Thank you for your understanding.

      > Best regards,

      > Darren

      > P. Briggs

      > Vice President &

      > Chief Technical Officer

      > Landmark Digital Services, LLC

      Roy gave a great talk at Devox about this: http://www.redcode.nl/blog/2012/03/devoxx-2011-talk-freely-available/

      I think I heard that…

    • j-g-faustusSep 2010

      Here's a starting point, how to do it with music:
      http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/

      You chunk a song into small segments and create a sort of "fingerprint" for each piece using Fourier analysis or similar. (So a song segment is represented by a frequency histogram, similar to this: http://www.flickr.com/photos/svartling/4229109164/ )
      The fingerprints are stored in a DB.

      To match a song fragment, chunk and analyze it in the same way. For each segment, find the closest match in the database. If most of the closest matches belong to the same song, and appear in the same order as in the song fragment you are trying to find, you have a match.

      Creating fingerprints from a series of video segments is roughly similar, Fourier can be used for 2D images as well.

      Doing it like this, you can reduce the volume of data you need to compare against with several orders of magnitude. Scaling to YouTube volumes is still hard, but that's the sort of scaling a company like Google already has plenty of experience in.

    • earlJun 2011

      NB: Shazam is run by raging assholes who like to threaten people posting code on their site to implement the algo described in the paper [1:4]. Roy's site is still up, but you may introduce quite a lot of stress into your life by messing around with this interesting paper / technique.

      In more interesting news, see [5] for a similar implementation in matlab, and [6] for Roy's java implementation.

      [1] http://news.ycombinator.com/item?id=1496683

      [2] http://www.redcode.nl/blog/2010/07/patent-infringement/

      [3] http://www.redcode.nl/blog/2010/11/patent-infrigement-part-2/

      [4] http://www.informationweek.com/news/infrastructure/management/225702757

      [5] http://labrosa.ee.columbia.edu/~dpwe/resources/matlab/fingerprint/

      [6] http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/

    • bmeltonOct 2011

      This is almost exactly the technology behind Shazam, which has a fairly extensive catalog. Shazam 'listens' to a song when you hit a button and captures microphone data from your phone. It then takes that recorded data and listens for 'key points', which it hashes and uses to compare against its catalog.

      If you want to know more about how to implement it on your own, you could use this as a resource: http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/

      I assume the biggest drawback to be that Shazam uses a microphone, which is obviously subject to ambient noise. Shazam doesn't actually seem to have much of a problem with this, but I'm guessing a passive listener that sampled the audio output device instead of a noisy ambient microphone would work much more reliably.

    • androidbMay 2013

      It happened 3 years ago and there was nothing posted after 2010 on that issue anymore, so I believe they didn't file a suit in the end.

      Here's the links to the infringement story for those that missed it:
      http://www.redcode.nl/blog/2010/07/patent-infringement/
      http://www.redcode.nl/blog/2010/11/patent-infrigement-part-2/

    Related

    Coding Horrorblog.codinghorror.com2.1k people

    Farewell Stack Exchange

    Coding Horror
    Personal · last shared 2026
    qaaqaa.ath.cx17 people

    Imagine a world where Bash supports JSON.

    qaa
    Personal · last shared 2013
    jwzjwz.org880 people

    Watch a VC use my name to sell a con

    jwz
    Personal · last shared 2026
    freeCodeCampmedium.freecodecamp.org582 people

    A hacker stole $31M of Ether – how it happened, and what it means for Ethereum

    freeCodeCamp
    Publication · last shared 2025
    beza1e1beza1e1.tuxen.de120 people

    A collection of things that are Turing-complete by accident (2013)

    beza1e1
    Personal · last shared 2026
    Reddit Blogredditblog.com163 people

    How We Built r/Place

    Reddit Blog
    Company · last shared 2021
    Code of Robcodeofrob.com35 people

    You have ruined JavaScript

    Code of Rob
    Personal · last shared 2022
    Android Developers Blogandroid-developers.blogspot.com277 people

    Android Studio 1.0

    Android Developers Blog
    Company · last shared 2016