Programming Practices are the commonly or not so commonly used practices in development of software. These can include things like Agile Development, Kanban, Coding shortcuts, etc.

learn more… | top users | synonyms

3
votes
2answers
191 views

Is deserializing complex objects instead of creating them a good idea, in test setup?

I'm writing tests for a component that takes very complex objects as input. These tests are mixes of tests against already existing components, and test-first tests for new features. Instead of ...
2
votes
3answers
185 views

Overloading interface buttons, what are the best practices?

Imagine you'll have always a button labeled "Continue" in the same position in your app's GUI. Would you rather make a single button instance that takes different actions depending on the current ...
14
votes
6answers
7k views

What technologies are used for Game development now days? [closed]

Whenever I ask a question about game development in an online forum I always get suggestions like learning line drawing algorithms, bit level image manipulation and video decompression etc. However ...
2
votes
2answers
388 views

Ambiguous program requirements

it seems that most of the programming exercises that I am currently doing, are a little bit ambiguous when it comes to specifying what should I do. When programmers work with clients, are the clients ...
5
votes
8answers
986 views

Grading an algorithm: Readability vs. Compactness [closed]

Consider the following exam / interview question: Implement the strcpy() function in C: void strcpy(char *destination, char *source); The strcpy function copies the C string pointed by source into ...
2
votes
2answers
405 views

Should a project start with the client or the server? [closed]

Pretty simple question with a complex answer. Should a project start with the client or the server, and why? Where should a single programmer start a client/server project? What are the best ...
20
votes
3answers
5k views

What is the meaning of 'high cohesion'?

I am a student who recently joined a software development company as an intern. Back at the university, one of my professors used to say that we have to strive to achieve "Low coupling and high ...
11
votes
9answers
1k views

Should a programmer take writing lessons to enhance code expressiveness?

Given that programmers are authors and write code to express abstract thoughts and concepts, and good code should be read by other programmers without difficulties and misunderstandings, should a ...
2
votes
3answers
233 views

What Pattern will solve this - fetching dependent record from database

