Server Help

Non-Subspace Related Coding - Learning C++...

Solid_Fire - Sun Jan 23, 2005 1:57 am
Post subject: Learning C++...
I just started reading a tutorial at www.cplusplus.com and try to learn it.

Can anyone give me some examples and tips on how to get better at this and how to create test program to make sure i understand and practice of that? i have Miracle C as a compiler. Any kind of help would be great.
Anonymous - Sun Jan 23, 2005 10:21 am
Post subject:
i tried learning C++, but i quit, its too complicated...good luck
Cyan~Fire - Sun Jan 23, 2005 11:21 am
Post subject:
The best way to learn a language is to make something in it. Just try thinking of some idea.

The material on that site is enough to learn in general. If you have sepcific questions, I'll be glad to answer them.
Solid_Fire - Sun Jan 23, 2005 2:18 pm
Post subject:
ok, first question i have is that i know "cout" is the output right? and when i do examples in Miracle C it gives me an error saying

Code: Show/Hide
Miracle C Compiler (r3.2), written by bts.
line   3: #include iostream.h ignored--file not found.
Compiling C:\Program Files\Miracle C\test.c
main

C:\Program Files\Miracle C\test.c: line 7: variable 'cout' not found
'<< "Hello World!"'
aborting compile


here is the example :

Code: Show/Hide
// my first program in C++

#include <iostream.h>

int main ()
{
  cout << "Hello World!";
  return 0;
}



I don't understand why it is saying that, maybe its the program im using?
Solo Ace - Sun Jan 23, 2005 2:33 pm
Post subject:
Your code is C++ indeed, but are you sure that "Miracle C Compiler" supports C++?
Also, you should let code files with C++ code in them have the extension .cpp.

I think it should be

Code: Show/Hide
#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World!";
  return 0;
}


or

Code: Show/Hide
#include <iostream>

int main ()
{
  std::cout << "Hello World!";
  return 0;
}


but this would burn Ek's eyes.

For a decent and free IDE with a compiler supporting C++ (I think it uses MingW or something) try Bloodshed Dev-C++.
Mr Ekted - Sun Jan 23, 2005 2:36 pm
Post subject:
It already has. I am typing blind now...

If you want to learn C++ forget iostreams. Learn C first. That will give you syntax, data structures, etc. Then learn OOP concepts after.
D1st0rt - Sun Jan 23, 2005 2:41 pm
Post subject:
Code: Show/Hide
#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Hello World!");
    return 0;
}


like that?

edit: GAH, wrong import (thats what you get for writing java programs)
Solo Ace - Sun Jan 23, 2005 2:46 pm
Post subject:
N0b.
Quote:
helloworld.cpp(5) : error C3861: 'printf': identifier not found, even with argument-dependent lookup


#include <stdio.h>

sa_tongue.gif
Solo Ace - Sun Jan 23, 2005 3:13 pm
Post subject:
Hey Ek, read my uber Qndre-style code.

Code: Show/Hide
#include <windows.h>

int main(int argc, char *argv[])
{
   system("echo Hello World!");
   return 0;
}

Cyan~Fire - Sun Jan 23, 2005 3:13 pm
Post subject:
What did you have before? "import Java.lang;"? sa_tongue.gif

Bah! Stupid replies before I reply!

No, Qndre style code would be

Code: Show/Hide
#include <string>

class MyApp : CWinApp
{
private:
   static char hello_world = "Hello world!";
};

MyApp myapp;

BOOL MyApp::InitInstance()
{
   string mystring("echo ");
   mystring += "hello_world;

   system(mystring);

   return TRUE;
}


Hmm, I wonder if I remembered my MFC correctly...
Solid_Fire - Sun Jan 23, 2005 5:24 pm
Post subject:
ok, so can someone write out an example program so i can practice it and learn the basics of a C++ and C program?

PLus, i tried DL bloodshed and i use Windows ME, not Win 98,95 or XP (if it runs XP)

