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

2
votes
4answers
284 views

Is it worth using VCS (Version Control Softwares) for hobbystic/small/personal projects?

The question is fairly self-explainatory. Is it worth using VCS (Version Control Softwares) for hobbystic/small/personal projects?
4
votes
5answers
11k views

Java web application folder structure

As a beginner to J2EE, I have recently started developing my own project from scratch using the Core of J2EE : Servlets & Jsps. I could not evaluate whether my project folder structure is right ...
6
votes
6answers
514 views

How do you effectively develop the same application from multiple computers?

I've already read If you use multiple computers, how do you sync everything? - but that was off topic... I am specifically thinking about this from a programming side. I have powerful desktops at ...
38
votes
1answer
2k views

Why do programmers use `Acme` as a package, namespace or directory name

This may or may not be a silly question, but I really would like to know the answer to something which has been bothering me for a while. I quite often see programming examples/conventions where the ...
1
vote
2answers
176 views

Testing Framework Selection: xUnit family theory

Background: I am familiar with xUnit family frameworks and have had experience with (shunit2, PhpUnit and simpletest). I am currently trying to find a testing framework for C++. I did a quick search ...
5
votes
4answers
321 views

Is it normal to write all logs into a single file?

Our teamlead said that many files much worse than a single, despite of we are working on a big project. He argued that our customers could more easily send logs to us if there will be just a single ...
2
votes
6answers
849 views

Stacking keywords on top of each other - poor style? [closed]

I have always wondered about this, especially in C/Java style languages. For example, consider the first 3 lines of this C# code: lock (serviceLock) using (var client = new ServiceClient()) try { ...
2
votes
1answer
108 views

How to know, with good performance, which areas a certain point is in? [duplicate]

I'm interested in build a prototype that needs this sort of thing: Point A (xa, ya) with a radius of 500 meters. Point B (xb, yb) with a radius of 700 meters. Point C (xc, yc) with a radius of 1200 ...
1
vote
4answers
268 views

What's the most readable way of echoing from PHP?

Should I use <?php if(!$user->is_logged_in()){ echo '<p id="login">Click <a href="login">here</a> to log in</p>'; } ?> or <?php ...
8
votes
4answers
648 views

Is error suppressing bad practice?

On a SO question I asked here about some code I was unsure about, someone replied "BTW, horrible code there: it uses the error suppressing symbol (@) a lot." Is there a reason why this is bad ...
4
votes
4answers
570 views

Using a function's return value as an if condition, good practice?

Do you think it is a good practice to use function return values as if conditions? I'm coding in PHP atm but it holds for many other languages. if(isTheConditionMet($maybeSomeParams)) { } or $res ...
6
votes
3answers
6k views

How to test the data access layer?

I have a DAO method that utilizes Spring for JDBC access. It calculates a seller's success rate of selling an item. Here is the code: public BigDecimal getSellingSuccessRate(long seller_id) { ...
3
votes
1answer
409 views

When defining directory path, should a trailing slash be included?

Say I'm defining a directory and then including files from it. Is it better practice to do: define('PATH', 'C:/xampp/htdocs/includes/'); require PATH.'header.php; or: define('PATH', ...
-1
votes
2answers
153 views

Programming languages and variety [closed]

So the issue I have as an undergraduate Software Engineering student, is the topic on which languages must one carry under their belt for future markets. I've been having this debate with teachers and ...
2
votes
1answer
167 views

What workflow do you find efficient when simultaneously developing multiple inter-dependent GIT branches? [closed]

Let me start by saying that my GIT knowledge is fairly shallow, so I'm guessing that there might be something I'm missing. THE SETUP: As an example, we have a project which is being developed as a ...
5
votes
3answers
350 views

How is it called when you define constants that simply refer to a large namespace?

I am using JRuby. I have many classes implemented in Java, and I want to create objects off of them in my Ruby scripts. Suppose that I have a class Sprite in Java. In Ruby, to refer to it, I use the ...
1
vote
2answers
181 views

history and application areas of 'pull'/'push' programming paradigm

Recently reading a lot materials on Reactive Programming, one thing frequently mentioned is the 'PUSH' versus 'PULL' style of application. Event driven ( Reactive programming ) Some of the authors ...
3
votes
3answers
959 views

Ordering if conditions for efficiency and clean code [closed]

This is purely a design question and the example is simple to illustrate what I am asking and there are too many permutations of more complex code to provide examples that would cover the topic. I am ...
0
votes
1answer
97 views

Which is preferred coding style to validate and return from a method [duplicate]

Which of the below is a preferred coding style (in c# .net) public void DoWork(Employee employee) { if(employee == null) return; if(!string.IsNullOrEmpty(employee.Name)) return; // Do ...
6
votes
3answers
638 views

Is this an example of 'over engineered' or a good practice?

The code I've inherited has a design that I'm not familiar with (I'm still new to the world of programming). It is a .net project and there are 3 classes in question here. public Class1 { public ...
9
votes
6answers
993 views

What Functional features are worth a little OOP confusion for the benefits they bring?

After learning functional programming in Haskell and F#, the OOP paradigm seems ass-backwards with classes, interfaces, objects. Which aspects of FP can I bring to work that my co-workers can ...
0
votes
1answer
176 views

Get entities ids from two similar collections using one method

I've got two lists: List<Integer, ZooEntity> zoos; List<Integer, List<ZooEntity>> groupOfZoos; These operations will return collections of values: Collection<ZooEntity> cz ...
0
votes
1answer
302 views

Good fix vs Quick fix [duplicate]

Let's start from this principle: quality is a feature that you can't add to a project in the middle of the development process. This is the scenario: two weeks to go live with my project and, one of ...
1
vote
4answers
245 views

Is it considered bad practice to access a returned array by a key straight away?

I couldn't think of a good way to word the title, sorry. But what I mean is, is it considered bad practice to do: print get_array()[2] over: output=get_array() print output[2] (where get_array() ...
1
vote
2answers
383 views

Relation between “ lines of the longest working program ” in a language and familiarity with it? [closed]

In some computer master program online application, it says: Please list the programming languages in which you have written programs. For each language, indicate the length in lines of the ...
3
votes
5answers
618 views

Managing Personal Projects As Solo Developer - Getting out of depth and failing projects [closed]

I need some advice on project management. I start a project, and often times it will a large project for a solo developer. Usually its a web project. I handle everything from the UI, to the JS, PHP, ...
-2
votes
2answers
5k views

how to write good programming logic? [duplicate]

recently I got job as a java developer, and now I have assigned project too. I want to know what is a good logic? when I check in the code my team lead is saying that its a good code. But when it ...
6
votes
8answers
651 views

How you return to a code when you don't remember what you were doing? [duplicate]

Well, I have some problems with procrastination and whatnot, but those get infinitely worse, when I cannot remember what I should be doing. I mean, I know my project, I wrote 100% of the code so far, ...
3
votes
1answer
867 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
420 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
527 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
373 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
228 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
842 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
226 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
201 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
696 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 ...
8
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
287 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
221 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
50 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
170 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
450 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
419 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
261 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
123 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
641 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
175 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
243 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 ...