Friday, September 14, 2007

Re: [BLUG] C/C++

Ana,

I'm co-teaching classes in Python and Java as I myself am co-learning
my way around them with the students. (I'm still not sure whether it's
a help or hindrance to be learning two languages at the same time, but
I do definitely prefer Python so far...)

For Python I have mostly been using the IDLE IDE (which is
specifically for Python), because basically it works like a decent
text editor with highlighting and auto-tabbing that lets you hit F5 to
run your program (though there's a glitch in that it doesn't focus on
the newly running program windows, ick).

Got a tic-tac-toe program with an unbeatable computer player put
together in a day — incidentally, it's not fun to play against an
unbeatable computer player, but it was kind of fun to program it. My
next challenge on that, if I don't get distracted with something else,
is to try to see if I can get it to recognize a stalemate game before
all 9 moves are up.

For Java, although we're using Eclipse for the class, I'm using a
Gedit window (syntax highlighting, but otherwise no frills) and a
gnome-terminal window with a custom bash script (javac $1.java && java
$1) as my IDE.

I've not had the patience to write a Java program that does anything
"useful" yet. Honestly, if I didn't have to learn it to teach my
class, I'd probably drop Java and concentrate on Python.

It's amazing how geeky my studying is these days, I can't really talk
to anyone but my boss and my fellow LUG/LoCo people about it. Java...
Python... and I'm studying to take my LPI 101 exam at the Ohio
LinuxFest this year. (And, oh, yeah, I'll also need to get over my
command-line text editor block, cause vi(m) is on the exam. Hoorah!
:-) )

I'll be co-teaching a C programming class next semester, but the Java
will live on in the form of our AP Computer class.

Simón

P.S. C-pound? C-sharp? C-plusplusplusplus?

On 9/12/07, Pawsitive Results <pawsitiveresults@gmail.com> wrote:
> As some of you know, I'm taking the beginning C/C++/C# class at Ivy
> Tech this semester, in which we're using Microsoft Visual Studio 2005.
>
> What tool/tools would you suggest I start with, to follow along on the
> Linux side? I suspect I'll learn better, if I'm more able to mentally
> separate the task from the tools (if that makes sense).
>
> Bear in mind this is my first venture into any kind of programming
> whatsoever. (Unless you count BASIC on a TRS-80 Model III, back in
> high school.) So simpler, more basic tools probably make the most
> sense.
>
> Ana

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

Gillis, Chad wrote:
> But if you want to tackle a phobia of command-line text editors, then
> there'd be no way of completely destroying it and putting it to rest
> like figuring out vi. I've gone through the tutorials that Mark
> talked about on Tuesday, vimtutor and vilearn. They're actually
> really well laid out. Of course depending on whether you have time
> and whether it's a priority for you, you could give them a shot.
> Emacs also has a really good tutorial which is available in the help
> menu or by control-h t.

When I first started using vi I often referenced
http://unix.t-a-y-l-o-r.com/Vi.html (Unix is a Four Letter Word, and Vi
is a Two Letter Abbreviation)

"Vi (officially pronounced `vee-eye'/unofficially pronounced `six'
because of the feeling one gets when using vi that it may be the text
editor of the antichrist) is a display oriented interactive text
editor."
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

But if you want to tackle a phobia of command-line text editors, then
there'd be no way of completely destroying it and putting it to rest
like figuring out vi. I've gone through the tutorials that Mark talked
about on Tuesday, vimtutor and vilearn. They're actually really well
laid out. Of course depending on whether you have time and whether
it's a priority for you, you could give them a shot. Emacs also has a
really good tutorial which is available in the help menu or by
control-h t.

Quoting Pawsitive Results <pawsitiveresults@gmail.com>:

