Linked Questions
11 questions linked to/from Best practices for sharing tiny snippets of code across projects
2
votes
2
answers
2k
views
How to avoid code duplication across unrelated projects [duplicate]
I'm a contractor at a large Telco where I'm usually working on several different projects at once.
The VCSs I use (mainly git and mercurial) tend to make me keep the code bases for unrelated ...
1
vote
0
answers
2k
views
How to save useful code snippets? [duplicate]
I do a lot of web development and there are many code snippets that come up again and again so I dive back into the most recent project where I used it which isn't that efficient.
How do you store ...
44
votes
7
answers
5k
views
How do you keep track of what classes and functions your team has written?
When working on code, I face many of the same challenges that my teammates do, and I have written some helpful functions and classes, and so have they. If there is good communication, I'll hear about ...
31
votes
8
answers
3k
views
good replacement for commenting out code? [duplicate]
It bothers me to see commented out code and it seems often-times a symptom of developers not being proficient in advanced source control features, but on the other hand source control does not really ...
10
votes
8
answers
4k
views
When is a 'core' library a bad idea?
When developing software, I often have a centralised 'core' library containing handy code that can be shared and referenced by different projects.
Examples:
a set of functions to manipulate strings
...
4
votes
5
answers
567
views
How do I let programmers know something useful?
Quite often I go through pain to discover how to do something useful, in this case how to get PHP running on Google App Engine without the 'resin.jar too big' problem, but I have nowhere to let people ...
10
votes
7
answers
955
views
How should "useful throwaway" scripts be handled?
You know how it goes: there is some small repetitive task for which you found a way to quickly automate 95% of the work. You create a script, run it, manually fix the output, and you're done. Of ...
6
votes
2
answers
4k
views
How to efficiently store code snippets?
I've noticed that a lot of my work follows this pattern:
Decide that I need to add a behavior (say, align table columns right)
Recall that I did it few months ago on a different project, try to ...
0
votes
2
answers
331
views
How to Maintain Rarely Used Scripts
I come across the need to do a lot of one time scripts (related to API evaluations, data extraction, experiments etc.) that have the potential only to be used very rarely in the future. These could be ...
-2
votes
1
answer
595
views
Are there good practices or even conventions to store LLM prompts I use while coding?
I sometimes use some language model assistance (e.g., GPT-4o) while coding. I'd like to save somewhere the prompts and language model versions I used. Are there good practices or even conventions to ...
2
votes
1
answer
223
views
How do I work on a new project and simultaneously add generic code to a base library with version control?
I work on several projects and sometimes they share a common base. How do you work with version control?
Here's an example:
I've got a boilerplate Wordpress plugin that I reuse. On each new ...