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

5
votes
3answers
1k views

How to prepare for rewriting an application's glue [closed]

Assume you have a project that (in your opinion) is mostly decently well written, modularized, etc. and you want to keep much of it's functionality. However, an essential portion of this project is ...
-1
votes
2answers
181 views

How to assure client that we will complete our project and won't run away with the money [closed]

I have decided to work as a freelancer. I have developed a software and have successfully given the presentation demo. The client liked it and has agreed to implement the project in his organisation. ...
1
vote
2answers
130 views

How to document self explanatory setter functions? [duplicate]

Often boolean setters are pretty self-explanatory, like setLogErrors($bool). I do see some benefit of providing some additional information in the documentation, in this instance maybe where these ...
1
vote
4answers
265 views

is it considered plagiarism to comment out code I copied from elsewhere?

If the plagiarized code is commented out because I found another way to solve the problem, but I forgot to remove the comments, is that considered plagiarism? I used the copied code to help me debug ...
0
votes
2answers
169 views

Is it better to use already build plugins/extensions or code your own in programming projects [duplicate]

I am building a web app in PHP and Symfony. Basically if we search there are plugins / extensions / bundles for almost 60% of stuff. The advantage of using them is that you can easily get your ...
1
vote
1answer
781 views

Is there a practical use from learning Brainfuck? [closed]

Brainfuck is an esoteric programming language created in 1993 by Urban Müller. It was designed to challenge and amuse programmers, and was not made to be suitable for practical use. But still, it ...
1
vote
1answer
172 views

Pythonic version of Java interfaces

I fully acknowledge that Python and Java are different programming languages and should be used differently. That said, "Program to an interface, not to an implementation" is good language-agnostic ...
6
votes
2answers
197 views

How to put lessons learned, good practices, etc into the “work flow”

