View Full Version : start programming?!?
killingspree
3rd September 2002, 13:19
what language/ compiler etc would you (more or less) experienced programmers recommend to a noob who's only got some very, very basic skills in VB and Pascal to start some more serious programming.
thx
steVe
Guest
3rd September 2002, 14:08
Microsoft Visual C++.
avih
3rd September 2002, 16:32
or if you can't get hold of the msvc package, you can try the freeware devcpp which includes an ide and compiler (mingw) and able to produce windows binaries. get it from http://www.bloodshed.net
killingspree
4th September 2002, 08:47
well i think i can get my hands on ms visual c++ since my dad's working with it (:
do you know any free or cheap online tutorials, guides or anything like that that can help learning?
Guest
5th September 2002, 00:54
Buy a book. Do it the old fashioned way!
killingspree
5th September 2002, 08:42
well you know for the usual high school student, a $50+ book isn't just something you buy for fun. especially if you live outside the u.s. and actually don't want to rely on translated books since these books are often full of translation mistakes...
anyway i guess i'll see what amazon has got for me there!
any recommendations?
thx
steVe
alexnoe
6th September 2002, 12:37
I don't think C++ is good for beginners. It allows too weird constructions.
I first learn gw-basic, then pascal, then assembler, and then delphi (which is nearly the same as pascal) and the last was c++.
Problem with c++ is that things as
for (int i=0;i<lpDAI->dwNbrOfAudioStreams;qwNanoSecNeeded[i++]+=lpDAI->dwPreload*1000000);
cause some "newbies" to get scared.
I'd recommend Delphi.
killingspree
6th September 2002, 14:56
well i think your nice line here could've confused me if i hadn't already 'peaked' into c++. i admit it's definitely not the easiest way to start programming, but i doubt if it makes sense to learn at least two or three other languages before learning the language you really need.
what do you guys thin about c? is it easier to learn than c++? i've heard it still has a lot of similarities with c++!
steVe
killingspree
6th September 2002, 15:04
Originally posted by alexnoe
for (int i=0;i<lpDAI->dwNbrOfAudioStreams;qwNanoSecNeeded[i++]+=lpDAI->dwPreload*1000000);
i don't understand everything but quite a lot of it is becomeing clear if you look at it closely:
int: is i think an integer variable i is the name and you set it equal to zero! pls correct me if i'm wrong!
with i<lpDAI you compare two values somehow: something like if i is smaller than lpDAI then...
dwNbrOfAudioStreams and gwNanoSecNeeded are functions i 'guess'
and [i++] means: take i and ad the value 1
about the next few carracters: i got no clue
and dwPreload*1000000 : you take the constant times one million!
_______
conclusion: NONE!!
steVe
PS: or is there one?? :-P
[Toff]
6th September 2002, 15:15
You can rewrite this code in a more readable way.
for (int i=0; i < lpDAI->dwNbrOfAudioStreams; i=i+1)
{
qwNanoSecNeeded[i] = qwNanoSecNeeded[i] + lpDAI->dwPreload*1000000;
}
dwNbrOfAudioStreams is a field in a class or a struct.
qwNanoSecNeeded can be an array or a class.
But in all language you can write some weird thing, and obfuscate your code.
C, Pascal, and Basic are all procedural language.
C++, Java, Delphi are procedural and object oriented.
Lisp, Scheme ... are functional language.
If you know one language of the list you can easily write in every langage in the list.
C++ is an object oriented version of C. So it will be best to first learn C, then learn C++.
avih
6th September 2002, 15:30
c is simpler than c++. c and c++ syntax is nearly identical (same goes for java btw).
but, as mentioned before, c++ and java introduces the object oriented programming.
i say start with c for a short while, just to get familiar with the sintax (let's say, a week), and then start learning c++.
just mho though ;)
alexnoe
6th September 2002, 15:31
My goal was that Delphi is more suiteable.
It allows to program everything (except multi-inheritance), but won't allow strange things as what I posted.
You must clearly distinguish between "learning programming" (learn basic algortihms how to solve certain problems, learn how to get ideas of how to solve a problem) and "learning a language" (learn the syntax). I have first learnt "programming" using Pascal. And after that, I started to learn different languages...
stax76
6th September 2002, 15:39
I suggest a .NET language or MS C++, depends on the task
mpucoder
6th September 2002, 17:20
The real question is what is your objective? If you want to earn a living at it, then you MUST learn C and C++. If you just want to write some programs for yourself, and get them working faster, then try VB (but most people frown on VB applications, myself included - I never seem to have the correct runtime for any app I download)
If you actually want to know how a computer works (which is partially hidden by all "high level" languages, and totally hidden by object oriented languages) then learn assembler.
Regardless of your choice, I wish more people would learn assembler first. Too many programmers that I run into have no clue how a computer works, and, therefore, what programming techniques help the compiler produce better code.
And this may sound anti-MS, but stay away from MFC and .NET if you want portability. I don't need to explain the obvious desire of Microsoft to hook you on their OS dependant libraries.
alexnoe
6th September 2002, 17:25
Regardless of your choice, I wish more people would learn assembler first.
Wouldn't make sense.
Lets take an example. This is some code from my RGB->YUV conversion:
push edx
pxor mm7, mm7
punpcklbw mm0, mm7
punpcklbw mm1, mm7
movq mm2, mm0
movq mm3, mm1
movq qwTemp, mm2
lea edx, qwY0
movq mm4, [edx]
pmaddwd mm0, mm4
pmaddwd mm1, mm4
pshufw mm4, mm0, 04Eh
pshufw mm5, mm1, 04Eh
paddd mm0, mm4
paddd mm1, mm5
psrld mm0, 7
psrld mm1, 7
lea edx, qwU64
movq mm4, [edx]
pmaddwd mm2, mm4
movq mm6, mm3
pmaddwd mm6, mm4
pavgw mm2, mm6
pshufw mm4, mm2, 04Eh
paddd mm2, mm4
psrld mm2, 7
mov edx, 128
movd mm5, edx
paddd mm2, mm5
lea edx, qwV64
movq mm4, [edx]
pmaddwd mm3, mm4
movq mm6, qwTemp
pmaddwd mm6, mm4
pavgw mm3, mm6
pshufw mm4, mm3, 04Eh
paddd mm3, mm4
psrld mm3, 7
paddd mm3, mm5
pop edx
pop eax
jmp eax
And now say again that a newbie shall learn this first!
[Toff]
6th September 2002, 17:28
:D
where is my aspirine ?
killingspree
6th September 2002, 17:43
Originally posted by avih
i say start with c for a short while, just to get familiar with the sintax (let's say, a week), and then start learning c++.
a week?? ahm this is probably if you're not doing anything but learn the language?! am i right?
well i guess i'll start with c though... i have no real desire to learn pascal first; and i really don't know anything about delphi!
oh yea... and assembly: i'm not crazy?? i mean i've looked at some when getting a very very little bit into cracking... but it's absoulutely no language i want to learn... not now for sure...
no offence though!
thanks for all your help guys!
book recommendations would still be greatly appreciated!
regards
steVe
alexnoe
6th September 2002, 17:49
You must learn assembly if you want to call yourself a "programmer" (my humble opinion), but it should not be the first language.
Assembler is easy because it only has some 400 instructions for current CPUs, it's only difficult to assemble them to functions that do something senseful.
If you want to go straight forward to C++, then do that. But I can't and I won't recommend this.
mpucoder
6th September 2002, 17:50
No, I did not mean that a newbie should learn to do a transform in assembler as a first step. Only that they should learn the basics of assembly language programming. Enough to know the major components of the processor (and enough to know the difference between ret and pop eax/jmp eax - are you trying to prevent cache from being discarded?) That way I think I'd see fewer programs with class-granularity too fine, because the programmers would realize the cost involved with procedure/class invocation. Fewer programs with too many case statements (I saw one yesterday with 4 cases of a 2-bit field, each one set another variable to a constant which was exactly twice the value of the case).
alexnoe
6th September 2002, 17:55
I made it because MASM somehow did crap with ret without "proc", and when I made it a "proc", then MASM created a silly "push ebp; mov ebp,esp", which is not necessary here. So I made this way just to prevent MASM from any further attempt to "think".
This MMX using conversion is btw more than 10x faster than what i got out of c++. And more is possible on Pentium 4 when using 128-bit-MMX.
mpucoder
6th September 2002, 17:59
We may not agree on the order in which to learn the languages, but we do agree - you are not a programmer if you do not know assembler.
Did you know that most major universities in America no longer teach assembler? I asked a grad student at UMass about the teaching of assembler, and he asked me "what is that?"
Maybe I think more highly of assembler since I spend most of my time programming microprocessors (now you know what MPUCoder means). C is used there, but not very much - at least not in time-critical or space critical programs.
mpucoder
6th September 2002, 18:03
Was that Masm 7? I have it but haven't used it yet. From the looks of it, I would need to rewrite a lot, since I use proc sometimes in the middle of another proc (alternate entry points) and for local procs like yours.
alexnoe
6th September 2002, 18:10
MASM 6.15, which is integrated in Visual Studio 6 if you upgrade to Service Pack 5 and install "Processor Pack".
People now think "we have 3 GHz CPUs. Why optimize programs..."
I don't know about US, but in Germany, it's very bad: Students get more and more stupid. More and more people try to study computer science "because you can earn money". Instead of throwing 60% of them out after one year (in making "Algorithmen und Programmierung" an exam instead of a "Schein", which would mean that you only have 1 additional chance if you fail), they stay...and stay...and study...and stay...
[Toff]
6th September 2002, 18:14
Yes a modern programmer should know the java bytecode ;)
mpucoder
6th September 2002, 18:21
Just checked (my memory for version numbers is not always good) I have 6.15 - I don't think there is a 7, is there?
Back to the subject of the thread. You'll probably get the most satisfaction in a Windows world, and video specifically, using C/C++. (but, please look at assembler sometime in life)
killingspree
6th September 2002, 18:38
well...
i'm definitly going to stay in the windows enviroment...
but before i become a 'professionall programmer' i'll have a closer look at asembly and i'm interested in java anyway so i'll get to know the language sometime anyway...
but to start i'll probably start in c... since OOP is really probably a little too much for the beginning!
regards
steVe
edit:
PS: regarding the situation at european/ german universities i just want to say it's pretty much the same in austria... two thirds of all students drop out after 2 or 3 years just because they get a well paid job offer.
Koepi
6th September 2002, 18:49
I don't have the link, but "C++ in 21 Tagen" is online at... markt&media for free.
I also recommand "C++ für Dummies" (it's really called that way and here at our university that's the teaching foundation for starting with c++! ).
Those books are relatively cheap and really help to build your first c++, then MFC programs. And after that there's the horrible win32 API...
And then you can look into ASM. Do it the proper way.
And just to make sure, this is again nothing personal or anything against you as you sure will think I somehow treat you like a dumb. I don't. I once more try to help you here.
Regards,
Koepi
EDIT:
it's here:
http://www.mut.de/media/buecher/VCPLUS6/data/start.htm
and, it's "Markt&Technik", I forgot the name :)
EDIT2:
http://www.amazon.de/exec/obidos/ASIN/3826628624/ref=pd_sxp_elt_l1/302-9342720-8255265
Unofrortunately this book is more expensive than I thought. But you can get it "2nd hand", too, you don't necessarily need the latest version.
killingspree
7th September 2002, 08:27
well thanks...
why do you think that...
just because the book is named c++ for dummies??
well anyway... sorry if i've been a little too picky the last days... just tried to stop smoking... :(
anyway... thanks for the links!
steVe
edit: @koepi: ohh... i forgot... the books don't have to be german! so if you know any english books that you consider better, please tell me! thx
Nic
7th September 2002, 10:02
@killingspree:
Look up the english versions: "C++ for dummies" & "C++ in 21 days" :)
I still remember the first programs I wrote in C...great days but a wasted youth :D
-Nic
ps
My old Uni now doesn't even teach C in the first year, but Java instead! (doesnt even touch on assembly now)
killingspree
7th September 2002, 13:22
i've already looked up visual c++ for dummies! But it is about 7 more expensive!
but still one of the cheaper books!
steVe
Guest
7th September 2002, 16:04
When it comes to buying books don't penny pinch! What is a few bucks here and there for something that can make an entire very lucrative life-long career for you!? Think about it.
[Toff]
7th September 2002, 16:20
i've already looked up visual c++ for dummies!
IMO you should learn "C++" and not "Visual C++".
It's better to buy a book which is independant of your developpement environnement.
The Link
7th September 2002, 17:26
I started reading tutorials on C++ to learn object oriented programming (I just learnt Modula2 at university). Because I hadnīt the time to get really into it I soon stopped. For me it was hard to get used to the syntax and so I didnīt really get an impression of how object oriented programming works.
Some weeks ago I started a second try with python and I was really surprised how simple coding can be. After a few days I got a feeling for the syntax and I found a good (for me) tutorial on OOP in python. Now I even understand C++ code a little bit because there are many similarities.
This is just a proposal and I admit that Iīm not a programmer as (almost?) all others in this thread are! If Iīm just talking shit please let me know :) .
Regards,
The Link
stax76
7th September 2002, 17:47
I also suggest to by a book, but until you have the book, check out this link
http://www.computer-literatur.de/buecher/Programmiersprachen_nachTitel.html#C/C++/C#
there are german and english books and tutorials, online books not zipped you can download using this offline reader (http://www.maximumsoft.com/) , I've got it as adware, I don't know if there is a completly free alternative
Koepi
7th September 2002, 17:58
Do yourself a favor and concentrate on "real" programming languages first. If you know them, you can start playing with python (*caugh* sorry, a language for script kiddies IMHO) or c# (visual basic like c++/java mix - not good for starters, too).
Just my oppinion, I know that we have some people here swearing on c# and visual basic.
Regards,
Koepi
alexnoe
7th September 2002, 19:40
Visual Basic doesn't even support the definition of callback functions. It has not even an integrated assembler.
I can't see any use in Visual Basic, I can't even call it a "language". It is even incapable of making standalone exe files. It even uses ActiveX crap for simple buttons instead of standard windows elements. => :Z (someone should add support for the Z smiley from cdfreaks! I like it...). Even worse: It uses call-by-reference as its standard sub call method.
In my opinion can nobody who has some non-newbie knowledge on programming "swear" on Visual Basic or similar kindergarten niveau languages.
stax76
7th September 2002, 20:16
2alexnoe
you are not up to date, VB is a .NET language nowadays and the language don't matter in .NET, you can even mix it all up. You should learn about .NET because .NET will be the most important software platform in the future. Didn't you notice that the most Microsoft languages are only available for the .NET platform and that Delphi will also be .NET
The Link
8th September 2002, 00:37
Do yourself a favor and concentrate on "real" programming languages first.
Yes, I agree. But if this first programming language wasnīt C and you want to learn OOP, I think Python is a very good step in between because it fully supports OOP and you get much easier into it.
If you know them, you can start playing with python (*caugh* sorry, a language for script kiddies IMHO)...
I donīt share your point of view about python at all. It definetly is a scripting language but also much more than that: "It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC)." (qutoted from the python site www.python.org)
I think that you always choose the programming language which suits the task and I admit that for most projects on this board C or C++ is the programming language of choice.
Regards,
The Link
dragongodz
8th September 2002, 12:32
sorry but i have to comment.
to those saying you are not a real programmer unless you know asm, do you know how offensive that is ? so all those people out there writing in c++ etc arent real programmers ? i pat the people out there on the back for making an effort. i know a little asm (enough to have some idea of whats happening but thats about all :) ) but i see no need to use it unless its for time/speed critical operations. for something like a simple gui there is no need at all.
as for .net ..... hmm programming languages where you need a 20 meg runtime.... no thanks i'll pass.
stax76
8th September 2002, 13:11
the .NET Framework is 20 MB, but the Common Language Runtime is only a part of the Framework, another major part of the 20 MB Framework is the .NET Framework class library, as far as I know the best class library on this planet. That's why .NET programs are real small, as far as I know a few times smaller than MFC/VCL programs
alexnoe
8th September 2002, 14:17
you are not up to date,
Ups.
Here, we always say "VB" if we refer to Visual Basic... :(
mpucoder
8th September 2002, 16:14
The statement about not being a real programmer unless you know asm is an opinion. One that is not shared by a great number of professionals, who justify their lack of knowledge of the language by pointing out how much money they make. Making money is nice (I did a lot of that myself), but understanding the machine you use to do so can only enrich the experience of programming.
Too many "programmers" know and use only one language. They, therefore, do not even know if another language might be a better choice for a given program. They just use the only language they know. Quite often breaking into asm is appropriate and necessary to make a program operate (especially true in the world of time-critical control systems).
The good news (for me) is that very few programmers can make that switch, and that's when they call for someone like me. This may irritate some of the readers in poorer nations, but I get $125/hr plus expenses for those calls.
Belgabor
8th September 2002, 21:01
I'm completely mpucoder's opinion. A pro programmer should know assembler. But like someone said before, ppl have fast cpu's and lots of hd space anyways, so why should anyone bother to program properly? Let's use pseudo programming languages like VB and C#. Let's make users d/l 20 Mb crap for slower apps. It runs like a snail on your PII266 you paid a lot for only a few years ago? Why don't you spend the same money on a modern processor which will be as slow with the crap imposed on us in two years?
I'm sorry for this rant, but thats my opinion. I too think .NET is the future, but it's a thing of utter disgust for me. .NET (as well as VB) is a big step backwards to the league of GW-Basic.
This is not to annoy hobby programmers who put a lot of efford into their stuff in thier free time, i really appreciate the work of those, but anyone who gets money for programming should use proper programming languages and style.
Well, i could go on and on 'cause this detoriation in all leagues really annoys me (hey, let's do the beta test with those who buy or program first!), but I dont want to bore you and me ranting wont help anything, so I'll stop now.
Cheers
Belgabor
P.S: To the topic, I'm a happy Delphi guy (no, i dont call myself a real programmer ;)). If you know pascal and want to do GUI apps fast & easy thats your way (and it produces real progra[ranting block engaged]
alexnoe
8th September 2002, 22:19
but anyone who gets money for programming should use proper programming languages and style.
Define "proper style"
I'm sure some people would call using multi-inheritance (is it call this way in english?) an improper style...
BTW: I tested my whole DirectDraw stuff in Delphi first...I also like Delphi for some tasks. But I just know 2 more languages and can select the one which is most suitable for the job I intend.
stax76
8th September 2002, 23:06
I wonder why everybody talking bad on .NET, I want to find out now what's so bad about it. There is a 20 MB download with a runtime and a class library and because of the runtime .NET programs are in most cases slower than C++ and Delphi. I think I will ask in a newsgroup why the runtime is so important
Emp3r0r
9th September 2002, 07:41
everyone talks bad about .NET because it is new and unproven. just wait till they start downloading C++ or Delphi programs that require the .NET runtime... then they might begin to understand what the hoopla is about. BTW, they have me learning assembly (x86 based) @ Auburn University in my curriculum. They've taught me C (can't remember it at all), java, scheme (i wanted to kill myself over that language) and now C++. Anyway, some simple C# programs can already run on either Linux or Windows.
killingspree
9th September 2002, 09:19
Originally posted by mpucoder
One that is not shared by a great number of professionals, who justify their lack of knowledge of the language by pointing out how much money they make.
@mpucoder: well my opinion is that money doesn't make a (good) professional programmer!
@all: nice discussion i got going here! i got quite a lot of information in here! go on! and thanks for all your help!
the programming community is definitely a very good and strong one and i'm eager to join it :-P
alexnoe
9th September 2002, 09:27
@mpucoder: well my opinion is that money doesn't make a (good) professional programmer!
You're right, but his knowledge is obviously wanted and people ware willing to pay lots of money for it...bad thing about this is that his knowledge on assembler shouldn't be rare, but it is :(
Belgabor
9th September 2002, 10:39
Originally posted by alexnoe
Define "proper style"
I'm sure some people would call using multi-inheritance (is it call this way in english?) an improper style...
Sorry, I was imprecise on that. What I meant was coding fast (release wise) instead of coding properly (fast running code, small exe).
BTW: I tested my whole DirectDraw stuff in Delphi first...I also like Delphi for some tasks. But I just know 2 more languages and can select the one which is most suitable for the job I intend.
Yes, thats exactly what imho makes a good programmer, choose the way appropriate for the job at hand (no, i dont expect anyone to write a gui in assembler ;))
Originally posted by Dolemite
I wonder why everybody talking bad on .NET, I want to find out now what's so bad about it. There is a 20 MB download with a runtime and a class library and because of the runtime .NET programs are in most cases slower than C++ and Delphi. I think I will ask in a newsgroup why the runtime is so important
Easy to answer. C# is no real compiler. It doesnt compile to code understandable by the cpu, it compiles (like java) to a byte code which is interpreted by the runtimes (exactly like VB programs (at least the old ones which need the vbXXXX.dll runtimes i learned to hate right from the start)). Visual C++ with MFC isnt really that much better, thats why i prefer Delphi (which is available free for non-profit use btw).
Cheers
Belgabor
Belgabor
9th September 2002, 10:58
Originally posted by Emp3r0r
everyone talks bad about .NET because it is new and unproven.
Well, my reasons are pretty clear I hope. But I'll stop complaining if they make it a real modern programming language by providing a real compiler and get rid of the necessity of a 20Mb runtime. So no, I'm not talking bad because its new, its because its design as interpreted language is OLD and imho bad!
just wait till they start downloading C++ or Delphi programs that require the .NET runtime...
Like I said before, MAY EVERYTHING THAT'S GOOD PREVENT THIS FROM EVER HAPPENING!!! I will NEVER even consider paying money for stuff needing .NET runtimes.
Anyway, some simple C# programs can already run on either Linux or Windows.
Ok, so even its crossplatform workability doesn't hold true if only simple programs work. Well, that might get better, but imho cross-platform compatibility should be on code, not on executable level (at least for standalone programs. Webapplets are a diffrent case).
I don't like (and for one exeption don't use) java programs (in contrast to applets) either. That will change asa we got a real compiler.
Cheers
Belgabor
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.