Aces High Bulletin Board

General Forums => The O' Club => Topic started by: Nilsen on September 06, 2003, 01:33:12 PM

Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 01:33:12 PM
Ok

I have played with the idea of learning programming for a while.

Does anyone know a good source online for learning very basic programming. Preferably a site that can take you through the steps from very basic to more advanced.

Im not gonna go to school to learn it but i have plenty of free time.

Would be nice to get some ideas/hints/tips from sombody can program.

And again, i have NO knowlegde what so ever of programming now.
Title: Wanna learn programming
Post by: YUCCA on September 06, 2003, 03:01:29 PM
Computer programming? I think you have to be a bit more spedific than that.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 03:08:18 PM
Well, when you know as little as I do then its hard to get more spedific than that.

What my "end goal is" is  far down the line is to make programs that can do stuff for me....

one ex would be a program that can go online and find information to me using alot of search engines and deliver it to me sorted by date without going on every single one and doing the search manually.

Thats just one.
Title: Wanna learn programming
Post by: udet on September 06, 2003, 03:46:37 PM
learn C. everything else is for sissies.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 03:52:21 PM
Thx for that input Udet.. On another bbs i have been told to start with Java..

Guess that there are alot of different opinions on this subject.
Title: Wanna learn programming
Post by: straffo on September 06, 2003, 03:57:32 PM
It depend what you want to learn :)


If you want to learn state of the art methods and programing paradigms I would say : C++ or Java.

If you want to make some programs just for you and build them fast look at Visual Basic or perhaps VBNet


If you are balanced : Delphi  is great.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 04:02:52 PM
Ok, now I have 5 choises for language to start with :D

What would something like AH have been buildt in?
Title: Wanna learn programming
Post by: DmdMac on September 06, 2003, 04:16:03 PM
I have programmed computers since 1982 as a hobby, so with that in mind, let me ask you a few questions:

1. To what operating system do you have access? MS Windows does *not* include a compiler or interperator. You'll have to buy one.  A typical Linux distribution includes a plethora of compilers and interperators to include: Python, C/C++, TCL/Tk, Perl, Bash, Awk, assembly, and the list goes on.
2. How much can you spend? You can get Linux for as low as a few US dollars, but a respected compiler for MS Windows will cost you a couple hundred US dollars.
3. Are you looking at doing graphics programming?  Windows is keyed and tooled for that. Under Linux you'll need to learn programming X11(not a trivial task, but then neither is programming MS Windows nor programming in and of itself).

Did it for many years, and started to attend a local university for a Computer Science degree, until I began to work with computers professionally.  Then I got very put off and bored, so I chenged my pursuit.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 04:18:25 PM
hi DmdMac

1. I have access to OSX, linux and windows.

2. I have very little to spend if anything at all.

3. Dont know yet.
Title: Wanna learn programming
Post by: Animal on September 06, 2003, 04:18:28 PM
Well, your grammar sucks so you are already on your way to become a great programmer. Ask HiTech.
Title: Wanna learn programming
Post by: DmdMac on September 06, 2003, 04:20:25 PM
Quote
Originally posted by Nilsen10
hi DmdMac

1. I have access to OSX, linux and windows.

2. I have very little to spend if anything at all.

3. Dont know yet.


Stay with Linux. If you already have it, then it'll be the least expensive way of discovering if computer programming is something you like.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 04:20:28 PM
ROFL animal :D

English is not my first language so im bound to make mistakes :D
Title: Wanna learn programming
Post by: straffo on September 06, 2003, 04:29:33 PM
Quote
Originally posted by Nilsen10
Ok, now I have 5 choises for language to start with :D

What would something like AH have been buildt in?


