The code tag has no wiki summary.
194
votes
15answers
20k views
How can a code editor effectively hint at code nesting level - without using indentation?
I've written an XML text editor that provides 2 view options for the same XML text, one indented (virtually), the other left-justified. The motivation for the left-justified view is to help users ...
76
votes
17answers
3k views
How do you cope with ugly code that you wrote?
So your client asks you to write some code, so you do. He then changes the specs on you, as expected, and you diligently implement his new features like a good little lad. Except... the new features ...
48
votes
13answers
6k views
Can commented-out code be valuable documentation?
I wrote the following code:
if (boutique == null) {
boutique = new Boutique();
boutique.setSite(site);
boutique.setUrlLogo(CmsProperties.URL_FLUX_BOUTIQUE+fluxBoutique.getLogo());
...
48
votes
13answers
3k views
Postmortem scripts that run in case of your untimely death? [closed]
Do you know of any interesting real life stories where programmers have written scripts that executed in case of their deaths?
Do you have any scripts that would run in case of your untimely death? ...
45
votes
16answers
4k views
When is code “legacy”?
We've all done it, we've labelled some code (often stuff we've inherited) as "legacy"? But it's still used in the production systems - so is it really legacy? And what makes it legacy? Should we shy ...
44
votes
13answers
2k views
*Code owner* system: is it an efficient way?
There is a new developer in our team. An agile methodology is in use at our company. But the developer has another experience: he considers that particular parts of the code must be assigned to ...
31
votes
14answers
2k views
Do you sign each of your source files with your name? [duplicate]
Possible Duplicate:
How do you keep track of the authors of code?
One of my colleagues is in the habit of putting his name and email address in the head of each source file he works on, as ...
29
votes
5answers
2k views
How much of original code is left in modern software products? [closed]
Many of you out there work for large companies that ship well-known software. I was wondering, how much of original code (basically, code that was "v1.0" release) is left in modern massive ...
23
votes
5answers
1k views
Are there any actual case studies on rewrites of software success/failure rates?
I've seen multiple posts about rewrites of applications being bad, people's experiences about it here on Programmers, and an article I've ready by Joel Spolsky on the subject, but no hard evidence or ...
22
votes
16answers
2k views
Do you think code is self documenting? [closed]
This is a question that was put to me many years ago as a gradute in a job interview and it's nagged at my brain now and again and I've never really found a good answer that satisfied me.
The ...
21
votes
13answers
2k views
How do people manage to write and maintain extremely complex and hard to read code?
Reading SQLite source code is IMO mission impossible. Yet it is a usable piece of quite complex software (it's a full-blown embedded database after all) that can be downloaded, compiled and used from ...
17
votes
11answers
1k views
“// …” comments at end of code block after } - good or bad?
I've often seen such comments be used:
function foo() {
...
} // foo
while (...) {
...
} // while
if (...) {
...
} // if
and sometimes even as far as
if (condition) {
...
} // if ...
17
votes
5answers
586 views
How-to convince company to start documenting for legacy software
It has been less than a year since I joined my current company. Their majority of sales have come from a single product that has been alive since the last 10 years. However, there is minimal (if at ...
17
votes
2answers
229 views
Do you know any studies about the percentage of boilerplate code?
Hey guys. Do you know any studies about the quantity of boiler plate code in different project types? I don't seem to find any actual numbers. I know this is subjective and relative to the language, ...
16
votes
4answers
2k views
Classes naming: singular or plural?
It is always difficult for me to choose between singular and plural forms for classes names:
CustomerRepository vs. CustomersRepository
CustomerService vs. CustomersService
CustomerController vs. ...
15
votes
13answers
2k views
How often do experienced programmers have trouble getting their code to perform its intended purpose?
I'm kind of inexperienced with programming (ie less than a year) and I have recently been getting discouraged, mostly from not being able to solve problems with my own code (Not forgetting parentheses ...
14
votes
5answers
957 views
Is code ownership a code smell?
This is something I've been thinking about ever since I read this answer in the controversial programming opinions thread. And it has been discussed a bit in other threads, such as this one, but I ...
13
votes
18answers
2k views
How to read thousands lines of code without any documentation?
Previously I was searching for a good TimeLine control for a WPF project. I found an answer in Here which direct me to this CodePlex project.
Now I want to change code to feed my culture needs. But ...
13
votes
6answers
1k views
It takes me hours to completely understand solutions to 1000-pt problems on TopCoder. Should I get discouraged? [closed]
Sometimes this applies to the 500-pt ones too. I sometimes start feeling I will never improve enough to code them with ease like the others. Should I just quit? If not, why? It is extremely annoying, ...
13
votes
9answers
848 views
Bringing code to an interview?
Is bringing printed code or code on a USB to an interview a good idea? If so, what kind of code should I bring. Should I avoid big projects and just show small snippets which show off my skills?
12
votes
10answers
2k views
About empty line of code
Why do my colleagues hate it when I add an empty line of code?
Sometimes I add a few lines to see when a method ends and another one starts more easily.
12
votes
13answers
1k views
how to find out if spelling mistakes in source code are a serious issue or not?
I find very troubling amount of spelling mistakes I see everyday in our codebase, from which I will reproduce a very short but representative example:
ArgumnetCount
Timeount
Gor message from queue
...
12
votes
8answers
2k views
How do you read other's code?
Almost every advanced programmer says that it's very useful to read the code of other professionals. Usually they advice open source.
Do you read it or not? If you do, how often and what's the ...
12
votes
10answers
2k views
Understanding already existing complex code base [duplicate]
Possible Duplicate:
What is the most effective way to add functionality to unfamiliar, structurally unsound code?
Till now, all I have worked on is with Java projects that I build from ...
11
votes
6answers
3k views
Which Project hosting service (Like google code, github) you will prefer to use? And Why? [duplicate]
Possible Duplicate:
I want to start an open source project. Where's the best place to host it?
I am using to study (and at some point of time copy the desired module of) the code from ...
11
votes
6answers
546 views
Development Approach: User Interface In or Domain Model Out?
While I've never delivered anything using Smalltalk, my brief time playing with it has definitely left its mark. The only way to describe the experience is MVC the way it was meant to be. ...
10
votes
11answers
940 views
How serious is losing the source code?
If a software company loses the source code to one of the products they are selling, how serious would that be, in terms you could explain to a layman? Would the term "gross negligence" be too ...
10
votes
5answers
724 views
Time required to start coding at a new company [closed]
I am a software engineer for 4 years, and I just changed my company for the first time.
Company works with pair programming, and it's been 3 days, I couldn't even write a single line of code.
It's so ...
10
votes
2answers
3k views
What is programming like in the Japanese language? [closed]
Is the code written in Japanese? Are filenames in English? What about like a C preprocessor? Is that still in English? Are comments in Japanese?
Examples would be nice too.
9
votes
14answers
770 views
How do you go about understanding others' code?
What do you do to understand some code that you didn't write? Or code that you wrote long time ago and don't remember what it does anymore.
Do you have some technique that you go about? Do you ...
9
votes
6answers
1k views
Is “send us a page with code” a typical interview requirement?
Recently I was asked to show "a page with code" for a job interview. Being mainly a back-end programmer, and that's the position I applied for, I first said to the person I was talking to exactly ...
9
votes
8answers
578 views
When does 'optimizing code' == 'structuring data'?
A recent article by ycombinator lists a comment with principles of a great programmer.
#7. Good programmer: I optimize code. Better programmer: I structure data. Best programmer: What's the ...
9
votes
3answers
230 views
When would be the best time to start porting the code of my own project?
If I have a personal programming project that I plan to port in another language so it could run in other environments, would it be more ideal to start porting the code as soon as possible and work on ...
8
votes
11answers
3k views
Why is using System.out.println() so bad? [closed]
Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time.
Is it really so ...
8
votes
7answers
399 views
How do I handle this intense client situation?
I have worked with a client for two weeks who knows nothing about the complexity of programming a CMS. After two weeks, our relationship has gone from mildly discomforting to the point where I have ...
8
votes
4answers
581 views
Are there code reviews in opensource projects? If so, what tools are used to do this?
I know there is a big push for code reviews in commercial development. However, are code reviews used in open source software or is based on trust? If so, then how are they performed? [Is it a delayed ...
7
votes
9answers
640 views
What are your thoughts on Periods/Full Stops in code comments?
I saw this asked in the SO Tavern, so I'm posting the question here. I thought it an interesting question. (Of course it doesn't belong on SO, but I think it's OK here.)
Do you add periods (or, as ...
7
votes
6answers
864 views
Is it necessary to write a javadoc comment for EVERY parameter in a method's signature?
One of the devs on my team believes that it is necessary to write a javadoc comment for EVERY parameter in a method's signature. I do not think this is necessary, and in fact I think it can even be ...
7
votes
2answers
433 views
Are there any opensource APIs that help analyze code?
As an example, let's say that I need to check for a certain usage of C# code and warn the user that that is a bad pratice. There are multiple usages that I want to detect, such as:
Resource not ...
7
votes
6answers
468 views
“Anything can go wrong will go wrong” - Murphy's Law. so is it necessary to test all the conditional, exception cases?
If "Anything can go wrong will go wrong" is true, we need to test all the conditionals and exceptional cases in my code.
But sometimes it's hard to find all of them since many of them are corner ...
7
votes
4answers
375 views
Would you refactor this and if so, would you charge your client?
I am working on a freelance job at home. The client wants me to write some new functionality for his CMS, but it is taking me a lot of time to figure out what the code is doing, because it is written ...
7
votes
6answers
839 views
Multiple inheritance use cases
Java omits multiple inheritance on the grounds that it obviates the design goal of keeping the language simple.
I wonder if Java (with its eco-system) is really "simple". Python is not complex and ...
6
votes
7answers
537 views
How to cope with the problem of (compiling) a large code base?
Although I can code, I don't yet have any experience with working on large projects. What I did so far was either coding small programs that get compiled in matter of seconds (various c/c++ exercises ...
6
votes
3answers
522 views
Is collective code ownership mandatory in Scrum?
Is is an absolute must when following the Scrum methodology to practice collective code ownership, instead of for example weak code ownership?
6
votes
5answers
463 views
Good sites for sharing code snippets & pastes that you can share links to? [closed]
I know there are site tools to check if your webpage is alive, has compression, etc but lets not get into that.
What are useful sites to paste code in and to share links to it? The three i know are
...
6
votes
5answers
538 views
How did they count the number of lines of code executed at runtime?
There was a PC game released in 2001 called Black & White by Lionhead studios in which there was a lengthy statistics page which updated in real-time. There were stats such as how many people ...
6
votes
4answers
655 views
Mobile App Development Language Converter?
I was talking with a friend about developing a mobile app (android/iphone) but I've never messed around with mobile app development code before.
My friend flippantly told me that I don't "need to ...
6
votes
3answers
292 views
How can I start shipping code?
I have just started learning how to program using LPTHW, and as my skill level develops I would like to start shipping code whether or not it's ready to be shipped, just to get into the habit of ...
6
votes
4answers
493 views
Semi-intelligent “diff” utility
Part of the QA steps required for a project I am tangentially involved with require the person who is responsible to integrate new version of source file to first calculate how many lines have been ...
6
votes
3answers
685 views
Best practices for managing deployment of code from dev to production servers?
I am hoping to find an easy tool or method, that allow's managing our code deployment.
Here are the features I hope this solution has:
Either web-based or batch file, that given a list of files, ...