Click to visit our sponsors!

homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

  The Geek Culture Forums
  Ask a Geek!
  I wanna start programming, Where do i start.

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   I wanna start programming, Where do i start.
Geek247
Maximum Newbie

Posts: 16
From: Miamisburg,Ohio, USA
Registered: May 2002

posted June 23, 2002 23:04     Click Here to See the Profile for Geek247   Click Here to Email Geek247     Edit/Delete Message   Reply w/Quote
Hey everybody, I was wondering what the best way to start programming, I heard C++ was easiest and best but that from people who like Gateway, so consider the source. LOL anyway I would love to hear some GOOD advice from people who actually know what their talking about. Oh and what are some good programs to use, THANKS I really appreciate it.

IP: Logged

GameMaster
Assimilated

Posts: 488
From: State of insanity
Registered: Mar 2002

posted June 23, 2002 23:59     Click Here to See the Profile for GameMaster   Click Here to Email GameMaster     Edit/Delete Message   Reply w/Quote
C, C++ and JAVA are the biggest tools in the industry. If you learn C++ or JAVA the other two are fairly easy to pickup. There is somthing to be said for Vissual C++ and Vissual Basic (if you are looking to write winDOZE programs), but JAVA (and tools like swing) allow you to write one program that works cross platform, and can be used as an applet. There are a lot of people who have become JAVA zelots for this fact, but JAVA does require being run through a Virtual Machine, which does slow things down...

So, I guess the question is, what are you looking to do?
If you're looking to write for just Windows- learn Visual Basic.
If you're looking to write for the web- look at JAVA or C/C++.
If you're looking to do cgi look at C/C++, Perl, .NET(Visual C++/Basic) or PHP
Cross Platform - JAVA
Commandline and low level (like writting your own OS) - C/C++ or Assembly

I'm quite intrested t see what other people have to say on this matter.

------------------
<shameless plug>
www.game-master.org
</shameless plug>

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted June 24, 2002 02:16     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
I certainly concur with GameMaster in that you need to consider what you are planning to make. Personally, as a Mac user, I would add the consideration that you'd want to use something that is easily portable to Macs, but I think, for now, that is something to leave off worrying about ;) *ducks*

As for a good system for just Windows, GameMaster mentioned Visual Basic. However, my friend Steve is a Delphi programmer, and I got his opinion on Delphi:
"C++ is hardcore. Takes a little time to knock something up. When learning a language it's nice to see some results. Delphi is far superior to C++ in this respect and is far more productive, and has the same speed and power. VB has similar productivity, but is infamously ropey and lacks speed. Delphi is pascal based so is a nicer, easier to read and understand language than C variants. Also every error in Delphi raises an clear exception, so no bizairre crashes. Plus with Delphi 6 you can now work with Linux too. What more could you want?"

Another nice advantage of Delphi and Visual Basic is that they have very fast compilation, and you can even alter the program while it is running to make changes.

- uilleann

IP: Logged

EngrBohn
Uber Geek

Posts: 831
From: United States
Registered: Jul 2000

posted June 24, 2002 05:30     Click Here to See the Profile for EngrBohn   Click Here to Email EngrBohn     Edit/Delete Message   Reply w/Quote
C++ the easiest language with which to learn programming!? BS. Relative to what?

Let's distinguish between programming something useful and learning to program -- I'm not saying a language can't fit both, just that they are different categories. I would *not* recommend C++ to someone who has not programmed before.

The two main drawbacks for C++, as a learning language, are it's terseness and many of its features that make it attractive to power programmers.