So i tried looking for Visual Basic, but didnt know if it was for C++ or for something else. Said Service Pack 6.

I'll keep looking for more C++ Compilers that are easy to work with.


(20-10 Eagles Winning YEA)
Solo Ace - Sun Jan 23, 2005 5:42 pm
Post subject:
Lies, that'd be 2hard4qndre, and the concept is the same anyway. sa_tongue.gif

Just download Bloodshed's Dev-C++ for Win95/98, ME almost is the same anyway.
Visual Basic is not for C++, please forget that name NOW.
If you really can't work with Dev-C++ get Microsoft Visual C++, it's good but not free though (for something that is free, check this thread).

You don't have many good options left if you give up on Dev-C++/MS VC++.

I never thought I'd recommend this site, many of the "code" sucks, just like most of the "programmers" (well, most don't deserve that title), anyway, Planet Sourcecode is some dump for newbies to show their code.
The "programs" there are mostly small, although most (yes, in this paragraph is the most used word is most) of the code is hard to read without restyling it.
Please, don't become one of them, don't put comments like "SUCK MY ... SCRIPTKIDIEZZ!!! cuz u CANT DO THIS IN VB LOlOloL!!" on top of your documents.

Also, on the website you found your tutorial, cplusplus.com are a few small example programs.

As Cyan said before in this thread, the best way to learn is just by trying to create something.
Start by trying to make something small, try to fix it for a while and when you can't figure something out, feel free to post your questions here.

I tried to start by reading the cplusplus.com tutorial, but since it was in English, and since I never saw any C++ code before, it was too vague. Just by trying to make programs, reading other's code and asking for help taught me more.
D1st0rt - Sun Jan 23, 2005 5:57 pm
Post subject:
Qndre style: http://quotes.ssforum.net/index.php?216

cyan: I had stdlib icon_rolleyes.gif
Mr Ekted - Sun Jan 23, 2005 7:56 pm
Post subject:
LOL @ EVERYTHING! Good times.
myke - Sun Jan 23, 2005 8:20 pm
Post subject:
http://petra.hos.u-szeged.hu/~aking/www.parinya.ca/

mingw developer studio, uses mingw and less bugs than dev-cpp
Animate Dreams - Mon May 15, 2006 12:23 am
Post subject:
You know, I may not be the best person to help people with programming, but if you're having problems with learning to program from that website like I did, I would suggest buying a C++ book. They can be kinda expensive, so I'd suggest buying one used off of Amazon or something. I personally had a hard time trying to learn from websites. What Cyan said is definitely right, if you don't work with the language, you aren't going to remember it. I got through 400 pages of my C++ book and was into all kinds of things, and I can't even remember the names anymore.
I would suggest either Sam's Teach Yourself C++ In 21 Days by Jesse Liberty, or Ivor Horton's book, I think it's called Beginning C++. The Sam's book may be written by someone else now, since I think my version (fourth edition) is slightly old. Ivor Horton's book is probably a bit harder, but any idiot should be able to understand both, it spells it out pretty cleanly. Although, if I'm the spokesman for these books, it probably doesn't mean much. =x They are both very thorough, though, and you wouldn't be disappointed with them.
Bak - Mon May 15, 2006 2:03 am
Post subject:
can you get a program compiling?
Smong - Mon May 15, 2006 4:27 am
Post subject:
Moved thread from "ASSS Custom Projects" to "Non-Subspace Related Coding" since it didn't metion asss once (unitl now of course).
D1st0rt - Tue May 16, 2006 12:43 pm
Post subject:
Am I the only one that noticed the ridiculous bump? (Tipped off by the Qndre references)
Dr Brain - Tue May 16, 2006 10:28 pm
Post subject:
Not the only one... but I just figured MGB would delete the posts and any reply I made commenting on it would just end up deleted.
CypherJF - Thu May 25, 2006 1:12 pm
Post subject:
imho, this is a much better C++ learning site than cplusplus.com ...

