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
2answers
168 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
161 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
74 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
115 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
539 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
74 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
82 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
472 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
295 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
250 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
235 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
199 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
445 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
99 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
77 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 ...
38
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
216 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
92 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, ...
0
votes
1answer
457 views

Why are Wordpress sites so easily hacked? [closed]

I have found that hacker can easily hack wordpress site. I have found this posts related to wordpress site hacking. 1) http://wordpress.org/support/topic/website-hacked-3 2) ...
2
votes
2answers
199 views

What is Delegation and why is it important in iOS programming?

At the moment I am teaching myself iOS programming, and one concept I find really hard to wrap my head around is delegation. What is it? Why and how is it used? What is the advantage? The technical ...
4
votes
4answers
252 views

In which order should I do comparisons? [duplicate]

I'm a strong proponent of writing if statements like this: variable == constant Because to me it just makes sense, it is more readable than the inverted: constant == variable Which seems to be ...
-2
votes
1answer
103 views

What is the best practice for method parameter validation in a library?

I develop a game library in javascript, containing many classes. I hesitate on the behavior that I should follow concerning method parameter validation: Should I check the validity of parameters ...
5
votes
1answer
139 views

What recent studies point to the possible improvement a programmer can make as a result of personal character traits?

In Chapter 33, Personal Character of Code Complete (Second ed.) McConnell cites some studies such as those listed below in support of the assertion that 10-1 improvement is possible from efforts in ...
-1
votes
0answers
43 views

Matlab coding celestial computing method [closed]

I am trying to code a celestial method of navigation called "Method of coplanar Vertices" Algorithms are not very explicit regarding LMS 2D/3D which is applied to approximate the plan. I wrote the ...
-2
votes
1answer
38 views

Methodology for software facing internet connections? [closed]

Is there a known methodology stronger than TDD to prevent accepting invalid input and performing undesired behaviour for software that is going to be open to the internet at large (e.g., HTTP ...
0
votes
0answers
102 views

Facing “crunch time” for work project, need advice [closed]

So the discussion came up from management that we need product development to "accelerate" Some of us have done ridiculous crunches and so we know about diminished returns. Fortunately management is ...
1
vote
4answers
221 views

Switching from ActionScript to JavaScript, tips for writing code?

I am quite comfortable with using actionscript3 and flash. I also have some experience with Java. But recently, I started learning JavaScript and node.js. I ultimately want to make a 3d game in ...
16
votes
4answers
1k views

Why is test driven development missing from Joel's Test?

I was reading this blog by Joel Spolsky about 12 steps to better code. The absence of Test Driven Development really surprised me. So I want to throw the question to the Gurus. Is TDD not really worth ...
4
votes
5answers
411 views

Why is the usage of string keys generally considered to be a bad idea?

This has been bugging me for a while. Most of the time, when it comes to storing data in structures such as hashtables, programmers, books and articles insist that indexing elements in said structures ...
3
votes
1answer
114 views

Security and code execution

If I am taking data from a website, for example status updates from Facebook and showing them on my website. What possible damage can be caused if I am not taking into account that the code written as ...
-3
votes
1answer
93 views

Documents to use on project development [closed]

I am lost on how to plan the development of a iphone mobile app, when building a specific mobile app for a client, i need to make a questionnaire for that same client and i also need to have a ...
7
votes
3answers
95 views

Rules about the concreteness of method parameter types, return types and property types

Some time ago I read a kind of "rule of thumb" about the concreteness of method parameter types, return types and property types, but I just do not remember it. It said something about keep your ...
20
votes
6answers
848 views

How to avoid giant glue methods?

In my current job, I've been tasked with cleaning up old code a few times. Often the code is a labyrinth and the data behind it is even more tangled. I find myself combing out things into nice, ...
6
votes
1answer
64 views

Ledger or log design for a point-based system?

Right now creating a new service that will integrate into our company's existing platform. The service will be responsible for tracking "points" that a user can generate over time through certain ...
4
votes
3answers
252 views

How important is encapsulation? [duplicate]

As a student in programming, I learned that encapsulation is one of the most important principles of object-oriented programming. However, I only follow that principle when I feel like it suits my ...
0
votes
1answer
160 views

Is C# namespace should be Project-Name?

I am working with multiple websites (freelancer) and a good amount of them I write using C# MVC4. I created a very good boilerplace project that I plan to use on every next starting mvc4 application ...
1
vote
1answer
79 views

How do I alter my solution / project when the spec changes

I have a question about the best practice in this situation. At one point, my small application allowed the client to upload a file to a server, and download a file from the server (it would also ...
2
votes
2answers
207 views

Writing Clean, Elegant Procedural Code (BASIC): Is There Such a Thing?

I learned to code in OO languages. I've always been interested in design patterns, clean code, etc., etc. - you know the type. Now at work I'm using a BASIC dialect. Given modern programming values, ...
24
votes
7answers
2k views

How to convince my teammates to follow some basic rules

I have a problem with my teammates. Long story short: We are three students working at a project for a competition. The project consists of 2 separate applications: one for Windows (that I develop) ...
5
votes
3answers
310 views

Making things just work and then improve them, or attempt to make them “perfect” from the beginning?

I don't have any experience working as a programmer - I just code as a hobby so far. Some years ago, I heard a programmer say that I should focus on making my code just work despite being slow (it was ...
0
votes
3answers
201 views

C# dynamics and Expando object [closed]

Under which application development scenarios C# dynamics and ExpandoObject can be used or when to consider using c# dynamics and ExpandoObject
5
votes
2answers
348 views

How is the Trial Period for Softwares generally implemented?

I was always under the assumption that trial softwares write a registry value of the installation date and then the software makes a comparison of the current date of the system with the remaining ...
1
vote
2answers
76 views

Mutual exclusion over network - pattern?

I want to do the following: I have a number of computers. On each computer a programm will run. There is no centralized server. The program can choose by defined criteria to give another computer ...
27
votes
9answers
2k views

Is it considered poor practice to include a bug number in a method name for a temporary workaround?

My coworker who is a senior guy is blocking me on a code review because he wants me to name a method 'PerformSqlClient216147Workaround' because it's a workaround for some defect ###. Now, my method ...
9
votes
4answers
642 views

How to convince my coworkers that doing things right will save them time

I recently started at a new company, with a handful of programmers. Its a medium sized company, with around 70 employees, but IT only has 9-10, and there are 3 "programmers" beside myself. However, ...
8
votes
1answer
121 views

Should I refactor my unit tests when I extract a class out of the System Under Test?

I wrote this class that does a few things (perhaps this is a violation of the Single Responsibility Principle). I realize now that some other part of the project needs a piece of that logic and the ...
1
vote
3answers
331 views

Which HTTP status codes are really OK?

I am writing an application to report to the user(devs) when their website fails. And what I mean by fails which is unfunctional or needs to report the problem to devs. I do understand that status ...
11
votes
4answers
632 views

How do I avoid feature creep on a solo project?

So I have a program I'm worked on back in 2011 and all through 2012, but the last release was in December of 2011. I've been actively working on it, but feature creep lured its ugly head and now it is ...
3
votes
4answers
268 views

Declaring functions in order to avoid explicit nested loops

My programming professor has told me that it is a good programming practice (at least in C/C++) to declare a function with the inner loop when nesting loops (not for loops, since when, i.e. looping ...

1 2 3 4 5 11