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

1
vote
1answer
55 views

How do you build the confidence to work on large projects?

So I'm a programmer who works in telecom. I'm currently in school as well and I'm also an avid gamer (shocker). I said this to form my question: Take a big game title such as DotA 2 - how do you know ...
0
votes
1answer
21 views

Resources concerning system (application) monitoring [on hold]

I am a developer at the beginning of my career. My main "production" application recently had some huge issues. Funny thing is, right before I got the dreaded phone call that everything was f*'d, I ...
-2
votes
0answers
44 views

What do you look for when evaluating code quality? [on hold]

I'm trying to learn what code quality actually is. What I would like to know is what you should look for when evaluating code quality?
4
votes
1answer
88 views

Role-based REST API?

I'm building a REST API for which several users with different roles will have access to the resources it contains. To keep the scope simple let's take the "student/teacher/class" domain: GET ...
11
votes
1answer
479 views

Slicing up the Development Stack - diagonally?

We've got a new project going on, and at the moment developers have been split into two teams, team A and team B. This project has 2 parts to it which require development throughout the development ...
-2
votes
2answers
96 views

Having one server for the whole team [on hold]

I'm currently in a team where it lacks of its resources. The dev't team had only one websphere server for testing and we could not deploy our project in our local desktop because the websphere is only ...
1
vote
1answer
89 views

Is it OK to deprecate methods that need to be public due to the packaging model but are not to be used outside the codebase in Java?

I am currently working on a semi-large project that has several packages. There are 3 main packages, a "client" package, a "server" package and a "common" package. There are two jars, one for the ...
0
votes
1answer
120 views

Has pre-increment operators become that common? [closed]

Bit of background to explain the reasoning: I've been programming for a good while, but took a break between 2012 and 2014 for other stuff. Before that break, I would hardly ever hear about "++i", let ...
-1
votes
3answers
54 views

What is an initial skeleton of the website called? A Framework? [closed]

I am building a website but I am wondering can I call the initial set of pages a framework? Say I have a project to build a website for a school. Before I start implementing the requirements I have ...
3
votes
2answers
122 views

Are there standard formats for keeping a “programming notebook” or any sort of paper planning for software development? [closed]

Personally, I've had several programming notebooks since I've started coding, but most of the time I don't keep a standard format between projects or even within projects. My ideas end up a little ...
1
vote
2answers
125 views

Is lazy loading always required?

I know lazy loading is required when an expensive database call is being made. It would make sense using lazy loading in this example. The below example is in the context of asp.net so it's thread ...
7
votes
5answers
842 views

Why are objects instantiated this way?

Some times I see an object instantiated this way. ICustomer oCustomer = new Customer Obvious but the Customer class is implementing ICustomer interface in this example. Are there any advantages of ...
0
votes
0answers
54 views

Test-first iterative development in Common Lisp environment

Given: I want to practice proper test-first, continuous delivery-style software development in Common Lisp environment. Problem: How each red-green-refactor iteration of the process should look ...
1
vote
3answers
168 views

C# Subject Observer Architecture question

I'm making a C# application using the Subject Observer design pattern in a slightly different way. I am passing the Provider Class, implementing IObservable (this has the OnNext() method that ...
0
votes
0answers
12 views

Which view resolver is required for implementing tiles in Spring 3.0 MVC application [migrated]

I have a working Spring application. I would like to add some common headers,footers and such, hence I need to use tiles along with this. Currently, I use InternalResourceViewResolver for request ...
3
votes
3answers
139 views

Development Time: sql in UI code vs domain model with datamapper

First, sorry for my English guys. Currently this is my first programming job. I am labeled as the most incompetent programmer in my company that's because they measure the performance and ...
0
votes
0answers
12 views

Looking to increase the speed of my bash script [migrated]

The title pretty much says it all, I have a short bash script that processes gigs and gigs of data. I am looking for any improvements to make it faster. This is my very first bash script so please ...
6
votes
5answers
809 views

