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.
60
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 ...
42
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 ...
23
votes
30answers
6k views
Best rule for maximum function size?
In another question, a popular answer suggested that large functions demonstrate poor form.
How large would you let a function get before you broke it up?
(This could be in lines of code or a more ...
49
votes
10answers
27k 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 ...
53
votes
14answers
48k 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 ...
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 ...
19
votes
9answers
7k views
How would you organize a Subversion repository for in house software projects
I work for a company whose primary business is not software related. Most documentation for using source control is written with a development team writing for commercial or open source projects in ...
14
votes
12answers
4k views
How do we define Code Quality? [closed]
Does anyone have a reasonable definition of Code Quality? I don't think there is a good definition, and I see plenty of bad definitions. There are many definitions for Correctness, but I would ...
26
votes
6answers
21k views
Java JDK Source Code?? Where to find it?
I like to see what a method in the Java API does. So I want the JDK Source Code.
Before I re-installed Linux I had the scr.zip package with all the official source code in it. I just had to tell ...
10
votes
8answers
14k views
Best source code formatter for Javascript?
I've been digging through Stack Overflow as well as a number of Google searches, and I cannot find a satisfactory code formatter for Javascript.
I have found several related tools, such as syntax ...
217
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?
29
votes
8answers
2k views
Recommended JavaScript annotated source code for learning
I have recently found annotated source code for underscore.js and backbone.js
I'm currently going through these reading them to learn how other authors structure and write javascript code. It's a ...
25
votes
25answers
20k views
Which file comparison tool can handle block movement and multiple revisions? [closed]
I've been using Subversion for a while now. I love it. And the feature I use the most is diff. But sometimes it is really frustrating when your comparison windows is filled with changes like: block ...
19
votes
5answers
14k views
Android Support Library (v4). Getting the source and attaching it to the library/jar in Eclipse
Having the source code attached to external libraries is awesome. Where to find the source code for the v4 support package? Preferably it would be a zip file which could be easily attached to the ...
7
votes
4answers
4k views
Tool for analyzing VB6 source code (like Understand from SciTools)
Does anyone know of a tool to analyze/navigate VB6 source code like the tool from scitools?
http://www.scitools.com/products/understand/