Co

Code search for StackOverflow

Hacker News

Code search for StackOverflow

This is an afternoon project that I whipped up yesterday to search inside code blocks in StackOverflow posts. I often find myself going to stackoverflow or similar sites to find example snippets of code for something that I can't quite remember how to do. E.g. I'm working on a Grails app and I want to specify a maximum length for a domain object field. I know that I need to add a constraints block, but I can't remember the exact syntax - is it fieldname(maxlength:10) or fieldname { length, 10 } or something different. All I really need to see is an example to remind me how to do it. So I build this page, which searches stackoverflow posts for a posts with a given tag which contain a query string inside a code block, and displays them as snippets. You can click through to the full SO post for each result by clicking on the title. This page is the hackiest of hacks; it uses the stackexchange data explorer to grab results, so it's very slow for tags that have a lot of posts. If other people find it useful then I'll redo it properly with a local database with full-text indexing.

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: code · Missing: mac, agents, macos
69%69% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
54%54% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide · Missing: https docs, excited, just released
42%42% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
35%35% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
29%29% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
21%21% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Se
SeattleCodeCases – search Seattle code violation cases63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SeattleCodeCases – search Seattle code violation cases

Hacker News2
Co
Code Search on Local Directories44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Code Search on Local Directories

Hacker News4
Ar
Artist search43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Artist search

Hacker News1
An
An NSFW Tumblr Search60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An NSFW Tumblr Search

Hacker News45
Se
Search your clouds63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Search your clouds

Hacker News18
He
Helix I/O – Ultrafast genomic search48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Helix I/O – Ultrafast genomic search

Hacker News27
Ti
Tipue Search 4.0 released48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tipue Search 4.0 released

Hacker News1
Pr
Prospecter – A prospective search implementation in Java35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Prospecter – A prospective search implementation in Java

Hacker News2
Se
Search by Writting48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Search by Writting

Hacker News4
Di
Distributed search for Beal's Conjecture counterexamples64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Distributed search for Beal's Conjecture counterexamples

Hacker News1