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

4
votes
5answers
514 views

Where to Start When Making a Web Application on Your Own

I've been assigned an in-house web application that is basically an Employee and Project Management System. I'm getting confused as to where I should really start with this assignment (I mean I'm my ...
7
votes
7answers
516 views

Determine Better Coding Practice

As a new programmer, it has always been hard to create applications, because I am still at the learning stage. I understand that to achieve a particular affect or function in an application, there ...
13
votes
4answers
1k views

What is the limit to the number of a class methods?

In different design books that I read, sometimes big emphasis is put on the number of methods that a class must have (considering an OO language, as java or C# for instance). Often the examples ...
14
votes
11answers
799 views

Is it efficient to attach a comment on every function?

I moved to this company recently, and my first reaction of the development process leaves me with doubts. Here is where I really doubt the efficiency: Every single function must have Javadoc style ...
74
votes
22answers
39k views

Automatic programming: write code that writes code [closed]

After reading the book The Pragmatic Programmer, one of the arguments I found most interesting was "write code that writes code". I tried searching over the net for some more explanations or articles ...
13
votes
12answers
1k views

What to do with a not well organized application? [duplicate]

I'm a newly graduate programmer and just got hired before my graduation. In the office, I used to create and revise modules of some applications developed by other programmers in our company. The ...
41
votes
12answers
4k views

Are there problems with using Reflection?

I don't know why, but I always feel like I am "cheating" when I use reflection - maybe it is because of the performance hit I know I am taking. Part of me says, if it is part of the language you are ...
9
votes
5answers
834 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 ...
16
votes
10answers
2k views

What are the best practices regarding unsigned ints?

I use unsigned ints everywhere, and I'm not sure if I should. This can be from database primary key id columns to counters, etc. If a number should never be negative, then I will always used an ...
10
votes
2answers
2k views

Is it true that “Real programmers can write assembly code in any language.”?

Real programmers can write assembly code in any language. (Larry Wall). As far as I can make out, Mr. Larry Wall is trying to say that to a real programmer any language can have the same ...
4
votes
11answers
733 views

Is a programmer's gut instinct an acceptable answer with regard to design decisions?

There are times where I can immediately recognize and suggest a fix for a problem design pattern. However, there are other times where putting it into words just isn't possible. I know something isn't ...
6
votes
7answers
442 views

What's the best way to prepare your design & code for those “unknown unknown” bugs from day one?

I am just wondering, is there any practical method or technique or even tricks to get avoid those "unknown unknown" bugs especially those nasty and random ones which are often emerge at the last ...
6
votes
5answers
644 views

What do you call different user roles in software design?

I'm just curious, I'm building a web app with a User model which has role-based permissions. I have the following roles: Visitor (anonymous user) ?? (logged-in user) Moderator Admin I'm having a ...
21
votes
15answers
3k views

Spending too much time debugging

Yesterday, I rolled out a v1.0 release of a Web project I've spent about 6 weeks working on (on and off, that is). I haven't made any exact records of my time, but according to my experiences I would ...
6
votes
4answers
2k views

Is it worth developing custom shopping cart? [closed]

We have handsome library of cakephp modules at my workplace, and we develop custom websites at good pace until the shopping cart comes our way to slow down the process. I have used various (Magento, ...
7
votes
3answers
388 views

Is it beneficial to have a long-term experience in a specific technology rather than short-term multiple ones?

I am currently working in asp.net and having almost 1 year of experience. Now my company wants to change my technology and wants to put me in mobile development (might be other than .net mobile ...
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 ...
8
votes
3answers
529 views

BDD: Getting started

I'm starting with BDD and this is my story: Feature: Months and days to days In order to see months and days as days As a date conversion fan I need a webpage where users can enter ...
3
votes
3answers
192 views

Rewriting code / better initial outline

Single-programmer project. I'm constantly having to rewrite my own code on an on-going project. It's not buggy, but every time I expand my program (which previously-planned features), I keep having ...
19
votes
10answers
943 views

Inspiring a co-worker to adopt better coding practices?

In the Handling my antiquated coworker question, various people discussed strategies for dealing with coworkers who are unwilling to integrate their workflow with the team's. I'd like, if possible, ...
1
vote
2answers
246 views

What would be a good set of first programming problems that would help a non-CS graduate to learn programming?

I'm looking at helping a friend learn programming (I'm NOT asking about the ideal first language to learn programming in). She's had a predominantly mathematical background (majoring in Maths for both ...
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, ...
37
votes
11answers
3k views

Is it bad habit not using interfaces? [closed]

I use interfaces rarely and find them common in others code. Also I create sub and super classes (while creating my own classes) rarely in my code. Is it a bad thing? Would you suggest changing ...
0
votes
2answers
167 views

Looking for the fastest way to collect form data

I am developing an application in Flex. There are 20+ 'pages', each with its own form. I need to collect all the entered data and pass it to an API method. What I am wondering is when I should begin ...
5
votes
5answers
2k views

Trailing forward slash in directory names - good programming practice?

I want to ask the user of my bash script to pass a directory path as argument. Which one of the following is a good programming practice - to require that the user enter a trailing / (forward slash) ...
2
votes
1answer
269 views

Should I devise a FileHandler interface to deal with different Files?

My background has largely been manual testing and I started learning core java to be able to work with Selenium. I am wanting to write couple of reusable method, like reading/writing data from csv, ...
2
votes
2answers
189 views

Globally important concepts to understand? [closed]

I have a history of web development using LAMP + html/css (though I admit the LAMP aspect isn't in great depth) and would like to follow the career path of software developer, so I'm currently ...
22
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 ...
10
votes
7answers
2k views

Best way to break down overwhelming code into manageable chunks?

I'm continually becoming overwhelmed by large projects, once they reach a certain level of complexity. Once I reach a certain point in a project, my progress slows to a crawl and I find myself ...
5
votes
1answer
390 views

Scoping recommendations while developing in C

While developing a library using C, what are your recommendations about variable and function scoping? In C++, OOP and namespaces made the whole thing a lot easier. But how to do that with plain C? ...
5
votes
1answer
708 views

Coding site with test harness for basic data structures like linked list,graph,strings etc

I just took an Amazon online test and I messed it up badly. I am out of practice and have low confidence in writing code. Are there any coding sites with test harnesses for basic data structures and ...
22
votes
9answers
2k views

Future proofing code

Where I work developers are always telling me that "I added this just in case for the future" or "I think it's a good idea to do this because they'll probably want it some day". I think it's great ...
2
votes
3answers
347 views

How to handle workload in a better way

I am a fresher working in a software company. I am working on a project all alone. Though I studied CS, I dont seem to grasp things (concepts, code, etc.) easily. Most of what I read is ...
10
votes
9answers
507 views

Coping with an unfixable endless project

We have a large (1200+ hours) website that has a lot of technical debt. This is mainly caused by the following (usual) reasons. Multiple programmers who come and go during development. Change of ...
5
votes
2answers
438 views

Library version control best practices

I may be violating some StackOverflow terms by asking a question which is more likely to yield discussion than a clean answer. Here goes, however. I've developed some software for a small company ...
19
votes
9answers
480 views

Which software development practices would you recommend non-programmers implement in their fields of work? [closed]

Say you had to give a talk to non-programmers who were looking to learn something from software development that they could apply to their own functions. Question: What practices would you preach? ...
6
votes
4answers
288 views

Avoiding problems when copying code

From time to time, I find myself copying a bit of code and modifying the copied version. I know very well that having two copies of the same code is a very bad idea, but those pieces of code are small ...
4
votes
4answers
384 views

What determines when an application requires mvvm?

I'm developing mobile applications for Windows Phone 7. This application calls some web services and occasionally sends responses out via web services. I recently started looking into MVVM and noticed ...
5
votes
5answers
375 views

When designing a protocol, is it better for a method to accept a single object of a specific type, or an array?

I'm currently designing a protocol for internal use, so it doesn't make a huge difference in this particular case, but it got me wondering: Is it better for a method to accept a single object of a ...
0
votes
1answer
283 views

Programmatically create header file

What's the best way to programmatically create a header file for another project? Here's the specific use case: one program fingerprints the device for discrete information like version number, id ...
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, ...
6
votes
8answers
338 views

What benefit do I get from good methodology?

One of my friends has worked for nearly 10 years, asked me why he needs to learn new things such as unit-testing, MVC, Multi-tier architecture (he creates 3-tier application but designs like 2-tier), ...
4
votes
5answers
378 views

How do you know what a program needs to do to complete a given task?

I am a noob when it comes to programming. I just know some Ruby, that's really it when it comes to programming, but it's definitely an interest. In learning to program, I give myself tasks to ...
12
votes
4answers
2k 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 ...
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 ...
4
votes
6answers
716 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
350 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 ...
21
votes
15answers
3k 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?
3
votes
3answers
904 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 ...
0
votes
7answers
320 views

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

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" ...