You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 1So as I understand, the main reason to make some piece of code into a library is when it is going to be used across different projects (even if they are all internally developed) in order for that code not to be duplicated, updated, maintained separately? And if you are only going to be developing a single project then there is no need to make something into a library (unless you intend on using it in further projects at a later date).AndyM– AndyM2017-08-25 20:02:23 +00:00Commented Aug 25, 2017 at 20:02
- @AndrewMurtagh: Yes, that's pretty exactly how I'd put it. Although there may be technical reasons too; I'm not that familiar with C/C++ development - maybe keeping part of the code as a library is necessary so it can be loaded optionally or even loaded and unloaded on demand, and thus reduce memory usage when the fuctionality is not needed?Michael Borgwardt– Michael Borgwardt2017-08-25 20:09:37 +00:00Commented Aug 25, 2017 at 20:09
- I believe that may be possible through shared libraries. Thanks for clarifying, I'll mark your answer as accepted.AndyM– AndyM2017-08-25 20:21:48 +00:00Commented Aug 25, 2017 at 20:21
- Nearly every VCS for the past decade supports external references or submodules. This removed the duplicate code and bugfix problem. Might include more information on why these aren't a viable solution if you still believe they're valid problems.Sirisian– Sirisian2017-08-25 20:28:53 +00:00Commented Aug 25, 2017 at 20:28
- Think also in maintenance. 1) The lib can be maintained independently and in parallel. 2) Is code easy to replace. 3) Small code base are easier to manage for small teams and easier to understand for everybody. 4) if time-to-market is critical, you will prefer to have faster builds. Code in libs is code you don't compile over and over in the pipeline (IMO). 5) It's reliable reusable code... You made It ;-)Laiv– Laiv2017-08-25 20:39:52 +00:00Commented Aug 25, 2017 at 20:39
| Show 1 more comment
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you