http://www.ibiblio.org/obp/thinkCS/cpp/english/
Mr Ekted - Thu May 25, 2006 1:24 pm
Post subject:
That site sucks.
Doc Flabby - Fri May 26, 2006 3:36 pm
Post subject:
if u like the m$ option u can get microsoft c++ express here (its free)

http://msdn.microsoft.com/vstudio/express/visualc/

If you are making windows apps (not console) you would do well to download the windows SDK as well.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

I have found Dev-C++ much much easier to use than c++ express and visual c 6 but im a noob at c and c++ i havnt written anything over like 20 lines.

All the online "lessons" i've seen in c++ teach you the essentials of programming (which is the same for all languages) but not how to code in c++. I think the only way i will ever learn is if force myself to code some stuff in it, but c# is so easy - especailly with all those managed libs icon_smile.gif[/b]
SamHughes - Tue May 30, 2006 9:21 pm
Post subject:
Ekted, why do you hate iostreams?
Dr Brain - Tue May 30, 2006 9:33 pm
Post subject:
Because he has a mistaken view of how it works (link).

Mr Ekted wrote:
Use of iostreams and strings = more CPU cycles = more heat on whatever processor you choose.


At least, thats the reason he gives. I expect he actually had a bad experience and is taking the trauma out on us icon_smile.gif

NOTE: not spellchecked
Mr Ekted - Wed May 31, 2006 7:32 am
Post subject:
SamHughes wrote:
Ekted, why do you hate iostreams?


I don't hate iostreams. I hate any beginner C/C++ instruction that uses ANY sort of encapsulation. The most important things to learn on day 1 are the fundamental concepts of code, data, heap, stack, memory, interpretation, etc. Giving a brand new user crap like:

String s = "Hello world."

or:

cout << "My name is: " << name;

These are doing too much without explaining what is going on. There are those who feel that you should hit the ground running. I say this is how you create a programmer with no clue (ie 95% of programmers). If I taught an intro programming class at a college, the first month would be no coding at all. Create a class full of people who can debug--who understand how things are laid out--who, when they learn coding syntax, can understand what is happening underneath.

This is also the flaw of teaching Java to beginners. There IS no underneath. You learn that you can do things any way you want, and that you don't even have to care about data types and heap, because the Java system does all that for you. If you choose one way of implementation over another, you have no basis for knowing if it's 10x more complex. Java is all "magic" underneath. That's like saying, "Let's not try to understand the Universe; that's God's job." This is a bullshit attitude, and one that programmers should not have ever.
Cerium - Wed May 31, 2006 8:50 am
Post subject:
Im not saying youre wrong, or that I even disagree. I think you are being a bit of a purist though.

There are lots of 'programmers' out there who dont know (or care) what the runtime stack is, or why using ++var can be more efficient than var++, but thanks to the tools written by code nazis like yourself, they can write useful software just the same. The downside though, is it also allows for tardos like quan to write malicious piles of shit for a few girl-like giggles.

I guess the learning path can be looked at two ways. Learning to program with a high level language like VB or Java is certainly easy, but it will probably take longer to completely understand whats going on, while learning the low level stuff is harder, but once thats finished, learning the high level structures is nothing more than a translation.


blah, blah, blah... Im tired, and I dont feel like proofreading this stupid post.
Mr Ekted - Wed May 31, 2006 9:00 am
Post subject:
Cerium wrote:
Learning to program with a high level language like VB or Java is certainly easy, but it will probably take longer to completely understand whats going on...


The point is that if you learn VB or Java or C++ (using iostreams) as your first foray into programming then you will NEVER understand what is going on. You will happily and blindly write mediocre code. When it doesn't work right (or crashes, etc) you will be helpless. You will seek out someone (like me) who will laugh at you. Writing code in VB or Java is like asking someone how to make a hamburger, and them answering, "I go to McDonald's."
Cyan~Fire - Wed May 31, 2006 11:58 am
Post subject:
Ekted wrote:
The point is that if you learn VB or Java or C++ (using iostreams) as your first foray into programming then you will NEVER understand what is going on.