A few years ago, I'd have recommended Ada 95 -- it's readable, it encourages good software engineering practices (you'd get introduced to them and would practice them before knowing they were good SWEng practices), and you can (as you gain experience) play with pretty much any realm of computer science. But these days, Ada seems to have fallen by the wayside, and you're unlikely to find much support when you need help, unless you find a mentor.

I've heard people praise Python as a learning language, but I have insufficient experience with it to be a judge. I have my doubts, though, particularly in regards to its lack of strong typing (to be fair, my first language -- BASIC -- was weakly typed, and I got over it, but I still think teaching with strong typing initially is better). I attended a workshop last week, and one of the topics of discussion was an appropriate language & text for CS1/CS2. The consensus of the workshop attendees was that their research language was the best of the alternatives (natch), but since most of the attendees didn't have the authority in their departments to make that switch, the discussion then went to C++ or Java. C++ was given preference since Java only provides reference-semantics for everything but the primitive data types. Given C++ as the language by default, the discussion turned to the choice of text. The recommended book (I still need to get a copy to form my own opinion) was Accelerated C++ by Koening & Moo, because it uses only the "safe" aspects of C++ (such as value-semantics) until late in the book when, presumably, the student is less likely to shoot himself in the foot.

------------------
cb
Oooh! What does this button do!?

IP: Logged

GameMaster
Assimilated

Posts: 488
From: State of insanity
Registered: Mar 2002

posted June 24, 2002 06:41     Click Here to See the Profile for GameMaster   Click Here to Email GameMaster     Edit/Delete Message   Reply w/Quote
C++ isn't too bad a starter language, you can start with almost C like code (no run time polymorphism, no dynamic memory allocation, no classes) and write some fairly simple straightforward code. Granted that it isn't as pretty as Delphi or the .NET stuff, but it does the job.

Spare a little Basic (al la basica on a 286), I learned to program with C++... Granted that my mind works like that and I got it fairly easy. I have trouble with the MS Visual languages because they hide the bones, which is why I like JAVA, I can make a GUI program using a simple text editor. Basic isn't a bad starting language, but it is so tempting to begin using GOTOs.

They used to teach beginnig programing using Fortran and Pascal in the UW system up until a few years ago... I suppose, if your looking to teach yourself, you should look at some various samples of code and chose the language that looks most natural to you... Most books begin with the dreaded "Hello World" program of sorts, and while that tidbit won't tell you everything you need to know to make a informed desicion, it should give you an idea how easy the code is to figgure out.

Just more food for thought.

IP: Logged

EngrBohn
Uber Geek

Posts: 831
From: United States
Registered: Jul 2000

posted June 24, 2002 07:29     Click Here to See the Profile for EngrBohn   Click Here to Email EngrBohn     Edit/Delete Message   Reply w/Quote
- GameMaster -
C++ isn't too bad a starter language, you can start with almost C like code

IMO, C's not a good learning language, either. In some ways, it's better, in some ways it's worse, than C++.

Basic isn't a bad starting language, but it is so tempting to begin using GOTOs.

Shhh! Don't let them know about the four-letter-word that starts with 'G'! I think the greatest success of the structured programming paradigm was when two quarters ago, a classmate was surprised to learn that C has GOTOs -- goes to show how effectively you can program using structured constructs.

They used to teach beginnig programing using Fortran and Pascal in the UW system up until a few years ago...

You could do worse than teaching yourself to program in Pascal. I didn't mention it earlier since its current following is (I think) smaller than that of Ada, which lends to the issue of getting help. The other reason is that there's not a migration path from Pascal into OO practices.

I suppose, if your looking to teach yourself, you should look at some various samples of code and chose the language that looks most natural to you...

Good advice.


------------------
cb
Oooh! What does this button do!?

IP: Logged

Alien Investor
Assimilated

Posts: 408
From: New York City
Registered: Jan 2000

posted June 24, 2002 08:06     Click Here to See the Profile for Alien Investor   Click Here to Email Alien Investor     Edit/Delete Message   Reply w/Quote
I think you need five things to get started as a programmer:

Computer
Software Tools
Project
Book
Mentor

You need access to a computer where you can do your programming. These days, you probably have your own computer, and you are all set.

You need software tools. Specifically, you need a compiler or an interpreter for the language that you are writing in. I think the interesting languages to choose from are: basic, c, c++, java, perl, python. For a total beginner, it doesn't matter much which language you use. My own preferences are (1) perl and (2) java.

You need a project to work on. A lot of people start with simple games because they are small and interactive and don't involve saving state. Start VERY small. If you have never programmed, start with, say, a tic-tac-toe game.

You need books. You need the definitive reference book for the language that you are working on. For C and C++, these are "The C Programming Language" and "The C++ Programming Language". The best publishers are O'Reilly and Addison-Wesley. You may also need some tutorial books in addition to the reference books. Go down to your local tech bookstore and browse and get something that seems good to you.

You need a mentor. Your mentor will help you choose your project and will teach you and answer questions. If you are in a class, then your teacher is your mentor. If you are not in a class, you need to find a mentor. It might be possible to work with your mentor via e-mail, but it's a lot better if you can chat with them in person.

In my opinion, the most important factor is getting the right books, and the second most important factor is choosing a good project. You want a project that is small enough to finish. Lots of people pick something too ambitious, such as a project that nobody's ever done before, and think that they will write that for their first project.

It's not really important what language you learn first. If you become a real programmer, you will learn at least 5 languages anyways. The important part is that after you've been programming for a while, you start appreciating the need for modularity, and you start consciously learning about software engineering and how it helps when you write programs longer than 100 lines.

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted June 24, 2002 08:26     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
The choice of first language is a very difficult one. First, you have to ask yourself why you want to learn to program? Is it because you want to actually write code for a living? Is it because you want to write some things for your own amusement? Are you just testing the waters to see if you like programming?

No matter what you answer to any of these, C/C++ is a poor first choice. EngrBohn mentioned some of its problems. I think we could improve the quality of software throught the world if C/C++ were only allowed to be used by licensed professionals.

I'm going to answer my own questions to you and assume that your are interested in programming and want to build some things for your own amusement, but don't know if you want to do it professionally, but are not ruling that out. So, you want a language that lets you be fairly productive off the bat, is not too hard to learn and offers some safety net for you (which is why C++ is out).

Visual Basic is great for hooking together windows components to make them something else. My 'pointy haired boss' has been building his own home entertainment computer by wiring together and re-skinning different media players with VB. The big down side is that it's windows only.

Java is currently my favorite general purpose language. It is very portable. It is very portable. I don't have to worry about memory management. The threading model works pretty well. I think the vm performance hit that GameMaster mentions is a non-issue for five reasons. 1: I can finish a job so much faster in Java than C++, that I have time to work on speeding up the algorithms, which always pays off the most. 2: the JIT compilers are starting to get very close to native code performance. 3: if I really want it to scream I can use a native code compiler for java. It is a little harder to learn than VB, but it puts you in a place where you could actually end up doing programming for a living.

C#, same as Java. It may be windows only today, but various teams are working on unix ports of the CLR. As much as I hate microsoft tools, I think C# may ecplise Java one day.

perl is a potentially interesting first language. It has a vast collection of tools that work with it (CPAN). You can write some pretty amazing stuff in a small program. It is also portable to many platforms. I can't vouch for GUI applications in perl, but I think those should work as well. Perl uses Tk (from tcl) as it's gui toolkit, and I have written tcl/tk programs that work no both unix and windows without change. On the down side, it is a train wreck of language design. It's easy to get into trouble with things not working the way you want. It encourages some pretty bad habits by making variables global by default.

tcl (www.scriptics.com) is another interesting choice. I use it a lot, but mostly because it is really easy to integrate into other tools - hence the name (Tool Command Language). It is a very small language. You can learn most of it in a few days.

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted June 24, 2002 08:33     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
Originally posted by Alien Investor:
It's not really important what language you learn first. If you become a real programmer, you will learn at least 5 languages anyways.
For a while we had an questionaire at work for people interested in working for us. One of the first questions was "How many (computer) languages do you know? Please list no more than 30." The 30 limit was just there to scare them into thinking up as many as they ever heard of. During the interview, we would ask them to compare some construct in two of the more obscure ones to see if they were lying or not.

IP: Logged

maxomai
Super Geek

Posts: 115
From: Portland, OR
Registered: May 2001

posted June 24, 2002 08:54     Click Here to See the Profile for maxomai   Click Here to Email maxomai     Edit/Delete Message   Reply w/Quote
I would recommend Python hands down. [link]www.python.org[\link]

Advantages: simple, fast to develop, extensible, well documented, portable, well liked by "serious" software engineers as well as newbies. Has lots of amazing GUI-building tools. In fact, has lots of amazing tools for just about anything.

Disadvantages: slow (relative to C, OCaml and C++), not that impressive on a resume (yet).

After that: C and/or C++, Perl, Java, LISP and/or OCaml.

I prefer C++ to any other language myself, but I agree with the above posters, it's a real bitch to learn.

I hate Visual Basic, but it looks good on a resume.

IP: Logged

EngrBohn
Uber Geek

Posts: 831
From: United States
Registered: Jul 2000

posted June 24, 2002 09:37     Click Here to See the Profile for EngrBohn   Click Here to Email EngrBohn     Edit/Delete Message   Reply w/Quote
Regarding Visual Basic, I feel the need to rant, but it's a relevant rant.

From everything I've seen, pre-.NET VB does not provide for non-GUI applications. I'm willing to be proven wrong on this, but I suspected it when, on a whim, I picked up a book entitled "Learn to Program in Visual Basic" ("no programming experience required!") a couple years ago and looked at its table of contents. The entire first half of the book covered laying out the GUI, and actual control constructs weren't mentioned until somewhere around chapter six. I've since talked to a couple people, and they confirmed my suspicion.

Now, I understand VB is an excellent rapid prototyper for GUI applications, but if you're learning to program, you really need to start with so-called console applications so that you only need to worry about the algorithm and not about the display.

I suspect that VB.NET does support console apps, and if it doesn't, it should be straight-forward for someone who already knows how to program to use the .NET framework to set up a "console library" in, say, Managed-C++ that could be used by VB.NET.

Regarding books. I like to look through tables of contents and indices (especially indices) to get a first-order assessment of a book. If you're new to programming, then it'd probably be best to get someone else to judge for you. Something important to remember is that there are good reference books and good educational books, but very few that are both (and many that are neither!). Don't try to find one that's both a good reference and a good tutorial. Assuming you're on a budget, start with a good tutorial book and then when your budget allows, get a good reference book. As a rule of thumb (but not 100% effective, and not endorsing or disparaging any publishers), I've found that O'Reilly produces good reference books, and Addison-Wesley produces good educational books. There are, of course, other publishers with a large footprint in the realm of computer science, but I've noticed a disproportionately large number of AW textbooks, and I haven't encountered a bad one yet.

The thing to remember about reference books (such as "... in a Nutshell") is that they're only effective if you already know enough to understand them, which is why I recommend to get the educational book first.

------------------
cb
Oooh! What does this button do!?

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted June 24, 2002 10:41     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
Originally posted by EngrBohn:
Now, I understand VB is an excellent rapid prototyper for GUI applications, but if you're learning to program, you really need to start with so-called console applications so that you only need to worry about the algorithm and not about the display.

That's an interesting point, but I'm not sure I totally agree. I've seen elementary school children grasp programming in LOGO, which very graphics based. It is very different from VB GUI though. LOGO focuses on drawing things and getting text input. That is vastly different from callback based programming that you find in VB (and Java/Swing, C++/{Motif,GTK,QT} and Perl/Tk)

And I guess that's the essential point that EngrBohn was getting at. There is a lot of effort spent with modern GUIs just to get the shell of the program so you can hang the part that does something inside it. A language where you can avoid that would be a good starting point. tcl/tk does that pretty nicely. You can create a text field and pair it with a variable. Whenever you change the variable in the program, it redisplays automatically. When the user changes the value on screen, the variable changes as well.

IP: Logged

Steen
SuperBlabberMouth!

Posts: 1300
From: Maryville, TN, USA
Registered: Jan 2000

posted June 24, 2002 11:41     Click Here to See the Profile for Steen   Click Here to Email Steen     Edit/Delete Message   Reply w/Quote
Just learn all of these languages. Once you have them down, everything else is a piece of cake.

IP: Logged

Geek247
Maximum Newbie

Posts: 16
From: Miamisburg,Ohio, USA
Registered: May 2002

posted June 24, 2002 15:59     Click Here to See the Profile for Geek247   Click Here to Email Geek247     Edit/Delete Message   Reply w/Quote
Hey everybody, Thanks for all your replies, I honestly didn't know it would get this many this quick, but i am very thankful, Just to let you all know, i have been looking at some things and I have narrowed it down to a couple, Java,Perl, and Vb.thanks

IP: Logged

+Andrew
Alpha Geek

Posts: 251
From: Boston, MA, USA
Registered: Aug 2001

posted June 24, 2002 20:47     Click Here to See the Profile for +Andrew   Click Here to Email +Andrew     Edit/Delete Message   Reply w/Quote
First of all, I have to throw in my own $0.02 about VB. I used it for a few years when I was still mainly Windows, to create a few apps for my own use. I concur that it's possible to get apps together pretty quickly, but it also has it's share of pitfalls. Mainly I found that it made my head hurt. A lot. Easy things are easy in VB, but anything more interesting can quickly turn into a mess. The documentation isn't much help, either: I found it nearly impossible to get any useful information out of the VB6 docs.

Plain BASIC isn't an entirely useless language. I had a lot of fun with it as a little kid, back in the days of DOS. There's actually a lot you can do in BASIC, and it's not bad as an introduction. I found the knowledge useful when I got a TI-83+ calculator, too (and recently, an '89).