> Thanks--I'll give this a try next week.
>
> It's NOT an irrational fear of the command line--I'd just like to make
> that clear. My fear is of command line text editors. So, it's a very
> specific irrational fear. More akin to a dog who flips out when the
> fridge kicks on, but who is unbothered by the vacuum cleaner and the
> washer and dryer and dishwasher. As opposed to a dog with a fear of
> strange noises...
>
> Ana (who is still trying to figure out how to be in Dayton, Ohio at
> 7:00 am, without having to just STAY up until 3:00 am, then loading up
> the collie and the cooler and leaving...)
>
> On 9/14/07, Gillis, Chad <rcgillis@indiana.edu> wrote:
>>
>>
>> Quoting Pawsitive Results <pawsitiveresults@gmail.com>:
>>
>> >
>> > And, for over a year now, I've suspected that, sooner or later, my
>> > irrational fear of command line text editors was going to bite me in
>> > the butt. It appears I was right.
>> >
>>
>> Hi Ana,
>>
>> If you have an irrational fear of the command line then try an example
>> to get you started.
>>
>> Open up a command line terminal somewhere.
>>
>> At the terminal type:
>>
>> "ls learningCpp" <enter>
>>
>> If it says "No such file or directory" then type
>>
>> "mkdir learningCpp" <enter>
>>
>> (otherwise choose a different directory name)
>>
>> Follow this by
>>
>> "cd learningCpp" <enter>
>>
>> then
>>
>> "emacs example.cpp" <enter>
>>
>> An emacs window should open.
>>
>> Then cut and paste the following into the emacs window
>>
>> /////////START HERE////////////
>> #include <iostream>
>> using namespace std;
>>
>> int main(){
>>
>> for(int i=0;i<10;i++){
>> cout << "hello!!! " << i << endl;
>> }
>>
>> return 0;
>>
>> }
>> //////////END HERE//////////////
>>
>> In the emacs window hold down the control key. While holding down the
>> control key type x then type s. That will save the file. Now go back
>> to the terminal.
>>
>> In the terminal type
>>
>> "g++ example.cpp -o example" <enter>
>>
>> followed by
>>
>> "./example" <enter>.
>>
>> Assuming I haven't left anything out, then that will have edited the
>> program example.cpp, compiled it and then run it.
>>
>> I'm just using emacs as an example since that's what my own limited
>> experience has provided me with.
>>
>> Hope that helps.
>>
>> Chad
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> BLUG mailing list
>> BLUG@linuxfan.com
>> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

Hi Ana, Sorry I misunderstood. That example that I gave was probably
unnecessary. Hope you have a good trip.

Quoting Pawsitive Results <pawsitiveresults@gmail.com>:

> Thanks--I'll give this a try next week.
>
> It's NOT an irrational fear of the command line--I'd just like to make
> that clear. My fear is of command line text editors. So, it's a very
> specific irrational fear. More akin to a dog who flips out when the
> fridge kicks on, but who is unbothered by the vacuum cleaner and the
> washer and dryer and dishwasher. As opposed to a dog with a fear of
> strange noises...
>
> Ana (who is still trying to figure out how to be in Dayton, Ohio at
> 7:00 am, without having to just STAY up until 3:00 am, then loading up
> the collie and the cooler and leaving...)

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

Thanks--I'll give this a try next week.

It's NOT an irrational fear of the command line--I'd just like to make
that clear. My fear is of command line text editors. So, it's a very
specific irrational fear. More akin to a dog who flips out when the
fridge kicks on, but who is unbothered by the vacuum cleaner and the
washer and dryer and dishwasher. As opposed to a dog with a fear of
strange noises...

Ana (who is still trying to figure out how to be in Dayton, Ohio at
7:00 am, without having to just STAY up until 3:00 am, then loading up
the collie and the cooler and leaving...)

On 9/14/07, Gillis, Chad <rcgillis@indiana.edu> wrote:
>
>
> Quoting Pawsitive Results <pawsitiveresults@gmail.com>:
>
> >
> > And, for over a year now, I've suspected that, sooner or later, my
> > irrational fear of command line text editors was going to bite me in
> > the butt. It appears I was right.
> >
>
> Hi Ana,
>
> If you have an irrational fear of the command line then try an example
> to get you started.
>
> Open up a command line terminal somewhere.
>
> At the terminal type:
>
> "ls learningCpp" <enter>
>
> If it says "No such file or directory" then type
>
> "mkdir learningCpp" <enter>
>
> (otherwise choose a different directory name)
>
> Follow this by
>
> "cd learningCpp" <enter>
>
> then
>
> "emacs example.cpp" <enter>
>
> An emacs window should open.
>
> Then cut and paste the following into the emacs window
>
> /////////START HERE////////////
> #include <iostream>
> using namespace std;
>
> int main(){
>
> for(int i=0;i<10;i++){
> cout << "hello!!! " << i << endl;
> }
>
> return 0;
>
> }
> //////////END HERE//////////////
>
> In the emacs window hold down the control key. While holding down the
> control key type x then type s. That will save the file. Now go back
> to the terminal.
>
> In the terminal type
>
> "g++ example.cpp -o example" <enter>
>
> followed by
>
> "./example" <enter>.
>
> Assuming I haven't left anything out, then that will have edited the
> program example.cpp, compiled it and then run it.
>
> I'm just using emacs as an example since that's what my own limited
> experience has provided me with.
>
> Hope that helps.
>
> Chad
>
>
>
>
>
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