What is the effectiveness of code reviewing by just reading? [duplicate]

I have been given the task of reviewing a change request comprising of more than 20 changes, the problem is that we do not / cannot install a version of the software to be evaluated as the development ...
2
votes
3answers
160 views

Documenting intent Vs knowledge

It is said you should document the intent of your function or class which I agree with. However recently this line became a little bit blurred when I was wanting someone to document why this ...
3
votes
3answers
112 views

How to write tests for function that depends on a config file?

I have a function that uses information from a config file. How do I test the function? Ideally, I'd want to inject my own version of the config file and test from there, but I'm not using dependency ...
0
votes
1answer
45 views

Is it OK to use name like `CLASS_CONSTANT` for class constant variables according to PEPs? [python]

On the code I'm viewing, I saw a class like this: class User(ModelBase): """# User: docstring""" COMBAT_RANK_KEY_PREFIX = 'combat_rank' LEVEL_RANK_KEY_PREFIX = 'level_rank' ...
4
votes
1answer
871 views

Should I avoid using style like `for k, v in dict_sample.items()`?

Today I was viewing my colleague's code and I saw a function like this: def manager_skill_tree_func(*args, **kwargs): """# manage_skill_tree: Initialize the manage skill tree """ ...
0
votes
2answers
59 views

Should I use Core Data for a social networking app with multiple “feeds”? [closed]

I have a social network that needs an iOS app built, but I'm struggling to decide whether or not I need (or just if it would help) to use Core Data. The premise will be very similar to Facebook, ...
2
votes
3answers
77 views

Data padding for different hardware support?

Some hardware cannot read non-aligned data. For example Bitmap images are aligned to 4-bytes from the header and with each scan line in order to maintain device independence. For example you can ...
1
vote
3answers
291 views

Use interface or abstract class?

Now the title might seem like the question has been asked before but let me explain my situation and you'll see why I am asking this question. Let's consider this interface : public interface ...
5
votes
1answer
142 views

Compute Adjacent Pair

I was asked the following question as part of an interview: Integer V lies strictly between integers U and W if U < V < W or if U > V > W. A non-empty zero-indexed array A consisting of ...
9
votes
3answers
998 views

How did desktop applications communicate with remote server before webservices?

I don't have lot of expierence with desktop applications, but if I had to create a client server desktop app, the data access would be done through a webservice. I believe data access through a ...
35
votes
9answers
12k views

Why do schools teach arrays over List? [closed]

Most of the assignments in my school for the initial programming classes required me to use arrays. I work full time now, and I never used an array for any project that I have worked on. Even in the ...
-1
votes
1answer
61 views

What is the easiest way to store a piece of text in an HTML page? [closed]

I'll say in advance - I have almost no experience with HTML. I am currently coding a game in Lua, which needs to access a piece of code from an HTML website using GET. My question is this: What is ...
1
vote
0answers
80 views

Single page application automatically download dependent HTML

I'm currently developing an application using ASP.NET MVC5 and Knockout. For now, the typical architecture is this: FooController.cs: public ActionResult GetFoos(){ //... var model = // ...
1
vote
2answers
134 views

Is setting “permanent” persistent login cookies a bad practice?

I realized that in Rails there is a built in permanent method for its persistent login cookies (aka. "remember me" cookies) method to give the client a cookie that expires in 20 years: ...
2
votes
3answers
433 views

Can a Java Boolean be used for ternary (3-state) logic?

I'm trying to make a basic cache of a boolean value, and I did it like such: private Boolean _valueCache = null; private boolean getValue() { try { if (_valueCache == null) { // if cache ...
1
vote
1answer
330 views

What programming technique is this?

