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
1answer
666 views

Is it bad practice to call a controller action from a view that was rendered by another controller?

Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The ...
5
votes
2answers
390 views

Buzzword for “performance-aware” software development [closed]

There seems to be an overabundance of buzzwords for software development styles and methodologies: Agile development, extreme programming, test-driven development, etc... well, is there any sort of ...
0
votes
6answers
517 views

Writing and Understanding code [closed]

I can write code. I can read code but I can't implement good code. How to develop deep understanding of any framework or stuff that we are working on? Is it looking into documentation and working on ...
2
votes
1answer
366 views

Is this high coupling?

Question I'm currently working a on an assignment for school. The assignment is to create a puzzle/calculator program in which you learn how to work with different datastructures (such as Stacks). ...
7
votes
3answers
225 views

Construct your solution logic in syntax or in a faster and more efficient mental model?

I am a newbie, studying programming and I came across this question today: How can I make sure that I'm actually learning how to program rather than simply learning the details of a language? A ...
22
votes
4answers
840 views

Prefer examples over documentation. Is it a behavioral problem?

Whenever I come across a new API or programming language or even simple Linux man pages, I always (ever since I remember) avoided them and instead lazily relied on examples for gaining understanding ...
1
vote
2answers
221 views

Using Functions for Never-Repeated Code [duplicate]

What are some best practices for using functions to break up large blocks of code into discrete chunks of logic when those functions are only ever going to be used once within the lifetime of a ...
4
votes
4answers
199 views

Is it practical to write exit codes in a script where the outcome is more complex than success/fail?

Where I work, we're in the process of automating a lot of tasks that currently need to be run manually by an IT person to determine if the next task can be performed (the second task depends on ...
16
votes
5answers
689 views

Reconciling contradictory programming advice: get something working and iterate vs. really think it through before coding

I am an intermediate programmer with a few years of professional experience who is halfway through a masters degree. In learning to program I've often heard two pieces of seemingly contradictory ...
5
votes
6answers
1k views

Maximum nesting for loops and conditionals?

I've written some code that has some fairly deep nests (one time, I wrote something that was a conditional check inside a forloop inside a conditional check inside a forloop inside a forloop). Is ...
2
votes
1answer
283 views

PHP high traffic default page

I have a php website that will be experiencing high levels of traffic in a few weeks. We scaled the servers to accept the traffic, but want some sort of fallback page in the event that something ...
1
vote
1answer
213 views

Unit-testing databases: test all possible permutations of read and write to table?

I am testing a resource management class that is interacting with a database or a file system, or a combination of both. I was wandering if it is the norm to test all possible permutations of read and ...
1
vote
1answer
48 views

How to validate (and group) User Listings in Marketplace

I am building a hobby marketplace (comic books). Users are able to list comic books they own for trading with other members. The problem I'm running into is that I would like to standardize the ...
5
votes
2answers
165 views

If the user declines a “continue?” prompt, what exit code should be returned?

In terminal based scripts (Shell, Bash, Python, etc), if you prompt the user "Do you wish to continue?" and the user chooses "No", what exit code should the script ideally return? On one hand, the ...
4
votes
4answers
377 views

What is the proper aproach of Subversion when using DLL

Background: Our team develops a solution and it includes a number of projects. Most of the projects are built as DLLs and those DLLs are used by the rest of the projects. Currently we uses ...
1
vote
1answer
377 views

JSP Include: one large bean or bean for each include

I want to refactor a webapp that consists of very distorted JSPs and servlets. Because we can't switch to a web framework easily we have to keep JSPs and Servlets, and now we are in doubt how to ...
2
votes
1answer
253 views

Best practices for refactoring parameter file structure in multiple environments

Background info and what I've tried Within each of two mostly distinct environments, say 'Research' and 'Production', there is a need for a structured parameter file. The file contains things like ...
0
votes
2answers
121 views

Is MultiTasking in a development environment worthwhile? [closed]

If we get assigned to do multiple works simultaneosly, is it good for growth for a developer? If there is a development project and if you are assigned to work on a maintenance project as well, is it ...
21
votes
10answers
3k views

Is over-engineering a warning sign? [closed]

So we present a straightforward coding exercise to new candidates with some well defined requirements. Occasionally we receive solutions which don't really solve the problem at hand, but are ...
2
votes
2answers
615 views

