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.
0
votes
2answers
62 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
66 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 ...
85
votes
12answers
5k views
Is there a benefit of 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 ...
-3
votes
0answers
23 views
what should be the approach to solving problem? [on hold]
when working on any project.If someone needs to make the changes in existing functionality then what should be the approach to make the changes in project?
-2
votes
0answers
88 views
Code Example to illustrate how to Limit a class's dependencies (entities that depend on a class) [on hold]
I was referring to best practices article on the guides repository which is maintained by Thoughtbot.
One of their best practices under Object Oriented Design says -
Limit an object's ...
-4
votes
0answers
111 views
What are the advantages and disadvantages of using a virtual screen splitter? [on hold]
What is the scope of a virtual screen splitter? What are its functional and non-functional requirements?
0
votes
1answer
122 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
118 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 ...
-4
votes
0answers
62 views
Programming Interview Question [duplicate]
I have an upcoming interview in a couple of days and had a question for you guys.
I've heard that programming interviews have whiteboard problems where you solve a simple problem on a whiteboard.
My ...
-3
votes
0answers
56 views
Interview Preparation for Amazon [duplicate]
I have an upcoming interview with amazon. Can anyone please suggest me any book/website which can help me in preparation.
Thanks
1
vote
0answers
50 views
Can TDD help me develop a CUDA version of image/video processing algorithms? [closed]
I have tried many ways to migrate the image/video processing algorithm I have to run on GPU using CUDA framework and made a little progress. From reading around Stack Overflow I found a lot of ...
0
votes
3answers
132 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
201 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
92 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
199 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
60 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
117 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
233 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 ...
22
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
142 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
261 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 ...
0
votes
3answers
82 views
Wrapping a map with instance or static method
I have a java.util.Map<String, Object> object which different types of values in it. I don't want to cast whereever I do a get operation over this. To do this, I created different classes ...
0
votes
1answer
81 views
What is the best way to track database changes across a large team
What is the best way to track any change made to the SQL Server database before moving to production in case of a large team ?
We have used excel sheets but quite often things get missed which come ...
73
votes
8answers
7k views
Is it okay to not completely understand code functionality? [duplicate]
As I am currently struggling with learning WCF for a project at work, for the past several days I have been looking at online tutorials and examples on the best way to make a WCF client; and today, ...
0
votes
2answers
138 views
Utility Functions Best Practices [closed]
Update: Most answers are about how to write a wrapping interface or what is a good wrapper around ADO. but my question is more about when to do so and when not.
I never found a good rule for deciding ...
1
vote
0answers
73 views
Methods for structuring JavaScript SDKs
I've built a REST API and have been using Backbone models throughout a couple different applications to communicate to it.
I would really like to build a single JS SDK that can be used in any ...
-4
votes
1answer
119 views
Beyond Object Oriented Programming [closed]
Is there something beyond OOP? In today's world, almost any problem can be solved with OOP as the basis. But how many of them are really effective? For example, Java is purely Object Oriented. It ...
0
votes
2answers
73 views
Implementing Generic Routines [closed]
Is it possible to implement generic routines in any language (C#, Java, etc). By generic routines I mean, in specific event Handlers. Lets say, I have 2 Buttons and 2 text boxes. One Button, when ...
13
votes
4answers
563 views
Progressive Enhancement vs. Single Page Apps
I just got back from a conference in Boston called An Event Apart.
A really popular theme amongst the speakers was the idea of progressive enhancement - a site's content should go in the HTML, and ...
1
vote
2answers
95 views
How to handle long method names in sequence diagram?
I have a C# application that is developed with VS 2010 pro. The ultimate version would have a sequence diagram feature.
Since I will "create" my sequence diagram manually, how do I deal with quite ...
-1
votes
1answer
72 views
Is it Mobile Hybrid or alternate language development development an attempt to fit an “Square peg in a round hole”? [closed]
Recently I noticed that in the mobile world "new languages" are arising trying to fit in as if they were native like Xamarin, RubyMotion, CodenameOne, Javascript/HTML5 Frameworks etc.
And from my ...
1
vote
1answer
114 views
Eventual consistency in Banking systems
I keep hearing people say Banking systems like ATM use Eventual consistency model for data synchronization, but I am wondering if it is true.
Definitely the amount you withdraw might be delayed ...
-3
votes
2answers
206 views
Offensive Variable Names [closed]
Everyone knows that all manner of obscenities are included in commits and comments, but is it ever a good idea to have 'offensive' words in the actual code?
The best argument I can think of is: when ...
0
votes
2answers
65 views
Best way to indicate more results available
We have a service to return messages. We want to limit the number returned, either allowing the caller to specify the max number to return, or else to use an internal hard limit. We also have thought ...
1
vote
1answer
73 views
How to deal with interactions between many objects
I've been working on a game in my spare time. I'm pretty much done defining the primitives and until today everything was pretty well segmented and encapsulated but now it's come time to implement ...
2
votes
1answer
83 views
equivalence in callback and non-callback javascript
I'm pretty sure that the following two snippets are equivalent but I wanted to double check:
CALLBACK STYLE
function foo(input, callback) {
// do stuff with input
callback();
}
function ...
0
votes
1answer
207 views
Does it make sense to choose UTF-32, based on concern that some basic rule will be broken for UTF-8?
I'm working on an cross platform C++ project, which doesn't consider unicode, and need change to support unicode.
There is following two choices, and I need to decide which one to choose.
Using ...
0
votes
2answers
104 views
How to plan for multi-platform application development [closed]
In my earlier days of programming, I was using Visual Basic for learning. It taught me many concepts, and I was able to make some cool programs (in my opinion, anyways...). I have expanded my horizon ...
0
votes
1answer
45 views
Automating form error handling
I'm not sure if I'm being clever or making things more difficult. I'm working within a custom MVC framework, and within some of my "views" which contain forms I'm preserving input and styling errors ...
0
votes
2answers
112 views
Is it fine to reuse a class instance?
I ask in terms of high cost classes, with a particle engine as an example.
I read somewhere that an instance of a class with a high cost to initialize, like a particle manager, should have its state ...
2
votes
4answers
197 views
Should refactoring be the exception or the rule? [closed]
I had a discussion with a co-worker yesterday about design philosophy. The other coder is more experienced then me, and I fully admit that he is likely much better at properly automating his testing, ...
1
vote
2answers
161 views
ID properties on Domain objects in DDD
In my domain I have an Account object.
e.g.
class Account
{
public string Number;
public string SortCode;
}
Within the context of DDD, should this account object have an ID property? The ...
1
vote
5answers
376 views
What are the advantages of recursion compared to iteration? [duplicate]
I'm trying to understand when is preferred to use recursion rather than iteration.
Actually I've encountered recursion only in Javascript but never in Python. I imagine that recursion should be used ...
1
vote
3answers
114 views
Is it really possible to have libraries not depend on other libraries?
I often see the advice that you should try to make each library independent. And yet in reality I can never seem to achieve this. Is this BS advice or is it actually possibly in any realistic way?
...
0
votes
1answer
92 views
When is it suitable to use inheritance [duplicate]
I recently had a small "argument" about inheritance with a friend. I think people overuse it a lot. Intuition tells me that that the only good reason for class inheritance is polymorphism - when there ...
-1
votes
1answer
66 views
What are arguments against using articles in method name? [closed]
I want to use articles in method names sometimes. Like some service method 'getStudentsOfATeacher()'. What are arguments against that?