Answer the question
In order to leave comments, you need to log in
A programmer's notebook?
Good evening!
Experienced programmers, tell me how or where do you write useful pieces of code or functions or something else?
It should also be comfortable! And it is desirable that it would be possible to look from anywhere!
I am faced with the fact that I constantly spy on banal SQL queries (SELECT, UPDATE, and so on) even though I know them.
Thank you! I hope I made the question clear)
Answer the question
In order to leave comments, you need to log in
I don’t write it down anywhere because the usefulness of a piece of code taken out of context is doubtful, and you never know in advance what, in fact, will be needed, so I see no reason to produce additional entities. I just look in my old code when necessary. But just in case, I subscribed to the question - suddenly someone will tell you something cool.
I am using Evernote. Not so long ago, the function of inserting code (not as text) appeared there, it is very convenient for creating an abstract. But it will take some time to get used to it.
In telegram, write to yourself in a chat (or create a channel). Structure with tags.
As soon as I need to copy-paste the code, and I understand that there is nothing to be done about it (the DRY principle cannot be observed), I conclude that this tool (language, framework) is unsuitable for development, and I need to urgently run away from it.
A suitable tool is not one that is popular with Indians, and not one that hipsters pray for (they will pray for another tomorrow), but one that will never make me violate the DRY principle and will always make it possible to highlight the common features of two pieces of code and leave only their pure differences.
I use copypastecode.ru (does not require installation), I
put the base in any folder with the cloud (yandex.disk, google.drive, dropbox...)
The code has already been answered, and "something else" can be written to Zim , synchronized to the cloud.
I call it "function library".
Useful pieces of code are organized into functions and written into files arr.php, cache.php, xml.php, mail.php, .... .
For use in projects, I include the necessary files, but more often the entire library using composer.
I don’t write anything down anywhere, the same code has never come in handy twice.
You need to master the basic things so that at 3 o’clock in the morning you will be woken up and your teeth will bounce off, everything else is according to reference books and guides.
In general, everything that is repeated is taken out to libraries and frameworks.
If the repeated code should be in some kind of note, then something is wrong with the architecture and worldview, because copy-paste and spaghetti are detected, and this immediately leads to troubles.
In modern JS, everything that is repeated is repeatedly rendered into modules with a sufficient degree of abstraction ...
it's strange that no one here advised CintaNotes to
have a global hotkey, so just select the text anywhere, and control+f12 makes a note.
there are tags, quick search, auto-save, several databases can be opened at the same time
automatically picks up the url from where the text was saved, if it is saved from the site, inserts the date
shorter - this is exactly what you are looking for.
Or WikiPad - but it does not have the advantages of the previous program, but there are pluses ... which are not needed in your case, but they were better for you. So WikiPad is a worthy alternative to them, but I repeat - in your case it is redundant.
I use it for everything, including the cherrytree snippet .
Synchronization decided through the cloud. Try it, you might like it.)
Experienced programmers, tell me how or where do you write useful pieces of code or functions or something else?
It should also be comfortable! And it is desirable that it would be possible to look from anywhere!
text file . opened in vim , which is opened in guake (dropped by hotkey). Sections in the file are marked with labels. file is on bitbucket.org
======
@bash
ls -al
...
======
@git
...
======
@your_tag
...
======
for operational enough access.
I still use devdocs.io and it’s also very convenient to write docks in confluence (syntax highlighting, search, uploading to PDF)
Welcome to TiddlyWiki , a unique non-linear notebook for capturing, organizing and sharing complex information.
1. File cloud storage (preferably with online content editing and synchronization to a local PC) or your own private blog with the ability to publish code with markup (inside the article) and attach files to the publication.
2. Google Forms (create and save the link) and send yourself all the necessary data by mail. On the mail - a filter in the snippets folder.
As already advised, I use Gist, but I also push links to the necessary pieces in Workflowy. I advise you to feel this "program", a very powerful tree.
I do not use these different sites, I save VK to myself, and that's it
All snippets are stored in Github Gist, but it is not convenient to search and classify there. Therefore, I use Gisto
as a client for Gist . Full synchronization with Gist, tags, end-to-end search. Not the best interface. But nothing better has been found. PS
There is also GistBox , but it is no longer supported, and the tags are not synchronized with Gist.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question