I think AH is written in C (not sure it's C++) Hitech showed some (pretty tiny) parts of the code.


IMO the best choice would be Java if you can find some free IDE for your plateform
Title: Wanna learn programming
Post by: DmdMac on September 06, 2003, 04:30:56 PM
Ok, now to answer your original question, I don't know of any site that would be able to touch anything near what one or two good books will teach you. The problem is that programming is very detailed and extensive that a site would need to be a book in essence.
BUT! there is the programming forums and their related FAQs.  Often the FAQs will have a reading list and that is certainly one of the best places to start.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 04:31:03 PM
Thx Straffo, my platforms atm is WinXp and OSX :)
Title: Wanna learn programming
Post by: straffo on September 06, 2003, 04:49:00 PM
Found this (I've no idea of the quality ...)

http://jedit.sourceforge.net/
http://www.jcreator.com/

I tested JBuilder some 1 year ago it looked sexy but Java was not selected for any of our project so I didn't use it professionaly.

Concerning book I've allways been satisfied by Addison-Wesley books.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 04:57:46 PM
Thx again Straffo, ive bookmarked em and i will look at em when i get sober....

follow this thread:

http://www.hitechcreations.com/forums/showthread.php?s=&threadid=95568

:D
Title: Wanna learn programming
Post by: vorticon on September 06, 2003, 05:07:33 PM
if your interested in learning anything like c/c++ java etc...dont go near visual basic and its freinds...it'll just mess you up when you start looking at c/c++and there friends...


of course since visual basic can be learned and darn near mastered by a 8 year old its ok for beginners who dont want to do to much...
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 05:10:29 PM
So i really should stay away from visual basic if i dont wanna "cheat" but learn the "hard" way...

thx... i needed that cause i dont wanna take the easy way out, it will prolly hurt me in the long run. :)
Title: Wanna learn programming
Post by: Gadfly on September 06, 2003, 05:18:08 PM
Do you know boolean logic?  ASCII?  Can you define an array, a dimension or even a flag?

If you are a total newbie, get yourself some form of basic.  Learn that for concepts, then move up.  Probably take you 2-3 months of hard work to get the basics, then all the rest of your life to figure it out.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 05:24:07 PM
Yes, im 110% newb so anyone can fool me into trying anything cause i dont rally have a clue.

im devoted and i have the time to learn....thats it :)
Title: Wanna learn programming
Post by: Gadfly on September 06, 2003, 05:38:33 PM
I am not trying to fool you, but there are 2 kind of programming languages-structured and non structured.  I do not know why they teach it now(I learned on punch cards), but Basic is your best bet to learn the, well, basics.  That is, how to organise the code and the logic.  The only difference between basic and more advanced languages is the grammer, once you understand the concepts.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 05:41:38 PM
Rgr Gadfly, ill keep that in mind..

I rellay apreciate your input :)
Title: Wanna learn programming
Post by: Furious on September 06, 2003, 05:47:17 PM
You might find this page helpful.

http://www.gamedev.net/reference/start_here/

It is related to game programming, but the general information should be helpful.
Title: Wanna learn programming
Post by: Nilsen on September 06, 2003, 05:48:54 PM
Thx furious....im bookmarking everything here :)
Title: Wanna learn programming
Post by: ccvi on September 06, 2003, 06:24:27 PM
Quote
Originally posted by DmdMac
I have programmed computers since 1982 as a hobby, so with that in mind, let me ask you a few questions:

1. To what operating system do you have access? MS Windows does *not* include a compiler or interperator.


That's wrong for some windows versions. Qbasic is still there on many.
Title: Wanna learn programming
Post by: type_char on September 06, 2003, 06:28:15 PM
If your just going to learn one languge as a hobby and you run windows, learn Visual Basic.

Qbasic->Visual Basic (VB)
Title: Wanna learn programming
Post by: DmdMac on September 06, 2003, 09:01:55 PM
Quote
Originally posted by ccvi
That's wrong for some windows versions. Qbasic is still there on many.


I suppose if you run Windows 3.11 or earlier, but how many is that?  That's not very realistic for developed countries, and anyone that is still using 3.11 or earlier needs to look at legacyware, nothing modern.
Title: Wanna learn programming
Post by: Skuzzy on September 06, 2003, 09:39:01 PM
We use C.