Not true. I started with VB. (Don't worry, I already attempted suicide.) I moved on to C++ with iostreams and... MFC. (Don't worry, I attempted suicide again.) And now I use the standard non-iostream i/o stuff and native Win32 API. It's not a one-way path.

Now, although it would be nice if all programmers knew how ASM works before they know how their high-level language works, I think it just makes it harder. Requiring that is like saying you have to understand quantum mechanics before you can learn standard mechanics. Which is easier for the beginner physics student to learn? Standard mechanics, of course, but I'd like to see the physics course that doesn't go on to teach them quantum.

Likewise, I think an introductory CS course should introduce students to CS with the easy programming, so they get a general idea of what goes on, and then later in the same course they should be taught what's happening behind-the-scenes.

Lol.
Mr Ekted - Wed May 31, 2006 1:55 pm
Post subject:
Funny link. icon_smile.gif
Cerium - Wed May 31, 2006 4:53 pm
Post subject:
Ekted, that ability to debug libraries/programs the user didnt write is generally what weeds out the programmers from the script kiddies (or whatever the hell you want to call them). As long as they recognize and understand their own faults and dont try to claim to be something theyre not, I dont see where the problem is.

People like them make people like you worth that much more money.
Mr Ekted - Wed May 31, 2006 11:09 pm
Post subject:
Cerium wrote:
People like them make people like you worth that much more money.


LOL! But I'd rather have more peers than more money. Knowing that you have to do something all by yourself if you want it to work, when there are 20 other unqualified people around you, sucks. Or knowing that everything they write you are going to have to rewrite.
Dr Brain - Thu Jun 01, 2006 12:14 am
Post subject:
Ekted, as a programmer, do you understand every part of the computer?

Things involved in printing a message to the screen (not comprehensive, just off the top of my head):

assembly
the cpu pipeline
the operating system
the complete x86 architecture
the graphics system
the monitor timing parameters
register transfers
register design from descrete logic gates
boolean logic and gate level circuit design
transistors that make up the gates
the semicondutor physics that determine the operation of the transistors
the electromagnetic physics that underlays all electronics
the grand unified theory of everything

And thats just local to the computer. Imagine how complex it gets with networking.

My point is that no matter what, you can't know everything, and when it comes right down to it, you don't need to. Encapsulation is always there, and I think it's better to use it early. I don't need to know how the magnetic particles are arranged on the disk platters to write a program that reads a config file. Things are always going on behind the scenes, and thats not a bad thing. You are a big advocate of not sharing code, which is encapsulation at an extreme.
Mr Ekted - Thu Jun 01, 2006 8:34 am
Post subject:
You are right. But I believe there is an objective set of knowledge that any programmer should know. That includes:

C (or any other language that translates roughly to ASM)
basic assembly
the operating system API you are using
general x86 architecture (or whatever machine you are on)
organization of code/data/heap/stack in a process
physical/logical data structures
binary/hex, boolean login

And possibly some of what I call Information Theory, although the term is generally used to mean something else. I use it to mean data organization, efficiency, redundancy, and integrity. I suppose it overlaps quite a bit with database concepts, but is not restricted to them.

I have nothing against Java (et al) as a language, per se. It is fantastic for teaching OO concepts and getting something up and running quickly. I am just against using it as a starting point for beginners. It makes you a lazy programmer. Of course, lazy programmers do stupid things in C as well...
Dr Brain - Thu Jun 01, 2006 12:07 pm
Post subject:
I would agree that that list is indeed helpful to know, but it isn't necessary to program perfectly acceptable applications. A programmer can learn them as needed rather than requiring them beforehand.

There are two reasons that I think Java is a good starting point:


The original issue was iostreams doing things behind your back. I would agree that it does these things, but the source is there for anyone that wants to know. As a programmer, I don't care how something works as long as it does in fact work (as a person I do, but that's just curiosity). I also do not believe that learning iostreams first has any impact on learning a printf variant later.
Doc Flabby - Thu Jun 01, 2006 2:42 pm
Post subject:
Mr Ekted wrote:


