6 ms·
Hey HN, I started this project last Tuesday to scratch my own itch. It's basically copy/pasteable code snippets for common tasks in many languages. Like many
by alex_portabella 6y ago
Hey HN,
I started this project last Tuesday to scratch my own itch. It's basically copy/pasteable code snippets for common tasks in many languages.
Like many developers I work in different languages and often forget syntax or how to do simple things. I find if I'm working in a big codebase I can usually get comfortable quickly, but it's when I'm faced with a blank page in my editor I think... err how do I do this again?
- junon 6y agoI've had this idea but with libraries instead. Neat to see some similar lines of thinking. Some questions: - Is the project open-source? - Why no github signin? - How do you search for X but only in Y language? - How are you going to deal with duplication? - Will you be doing a full 2D spread of combinations? E.g. writing to a file is pretty common - perhaps you can create a relationship between languages so that you can see how it's done in other languages from the same page. - How will you handle cases where there are multiple ways of doing things? - Is search broken? "Write to a file" is the first entry there without searching, but searching for "write to a file" shows no entries. - How will you handle cases where environment matters? E.g. writing a file in Javascript is going to be different between web browsers and Node.js, and force-inlining a function is going to be different between clang and msvc, etc.
- alex_portabella 6y agoCool! Yeah that's another good use case. With ecosystems like NPM (ie. ones that have so many packages) it can be really hard to know which library to use. - Is the project open-source? Not open source yet but no reason why it can't be. - Why no github signin? Good point. I recently mulled over which O Auth providers to support and for an MVP I decided Google was enough. - How do you search for X but only in Y language? - Will you be doing a full 2D spread of combinations? The idea is the page "How to write to a file" has all the language examples - How are you going to deal with duplication? If it gets popular I will deal with that issue then. - How will you handle cases where there are multiple ways of doing things? - How will you handle cases where environment matters? You can have multiple examples per language. The one with the most votes will be most prominently displayed.
- junon 6y agoSorry, updated my post slower than you answered :D I had a few other questions
- alex_portabella 6y agoNo worries! I just updated too. Hope your questions have been answered
- dpryden 6y agoMy first reaction to the page was: how do I know who wrote these? How do I know whether they are right or wrong? How do I correct ones that I can see are incorrect (or at least misleading)? I don't see any "about this site", "who created this site", etc. I don't see any information about who authored a particular snippet. Perhaps more information is available if you log in? But it seems like it should be possible to evaluate the trustworthiness of a site _before_ sharing information with it, so I don't feel comfortable interacting with the site as it is.
- alex_portabella 6y agoGood points, thanks for posting. I stated elsewhere in this thread but the project is only 6 days old. I haven't had time to code up an /about page, reputation system and user profile pages just yet.