Nice thing about C is the portability of the language.  Virtually every OS on the planet can use/has a C compiler.

The standard I/O library is virtually the same across all platforms as well.

The dev tools available for C are as good as they get.  No other language offers as much in this area.  Something pretty important to consider.
Java is too bloated and cumbersome for my taste.  It was not really meant to be used for stand alone programs.
Title: Wanna learn programming
Post by: Gadfly on September 06, 2003, 10:34:06 PM
C is probably what you will want to end up programming with, but to learn it cold?  I do not think it can be done.

Here is what I mean, this is a simple lil C++ section of code:

public class SqlPropertyDescriptor : PropertyDescriptor
{
  public static SqlPropertyDescriptor GetProperty(string name, Type sqlType)
  {
    Type baseType = sqlType.GetProperty("Value").PropertyType;
    ArrayList attribs = new ArrayList(TypeDescriptor.GetAttributes(baseType));
    Attribute[] attrs = (Attribute[])attribs.ToArray(typeof(Attribute));
    return new SqlPropertyDescriptor(name,attrs,sqlType,baseType);
  }

  private Type SqlType;
  private Type BaseType;

  protected SqlPropertyDescriptor( string name,Attribute[] attrs,
    Type sqlType, Type baseType ) : base(name,attrs)
  {
    SqlType = sqlType;
    BaseType = baseType;
  }

  ...

  public override void SetValue(object component,object value)
  {
    PropertyInfo pi = component.GetType().GetProperty(this.Name);
    Object o;
    if ( value == DBNull.Value )
    {
      o = component.GetType().GetField("Null", BindingFlags.Static
        | BindingFlags.Public | BindingFlags.GetField).GetValue(component);
    }
    else
    {
      o = pi.PropertyType.GetConstructo r(new Type[]{BaseType}).Invoke(
        new Object[]{value});
    }
    pi.SetValue(component,o, null);
  }

  public override object GetValue(object component)
  {
    object Property = component.GetType().GetProperty(this.Name).GetValue(
      component,null);

    if ( (bool)Property.GetType().GetProperty("IsNull").GetValue(Property,
        null) )
      return DBNull.Value;

    return Property.GetType().GetProperty("Value").GetValue(Property,null);
  }
}


Here is a simple lil piece of basic:


10 CLEAR 500
20 REM SET I/O AREA TO ENHANCED INSTRUCTION WORK AREA
30 POKE &HFFEF,&H00
40 REM DEFINE STRING & FILENAME FOR "OPEN" FUNCTION
50 A$="TEST.BAS"+CHR$(0): REM STRING MUST BE ZERO TERMINATED
60 REM DEFINE & SAVE ATTRIBUTES TO USE IN OPEN
70 REM CREATE FILE WITH READ & WRITE PERMISSION
80 POKE &HFFE4,&H01: POKE &HFFE5,&H80
90 REM SAVE STRING POINTER, MSB FIRST, LSB SECOND
100 POKE &HFFE2,&H02: POKE &HFFE3,&H41
110 A=VARPTR(A$)+2: POKE &HFFE0,PEEK(A): POKE &HFFE1,PEEK(A+1)
120 REM EXECUTE "OPEN" FUNCTION, IF SUCCESSFUL &HFFE4-&HFFE5 WILL CONTAIN FILE'S CHANNEL NUMBER
130 POKE &HFFEE,&H10: IF PEEK(&HFFEE)<>0 THEN GOTO 250
140 REM DEFINE BUFFER AND LOAD WITH DATA
150 A$="THIS FILE WAS WRITTEN FROM THE COCO EMULATOR"+CHR$(10)+CHR$(13)
160 REM SAVE BUFFER LENGTH
170 POKE &HFFE2,&H00: POKE &HFFE3,LEN(A$)
180 REM SAVE STRING POINTER, MSB FIRST, LSB SECOND
190 A=VARPTR(A$)+2: POKE &HFFE0,PEEK(A): POKE &HFFE1,PEEK(A+1)
200 REM EXECUTE "WRITE" FUNCTION
210 POKE &HFFEE,&H13: IF PEEK(&HFFEE)<>0 THEN GOTO 250
220 REM EXECUTE "CLOSE" FUNCTION
230 POKE &HFFEE,&H11: IF PEEK(&HFFEE)<>0 THEN GOTO 250
240 END
250 REM ERROR
260 PRINT "AN ERROR OCCURED"
270 END



