Deep Sea IV -- Running with the IDE

This forum is for the discussion of technology, computers, & problems relating to the web and your computer

Moderator: Scott Danziger

Post Reply
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

I proofread Lecture IV a little earlier and posted it a few minutes ago, all 20+ pages. Please follow the exercises and if you have questions and when you complete the exercise, email the source code of your program to me.



------------------
Allen Moulton from Uechi-ryu Etcetera
User avatar
gmattson
Site Admin
Posts: 6069
Joined: Wed Sep 16, 1998 6:01 am
Location: Lake Mary, Florida
Contact:

Deep Sea IV -- Running with the IDE

Post by gmattson »

Hi Al:

I got through lesson 4 with no difficulties. However, it took me awhile to get the code right. . . Even while looking at both your's and what I had written, side by side!

However, "Hello World!" is now safely stored on my hard drive!

If I might make a suggestion: In acrobate reader, the code you write looks a bit blurry when expanded enough to read. I'm not sure if I'm the only one having difficulty, but it might be easier, especially once the code gets more complex, to show it to us in a text form rather than a photo.

Your writing style is very easy to understand. Looking forward to lesson 5!

------------------
GEM
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

Hello George.

Man, you're fast!!!

Do you understand it all?

The reason why I do not use text files for the code examples is because I WANT the student to type-in the files by hand instead of performing a cut-and-paste operation to insure the learning process is moving in the forward direction.

I may try another way of converting the text to pictures to gain clarity. But if I do, I suspect y'all would suffer a loss of the color highlighting, a feature which will come in very handy later on.

Everyone: Turn in your homework by emailing your source code results back to me. Fact, george, you can delete the Debug directory, zip the project and then send the entire project back to me. I should be able to unzip it and run it with my compiler without any modifications.


------------------
Allen Moulton from Uechi-ryu Etcetera
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

It looks like Adobe is the culprit. Here you go:
Image

Maybe when I email the group with the new lecture announcement I'll also attach corresponding code snippets as separate graphics.

------------------
Allen Moulton from Uechi-ryu Etcetera
Arnie Elkins
Posts: 44
Joined: Mon Oct 08, 2001 6:01 am
Location: Richmond, VA, USA

Deep Sea IV -- Running with the IDE

Post by Arnie Elkins »

I have noticed that Adobe often has problems with graphics files that are included in a PDF. Most of the time they come out like your code, sort of blurry. Not sure if they are trying to compress pics that are already compressed, but that is what it looks like.

As for the class, I just finished the 'Hello World!' program. Nice writing, although I found a couple of typos. Should I be making notes so you can clean them up? Much more interesting to actually write code than just read about things. Oh, and I did learn a few things about the IDE as well. Great stuff! Keep up the good work, I look forward to each lesson!

Arnie
Guest

Deep Sea IV -- Running with the IDE

Post by Guest »

I completed this lecture. I'm not sure I understand. Were suposed to get print output?

I got to the end and had all the files is that it? I wanted to print hello world. Is Kernell 32 DLL suposed to read this program?

Laird
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

Hello All.

I appended a page to the end of Lecture IV to show you how to run from the DOS prompt. I’m not teaching DOS, therefore, I expect others to come to the rescue of anyone in need of DOS help.

Both the lectures and the class project will feed each other to a certain degree, as much as I can synchronize them while keeping the twoindependant threads of thought moving forward at the same time.

Hello Arnie.

Please report any and all typos as you find them or report areas where you think the lecture could be improved to help you.

Expect to do much more of this writing of C code business as we get into the class project. Although right now they don’t look as if they are connected, the lectures and project will feed each other as well as show different facets of learning about your new tools. Payback time to give youse guys plenty of opportunities to make your own typos.

Laird.

The print output goes to the screen of your computer. The only purpose of the getch(); function call is to stop the program dead in its tracks so that you can actually see “Hello World!” in the DOS screen. Check with the freshly updated lesson, last page on how to do this.

I’m not sure how Kernel32 DLL comes into the act. Need more info. Maybe someone with Win98 experience can help here.



------------------
Allen Moulton from Uechi-ryu Etcetera
Traveler in the Arts
Posts: 28
Joined: Tue Dec 04, 2001 6:01 am

Deep Sea IV -- Running with the IDE

Post by Traveler in the Arts »

Allen,
In C++ 6.0 standard edition, it turns out that you don't really need to address freezing the DOS window using 'getch();'.

If you use the following version of helloworld:

#include <stdio.h>

int main()
{
printf("Hello World!\n");
return 0;
}

and then press: 'Ctrl F5' , the DOS Window is frozen with the following output:

Hello World!
Press any key to continue

The cursor is blinking at the end of 'continue' and so the window isn't closed until you press some key. Also, you can just click on '!' on the toolbar.