And now, my evangelical bit: I think that the UNIX way is a good way to learn programming. The command line and text oriented style process makes pushing and processing data very simple. Plus the modular nature of commands makes it very easy to string together a chain of simple programs to do exactly what you need, even if it's something no one ever thought of before. Naturally, I like Perl. I picked it up a few years ago, in 8th grade. Now barely a day goes by when I don't put Perl to good use.

Oh, as for "goto": even Perl has one. The idea that gotos are satan-spawned is preposterous. Over-using them is definitely not good, but in some cases a goto is a perfectly suitable tool for the job (I've used it once in Perl, in one of my larger programs).

-Andrew

IP: Logged

Janeway
Alpha Geek

Posts: 306
From: Cyberspace, Delta Quadrant
Registered: Sep 1999

posted June 25, 2002 00:44     Click Here to See the Profile for Janeway   Click Here to Email Janeway     Edit/Delete Message   Reply w/Quote
QBasic was my first language, C++ my second, Visual Basic my third, next will be Java. C++ was tough--I still can't do much with it (and zip, graphics-wise). I've kind of let it fall by the wayside for right now though I plan on picking it up again later (and go through the book "Tricks of the Windows Game Programming Gurus"). QBasic? It's fun, it's easy, but you can't make a stand-alone program, so professionally it won't get you far. Visual Basic--the Evil Gates has ensnared me. I love VB. Most of the stuff I do is pretty simple, but lots of graphics and VB works great for that, plus it's very easy to pick up in no time at all. Currently, I'm going through the book "Teach Yourself Game Programming with Visual Basic in 21 Days". One thing I do dislike about VB is that you don't see all of your program ("the bones"). It was a bit disconcerting at first--didn't feel like "real programming". Java will be next. Then either assembly (which I feel I need to learn anyway) or Python (which from everything I've heard is pretty cool). Plus brush up on some math skills (egads, I suck at math). So, overall, I recommend VB or possibly Java, save C++ for later. And have fun.

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted June 25, 2002 01:05     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
Just for the record, I started off with BASIC, and probably thanks to the helpful computer manual, soon got into subroutines and stopped using GOTOs. I've seen BASIC programs full of GOTOs and they really are a mess. Even so, the BASIC I used had very limited structure outside subroutines, so GOTOs were sometimes helpful (although I tended to use daft code just to force a GOTO to not be needed).

+Andrew is right, though, in that they have their uses; one of those being to jump down to the various destructors in a method if the method fails somewhere in the middle. If/else constructs to do that can get very hard to follow, so are not preferable.

Following BASIC, I tried C and, while I was fine with the syntax, somehow I never grasped pointers, and with no-one to ask, just watched in despair as seemingly simple bits of code reset my PC or put gibberish on the screen. They did suddenly become clear later on; I just wished it had been sooner.

I don't know what to recommend personally, being a Mac user, we don't have the variety of options available to PC users, certainly no good EDP environment (REALbasic quickly becomes a menace). Now, I have Steve in one ear (rather, AIM window) banging on about Delphi, plus one or more people here saying that C is too dangerous (being low-level) for anyone other than top programmers, but, seeing as the main development system for the Mac has been CodeWarrior, which is mainly C/C++, and people here are recommending C++ even for PCs, I feel less bad about the Mac after all. Yay :)

Though, we've got objective C now.

- uilleann

IP: Logged

Steen
SuperBlabberMouth!

Posts: 1300
From: Maryville, TN, USA
Registered: Jan 2000

posted June 25, 2002 13:15     Click Here to See the Profile for Steen   Click Here to Email Steen     Edit/Delete Message   Reply w/Quote
Janeway wrote:
Visual Basic--the Evil Gates has ensnared me. I love VB.

Oh my god... Janeway has been assimilated into the collective!

IP: Logged

GameMaster
Assimilated

Posts: 488
From: State of insanity
Registered: Mar 2002

posted June 25, 2002 13:45     Click Here to See the Profile for GameMaster   Click Here to Email GameMaster     Edit/Delete Message   Reply w/Quote
I've writen C++ programs in MS Visual C++, so it is possible... Personally, I don't think VB is evil, but I'm not a big fan either. As for the idea that only professional programmers should use C/C++ is rediculous... There isn't a way to become good at C/C++ without using it first.

------------------
<shameless plug>
www.game-master.org
</shameless plug>

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted June 25, 2002 15:35     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
Oh my god... Janeway has been assimilated into the collective!

Looks like I've got to go save her ;-)... Harry, Tom, you're with me...
*gets turbolift bound for Delta Flyer...*

- Chakotay

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted June 25, 2002 19:47     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
Originally posted by GameMaster: I As for the idea that only professional programmers should use C/C++ is rediculous... There isn't a way to become good at C/C++ without using it first.

Ah, but you should be good at programming in general before writing software in C++ which you expect to be reliable in any way. It's sort of like race car driving. You don't put a beginner in a Formula I car.

I will not deny that there are a lot of programmers out there producing useful software in C. Some of it is commercial products, some is open source. But the dirty secret of the industry is that a lot of it contains severe internal bugs and egregious security holes. If you read BugTraq you find that a huge number of exploits rely on simple buffer overruns. Even experienced C programmers slip up every once in a while and allow a possible overrun to slip in. In a language where you can't have buffer overruns, you can worry about the correctness of your program at a higher level.

If you want to maximize safety and reliabilty, you should always use the safest language that can get the job done.

IP: Logged

neotatsu
Super Geek

Posts: 234
From: Somewhere my heart is not
Registered: Jun 2002

posted June 26, 2002 00:29     Click Here to See the Profile for neotatsu   Click Here to Email neotatsu     Edit/Delete Message   Reply w/Quote
I hafta admit I stopped reading after a while on this list..to many of the same opinion, just a worded different...anywho, I dun know about most languages, but I plan to learn as many as I possibly can, I just started a couple months ago though, and to be honest it shocks me that anyone actually know that python exists...I found it, and a nice web book on it, and I've started learning it...it's been about a month since I last did anythin with it tho..I got really busy with classes, but next year I actually start programing in college...I like python, and from what I've read it does make for a great first language, though if you already have a bases in c/c++ then I don't recommend it...just my measly 2c..

IP: Logged

EngrBohn
Uber Geek

Posts: 831
From: United States
Registered: Jul 2000

posted June 26, 2002 03:59     Click Here to See the Profile for EngrBohn   Click Here to Email EngrBohn     Edit/Delete Message   Reply w/Quote
Tangentially,

- uilleann -
the BASIC I used had very limited structure outside subroutines

An amusing story about BASIC control structures. In 1980, give or take a year, my mom decided to take a programming class from the local junior college to see if she could get interested in the machine my dad built (a Heathkit, for the curious). Now, we lived in the panhandle of Florida at the time, which actually is part of the South -- including some heavy accents. It would seem the instructor spoke fast, and one day she came home befuddled, trying to figure out why she couldn't find "foreign X loops" in her book's index. We soon figured out the instructor was talking about "for-next loops".

Okay, I guess you had to be there.

------------------
cb
Oooh! What does this button do!?

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted June 26, 2002 07:50     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
*reads EngrBohn's post*
*grins*

Hehe, cute.

As for BBC BASIC, IF/THEN/ELSE must come on the same line, multiple IF/THEN/ELSEs on the same line nest not as you'd expect, and there is REPEAT/UNTIL, but no WHILE/WEND so such loops always execute once.

I still managed a large package with no GOTOs, but I think it slowed the code down a lot

- uilleann

IP: Logged

greycat
Alpha Geek

Posts: 321
From:
Registered: Oct 2001

posted June 26, 2002 18:50     Click Here to See the Profile for greycat     Edit/Delete Message   Reply w/Quote
One of the first BASIC dialects I learned had no ELSE statement. If you wanted to implement IF/THEN/ELSE, it looked something like this:

1000 IF NOT condition GOTO 1030
1010 REM The "THEN" part goes here
1020 GOTO 1040
1030 REM The "ELSE" part goes here
1040 REM Normal program continues.

Just thinking about it makes my head hurt. I can't remember which dialect it was; it might have been TRS-80 Color Computer BASIC, or Atari 800 BASIC, because those were the computers I started with. Compared to this, C is actually elegant.

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted June 27, 2002 02:44     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
greycat: ewww...bloody hell :)