Which do you think a total newbie to programming will be able to figure out, learn and apply?
Title: Wanna learn programming
Post by: Nilsen on September 07, 2003, 02:53:07 AM
Id say basic looked simpler, but i still have no clue what those lines means :D

Thx for all the info tonight.
Are any of these compilers or whatever you called em available for free/cheap?
Title: Wanna learn programming
Post by: Monk on September 07, 2003, 03:40:46 AM
This freakin thread makes my head hurt.
Title: Wanna learn programming
Post by: Nilsen on September 07, 2003, 04:14:13 AM
So does mine and not only cause i had a few to many yesterday.

Cant wait to try this stuff out :eek:
Title: Wanna learn programming
Post by: bigUC on September 07, 2003, 05:56:11 AM
Quote
Originally posted by Gadfly

30 POKE &HFFEF,&H00

Which do you think a total newbie to programming will be able to figure out, learn and apply? [/B]


1. Probably the code that has comments ;)
2. Hey!  Thats Commodore BASIC, isn't it?  Havent seen that in 15 years :-)
Title: Wanna learn programming
Post by: Skuzzy on September 07, 2003, 08:23:18 AM
Gadfly, that is not C, that is C++.  Very different.

C++ is indeed ugly.  C is much easier to read and debug, and will generally produce smaller and faster code.  I would not start with C++.  It is much more difficult than C for a beginning programmer.  I know C++, but never use it.  The code is just plain ugly to work with.

BASIC can teach you some bad habits as it is a very unstructured language.

Learning C is not that difficult.  You need a strong sense of logic or you will struggle.  But that is true of any lanuage.
Title: Wanna learn programming
Post by: Nilsen on September 07, 2003, 08:33:56 AM
So if i decide to go for C, i can use it for windows and OSX?

Is the software very expensive? Guess im looking for a c compiler now :D

Btw, found this website, anyone know if its good or do you know any better?

http://cplus.about.com/library/blctut.htm
Title: Wanna learn programming
Post by: Skuzzy on September 07, 2003, 08:49:10 AM
C can be used on any platform.  For Windows, the Visual Studio or just Visual C++ products can be used.   Not cheap, but pretty good products.

To program in C under Visual Studio, you just use the '.c' filename extension, instead of '.cpp'.

Makes it much easier to write code that is portable across all operating systems.
Title: Wanna learn programming
Post by: Pei on September 07, 2003, 08:52:37 AM
Quote
Originally posted by Skuzzy
Gadfly, that is not C, that is C++.  Very different.

C++ is indeed ugly.  C is much easier to read and debug, and will generally produce smaller and faster code.  I would not start with C++.  It is much more difficult than C for a beginning programmer.  I know C++, but never use it.  The code is just plain ugly to work with.


I have to disagree with you there: for complex projects I prefer C++: well designed and written C++ is much easier to deal with.
C too easily ends up as a long convoluted spaghettie of functions with little or no structure. But then I was brought up, so to speak, in the object orientated world. C++ is just a superset of C anyway (assuming you stick to ANSI standards) so the one leads to another.

Quote
Originally posted by Skuzzy

BASIC can teach you some bad habits as it is a very unstructured language.


I definitely agree with that: this also goes for M$ VisualBasic as well.

My advice: learn C (and then C++ :)) or Java. Which one depends on what you are trying to do. C/C++ are more computationally efficient, Java is generally easier and has lots of things already written for you. Programming languages are just tools: you pick the right one for the job - be careful of people who get fanatical about them!

