Questions tagged [programming-practices]

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.

Filter by
Sorted by
Tagged with
14
votes
12answers
2k views

What do programmers "micro-optimize" for today? [closed]

Back in the "good ol' days," when we would copy shareware onto floppies for friends, we also used a fair bit of assembly. There was a common practice of "micro-optimization," where you would stare and ...
12
votes
3answers
8k views

Is there a good reason to use Java's Collection interface?

I've heard the argument that you should use the most generic interface available so that you're not tied to a particular implementation of that interface. Does this logic apply to interfaces like java....
9
votes
11answers
710 views

Should my colleagues review each others code from source control system?

So that's my story: one of my colleagues uses to review all the code, hosted to revision system. I'm not speaking about adequate review of changes in parts that he belongs to. He watches the code file ...
124
votes
6answers
156k 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 "...
126
votes
27answers
10k views

What are the worst false economies in software development? [closed]

What are the worst false economies (that is ways of saving money that ultimately cost more than they save) prevalent in the software industry and how do you combat them?
8
votes
4answers
2k views

How to deal with complex codes in (huge) projects

I am preparing a memoir about "Why do (some) IT projects become too complex and how to avoid it ?". If you have ever encountered projects having complex codes or were hard to maintain, how did you ...
5
votes
6answers
403 views

Is Extreme Programming (XP) the best way of learning from experts? [closed]

I have been involved in many development models, and have found XP to be the best for a new programmer from the aspect of learning, as the collaboration between the team members is very high and the ...
6
votes
2answers
3k views

What's the proper way to exit program in C?

There are many ways how to exit program in C. Some of them are returning zero or error code, using exit function with EXIT_SUCCESS, EXIT_FAILURE, exit(0), exit(1) or some other error code, abort and ...
11
votes
6answers
1k views

What software do you use to help plan your team work, and why?

Planning is very difficult. We are not naturally good at estimating our own future, and many cognitive biases exacerbate the problem. Group planning is even harder. Incomplete information, ...
4
votes
7answers
447 views

Not specifying a return in a function, good or bad?

I have coded like this many times, and I've never encountered an issue, but the compiler always warns when it expects a return and there is none. For instance, look at this: -(NSString *)...
12
votes
3answers
3k views

Exceptions or Error codes

