1. Learn DOS or Win32 first?

No right answer to this, but here's MO.

Stick w/ Windows only if that's what you're most interested in doing. DOS
programming is mostly sequential in nature. Windows programming is not. It
*can* be hard to get used to event-driven Windows programming after learning
DOS programming. It shouldn't be, but some people seem to have a problem
figuring it out.

With the Win32lib, *I* don't think it's any harder to learn basic Windows
programming. If you didn't have the Win32lib, you would absolutely go with
DOS programming first, since programming Windows, for beginners, without
some help with the API is a bear. A very big, hairy, brown, smelly, hungry
bear. That hasn't eaten in 2 months.

With Win32lib, though, it's very simple for the simple programs you will
learn with. You can let the IDE create the framework for you, or just modify
some existing programs to get the framework. Then it's easier than using
something like C++ Builder or Delphi. Well, almost. At some point it will
be.

new topic     » topic index » view message » categorize

2. Learn DOS or Win32 first?

Hi,

This is my second post to this list.  My first concerned "What Language
Best For Newbie."  I have about decided to stick with Euphoria to learn
programming.

I searched for several weeks and caused quite a stir when I posted "What
Basic Is Best For Newbie" on the comp.lang.basic.misc newsgroup especially
from Liberty Basic people. I am mostly interested in Windows programming
because most people are using graphical interfaces.  And I like graphical
interfaces.  So seeing how you all are developing the win32lib I am going
to try this.  Knowing next to nothing about programming but having
researched it for a while, I believe that if you develop the win32lib it
will vastly increase the interest in Euphoria.  My opinion only.

Now my question:  Is the win32lib just for developing the interface only?
And then you write your program in DOS to be interfaced by the GUI?  In
other words the programming for what your program does is really coded in
the euphoria language in DOS and then you use the win32lib to access it?

If so what is my best plan to learn this?  Learning to program in DOS with
Euphoria first?  Or both together?

Thank You Very Much,
Sperry Russ

www.newcreation1.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Learn DOS or Win32 first?

So if I understand what you are saying...the win32lib is completely
different than the Euphoria Dos language?  Or is the Euphoria language used
to write the win32lib and ide?  In other words if I open up the win32lib or
a win32 program in an editor it is a different programming language than
euphoria?  Or does euphoria somehow access the windows code?

Thanks,
Sperry


----- Original Message -----
From: SR Williamson <sr.williamson at OSHA.GOV>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, December 18, 2000 3:01 PM
Subject: Learn DOS or Win32 first?


> No right answer to this, but here's MO.
>
> Stick w/ Windows only if that's what you're most interested in doing. DOS
> programming is mostly sequential in nature. Windows programming is not. It
> *can* be hard to get used to event-driven Windows programming after
learning
> DOS programming. It shouldn't be, but some people seem to have a problem
> figuring it out.
>
> With the Win32lib, *I* don't think it's any harder to learn basic Windows
> programming. If you didn't have the Win32lib, you would absolutely go with
> DOS programming first, since programming Windows, for beginners, without
> some help with the API is a bear. A very big, hairy, brown, smelly, hungry
> bear. That hasn't eaten in 2 months.
>
> With Win32lib, though, it's very simple for the simple programs you will
> learn with. You can let the IDE create the framework for you, or just
modify
> some existing programs to get the framework. Then it's easier than using
> something like C++ Builder or Delphi. Well, almost. At some point it will
> be.
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Learn DOS or Win32 first?

At 04:45 PM 18/12/00 -0500, you wrote:
>So if I understand what you are saying...the win32lib is completely
>different than the Euphoria Dos language?  Or is the Euphoria language used
>to write the win32lib and ide?  In other words if I open up the win32lib or
>a win32 program in an editor it is a different programming language than
>euphoria?  Or does euphoria somehow access the windows code?

Euphoria is one launguage. All of the basic EU structures
and commands are common throughout. It has two interpriters;
ex.exe is for DOS, exw.exe is for WINDOWS.

ex has a some dos only stuff (like dos_interrupt), and exw
has the ability to link to and call routines from .dll files.
APart from that they are basically the same (to the naked eye,
anyway).


