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

8
votes
11answers
1k views

Is handwriting out code an efficient way to learn a programming language? [closed]

In my C++ intro class last semester, all of our tests were paper/pencil and we had to write out code with a pen or pencil in order to answer questions. It seemed counterintuitive at the time, but also ...
2
votes
3answers
1k views

Good practice for object instantiation in MVC

In MVC the Domain Models(from Model Layer) should instantiate other Domain Models or all the Domain Models should be instantiate in the controllers and passed down using Dependency Injections? How do ...
25
votes
8answers
5k views

MVC Architecture — How many Controllers do I need?

I have been coding for a while, but mostly scripts and simple applications. I've moved into a new role where it is all about developing Web Apps and using a proper MVC architecture, so I am ...
0
votes
2answers
223 views

How to track features in a big project ? [closed]

I am currently working on a project of my own for a little over 2 months (not much time on my hands). The purpose of this project is to be able to remotely update all of my Linux systems from one ...
1
vote
2answers
167 views

ASP.NET tags best practices

I'm working on my first ASP.NET project and I'm torn between using asp tags (<asp:SomeElement) everywhere or use some regular HTML for simple things that need no code behind, like fixed divs, ...
4
votes
2answers
2k views

How to structure a modern web application

Background I recently developed, for two different projects, two web applications. The two followed quite different approaches. The first one was a classic inventory application (lists of stuff to ...
2
votes
3answers
446 views

Parallel Class/Interface Hierarchy with the Facade Design Pattern?

About a third of my code is wrapped inside a Facade class. Note that this isn't a "God" class, but actually represents a single thing (called a Line). Naturally, it delegates responsibilities to the ...
1
vote
1answer
196 views

Are Protected Auto-Cast Methods Ok?

I often have superclasses that contain a more abstracted form of a class as a member variable than my subclasses need. I find my code littered ((ClassName)variableName).methodName(). Is the best way ...
0
votes
2answers
294 views

Strategy with using SVN to switch between test and production server. (with maintaining configuration files)

I would like to know your opinion about my setup right now, how I do things with SVN and if you could find some better solution for me. I'd appreciate it very much if someone could come up with some ...
3
votes
2answers
293 views

Can classes violate Single Responsibility if they delegate internal tasks?

I have two classes Output and Timeline, neither of which violate SR, but the two of them are linked together. So what I'd like to do is have a class called Elco (there's a reason behind the name) that ...
4
votes
4answers
967 views

Exceptions vs ErrorCodes when working with devices

