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

14
votes
4answers
3k views

What is pattern based programming?

Can somebody explain the obsession with patterns and anti-patterns in programming? I ask because I have absolutely no idea what any of the patterns mean. When faced with a programming task I think ...
39
votes
12answers
24k 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 ...
5
votes
6answers
972 views

Should you create a boolean function that does the opposite of an existing function just so its purpose is clear?

Based on this question. Would you consider it best practice to create a function that does the opposite of an existing function just to give it a different name. Example: If you already have bool ...
3
votes
2answers
540 views

Why would you use built-in WebDev instead of local IIS

Since starting developing ASP.NET projects I find myself familiar just touching F5 for debugging. I think most of us are learned that way? From then and much later I learned to live with the spooky ...
1
vote
3answers
617 views

Should I keep all my class definitions in the same class library?

I am starting to work with class libraries in my C# class. We were told to write code that can be used more than one time. Should I keep all my class definitions in one class library for the length of ...
30
votes
14answers
12k views

Is it ever a good idea to hardcode values into our applications?

Is it ever a good idea to hardcode values into our applications? Or is it always the right thing to call these types of values dynamically in case they need to change?
4
votes
3answers
2k views

When to deprecate and when to delete in Java

As part of a refactoring effort or just ongoing development, a particular method or maybe an entire class may become obsolete in some sense. Java supports the @Deprecated annotation to indicate that ...
-2
votes
7answers
408 views

Vector operations: vec1.dot(vec2) vs vec1 * vec2 vs dot(vec1, vec2) [closed]

What's your preferred way to implement/use vector operations? vec1.dot(vec2) allows to reuse vec1 but is hard to read for longer equations dot(vec1, vec2) A friend of mine prefers this as "dot" ...
19
votes
8answers
2k views

Procedural Code vs OOP code

I've finished a project in PHP of 13000+ lines in Procedural Style [because I'm very familiar with that, though I know OOP], and the project is running perfectly. But should I convert it to OOP? ...
19
votes
5answers
12k 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 ...
39
votes
10answers
32k 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 ...
110
votes
18answers
10k 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 ...
20
votes
15answers
4k views

Do Programmers sometimes intentionally over complicate code? [closed]

It seems alot of times on stackoverflow, that people (programmers especially) tend to over complicate a solution to a problem to where the solution is vastly much more complicated then the original ...
6
votes
8answers
321 views

What tools do you as [web] programmers use to help your design skills?

As a programmer, I enjoy embarking on small personal projects and I have a load of open source scripts that I host on github. I am very much a programmer and not a designer. However, it is ...
9
votes
9answers
868 views

Micro-optimizing - BAD vs Game Development

In game development there is a lot of C/C++, in business applications C#. I have seen C/C++ devs express concern over how a single line of code translates to assembly. In .NET some go into IL, ...
8
votes
5answers
2k views

Default values - are they good or evil?

The question about default values in general - default return function values, default parameter values, default logic for when something is missing, default logic for handling exceptions, default ...
23
votes
5answers
4k views

Code Samples and Interviews? [closed]

I've seen a number of questions since I've been here where, in the answer, someone has asserted that they would never use portfolios or code samples coded outside of the interview process to judge a ...
27
votes
13answers
10k views

If XML is so bad…why do so many people use it? [closed]

I understand the purpose of XML, but I always hear people complain about how BAD it is? I don't really understand whats so bad about it? I usually hear the terms "bloated" and "slow" tossed around. ...
25
votes
12answers
2k views

Industry has no place for passionate programmers? [closed]

I've been interning at a place where my manager believes that if you are in a, product company, then you generally spend time tweaking the product and sometimes adding some features, or service ...
2
votes
1answer
282 views

Unit test storage on Android apps

