Source code is text written in a computer programming language. It can be automatically translated to binary machine code that the computer can directly read and execute.
218
votes
16answers
22k views
How can I know which parts in the code are never used?
I have legacy C++ code that I'm supposed to remove unused code from. The problem is that the code base is large.
How can I find out which code is never called/never used?
193
votes
35answers
15k views
What to do about a 11000 lines C++ source file?
So we have this huge (is 11000 lines huge?) mainmodule.cpp source file in our project and every time I have to touch it I cringe.
As this file is so central and large, it keeps accumulating more and ...
107
votes
31answers
25k views
Do you still limit line length in code?
This is a matter on which I would like to gauge the opinion of the community: Do you still limit the length of lines of code to a fixed maximum?
This was certainly a convention of the past for many ...
85
votes
11answers
3k views
Protecting Java Source Code From Being Accessed [closed]
Last week, I had to create a little GUI for homework.
None of my school mates did it. They have stolen my one from where we had to upload it and then they uploaded it again as theirs. When I told my ...
85
votes
14answers
38k views
SVN Repository Search
Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.
62
votes
9answers
6k views
isset() and empty() make code ugly
I have several older applications that throw a lot of "xyz is undefined" and "undefined offset" messages when running on the E_NOTICE error level, because the existence of variables is not explicitly ...
53
votes
14answers
49k views
Get source jar files attached to Eclipse for Maven-managed dependencies
I am using Maven (and the Maven Eclipse Integration) to manage the dependencies for my Java projects in Eclipse. The automatic download feature for JAR files from the Maven repositories is a real time ...
50
votes
10answers
28k views
What's the best way to generate a UML diagram from Python source code? [closed]
A colleague is looking to generate UML class diagrams from heaps of Python source code.
He's primarily interested in the inheritance relationships, and mildly interested in compositional ...
44
votes
10answers
32k views
Xcode source automatic formatting
As a C# developer, I have become highly dependent on the automatic formatting in Visual Studio 2008. Specifically, I will use the CTRL + K , D keyboard shortcut to force things back into shape after ...
43
votes
4answers
10k views
Python - Parse a .py file, read the AST, modify it, then write back the modified source code
I want to programmatically edit python source code. Basically I want to read a .py file, generate the AST, and then write back the modified python source code (i.e. another .py file).
There are ways ...
42
votes
7answers
9k views
Is TortoiseGit ready for prime time yet?
I'm a big fan of the simplicity of TortoiseSVN. I also am interested in digging into git, and think it would make a good fit for an upcoming project. However, a strictly command-line based app can be ...
36
votes
2answers
1k views
Why does Microsoft's source code reference have two copies of the code in each .cs file
So, I was looking in [PATH]\RefSrc\Source\.Net\4.0\DEVDIV_TFS\Dev10\Releases\RTMRel\ndp\fx\src\MIT\System\Web\UI\MobileControls\Panel.cs\1305376\Panel.cs and noticed that the file, as well as other ...
34
votes
19answers
19k views
Do you put copyright notices in your (proprietary) code? [closed]
I'm wondering if, when working on source for your employer, people include a copyright notice.
For example
/*
* Developer : Developer Name ([email protected])
* Date : xx/yy/zzzz
* All ...
33
votes
9answers
9k views
Exemplary Haskell Game Code
I know several games have been coded in Haskell, but being a newbie I don't yet consider myself capable of judging quality of coding (idiomatic style, etc.)
Can anyone recommend the source of a ...
33
votes
11answers
15k views
Java/Eclipse on MacOSX: where is the src.zip?
With the latest Java update on MacOSX 10.6, Eclipse does not find the Java sources anymore.
I am not exactly sure (i.e. don't remember anymore) if I have downloaded the sources manually in the past ...