We are building a web service(SOAP, .Net) which would be talking to (mostly) native clients (windows, C++) and we are wondering what is the best way to communicate errors to the client (e.g. ...
20
votes
9answers
1k views

Tips on persuading boss that code review is a good thing [closed]

Let's say one works in a hypothetical company that has several developers that rarely worked together on projects and the Boss didn't believe that code reviews are worth the time and cost. What are ...
13
votes
5answers
926 views

When to start writing Exception Handling, Logging

When do you start writing your Exception Handling Code? When do you start writing Logging Statements. For the purpose of elaborating this question, let us assume that we are on .NET platform with ...
18
votes
5answers
7k 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 ...
100
votes
45answers
28k views

What popular "best practices" are not always best, and why? [closed]

"Best practices" are everywhere in our industry. A Google search on "coding best practices" turns up nearly 1.5 million results. The idea seems to bring comfort to many; just follow the instructions,...
21
votes
9answers
3k views

How to teach Exception Handling for New Programmers? [closed]

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

Which specific practices could be called "software craftsmanship" rather than "software engineering"? [closed]

Although not a new idea there seems to have been a big increase in the interest in software craftsmanship over the last couple of years (notably the often recommended book Clean Code's full title is ...
9
votes
1answer
754 views

String class based on graphemes?

I'm wondering why we don't have some string classes that represent a string of Unicode grapheme clusters instead of code points or characters. It seems to me that in most applications it would be ...
11
votes
12answers
2k views

Maintainability of Boolean logic - Is nesting if statements needed?

Which of these is better for maintainability? if (byteArrayVariable != null) if (byteArrayVariable .Length != 0) //Do something with byteArrayVariable OR if ((byteArrayVariable != ...
5
votes
12answers
437 views

What are your initial three steps when you are first presented with a software problem? [closed]

I am curious about the very early steps that a programmer's mind takes when it first encounters a problem that it is supposed to solve. How do you start reasoning about it ? What are the first ...
105
votes
47answers
69k views

Make a big deal out of == true?

There is a colleague of mine who constantly writes: if (someBool == true) It drives me up the wall! Should I make a big deal of it or just drop it?
18
votes
9answers
3k views

How common are "bandage" fixes? [closed]

Imagine the following scenario: You've detected that your (or someone else's) program has a bug - a function produces the wrong result when given a particular input. You examine the code and can't ...
14
votes
9answers
785 views

How can I bootstrap a software development community at my school?

I'm a student at the University of South Florida who's frustrated with the educational environment in the Computer Science program. Right now, I'm taking "Program Design." I should be learning how to ...
17
votes
4answers
575 views

Does your company have a written policy about personal (technical) blogging? [closed]

Does your company have a written policy about personal (technical) blogging? Care to share? We encourage our developers to keep personal blogs and talk about technical problems they've encountered ...
1
vote
7answers
806 views

Would you use UML if it kept stakeholders from requesting changes frequently? [closed]

As much as programmers hate to document their code/system and draw UML (especially, Sequencing, Activity and State machine diagrams) or other diagramming notation, would you agree to do it if it kept ...
10
votes
3answers
239 views

Unit tests, write them before or after the framework? [closed]

This is my first question here, so i'll make it short and to the point. When Writing unit tests, should you write them before or after you have made the underlying framework for them? This came up in ...
38
votes
5answers
29k 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.
16
votes
6answers
5k views

Do speakers get paid for tech talks? [closed]

I'm curious if speakers (bloggers, google employees like Matt Cutts) get paid for speaking at conferences. If they do, how much? If they don't, or they get paid so little that it's as though they don'...
18
votes
12answers
2k views

Commented short fancy code vs. uncommented longer easy-to-understand code - which is preferred?

Sometimes an algorithm can be written in two ways: The short, fancy way; or The longer, easy-to-understand way. For example, here is a longer, easier way of copying a string source to dest in C: *...
10
votes
6answers
3k views

Do you handle Out-Of-Memory conditions?

What do you do when malloc returns 0 or new throws exception? Just halt or try to survive OOM condition/save the user's work?
25
votes
8answers
4k views

How did you become a const correctness convert? [closed]

After 15 years of C++, I've still haven't learn to love using const. I understand it's use, but I've never actually been in situation where being const correct would have avoided the problem I was ...
12
votes
4answers
845 views

Which web site gives the most accurate indication of a programmer's capabilities?

If you were hiring programmers, and could choose between one of (say) the top 100 coders on topcoder.com, or one of the top 100 on stackoverflow.com, which would you choose? At least to me, it would ...
17
votes
10answers
1k 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 ...
3
votes
3answers
79 views

Getting a coherent view of the state of the data

Here is a theoretical problem. It could apply to many systems. Let's assume RESTful Web services for example. You want to find out something but as it happens you can't get it in a single query. ...
36
votes
8answers
3k views

Is Linq having a mind-numbing effect on .NET programmers?

A lot of us started seeing this phenomenon with jQuery about a year ago when people started asking how to do absolutely insane things like retrieve the query string with jQuery. The difference ...
14
votes
17answers
603 views

What do you consider to be the prime cause of software defects (and how to minimize them) [closed]

I define defect as : "something within the application design or code which prevents it functioning as per requirements." I'm looking for ideas about the causes of defects, eg the human factor, ...
52
votes
90answers
26k views

What should every programmer know about programming?

Please, stay on technical issues, avoid behavior, cultural, career or political issues.
27
votes
11answers
2k views

Is it okay to use a language that isn't supported by your company for some tasks?

I work for a company that supports several languages: COBOL, VB6, C# and Java. I use those languages for my primary work, but I often find myself to coding some minor programs (e.g. scripts) in Python ...
8
votes
2answers
3k views

5 things before starting a project? [closed]

What are the first 5 things you do before starting a new project? Do you always spend a day researching new frameworks? Or, using similar or competing products?
34
votes
12answers
9k views

Why isn't literate programming mainstream? [closed]

Literate programming has good ideals. Why do you think that this isn't mainstream? It is because it has failed to deliver?
31
votes
5answers
3k 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 ...
14
votes
10answers
2k views

Will correctness proofs of code ever go mainstream? [closed]

All but the most trivial programs are filled with bugs and so anything that promises to remove them is extremely alluring. At the moment, correctness proofs are code are extremely esoteric, mainly ...
32
votes
14answers
25k views

Is using goto ever worthwhile?

goto is almost universally discouraged. Is using this statement ever worthwhile?
6
votes
6answers
401 views

Best Practices or Project Standards

As a software development contractor I've worked on many projects with differing standards and conventions. Quite often these conventions go against the software best practices we know and 'love'. ...

1
27 28 29 30
31