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

110
votes
20answers
10k views

How would you know if you've written readable and easily maintainable code?

How would one know if the code he has created is easily maintainable and readable? Of course in your point of view (the one who actually wrote the code) your code is readable and maintainable, but we ...
30
votes
15answers
2k views

Does heavy library and code snippet usage make you a bad programmer?

Overall I'm in programming for about 8 years now and it seems to me that I'm relying more and more on open source libraries and snippets (damn you GitHub!) to "get the job done". I know that in time I ...
15
votes
6answers
4k views

Efficient try / catch block usage?

Should catch blocks be used for writing logic i.e. handle flow control etc? Or just for throwing exceptions? Does it effect efficiency or maintainability of code? What are the side effects (if there ...
149
votes
14answers
9k views

How do you balance between “do it right” and “do it ASAP” in your daily work?

I find myself pondering over this question from time to time, again and again. I want to do things the right way: to write clean, understandable and correct code that is easy to maintain. However, ...
13
votes
6answers
3k views

What technologies are used for Game development now days? [closed]

Whenever I ask a question about game development in an online forum I always get suggestions like learning line drawing algorithms, bit level image manipulation and video decompression etc. However ...
71
votes
10answers
13k views

Why do most of us use 'i' as a loop counter variable?

Has anyone thought about why so many of us repeat this same pattern using the same variable names? for (int i = 0; i < foo; i++) { // ... } It seems most code I've ever looked at uses i, j, ...
33
votes
12answers
12k views

Must a programmer learn text editors like Emacs and Vim? How important are they? [duplicate]

I have been writing code so far in conventional text editors that come with the OS so far or use an IDE in some cases. I know there are some advanced text editors like Emacs and Vim available solely ...
15
votes
8answers
1k views

Is perfectionism a newbie's friend or enemy? [duplicate]

Possible Duplicate: Where do you draw the line for your perfectionism? I see that the development community is very focused on doing things the right way and personally I would like to do ...
4
votes
3answers
353 views

What kind of process should I use to learn a big system? [duplicate]

Possible Duplicate: How do you dive into large code bases? I just joined a new company and started to study one of the their bigger system. For me to be productive, I need to understand the ...
57
votes
18answers
5k views

How to tell your boss that his programming style is really bad?

I'm a student and in my spare time I'm working for a big enterprise as Java developer. The job is good, but the problem is, my boss writes very strange code. I don't want to complain, but some issues ...
29
votes
17answers
4k views

Am I copy/paste programmer? [duplicate]

When ever I am stuck with a particular problem, I search for a solution in Google. And then I try to understand the code and tweak it according to my requirement. For example recently I had asked a ...
21
votes
9answers
4k views

Should the methods of a class call its own getters and setters?

Where I work I see lots of classes that do things like this: public class ClassThatCallsItsOwnGettersAndSetters { private String field; public String getField() { return field; ...
14
votes
12answers
4k views

Is it ever worthwhile using goto?

Goto is almost universally discouraged. Is this statement every worthwhile using?
13
votes
11answers
855 views

How do you keep track of the authors of code? [closed]

This is something I was never taught. I have seen alot of different types of authoring styles. I code primarily in Java and Python. I was wondering if there was a standard authoring style or if ...
13
votes
0answers
599 views

How do you dive into a big ball of mud? [duplicate]

Possible Duplicate: How do you dive into large code bases? So there is a question about understanding code. Mine is a similar problem. It started when I joined my current org. and like I ...
9
votes
4answers
630 views

Forgetting basic language functions due to use of IDE, over reliance? [duplicate]

Possible Duplicate: Should newbies use IDE autocomplete (Intellisense)? Is it wrong or bad to use autocomplete? Having used an IDE for the last 3-4 years, the other day a few of my ...
1
vote
5answers
404 views

What are the advantages of recursion compared to iteration? [duplicate]

I'm trying to understand when is preferred to use recursion rather than iteration. Actually I've encountered recursion only in Javascript but never in Python. I imagine that recursion should be used ...
99
votes
11answers
19k views

Should we avoid object creation in Java?

I was told by a colleague that in Java object creation is the most expensive operation you could perform. So I can only conclude to create as few objects as possible. This seems somewhat to defeat ...
79
votes
12answers
6k views

How big does my project need to be for me to unit test it? [closed]

I assume that my project is decoupled enough to allow for unit testing. But how big, exactly, in terms of clases and functions does my project need to be to make unit testing worthwhile? We all make ...
53
votes
17answers
4k views

How to train yourself to avoid writing “clever” code?

Do you know that feeling when you just need to show off that new trick with Expressions or generalize three different procedures? This does not have to be on Architecture Astronaut scale and in fact ...
27
votes
8answers
8k views

Private variable vs property?

When setting a value to a variable inside of a class most of the time we are presented with two options: private string myValue; public string MyValue { get { return myValue; } set { myValue = ...
15
votes
5answers
3k views

When and why you should use void (instead of i.e. bool/int)

I occasionally run into methods where a developer chose to return something which isn't critical to the function. I mean, when looking at the code, it apparently works just as nice as a void and after ...
8
votes
9answers
1k views

Tips or techniques to use when you don't know how to code something? [closed]

I have a background as UI designer. And I realized that it is a bit hard for me to write a pieces of logic. Sometimes I get it right, but most of the time, I end up with something hacky (and it ...
14
votes
10answers
778 views

How do you normally layout a class's regions?

I was wondering if there was a standard for laying out a class's regions. I currently use Fields Constructor Properties Public Methods Private Methods Fields being Private Properties and ...
11
votes
9answers
4k views

if/else statements or exceptions [duplicate]

Possible Duplicate: Defensive Programming vs Exception Handling? I don't know, that this question fit better on this site, or Stack Overflow, but because my question is connected rather to ...
10
votes
16answers
3k views

I'm 15 and I really want to study Computer Science at University, any advice? [closed]

I already do a lot of programming in my spare time. I'm confident with PHP, Javascript, jQuery which I use in combination with HTML to create mock-up websites. The specific part of programming I want ...
159
votes
16answers
12k views

Started wrong with a project, should I start over?

I'm a beginner web developer (one year of experience). Here's my situation: A couple of weeks after graduating, I got offered a job to build a web application for a company where the owner (boss) is ...
71
votes
9answers
8k views

Over thinking development

I've been working as an app developer for a year and a half now (not long I know), and I've just been given my first big project. Needless to say it didn't go very smoothly, so I sought advice from a ...
73
votes
12answers
5k views

Does programming in general become easier to read, write and understand as you gain experience?

I'm a beginner in programming and I've been reading books, studying, reading articles, and whatnot. I'm getting great results since I've started learning programming, and when I was a beginner I used ...
66
votes
18answers
14k views

How to visualize code? [closed]

I've mostly only had to read my own code. As such, I've had no need to visualize the code as I already know how each and every class and module communicate with one another. But the few times I've ...
46
votes
14answers
5k views

Differences between programming in school vs programming in industry? [closed]

A lot of students when they graduate and get their first job, feel like they don't really know how to program even though they may have been good programmers in college. What are some of the ...
104
votes
18answers
8k views

Can a function be too short?

Whenever I find myself writing the same logic more than once, I usually stick it in a function so there is only one place in my application I have to maintain that logic. A side effect is that I ...
47
votes
2answers
17k views

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: ...
21
votes
5answers
5k views

Are there any major alternatives to Waterfall and Agile? [closed]

I am curious if anyone knows of any methodologies that are significantly different (not a recombination) and I would especially appreciate anyone who brought forward any experience with alternatives.
19
votes
2answers
11k views

Git branching and tagging best practices

I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag? For example, say I ...
38
votes
6answers
16k views

Method vs Function vs Procedure

Simple question, but I often hear these three terms defined with such ferocity, but which have been known to me to mean different things over the years. What are the "correct" definitions of ...
19
votes
12answers
2k views

How to teach Exception Handling for New Programmers?

How do you go about teaching Exception Handling to Programmers. All other things are taught easily - Data Structures, ASP.NET, WinForms, WPF, WCF - you name it, everything can be taught easily. With ...
25
votes
11answers
3k views

Scrum for a single programmer?

I'm billed as the "Windows Expert" in my very small company, which consists of myself, a mechanical engineer working in a sales and training role, and the company's president, working in a design, ...
25
votes
10answers
14k views

How many lines per class is too many in Java? [closed]

In your experience, what is a useful rule of thumb for how many lines of code are too many for one class in Java? To be clear, I know that number of lines is not even close to the real standard to ...
15
votes
12answers
4k views

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

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 ...
28
votes
5answers
2k views

Test driven development - convince me! [closed]

I know some people are massive proponents of test driven development. I have used unit tests in the past, but only to test operations that can be tested easily or which I believe will quite possibly ...
22
votes
11answers
4k views

Logging: Why and What? [closed]

I've never written programs which make significant use of logging. The most I've done is to capture stack traces when exceptions happen. I was wondering, how much do other people log? Does it depend ...
21
votes
18answers
4k views

What should be the maximum length of a function? [closed]

What should be the maximum length of a function? And are there cases which are an exception to this?
32
votes
15answers
3k views

Why use other number bases when programming

My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer ...
5
votes
3answers
3k views

Defensive Programming Techniques [closed]

I was attempting to identify an element of software engineering that I think is overlooked, not emphasized or not taught in typical undergraduate course work for CS or SE. What I came up is the ...
21
votes
10answers
3k views

When to commit code?

When working on a project, the code may be developed reasonably fast in a single day or bit by bit for a prolonged period of few weeks/months/years. As code commits are becoming to be considered as a ...
11
votes
5answers
2k views

“Forgot Password” - How to handle this?

I read this answer and found a comment insisting not to send password by email: passwords should not be able to be retrieved by email, I hate that. It means my password is stored in plain text ...
9
votes
5answers
832 views

When should you rewrite? [duplicate]

Possible Duplicate: When is a BIG Rewrite the answer? In Joel Spolsky's famous (or infamous) article Thins You Should Never Do, Part I, he makes the case that doing a rewrite is always a ...
6
votes
4answers
794 views

How to stop gold-plating and just be content to release working developments [closed]

The development team that I'm a member of has recently adapted to work according to Agile practices. This has personally highlighted the fact that I can't stop myself gold-plating code (and ...
35
votes
11answers
2k views

Is it a good practice to code in English? [duplicate]

Possible Duplicate: Do people in non-English-speaking countries code in English? I have a development comming that is intended to be sold across Latin America (Spanish speakers), but I've ...