I know a little game written in BBC BASIC (a simple SpaceWar clone) that had GOTOs everywhere. What made it worse was that the programmer knew how to use subroutines. My only guess was that the GOTOs were faster than subroutines (which need stack manipulation); the game wasn't overly fast anyhow.

Now, that code was really hard to follow, so if you took all the THENs out (and presumably all the subroutines), you'd have, well, a total mess. Yay for prehistoric coding style.

Even so, assuming you at least had GOSUB, you end up with a code structure resembling assembly. But even assembly has named location labels.

And C's structure is elegant, I think it's the nicest structure I've seen.

- uilleann

IP: Logged

GameMaster
Assimilated

Posts: 488
From: State of insanity
Registered: Mar 2002

posted June 27, 2002 19:11     Click Here to See the Profile for GameMaster   Click Here to Email GameMaster     Edit/Delete Message   Reply w/Quote
The look and feel of C/C++ code is nice and that is why the creators of JAVA and several scripting languages stole a lot of the feel. The one thing that I like about BASIC is that it is closer to machine code (epecially the versions that didn't have subs, and forced you to use the evil "GOTO"). Picking up ASM (MIPS -or rather- SPIM) now is making realize a lot about how to optimize C/C++ for security, speed and clockcycles... I think that ASM should be on the list of things for all programers to learn, probably after their first language, but before they want to "realse" software for anyone elses use. It is a great way to teach people the dangers of stack overflow, and a few tricks to make the code run faster.

------------------
<shameless plug>
www.game-master.org
</shameless plug>

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted June 27, 2002 20:11     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
Originally posted by GameMaster: The look and feel of C/C++ code is nice and that is why the creators of JAVA and several scripting languages stole a lot of the feel. The one thing that I like about BASIC is that it is closer to machine code (epecially the versions that didn't have subs, and forced you to use the evil "GOTO
That's so ridiculously wrong that I feel compelled to reply. You are confusing control structures with level of abstraction over the raw machine.

C was, from it's inception, designed to be a portable assembler language. It's handling of pointers, it's ++ and -- operators, it's set of primative types - all these things are modeled on the hardware. What it adds above assembler is a some syntactic sugar in it's control structures to make it more readable. C is, however, just as powerful, and dangerous, as any assembly programming.

BASIC is, by all reasonable definitions, a high-level language (albeit a badly designed one in it's early incantations). It abstracts away the hardware, so that you can think in terms of things that are easy to work with. Strings, rather than arrays of bytes. Input and Print statements that are type checked rather than unchecked scanf/printf. Multi-dimensional arrays rather than vectors of vectors. You can't write basic programs that core dump. In C, that's a rite of passage.

If you look at the heritage of C, you start with it's grandfather, BCPL. That was very much an 'machine' level language. It's only data types were byte and word. That gave birth to B, which begat C. Along the way a few more data types were added, but only those that the raw hardware supported. C++ borrowed the class concept from Simula and a few other ideas from other languages, but always tried to remain "close to the machine" (to quote K&R and later Stroustrup).

BASIC has no need to be close to the machine. It was designed to be safe to use and relatively useful from the start. And don't confuse the botched implementations of TRS-80 and Altair (microsoft) BASIC with what Kemeny & Kurtz originally envisioned. They wanted something closer to what enventually shipped as TrueBasic (but 20 years too late to make a difference).

One point you do have right is that Java took the "feel" of C++. It's actual heritage belongs more to Smalltalk and (slightly) Lisp, but it became a commercial success by looking like C++, so that people didn't have to think they were learning anything really new.

I think that ASM should be on the list of things for all programers to learn ... it is a great way to teach people the dangers of stack overflow, and a few tricks to make the code run faster.

Not any more. When I was your age, that might have been true. A working knowledge of the instruction set and what the compiler generated could be used for tweaking inner loops to run a little faster. With today's pipelined architectures, it takes an expert to beat the compiler. The same assembly code will have different performance characteristics on different models of the same family of processor. RISC processor instruction sets are never intended for programmers to use. They get part of their performance by having a sophisticated optimizing compiler selecting the instructions.

Of course you can always find some cases where you're carefully crafted assembly code is faster than what the compiler would generate. It's just not often enough to make it worthwhile (unless your compiler sucks). I would rather finish writing the code in time to meet customer needs than spend twice as much time to make it 5% faster.

IP: Logged

Deltib
Maximum Newbie

Posts: 16
From: Hamilton, New Zealand
Registered: Jun 2002

posted June 28, 2002 02:56     Click Here to See the Profile for Deltib   Click Here to Email Deltib     Edit/Delete Message   Reply w/Quote
I'm probably not the best person to answer a question like this (and I'm going to try and avoid getting involved in all the argument about wheres the best place to start, which is estheticly cause I want to look above that, but in reality I was really just too lazy to read it all in detail) I'm actualy a person who taught himself most of his computer knowlege. My computer learning really started out in usbourne books, but I didn't start to understand programing till a tried a book called "bits, bytes and..." well, there was a third word in the title but I can't remeber, anyway, where I started was with basic, commadore basic to be exact, now at the time I only understood the most basic concepts of it, print, input, goto, and the use of variables to a certain degree, but that's literaly where I really started. On a more realisting basis, I started on Visual C++ (many many years later) this is when I started to pick up some real concepts, functions and stuff like that.

It's at this point that one reading this post might wonder "how can a person possibly talk about themself this much without even hinting at actualy having an answer to the question" and I am getting there, trust me. The thing about me is I like to have detailed inderstand of how something works before I can use it in any technical way, I got fed up with the MFCs cause I couldn't stand not knowing what the hell was actualy going on once I'd called an MFC function. If I ever were to use the MFC I would have to read the source code for it and follow each class that I used through before I felt comfortable. This is where I come to the point where I say which language I think it would of been better for me to start on. Assembly, it's the language I've learnt most recently, and since I did that, C++ has just gotten so much easeyer, I can imagen how the C++ statements would be expressed in assebly and I feel more free in my programing for it (I've found a lot of people who are scared of computers are that way for lack of understanding, if they don't know whats possible, they start to think anything could be the wrong thing, this is a simelar case, I felt like I could do more cause I really understood what I was doing). Now to many assembly may seem like a terrible place to start, and if you really feel like you want to start on a 3rd level language, then I would sugest C++, it's nice and easy, and you'd be suprised how much most programming languages are a like, I can't think of any language other than assembly that doesn't have an if command.

Having said all that, you're probably wonding, why, not much unlike Issac Asimove, I wasn't able to just come out and say it, but instead had to explain the works of the universe before I finaly came out with it, I thought maybe it would help you to find you're own perfect starting point if you could think about things like this before you dive in. I think the main thing to ask is how much understanding of a command to you feel you need before you are comfortable issuing it.

That's Pretty much all I have to say, so, goodnight all.

------------------
The F word really isn't a word cause it takes four Fs to make a word (get it? 0xFFFF)

IP: Logged

GameMaster
Assimilated

Posts: 488
From: State of insanity
Registered: Mar 2002

posted July 01, 2002 06:06     Click Here to See the Profile for GameMaster   Click Here to Email GameMaster     Edit/Delete Message   Reply w/Quote
QF, I was refering to the code... Not the underlying implementations. If you write a program in C++, it doesn't take all that much work to recreate it in JAVA... The code is pretty, easy to follow (well, if it is good code) and it looks like what it is. Perhpas I am just fond of it, because it is the first language that I learned to do anything truely useful with... But I realize the large number of hazards and pitfalls that C++ is notorious for...

While the machine code generated will be MUCH different (well, Java using the various JVMs, and C++ being compiled diffrently on different systems....). Yet, the syntax is such that once you can get a grip on one, the other is fairly simple. I was playing with JAVA a lot this weekend, and it has taught me that JAVA it is the language that the zealots preach abut. Granted, that it's a bit slower, not a pretty as Visual C++ (at least not without writting a ton of extra panels) and e few other drawbacks... but I am almost sold.

As for the usefulness of learning assembly... Intel chips are fast, because they are small, AMD are a bit more effeicent and the Motorola chips in Macs are well.... So, your definatly right about looking at the ASM output generated by a compiler not making sence from an optimization point of veiw, but the use of bit shifting instead of dividing/multipling by even intergers and using doubles instead of floats (on windows machines) still does increase speed in C/C++ code... Understanding why and how low level things work, give my generation a respect for what has come before, which I think most of my generation lacks. There will, however, always be a need for new low level programs to make better OSs, compilers, virtual machines and the like.

------------------
<shameless plug>
www.game-master.org
</shameless plug>

IP: Logged

iballoondesign
Assimilated

Posts: 394
From: Midland, TX
Registered: Dec 2001

posted July 02, 2002 07:20     Click Here to See the Profile for iballoondesign   Click Here to Email iballoondesign     Edit/Delete Message   Reply w/Quote
What about REALbasic? Is that good? I hear that program can make for both Mac and IBM

------------------
Riding on the balloon, flow over the world...

IP: Logged

uilleann
Assimilated

Posts: 450
From: St Albans, Herts, England
Registered: Apr 2002

posted July 02, 2002 07:56     Click Here to See the Profile for uilleann   Click Here to Email uilleann     Edit/Delete Message   Reply w/Quote
Now...REALbasic...

REALbasic is very much a mixed bag. For certain tasks, such as an AIM log viewer, or other smaller utilities, it's ideal - gets the job done fast and easy. However, it is very limited in what it can do, and this can get very frustrating - it still can't raise an alert that I know of, or make an alias, or handle window zooms, and these and most more complex tasks need either plug-ins or for you to learn the Mac OS ToolBox, which you'd need to do for anything special, and I've never managed to locate a good online reference guide to ToolBox calls for REALbasic users. There is one page that does have a little collection, I have the URL at home.

Windows compiles are suspect (and you can't step-debug them to see where they break), and the IDE is somewhat unstable too. Mac OS X compiles are also often defective.

It could be so much more, but isn't, which is a pity seeing what Windows users get with Delphi, and the same with Linux users and Kylix I assume.

I use REALbasic, and will continue to do so because I'm too lazy to learn C++, but will remain reserved in recommending it to anyone.

The good news is that you can download a 30-day trial copy from www.realbasic.com. See what you make of it.

- uilleann

Edit: Chiper, of ChiperSoft Systems, and who made the AthenaIRC IRC client for Mac OS in REALbasic, seems to feel I'm much too harsh on the program. Go download AthenaIRC if you like, see what can be done with REALbasic. To write apps in RB, you'll still want TBFinder, and a fondness for looking up Mac OS API (ToolBox) calls in C header files if you want to write anything large or do anything complex, though, which I still feel is a big weakness given that it's supposed to cross-compile. It will allegedly compile Windows API calls, but I've never tried. Download Athena, and REALbasic, and draw your own conclusions

IP: Logged

quantumfluff
Uber Geek

Posts: 897
From: under the mouse pad
Registered: Jun 2000

posted July 10, 2002 20:10     Click Here to See the Profile for quantumfluff   Click Here to Email quantumfluff     Edit/Delete Message   Reply w/Quote
I hate to revive old threads, but I just read this bit about the problems of computer language advocacy and I thought it was apropos. Besides, I give extra points to anyone who talks about drinking the Kool-Aid.

IP: Logged

Alien Investor
Assimilated

Posts: 408
From: New York City
Registered: Jan 2000

posted July 10, 2002 22:12     Click Here to See the Profile for Alien Investor   Click Here to Email Alien Investor     Edit/Delete Message   Reply w/Quote
Great article.

It applies to political discourse in my country, too. It's incredibly hard to get people in any camp to recognize any good points about the people and platforms of another camp.

IP: Logged

All times are Pacific Time

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Geek Culture Home Page

© 2002 Geek Culture® All Rights Reserved.

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.47e

homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam