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

7
votes
4answers
680 views

Do some best practices depend on skill?

Is there evidence that some software development best practices depend on programming skill level? I mean, these methods are good, but maybe the way the are used or the extent might vary? This ...
1
vote
3answers
612 views

Next step after creating mock-up screens

I have created some mockup screens for my app in HTML/CSS. I have 4 screens in total. They contain no client-side coding i.e. Javascript or jQuery. The screens themselves are quite bland at the ...
0
votes
2answers
701 views

I cannot understand the application of oops How can I develop the understanding of application of oops? [closed]

I am a developer in PHP technology, I am aware of almost all the basics of OOPS, but still cannot find out the way to apply these concepts over a procedural programming. I do it in very orthodox way, ...
2
votes
3answers
2k views

Does mobile based (Android) development, benefit from Object Oriented Programming?

My development on Android is based on scientific programs and while I'm building these most of the code is in one or two long classes. When I come to deploy these programs I try to decouple everything ...
1
vote
1answer
194 views

How to handle encryption key with a large development team?

If we have a large development team, say 100, and we would like to keep our encryption key hidden from developers who are not directly involved in the encryption module/algorithm, what are some best ...
42
votes
17answers
4k views

Best practice on if/return

I want to know what is considered better way of returning when I have if statement. Example 1: public bool MyFunction() { // Get some string for this example string myString = GetString(); ...
0
votes
2answers
115 views

Guided Questioning iOS App

I'm making an iPad app that will display a few choices and based on your choice will display a series of questions with each question triggering a different set of questions. I was wondering if there ...
-1
votes
1answer
137 views

Are there any valid ways of eliminating/reducing state?

For definitions and examples of "state", see: http://en.wikipedia.org/wiki/Program_state , http://en.wikipedia.org/wiki/Finite_state_machine , http://en.wikipedia.org/wiki/State_diagram A diagram ...
1
vote
4answers
170 views

In a web application, is it ok to group multiple pages in one view class or one class per page?

If you are building a web application, and you have a user management component, is it recommended to do: class UserAdminView extends View { } or class UserAdminUpdateView extends View { } ...
15
votes
4answers
777 views

Can applications affect power consumption in a substantial way?

Is there anything that can be done for a single general purpose application to affect the power consumption of the device it is running on? I am not familiar with how optimizations to individual ...
1
vote
2answers
939 views

How do you accept arguments in the main.cpp file and reference another file?

I have a basic understanding of programming and I currently learning C++. I'm in the beginning phases of building my own CLI program for ubuntu. However, I have hit a few snags and I was wondering if ...
9
votes
7answers
970 views

Entry level engineer question regarding memory management

It has been a few months since I started my position as an entry level software developer. Now that I am past some learning curves (e.g. the language, jargon, syntax of VB and C#) I'm starting to ...
0
votes
1answer
137 views

Pending and Approval process

So let's say I have a DB table with 8 columns, one is a unique auto-incrementing used as ID. So I have a page that pulls in the info for each row based on query string ID. I want to give my users ...
2
votes
6answers
2k views

Dynamic Fields/Columns

What is the best way to allow for dynamic fields/database columns? For example, let's say we have a payroll system that allows a user to create unique salary structures for each employee. How ...
2
votes
4answers
665 views

The benefits of using RAII in C++ [duplicate]

Suppose I'm a teacher and I want to explain to my students what are the benefits of using RAII in C++: I need a very good example, full of details, but that is easy to understand. Which approach ...
18
votes
7answers
1k views

How to become a good team player?

I've been programming (obsessively) since I was 12. I am fairly knowledgeable across the spectrum of languages out there, from assembly, to C++, to Javascript, to Haskell, Lisp, and Qi. But all of ...
5
votes
4answers
3k views

using static methods and classes

I know that static methods/variables are associated with the class and not the objects of the class and are useful in situations when we need to keep count of, say the number of objects of the class ...
-3
votes
2answers
620 views

Microsoft UI stack

I am a C#, WPF developer and would like to know and understand the Microsoft UI Stack. I could not find much on the internet. I guess that this would be a huge topic, and might not be feasible to ...
8
votes
1answer
467 views

Is there a website where we can discuss and improve upon code snippets?

Is there a website where we can discuss and improve upon code snippets? For example, if I have written some function and want to know what others think of it.
1
vote
1answer
196 views

Best practice for writing a service

We currently have a C++ socket server used by a java client. All of the socket code in both C++ and java is stick-built at a low-level with messages passed via JSON strings. Are there cots packages ...
8
votes
1answer
210 views

Integrated ads in phone apps - how to avoid wasting battery?

Considering the PCWorld review that came out in March: Free Android Apps Packed with Ads are Major Battery Drains ...Researchers from Purdue University in collaboration with Microsoft claim ...
1
vote
1answer
135 views

Should I provide fallbacks for HTML5/CSS3 elements in a web page at this point?

I'm wondering if I should bother providing a fallback for HTML5 tags and attributes and CSS3 styling at this point in time. I know that there's probably still a lot of people out there who use older ...
10
votes
1answer
2k views

Best exception handling practices or recommendations? [closed]

I think the two main problems with my programs are my code structure/organization and my error handling. I'm reading Code Complete 2, but I need something to read for working with potential problems. ...
7
votes
3answers
254 views

Should I modify an entity with many parameters or with the entity itself?

We have a SOA-based system. The service methods are like: UpdateEntity(Entity entity) For small entities, it's all fine. However, when entities get bigger and bigger, to update one property we ...
6
votes
7answers
5k views

Non-zero exit status for clean exit

Is it acceptable to return a non-zero exit code if the program in question ran properly? For example, say I have a simple program that (only) does the following: Program takes N arguments. It returns ...
80
votes
17answers
5k views

Are my negative internship experiences representative of the real world? [closed]

I'm curious if my current experiences as an intern are representative of actual industry. As background, I'm through the better part of two computing majors and a math major at a major university; ...
2
votes
2answers
288 views

Reflective practice in programming using keystroke playback

I'm thinking of applying Reflective Practice to improving my programming skills. To that end, I want to be able to watch myself writing code. In general, what is a good method for applying ...
5
votes
5answers
579 views

When decomposing a large function, how can I avoid the complexity from the extra subfunctions?

Say I have a large function like the following: function do_lots_of_stuff(){ { //subpart 1 ... } ... { //subpart N ... } } a common pattern is to decompose it ...
3
votes
3answers
208 views

Which is more important in a web application code promotion hierarchy? production environment to repo resemblance or unidirectional propagation?

Lets say you have a code promotion hierarchy consisting of several environments, (the polar end) two of which are development (dev) and production (prod). Lets say you also have a web application ...
3
votes
5answers
806 views

How to deal with colleagues refuse to follow practices?

I was discussing with another colleague about what we should be used when an DB entity is referring to another. I don't think there is any good reason to break the practice of putting the Primary Key ...
36
votes
8answers
2k views

What is the term for a really BIG source code commit?

Sometimes when we check the commit history of a software, we may see that there are a few commits that are really BIG - they may change 10 or 20 files with hundreds of changed source code lines ...
36
votes
8answers
3k views

Is OOP becoming easier or harder? [closed]

When the concepts of Object Oriented Programming were introduced to programmers years back it looks interesting and programming was cleaner. OOP was like this Stock stock = new Stock(); ...
11
votes
7answers
400 views

Generalise variable usage inside code

I would like to know if it is a good practice to generalize variables (use single variable to store all the values). Consider simple example Strings querycre,queryins,queryup,querydel; querycre ...
4
votes
5answers
13k views

How to unit test a jsp file?

I'm developing a Java 6 EE application and I'm testing my jsp code with another one with a testing version of the function calls and code used in the original one but it seems loose and impractical. ...
5
votes
6answers
552 views

What are best practices when switching between projects/coming back to projects frequently?

The nature of my job is that I have to switch back and forth between projects every few weeks. I find that one of the biggest impediments to my productivity is the ramp-up time to getting all the ...
4
votes
3answers
3k views

is it a bad practice to call a View from another View in MVC?

I have some plain Views, they don't have any logic behind them (there is no action or controller behind them), their only propouse is to alert the user about something like "We have sent you an email ...
56
votes
22answers
4k views

Why do some programmers think there is a contrast between theory and practice? [closed]

Comparing software engineering with civil engineering, I was surprised to observe a different way of thinking: any civil engineer knows that if you want to build a small hut in the garden you can just ...
5
votes
3answers
310 views

When module calling gets ugly

Has this ever happened to you? You've got a suite of well designed, single-responsibility modules, covered by unit tests. In any higher-level function you code, you are (95% of the code) simply ...
11
votes
4answers
3k views

Motivation and use of move constructors in C++

I recently have been reading about move constructors in C++ (see e.g. here) and I am trying to understand how they work and when I should use them. As far as I understand, a move constructor is used ...
3
votes
5answers
422 views

returning null vs returning zero, which would be better?

I inherited a project that I am managing and having to maintain pending the redevelopment of the code base. At the moment I am being tasked with adding little features all over the place and have ...
1
vote
9answers
2k views

When calculating how many days between 2 dates, should you include both dates in the count, or neither, or 1?

I am trying to make an algorithm that counts the days between two dates, e.g. between 3/1/2012 and 3/2/2012. What is the correct answer, or the most popular choice? Should be the one I use? In ...
4
votes
2answers
441 views

Is it a good pattern that no objects should know more than what it needs to know?

I am implementing a controller class to manage a view. I have a file uploader class, Grabber, which could communicate in one of 2 ways: 1) Offer some kind of notification event to the controller on ...
0
votes
2answers
203 views

Asynchronous Designing and Programming

Me and a friend are looking to team up for some freelance web designing. We both are very strong PHP coders and website designers, but I am better at design and he is better at PHP. So, I'll be ...
39
votes
10answers
6k views

Is writing software in the absence of requirements a skill to possess or a situation I should avoid?

I find that some software developers are very adept at this, and often times are praised for their ability to deliver a working concept with abstract requirements. Frankly, this drives me crazy, and I ...
7
votes
3answers
866 views

Interfacing application code with unit tests

I am working on a project in which we have to implement and unit test some new module. I had a quite clear architecture in mind so I quickly wrote down the main classes and methods and then we started ...
5
votes
7answers
707 views

What are some ways to maintain codebases written in two languages that implement the same logic?

I have a logic intensive algorithm that I need to code in two languages (actually I finished it in one language satisfactorily and am about to start coding in the other language). By logic intensive ...
0
votes
3answers
366 views

Software design approach for large relational database

I am working on a personal side project that will utilize a complex and large relational database. During the design of the database I had some co-workers give advice to how I should approach my ...
8
votes
2answers
939 views

How to optimise an sentiment analysis algorithm for larger data sets?

I am a noob to sentiment analysis and found a good resource for Bayesian Opinion Mining and a way to make it self improving. I was wondering though, if the optimum analysis is dependent upon the ...
0
votes
4answers
256 views

Checking for emptiness of collections with (in)equalities - what's the best practice?

For a long time now I've been in the habit of checking whether a collection (array, dictionary, whatever) is non-empty with a nonequality. Like this: if ( MyArray.Length < 1 ) { // Do ...
2
votes
5answers
1k views

Effective way to gain practical knowledge

I am currently nearing the end of my first year of my CS degree and have been disappointed with the lack of coding I have been asked to do (one unit). I am basically looking for an effective way to ...