4 ms·
Show HN: Talk is cheap, just show me the code
- jasmaa 5y agoThis is slick. Why put the search query in the path instead of a get param though? You can't search anything with a "/".
- maxverse 5y agoIf I am guessing correctly, this is hitting the StackOverflow API and grabbing just the code bits of the answers? The SO upvotes seem to match the star count. Ex: 1. https://justshowmethecode.com/code-example/ruby-on-rails/1k9gy/rails-postgres-drop-error-database-is-being-accessed-by-other-users https://justshowmethecode.com/code-example/ruby-on-rails/1k9... 2. https://stackoverflow.com/questions/2369744/rails-postgres-drop-error-database-is-being-accessed-by-other-users https://stackoverflow.com/questions/2369744/rails-postgres-d...
- liuxiaopai 5y agoYes, you are right. Stackoverflow is one of its data source.
- nextaccountic 5y agoCould you link back to stackoverflow, maybe by adding a "source" link on the bottom? Thank you. And, if you've not read yet, please read this thread https://meta.stackoverflow.com/questions/253618/if-i-use-so-code-on-my-website-how-should-i-give-attribution https://meta.stackoverflow.com/questions/253618/if-i-use-so-... - a link is not sufficient, you also need to state that the code comes from Stack Exchange, and display the author's name (with a link to his profile) > If you're republishing content (code, or an explanation of code) that you found on Stack Overflow in a blog post or article, the attribution must be public as well. You must[1]: A) clearly indicate that it comes from the Stack Exchange Network, and give credit to the author by B) linking to the original answer/question, C) clearly indicating the author(s)' username, and D) providing link(s) to their profile page(s). > [1]. These four requirements are explicit in the Terms of Service. https://stackexchange.com/legal#attribution https://stackexchange.com/legal#attribution Moreover, this is not just a terms of service issue, the code is also licensed under CC-BY-SA > Everybody is focused on the "attribution" clause of the Creative Commons license, but Stack Exchange isn't just using the Attribution license. Stack Exchange is using the Attribution-ShareAlike license, which also requires: > If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- trevyn 5y agoService may be based in a jurisdiction where compliance with terms and licenses is optional.
- nextaccountic 5y agoYeah.. that would be shady. No justification or benefit in robbing the authors of credit. And, still, there's also the matter of copyright.
- quadcore 5y agoLove it. Feedback: add programming language used in the snippet.
- vestrigi 5y agoI think you should provide the source of the results. Also, I don't agree with the premise that to solve a problem all it needs is a code block and the explanation given is not relevant. I mean we often do just that but understanding why a solution will work or why not is key to learning how to do things in the future without looking them up. Another problem with the lack of comments is that the reader won't notice that a solution is outdated, even though someone noted that on the original StackOverflow page that the snipped originates from. Despite that the project looks very clean and fast for its start and I haven't encountered any technical problems :)
- andrewzah 5y agoThe source of the code should be shown. Also, the explanation behind the code is actually usually important in understanding how to fix the problem. I can't say I like this idea of -only- looking at code. Also I don't like the tagline of "Access your required code snippets without thinking". Software engineering is mostly about thinking... not thoughtlessly typing or copy/pasting...
- lnoir 5y agoI like this, I would definitely use it. I've been building software for years but there are still things I don't do often enough to remember accurately. In these instances all I want is the code, I don't need the explanation. This makes it very easy to find examples. I agree with the other comments stating that you should include the source of the snippets; include the name of the site and a link back to the original post. It might also be a useful feature to include the accompanying explanation — collapsed, but expandable — for those who would like quick access to it. Of course, if they are that interested I suppose they could just click on the link to the source that you'll be providing :-)
- d23 5y agoI clicked one of your first links on the homepage and got this: https://justshowmethecode.com/browse-code-examples/python%20regex https://justshowmethecode.com/browse-code-examples/python%20... I don't know what this is trying to tell me.
- bierjunge 5y agoYeah, some snippets are just wrong. Like "C++ float to int" [0]. I have expected something like: auto foo = static_cast<int>(1.5); but the first snippet was: cout << 4.35 and the second: int n = (4.35 * 100) + 0.5; cout << n; [0] https://justshowmethecode.com/code-example/c%2B%2B/22xfc/c-float-to-int https://justshowmethecode.com/code-example/c%2B%2B/22xfc/c-f...
- sodimel 5y agohttps://justshowmethecode.com/browse-code-examples/python%20loop%20dict https://justshowmethecode.com/browse-code-examples/python%20... Query: "python loop dict" Answer: > Str Object is not Callable; Python Dictionary Loop Error Yeah, okay.
- austinjp 5y agoCan you explain in more detail what your customers can buy for $399 per month?
- sergiotapia 5y agoThis is fantastic!
- nextaccountic 5y ago> How many code snippets do you have? > There are more than 33 million code snippets already in our database and more will come. What are the authors of all this code? I presume a lot of code is copyrighted. How do you comply with the license? How can people using this site can comply with it as well? Many free software licenses require attribution, for example.