As the title states it, I would like to get some suggestions about putting knowledge into action. We have many additional requirements that concern: coding practices feature development (all of them ...
10
votes
3answers
923 views

Are these programming “classics” still relevant today and should I read them? [closed]

I have come across numerous older posts that highly recommend the following language agnostic programming books: Code Complete by Steve McConnel The Pragmatic Programmer - Andrew Hunt and Dave ...
4
votes
3answers
233 views

How do I maintain consistency between hard-coded values in different files?

I have a C source file and another (non-code) file in a project which contain the same hard-coded value. Ideally, the value would be specified in only one location and be copied to the other location ...
0
votes
2answers
86 views

Should functions be prepared for overlapping buffers?

So I have a function in C like this: void crunch(const char *in, char *out, size_t inLen, size_t outLen) { //... } If the two buffers overlap, the function may mess up the input buffer as well, ...
4
votes
2answers
898 views

When is it worthwhile to replace working mature code with frameworks+patterns

I fear that frameworks in many cases have become a fashion or trend and are being abused. In many ways people are sacrificing speed just because they want to keep up with every single lib that comes ...
4
votes
4answers
2k views

Returning null or a empty value/throw exception? [duplicate]

Various programming books suggest that methods should not return null values (Clean Code for example). Instead of returning null default values (0 or empty string or empty object) should be returned ...
1
vote
3answers
351 views

I know what I want to do, but I have a hard time coding it? [closed]

After doing some interviews, I've realized that I usually know what I want to do to solve a problem, but I often get my logic complicated (and introduce a lot of bugs) when I'm actually coding. For ...
1
vote
2answers
184 views

Is it bad practice to follow up a call to a terminating function with exit()?

I'm currently working on a php frontend. Specifically, the authentication process. I'll spare everyone the exact details of the decision tree, but it includes a lot of checks and about half of them ...
0
votes
1answer
112 views

Significance of many-to-many relationships? [closed]

How important are to-many relationships in iOS programming? Do you often hold a list of pointers to objects in an array in your codes? I don't think I fully understand the concept of to-many ...
0
votes
1answer
111 views

return Trivial booleans?

I am writing a simple piece of code. Its a function that allowed the user to withdraw some money. There are some restrictions to this though. The user can't withdraw more than the given withdraw ...
0
votes
5answers
234 views

Fail-fast paradigm overheads

Fail-fast seems like a right way since it simplifies bug detection. But it's a harm for performance cause of multiple checking the same thing at several levels of the system. Simple example. There is ...
5
votes
6answers
409 views

is it a bad programming practice to return a new object in a property

I've always had this question and I think it is time to settle the answer, is it a heavy load to do this : public Rect Bounds { get { var Top = (_targetPosition ...
14
votes
2answers
664 views

Which is better: a bunch of getters or 1 method with a selection string parameter?

Our knowledge domain involves people walking over a pressure-recording plate with their bare feet. We do image recognition which results in objects of the 'Foot' class, if a human foot is recognized ...
-1
votes
1answer
256 views

How big can a mobile development team be without being too big? [closed]

I work for a company that is moving heavily into mobile. We find the majority of our customers use our mobile app pretty regularly. We have tons of things we want to add to it -- as well as to ...
5
votes
6answers
5k views

Is CSV a good alternative to XML and JSON? [closed]

Is CSV considered a good option against XML and JSON for programming languages? I generally use XML and JSON (or sometimes a plain text file) as flat file storage. However, recently I came across an ...
1
vote
2answers
174 views

Parser and interpreter knowledge as a way to gauge programmer ability [closed]

This is only anecdotal evidence but from my past encounters with programmers at various workplaces the programmers that understand the fundamentals of parsing and interpreting seem to be overall ...
0
votes
2answers
388 views

In PHP, should I delete objects immediately after use?

I've read in PHP Advanced and Object Oriented Programming by Larry Ullman that it is good programming practice to delete object immediately after use but reason is given nowhere. I am a student web ...
2
votes
1answer
92 views

Are there any known effects on cognitive load of many files with one file per object?

There has been a trend in the Ruby/Rails community to create lots of objects that have very small functionality (SRP anyone?) and live in their own file. These are often extracted from large, bloated ...
0
votes
2answers
274 views

Is there any way without looking at the source code to know how modular the code is [closed]

I've been working with TDD, most patterns, mostly OO code and still not found a way of knowing if a particular piece of code confirms to modularity , without the need reviewing the code. On a recent ...
1
vote
2answers
70 views

Auto Transaction Failsafe's, Third Party API's, Coldfusion Schedule Files

I have an automated invoicing web app and I'm trying to build in some failsafes and a structure that will, under no circumstance, allow an invoice to be double charged. All things working perfectly, ...
0
votes
0answers
61 views

Access Control List with many roles

I normally have 2 roles in most of my websites, i.e. Admin and Member and create one folder for each Role like /Root /admin /member but now I have come up with 10 Roles besides Admin and ...
5
votes
3answers
2k views

Should I refactor a F class from code climate? [closed]

According to code climate (static quality analysis), a class is F, aka the worst mark you could be granted. I did submit a pull request to rearrange it here Which has been refused because the new ...
3
votes
3answers
187 views

conditional expressions, correct usage

I've recently become quite taken with conditional expressions in Python. Apparently some people consider it unpythonic and whether or not conditional/ternary expressions are even A Good Thing seems to ...
3
votes
1answer
76 views

UI requires data of certain types. Can it go in a SPROC?

I'm actually arguing against this, but want to see if I'm out of line. We have a PaymentQueue table and a simple UI. This table is, at the moment, primarily used by the UI and no other business ...
3
votes
1answer
91 views

Development console commands registration

I have a DevelopmentConsole class. I am making functionality to register console commands for the subsystems. I don't want the console to know about them but also I don't want them to contain a debug ...
1
vote
1answer
372 views

What is the accepted practice for string resource management in java?

In Android, final strings are stored in a strings.xml file, which makes it easy to update text, reuse strings and to translate an app to a different locale -- because everything is in one place. ...
2
votes
4answers
278 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?
3
votes
5answers
10k 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
505 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
170 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
320 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
848 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
265 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
620 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
552 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
5k 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
379 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
165 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
348 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
176 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 ...