Here we give an overview of some of the programming tools we have at UCC and tricks you can use. = Servers and Desktops --- Home and Away --- = This bit talks a bit about the computers. You can probably skip it. You can of course use Windows computers for programming, if you are lucky/bossy enough to actually get a computer not being used for DoTa. We will focus on Linux because it is objectively better, and also you are more likely to actually be able to use this for non-gaming purposes in the clubroom. There are usually 3 or 4 desktops in the clubroom that boot various [[Linux]] distributions. These have a variety of desktop environments and graphical programs. Current information about these machines is maintained at [[ClubroomDesktops]]. When you are logged into a Linux desktop, you can reach your "home" directory at {{{/home/ucc/username}}} (aliased to {{{~}}}). You can use a graphical file browser, or the terminal, to manage files in this directory. UCC servers are more powerful and have more tools for programming. You can connect to them via [[SSH]]. [[Motsugo]] is the most powerful and most commonly used. A full list of current servers is maintained at [[Machines#Services]]. The downside to using a server may seem that you can't use graphical tools. However! If you {{{cd}}} (Change directory) to {{{/away/ucc/username}}} you will be able to access all the files as seen on a desktop. So, a common approach is to open a terminal, [[SSH]] into a server, and run commands (such as {{{gcc}}}, {{{make}}}, {{{python}}}, etc) from there, but keep all your files in the {{{/away}}} directory so you can edit them on a desktop with a graphical editor. If you are using a Windows desktop (lucky!) to edit files and [[SSH]] to run things, the directory you'll want starts with {{{/away/ucc/username/Windows/profiles/My\ Documents/}}}. (Spaces start to get annoying). = The general process = To actually program, you need: i. A text editor i. A terminal i. A compiler or an interpreter Non-graphical text editors: {{{vim}}}, {{{nano}}}, {{{emacs}}} (scary), {{{sed}}} (not recommended). Graphical text editors we have: {{{gedit}}}, {{{kate}}}, {{{notepad++}}} (windows). Compilers: {{{gcc}}} (C), {{{g++}}} (C++), {{{gfortran}}} (FORTRAN), {{{gcj}}} (Java (yes you can compile java)) Interpreters: {{{python}}} (Python 2.6 or 2.7 depending on machine), {{{python3}}} (usually Python 3.2), {{{java}}} (Java) Other things: {{{man}}}, {{{make}}} Write the program. Then in a terminal run the compiler (or {{{make}}} if you have a Makefile) to compile it. Then run it. $$$$$ = Example Programs = TODO = SSHFS for Freedom and Glory = If you want to use the servers to compile/run things, but are at home and want to keep your own fancy graphical environment instead of using {{{vim}}}, look into [[SSHFS]] which works on Linux and might not break on Windows. {{{mkdir ~/sshfs/motsugo; sshfs username@motsugo.ucc.asn.au:/away/ucc/username ~/sshfs/motsugo}}} Then as if by magic you can edit files seemingly on your own computer and have them magically show up by magic on [[Motsugo]] as if by magic.