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
2answers
65 views

Is it considered good practice to declare base interfaces without mutators, supplying mutatators in a sub-interface

I asked a question on StackOverflow on how to properly implement an ImmutableMap that abides by the SOLID principles. Due to Java's Map interface containing put and putAll, it violates the interface ...
-1
votes
1answer
40 views

One symbol - one meaning?

It's well known recomendations that: 1) class or function should have one responsibility 2) variable should not be reused in different contexts We can generalize this recomendations to general ...
0
votes
6answers
418 views

Is String processing more complex than number processing in programming languages?

I feel that string processing is always more complex than Numbers or mathematical processing. Are our programming languages are designed this way that mathematical operations are pretty much straight ...
-2
votes
0answers
46 views

What languages to learn for a general programming knowledge? [on hold]

I'm a Computer Science student . My main goal isn't being a good programmer but I want to have a very decent general knowledge about programming and different types of programming languages and ...
1
vote
3answers
45 views

Clarification on Acquire/Release Semantics in multithreaded programming

In an attempt to fundamentally understand any concept, I try to understand the meaning of the words within the context it is being used. Currently, I am trying to fundamentally understand the whole ...
0
votes
1answer
93 views

Project has become so complex and big that I am lost [closed]

Hello this has never happened with me before . I am making an online shopping android app which has become huge and complex . While developing the code I have followed all the clean naming ...
-1
votes
0answers
54 views

AI in programming [closed]

I would love to learn something about artificial intelligence used in programming. Is it used nowdays or is it some kind of sci-fi. I heard something about phenotropic and intentional programming, ...
-6
votes
0answers
51 views

C and Java Programmar [closed]

I am currently pursuing computer science in college. 1)I want to be a professional C and Java J2SE Developer...(not only a programmar)...so that I can develop system softwares,customize linux shell ...
0
votes
1answer
93 views

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

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 ...
7
votes
2answers
147 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
515 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
98 views

Having one server for the whole team [closed]

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 ...
2
votes
1answer
93 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
127 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
55 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
124 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
130 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
866 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
58 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
173 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
142 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 ...
6
votes
5answers
811 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
113 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
874 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
60 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
292 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
159 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
1k 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
81 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
139 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
434 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
289 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
196 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
112 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
83 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
168 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
119 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
551 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 ...