Questions tagged [source-code]
Source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.
275 questions
22
votes
10
answers
6k
views
"// ..." comments at end of code block after } - good or bad? [closed]
I've often seen such comments be used:
function foo() {
...
} // foo
while (...) {
...
} // while
if (...) {
...
} // if
and sometimes even as far as
if (condition) {
...
} // if (...
33
votes
14
answers
17k
views
Dealing with profanity in source code [closed]
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?
0
votes
2
answers
524
views
Writing/discussions about the aesthetics of code? [closed]
I'm looking for considerations of the questions "Can code be beautiful?" and "What makes code beautiful?"
Examples would include:
This academic paper: Obfuscation, Weird Languages, and Code ...
24
votes
16
answers
3k
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 ...
12
votes
5
answers
45k
views
How to understand Linux kernel source code for a beginner? [closed]
I am a student interested in working on Memory Management, particularly the page replacement component of the linux kernel.
What are the different guides that can help me to begin understanding the ...
30
votes
2
answers
78k
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
2
answers
3k
views
Anyone had success with selling source code, at sites like code canyon? [closed]
Recently I came across two sites that help programmers sell source code - binpress and codecanyon. Anyone have experience/success with sites like these?
Would you use them again? What was good about ...
2
votes
4
answers
9k
views
What are standard directory layouts for source code, other libraries, build scripts, etc.? [closed]
I'm in the process of proposing a new standard directory layout that will be used across all the projects in our organization. Projects can have compiled source code, setup scripts, build scripts, ...
5
votes
6
answers
396
views
Does my JavaScript look big in this?
As programmers, you have certain curtains to hide behind with your code. With PHP all of your code is server side preprocessed, so this never see's the light of day as far as the user is concerned. If ...
56
votes
5
answers
39k
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 ...
14
votes
9
answers
4k
views
Bringing code to an interview? [closed]
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?
22
votes
11
answers
14k
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 ...
14
votes
7
answers
2k
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. ...
3
votes
1
answer
2k
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 ...
25
votes
16
answers
5k
views
How do you go about understanding others' code? [duplicate]
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 ...
6
votes
4
answers
557
views
Correct alignment when outcommenting code
Suppose I have some code
void some_block(void)
{
some_statement_1();
some_statement_2();
some_statement_3();
}
Now I wish to out-comment statement #2, but here I never can find a way ...
91
votes
17
answers
7k
views
How do you cope with ugly code that you wrote? [closed]
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 ...
13
votes
18
answers
8k
views
How to read thousands lines of code without any documentation? [closed]
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 ...
1
vote
7
answers
290
views
btnBack vs backButtonField [closed]
For blackberry GUI developement. I am using the name convention like backButtonField and some of my colleagues are using btnBack.
But sometimes I stuck with the names like loginVerticalFieldManager ...
35
votes
9
answers
20k
views
What are your thoughts on Periods/Full Stops in code comments? [closed]
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 ...
22
votes
35
answers
30k
views
What are some famous one-liner or two-liner programs and equations? [closed]
I'm experimenting with a new platform and I'm trying to write a program that deals with strings that are no longer than 60 characters and I'd like to populate the data store with some famous or well-...
9
votes
11
answers
4k
views
How serious is losing the source code? [closed]
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 strong?...
26
votes
12
answers
5k
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 ...
6
votes
6
answers
650
views
How complex is the documentation you write? [closed]
In a book I'm reading there is a chapter on documentation for your code. The book is about PHP and described some easy methods but also going for some complicated and time consuming methods (xml, xsl) ...
144
votes
31
answers
160k
views
How do you dive into large code bases?
What tools and techniques do you use for exploring and learning an unknown code base?
I am thinking of tools like grep, ctags, unit-tests, functional test, class-diagram generators, call graphs, ...