For beginners, it might be better to just focus on *immediately* getting into simple coding exercises, that keep getting extended a little, in order for them to learn by doing with fairly *immediate and easy* success. Too many different directions and details initially can be confusing and discouraging.

Thanks for all your work putting the course together,

John
Traveler in the Arts
Posts: 28
Joined: Tue Dec 04, 2001 6:01 am

Deep Sea IV -- Running with the IDE

Post by Traveler in the Arts »

The first line of the program above should read: '#include stdio.h' with corner brackets
around 'stdio.h'. I guess the *.html message thinks this is an html command when you type the corner brackets??

John

[This message has been edited by Traveler in the Arts (edited December 08, 2001).]

[This message has been edited by Traveler in the Arts (edited December 08, 2001).]
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

Good job for completing the program, John.

Where does the html come from? Send me the project that keeps the dos box frozen without the getch() family of functions and I'll find out what's wrong with it.

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote
For beginners, it might be better to just focus on *immediately* getting into simple coding exercises, that keep getting extended a little
All

Hello World is the first program C students the world over write. Lecture IV was meant to get one used to the IDE, and discover that he can do it. The next lecture, which explains all the parts of helloworld in detail, has been ready for posting. I’m just waiting to collect the rest of the assignments before I post it. This may just satisfy what you are looking for. One lesson often does not feed into the next, rather learning C in the beginning is like gathering new tools to put into your toolbox. However, the purpose of the class project, as I am designing it, brings all those pieces together, just like in college where you have the lecture and then the lab to reinforce what you learned in class and turn it into something useful.

I outlined the lectures in a previous post as an overview, subject to change as this cyber-class moves forward. The class project, however, I am letting the cat out of the bag only a little at the time to help you develop critical thinking, to do the design without polluting you mind with code syntax, and to abstain from applying additional pressures on learning the IDE. The class project will be big (it's big already), but its assignments are straight-forward and should help glide one toward a greater understanding and appreciation for the power and elegance of OOA and OOD.

Both the lectures and the lab assignments start off from extremely different directions but they come together like the lines of a parachute to bring you smoothly to your destination Image, which will be at the foothills of C++.


------------------
Allen Moulton from Uechi-ryu Etcetera
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

Of course, from there we do C++ with more lectures and a new class project, TBD.

------------------
Allen Moulton from Uechi-ryu Etcetera
Traveler in the Arts
Posts: 28
Joined: Tue Dec 04, 2001 6:01 am

Deep Sea IV -- Running with the IDE

Post by Traveler in the Arts »

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Deep Sea:

Where does the html come from? Send me the project that keeps the dos box frozen without the getch() family of functions and I'll find out what's wrong with it.

<HR></BLOCKQUOTE>

Allen,

I was speaking about how this message board *displays* the program, not the program itself. If you put corner brackets in your post, they don't get displayed even though they are there.

Also, since I am a bit of a ringer, I was trying to give you advice on what works better with beginners. ;-)

John
Brandy Elkins
Posts: 2
Joined: Fri Nov 30, 2001 6:01 am
Location: Richmond, VA US

Deep Sea IV -- Running with the IDE

Post by Brandy Elkins »

Hello I just completed the Hello World program and found that after each change you make to the program you need to hit f7 or else you will get a window that asks if you want to recompile your changes.

Brandy
User avatar
Deep Sea
Posts: 1682
Joined: Sat Oct 19, 2002 6:01 am
Contact:

Deep Sea IV -- Running with the IDE

Post by Deep Sea »

Hi John.

I am taking your advice and am trying to patch up the holes I wanted to leave.

Hello Brandy.

Good observation. Every time a file in a project is changed, whether one file or thousands of them, the compiler checks the timestamps of the files to insure everything is up to date. When you look inside the Debug directory you will notice a filename with the extension .obj, called an object, or obj (pronounced o-b-j), file; one for every code (cpp) file. In our case there is only one obj file. This “object” is not the same as the definition of object in object-oriented programming.

An obj file is an intermediate file produced by the compiler. Often applications have at least several code files, sometimes even thousands of code files. The compiler merely generates object files using a few minimal validation processes, nothing more and nothing less.

After the compiler does its job, it calls upon the link-loader, or linker for short, to put them all together and generate one executable file for you to run as your program,

Bottom line: In order for the program to work, and for the linker to properly do its job, there must be some sort of synchronization between the current-ness of all files. So, every time you hit F7, the compiler compares the timestamp associated with the obj file against the timestamp associated with the source file of the same name. If the timestamp of the obj file is older than that of the code file, the compiler rebuilds that particular code file into a new obj file else the compiler leaves it alone for the linker to process afterwards.

------------------
Allen Moulton from Uechi-ryu Etcetera
Post Reply

Return to “Computer & Web Tech Help”