Use for questions related to programming principles; Principles describe laws or rules that according to their proponents are nearly universal truths in software engineering.
Questions tagged [principles]
64 questions
0
votes
2 answers
How to organize my classes?
I'm developing a small project in ASP.NET MVC to manage photos, but I don't know how to organize my classes in namespaces.
I have 2 base classes (Photo and Category). Should I put these classes into which namespace? Domain? POCO/POJO?
For Data…

MCardinale
- 1,408
- 2
- 15
- 22
-2
votes
2 answers
Always do it with the same method every time, is this usable in Software projects?
I was out running.. listening to a podcast about Toyota.. anyway.
This principle I think does not come to use in the software projects. (maybe project management). The art is still to young. We don't know what we are doing, at the moment. But…

Flinkman
- 17,732
- 8
- 32
- 53
-3
votes
1 answer
Looping a Java List based on a pre-knowledge of its element data?
Consider the scenario:
List weekdays = Arrays.asList("sun", "mon", "tue");
long sunTemp = 0;
long monTemp = 0;
for(String day : weekdays){
if(day.equals("sun"){
sunTemp = getSunTemp();
}else if(day.equals("mon")){
monTemp =…

Gadam
- 2,674
- 8
- 37
- 56
-4
votes
1 answer
C++ Priciples and Practice Exercise - Finding primes from input value n
Found this answer to Ch4Ex15 of Stroustrups beginner book, the question is to find the first n amount of primes:
#include "std_lib_facilities.h"
bool prime (vector table, int number) {
for (int i = 0; i < table.size(); ++i)
if…

mountaincabbage
- 1
- 1