These are doing too much without explaining what is going on. There are those who feel that you should hit the ground running. I say this is how you create a programmer with no clue (ie 95% of programmers). If I taught an intro programming class at a college, the first month would be no coding at all. Create a class full of people who can debug--who understand how things are laid out--who, when they learn coding syntax, can understand what is happening underneath.



I would genuinly pay alot of ££££ to go to attend class like that. Trying to find a decent c++ course is next to impossible, i think because of the few people acctually can code in c or c++ well, even less want to be paid the mediocre wage to teach it...when they can earn far far more in the marketplace.

Mr Ekted wrote:


This is also the flaw of teaching Java to beginners. There IS no underneath. You learn that you can do things any way you want, and that you don't even have to care about data types and heap, because the Java system does all that for you. If you choose one way of implementation over another, you have no basis for knowing if it's 10x more complex. Java is all "magic" underneath. That's like saying, "Let's not try to understand the Universe; that's God's job." This is a bullshit attitude, and one that programmers should not have ever.


Stangly vb6 (not .net) brings you closer to the operating system on windows than java or c# and many many people say vb developers are newbs, my best vb achievement (so far) was converting a (very poorly coded even by vb standards) ftp client so it was truly multithreaded on vb6 (its easier on vb5). And before people say its impossible to multithread in vb it isnt tongue.gif

But as i started to learn about COM etc etc i started to realise how little i acctually knew about how windows works...If i had coded in java or c#/vb.net i wouldnt even be aware of this...
Cerium - Thu Jun 01, 2006 10:53 pm
Post subject:
Why would anyone say anything about threadding not being possible in VB? They raved about the possiblity of threading when the 'addressof' keyword was added in VB5.
Not to mention, there were also other objects and .ocx utilities which could provide similar behavior.
Mr Ekted - Fri Jun 02, 2006 10:01 am
Post subject:
As long as you can call the Windows API--which you can in VB--you can do anything.
Bak - Fri Jun 02, 2006 10:58 am
Post subject:
the windows API sucks. ok I said it
Write((HANDLE)FD_STDOUT, (LPSTR)"hello world", (DWORD)11, 0, 0, CHARSET_ASCII, NULL, 0, 0, 0, WINNT_32, NULL, (SecurityContext*)NULL, 0, 0, DO_NOTHING_ON_ERROR, NULL, 0, 0, 0);

98% of the time it's not STL or wrappers or even C++ causing a program to run like crap (not even if it's an STL wrapper written in C++), it's poor design or a poor use of whatever tools you chose to use. As you said before, lazy programmers do stupid things in C, even though you can't pass objects on the stack like in C++. A programmer who knows the concepts you mentioned isn't going to fall into obvious traps with C++ or Java, but he may increase speed of development while decreasing bugs. I'd pick STL's linked list class over a C equivalent any day; the effect on performance is negligable and I'll never forget the free the memory.
Mr Ekted - Fri Jun 02, 2006 12:43 pm
Post subject:
Bak wrote:
...even though you can't pass objects on the stack like in C++...


This is one of the most horrible things about C++. Not that you CAN, but just that people who can, WILL.

Code: Show/Hide
String Function (String s)
{
String ret;

// do something

return (ret);
}


Do you know how incredibly stupid this type of code is? Do you know how incredibly inefficient is it?

Calling the funciton creates a new copy of the string (alloc). Another string is created on the stack and manipulated (alloc). When it is returned by the function, yet another copy has to be made so that the stack can be cleaned up (alloc). And then when the assignment is made with the functions return value, if the new string is longer than the old one, another alloc occurs. Using wrappers like this because you are lazy is stupid!
SamHughes - Fri Jun 02, 2006 7:40 pm
Post subject:
Mr Ekted wrote:
The point is that if you learn VB or Java or C++ (using iostreams) as your first foray into programming then you will NEVER understand what is going on.