As a senior project manager, should I still keep learning new skill in programming? [closed]

If I'm a senior project manager, should I still keep learning new technology? For example, every month every year, most language updates themselves, and a lot of new programming concepts become ...
2
votes
3answers
168 views

Parsing Text Tokens in Script Files

My team is wanting to migrate away from compiled code to dynamic code. We have a wide variety of customers and each has different business rules. Instead of having a single compiled code base, we are ...
0
votes
1answer
226 views

How can I organize my data flow to process a good program solution? [duplicate]

My main problem when trying to form a program is that while I have the tools at my disposal, I am too disorganized to properly use them to solve my problems. Often my process is simply trial and ...
-2
votes
1answer
78 views

Mapping software [closed]

Okay, this might sound lame, but it is actually a difficult question (for me at-least)... Now there are many mapping software like Google Maps, Apple maps and others whose existence is outside my ...
0
votes
1answer
132 views

What is the preferred object to store this type of data structure

I was in a conversation with someone who codes for me. He was frustrated with my approach to a particular problem. I am entirely self taught and very pragmatic - I am not a professional developer ...
-1
votes
1answer
70 views

What are the most crucial categories of content to organize into an internal developer portal in a large company? [closed]

I have been tasked with organizing all of the company's internal content currently spread around sharepoint, a markdown reference manual and confluence into a single cohesive and usable portal in ...
2
votes
3answers
200 views

How to combine search words? AND or OR?

I have a basic search in my webpage. When I designed it, I chose to combine the search box inputs with OR. For example: A search for foo bar will be translated to foo OR bar, so every entry which ...
0
votes
4answers
395 views

Not copyrighting code and then reusing functions later

I'm coding something for my job to copy directories and then use regex to make all the filenames uniform. I'm an undergrad student programmer for my university and I'm not sure what a professional ...
1
vote
3answers
2k views

Best Practices To Create Error Codes Pattern For an Enterprise Project in C# [closed]

I'm working on an enterprise project which will be deployed in many SMBs and Enterprises. The support for this project would be struggling and so I want to create a coding pattern for errors (Like ...
-2
votes
4answers
179 views

How to use unit testing? [duplicate]

How to use unit testing? There are a lot of frameworks for different languages, which provide functionality of unit testing. There is a lot of information on how to use each of them technically. Just ...
-2
votes
2answers
401 views

Timeline of a programmer in terms of languages? [closed]

Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing". I am not proud of the fact that I started programming with scripting languages ...
6
votes
6answers
743 views

Should I be commiting code quickly and testing later? [duplicate]

I am a web and software developer involved in the creation of mobile apps. I am currently working on a project with a looming deadline. I am wondering if I should be committing code rapidly and large ...
1
vote
0answers
167 views

What's a good approach for updating millions of rows independently?

I have a MongoDB database with millions of users in collection. An aggregation function returns millions of results with the following format: Array ( [_id] => Array ( [user] => MongoId ...
5
votes
4answers
537 views

How do you keep track of what stage you are at in a program? [closed]

Like many, I'm developing a couple of applications on my own (not at the same time) to eventually sell. But I also have websites to run, college work and a social life etc., so often I can forgot what ...
0
votes
2answers
5k views

How to update an existing excel file using java program? [closed]

I've made a file browser in java that opens and read already been made excel files. (using Apache poi 3.9 library) program read those files perfectly but i want to update some of those files. how can ...
3
votes
2answers
211 views

What is the appropriate approach to study an api when it is not well documented and there are no good tutorials around?

I am a student and I like to develop applications at my own level. While building an application I am the only one in my team. After analyzing the application I choose a library/api to use for the ...
-1
votes
2answers
229 views

Is “pass by value” synonymous with “functional programming”

Is "pass by value" synonymous with "functional programming" ? Are there any iterative programming languages that are (largely) "pass by value"? Are there any functional programming languages that ...
7
votes
6answers
944 views

how do you cope with long hours of coding? [closed]

I am just a high-school student but for a while now I have been coding for weeks (from early in the morning to late at night). I really enjoy it, however it can be really monotone. I usually listen to ...
8
votes
10answers
2k 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 ...
27
votes
8answers
6k 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
225 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
175 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
484 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
203 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
338 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
309 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
1k 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
147 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
299 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 ...