My other piece of advice is this:
Learn to do all the tasks involved in writing a piece of software yourself, inlcuding compiling, linking, build files etc. Too many people start off using fancy development environments like JBuilder & Visual Studio  and then can't figure out how to get things work when they go wrong (or move to another environment).
Title: Wanna learn programming
Post by: Nilsen on September 07, 2003, 08:57:18 AM
My thought exactly Pei.....i wanna learn it all from scratch....

When making webpages i use dreamweaver, and i love it...BUT its kinda like cheating and i sometimes run into trouble cause i never bothered to get good at html.
Title: Wanna learn programming
Post by: ccvi on September 07, 2003, 09:02:17 AM
Quote
Originally posted by DmdMac
I suppose if you run Windows 3.11 or earlier, but how many is that?  That's not very realistic for developed countries, and anyone that is still using 3.11 or earlier needs to look at legacyware, nothing modern.


I've seen it on NT4 boxes.
Title: Wanna learn programming
Post by: Pei on September 07, 2003, 09:07:15 AM
Quote
Originally posted by Nilsen10
So if i decide to go for C, i can use it for windows and OSX?

Is the software very expensive? Guess im looking for a c compiler now :D

Btw, found this website, anyone know if its good or do you know any better?

http://cplus.about.com/library/blctut.htm


For a C compiler go to http://www.gnu.org/software/gcc/gcc.html and get GCC: it's free and available for many platforms (it is also a C++ compiler among other things but you don't need to worry about that). All you really need on top of that is a text editor: since Notepad is pretty awful I would  recommend TextPad or slightly more advanced tools such as SlickEdit or QuickEdit. Emacs has a good C mode but you might find that a little strange.

Also I recomend you get yourself a book: websites never have enough detail.
I used this one http://www.amazon.com/exec/obidos/tg/detail/-/0131103628/qid=1062943333/sr=1-3/ref=sr_1_3/103-3570035-6048640?v=glance&s=books (or at least the first edition of it).
Almost everyone learnt C from this book.

When you get stuck (and you will do) try posting on comp.lang.c or one of the other news groups: there are usually plenty of people willing to help a beginner.
Title: Wanna learn programming
Post by: Pei on September 07, 2003, 09:09:13 AM
Quote
Originally posted by Nilsen10
My thought exactly Pei.....i wanna learn it all from scratch....

When making webpages i use dreamweaver, and i love it...BUT its kinda like cheating and i sometimes run into trouble cause i never bothered to get good at html.


Yeah, dreamweaver produces some pretty horrible HTML!
Title: Wanna learn programming
Post by: ccvi on September 07, 2003, 09:17:03 AM
C or C++ is not a matter which is easier to read or learn. It's a different approach of programming (imperative vs. object oriented).

Object oriented programming does allow and even somewhat enforces more strucutred code in many cases. But when something needs to be done later that is not allowed by the structure it get's ugly. Also the compiler has a lot more difficult job to do, which results in less efficient code. The most important OOP features can be simulated in plain C, e.g. by adding function pointers to structures. But that's probably nothing to start learning with.
Title: Wanna learn programming
Post by: Skuzzy on September 07, 2003, 10:03:24 AM
Pei, operating systems are written in C, not C++.  This is just one example of highly complex code that is best written in C.

As far as structure, it is simpler to write structured code in C, but it is a discipline.  You can certainly write ugly code in any language.
C++ can also teach you bad memory management.  C forces you to understand memory management.  For a beginner, it is imperative they understand memory management.  C++ lets you get lazy in this area.
Where most beginners stumble concerns pointers.  Using C, it is easier to see how pointers are used.  C++ allows you to be lazy here as well.

C also wins hand down on efficiency, in terms of code execution speed as you have very specific control over parameters being used/passed in functions.

Coding up something that runs in Windows could be done faster in C++, but not always.
Title: Wanna learn programming
Post by: Tuomio on September 07, 2003, 01:34:22 PM
This is what i would do:

Buy a Java book for starters, minimun 300 pages, that INCLUDES Borland Jbuilder software. Good builder is the most important thing when you start to learn programming. Thats because you need good helpfile behind the F1 button and good info on the compiling errors.

