source-code

Setting up a code repository for a small web development company

I've recently become technical director of a small web development agency and we have a large codebase spread across around 200 websites. The code is in PHP & VBScript and a lot of client side javascript and some complex MySQL queries. What I'm looking to do is to set up a code repository where we can store all our functions, scripts an...

In Ruby, what's the equivalent of Java's technique of limiting access to source in a cowork situation?

In Java when you compile a .java file which defines a class, it creates a .class file. If you provide these class files to your coworkers then they cannot modify your source. You can also bundle all of these class files into a jar file to package it up more neatly and distribute it as a single library. Does Ruby have any features like ...

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 languages; one would typically cap the number of characters per line to a value such as 80 (and more recnetly 100 or 120 I believe). As far ...

Code formatting and source control diffs

What source control products have a "diff" facility that ignores white space, braces, etc., in calculating the difference between checked-in versions? I seem to remember that Clearcase's diff did this but Visual SourceSafe (or at least the version I used) did not. The reason I ask is probably pretty typical. Four perfectly reasonable ...

How to auto-generate logger calls into source code in C#?

What i'd like to generate into method bodies: private void SomeMethod() { Logger.Log("Entering SomeMethod."); // do stuff here Logger.Log("Exiting SomeMethod.") } Is there a tool which can generate that for me? If there isn't, and I'd like to implement one myself, then where do I start, which library should I look into for recogniz...

How to import code to Subversion?

I use the Subversion on SourceForge, and sent some code via TortoiseSVN on WinXP, and it's a Revision 1. When I changed something, I tried to send it as Revision 2, but I don't know how. I was trying RapidSVN, eSVN, kdesvn, of course on Linux, but I have this same error: svn: /svnroot/projects/**/**.kdevelop already existing, or somethi...

Why doesn't this code compile? - object assignment, call, increment, decrement and new can be used as instruction

I'm testing some code in C# from Visual Studio Express 2008: delegate void Hm(int k); static void Main(string[] args) { char[] m = new char[10]; m[0] = 'H'; m[5] = 'M'; m[1] = 'o'; m[6] = 'u'; m[2] = 'l'; m[7] = 'n'; m[3] = 'a'; m[8] = 'd'; m[4] = ' '; m[9] = 'o'; unsafe { fixed (char* p = m) { Hm H = (k) ...

How to merge source code from Vault to TFS 2008

I am looking into merging our source control provider and bug tracking software to Team Foundation Server 2008. We currently have SourceGear Vault as our source control provider and OnTime for our bug tracking software. Both currently meet our needs however as we are growing it seems that TFS is a more likely candidate for our company....

Ruby, Source Code of Splat?

Someone asked about the splat operator yesterday, and I wanted to see the source code... would that be written in C or in Ruby? Where would it be found? ...

Parsing Source Code - Unique Identifiers for Different Languages?

Hello, I'm building an application that receives source code as input and analyzes several aspects of the code. It can accept code from many common languages, e.g. C/C++, C#, Java, Python, PHP, Pascal, SQL, and more (however many languages are unsupported, e.g. Ada, Cobol, Fortran). Once the language is known, my application knows what ...

How to: change source directory within a VS2005 Add-In?

So, I'm writing a C# Add-In that generates C++ source files by weaving aspects into them using AspectC++. Now, I'd like to take those generated files and send them to the compiler instead of the original source... How would I do this within the Add-In? I've tried looking at the VCCLCompilerTool, VCCodeModel, and similar interfaces for...

Can third party hosts be trusted for closed-source/private source code management?

For many companies, their project's source code is very valuable to them -- theft of the source code could be very costly. Keeping source code tightly controlled on a local network is one way to help protect it. However, there are advantages to hosting source code externally, whether it is simply a subversion or git server hosted on dr...

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 particular game written in Haskell as a learning exercise? (As a side note, the simpler the game, the better, really. I'd especially be thrille...

Definition of 'clean code'

Robert C. Martin offers in the fist chapter of his book 'Clean Code' several definitions of 'clean code' from differen well known software experts. How do you define clean code? ...

How to get the structure of software if there is no document?

I am reading a project code, however there is nothing but some .cpp and .h source files. How can I get started and get the structure of the software? ...

Distributing C# Code

I am new to SO and also to the C# language. I browsed for a bit and was not able to find anything relating to this subject. I program in other languages, mainly C and C++. When I want to show someone my code I show them the .c or .cpp files and any header files I have created. However, if I want to show the source code to a program in ...

Visual Studio: Easy Way to Move Source Code Between Projects

In the "old days" I was working with Linux to create C/C++ programs (really really BASIC...HA!...programs, just learning to program in the courses as an intro) by creating a text file with the source code that was then fed to the compiler/linker that then spit out the executable binary. Everything was in a text file or series of text fi...

Windows XP Original Keyboard Driver Source Code, or similar; is it available?

I'm looking for information on the input devices related to windows default keyboard and in the future mouse drivers. I've seen the code for keyboard filter drivers, but I want to write the actual keyboard driver, not just a filter that can monitor actions created by a keyboard. It would be amazingly useful to see the source code of exi...

Is there a general rule that code in the code editor should not be wider that 72 columns?

Possible Duplicates: The 80 column limit, still useful? Studies on optimal code width? I do not remember where I read that. That would make it easier to print out the code. ...

.Net Library for parsing source code files?

Does anyone know of a good .NET library that allows me to parse source code files, but not only .NET source code files (like java, perl, ruby, etc)? I need programmatic access to the contents of various source code files (e.g. class/method /parameter names, types, etc.). Has anyone come across something like this? I know within .NET it...