Tagged Questions

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
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 ...
3
votes
3answers
918 views

Ordering if conditions for efficiency and clean code [closed]

This is purely a design question and the example is simple to illustrate what I am asking and there are too many permutations of more complex code to provide examples that would cover the topic. I am ...
0
votes
1answer
96 views

Which is preferred coding style to validate and return from a method [duplicate]

Which of the below is a preferred coding style (in c# .net) public void DoWork(Employee employee) { if(employee == null) return; if(!string.IsNullOrEmpty(employee.Name)) return; // Do ...
6
votes
3answers
630 views

Is this an example of 'over engineered' or a good practice?

The code I've inherited has a design that I'm not familiar with (I'm still new to the world of programming). It is a .net project and there are 3 classes in question here. public Class1 { public ...
9
votes
6answers
986 views

What Functional features are worth a little OOP confusion for the benefits they bring?

After learning functional programming in Haskell and F#, the OOP paradigm seems ass-backwards with classes, interfaces, objects. Which aspects of FP can I bring to work that my co-workers can ...
0
votes
1answer
163 views

Get entities ids from two similar collections using one method

I've got two lists: List<Integer, ZooEntity> zoos; List<Integer, List<ZooEntity>> groupOfZoos; These operations will return collections of values: Collection<ZooEntity> cz ...
0
votes
1answer
299 views

Good fix vs Quick fix [duplicate]

Let's start from this principle: quality is a feature that you can't add to a project in the middle of the development process. This is the scenario: two weeks to go live with my project and, one of ...
1
vote
4answers
244 views

Is it considered bad practice to access a returned array by a key straight away?

I couldn't think of a good way to word the title, sorry. But what I mean is, is it considered bad practice to do: print get_array()[2] over: output=get_array() print output[2] (where get_array() ...
1
vote
2answers
373 views

Relation between “ lines of the longest working program ” in a language and familiarity with it? [closed]

In some computer master program online application, it says: Please list the programming languages in which you have written programs. For each language, indicate the length in lines of the ...
3
votes
5answers
607 views

Managing Personal Projects As Solo Developer - Getting out of depth and failing projects [closed]

I need some advice on project management. I start a project, and often times it will a large project for a solo developer. Usually its a web project. I handle everything from the UI, to the JS, PHP, ...
-2
votes
2answers
4k views

how to write good programming logic? [duplicate]

recently I got job as a java developer, and now I have assigned project too. I want to know what is a good logic? when I check in the code my team lead is saying that its a good code. But when it ...
6
votes
8answers
631 views

How you return to a code when you don't remember what you were doing? [duplicate]

Well, I have some problems with procrastination and whatnot, but those get infinitely worse, when I cannot remember what I should be doing. I mean, I know my project, I wrote 100% of the code so far, ...
3
votes
1answer
766 views

Is it bad practice to call a controller action from a view that was rendered by another controller?

Let's say I have an OrderController which handles orders. The user adds products to it through the view, and then the final price gets calculated through an AJAX call to a controller action. The ...
5
votes
2answers
407 views

Buzzword for “performance-aware” software development [closed]

There seems to be an overabundance of buzzwords for software development styles and methodologies: Agile development, extreme programming, test-driven development, etc... well, is there any sort of ...
0
votes
6answers
524 views

Writing and Understanding code [closed]

I can write code. I can read code but I can't implement good code. How to develop deep understanding of any framework or stuff that we are working on? Is it looking into documentation and working on ...
2
votes
1answer
372 views

Is this high coupling?

Question I'm currently working a on an assignment for school. The assignment is to create a puzzle/calculator program in which you learn how to work with different datastructures (such as Stacks). ...
7
votes
3answers
227 views

Construct your solution logic in syntax or in a faster and more efficient mental model?

I am a newbie, studying programming and I came across this question today: How can I make sure that I'm actually learning how to program rather than simply learning the details of a language? A ...
22
votes
4answers
842 views

Prefer examples over documentation. Is it a behavioral problem?

Whenever I come across a new API or programming language or even simple Linux man pages, I always (ever since I remember) avoided them and instead lazily relied on examples for gaining understanding ...
1
vote
2answers
223 views

Using Functions for Never-Repeated Code [duplicate]

What are some best practices for using functions to break up large blocks of code into discrete chunks of logic when those functions are only ever going to be used once within the lifetime of a ...
4
votes
4answers
199 views

Is it practical to write exit codes in a script where the outcome is more complex than success/fail?

Where I work, we're in the process of automating a lot of tasks that currently need to be run manually by an IT person to determine if the next task can be performed (the second task depends on ...
16
votes
5answers
692 views

Reconciling contradictory programming advice: get something working and iterate vs. really think it through before coding

I am an intermediate programmer with a few years of professional experience who is halfway through a masters degree. In learning to program I've often heard two pieces of seemingly contradictory ...
6
votes
6answers
1k views

Maximum nesting for loops and conditionals?

I've written some code that has some fairly deep nests (one time, I wrote something that was a conditional check inside a forloop inside a conditional check inside a forloop inside a forloop). Is ...
2
votes
1answer
286 views

PHP high traffic default page

I have a php website that will be experiencing high levels of traffic in a few weeks. We scaled the servers to accept the traffic, but want some sort of fallback page in the event that something ...
1
vote
1answer
217 views

Unit-testing databases: test all possible permutations of read and write to table?

I am testing a resource management class that is interacting with a database or a file system, or a combination of both. I was wandering if it is the norm to test all possible permutations of read and ...
1
vote
1answer
50 views

How to validate (and group) User Listings in Marketplace

I am building a hobby marketplace (comic books). Users are able to list comic books they own for trading with other members. The problem I'm running into is that I would like to standardize the ...
5
votes
2answers
167 views

If the user declines a “continue?” prompt, what exit code should be returned?

In terminal based scripts (Shell, Bash, Python, etc), if you prompt the user "Do you wish to continue?" and the user chooses "No", what exit code should the script ideally return? On one hand, the ...
4
votes
4answers
414 views

What is the proper aproach of Subversion when using DLL

Background: Our team develops a solution and it includes a number of projects. Most of the projects are built as DLLs and those DLLs are used by the rest of the projects. Currently we uses ...
1
vote
1answer
395 views

JSP Include: one large bean or bean for each include

I want to refactor a webapp that consists of very distorted JSPs and servlets. Because we can't switch to a web framework easily we have to keep JSPs and Servlets, and now we are in doubt how to ...
2
votes
1answer
258 views

Best practices for refactoring parameter file structure in multiple environments

Background info and what I've tried Within each of two mostly distinct environments, say 'Research' and 'Production', there is a need for a structured parameter file. The file contains things like ...
0
votes
2answers
123 views

Is MultiTasking in a development environment worthwhile? [closed]

If we get assigned to do multiple works simultaneosly, is it good for growth for a developer? If there is a development project and if you are assigned to work on a maintenance project as well, is it ...
21
votes
10answers
3k views

Is over-engineering a warning sign? [closed]

So we present a straightforward coding exercise to new candidates with some well defined requirements. Occasionally we receive solutions which don't really solve the problem at hand, but are ...
2
votes
2answers
633 views

As a senior project manager, should I still keep learning new skill in programming? [closed]

If I'm a senior project manager, should I still keep learning new technology? For example, every month every year, most language updates themselves, and a lot of new programming concepts become ...
2
votes
3answers
173 views

Parsing Text Tokens in Script Files

My team is wanting to migrate away from compiled code to dynamic code. We have a wide variety of customers and each has different business rules. Instead of having a single compiled code base, we are ...
0
votes
1answer
233 views

How can I organize my data flow to process a good program solution? [duplicate]

My main problem when trying to form a program is that while I have the tools at my disposal, I am too disorganized to properly use them to solve my problems. Often my process is simply trial and ...
-2
votes
1answer
80 views

Mapping software [closed]

Okay, this might sound lame, but it is actually a difficult question (for me at-least)... Now there are many mapping software like Google Maps, Apple maps and others whose existence is outside my ...
0
votes
1answer
133 views

What is the preferred object to store this type of data structure

I was in a conversation with someone who codes for me. He was frustrated with my approach to a particular problem. I am entirely self taught and very pragmatic - I am not a professional developer ...
-1
votes
1answer
74 views

What are the most crucial categories of content to organize into an internal developer portal in a large company? [closed]

I have been tasked with organizing all of the company's internal content currently spread around sharepoint, a markdown reference manual and confluence into a single cohesive and usable portal in ...
2
votes
3answers
201 views

How to combine search words? AND or OR?

I have a basic search in my webpage. When I designed it, I chose to combine the search box inputs with OR. For example: A search for foo bar will be translated to foo OR bar, so every entry which ...
0
votes
4answers
398 views

Not copyrighting code and then reusing functions later

I'm coding something for my job to copy directories and then use regex to make all the filenames uniform. I'm an undergrad student programmer for my university and I'm not sure what a professional ...
1
vote
3answers
3k views

Best Practices To Create Error Codes Pattern For an Enterprise Project in C# [closed]

I'm working on an enterprise project which will be deployed in many SMBs and Enterprises. The support for this project would be struggling and so I want to create a coding pattern for errors (Like ...
-2
votes
4answers
182 views

How to use unit testing? [duplicate]

How to use unit testing? There are a lot of frameworks for different languages, which provide functionality of unit testing. There is a lot of information on how to use each of them technically. Just ...
-2
votes
2answers
421 views

Timeline of a programmer in terms of languages? [closed]

Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing". I am not proud of the fact that I started programming with scripting languages ...
6
votes
6answers
744 views

Should I be commiting code quickly and testing later? [duplicate]

I am a web and software developer involved in the creation of mobile apps. I am currently working on a project with a looming deadline. I am wondering if I should be committing code rapidly and large ...
1
vote
0answers
168 views

What's a good approach for updating millions of rows independently?

I have a MongoDB database with millions of users in collection. An aggregation function returns millions of results with the following format: Array ( [_id] => Array ( [user] => MongoId ...
5
votes
4answers
558 views

How do you keep track of what stage you are at in a program? [closed]

Like many, I'm developing a couple of applications on my own (not at the same time) to eventually sell. But I also have websites to run, college work and a social life etc., so often I can forgot what ...
-1
votes
2answers
5k views

How to update an existing excel file using java program? [closed]

I've made a file browser in java that opens and read already been made excel files. (using Apache poi 3.9 library) program read those files perfectly but i want to update some of those files. how can ...
3
votes
2answers
218 views

What is the appropriate approach to study an api when it is not well documented and there are no good tutorials around?

I am a student and I like to develop applications at my own level. While building an application I am the only one in my team. After analyzing the application I choose a library/api to use for the ...
-1
votes
2answers
232 views

Is “pass by value” synonymous with “functional programming”

Is "pass by value" synonymous with "functional programming" ? Are there any iterative programming languages that are (largely) "pass by value"? Are there any functional programming languages that ...
7
votes
6answers
1k views

how do you cope with long hours of coding? [closed]

I am just a high-school student but for a while now I have been coding for weeks (from early in the morning to late at night). I really enjoy it, however it can be really monotone. I usually listen to ...