Most voted "programming-principles" questions
SHOULD NOT BE USED for beginner subject. This tag is about rules, laws, programming axioms.
Learn more…19 questions
Sort by count of
-
90
votes2
answers4577
viewsDRY is to avoid redundancies, right?
The DRY means Don’t Repeat Yourself. So every time I see a repeat in the code I’m not doing DRY? Is DRY about not having redundancies? How it should be applied?…
terminology software-engineering encoding-style programming-principlesasked 8 years, 8 months ago Maniero 444,682 -
64
votes1
answer5474
viewsProgramming facing the interface and not the implementation, why?
What are the main reasons (in practice) that lead developers to apply the practice of developing for interface and not for implementation?
-
40
votes3
answers1255
viewsWhat is SRP and how is it used?
I know what SRP means Principle of Single Liability. Each class must be responsible for such a thing. What should I do to detect that I am violating the SRP? What I must take into account to apply…
pattern-design software-engineering programming-principlesasked 9 years ago Wallace Maxters 102,340 -
30
votes3
answers8297
viewsWhat are the principles DRY, KISS and YAGNI?
These three principles (DRY, KISS and YAGNI) are widely cited in web. What are they? Who created them? How and where can they be applied?
-
21
votes1
answer1449
viewsWhat are the SOLID principles?
Lately, I’ve heard a lot about the term but for me it’s never clear if it’s a Pattern design or good practice in object orientation. Maybe it’s a very broad question, but why SOLID is useful and…
oop software-engineering solid programming-principlesasked 7 years, 11 months ago ldeoliveira 2,015 -
15
votes1
answer2776
viewsWhat is the difference between testing and debugging?
In the book "Introduction to Software Testing" of Ammann & Offutt mentions in p.32 the 5 levels maturity models of software testing: Level 0 - No difference between testing and debugging. Level…
-
13
votes3
answers818
viewsSOLID is all that they say?
Related: What are the SOLID principles? I ordered my "Agile Principles, Standards and Practices in C#" by Robert C. Martin and one of the reasons is SOLID. But I’m reluctant about SOLID. I don’t…
-
9
votes2
answers650
viewsWhat is Separation of Interests (Soc - Separation of Concerns)?
I noticed that we don’t have a question about this topic. Separation of Concerns (Soc), also known as: Separation of interests Separation of concerns Separation of responsibilities Separation of…
software-engineering software-project programming-principlesasked 5 years, 2 months ago Piovezan 15,850 -
7
votes0
answers166
viewsHow to learn object orientation correctly?
A lot of the "OO" code you see around is procedural. I have already committed and continue to commit several "sins" per day by programming OO. The paradigm is not easy to learn and it takes time,…
-
5
votes0
answers51
viewsHow to gain insight into new programming technologies and techniques?
You look like you’re subject to opinion/debate, but I wanted to try to fit a question into that line. It is important for a good programmer to know how to evaluate trade-offs (pros and cons of…
-
4
votes1
answer66
viewsFollow the OCP principle or use "instanceof"
The OCP principle preaches: "open to extension, but closed to alteration". To achieve this we need to abstract, because with an abstraction we can extend without needing to change the one that uses…
-
4
votes1
answer44
viewsHeap things on a function x DRY
That bold bit taken from here it wasn’t very clear to me: DRY solves what? Some may still be thinking that DRY is to reduce typing. Or at least gain maintenance time. It’s even in the latter case,…
-
4
votes2
answers123
viewsHow far should we follow OCP?
When developing a screen for a certain part of a system, I come across a classic situation of owning some ifs to determine what action should be taken. I then linked this case to examples of OCP…
-
2
votes1
answer48
viewsFunction to create charts per column
I’m using this code to plot age pyramids: p_etarias <- read.csv(file "C:\\Users\\User\\Desktop\\DemandasCEInfo\\20200327_CNSAÚDE\\Piramides\\R\\p_etarias.csv", sep = ";",dec = ",", header = TRUE)…
-
2
votes1
answer32
viewsInitialization of variables in Java
Good night Folks! I’m learning java, and if you can help me with that question,... I saw it in a course that I’m doing, in a book that I’m reading, and on websites where I researched this assuming…
java variables typing initialization programming-principlesasked 3 years, 4 months ago Tarcio Vinicius Nieri 73 -
1
votes1
answer197
viewsVisualg does not recognize the "fimse"
My algorithm is this below: Question. Request the wedding year, the current year and write the following messages, for the following cases: 25 years - "Silver Wedding"; 50 years - "Golden Wedding"…
-
1
votes1
answer48
viewsHow does access to strings in an array work?
Create a program that receives the date in numeral and then return it in full. I tried to do a few times, but I ended up merging my code with one I found from a forum and came out like this:…
-
-2
votes1
answer117
viewsWhy do they say that the use of global variables is bad practice?
I’ll get straight to the point. In internet tutorials outside, you always find someone criticizing some, considering it as a "bad practice". For example, one of them is the use of the keyword…
programming-principles paradigms global-variablesasked 8 years, 7 months ago Wallace Maxters 102,340 -
-2
votes1
answer48
viewsHow can I print my results in a text file?
Well, I need to solve some linear systems through the Jacobi method using Python 3.8 programming, I made the code (which I’ll leave below), but I can’t make a print file that stores my results in an…
python-3.x mathematics file-system computer-vision programming-principlesasked 4 years, 7 months ago Victor Cunha 1