Java is good, you can get pretty far with it, it also offers super good and huge help database in java.sun.com. Its discussion forums are invaluable when you start making progress with your skills, usually the first hit with the search has the solution for you. Most importantly, java offers good ways to make the learning progress fun.
Title: Wanna learn programming
Post by: TheManx on September 07, 2003, 01:40:00 PM
Here's a good link that I still use.

http://www.developer.com/ (http://www.developer.com/)

Also, it's probably best to start with a language where you can see quick results. That way you don't get frustrated. Two good examples would be Perl and PHP. Both are great fun to code in, and aren't too difficult to get the hang of. From there, Jump to C, then C++, then Java.

Knowing perl and php first will give you a definite headstart on C.
Title: Wanna learn programming
Post by: AKS\/\/ulfe on September 07, 2003, 02:53:39 PM
Java is something you use sparingly and in conjunction with another, or several other, languages.

For example: A well done webpage will use mostly html or one of it's derivitives while using very little Java since Java would be agonizingly slow to use all by itself.

Start with C, get really familiar with C to the point you will only need to look up a few variables or names to remind yourself- and get a good grasp on computer networking in order to do anything internet related.

I really wouldn't recommend using Java at all really, C can do it with a lot less overhead so long as you know what you are doing.

You can learn C on your own, most classes follow the same guidelines for teaching C that many C compliers come with. I bought MS Visual C++ 6.0, and it came with a Learning to Program in C instructional book. It's going to require a lot of dedication to learn it on your own, so it's really one of those things you have stick with it to really learn it.
-SW
Title: Wanna learn programming
Post by: udet on September 07, 2003, 05:16:39 PM
there's a free compiler called LCC, with an excellent interface, very easy to use. download it if you plan to code in C++
Title: Wanna learn programming
Post by: Tuomio on September 07, 2003, 05:44:46 PM
Quote
Originally posted by AKS\/\/ulfe
I really wouldn't recommend using Java at all really, C can do it with a lot less overhead so long as you know what you are doing.
 


Which is the problem itself. For writing something useful in C takes a lot study (not once, not twice but for months to come). If you REALLY want to be haxor, learn the assembly code, but its not fun at all, thats guaranteed. Unless you like to see how stupid the computer really is, its like teaching your dog to draw picture of you.

With C you'll end up playing with sources that other people made, usually not (wanting to) understanding how it does what it does. In Java you have these implemented from the start with interface and what it doesent include you dont need. Unless youre going for something big, which i dont recommend as a starter. You learn the programming structures and computers limitations with any programming language (well, maybe not the MS-DOS memory limits, but hey..). After you learn one its much much easier to go for another. If needed. Only reason i ever gave up QBasic for Java, was the lack of variable handling and timer functions. If its too big for the language its prolly too big for you too, unless you live from it.