I've been experimenting recently with Android applications. I've developed the convention (which I've seen used elsewhere) of placing my unit tests in a parallel source folder within an Eclipse ...
6
votes
9answers
759 views

How to be more logical? (less bugs/errors) [duplicate]

I have been programming for 6 years and I am in high school (I prefer not to disclose my age). I have dabbled in many different languages. Just to list a few: Java, PHP, C++, Python, Autohotkey, ...
7
votes
6answers
1k views

Reinventing the Wheel, why should I? [duplicate]

So I have this problem, it may be my OCD (i have OCD it's not severe.....but It makes me very..lets say specific about certain things, programming being one of them) or it may be the fact that I ...
6
votes
11answers
835 views

Starting all over again? [duplicate]

Have you ever been developing something and just came to a point where you think that this is rubbish, the design is bad and although I will lose time it will be better to just start all over again? ...
6
votes
6answers
417 views

Getting graduates up to speed?

This question got me thinking about how comapnies deal with newly-hired graduated. Do experienced programmers expect CS graduates to write clean code (by clean I mean code easily understandable by ...
1
vote
7answers
394 views

Is it easier to define and recognize poor application design than good application design? [closed]

A couple recent questions focused on "well designed applications" and "poorly designed applications". Looking at the responses it appears to me that it might be easier to recognize and define poor ...
5
votes
9answers
4k views

What are QUICK interview questions for the Microsoft stack development jobs? [closed]

I'm looking for your best "quick answer" technical interview questions. We are a 100% Microsoft shop and do the majority of our development on the ASP.NET web stack in C# and have a custom SOA ...
4
votes
4answers
382 views

Have you ever had to sacrifice programmer integrity for customer satisfaction?

I mean did you ever reluctantly adopt a less than ideal solution because management told you that "customer is always right"? I'll go with mine first. A few years back, me and my team developed a ...
3
votes
2answers
2k views

Clojure: Adding functions to defrecord without defining a protocol

A record can implement protocols. However, each time I think of a new function that I would like the record to implement, I have to add it to an existing protocol or create a new protocol. How do I ...
34
votes
8answers
2k views

Legitimate use of the Windows “Documents” folder in programs

Anyone who likes their Documents folder to contain only things they place there knows that the standard Documents folder is completely unsuitable for this task. Every program seems to want to put its ...
38
votes
8answers
6k views

Is there such a thing as having too many private functions/methods?

I understand the importance of well documented code. But I also understand the importance of self-documenting code. The easier it is to visually read a particular function, the faster we can move on ...
5
votes
3answers
679 views

Weighing pros and cons for using jQuery for just one widget

I have been using html select boxes or textboxes for date input. On submit, the date is validated and if invalid an error is returned. I have avoided javascript calendars thus far, but jQuery ...
3
votes
1answer
166 views

Should I forward the a call to .Equals onto .Equals<T>?

So, I've got you bog standard c# object, overriding Equalsand implementing IEquatable public override int GetHashCode() { return _name.GetHashCode(); } public override bool ...
8
votes
7answers
499 views

How can we deal with experiental gaps in learning of programmers or any technology field? [closed]

This problem is a re-occuring one in my experiences. That of the ability to learn from other people's experiences, and being able to share what I have learned. Part of the problem of this learning ...
2
votes
7answers
592 views

Generic code or code easy to understand?

at work now I had an argument with co-worker, because I made a page that he feels is too generic. The page has 3 modes (simple, adv and special) - it has to work like this, because we don't choose ...
8
votes
10answers
1k views

What should be first - functionality or design? [duplicate]

I've started reading a book from Head First series about OOP and Design. In a first chapter it is stated I have to worry about design of my application just after basic functionality is ready. Basic ...
7
votes
3answers
264 views

Separation of Tasks in an n-tier app: By module or by tier?

Developing an n-tier app with a team, is it better to divide tasks by module or use case (e.g. Employee 1 creates Admin module, employee 2 creates Payroll module, etc.) or by tier (e.g. Employee 1 ...
4
votes
3answers
2k views

How do you find the most optimized way to write code? [closed]

In my programming career, I have written Java and PHP, Javascript and a little Ruby. I am not a CS major but got into web development from a more broad Internet Professional associates degree, which ...
12
votes
5answers
738 views

Can there be too much uniformity in coding standards?

Is there such a thing as too much uniformity? Where I work we of course have standards including naming conventions, architectures, frameworks to leverage etc. However lately there has been a lot of ...
7
votes
1answer
676 views

What benefits do I get from learning Scheme? [closed]

I'm a java programmer and I've decided to learn a bit about theoretical computer science. I don't have a degree in that and a little background would help me a lot since I don't know anything other ...
3
votes
3answers
2k views

Code to simulate a users actions, such as logging in

I've recently begun working on a PHP application, replacing another developer. I believed the application was using an API to communicate with a remote service but when I looked through the code I ...
30
votes
11answers
7k 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 ...
2
votes
1answer
1k views

What source code organization approach helps improve modularity and API/Implementation separation?

Few languages are as restrictive as Java with file naming standards and project structure. In that language, the file name must match the public class declared in the file, and the file must live in ...
0
votes
3answers
304 views

Most commonly forgotten thing to do when programming/web developing [closed]

Does anyone else have that one thing they always forget to do when programming or developing a website? Personally mine is forgetting to include the Doctype in a website...the amount of time i have ...
13
votes
11answers
1k 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 ...
34
votes
16answers
4k views

Are there concrete reasons not to use libraries and code snippets heavily? [closed]

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 ...
6
votes
3answers
5k 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 ...
30
votes
17answers
6k 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 ...
13
votes
5answers
826 views

What happened to Alan Cooper's Unified File Model?

For a long time Alan Cooper (in the 3 versions of his book "About Face") has been promoting a "unified file model" to, among other things, dispense with what he calls the most idiotic message box ever ...
4
votes
3answers
2k views

Beginner need help on learning Qt programming [closed]

Thought of learning Qt. Need help from experienced ones out here. How should I begin. Some good books to refer. Some good tutorials to learn... Edit: Also which is the good IDE available out there ...
13
votes
0answers
624 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 ...