A
A
Alexander Rublev2016-09-05 02:42:28
Work organization
Alexander Rublev, 2016-09-05 02:42:28

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

24 answer(s)
I
Immortal_pony, 2016-09-05
@Meller008

https://gist.github.com/

S
StrangeAttractor, 2016-09-05
@StrangeAttractor

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.

R
Ryabos, 2016-09-05
@Ryabos

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.

T
tagplus5, 2016-09-05
@tagplus5

In telegram, write to yourself in a chat (or create a channel). Structure with tags.

N
nirvimel, 2016-09-05
@nirvimel

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.

E
Elena Stepanova, 2016-09-05
@Insolita

evernote/gist

V
varezprog, 2016-09-11
@varezprog

I use copypastecode.ru (does not require installation), I
put the base in any folder with the cloud (yandex.disk, google.drive, dropbox...)

Z
zooks, 2016-09-05
@zooks

The code has already been answered, and "something else" can be written to Zim , synchronized to the cloud.

S
Stac, 2016-09-08
@Stac

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.

A
Andrew, 2016-09-08
@iCoderXXI

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 ...

L
lukoie, 2016-10-10
@lukoie

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.

A
Andryukha, 2016-09-05
@syrov

Get just a text file. And edit it with vim. And ssh, etc.

I
Ildar N, 2016-09-08
@radli

I use it for everything, including the cherrytree snippet .
Synchronization decided through the cloud. Try it, you might like it.)

A
abcd0x00, 2016-09-08
@abcd0x00

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!

Emacs is responsible for everything for me. There you can not only store them, but also execute them directly in the text.
Накидал тебе примерные коды, повыполнял их. А вообще, там можно хранить много чего: всякую метаинформацию, живые таблицы типа экселевских. Тут по минимуму: теги справа для поиска кодов определённой группы (языка); ссылки куда что, для подробностей.
Откроешь картинку в отдельной вкладке, она будет в нормальном размере.
Эти куски можно редактировать, тогда они подсвечиваются синтаксически в соответствии со своим языком, который там указан.

6
680682, 2016-09-10
@680682

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)

B
bereiro, 2016-09-20
@bereiro

Welcome to TiddlyWiki , a unique non-linear notebook for capturing, organizing and sharing complex information.

X
xmoonlight, 2016-09-05
@xmoonlight

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.

D
di23, 2016-09-06
@di23

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.

V
vlad532, 2016-09-17
@vlad532

I do not use these different sites, I save VK to myself, and that's it

V
Vitaly Makeev, 2016-10-01
@wmakeev

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.

D
dom1n1k, 2016-10-21
@dom1n1k

In the folder / repository of each project there is a text file (or even more than one) with notes. Old school.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question