Only showstopper you'll face in programming really is the lack of motivation, lack of coordination and messy code. If you can avoid these for years, you become very good programmer, no matter what language you use. After all, they utilize the same thing, Assembly.
Title: Wanna learn programming
Post by: DmdMac on September 07, 2003, 05:52:28 PM
Quote
Originally posted by straffo
Found this (I've no idea of the quality ...)

http://jedit.sourceforge.net/
http://www.jcreator.com/

I tested JBuilder some 1 year ago it looked sexy but Java was not selected for any of our project so I didn't use it professionaly.

Concerning book I've allways been satisfied by Addison-Wesley books.


The best editor for Linux has always been, and forever will be, Emacs. OS without end.  Amen.

JED works pretty decently also and since the script language is slang(similar in sytax to C) it is good for C programmers.
Title: Wanna learn programming
Post by: MrCoffee on September 07, 2003, 05:59:10 PM
Most real programmers know more than one language. I learned Basic in seventh grade then took advanced Basic  (lol) during the second semester. Then Pascal, Ansi C and C++ and the list goes on. If you learn Ansi C and you get it as your first language, you'll eventually learn more langauges since programing is one of those things that you either get or you dont. First language is the hardest. Once you have one language down, you'll want to learn another to augment. You'll never be a great C programmer if you dont know assembly. I'm not a great C programmer, havent written C in 8 years so Im rusty to say the least but I code in a bunch of other upper level languages because its more practical for what I do. I do read alot of C still at work when stuff breaks so knowing C is important in that regard.  I would recommend you only learn Qbasic if you want to get into VB. Havent dont any VB in over five years myself but its a cool language for a windows person.
Title: Wanna learn programming
Post by: ccvi on September 07, 2003, 07:22:46 PM
If you need a good editor, try nedit.

http://www.nedit.org/


One of the few editors that can do column-wise cut'n'paste :D
Title: Wanna learn programming
Post by: Pei on September 07, 2003, 07:26:04 PM
Quote
Originally posted by Skuzzy
Pei, operating systems are written in C, not C++.  This is just one example of highly complex code that is best written in C.

As far as structure, it is simpler to write structured code in C, but it is a discipline.  You can certainly write ugly code in any language.
C++ can also teach you bad memory management.  C forces you to understand memory management.  For a beginner, it is imperative they understand memory management.  C++ lets you get lazy in this area.
Where most beginners stumble concerns pointers.  Using C, it is easier to see how pointers are used.  C++ allows you to be lazy here as well.


I agree that you have to learn C thoroughly befor eyou move to C++, and I recognize that C is better for low level stuff, including OS and some of the network stuff, but lets face it most of us don't do that on any kind of a regular basis. And I also agree that you can write well structured C. Proffessionally I write large transactional business systems and I would hate to have a team write them in C. Properly written C++ with a well structured OO design is just so much better: these systems tend to be both very complex and need modifications on a regular basis (to meet the customer's changing needs).  Of course it's all based on personal preference, but very few business applications, packaged products or even games are written purely in C these days.

Quote

C also wins hand down on efficiency, in terms of code execution speed as you have very specific control over parameters being used/passed in functions.


Anything that is going to be highly CPU-bound is probably better off in C (one reason why OS kernels are usually written in C). When I was writing a lot of mathematical code I always used C as those kinds of programs are almost purely computational. But most programmers deal with programs that are I/O bound and so you won't see much performance difference between the two (unless you get heavily into C++ Virtual functions, Templates and other RTTI stuff). Memory is a different matter, but memory is much cheaper than programmer time these days so it's usually more efficient to sacrifice some memory efficiency for a system that  is less painful to deal with. It comes down to the right tool for the job.
Title: Wanna learn programming
Post by: DmdMac on September 07, 2003, 07:31:45 PM
Quote
Originally posted by MrCoffee
You'll never be a great C programmer if you dont know assembly.


This is not correct anymore.  Back about 10 years ago it probably was valid, but modern compilers have gotten much better at optimizing code because you can specify flags that target specific platforms.  The compiler is now likelier to write better asm code then the assembly programmer.


Quote

I would recommend you only learn Qbasic if you want to get into VB. Havent dont any VB in over five years myself but its a cool language for a windows person.


Granted it doesn't require much to get a functional program going, but I vote as many others in here. For C/C++.

Mac out
Title: Wanna learn programming
Post by: Nilsen on September 08, 2003, 02:57:23 AM
GCC something i can use?
Title: Wanna learn programming
Post by: Pei on September 08, 2003, 03:55:59 AM
Shold be: you will have to learn to use the windoze command prompt but it works fine.
Title: Wanna learn programming
Post by: Nilsen on September 08, 2003, 04:49:25 AM
Ok, ive decided to start with C and get GCC + some other aps + c for dummies :D and go from there....
Title: Wanna learn programming
Post by: Vulcan on September 08, 2003, 06:27:13 AM
mmmmm Prolog :D

Now theres a fun language.

Its like this BBS, Skuzzy writes rules, and we figure out how to bend em. Prolog's like that, you write a program then it does something totally unexpected :D ends up teaching you great logic flow though.