The windows OS is housed within DLL files, so using  exw it
is possible to call functions from the OS, however it is quite
a long and involved process, so David Cuny developed win32lib.ew,
which is a library designed to interface with windows. Using win32lib
is the easiest (but not only) way to write EU Win programs. It contains
a stack of global functions, procedures and constants which deal with
the windows objects. The IDE is based on win32lib. As I understand it,
(don't use it myself) it's basically a visual design tool to take care
of the sizing and placement of objects and windows. It has code editing
facilities, but the code is still EU code.

If you are familiar with windows objects and their properties
(maybe through VB? et.al.) it is pretty easy to look up the win32lib
equivelant for the command you are trying to execute. If you are
not then windows may take some getting used to.

Where to start?

Start by getting used to euphoria itself. This is probably easiest
under DOS using simple text in and out like gets() and puts().

Explore the sequence, it's a fantastic data type, just when you
think you've seen it all, you find another way to use one. Get used
to the append() command and '&' operator.

Convert a few simple programs from one of your other favourite
launguages.

By the time you've got this far, Euphoria's exquisite simplicity
will have made itself apparant and you will suddenly have more
ideas and projects underway that you have hours in the day.

But get youself a little project underway, as I said, convert an
old program or something. This makes it a lot easier to ask questions
and get answers from the list. A "how do I do XYZ" question usually
gets a lot more replys than a general "Help, where do I start?"


Hope this helps,

Graeme.
(Brisbane, Australia)






----------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

5. Re: Learn DOS or Win32 first?

Sperry,
I disagree with Graeme, and I'll tell you why in a minute. First, let me
explain the difference between Windows programming and dos programming in
non-programmer terms. I'm sure I will make some technical mistakes, but my
explanation will be "good enough". If my explanation sounds condescending,
it's not meant to be, but you said you're a newbie, and I want to make sure
my explanation gets to the easiest possible level.

DOS programs don't have a graphical interface (GUI), as you know. They
operate in a straight through manner, doing one line at a time right down
the program. Sometimes the program will jump to a procedure or a function,
but it will go right back to the main program and continue with the next
line.

Windows programming does the same thing - at least under Euphoria if you
don't use the Windows GUI. If you don't tell the program to use the Windows
GUI, Euphoria automatically makes the results of the program go to the
console (a DOS screen in a window like when you click on "MS-DOS prompt" on
your "Start" button).

There are a bunch of ways to do the Windows GUI under Euphoria. The most
common way is Win32lib. Win32lib is huge, but you only need to learn the
parts you want to use. You can make it as simple as a single window with
text output. You can use Judith's IDE or Brian Jackson's EuDesigner to make
that window, and never have to know a bit about how Win32lib does its work
(I still don't understand some parts of it). I think this is the best way to
get started if you plan on doing Windows programming. Let me tell you why.

If you use the Windows GUI, you have to do a bunch of stuff, like set up
something called an "event loop". Win32lib does this for you automatically.
If you use the Windows GUI, everything has to respond to an event - most
things don't happen automatically. The program still runs from the top down,
but if you don't tell the computer to do something in response to something
else, it will just run the program and never do a thing except make a
window. This is a big change from DOS, and if you go too far down the DOS
path, you MIGHT have problems figuring out how to make the program do what
you want it do. If you start out in Windows using Win32lib, you'll never
have that problem, because you'll have been responding to events from the
very beginning.

Graeme makes a very good point, though. Sequences are the *key* to Euphoria.
If you understand how to use sequences, eventually everything else will
follow. I just think you'll do better, and learn Windows programming faster,
if you skip the DOS stuff altogether.

So the VERY first place to start is "A Beginner's Guide to Euphoria". It
explains sequences very well. Once you have that down, move on to try to
create "Hello World" using an IDE and Win32lib.

No, let me take that back. Start writing the "Hello World" program first.
It's about five or six lines. Start by using nothing but one of the IDEs.
That will show you how to make a window, and a control. Then learn to do it
using wputs(). That will show you how to put stuff on the screen using
Win32lib, then you can learn about loops and sequences and data types from
the tutorial.

Then take apart some easy programs. There are a bunch of programs that don't
have many lines, and you can see what they do.

My email is writeneu at hotmail.com. I'm not real quick at responding, but I
will if you have problems.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Learn DOS or Win32 first?

Graeme wrote:

>Convert a few simple programs from one of your other favourite
launguages. [snip] But get youself a little project underway...

As I understand it, Sperry is a true beginner, who has no other favorite
languages, and he may have not idea what should be his first project, or
series of projects.

Another way to approach the whole ball of wax is to start by studying simple
Euphoria programs and figuring out how they work (asking questions as
necessary, after doing some thinking and research on your own!), then making
some small modifications (enhancements possibly, or just experiments) and
getting those working. Then get someone who is experienced to critique your
code.

The term programming "language" implies communication, not just between a
person who wants something done and a computer that has the power to do it,
but between people who need to discuss code and algorithms and things of a
programming nature, and who may even need to maintain or enhance each
other's code. That's the real world. It is a very meaningful and telling
thing to have an(other) experienced programmer say, "I looked at your code,
but I don't understand it."

Via personal email, I treated Sperry to my essay on clarity, which I won't
go into here, except to say that I would argue that if you aren't writing
code that easily becomes clear to other programmers, you probably aren't too
clear on what you're doing yourself, or at least you may have trouble
maintaining your own code, which is a problem if you ever want to engage in
long-term projects. Performance seldom suffers significantly from writing
clear code, and if it does then carefully write detailed docuemtnation to
elucidate the "tricky" code.

That's all I feel moved to share at this juncture.

George
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: Learn DOS or Win32 first?

Thank all of you very much for your input.  Yes, I am a total beginner to
programming at all.  The only thing else I have done is html and messed
around with linux some.  Learned some about hardware, formatting hard
drives and such.  I only bought my first computer 4 years ago and did not
know anything about them at all.  Self taught myself.

My mind has always been able to figure out mechanical things, my mother
said when I was 4 or 5 I took apart an alarm clock.  But, I don't remember
that. :)  So I picked up computer things fairly fast.

Anyhow, I wanted to thank all of you for you help. The different
explanations are helping me understand the difference between the DOS
programmin and windows programming.

Sperry Russ

new topic     » goto parent     » topic index » view message » categorize

8. Re: Learn DOS or Win32 first?

At 02:10 PM 19/12/00 -0000, You wrote:

>The term programming "language" implies communication, not just between a
>person who wants something done and a computer that has the power to do it,
>but between people who need to discuss code and algorithms and things of a
>programming nature, and who may even need to maintain or enhance each
>other's code. That's the real world. It is a very meaningful and telling
>thing to have an(other) experienced programmer say, "I looked at your code,
>but I don't understand it."
>
>Via personal email, I treated Sperry to my essay on clarity, which I won't
>go into here (HUH? YOU MEAN THAT WAS THE SHORT VERSION?!-ED), except to say
>that I would argue that if you aren't writing code that easily becomes
clear to
>other programmers, you probably aren't too clear on what you're doing
yourself,
>or at least you may have trouble maintaining your own code, which is a
problem if
>you ever want to engage in long-term projects. Performance seldom suffers
>significantly from writing clear code, and if it does then carefully write
detailed
>docuemtnation to elucidate the "tricky" code.
>
>That's all I feel moved to share at this juncture.

My, that sounded so impressive I searched the RDS page for an example of this
perfect clarity. Couldn't find anything. Havn't been round this list for a
couple of years. Been a bit busy writing a discount matrix/pricing system
for the company I work for (amoungst other things). When/if I leave there may
well be a vacancy for an experienced EU programmer (preferably one with enough
grey-matter to understand someone else's code). The problem with this list
has always been that there are too many people sitting around STROKING their
phylosophical navels and not enough people doing the actual work. The Euphoria
community has always had some good programmers and community members. People
who's contributions enrich the communal pool, either by asking or answering
questions, or contributing useful code, and it has always had hangers-on who
are only there to stroke their own egos by spouting off and trying to prove
others wrong. SOME of them have even been half-decent coders, however they
seldom actually contribute anything that helps anyone else.

I tend to call these people "Strokers" 8^)
They are the reason that email filters were invented.

Graeme.
----------------------------------------------------

new topic     » goto parent     » topic index » view message » categorize

9. Re: Learn DOS or Win32 first?

On 19 Dec 2000, at 9:04, SR Williamson wrote:

> Sperry,
> I disagree with Graeme, and I'll tell you why in a minute. First, let me
> explain the difference between Windows programming and dos programming in
> non-programmer terms. I'm sure I will make some technical mistakes, but my
> explanation will be "good enough". If my explanation sounds condescending,
> it's not meant to be, but you said you're a newbie, and I want to make sure my
> explanation gets to the easiest possible level.
>
> DOS programs don't have a graphical interface (GUI), as you know.

<blink> What were those things i was doing on the C64 and the ole 286
before windoze? I had mouse, resizeable moveable windows with menus,
and time-sliced multitasking on the C64 (late 1980's) and the 286 (in the
early 1990's).

>They
> operate in a straight through manner, doing one line at a time right down the
> program. Sometimes the program will jump to a procedure or a function, but it
> will go right back to the main program and continue with the next line.

Windoze does this too, it's just that the line of execution may be
interrupted and prolly will not proceed the same way twice. And the main
program is the task manager in the OS, your program is a child process.
The task manager runs pretty much straight-line, and the events you
program for are open holes for a sort of device driver to plug into. We call
an event driven code snippit a TSR in DOS.

> Windows programming does the same thing - at least under Euphoria if you
> don't use the Windows GUI. If you don't tell the program to use the Windows
> GUI, Euphoria automatically makes the results of the program go to the console
> (a DOS screen in a window like when you click on "MS-DOS prompt" on your
> "Start" button).

Well, assuming you don't dynamically interface to the DOS redirector
code, or write TSRs, or device drivers, any of which can preempt the
straight-line execution of the normal DOS program. If you break up the
program in a way that it *can* be exec'd out of order, then load it as one of
the 3 items i listed above, DOS can call your program in a manner like
windoze,,, especially if you play with virtual machines in XMS. The TSR is
like a DLL in a VM. I prefer to say that one can do nearly anything in DOS,
and you must be painfully precise in winders, or it will barf all over your
shoes at the worst possible time.

On the other paw, MS Windoze pretty much runs the world atm, so if you
write something for it, chances are your audience can run it. That's why i
am using windoze, there are more current applications for it, but, except for
the DDE and socks and inter/intranet code interprocess communication, i
am writing for portability to the DOS machine.

Kat,
rambling again..... i had a late nite, disambiguating prepositional phrases,
in Eu, of course.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Learn DOS or Win32 first?

Graeme writes:

>My, that sounded so impressive I searched the RDS page for an example of
>this perfect clarity. Couldn't find anything. Havn't been round this list
>for a couple of years. Been a bit busy writing a discount matrix/pricing
>system for the company I work for (amoungst other things). When/if I leave
>there may well be a vacancy for an experienced EU programmer (preferably
>one with enough grey-matter to understand someone else's code). The problem
>with this list has always been that there are too many people sitting
>around STROKING their phylosophical navels and not enough people doing the
>actual work. The Euphoria community has always had some good programmers
>and community members. People who's contributions enrich the communal pool,
>either by asking or answering questions, or contributing useful code, and
>it has always had hangers-on who are only there to stroke their own egos by
>spouting off and trying to prove others wrong. SOME of them have even been
>half-decent coders, however they seldom actually contribute anything that
>helps anyone else.

I didn't intend to cause offense to anyone.

Graeme, if you feel I was trying to prove you wrong, as I recall the only
thing I disagreed with was your suggestion that Sperry convert some existing
programs in other languages to Euphoria; I pointed out that as a rank
beginner, he doesn't have any existing programs, etc. My concern and
objective was not "anti-Graeme" in any sense, it was rather "pro-Sperry." If
when I knew virtually nothing about programming, someone had told me that
the way to get started was to convert programs from some other language, I
think I would have felt either confused or disheartened, or both.

I worked with a variety of programmers over a number of years, while I
myself was busily engaged in the art/craft/science on a daily basis. I very
well know the difference between people who can write tons of code quickly
that kinda/sorta works, but no one, including themselves, can modify or
enhance it without completely rewriting it, and people who (nearly as
rapidly) produce code that works dependably and - given a reasonable amount
of background knowledge, as in general familiarity with the application and
its libraries, classes, or whatever - is generally readily understandable to
others. I worked with both types. I definitely prefer the latter, and always
strove to be one myself. I'm extremely confident that I know what I'm
talking about, in this instance.

I did not join this list specifically to do volunteer work for the
community. I am developing an application, a task for which at the moment
Euphoria seems well-suited, and I intend to share whatever generic (vs.
application-specific) code I come up with that may be of interest to others.
However, I see no benefit in doing that prematurely, just to prove myself.
If someone asks questions and I feel I have something to contribute, I
intend to do so, whether I contribute code or philosophy or something
in-between.

However, if you don't want to read what I have to say, by all means turn
that filter on. 8^)

I hope this clarifies!
George

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

new topic     » goto parent     » topic index » view message » categorize

11. Re: Learn DOS or Win32 first?

Sperry,
I'm a beginner like you trying to learn a langue on my own, with the help of
these wonderful people. For me it's a real struggle having no back ground at
all in this stuff. That's why I picked Euphoria after looking at the others.
It's simple, powerful, flexible, and now compliable. I do wish for a more
complete tutorial that walks you through each command.
Alvin
Check out my photo album
http://photos.yahoo.com/alvin_ka9qlq

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu