Source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.

learn more… | top users | synonyms (1)

209
votes
15answers
22k 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 ...
191
votes
23answers
31k views

Should you keep a copy of all the code you write?

I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future ...
84
votes
29answers
19k views

Can my company give IP rights away for an application I wrote off hours to another startup? [closed]

I am an intern for a health company (unpaid), let's call it Company A and I noticed that they are using a lot of paper form for things that can be done on the computer. Excel files for things that ...
80
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 ...
71
votes
5answers
5k views

How do you put a price on your source code?

I was asked to sell the source code (along with existing users) of small utility app I created years ago. I've investigated how to put a price on the source code but so far haven't come up with a good ...
60
votes
13answers
8k 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()); ...
57
votes
14answers
7k views

How to prevent code from leaking outside work? [duplicate]

Possible Duplicate: How to manage a Closed Source High-Risk Project? I'm working on an institution that has a really strong sense of "possession" - each line of software we write should be ...
55
votes
9answers
4k views

Is committing/checking in code everyday a good practice?

I've been reading Martin Fowler's note on Continuous Integration and he lists as a must "Everyone Commits To the Mainline Every Day". I do not like to commit code unless the section I'm working on ...
51
votes
10answers
6k views

When is code “legacy”? [closed]

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 ...
50
votes
7answers
3k views

Is there something wrong with how we're doing version control?

I work with a team of programmers as the business analyst. We just released version 2.0 of our product and are working on the next version to be released in 3 months (it's an internal software ...
47
votes
13answers
3k 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 ...
44
votes
22answers
9k views

What are some good practices before checking in source code?

My team uses Team Foundation Server for source control, and today I fixed some bugs and smoke test application before I checked it in but I forgot to comment some code. (This code made the UI a little ...
40
votes
11answers
3k views

Are there any reasons not to accept a software deliverable as a virtual machine?

This is a question about logistics, not a technical question. My company has outsourced some embedded software work. Specifically, we have payed a contractor to develop an embedded system for us ...
38
votes
16answers
6k views

Good idea to put bug numbers in a comment in the beginning of the source file? [closed]

Is it a good practice to put bug numbers in the file itself inside a header comment? The comments would look something like this: MODIFIED (MM/DD/YY) abc 01/21/14 - Bug 17452317 - npe in drill ...
36
votes
14answers
3k 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 ...
33
votes
5answers
5k views

Where do you go to read good examples of source code? [closed]

I have heard a few people say that one of the best ways to improve your coding ability is to read others code and understand it. My question, as a relatively new programmer, where do I go to find ...
32
votes
5answers
2k 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 ...
31
votes
11answers
3k views

Is “funny commenting” a bad practice or not? [closed]

I want to ask you whether adding some "easter eggs" in the source documentation is unprofessional or not. Probably you have read the StackOverflow poll for funny comments in a source documentation, ...
30
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 ...
29
votes
8answers
3k views

What is beautiful code? [closed]

I often read that developers must write beautiful code, but for a beginner as I am it remains obscure of what is beautiful code and how do you recognize it? The corollary question is: How to write ...
24
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 ...
23
votes
9answers
1k views

How should I go about learning a very large and complex application? [duplicate]

Being a young and fairly inexperienced developer recently employed by a "real" software company I'd like some opinions and pointers on how to do the following: Approaches on how to get familiar with ...
22
votes
12answers
2k views

How do people manage to write and maintain extremely complex and hard to read code? [closed]

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

Should developers be forced to check-in before leaving work each day, even if the code does not compile?

During a previous consulting position, the developers where told to check-in code on a nightly basis, regardless if it complied or was complete. Managers were afraid of losing any code and said now we ...
21
votes
14answers
4k views

Dealing with profanity in source code

How do people deal with profanity in source code and VCS comments. Keep or delete? What about soft-expletives like WTF or Arrgggh? Is unprofessional, offensive or something to be shrugged off?
21
votes
10answers
4k views

Hand over source code to customer

I have made a couple iphone applications for a customer and was asked today to hand over the source code so that they could do the maintenance if this should be required. Until now, no code issues ...
21
votes
5answers
2k 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: Your job is to put yourself out of work. When you're writing ...
20
votes
4answers
5k 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. ...
20
votes
5answers
836 views

How-to convince company to start documenting for legacy software [duplicate]

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 ...
20
votes
7answers
1k views

In a legacy codebase, how do I quickly find out what is being used and what isn't?

I've been asked to evaluate what appears to be a substantial legacy codebase, as a precursor to taking a contract maintaining that codebase. This isn't the first time I've been in this situation. In ...
19
votes
9answers
1k views

What exactly makes code “clean”? [duplicate]

I am an intern at a small software company, doing typical grunt work. Many tasks that the actual developers are doing are above my head however I finally got to see some real "action" and write some ...
18
votes
10answers
2k views

Are chatty/humorous comments in source code acceptable or unprofessional? [duplicate]

Possible Duplicate: Humor in Documentation Throughout my professional career, I have often relied on chatty or humorous comments in source code (or source control commit messages) to help ...
17
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 ...
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
3answers
1k views

Must source code released under GPL be human-readable?

In a response to another question, a poster suggested that under the GPL: ...you need to provide the human readable [code], not a whitespace stripped version... Readability would seem to me to ...
16
votes
14answers
3k views

How many mistakes does a good software developer make? [closed]

I am currently in a situation where a lot of people criticized me for making bugs (on my first local try - the first time I run the code for the first locally done test - , not on a committed repo ...
16
votes
10answers
6k 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 ...
16
votes
5answers
3k views

How do I understand an open source project code?

I open the source code and it's folder upon folder of infinite files each with infinite lines of code which doesn't make much sense to me because I dont have the context, and half of it uses functions ...
16
votes
2answers
253 views

Do you know any studies about the percentage of boilerplate code? [closed]

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, ...
15
votes
8answers
3k 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 ...
15
votes
2answers
5k views

How secure is my private repository on bitbucket

Does anybody know how secure are my private repositories on bitbucket.org? Can I rely on that? I have some repositories and I only want them to be reachable only by me and two others.
14
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 ...
14
votes
6answers
2k 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, ...
14
votes
3answers
601 views

How to locate source code that implemented a certain feature?

I was wondering what are some techniques to locate which code implemented a specific feature, on a desktop application. I am a junior developer, with only professional programming experience lying ...
13
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.
13
votes
14answers
2k 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 ...
13
votes
5answers
4k 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 ...
13
votes
9answers
1k 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?
13
votes
2answers
6k 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.
12
votes
14answers
1k 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 ...