Readit News logoReadit News
proc0 · 6 years ago
Not to diminish the effort, but the use case for this can only be a role that requires a ton of snippet handling, which inherently means you are doing something wrong as a programmer (imho). Once you get to a point where you are regularly using snippets a lot, writing some automated script is the next step, not a tool that makes it easier to copy/paste.
penagwin · 6 years ago
Snippets for me are things I find that I google and copy+paste from stackoverflow semi-frequently. See the example here, it prints the currently loaded settings in Django. I don't use it super frequently (say a few times a month, depending on what I'm doing), but it's faster for me to find with a snippet manager then copying from the same stack overflow answer.

> python manage.py diffsettings --all

tiredyam · 6 years ago
just make an alias :o
ktm5j · 6 years ago
Or you work with a lot of different languages and you can only keep so many bits of syntax particulars in your head.
onion2k · 6 years ago
What would the "automated script" do?

My use case for snippets is mainly to stub out tests, components, and stories - things that are largely an exercise in boilerplate code with fill-in-the-blanks changes to start with. I can't think of a way to do that with a script that would be less effort than a snippet.

proc0 · 6 years ago
I may be missing some key use cases, but presumably you would somehow use the same snippet again and again otherwise why have it in some tool, ready to go. Once you are using that snippet a lot, then I think the incentive to make it part of the running script is high, or even creating a new repo to track those snippets and then link that somehow.
aspaceman · 6 years ago
I've got a lot of things like this in C and C++ for debugging. Like how to make a macro print a macro, or stuff like that.
gitgud · 6 years ago
This was my initial reaction too. Ideally popular code snippets should be published in a library or tool, which can be versioned and distributed easily...

But in reality the overhead of creating and maintaining a library/tool/package can be enormous, for relatively small gains in re-usability (see: https://xkcd.com/1205/).

This snippet library seems more like a step before creating a library, kind of like note taking apps are a step before blog posts or publications.

I think you could still use this and be a good programmer.

JimmyRuska · 6 years ago
If you don't need the syntax highlighting, keepassXC does a good job of this. It's a free password manager. You can create a new folder called code-snippets and make the URL portion of each entry the code one-liner. You can copy url to clipboard from app with CTRL+U. This also has the nice property that you can password protect your snippets. You can also store them in notes or with attributes.

Cherry Tree, Joplin, Zim, Trilium Notes; all have the ability to create a tree-like folder structure.

jcolella · 6 years ago
Just want to say this is great. Poor execution on the demo. README is incomplete. A basic getting started would have sufficed in this case.
arsalanb · 6 years ago
Awesome! I've been looking into a way to manage my own code snippets. I'm a huge fan of ThisCodeWorks (https://www.thiscodeworks.com/), which has gamified snippet storage to an extent. Also great for sharing snippets around. It's still in beta, but looks good so far!

Dead Comment

xaduha · 6 years ago
I was recently looking for one and I will check it out, but I think I'll probably just use some git folder with snippets and a ripgrep alias for searching, I don't need much.
thrownaway954 · 6 years ago
Your demo gif doesn't convey your idea __at all__. What is going on in it? To me it just looks like you are typing in a hello world function in jaavascript... where does the snippet portion come in? After I create a snippet, how do I use them in my current project and current editor? I really think you need to create demos showcasing these use cases cause as of right now i'm confused as to why this project even exists.
cddotdotslash · 6 years ago
Here, I rewrote your comment to say the same things in a friendlier way. There are nicer ways to provide feedback.

> I would recommend updating your demo GIF to more accurately portray the idea. Perhaps instead of just typing the function into the text editor, it should also convey how snippets can be saved and reused at a later point. This would give me a better idea of how to utilize the project.

wnoise · 6 years ago
Stet.

The comment wasn't particularly unfriendly at all. It didn't contain any personal attacks or contentless bashing. Indeed, the comment did something valuable: identified a problem, and thoroughly described why it was a problem. If the only way some one can give usable problem analysis and criticism is by including suggested fixes, and delicately toning down the criticism, then far fewer people are going to be willing to expend enough effort to interact beyond meaningless cheerleaderism.

In fact, your suggestion of a different way to criticize comes across to me as incredibly condescending -- to both the commenter and the original author.

derp_dee_derp · 6 years ago
There was nothing unfriendly about the original phrasing.

Dead Comment

trwhite · 6 years ago
I agreed with what you're saying, but there's a nicer way to say it. Please be a little more considerate.

Dead Comment

antonreshetov · 6 years ago
Of course, I will update README in more detail later. Now all my time is spent on PoC. MassCode is an application for organizing snippets such like as SnippetsLab, Quiver or Boostnote. What makes it different is that it uses Monaco editor as a code editor, it allows for autocompletion in the main frontend languages - HTML/CSS/JavaScript. And of course Emmet :)
thrownaway954 · 6 years ago
awesome!
thepaulstella · 6 years ago
What? This is literally just Apple Notes for code snippets. What’s the confusion?

Dead Comment

jjeaff · 6 years ago
Nice. Does it store the snippets in a got repo? Or can it use gitlab or GitHub snippets as storage, if not, that would be handy.
lostintangent · 6 years ago
If you’re using VS Code, you can checkout GistPad, which allows managing code snippets, mini-docs, and interactive/CodePen-like playgrounds, all backed by GitHub Gists: https://aka.ms/GistPad.

Disclaimer: I built GistPad, and am just mentioning it since you mentioned GitHub-based snippets.

Throwaway656543 · 6 years ago
I use Sublime as my code editor. Anything that I need to save as a code snippet goes into its own Snippets project. That way, I can organize it easily and open up the project whenever I need it. No separate application necessary since Sublime is already editing my code anyways.