[Tutorial] picture guide on how to use a command line to run programs
Author |
Message |
Tony
|
Posted: Sun Oct 23, 2011 9:25 pm Post subject: [Tutorial] picture guide on how to use a command line to run programs |
|
|
as a followup to High Level vs Low Level in education. @mirhagk, see if you can follow along.
1. Open up your favourite code editor. Mine is TextMate.
2. Type up your program.
3. Save it where-ever you want.
4. Open up your favourite shell. Mine is bash via Terminal.app
5. Type the name of your favourite interpreter/compiler. Mine is Ruby.
5.1 Followed by this magic (drag-and-drop source into terminal).
6. Hit Enter. BAM, you're done!
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Mon Oct 24, 2011 8:14 am Post subject: RE:[Tutorial] picture guide on how to use a command line to run programs |
|
|
Or the no GUI at all version:
Open file for editing in your favorit command line editor:
Type in code and hit save key:
Run using your favorit complier (noramly: <complier command> <source file>):
Receive output or executable (depending on if code was interpreted or compiled):
Also for ruby you can forget about the file all together and just type "ruby", put some code in and hit "ctrl-d" when done and it will run it. Or even better use the interactive shell tony mentioned in the other topic |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
mirhagk
|
Posted: Mon Oct 24, 2011 10:37 am Post subject: RE:[Tutorial] picture guide on how to use a command line to run programs |
|
|
Well there ya go, now I may steal these, and give students the option of choosing between them. So I assume both of you think that ruby should be the language taught? |
|
|
|
|
|
Tony
|
Posted: Mon Oct 24, 2011 10:49 am Post subject: Re: [Tutorial] picture guide on how to use a command line to run programs |
|
|
Tony @ Sun Oct 23, 2011 9:25 pm wrote: Type the name of your favourite interpreter/compiler.
You may pick any other language. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Dan
|
Posted: Mon Oct 24, 2011 10:50 am Post subject: Re: RE:[Tutorial] picture guide on how to use a command line to run programs |
|
|
mirhagk @ 24th October 2011, 10:37 am wrote: Well there ya go, now I may steal these, and give students the option of choosing between them. So I assume both of you think that ruby should be the language taught?
Depends on what you are trying to teach. I recomend basing the language on what best demonstrates the concepts.
Python and Ruby both have good potential for teaching the basics up to object oriented programming, but i would probably go with somthing like C for data structures. More domain specific topics offten have less popular langues targeting them and what langue maybe used for a class is offten limited by the libraries and tools the instructor wishes to use. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
mirhagk
|
Posted: Mon Oct 24, 2011 11:11 am Post subject: RE:[Tutorial] picture guide on how to use a command line to run programs |
|
|
Well grade 10 goes over if statements, looping, variables, arrays and functions/procedures. It never really gets into classes and stuff (right now). Basically the class is to give students an introduction on how to program, not necessarily teach them anything useful about programming, other than what it is and basic concepts.
Since grade 11 has no pre-req there's not a lot that we can teach in grade 10, since it needs to be retaught next year anyways. |
|
|
|
|
|
|
|