Why do you make blatantly incorrect statements like this?
Mr Ekted - Fri Jun 02, 2006 11:35 pm
Post subject:
SamHughes wrote:
Why do you make blatantly incorrect statements like this?


Explain to me then, for example, how you would learn about what kind of memory allocation Java does when you do: int i = 1;
Cerium - Sat Jun 03, 2006 12:34 am
Post subject:
First, the JVM allocates 15mb of memory, then, the value 1 is stored in 16 random bytes (for encryption!).

When your program reads the data stored in i, the JVM detonates 18 tons of C4 located near the core of the planet, killing all humanity.
Solo Ace - Sat Jun 03, 2006 2:15 am
Post subject:
Dude, I gotta learn Java then.
Dr Brain - Sat Jun 03, 2006 8:31 am
Post subject:
Mr Ekted wrote:
[..]



Explain to me then, for example, how you would learn about what kind of memory allocation Java does when you do: int i = 1;


Explain why you need to know. It's useless info unless you're a JVM programmer.
Cyan~Fire - Sat Jun 03, 2006 9:50 am
Post subject:
It's like global warming. Humans basically had no clue what they were doing for ages, and now it's all come crashing down. Now I know the same sort of thing isn't going to happen in computer programming, but it's the principle.

I can totally sympathize with Ekted (as I'm sure you all know). How many of you find the absolutely cheapest place to buy gasoline around you, even if the difference is a couple cents? I do, despite the fact that I'll gladly spend 6871 cents on a new CPU. It's all about the value of things. Using huge amounts of resources is fine as long as I'm benefiting it. Using huge amouts of resources on, say, a string parsing routine is crap.
Mr Ekted - Sat Jun 03, 2006 9:52 am
Post subject:
Dr Brain wrote:
Explain why you need to know.


Thank you for proving my point.
Dr Brain - Sat Jun 03, 2006 10:03 am
Post subject:
Mr Ekted wrote:
[..]



Thank you for proving my point.


In Java, there is no user accessable memory, so it does a programmer 0 good to know the internals of the JVM. Doesn't even help for debugging.
SamHughes - Sat Jun 03, 2006 10:37 am
Post subject:
Mr Ekted wrote:
Explain to me then, for example, how you would learn about what kind of memory allocation Java does when you do: int i = 1;


You could either learn assembly language later on, or you could just use a little bit of logic on what type of datastructure you would use to represent the stack of procedure calls and their variables, if you were writing an implementation or compiler of Java.
Mr Ekted - Sat Jun 03, 2006 3:19 pm
Post subject:
SamHughes wrote:
You could either learn assembly language later on...


Exactly. Learning Java doesn't get you 1 inch down the road to fundamental knowledge. So you will always have to "start from scratch" if you will even EVER try after learning to write cheap and dirty apps.
Mine GO BOOM - Sat Jun 03, 2006 10:42 pm
Post subject:
Mr Ekted wrote:
Exactly. Learning Java doesn't get you 1 inch down the road to fundamental knowledge.

Normally, I'd agree with you, especially about Java. But it can have its place, and as long as you had a good teacher, you can learn the fundamentals of programming: algorithms. Being able to optimize the code is only a small part of being a good programmer.

That said, I think Java is good at what it does, work on many platforms and allows code to be developed quickly.
Dr Brain - Sun Jun 04, 2006 12:21 am
Post subject:
Mr Ekted wrote:
Exactly. Learning Java doesn't get you 1 inch down the road to fundamental knowledge. So you will always have to "start from scratch" if you will even EVER try after learning to write cheap and dirty apps.


I guess we have different goals. Assembly is a tool, not the ultimate language. As I've already stated, the principals Java conveys are very important. It's not a big step from Java to C++, where they can learn all about the hells of passing objects by value, copy constructors, and the almighty buffer overflows.
Doc Flabby - Sun Jun 04, 2006 6:59 am
Post subject:
Cerium wrote:
Why would anyone say anything about threadding not being possible in VB? They raved about the possiblity of threading when the 'addressof' keyword was added in VB5.
Not to mention, there were also other objects and .ocx utilities which could provide similar behavior.


But have you ever tried do it tongue.gif

Its easier in vb5 - multithreading acctually works how it is meant to, microsoft broke the "easy" way that used AddressOf and CreateProcess API in vb6 .


I think the leap from java to c++ is massive. Java requires next to zero knowlege of how the computer works. a java program should work the same whatever computer you run it on (that was the whole idea of java!). The entire opeating system is hidden from you. The principals you learn in java can be learnt from any oo language.

Now for alot of crappy apps this doesnt matter alot, they get the job done icon_smile.gif However when you need high performance then understanding how the computer and OS interact and works becomes important as how else are you going to identify bottlenecks.

Find me a high performance game that is coded in java. They simpley dont exist even though the education ssytem has been churing out litterally thoursands of java programmers. If you want to work in game dev (except on mobile phones) like I do you need to learn c++ end of story.
Mr Ekted - Sun Jun 04, 2006 11:30 am
Post subject:
Dr Brain wrote:
...and the almighty buffer overflows.


You know what kind of person you wall up so they can't hurt themselves? It's called a child.
Dr Brain - Sun Jun 04, 2006 7:35 pm
Post subject:
I'm not saying it shouldn't be a problem. I'm saying it is.
Mr Ekted - Sun Jun 04, 2006 7:50 pm
Post subject:
Either you let a programmer do anything, or you hold their hand and police them. You clearly prefer the latter. I look both ways before crossing the street.
Dr Brain - Sun Jun 04, 2006 8:46 pm
Post subject:
Mr Ekted wrote:
Either you let a programmer do anything, or you hold their hand and police them. You clearly prefer the latter. I look both ways before crossing the street.


I'm not advocating keeping programmers in the sandbox forever. I'm saying that they need to stay there long enough to learn the basics. Maybe you look both ways, but new programmers don't, and I don't want to be the one to hit them.
Cerium - Mon Jun 05, 2006 2:25 am
Post subject:
Awesome, four "child" references in a row. I believe there is another reference to a board game from 20 years ago that can go here, but I cant seem to find it.

Anyway...
Doc Flabby wrote:
But have you ever tried do it tongue.gif


Yes, as a matter of fact, I have. Its akward because of how addressof works (as opposed to how it SHOULD work). It feels like it was thrown in as a last minute addon to work with some of the winAPI calls that require a pointer to a function.

Doc Flabby wrote:
Its easier in vb5 - multithreading acctually works how it is meant to, microsoft broke the "easy" way that used AddressOf and CreateProcess API in vb6 .


Wouldnt know. I havent (seriously) used VB since before VB6 was released.
Bak - Mon Jun 05, 2006 3:25 am
Post subject:
is VB interpretted or something? It seems like they took the worse parts of both C++ and Java and combined them into a single language: VB
Anonymous - Tue Jun 06, 2006 12:11 pm
Post subject:
VB (Visual Basic) is based on BASIC (later QBASIC)

Not to be confused with VB.net which is idential to c# except its syntax is more verbose...

VB is older than java.
VB is not truly object orientated unlike c++ and java.

VB compiles to native windows code, but it can be interpreted for debugging.

Why do i like vb?

Because i can program a quick and dirty app in 30mins that will work on any windows machine without needing a "framework" or "run-time enviroment" ie 20mb of downloads.

Why do i hate vb?

Has stange quirks tongue.gif
If a program gets large the code gets hard to organise.
Memory leaks
Cerium - Tue Jun 06, 2006 12:57 pm
Post subject:
*ahem*

MSVBVM#.dll
.NET Framework
Animate Dreams - Tue Jul 18, 2006 11:37 am
Post subject:
Erm, I think some of you are turning this into a debate of which languages are better... but I'm sure we all know that different languages have different purposes. For example, I hate Java, but it's the ideal client for simple web programs. For example the one I play Go on: http://kgs.kiseido.com . I'm glad they use a Java client, I can't imagine anything else working so well. I've used other online Go and Chess clients, many of them in other languages, and they've all sucked. Granted, a lot of it was just design issues, but I'm sure the creator of KGS learned a lot of his program design when he learned Java.

When it comes to actually learning programming, Ekted's ideas may be the best way to "grow" a programmer... I've said before learning this stuff would be a lot easier if I'd learned everything from the ground up, starting with resistors and lightbulbs. Trying to learn things from the top down is annoying at best, because it's usually not obvious where to go next. But I can't agree with saying learning those things in a classroom setting is a bad idea. I mean, I can't personally imagine sitting through a college programming course for a whole month and not having anything to show for it. I don't know anyone who knows how to program well at all who didn't learn by actually trying to program, and there aren't going to be any beginning programmers who are going to do everything right. It's true that starting off learning C++ strings is going to leave the student confused, but the teacher can just tell him where to look next.

I certainly wouldn't want to learn assembly as my first programming language. Learning C++ has made my first coding attempts buggy, inefficient, and safe. I haven't crashed or frozen any computers, and haven't evoked the BSOD. And when I pass the code along to an experienced programmer, it doesn't take him any work to see what I did wrong and to correct it for me, with comments to show me the right way. As I learn more, I'm starting to prefer C over C++, and I can certainly see why you'd want to start learning at a lower level... I mean, seriously, I don't think anyone should try to understand multiple inheritance at an implementation level unless they've got a ton of experience. But at the same time, object orientation concepts can be learned fully without learning any programming, and I don't see how anyone could think learning it, at any level, could be bad.

A lot of programmers like to learn everything by themselves, but that' a lot different from actually having a teacher. I personally think all teachers, regardless of the language being taught, should teach object orientation from the beginning. A good teacher would make sure the student was never stuck, and wasn't learning any bad programming practices. For the student, it's a lot better to learn int i = 1; and then learn what it means. For a teacher to explain the fundamentals of even a statement as simple as that and then expect the student to be able to regurgitate it and use it flawlessly from there on out is absurd. But at the same time, to force large chunks of programming down a student's throat and expect them to understand the basics behind them isn't going to work, either. In Electronics, no one starts with Solid-State, but no one starts with the theories behind voltage and current, either. People learn circuits... basic circuits, and basic theory. As they learn more, they understand more of the concepts as they need to know it, and they learn about more components, and more complex circuits, etc. There are certain things every coder needs to know, but they can't learn it all at once, and order doesn't change the outcome, does it? SamHughes made the remark he did because it's dumb to say you will never learn in the future because of what you've learned in the past. I've seen a lot of programmers get their start by making webpages, and I don't think any of us would say that's a good start for programming. But they had good teachers who could always tell them where to look next.

Basically, what I'm trying to say is there really isn't any great way to learn to program. There are "dangers" that come with choosing one style of learning over another, but that's just up to the teacher to deal with, right? Nothing you learn will prohibit you from learning the rest, so you might as well start with what seems interesting/useful to you.

P.S. - This is what part of the alphabet would look like if Q and R were eliminated.
And also, the reason this post is so long is because I'm at work, and I'm bored... and I kept coming back to it over a couple hours.
Dr Brain - Tue Jul 18, 2006 12:46 pm
Post subject:
Too long for me to read the whole thing, but what I did read sounds like you don't know what you're talking about.

And you bumped a 6 month old topic.
Contempt+ - Tue Jul 18, 2006 4:36 pm
Post subject:
Dr Brain wrote:
And you bumped a 6 month old topic.

No, he didn't. June was only 1 month ago.
MGBF wrote:
Tue Jun 06, 2006 12:57 pm

Dr Brain - Tue Jul 18, 2006 5:06 pm
Post subject:
My mistake. I read Jan. It's still a needless bump.
Cyan~Fire - Tue Jul 18, 2006 10:53 pm
Post subject:
Lightbulbs are resistors, silly!
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group