source-code

Any good java source code analyzing and modifying libraries?

I'm working on an app that converts source code from using one framework to another. I really wanted to make the agonizing monotonous job automatic. After looking a lot for something that code help me treat source code in an object-oriented way and modify it the closest thing I've found was JaxMeJS and that's short of what I need too. I...

alternative to VSS for a one man show (army of one?)

I've been programming for 10+ years now for the same employer and only source code control we've ever used is VSS. (Sorry - That's what they had when I started). There's only ever been a few of us; two right now and we usually work alone, so VSS has worked ok for us. So, I have two questions: 1) Should we switch to something else like su...

Programmatically editing python source

This is something that I think would be very useful. Basically, I'd like there to be a way to edit python source programmatically without requiring human intervention. There are a couple of things I would like to do with this: 1) Edit the configuration of python apps that use source modules for configuration. 2) Set up a "template"...

How do you actually read source code?

Reading source code is a good way to improve as a programmer, but I've never seen a great explanation of how to do it. We often read textbooks & novels linearly, perhaps taking notes along the way. What do you do when trying to understand how a program works? Try the user-facing version of the program with your own inputs Read the API ...

How do I avoid having the database password stored in plaintext in sourcecode?

In the web-application I'm developing I currently use a naive solution when connecting to the database: Connection c = DriverManager.getConnection("url", "username", "password"); This is pretty unsafe. If an attacker gains access to the sourcecode he also gains access to the database itself. How can my web-application connect to the d...

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 mind. As someone who writes in house software I can say that work is done differently then it would be in a commercial or open source setting...

Directory layout for pure Ruby project

Hi! I'm starting to learn ruby. I'm also a day-to-day C++ dev. For C++ projects I usually go with following dir structure / -/bin <- built binaries -/build <- build time temporary object (eg. .obj, cmake intermediates) -/doc <- manuals and/or Doxygen docs -/src --/module-1 --/module-2 -- non module specific sources, like main.cp...

What's the right way to branch with Visual Source Safe?

What I currently do is I link the project to another location and give it the same name, then check the box where it says "Branch after share." And then I would Check out the shared project and work off it. And finally merge with the original project. This works okay, but it feels very clunky: I have multiple instances of the project o...

How to highlight source code in HTML?

I want to highlight C/C++/Java/C# etc source codes in my website. How can I do this? Is there a library I can use? Is it a CPU intensive job to highlight the source code? ...

What open source virtual private server program do you recommend with windows as host

I am looking to have 4 Virtual servers(various linux flavors) running on a Windows server 2003 R2 64 bit edition server located at a datacenter. I can also purchase a 2008 server or 32 bit 2k3 if needed. They would each have their own ip address for networking so that they could be publicly accessed. I do not know much about VPS softw...

Where to find Java 6 JSSE/JCE Source Code?

Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at https://jdk6.dev.java.net/ does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages. Not being able to debug these classes makes solving SSL issues incredibly difficult. Thanks. ...

Best file comparison tool

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 inserted here, block deleted here. Just because you moved some methods around in your last refactoring session. All the tools I've see (Tort...

What Are Some Decent ISPs That Host Subversion

I want a recommendation on an ISP which has Subversion installed so I can get a repository started. So far I found out discount.asp doesn't have that on their servers and will not support it. So I'm looking for a recommendation ...

Converting C++ code to HTML safe

I decided to try http://www.screwturn.eu/ wiki as a code snippet storage utility. So far I am very impressed, but what irkes me is that when I copy paste my code that I want to save, '<'s and '[' (http://en.wikipedia.org/wiki/Character_encodings_in_HTML#Character_references) invariably screw up the output as the wiki interprets them as e...

Can you debug a .NET app with ONLY the source code of one file?

I want to debug an application in Visual Studio but I ONLY have the source code for 1 class. I only need to step through a single function in that file, but I don't understand what I need to do it. I think the steps are normally something like this: Open a file in VS Load in the "symbols" (.PDB file) Attach to the running process I...

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 qualitative answer, your choice. This is probably a language-dependent question to some extent, so you might want to indicate that and how ...

How do you prefer to organize exception definitions?

I almost feel embarrassed to ask, but I always struggle with how to organize exception definitions. The three ways I've done this before are: Use the file-per-class rule. I'm not crazy about this because it either clutters up my directory structure and namespaces. I could organize them into subdirectories and segment namespaces for ...

What to write in the header comments of a code file?

I'm just starting a new green-field development project, and I'm trying to set some standards. I know that a lot of codebases have header comments in every code file with a copyright notice and other gumph. Is this a necessary or useful practice? For example, I don't think putting the name of the author or dates of modifications is usef...

Subversion and shared files across repositories/projects?

I am migrating a client's SourceSafe repository (3 projects) to SVN and two of the projects share source files. (These projects are separate products - with different names and release versions, etc) Has SVN resolved this shortcoming? How do people generally handle this scenario? Of the options I know about/can think of Use the ext...

SAP R/3 package code modification

I'm trying to determine how to modify SAP R/3 package code of an installed system. Can anyone suggest the module/tool for that? ...