I have these classes class Match { int MatchID, int Team1ID, //used to reference Team int Team2ID, ... other fields } Note: Match actually have 2 teams which means 2 TeamID class Team { ...
6
votes
2answers
1k views

Returning an IQueryable from an IRepository

Using the Repository pattern, is it proper to return an IQueryable of a data set (table), for generic usage? It is very handy in many cases, especially when using external libraries that leverage ...
1
vote
3answers
384 views

How can you learn names of methods or classes of a framework or an API?

I've been programming C++ for a year now. I've gone through the language features and I've written good programs with it, so I decided to move on to OpenGL. At first it seemed confusing. As I kept ...
12
votes
1answer
2k views

Git workflow / practices for a small project (flowchart in png)

I'm trying to come up with a personal workflow. I've put together a flowchart of the hypothetical lifespan of a release: one developer pushing to a public github repo + a friend helping with some ...
6
votes
1answer
463 views

What are the practical examples of code exploration techniques?

Code Exploration (CE) is quite a new term and I wonder if there already any successful examples of implementing this techniques in terms of Continuous Integration principles? In short, Code ...
3
votes
3answers
576 views

Is there a limit on how many global consts are used before an application is considered bad programming?

Basically, I develop websites, some large with many crud operations, etc... However I've gotten into the habit of storing re-usable data as a constant in my PHP applications I currently have 44 ...
6
votes
4answers
3k views

How should UI layer pass user input to BL layer?

I'm building an n-tier application, I have UI, BL, DAL & Entities (built from POCO) projects. (All projects have a reference to the Entities). My question is - how should I pass user input from ...
114
votes
5answers
45k views

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: ...
50
votes
16answers
4k views

Should I take care of race conditions which almost certainly has no chance of occuring?

Let's consider something like a GUI application where main thread is updating the UI almost instantaneously, and some other thread is polling data over the network or something that is guaranteed to ...
14
votes
11answers
16k views

Why is using System.out.println() so bad? [closed]

Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time. Is it really so ...
2
votes
1answer
1k views

Using captured non-local variables in C++ closures

On this wikipedia page I have found the following sentence regarding closures in C++11: C++11 closures can capture non-local variables by copy or by reference, but without extending their ...
8
votes
5answers
4k views

Is There Any Benefit To Participating On Sites Like TopCoder And Or GoogleCode?

Apart from the obvious reasons, like financial, employment and recognition, what are the practical/real benefits to using programming competition sites? It seems quite algorithmic and maths heavy, ...
3
votes
3answers
1k views

Validating best practices, property vs dto, simple type vs object

Consider an application where adds an email address to his profile and submits it. We have some dispute in our team over how to validate this email address. Some developers (including me) believe ...
1
vote
4answers
1k views

Recurring Problem - need instruction to run only once inside code which executes multiple times

Hello I find in programming I come across this problem usually (especially when dealing with certain frameworks) where I would like once piece of code to execute once and only once however the ...
2
votes
3answers
303 views

A place for putting code samples in projects

Every now and then I get or write some minimal code samples to achieve tasks. What's the usual practice for storing these samples (which could prove useful later on) ? Have a separate source folder or ...
6
votes
4answers
783 views

Should I take help of Internet and other programmers or I should do all programming myself? [closed]

I am a developer in a good company. I was given a task by my company to accomplish within a week however I finished the same in 4 days, my boss, the client, and other team members all are happy by my ...
0
votes
4answers
273 views

Best Practices when extending a project

I have to extend a web application for a customer, there is no documentation of the current app, no analysis and even worse, there is no technical support or management. The client gives me a list of ...
7
votes
4answers
9k views

Multiple Same Object Instantiation

What exactly happens in Java when you instantiate the same object multiple times? For example: Test test = new Test(); then later on I will call it again, Test test = new Test(); again or inside a ...
6
votes
3answers
892 views

What do you call an interface with no defining methods used as property setters

In ASP.NET and C# I've ran across this before. Your class needs to implement interface ISomething in order for something in the super class to supply something to you. I can't remember the details, ...
6
votes
3answers
8k views

Is it a better practice pre-initialize attributes in a class, or to add them along the way?

I'm sorry if this is a ABSOLUTELY sophomoric question, but I'm curious what the best practices are out there, and I can't seem to find a good answer on Google. In Python, I usually use an empty class ...
4
votes
2answers
4k views

Why put a simple query into a stored procedure in a web service?

I'm working as a junior programmer, and the senior programmer above me has instructed me to follow a certain unofficial policy for constructing new queries on our web development projects. Generally, ...
1
vote
2answers
346 views

What are the problems which I will face if all the classes I use are loosely coupled

Loosely coupled classes gives flexibility. If I understand it right, Event flow, Observer Pattern and Design Patterns like MVC focus on loose coupling. So in this context I am aiming towards making a ...
15
votes
10answers
4k views

Preferring Python over C for Algorithmic Programming

I've been studying a bit of algorithms and have been looking at sites like SPOJ.pl TopCoder etc. I've seen that programmers prefer C or C++ usually for most algorithmic programming contests. Now ...
28
votes
15answers
2k views

Is it wise to be going back and forth between two programming languages? [closed]

I have been writing quite a lot of PHP for nearly two years. Now I am doing .NET (mainly c#) development. However, sometimes I go back and do some php. My main question is, is it wise for me to ...
83
votes
12answers
7k views

How big does my project need to be for me to unit test it? [closed]

I assume that my project is decoupled enough to allow for unit testing. But how big, exactly, in terms of clases and functions does my project need to be to make unit testing worthwhile? We all make ...
3
votes
2answers
217 views

How long does one have to wait to consider design change in code?

I had a few days ago. I was having trouble with threads. Had lots of questions asked on StackOverflow and honestly for the first time I did not get the answer I was looking for. Finally, I decided to ...
38
votes
12answers
5k views

Unwritten rules of rewriting another team member's code [closed]

We are practicing collective code ownership. To my understanding this means that any developer can change any line of code to add functionality, to refactor, fix bugs or improve designs. But what ...
1
vote
3answers
285 views

Why categorization into “Property” and “Methods”

I am looking at the String class in Actionscript 3.0. It has a property called String.length . Internally it's a getter function (or method ?) that returns the length of string. Why can't it be ...
6
votes
4answers
3k views

What is a good starting point for small scale PHP development and would a framework be overkill?

I'm a web development intern working on a small PHP application (just a few pages with a little database access) which has fast become a couple of very non-DRY, non-OO, individual scripts. A ...
7
votes
4answers
726 views

Do some best practices depend on skill?

Is there evidence that some software development best practices depend on programming skill level? I mean, these methods are good, but maybe the way the are used or the extent might vary? This ...
1
vote
3answers
661 views

Next step after creating mock-up screens

I have created some mockup screens for my app in HTML/CSS. I have 4 screens in total. They contain no client-side coding i.e. Javascript or jQuery. The screens themselves are quite bland at the ...
0
votes
2answers
763 views

I cannot understand the application of oops How can I develop the understanding of application of oops? [closed]

I am a developer in PHP technology, I am aware of almost all the basics of OOPS, but still cannot find out the way to apply these concepts over a procedural programming. I do it in very orthodox way, ...
2
votes
3answers
2k views

Does mobile based (Android) development, benefit from Object Oriented Programming?

My development on Android is based on scientific programs and while I'm building these most of the code is in one or two long classes. When I come to deploy these programs I try to decouple everything ...
1
vote
1answer
200 views

How to handle encryption key with a large development team?

If we have a large development team, say 100, and we would like to keep our encryption key hidden from developers who are not directly involved in the encryption module/algorithm, what are some best ...
43
votes
17answers
4k views

Best practice on if/return

I want to know what is considered better way of returning when I have if statement. Example 1: public bool MyFunction() { // Get some string for this example string myString = GetString(); ...
0
votes
2answers
116 views

Guided Questioning iOS App

I'm making an iPad app that will display a few choices and based on your choice will display a series of questions with each question triggering a different set of questions. I was wondering if there ...
-1
votes
1answer
137 views

Are there any valid ways of eliminating/reducing state?

For definitions and examples of "state", see: http://en.wikipedia.org/wiki/Program_state , http://en.wikipedia.org/wiki/Finite_state_machine , http://en.wikipedia.org/wiki/State_diagram A diagram ...
1
vote
4answers
171 views

In a web application, is it ok to group multiple pages in one view class or one class per page?

If you are building a web application, and you have a user management component, is it recommended to do: class UserAdminView extends View { } or class UserAdminUpdateView extends View { } ...
16
votes
4answers
797 views

Can applications affect power consumption in a substantial way?

Is there anything that can be done for a single general purpose application to affect the power consumption of the device it is running on? I am not familiar with how optimizations to individual ...
1
vote
2answers
1k views

How do you accept arguments in the main.cpp file and reference another file?

I have a basic understanding of programming and I currently learning C++. I'm in the beginning phases of building my own CLI program for ubuntu. However, I have hit a few snags and I was wondering if ...
9
votes
7answers
975 views

Entry level engineer question regarding memory management

It has been a few months since I started my position as an entry level software developer. Now that I am past some learning curves (e.g. the language, jargon, syntax of VB and C#) I'm starting to ...
0
votes
1answer
140 views

Pending and Approval process

So let's say I have a DB table with 8 columns, one is a unique auto-incrementing used as ID. So I have a page that pulls in the info for each row based on query string ID. I want to give my users ...