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

6
votes
8answers
996 views

Why do we need “callback functions”?

I am reading the book programming in Lua. It said that Closures provide a valuable tool in many contexts. As we have seen, they are useful as arguments to higher-order functions such as sort. ...
-5
votes
0answers
42 views

How do I find a reference that explains the x86-64 machine opcodes for the chip? [closed]

I keep getting thumbs down, and nobody is helping. I want to write an Assembly equivalent x86 bootloader, but in opcodes only. I need to find out what the exact ASCII equivalent opcodes are so I know ...
-1
votes
0answers
54 views

This code doesnot follow OCP, then what's the right way to make it follow OCP?

W.r.t : http://www.codeproject.com/Articles/36872/Is-Code-Complete What's the right way to write the following code so that it follows OCP : /// DrawImages function violates OCP principle. /// ...
2
votes
10answers
1k views

Is it possible to reach absolute zero bug state for large scale software? [closed]

I am talking about 20-30+ millions lines of code, software at the scale and complexity of Autodesk Maya for example. If you freeze the development as long as it needs to be, can you actually fix all ...
4
votes
2answers
280 views

Is there a name for being able to quickly find the relevant code?

I notice that a property of codebases that I like hacking on is that it's quick to find the relevant code for some feature, without knowing much about the code base at all. For example, searching for ...
3
votes
3answers
218 views

How to encapsulate 'global' variables in C#? /best practice

In C# what is the best practice for encapsulating variables I need to use in multiple methods? Is it OK to simply declare them at the top of my class above the two methods? Also if I am using app ...
1
vote
1answer
96 views

Which practice is the best for database connection? (PHP, etc)

Leave a open database connection throughout the execution of the aplication, or for each time a operation will be executed a new connection will be created? Open throughout the execution: Open ...
2
votes
3answers
155 views

Implicit optimization versus explicit optimization

To explain what I mean, let me start with an example. Consider a deque that supports O(logn) concatenation with another deque and O(n) addition of n elements at one end. This dequeimplements a ...
0
votes
1answer
122 views

Coping with test code becoming too complex [duplicate]

Our test automation team writes tons of automation tests for our WEB application, but it seems to me that their code is becoming way too complex and warrants that someone will test it as well. Is ...
2
votes
2answers
60 views

Deleting Lookup Item

I was wonder what people do in this situation. You have an admin area of a system where you let users define a list of values they want to see in a dropdowns across the system. What do you do in ...
1
vote
3answers
491 views

How can I get over programming laziness? [closed]

I'm having this problem a lot more lately in the past year. I'm still relatively new to programming, and I try my best to actively learn new things, or to program in my spare time, but I can't. No ...
1
vote
2answers
227 views

Why should I use List<T> over IEnumerable<T>?

In my ASP.net MVC4 web application I use IEnumerables, trying to follow the mantra to program to the interface, not the implementation. Return IEnumerable(Of Student) vs Return New List(Of ...
5
votes
2answers
208 views

Cyclomatic Complexity Ranges

What are the categories of cyclomatic complexity? For example: 1-5: easy to maintain 6-10: difficult 11-15: very difficult 20+: approaching impossible For years now, I've gone with the assumption ...
2
votes
1answer
87 views

Approaches to reduce cyclomatic complexity

I was running our code through JSHint, and decided to switch checks against cyclomatic complexity, and then went on long refactoring sprint. One place though baffled me, here is a code snippet: var ...
2
votes
2answers
119 views

When to (enforce) linting in a software project

I'm heading a new team of developers working on a software project that makes use of continuous integration (circleci) w/ a pretty fleshed out suite of busterjs unit/integration/acceptance tests. Our ...
4
votes
2answers
557 views

Is it a bad habit to (over)use reflection?

Is it a good practice to use reflection if greatly reduces the quantity of boilerplate code? Basically there is a trade-off between performance and maybe readability on one side and ...
2
votes
0answers
114 views

How do the Application and Database Interface Layers interact at their boundary?

I was watching one of Uncle Bob's videos and he brought up the Database Interface Layer. He had this diagram showing it: These arrows show that the DB Interface Layer is aware of and calls the ...
0
votes
1answer
96 views

How to begin with web development in PHP [duplicate]

As I am the New Learner in the PHP Web Development and I want to become a good web developer who can at least make a good and dynamic web site quickly. Currently I have learnt the following things: ...
14
votes
4answers
501 views

Is the “Gets or sets ..” necessary in XML documentation of properties?

I am looking for a recommendation of a best practice for XML comments in C#. When you create a property, it seems like that the expected XML documentation has the following form: /// <summary> ...
2
votes
5answers
312 views

Is it bad to reuse other programmer's code libraries that can perform generic tasks? [duplicate]

Reusing large amount of helpful codes made by other programmers is very tempting for me. I specifically refer to codes that can perform generic tasks, such as Data Access Layer (DAL) codes. I am ...
4
votes
2answers
261 views

How to effectively put code live

What are the general strategies to employ when attempting to ensure that a module of code will function correctly on the live system? A common problem we have at our software house is that we ...
2
votes
2answers
262 views

Programming methodology - best way to level up? [closed]

Ok, so I'm at a point where I think I have my basics down. I'd like to think I'm just starting to become an intermediate dev. So, how do I level up here? It feels like I have reached my threshold, ...
1
vote
2answers
213 views

Choosing between words with different spellings for function names

A question has been bothering me for a while: when developing international projects, it is common sense to use English as the reference language since it is the language that the most people ...
0
votes
0answers
10 views

Determine whether a COM is a In-Proc or LocalServer [migrated]

I got an application that use a COM library, just wondering how can I know whether that application use that COM library as a LocalServer or In-Proc? I looked at the code being constructed in this ...
5
votes
3answers
456 views

Might starting variables/members with an underscore puzzle the compiler?

I've been taught since high school that defining variables like this: int _a; or int __a; should be consider bad practice because this would eventually puzzle compilers that use variables starting ...
-2
votes
0answers
102 views

What is a good tool to manage complexity of your programs? [closed]

I've been through this many times at work. While developing a complex application that does lots of say, database-querying, network-i/o, multi-threading, etc. it initially looks all nice and exciting ...
1
vote
2answers
83 views

Wrapping specific checked exception in domain unchecked ones? [duplicate]

Uncle Bob says in Clean Code book that Unchecked Exceptions should be used. Now JDK has some checked exceptions: IOException, IllegalAccessException etc. which cannot be avoided. In my application ...
39
votes
10answers
2k views

Is it a good idea to schedule regular time to clean up code? [closed]

I'm managing a small team of developers. Every so often we decide we're going to spend a day or two to clean up our code. Would it be a good idea to schedule regular time, say 1 week every 2 months, ...
3
votes
2answers
222 views

What is the difference between a principle and a best practice?

I recently read http://simpleprogrammer.com/2013/02/17/principles-are-timeless-best-practices-are-fads/ and it resonated with me. I find the more experienced programmers/architects go against current ...
1
vote
0answers
98 views

Educating Teams - Software Craftsmanship and Best Practices [closed]

I'm part of a team that's responsible for trying to spread better coding practices to other teams. These ideas are things like software craftsmanship, professionalism, learning new technology, ...

1 2 3 4 5 18
15 30 50 per page