Out team is at the cusp of a new project. One of the components at the boundary of the system is the component which interacts with a printer through an external COM component (referenced as a usual ...
1
vote
1answer
142 views

How to maximise the features of MySQL when used with php

I asked this question a while back on SO (http://stackoverflow.com/questions/15506040/maximising-the-features-of-php-and-mysql-when-used-together) but it's a recurring topic, so I thought I'd ask in a ...
2
votes
1answer
277 views

What is the best way to track / record the current programming project you work on? [duplicate]

I have been in this problem for long time and I want to know how it's done in real / big companies project? Suppose I have the project to build a website. Now I divide the project into sub tasks and ...
-3
votes
2answers
2k views

Java: The best way to learn it when MOOCs and books are not enough? [closed]

This topic was taken from Stack Overflow, but it was put on-hold due to Opinion-based question. So I moved it to here. I've had some great troubles with my homework exercises and I've used ...
1
vote
2answers
439 views

How can I work on multiple programming languages at same time [duplicate]

It always happen to me that if I leave the stuff for 1-2 months I forget the stuff. 5 months back I had symfony project and I did that. At that time I was very much confident that I can do any ...
0
votes
1answer
106 views

Creating Set Subclasses or Allowing Outside Configuration

I have a TriggerCaller and a TriggerAction class. The Caller "calls" the do() method on the action, which is set with the TriggerCallers setAction() method. The rest of the program should deal with ...
-5
votes
2answers
513 views

What are the benefits of being proficient in multiple programming languages? [duplicate]

I have a friend who refuses to learn any other language than Perl. How do I convince him that he can not go through his entire life with only 1 language? What are some arguments to open his mind up to ...
3
votes
5answers
251 views

Premature optimization in deciding how to optimize?

We have a class that has been properly identified for optimization. We've done the profiling and testing, and it's a problem. Now we have two possible approaches for optimizing this class: There is ...
1
vote
2answers
288 views

How your team manage shared password/key [duplicate]

It maybe a shared SSH private key, it maybe be a online password to some web site. In term of security & convenient, and support fine grained permission settings, e.g. developers role, testers ...
2
votes
3answers
333 views

Good Practice : Storing variables and classes names in database for direct call

I would like to know if this is a good practice to store variables and classes names in database to use let users accessing them. For instance users may create entries in database's table in which ...
23
votes
3answers
1k views

Is it considered a bad practice to add logic in a property setter?

I jumped in to a project and I see that the other developers are adding a lot of logic in the setters of synthesized properties. I understand how this works, but I think that it makes it hard to ...
0
votes
4answers
219 views

Choosing between performance vs readable/cleaner code? [closed]

If you have to pay the price of performance to make code more readable would you prefer that or you would always prefer performance over it?
19
votes
3answers
2k views

Must I think about compiled machine code when I write my code?

For example I've got following code: auto z = [](int x) -> int { if (x > 0) { switch (x) { case 2: return 5; case 3: return 6; default: return 1; ...
6
votes
3answers
641 views

Must-have tools and practices for an agile start-up

I've been working in the software industry for a few years now. I've seen Waterfall in practice, and I've seen several projects attempt Agile with varying degrees of success... which got me thinking. ...
3
votes
5answers
318 views

Need thoughts on a course curriculum for an entry-level programmer [closed]

Would love to know your thoughts on a curriculum that will be developed for people that want to get started in the programming field. The goal of the course is to help it's students to ensure that ...
1
vote
1answer
266 views

Is the “jQuery programming style” a kind of Reactive programming?

jQuery is a Javascript library and framework, but when we are programming with jQuery into DOM problems/solutions, we can practice a style quite different of programming... We can read about jQuery ...
5
votes
2answers
653 views

Is sticking to one language on a particular project a good practice?

I'm developing a pipeline for processing text that will go into production. The question I keep asking myself is: should I stick to one language for the project when I'm looking for a tool to do a ...
-1
votes
3answers
190 views

programming practices starting [closed]

I have taken my major as computer science and Engineering and I am really confused at this moment. My first course was about learning C and C++ and I learned the basics of those. Now I am really ...
0
votes
4answers
141 views

Naming: objectAction or actionObject?

The question, Stored procedure Naming conventions?, and Joel's excellent Making Wrong Code Look Wrong article come closest to addressing my question, but I'm looking for a more general set of criteria ...
4
votes
2answers
345 views

Writing Large Portions Of Code Then Debugging?

Lately I have been writing a game engine, and I have been writing a lot of "foundation stuff" (standard interfaces, modules, a message system ect.), but I have noticed a pattern, a lot of the stuff is ...
1
vote
1answer
332 views

Make a flowchart to demonstrate closure behavior

I saw below test question the other day in which the authors used a flowchart to represent the logic of loops, and I got to thinking it would be interesting to do this with some more complex logic. ...
35
votes
4answers
2k views

Can too much abstraction be bad?

As programmers I feel that our goal is to provide good abstractions on the given domain model and business logic. But where should this abstraction stop? How to make the trade-off between abstraction ...
3
votes
5answers
723 views

Am I doing wrong in my programming learning journey? [closed]

Well, I always liked programming, but I've never been committed or tied to any real project. I learned some autoit, some c#, some html and css. Now I've been hired as apprentice as programmer by an IT ...
2
votes
3answers
164 views

Do I go by ID or by Label while programming?

Suppose I have a table "Progress" with two columns. One column is ID which is identity. Another column is Progress_Label ID Progress_Label 1 Submitted 2 Approved by user 3 ...
6
votes
4answers
243 views

What should I include in my repositiory from IDE projects

I want to add a project which in this case is created in Netbeans but this question is general for most IDE's. It's simply, what should I include in my repository. For example Netbeans creates a ...
18
votes
5answers
1k views

How to overcome programming by coincidence?

In the book The Pragmatic Programmer, the writers mention the programming by coincidence concept. It explains what it is, why it is caused, what are the dangers you may encounter and it compares with ...
2
votes
1answer
114 views

When inheriting from a base class, should you retest constructor arguments?

Say I have something like this: public class BaseClass { public BaseClass(string someString) { if(someString == null) throw new ArgumentException(); } } public class ...
2
votes
1answer
276 views

Is this really necessary for solving this problem?

I came across the following article which presents the problem: A group of people walk into a restaurant and want to spend exactly $15.05 on appetizers. They also want them as fast as possible. ...
3
votes
3answers
542 views

Guid collisions

I have a product that lets game developers create games. Inside of their games they are required to give all the elements of their games GUIDs. I've told them that they need to generate their guids ...
19
votes
3answers
4k views

Break on default case in switch

I am a bit puzzled on whenever or not to include break after the last case, often default. switch (type) { case 'product': // Do behavior break; default: // Do ...
6
votes
5answers
430 views

Why would a developer create a public class that has all static properties?

A previous developer has a couple public classes that do not inherit from any other classes but are filled with static properties. Is this another way of creating a struct or enum? Is this an older or ...
5
votes
5answers
2k views

Programming as fast as you can touch-type… How to get to that stage? [duplicate]

I took a test recently and found that I could touch type comfortably at around 100 wpm... and if given some sort of autocorrect/intellisense then that would be even faster (who knows maybe 150 ...
11
votes
5answers
7k views

What are the pros and cons of HTML5, native and hybrid mobile app approaches?

I want to develop a mobile application .. I read lately an article on Telerik Forum : it compares among three types of mobile application and I don't know which one should I select to begin with .. ...
3
votes
5answers
638 views

Does relying on intellisense and documentation a lot while coding makes you a bad programmer? [duplicate]

Is a programmer required to learn and memorize all syntax, or is it ok to keep handy some documentation? Would it affect the way that managers look at coders? What are the downside of depending on ...
1
vote
2answers
227 views

if i have many calls of single method that returns field value, is it better to make a local variable?

In a method, i have calls of single method of another object that returns field value, like foo.value(), which is defined like Field value() {return this.value;} Is it better to make a local variable, ...
3
votes
3answers
1k views

articles in variable names and hard-coding strings

re-edited by author: no this is not 2 questions. This is one question about code review questions containing two separate points. Please do not edit my question. For naming variables, the two sides ...
2
votes
1answer
144 views

.c FIle Dedicated to Data

Is it completely unheard of to have a .c file dedicated to just data? In my case, I'd be using it for global variables that are shared across two other .c files. Here's specifically how I'm using it. ...
4
votes
3answers
1k views

When should I use or not BooleanUtils.isTrue(…) and BooleanUtils.isFalse(…)? [closed]

About this function: org.apache.commons.lang3.BooleanUtils.isFalse(Boolean bool) and the similar isTrue, my co-work (less experienced) use it for every boolean in the code. I am trying to convince him ...
0
votes
2answers
78 views

Where should the processing to structured XML be done?

I have been given the task of redeveloping an "in house" solution to make it expandable and easier to maintain and administer. The original solution had been hashed together over time using PHP as ...
0
votes
2answers
100 views

Making subclass more type-specific with accessors

I have a super class: TriggerManager with a subclass TimedTriggerManager. NOTE: I'm working in java TimedTriggerManager only deals with TimedTrigger s, a subclass of Trigger. TriggerManager ...