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
2
votes
2 answers
MVC patterns with WPF + NHibernate + IoC
I'm looking for patterns and principles for using with WPF and NHibernate in model-view-controller style.

Fitzchak Yitzchaki
- 9,095
- 12
- 56
- 96
2
votes
3 answers
ArrayList internal implementation
Hopefully this is not a duplicate.
Before anything, I know ArrayList are not the best choice but this is just curiosity.
Simply, I was wondering about the implementation of ArrayList. I looked and figured out it uses an array for storage.
For…

Everts
- 10,408
- 2
- 34
- 45
2
votes
4 answers
How does the design of JavaBeans square with information hiding?
Two semesters ago, I had a professor who said:
Some of you have been told to always include setter and getter methods for all private instance variables. I say that this breaks information hiding, and often results in systems where invariants…

Pops
- 30,199
- 37
- 136
- 151
2
votes
4 answers
Is it ok to call a virtual method from Dispose or a destructor?
I can't find a reference to it but I remember reading that it wasn't a good idea to call virtual (polymorphic) methods within a destructor or the Dispose() method of IDisposable.
Is this true and if so can someone explain why?

Kepboy
- 3,733
- 2
- 30
- 43
2
votes
2 answers
data access: exception to 'Tell, don't ask'?
Are data access objects an exception to the rule 'Tell, don't ask'?
Eg get last 10 posts from a table data gateway?

koen
- 13,349
- 10
- 46
- 51
2
votes
5 answers
Is there anything wrong with writing parts of a webpage in XHTML with an HTML doctype?
I've just recently started learning HTML/CSS and I've been trying to teach myself sound web programming practices. I'm familiar with XML, so coding up webpages in XHTML was intuitive enough and it just seemed like a sound thing to do. However,…
user128462
1
vote
1 answer
C# overloading operator==: Return something else than bool
I'm writing a class library to solve non-linear equations using newton's method. I stumbled across operator-overloading and thought about overloading the ==-Operator. Something like expression1 == expression2 returns the solution as a Constant,…

Damien Flury
- 769
- 10
- 23
1
vote
1 answer
How to gracefully integrate unit testing where none is present?
I have been tasked with developing a document for internal testing standards and procedures in our company. I've been doing plenty of research and found some good articles, but I always like to reach out to the community for input on here.
That…

soup_king
- 21
- 1
- 9
1
vote
1 answer
How to populate Subject from the TAIResult?
I've implemented com.ibm.ws.security.web.saml.ACSTrustAssociationInterceptor according to this article https://www.ibm.com/developerworks/library/mw-1612-lansche-trs/index.html. And it seems working. Anyone has an example code to populate subject…

rickcoup
- 275
- 1
- 5
- 20
1
vote
1 answer
In paging, It is not necessary to add page offset to the starting address of the page frame to generate a physical address
In the answer(in the book), I am not getting the following-
"The starting address of an n-bit page frame is a multiple of 2^n. Thus, the bit pattern of the frame's starting address consists of the frame number followed by n 0's."
Please explain.

log0
- 2,206
- 2
- 14
- 24
1
vote
2 answers
technical aspects of 'isa' in c++
what exactly does it mean from technical point of view, I understood that it means that my derived class can always be converted to base class, that's it? I read some materials without any reference to technical aspects, only philosophy! thanks in…

rookie
- 7,723
- 15
- 49
- 59
1
vote
3 answers
How come a server-side script like PHP is able to control client-side cookies?
I'm a newbie and at the moment I'm learning PHP by designing a small and basic web page. I want to add a cookie handling script to my code. First I was planning to do it by Javascript. But when I browsed cookie managing functions of PHP and saw how…

hkBattousai
- 10,583
- 18
- 76
- 124
0
votes
1 answer
Principles of push notification on iPhone (got the test running, now what?)
I want to add push notification for my app. I googled an got the stuff running in test mode. I:
set up the certificate, provisioning profiles, everything
set up a live server
obtained my device code
used simplepush.php to send a push to my…

Jack33
- 121
- 1
- 9
0
votes
4 answers
Programming Principles: Assignement vs Conditions
I did some research but couldn't find the answer I was looking for so I figured I'd address this issue here. I guess it's better to demonstrate it using examples, so consider the following snippets of code:
int delta = 0;
if (some_condition)
…

rexem
- 109
- 2
- 8
0
votes
0 answers
Is it okay to throw exceptions and errors from not controller or request class in Laravel or in general?
Is it okay to throw exceptions and errors from not controller or request class in Laravel or in general ?
I have a lot of business logic in my "Repository" class, where I put code to work with data and the database (through Eloquent models). It's…