source-code

Visual Studio: Is there an incremental search for the entire solution?

I am very fond of the keyboard shortcuts built into Visual Studio. One of my favorites is Ctrl+i, which triggers the incremental search. It jumps over the text in the current document as I fill in the searchword. After the desired searchword is typed, I use F3 to jump through the matches. It works fine, except that is is limited to sear...

I sold my source code to a client, can I now re-build similar code and sell to someone else?

So we built a website and software for a client, charged our fee and handed over the code. The client then got a request from another company about the software. The client passed on the request but said since they owned the code they would need to recieve money for it. I'm thinking there are 2 options here: Work with the client as r...

Refactor or Rewrite

Hmm I have a application in flex (codebase around 20K lines) ... its sort of a social network meets digg kind of thing, I need to add more features to it. This is my first ever flex project. Now im in a dilemma as to whether to refactor or rewrite the application. Im having a lot of trouble understanding the existing code (there is no do...

Visual Studio 2008 - Distribute library with sample-application - ensure no access to the source-code of the library

I guess that this is a really stupid question, knowing that .net-code can be viewed with tools such as Reflector but here it comes. I have written a library in VS2008 (vb.net) which I am distributing to some people for testing. With the distibution, I am also attaching a sample-project(application) which uses my library. I thought that ...

Best way to synchronize code on remote server using SCP (SSH-Copy)

For a current course I am taking, we are using a remote computer to run our code (It's a four node cluster, programming with MPI and C++). I am coding locally on my MacBook and I'm looking for a good way to keep my local code up to date on the cluster. The way I was doing it was to have a terminal open for running SCP to copy the d...

Is there a standard place to put the version number in the source code?

I want to have one file where I can check which version is installed. Its a PHP program so you can look into the files. I was thinking if there is a standardized place to put it since in the Zend Framework or the HTMLpurifier I can't find the version number at all. I would also want to add it to the Zend Framework and HTMLPurifier if th...

How can I get source code of page thru WebBrowser-Control (ActiveX InternetExplorer)?

How can I get source code of page thru WebBrowser Control (ActiveX InternetExplorer)? I have an xml document "foo.xml". var Web: TWebBrowser; begin ... Web.Navigate("foo.xml"); // How can I get source code thru WebBrower control<---- ... end; ...

Understanding a Large, Undocumented Set of Source Code?

I have always been astonished by Wine. Sometimes I want to hack on it, fix little things and generally understand how it works. So, I download the Wine source code and right after that I feel overwhelmed. The codebase is huge and - unlike the Linux Kernel - there are almost no guides about the code. What are the best-practices for under...

Java and J2EE code examples for 3-tier apps

Do you know a site that offers a tutorial with sample source code for a 3-tier application (the usual data access layer, business layer and UI layer)? The simple, readable and intuitive the source code. Best practices that are applied to the code are welcome as well. ...

Recognizing the comments in the C# source code

Hello, how to recognize a comment in the C# source code? I want to retrieve all information from the comment. public class TestClass { /// <summary> /// Sample method /// </summary> /// <param name="a">1 argument</param> /// <param name="b">2 argument</param> /// <param name="c">3 argu...

What are some good examples or paradigms for Client and Server implementation in the same source file?

Sometimes for small projects, and even not so small ones, its nice to be able to keep server-side implementation and client-side implementations on the same source file to reduce maintenance overhead, and make it easier to quickly develop stuff. So I was wondering about good sources of documentation and frameworks that do this sort of t...

Finding methods in source code using regular expressions

I have a program which looks in source code, locates methods, and performs some calculations on the code inside of each method. I am trying to use regular expressions to do this, but this is my first time using them in C# and I am having difficulty testing the results. If I use this regular expression to find the method signature: ((pr...

What is the maximum number of lines that should be allowed in a single file?

At some point, things get unwieldy. Where do you draw the line and try to break things out? ...

Where is source code for a Linux/Unix application most appropriately kept?

As a developer, I've often downloaded and run ./configure ./make ./make install to install apps onto my Linux system. But I've never been quite clear on the best place to keep the downloaded directory. My local Desktop is the default location, but I'd like to know what the best "official" place to keep it is. Also, does it vary by di...

Boolean types

During code review I discovered many places of our C# code that looks like this: if(IsValid()) { return true; } else { return false; } or even "better": return (IsValid()? true : false); I always wondered why not just write the code like this: return IsValid(); This is the way I would write this code. I ain't questioni...

What is the best way to implement syntax highlighting of source code in Cocoa?

I'm working on Cocoa Application that should be able to analyze and highlight a source code written in such languages as Objective-C, SQL, JavaScript, Python etc. The text should be editable too (by using NSTextView, for example). Please advise what is the best way to implement such feature in Mac OS X 10.5. There is no need to support...

Cleaning up your source tree

Hi, What are the common things you remove when clearing up your source tree? For instance: Deleting bin/obj/debug/release directories Removing temporary/cache files, such as ReSharper cache files Removing source control files/directories, such as _svn and .svn Also, what are the things you commonly do with your source tree? For in...

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 to parse/compile python source code using standard python modules, such as ast or compiler. However, I don't think any of them support way...

Free plugin for reordering (C#) members in Visual Studio 2008?

After reading Just say No! to C# Regions I'd like to find a Visual Studio 2008 add-in that will reorder my class members (constructors, properties, fields, methods, etc) in a consistent manner. I know Resharper can do this, but are there any free tools? ...

How do I compare two source trees in Linux?

I have two directories containing source files to a project I've inherited with little by way of documentation. How do I compare both directories to make see what the differences are. Thanks. ...