Programmers Weekly Newsletter
Programmers Weekly Newsletter

Top new questions this week:

How accurate is "Business logic should be in a service, not in a model"?

Situation Earlier this evening I gave an answer to a question on StackOverflow. The question: Editing of an existing object should be done in repository layer or in service? For example …

design-patterns layers  
asked by Jeroen Vannevel 43 votes
answered by Aaronaught 17 votes

Is there any "real" reason multiple inheritance is hated?

I've always liked the idea of having multiple inheritance supported in a language. Most often though it's intentionally forgone, and the supposed "replacement" is interfaces. Interfaces simply do …

programming-languages architecture class-design inheritance multiple-inheritance  
asked by Panzercrisis 39 votes
answered by Mike Brown 25 votes

Updating password hashing without forcing a new password for existing users

You maintain an existing application with an established user base. Over time it is decided that the current password hashing technique is outdated and needs to be upgraded. Furthermore, for UX …

security language-agnostic passwords  
asked by Willem 23 votes
answered by BrianDHall 19 votes

Why not expose a primary key

In my education I have been told that it is a flawed idea to expose actual primary keys (not only DB keys, but all primary accessors) to the user. I always thought it to be a security problem …

security theory software-design accessibility  
asked by Angelo Neuschitzer 17 votes
answered by Angelo Neuschitzer 0 votes

How to identify potential for becoming a programmer

There's heaps of information out there on hiring someone who's already a programmer. (Or claims to be one.) But what about identifying someone who has the potential to become a programmer, with …

learning interview hiring developing-skills  
asked by Jacob Spire 14 votes
answered by BrianDHall 14 votes

How do I create an environment where fixing tests is seen as a priority?

I am a software engineer at a medium sized company. We have a fairly robust testing platform running on TeamCity. It does unit tests on every checkin, and a daily unit test/BVT run. The problem is …

testing unit-testing tdd culture leadership  
asked by Pheonixblade9 12 votes
answered by Aaronaught 17 votes

Is "If a method is re-used without changes, put the method in a base class, else create an interface" a good rule-of-thumb?

A colleague of mine came up with a rule-of-thumb for choosing between creating a base class or an interface. He says: Imagine every new method that you are about to implement. For each of them, …

object-oriented interfaces inheritance  
asked by exizt 11 votes
answered by Simon 10 votes

Greatest hits from previous weeks:

How should I behave as a developer in a project that's headed for failure?

I am a developer in a 5-member team and I believe our project is headed for disaster. I'll describe why in a moment, but my question is: how should I behave? The deadline is in 1.5 months, and I …

project-management team project failure legacy-code  
asked by Louis Rhys 249 votes
answered by MrFox 251 votes

Is it a bad practice to modify code strictly for testing purposes

I have a debate with a programmer colleague about whether it is a good or bad practice to modify a working piece of code only to make it testable (via unit tests for example). My opinion is that it …

c# programming-practices testing unit-testing refactoring  
asked by liortal 56 votes
answered by Robert Harvey 104 votes

Can you answer this?

What are the tradeoffs involved in referencing Context in a library?

Context is one of the core classes of Android, and many functions it contains are useful in Android library projects, particularly accessing configuration. What are the trade offs involved in …

android libraries  
asked by C. Ross 1 vote
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3