I have two Java classes. The first one is called "Index", and the second one, temporarily, I called it "IndexCache": public class IndexCache { private static Map<String, Index> map = null; ...
3
votes
1answer
269 views

raw, weak_ptr, unique_ptr, shared_ptr etc… how to choose them wisely

There is a lot of pointers in C++ but to be honest in 5 years or so in c++ programmation (specifically with the Qt Framework) I only use the old raw pointer : SomeKindOfObject *someKindOfObject = ...
1
vote
1answer
111 views

How to work with a messy codebase and client [duplicate]

A client came to me with some features he wanted implementing. Easy enough to do what he asked. He paid me, I agreed to start on the start date and finish in 3 weeks. The code base is a disaster. It ...
1
vote
1answer
190 views

How to avoid violating one definition rule in this case?

We have an existing Mutex C++ class. It has a debug feature to track the owner thread id. So it has a member variable to store this, but because the original developer doesn't want to waste memory, ...
0
votes
2answers
111 views

Create the fields in class level then instantiate inside methods or create and instantiated inside methods

I'm a newbie in software development. Just wondering which code is better and why should I continue which pattern should I follow. First Snippet: Class TestClass { private Object1 field = null; ...
2
votes
2answers
92 views

Free Standing Functions in Global Namespace

When writing non-member, free functions, can they be placed in the global namespace so long as the signature specifies a namespace-scoped object? For example, in the code below, is "Example 2" ...
0
votes
2answers
81 views

Best way to offer team member help? [duplicate]

I've been having a problem recently. In my recent sprints, I have found myself finishing my work well before the sprint ends (several hours in a 2 week sprint). I am left with a lot of time and ...
1
vote
2answers
140 views

Is relying on Demorgan's law in open-source code a barrier to contribution?

I recently added this code to a Github project I'm working on: if not initial_push=='y' and not initial_push=='yes': print('Aborting.') return False Since this is a public ...
1
vote
2answers
95 views

How is a dictionary better than a big switch, when mapping data to action? [duplicate]

Often times we see stuff like that in code: void myFunction(string someValue) { if (someValue == "a") { // ... } else if (someValue == "b") { // ... } else if (someValue == ...
0
votes
5answers
166 views

Is it bad form to use the same variable name in different scopes?

Say you have some basic code where similar operations will take place in nearby lexical scopes. Take for example some simple pseudo code: variable = "foo" # Do something with variable if (True) { ...
0
votes
1answer
118 views

Why use the Singleton pattern over class functions and fields? [duplicate]

I'm going to start by saying that I understand that programming in mostly class functions and variables can be harmful to object-orientation, and that most of the time an instance is preferred. I'll ...
-1
votes
2answers
130 views

Should I learn a programming language that compiles to another? [closed]

For about a year now, I've been doing full stack web development. I am doing about 66% backend stuff (in Python), but from a time to time, I need to write HTML, CSS and JavaScript. I really want to ...
1
vote
2answers
549 views

How can i get around of infinite circle of technology change [duplicate]

I have been in web developement for 6 years. I am facing one big problem and i want to know how can i get rid of it. There are many personal projects like web application which i want o build. As an ...
0
votes
1answer
195 views

Is it good practice to shorten functions? [duplicate]

Is it good practice to shorten functions? Like this code for instance: using System; namespace Hello { class Program { public static void ...
28
votes
8answers
4k views

Is throwing an exception an anti-pattern here?

I just had a discussion over a design choice after a code review. I wonder what your opinions are. There's this Preferences class, which is a bucket for key-value pairs. Null values are legal ...
1
vote
1answer
87 views

Best practices for lookup tables in the application - by id or value

I have a complex database application. There are a lot of lookup tables containing a few values, in particular one contains pass / fail / waiting / unknown. In the application I find many of the ...
3
votes
5answers
179 views

Exception handling and 3rd party library

I'm currently having an issue with a 3rd party control library provider. They have an exception occulting culture that gets in the way of my general fail-fast approach when developing software. An ...
8
votes
8answers
3k views

Are there any easy-to-follow/reliable methods for simplifying code? [duplicate]

There is a problem with the way I code. Regardless of how much of a plan I write beforehand, the code becomes overcomplicated quickly. Reading books on good practice and attempting to adhere to their ...