Quoting Pawsitive Results <pawsitiveresults@gmail.com>:

>
> And, for over a year now, I've suspected that, sooner or later, my
> irrational fear of command line text editors was going to bite me in
> the butt. It appears I was right.
>

Hi Ana,

If you have an irrational fear of the command line then try an example
to get you started.

Open up a command line terminal somewhere.

At the terminal type:

"ls learningCpp" <enter>

If it says "No such file or directory" then type

"mkdir learningCpp" <enter>

(otherwise choose a different directory name)

Follow this by

"cd learningCpp" <enter>

then

"emacs example.cpp" <enter>

An emacs window should open.

Then cut and paste the following into the emacs window

/////////START HERE////////////
#include <iostream>
using namespace std;

int main(){

for(int i=0;i<10;i++){
cout << "hello!!! " << i << endl;
}

return 0;

}
//////////END HERE//////////////

In the emacs window hold down the control key. While holding down the
control key type x then type s. That will save the file. Now go back
to the terminal.

In the terminal type

"g++ example.cpp -o example" <enter>

followed by

"./example" <enter>.

Assuming I haven't left anything out, then that will have edited the
program example.cpp, compiled it and then run it.

I'm just using emacs as an example since that's what my own limited
experience has provided me with.

Hope that helps.

Chad


_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] C/C++

Thank you to all who have offered suggestions!

I'll admit there's a part of me that began thinking "Maybe I should
just drop this class, and take up needlepoint instead." but I'm over
it now.

My first baby-homework project appears to run properly; that's a plus.
I think my issue with doing all this with Visual Studio (only) is the
whole "Step 8, click the magic button" aspect of it. I'm not real good
with rote memorization for tasks--I need to understand what I'm doing
and why.

And, for over a year now, I've suspected that, sooner or later, my
irrational fear of command line text editors was going to bite me in
the butt. It appears I was right.

I'm outta here tonight for a trial in Dayton (just Jett, not Xen this
weekend) and will put some time into this whole thing next week.

Thanks!

Ana

On 9/13/07, Michel Salim <msalim@indiana.edu> wrote:
> On 13/09/2007, Mark Krenz <mark@slugbug.org> wrote:
> > On Thu, Sep 13, 2007 at 02:54:25PM GMT, Michel Salim [msalim@indiana.edu] said the following:
> > >
> > > Not sure it's a good idea to learn a language, an editor *and* a build
> > > system all at once!
> > >
> >
> > As opposed to what? Learning Visual studio? Which is a language an
> > editor and a build system? I guess I don't see your point. The
> > difference is that if she learns vi or emacs, she can carry those skills
> > with her other places.
> >
> I guess you don't see my point indeed. Nowhere did I say I endorse
> Visual Studio as a good IDE (it did not even have refactoring support
> until, what, 2005?). But if Ana is going to have to use it anyway for
> her classes, I don't see why she shouldn't use an IDE that's close in
> ease-of-learning.
>
> Plus, there are things about the standard GNU toolchains, especially
> the build tools (autoconf/automake) that are quite intimidating (and
> at the same time, mundane) at first. KDevelop will generate automake
> and autoconf scripts for you:
>
> http://docs.kde.org/development/en/kdevelop/kdevelop/makesystems.html#automake-project
>
> I like using traditional editors too, but I recognise that a modern
> IDE has its place: Vi(m)/Emacs for languages and tools you are already
> familiar with, KDevelop/Eclipse/etc. for either large projects or for
> languages you are still learning (before someone says "Vi/Emacs can do
> that too!", let me ask if either has Javadoc / Ndoc support)
>
> --
> Michel
>
> --
> Michel
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug