Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you organize your programming work

Tags:

git

I'm a newbie in the field, but in the near future I have to develop an application for a friend(I've already did some work of the app and the friend is happy).

I assume that I need 3 places to store my work, but I'm not sure if this is the best approach. I need your advice, opinion, link,book, blog about this subject.

I plan to have:

  1. a place where I develop the application
  2. a place where I keep a back-up of the application
  3. a place with the application ready for use

I'll use git in the development stage, but for the later I don't know what tools to use, or which are the good practices. Can you give me an advice?

PS: at this moment I'm using cakephp to build some webapps, but I play with C++ from time to time too.

like image 705
dole Avatar asked Jan 12 '11 13:01

dole


People also ask

How is source code organized?

Organization. The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually, these files are carefully arranged into a directory tree, known as a source tree. Source code can also be stored in a database (as is common for stored procedures) or elsewhere.

Why is it important to organize your code?

First and most useful reason to organize your code is better ability to search. When your code follows specific order, it is much easier for you or anyone else to find particular line or property to change it. Organized code is also better to debug and enhance.


1 Answers

1: a place where I develop the application

This would be you local git checkout.

2: a place where I keep a back-up of the application

Do you mean the sources or any compiled result? For the sources you can

  1. Use a public service like http://github.com or http://gitorious.org as backup system. I recommend this if you don't mind to use a service which is not under your control.
  2. Set up a own git server (a linux box with sshd and git installed is sufficient). You need to be aware that there are some pitfalls when you set up a remote repository (the repositories should be bare, and you need to set the permissions right when there are multiple unix users which should be able to push into a repository)

With either way you git push your commits into the remote repository to have a backup of your work.

3: a place with the application ready for use

There is no definite standard on the storage of compiled results. Typical the results are stored with a defined numbering scheme on a file share/web server/whatever.

I'll use git in the development stage, but for the later I don't know what tools to use, or which are the good practices. Can you give me an advice?

As @Navi already said, an automated build tool is a big plus. A best practice is to have a one-command build, which means that you need to run exact one command to build the complete software after a checkout.

You should also consider a continous integration system, this is a software which monitors a central source code repository for changes and automatically builds the software in a clean room environment when it detects something new. CI systems are especially handy if there are many (>1) people working on a software product, since they can show broken builds very quickly.

like image 192
Rudi Avatar answered Sep 28 '22 02:09

Rudi