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.
2
votes
3answers
530 views
How To Start Programming [closed]
I have taken a programming course 2 years ago but I haven't worked in programming since then. I recently found a programmer job, but there is no programming team so for me to gain valuable experience ...
0
votes
3answers
130 views
Best practice to propagate preferences of application
What is your approach with propagation to all classes/windows of preferences/settings of your application?
Do you share the preference_manager class to all classes/windows who need it or you make ...
0
votes
1answer
114 views
How do I parse a header with two different version [ID3] avoiding code duplication?
I really hope you can give me some interesting viewpoints for my situation, because I am not satisfied with my current approach.
I am writing an MP3 parser, starting with an ID3v2 parser.
Right now ...
6
votes
3answers
235 views
Style bits vs. Separate bool's
My main platform (WinAPI) still heavily uses bits for control styles etc. (example).
When introducing custom controls, I'm permanently wondering whether to follow that style or rather use individual ...
38
votes
10answers
3k views
Why are exceptions considered better than explicit error testing? [duplicate]
Possible Duplicate:
Defensive Programming vs Exception Handling?
if/else statements or exceptions
I often come across heated blog posts where the author uses the argument: "exceptions vs ...
5
votes
4answers
169 views
Should I comment Tables or Columns in my database?
I like to comment my code with various information, and I think most people nowadays do so while writing some code.
But when it comes to database tables or columns, I have never seen anyone setting ...
4
votes
2answers
1k views
Git branching and tagging best practices
I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag?
For example, say I ...
1
vote
5answers
515 views
“Opportunity” to take over maintenance of a small internal website. What should I do?
I have been offered an "opportunity" to take over maintenance of a small internal website run by my group that provides information about schedules and photos of events the groups done.
My manager ...
21
votes
7answers
1k views
What do you do with coder's block? [closed]
Lately it has been a bit rough. I basically know all the things I need and all the avenues to get there for work. There's been no real issue of a problem with too high complexity, and performance is ...
38
votes
7answers
2k views
How can I get my progress reviewed as a solo junior developer
I am currently working for a 2 person company, as the solo primary developer. My boss gets the clients, mocks up some png design templates and hands them over to me.
This system has been working fine ...
4
votes
2answers
240 views
Any good hackathons/competitions to refresh my programming skill? [closed]
I spent this summer as a PM, so my programming skills may have gotten a little rusty.
I want to refresh those skills, and I'm looking for things like online hackathons or competitions. Preferably ...
24
votes
9answers
2k views
Simple vs Complex (but performance efficient) solution - which one to choose and when?
I have been programming for a couple of years and have often found myself at a dilemma.
There are two solutions -
one is simple one i.e. simple approach, easier to understand and maintain. It ...
2
votes
2answers
630 views
Best practice for packing Java enums?
What is the best practice for packaging Java enums?
is it separate file for each enum?
or
having same file for all the enums?
What are the pros and cons ?
5
votes
2answers
471 views
Is it bad practice to output from within a function?
For example, should I be doing something like:
<?php
function output_message($message,$type='success') {
?>
<p class="<?php echo $type; ?>"><?php echo $message; ...
2
votes
3answers
342 views
How to join the World of Programming? [closed]
Name's Vlad and I am currently on my third year of Community College, studying Computer Science with emphasis on Programming in C++ and Networking. I have completed a few programming courses with ...
2
votes
7answers
635 views
OO Software Architecture - base class that everything inherits from. Bad/good idea?
I am reviewing a proposed OO software architecture that looks like this:
Base
Foo
Something
Bar
SomethingElse
Where Base is a static class.
My immediate thought was that every object in any ...
3
votes
5answers
266 views
Should Developers Perform All Tasks or Should They Specialize? [closed]
Disclaimer: The intent of this question isn't to discern what is better for the individual developer, but for the system as a whole.
I've worked in environments where small teams managed certain ...
1
vote
3answers
147 views
Defining formula through user interface in user form [closed]
I am a student and developing a simple assignment - windows form application in visual studio 2010.
The application is suppose to construct formulas as per user requirement.
The process: It has to ...
2
votes
2answers
150 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
161 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 ...
11
votes
6answers
1k 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
5answers
231 views
How to figure out how to write a program [closed]
I have a program that i need to do.
I know what the program should do, but i dont know how to approach making it
What is the best way to arrange my ideas and thoughts, layout the what the program ...
2
votes
2answers
285 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 ...
4
votes
8answers
643 views
Grading an algorithm: Readability vs. Compactness
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
199 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 ...
200
votes
17answers
65k views
Torvalds' quote about good programmer
Accidentally I've stumbled upon the following quote by Linus Torvalds:
"Bad programmers worry about the code. Good programmers worry about
data structures and their relationships."
I've ...
11
votes
3answers
577 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
823 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
205 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
{
...
5
votes
2answers
269 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
210 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
871 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
369 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
367 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 ...
5
votes
4answers
917 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 ...
22
votes
2answers
4k 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:
...
47
votes
16answers
3k 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 ...
8
votes
11answers
3k 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
365 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 ...
4
votes
5answers
708 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, ...
2
votes
3answers
286 views
Validating best practices, property vs dto, simple type vs object
Consider a user profile page. User can add many emails to his/her profile (something like GitHub's profile page).
So, theoretically, user hits the plus button, then enters an email address, and ...
1
vote
4answers
278 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
171 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 ...
5
votes
4answers
646 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
233 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 ...
4
votes
2answers
652 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 ...
5
votes
3answers
279 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, ...
5
votes
3answers
441 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
587 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
3answers
310 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 ...


