~andreas-kuehntopf/streamtastic/main

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
HACKING.
Streamtastic - Streamripper GUI
Document Version: 0.1, 30. Sep 2008
Document Author: Andreas Kühntopf <andreas@kuehntopf.org>
==========================================================


Intoduction
============
We'd love to have you contribute to Streamtastic, so please read the
following document on how to contribute in the best possible way. Each line
starting with a # is a command you should execute in your operating system's
shell.


Prerequisites
==============
You need the following tools to hack on Streamtastic:

    - JDK 6
    - Bazaar (aka bzr, see http://www.bazaar-vcs.org)
    - Netbeans IDE (>6.0, best would be 6.5beta)
    - (optional) a Launchpad account for taking part in Bugtracker, etc.
    - (optional) Streamripper (a recent version)


Coding guidelines
==================
Your patches have a much better changes of getting accepted, if they follow
our style guidelines closely.

If you use Netbeans 6.5 you can use the supplied Netbeans Formatting settings
for this project to automatically format your code to meet the code style we
use. Pressing <Alt-Shift-F> should to the trick.


* Default Java Style
* Expand Tabs to 4 spaces
* Opening Brace on Class statements is on its own line, Method Brace is on the
  same line! (Make classes visually distinct from methods)
* Maximum Code width is 100 characters
  (80 seemed to small for larger signatures)
* Empty methods or constructors have both braces on one line (does not appear
  to be an unfinished method, then)
* Always use braces. This is especially important for one line ifs
* Always use the best possible way to make your code readable


Getting Started
================

1. Checkout the Source code
----------------------------

We are using the Bazaar Version Control System to manage our source code.
It is usually a good idea to have a recent version installed (i.e. >=1.6).
Please see http://www.bazaar-vcs.org for further instructions on how to install
it.

The usual way of checking out the Source code is:

    # bzr checkout lp:streamtastic

which will create a new directory called "streamtastic" in the current working
directory.

You now have a copy of the latest "trunk" branch in your directory. For each
feature you plan to work on, you should create your own branch of this main
branch in the following way:

    # bzr branch streamtastic my-feature

where "my-feature" is your branch name. A new directory called "my-feature" will
be created, where you can hack to your heart's content.


2. Make your modifications, Implement your Features
----------------------------------------------------

You are now ready to start hacking. Issue the following command to enter the
newly created branch's directory:

    # cd my-feature

Then make sure you identify correctly to bzr. The following command sets your
name as well as your E-Mail address:

    # bzr whoami 'Joe User <joe@user.com>'

be sure to enter your own stuff, of course ;-)

As you are working, you can see what you have already done using the commands

    # bzr status
    # bzr diff

then, when you're happy with your work, you can commit it with:

    # bzr commit

which will popup an editor where you can enter your commit message. This should
be a clear statement what you have done and why. Possibly you should also
include the bug number from the bugtracker, if you have fixed a bug or
implemented a feature.


3. Staying up to date
----------------------

Meanwhile you will want to see whats going on upstream, so update the checkout
you have of the "trunk" branch with the following commands:

    # cd ../streamtastic
    # bzr pull

Then you need to merge the new changes in the "trunk" branch to your working
branch like so:

    # cd ../my-feature
    # bzr merge

Please note that merging only brings in the changes. It does not commit them,
yet. Look at the changes that were made using:

    # bzr status
    # bzr diff

and then commit them

    # bzr commit


4. Send a patch
----------------

If you've implemented something you'd like to contribute then please bundle a
patch and attach it to the bug tracker or send it by E-Mail.

To create a patch, you have to create a so-called "bundle", which includes
all your changes and the bazaar log.
Issue the following commands from your own branch's directory:

    # bzr bundle ../streamtastic > give-appropriate-name.patch

This will output a diff along with the actual revisions in a safely encoded
form into the given filename.

Please then send this file to us.


5. (optional) Register your branch on launchpad
------------------------------------------------

If you plan to contribute more often to Streamtastic, you can register
your own branch to launchpad, so we can pull your changes from there. It saves
you from creating patch bundles all the time. Please see instructions on
Launchpad about how to do that.



Thats it, folks!
Happy Hacking!