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

0
votes
0answers
7 views

Reversing a loop with incrementing margin (CSS Stylus) [on hold]

I have a loop in Stylus: ul for num in (1..9) li:nth-child({num}) margin num px for num in (11..19) li:nth-child({num}) snum = num - 10 margin (10/snum) px The ...
1
vote
2answers
57 views

Creating menu structure using DB - is that fine?

Also I have an application that basically consists of a lot of screen so user needs to navigate a lot (like go from A>B>C>D) etc. I have been thinking how to implement this (mainly hold the structure ...
-7
votes
0answers
46 views

i have this project to do its about matrix in [on hold]

well i have to write a Java program to perform matrix multiplication. The program should read two matrices (the value of the matrices should come from two different files, for example Matrix1.txt and ...
5
votes
2answers
184 views

How to handle a vendor who asks for the solution of an issue they could not solve

Being a small department of developers, it's not uncommon for us to outsource projects. We have a set of companies that we really like to work with, very reliable and good local people who appreciate ...
0
votes
2answers
80 views

Why are some files in programming projects named “commons”?

I have seen numerous projects have a file named commons for example: commomns.go I was wondering, why was this convention adopted and what did the meaning of naming a file or a package or something ...
7
votes
1answer
447 views

I know JavaScript really well, but i bomb coding interviews

So I'm currently on a hunt for a new position as a Front-End Developer. I know JavaScript very well and can wax poetically about Closures, Currying, Prototypal Inheritance, Design Patterns, App ...
0
votes
2answers
183 views

Whats the best way to build a HTML/AJAX site that requires login? [on hold]

Let's say that hypothetically you wanted to build a website that delivered content to the visitors entirely using HTML and Javascript (AJAX to fetch server side data). The site would require login for ...
2
votes
2answers
286 views

Why to declare a String (as final) and then use it?

In a typical spring mvc validator class, while inserting an errorCode value in the Errors object, what difference does it make between using a String (props.somefield.req) like so ...
1
vote
2answers
67 views

Daily builds with SVN for a small team

I have a general question regarding best practices. I have a small team working on a medium-scale software project, which involves integrating code from different environments, etc. The project is a ...
1
vote
1answer
130 views

What to do if no one knows what they need from you? [duplicate]

A year ago i started to work for a company where i work now. At first time there was been some big project, but after time it's (successfully) completed. Now my manager assigned new project to me, ...
0
votes
2answers
202 views

Preventing ip resolvers in a skype-like program

I'm currently in the process of creating a Skype-like program, that uses a hybrid peer to peer system to communicate between users (i.e. server contains all users IPs, a client that wants to connect ...
-2
votes
0answers
33 views

Develop own MVC for Python (User defined custom framework) [closed]

I have been creating many PHP applications and have also developed many applications based on the custom MVC that I have developed. When I started learning PHP MVC, I learned it from JREAM MVC for ...
0
votes
1answer
110 views

What coding conventions to use for open source software development? [closed]

So far I have mostly written code just for myself and I was free to choose my own conventions. Now I'm thinking of contributing to open source projects and as I look at some, I see a common pattern. ...
2
votes
2answers
82 views

How to prove that following practices and industrial standards are profitable, and investment in refactoring are good

I started working in a company not much time ago, and what I see a lot inside a project is a high amount of low quality code and some custom ideas instead of industry standards and selected best ...
2
votes
2answers
186 views

What happens if I close an InputStream that is passed as an argument?

I have read that Java is pass-by-value, and I've been reading about it in this question at StackOverflow, but I'm still a bit confused, regarding the close() or shutdown() methods in various classes. ...
5
votes
3answers
371 views

Refactoring previous intern's noodle code with future interns in mind

Background I've run across this problem as I am currently an intern at a large company's local software division. I have been given the task of extending a project that several previous interns have ...
1
vote
1answer
149 views

Are the over-usage of delegates a bad thing?

Good day. I have been told that a good practice for writing methods is to make the method only responsible for doing one thing. It made sense to me now that I look back upon it in retrospect. There ...
0
votes
3answers
131 views

Programming with emacs instead of a debugger-integrated IDE [closed]

There's a question that might be deemed a duplicate of this one (I use an IDE (Eclipse) to develop software. Why should I switch to vim or emacs?) but I don't think answers my question. I usually ...
1
vote
2answers
100 views

Pros and cons for choosing between different return types

This is in context of a client-server architecture, although I don't think the architectural setting is needed to put up the problem. I have a function whose output can be classified into different ...
158
votes
16answers
12k views

Started wrong with a project, should I start over?

I'm a beginner web developer (one year of experience). Here's my situation: A couple of weeks after graduating, I got offered a job to build a web application for a company where the owner (boss) is ...
1
vote
0answers
47 views

PHP Framework that favors better general habits over convention

This is intended as an objective question. I've been reading about most of the Frameworks for PHP. We use Cake at work, and I've had exposure to CodeIgniter and Symphony. They all have their own ...
0
votes
2answers
53 views

Automatically propagating changes

When working on multiple similar projects there are often changes that can't be extracted into a library, but should be applied to most of the projects. I mean changes like a modified directory ...
1
vote
3answers
250 views

Trying to come up with a mapping convention for C# objects

so this is C# but it could apply to any OO language where different sets of objects exist across different layers of an application. We have been trying to come up with a convention within the team ...
0
votes
2answers
106 views

How to deal with a new version of visual studio's directory?

When upgrading Visual Studio to a newer version, a new directory is created e.g. "Visual Studio 2013". I understand that that makes sense as we want to differentiate between code targeting different ...
6
votes
2answers
197 views

Is it good practice declare a function inline?

I'm writing a method and depending on a config field I need to change where I get my data from. What this results in me having to write code that looks like this: List<string> result = new ...
1
vote
2answers
237 views

Is it okay if we use an arbitrary string as UUID?

I found the tutorial of client (android) and server (pc) bluetooth tutorial from here. But my question is about the UUID. Is that okay if we define it randomly without the proper format? Because I ...
0
votes
1answer
79 views

Automatically create or update object in database

I have a database class with the following interface: public Database { //returns false if p (its ID) is already available //otherwise adds p the the list and returns true public boolean ...
3
votes
2answers
156 views

How to do documentation for code and why is software (often) poorly documented?

There are some good examples of well-documented code out there, such as java api. But, a lot of code in public projects such as git and internal projects of companies is poorly documented and not very ...
2
votes
1answer
126 views

Is serialization better done in instance methods or static methods

Say I have a class workStockItem, that I wish to serialize. Which is the better style? using a static method or using a non-static method (maybe even implemented as a property as seen below) ...
0
votes
4answers
366 views

File exists vs. File does not exist. Is there a difference in performance?

Let's say I am checking a directory for the existence of a file, and then depending on whether or not the file exists, I act accordingly. For example, see the two Python snippets below. if ...
1
vote
2answers
93 views

Scalable Job Handler

We have a job table that triggers a notification when a new job gets inserted. Clients that can handle such jobs may subscribe to those notifications. When a client receives a notification, he can ...
0
votes
2answers
85 views

Should a variable name be changed if its purpose changes?

I'll change my personal code often and not worry about going back and changing the associated variable names. Should variable names be maintained in case of meaning changes? var accountCurrentValue ...
1
vote
3answers
82 views

Setting global parameters: is this a reasonable use of const_cast and volatile?

I have a program that I run repeatedly with various parameter sets. Different parameters are used in different parts of the program (including different source files). The same parameter may also be ...
143
votes
16answers
11k views

Is there a benefit in compiling your code as you go along?

I recently had a job interview in which they gave me an hour to write some real code. It wasn't a huge amount, probably less than 100 lines. After about 45 minutes, I compiled, ran it, and got it to ...
0
votes
1answer
138 views

Why is the “app” folder now a (more) common pattern in web projects?

It might be related to the Yeoman project, or they might have adopted this from somewhere else, but it seems to be the default for all of their generators. Aside from Yeoman generators I've also ...
-3
votes
3answers
139 views

Determine Programming Language Used for Project Based on Source Code

Is there an easy way to determine which programming languages were used in a project assuming you have access to the source code? I have been programming for quite some time, so I can recognize most ...
0
votes
3answers
142 views

What is decoupling and what development areas can it apply to? [closed]

I recently noticed decoupling as a topic in a question, and want to know what it is and where it can apply. By "where can it apply", I mean: Is it only relevant where compiled languages like C and ...
4
votes
2answers
212 views

Can decoupling hurt maintainability in certain situations?

Can the fact that the business logic is mapped to interfaces instead of implementations actually hinder the maintenance of the application in certain situations? A naive example with the Java's ...
0
votes
1answer
114 views

Your thoughts on Best Practices for Scientific Computing? [closed]

A recent paper by Wilson et al (2014) pointed out 24 Best Practices for scientific programming. It's worth to have a look. I would like to hear opinions about these points from experienced programmers ...
1
vote
1answer
89 views

Software development based on a reference implementation [closed]

Lets say I have library "A2" as a dependency in a project. Library "A2" is derived from library "A1"(A2 is a fork of A1 with some modifications to the original source code) where someone has done few ...
2
votes
4answers
211 views

Callbacks: when to return value, and when to modify parameter?

When writing a callback, when is best to have the callback return a value, and when is it best to have the callback modify a parameter? Is there a difference? For example, if we wanted to grab a list ...
-1
votes
1answer
66 views

Storing a looong lookup table

Background The product i am working on has a very long lookup-table. the table contains static data and cannot be auto generated. there are about 500 rows and 10 columns. columns have mostly integers ...
19
votes
2answers
2k views

Should one always know what an API is doing just by looking at the code?

Recently I have been developing my own API and with that invested interest in API design I have been keenly interested how I can improve my API design. One aspect that has come up a couple times is ...
17
votes
3answers
2k views

Is it good to review programs with seniors and boss even if it is working fine?

In my company, before delivery of any project, my boss asks my seniors to review programs written by me or other team members or sometimes boss also sits with us for review. I think it is a good way ...
0
votes
3answers
118 views

One method with many behaviours or many methods

This question is quite general and not related to a specific language, but more to coding best practices. Recently, I've been developing a feature for my app that is requested in many cases with ...
12
votes
8answers
2k views

Conception and design before coding: how much is this true? [closed]

I learned at school as well as I read everywhere else that a good development methodology needs conception and design before coding properly. That is not a new information even for a beginner ...
0
votes
2answers
267 views

Why don't we completely de-couple frontend JS frameworks and backend APIs? [closed]

Whenever we implement a frontend framework in the likes of Backbone, AngularJS etc. there's an integration process involved with the backend technologies like NodeJS, Rails, Yii etc. (like setting up ...
24
votes
4answers
1k views

How to efficiently troubleshoot or test new code when hardware setup to reproduce bugs is difficult or impossible to obtain?

I work at a mid-sized company (150ish employees, ~10 size engineering team), and most of my projects involve interfacing with lab equipment (oscilloscopes, optical spectrum analyzers, etc) for the ...
5
votes
1answer
148 views

Strategies to manage multiple clients able to simultaneously edit same data

How can I deal with situations when multiple clients might edit same object at the same time? For example, I have a web app with admin console, which lets you edit profile data. Several users want to ...
4
votes
4answers
381 views

ASP.NET deployment/maintenance best practices

I have been in the web development industry for around 5 years now, always working in an open source environment. Mostly apache, mysql, and php with a little bit of ruby, using git for version ...