Difference between revisions of "Talk:IntroToProgramming"

From Bloominglabs
Jump to: navigation, search
(Android tidbits.)
(adding instructions for downloading files with wget)
Line 2: Line 2:
  
 
I want to add some helpful hints to Janett's course and off the page tab in discussion seems the right area.
 
I want to add some helpful hints to Janett's course and off the page tab in discussion seems the right area.
 +
 +
== Setup Tips ==
  
 
An interesting site that helped me yesterday is [http://c.learncodethehardway.org/book/ Learning C the Hard Way]. In particular is helpful setup on Debian, Ubuntu, etc. run on the CLI (Command Line in a terminal window) will install what you need.
 
An interesting site that helped me yesterday is [http://c.learncodethehardway.org/book/ Learning C the Hard Way]. In particular is helpful setup on Debian, Ubuntu, etc. run on the CLI (Command Line in a terminal window) will install what you need.
Line 19: Line 21:
 
   $ gcc --save-temps -o hello-world helloworld.c
 
   $ gcc --save-temps -o hello-world helloworld.c
  
== programming C on Android ==
+
== Programming C on Android ==
 
For busy people, another option for learning are a number of c/c++ programming apps for the Android phone and tablet.  
 
For busy people, another option for learning are a number of c/c++ programming apps for the Android phone and tablet.  
  
Line 28: Line 30:
 
----
 
----
 
By the way, native c programming is discouraged on the Android platform,  perhaps useful for intensive computational things but the added complexity of interfacing to Java weighs heavily against it.
 
By the way, native c programming is discouraged on the Android platform,  perhaps useful for intensive computational things but the added complexity of interfacing to Java weighs heavily against it.
 +
 +
== Downloading Course Files ==
 +
One tool that you can use to download all the course files from the server is [http://www.gnu.org/software/wget/ GNU Wget], a free software package used for retrieving files from the internet. 
 +
 +
=== Installing Wget ===
 +
If you are running Linux, wget is already included, so you don't need to install it.  You can check your current version with the command <code>wget --version</code>.
 +
 +
If you are running Mac OS, you can build wget [http://ftp.gnu.org/gnu/wget/ from source].  If you use homebrew to manage packages on your Mac, you can install wget with the command <code>brew install wget</code>.
 +
 +
=== Downloading Course Files ===
 +
Once you have wget installed, you can download the files for the class using the following command:
 +
 +
<nowiki>$ wget -r --no-parent -nH --reject "index.*" http://harold.uits.indiana.edu/~jtillots/IntroToProgramming/</nowiki>
 +
 +
Here’s a rough explanation of the options:
 +
 +
* <code>-r</code> means recursive, i.e. go through all the directories and get all the files rather than just those in the current directory
 +
 +
* <code>--no-parent</code> means ignore other stuff in the ~jtillots directory (such as the folder of image files used as icons)
 +
 +
* <code>--nH</code> is short for “no header,” i.e. leave off the directory prefix for each folder (so you don’t have to type all that stuff to navigate in the directory)
 +
 +
* <code>--reject "index.*"</code> means ignore any file that starts with ‘index.’ (the * is a wildcard) because we don’t need those for the class
 +
 +
You can read all about these options (and many others) in more detail by typing <code>man wget</code>.

Revision as of 14:35, 21 September 2015

Apple says: Hi everyone that wonders into this tab. I'm just learning to use a Wiki so bare with me. *shameless plug for membership in BloomingLabs* You too could get a login to the wiki and edit here :)

I want to add some helpful hints to Janett's course and off the page tab in discussion seems the right area.

Contents

Setup Tips

An interesting site that helped me yesterday is Learning C the Hard Way. In particular is helpful setup on Debian, Ubuntu, etc. run on the CLI (Command Line in a terminal window) will install what you need.


  $ sudo apt-get install build-essential


or for RedHat and other RPM based systems :


  $ su -c "yum groupinstall development-tools"

Helpful option to get gcc to leave intermediate files laying around is --save-temps as in:

  $ gcc --save-temps -o hello-world helloworld.c

Programming C on Android

For busy people, another option for learning are a number of c/c++ programming apps for the Android phone and tablet.

One that I have used recommend is CppDroid

and for those with an interest in Arduino and a OTG USB in their Android is ArduinoDroid by the same author.


By the way, native c programming is discouraged on the Android platform, perhaps useful for intensive computational things but the added complexity of interfacing to Java weighs heavily against it.

Downloading Course Files

One tool that you can use to download all the course files from the server is GNU Wget, a free software package used for retrieving files from the internet.

Installing Wget

If you are running Linux, wget is already included, so you don't need to install it. You can check your current version with the command wget --version.

If you are running Mac OS, you can build wget from source. If you use homebrew to manage packages on your Mac, you can install wget with the command brew install wget.

Downloading Course Files

Once you have wget installed, you can download the files for the class using the following command:

$ wget -r --no-parent -nH --reject "index.*" http://harold.uits.indiana.edu/~jtillots/IntroToProgramming/

Here’s a rough explanation of the options:

  • -r means recursive, i.e. go through all the directories and get all the files rather than just those in the current directory
  • --no-parent means ignore other stuff in the ~jtillots directory (such as the folder of image files used as icons)
  • --nH is short for “no header,” i.e. leave off the directory prefix for each folder (so you don’t have to type all that stuff to navigate in the directory)
  • --reject "index.*" means ignore any file that starts with ‘index.’ (the * is a wildcard) because we don’t need those for the class

You can read all about these options (and many others) in more detail by typing man wget.

Personal tools