Stop Microsoft

Miscellaneous => Programming & Networking => Topic started by: Calum on 28 March 2002, 19:34

Title: Basic Programming for an utter novice.
Post by: Calum on 28 March 2002, 19:34
I am an utter novice when it comes to anything involving typing stuff that a computer will then read and try to make sense of. I have dabbled for a long time, but i am still at the stage where i need to get in there, do the stuff, and get out quick in case i mess something up, and if i can follow a tutorial letter for letter, so much the better.
Where this is leading is, i want to expand my field of knowledge so that i am comfortable with all the things i might need in a possible future career in system admin/system upkeep/something to do with systems.
I will need to familiarise myself with different hardware (no bother) and learn about a variety of existing systems (i'm on it) and probably learn some programming languages and how to use them (uuuuuuhhhh... <stony silence>  ;)  
So what languages will i need to learn, to what degree, and how?
I went to The Codesters Site (http://www.codesters.com/download.php?op=viewdownload&cid=2)and downloaded one of Bruce Eckel's books, he seems to get good reviews.
Also i found this Introduction to C++ (http://www.lysator.liu.se/c/bwk-tutor.html#goto) by B. Kernighan, which looks like a good jump in point...

I am a bit out of my depth here though,
is it all as daunting as it seems?
do i have to learn Perl, C, Java et c et c, or are there one or two i should learn, and then pick and choose as i like?
How much do i actually have to learn anyway? i'm not planning on ever being a pioneer program developer (although maybe it would be good to have another string to the old bow   ;)   ) so do i need such a thorough knowledge of these languages?
i reckon i have a lot of good stuff on that Codesters site, but i always think it's worth asking you guys because when i ask a question here i tend to get a gem of an answer after a lot of fruitless searching around online (less fruitless thanks to Google (http://www.google.com/linux)) and i thought you guys could help me avoid any wrong turnings and dead ends i may be about to make...

thanks a lot in advance for any replies that may appear here!

[ March 28, 2002: Message edited by: Calum ]

Title: Basic Programming for an utter novice.
Post by: voidmain on 28 March 2002, 23:15
It's not really important that you learn any one prior to any other, however, you can't go wrong by knowing cross platform languages such as C, C++, and Perl.  Perl would probably be the easiest starting point since it does not have to be compiled to run your code. It's not strongly typed, and it's easy to install and get started (it's likely already installed on your Linux box and you can download the Windows version from www.activestate.com (http://www.activestate.com)).

[ March 28, 2002: Message edited by: VoidMain ]

Title: Basic Programming for an utter novice.
Post by: badkarma on 28 March 2002, 23:27
Learning a programming language is quite easy when you know how to program.

When you are learning how to program however the language choice is quite important, some languages will teach you some bad habits.

I'd recommend learning c/c++, then most other programming languages are quite easy to learn (well, maybe except for assembler but I can't imagine you'd be interested in that). However I would recom mend to not spend too much time with C (just learn the basic syntax and write a few simple programs) and learn C++ because it will offer you a lot better tools to write cleaner code (and when you *ever* do *anything* remotely related to programming cleaner code is a must, and C has the tendency to sometimes be not so clean). Furthermore I don't think anybody has ever learned to program without looking at or toying with code from other people. A good exercise is to take a small simple program, heavily commented and study it, remove all the comments from the code and write the comments yourself.

When you think you have the basics covered and want some more in depth information the
C-faq (http://www.eskimo.com/~scs/C-faq/top.html) and the C++-faq (http://www.parashift.com/c++-faq-lite/) are unmissable sources.

good luck, and if you ever want to dabble with OpenGL game programming send me a PM  ;)
Title: Basic Programming for an utter novice.
Post by: Centurian on 29 March 2002, 00:07
Hey,

Personally C/C++ code looks like a chicken walked around on my screen for about an hour. I would rather write 1000 lines of ASM code than write 50 lines of chicken track code to do the same job.
However C/C++ are highly cross-platform compatible. Further C/C++ is extremely powerful. (almost as powerful as ASM) so I would have to recommend it to anyone who is learning to program.

First I would suggest you learn Pascal. It is also cross-platform compatible and you can use inline ASM code if you wish. With Pascal you can learn all the principles of coding. It is quite fast and powerful. For Linux there is GPC (GNU Pascal Compiler) if you want to go that route.

But eventually you should learn C/C++ also. (shudders) Not knowing C/C++ would be a serious deterant to any serious programming career choice.
Title: Basic Programming for an utter novice.
Post by: badkarma on 29 March 2002, 00:51
quote:
Originally posted by Centurian:
Hey,

I would rather write 1000 lines of ASM code than write 50 lines of chicken track code to do the same job.


And I would rather maintain tens of thousands of lines C++ code (which probably isn't even written by myself) then the same program in assembler.

 (http://smile.gif)
Title: Basic Programming for an utter novice.
Post by: voidmain on 29 March 2002, 02:34
Naw, I changed my mind. Calum, you should learn COBOL. Second choice would be FORTRAN.   (http://smile.gif)   I actually spent a few years as a FORTRAN programmer. I hear the future is going to be in COBOL though.   (http://smile.gif)

[ March 28, 2002: Message edited by: VoidMain ]

Title: Basic Programming for an utter novice.
Post by: psyjax on 29 March 2002, 03:11
quote:
Originally posted by VoidMain:
Naw, I changed my mind. Calum, you should learn COBOL. Second choice would be FORTRAN.    (http://smile.gif)    I actually spent a few years as a FORTRAN programmer. I hear the future is going to be in COBOL though.    (http://smile.gif)  

[ March 28, 2002: Message edited by: VoidMain ]



Arent COBOL and FORTRAN dead? I have seen FORTRAN programms on punchcards  :D .

And as far as C/C++  I would go with C all the way. I don't know about cleaner code, C to me flows alot more elegantly and simply than C++ . For the type of programming I do, It makes little diffrence what language I use so I just stick with what comes naturaly, and C is very natural and intuative once you work at it.
Title: Basic Programming for an utter novice.
Post by: voidmain on 29 March 2002, 03:29
I don't know of too many places doing new development in COBOL but it was huge, and there are still many 20 year old COBOL mainframe apps doing key financial business. I think Y2K gave a lot of companies a way to get rid of much of their COBOL. I learned it in programming school but I realized at the time that I learned it that I would certainly never use it (I had already been programming in other languages for years before that). I actually sort of like FORTRAN.  I worked in a weather/scientific shop and FORTRAN is really good for that sort of stuff.

[ March 28, 2002: Message edited by: VoidMain ]

Title: Basic Programming for an utter novice.
Post by: Centurian on 29 March 2002, 06:17
Hey BadKarma,

 
quote:
Originally posted by BadKarma:


And I would rather maintain tens of thousands of lines C++ code (which probably isn't even written by myself) then the same program in assembler.

  (http://smile.gif)  



HEHEH Yep whatever works for us.  (http://smile.gif)


VoidMain,

I know you were joking and I also know your a purist with regard to C/C++ but it is funny you should mention Fortran and COBOL. About a year ago I was at a friends house and he was telling me about the great new programming languages he had just gotten. Turned out they were Fortran and COBOL for windows. He was particularly into COBOL (the wordy language). I laughed all the way home that day.  (http://smile.gif)

Actually Fortran is extremely powerful. You can do damn near anything with it. It is great for scientific programming but also nice for graphics and even supports pretty decent database handling.
Title: Basic Programming for an utter novice.
Post by: voidmain on 29 March 2002, 07:41
COBOL is *extremely* wordy. Their attempt was to create a language that really wouldn't require a "programmer" but that secretaries could even use. Don't believe it quite reached that goal but all I know is, I hate it. I don't know about graphics in FORTRAN as all of my programming in FORTRAN was done on a mainframe green screen. We did use a lot of data from DB2 databases (huge amounts of data), however the power is in the math.  The FORTRAN math library is probably better than any other language. And I found it to be a very easy language to learn.  

I did do a certain amount of Assembler on PCs back in the old days. I really liked Turbo Assembler. I thought it was much better than MASM. But I too would rather program in C any day of the week. It was fun to dabble with and I believe that anyone who wants "Engineer" to be part of their job title in computers, ASM should be a prereq. You really get an understanding about how computers work (processor/RAM/disk) when you learn ASM.  And it really helps you in all other languages. And you can even read a Dr Watson message in Winders and be able to better point a finger at a troublesome app. I just recently pinpointed a problem in a large accounting app (running under NT/Citrix) and was able to then ask the developer very pointed questions regarding our problem. This allowed them to pinpoint the "bug" in their application and provide us with a fix very quickly.
Title: Basic Programming for an utter novice.
Post by: Centurian on 29 March 2002, 21:00
Hey,

I never cared for COBOL either. I can still remember spending half and hour compiling one small program on an 8088 in COBOL.

Fortran now is a very different story. Its inherent math abilities make it great for doing graphics as well as almost anything. All graphics are based on math anyway. As an example Sierra's first few games were made in Fortran.

Assembly is kind of fun. I used to avoid it because of what everyone had said about it. Then when I got Turbo Pascal 7.0 I began writing inline assembler to increase the speed of certain  functions. Next thing I knew there was more inline asm in my code than pascal.  (http://smile.gif)
I do have to agree a knowledge of assembler can be very useful.
Title: Basic Programming for an utter novice.
Post by: jtpenrod on 29 March 2002, 10:10
Here is what I would do.
First off, give Python a try. Like BASIC, this is an interpreted language, so you get to see your mistakes as soon as they occur. The syntax is simple and clean, unlike Perl code, which tends to become rather arcane. Python is also object oriented, and that's definitely a good thing to learn. Not only that, but Python is something you can really use; unlike BASIC, it's not just something you learn with before moving on. And it has the advantage of using C-like syntax, so that C and C++ won't look completely foreign when you pick that up. As a related topic of exploration, you should also consider UNIX shell programming
 (see:Introduction: BASH Programming (http://www.linuxdoc.org/HOWTO/Bash-Prog-Intro-HOWTO.html) and Adv BASH Programming (http://www.linuxdoc.org/HOWTO/ADV-Bash-Scr-HOWTO/index.html))

Next, definitely learn C and C++. This is important as the lion's share of modern apps are written with it. It really isn't as hard as some folks make it out to be. One excellent resource here is: C++ In Plain English by Brian Overland. This book is something you'll want to keep around as it's not only a C++ tutorial, but also a reference on all the keywords and functions. And it's well-written and the explanations are easy to follow. Once you've gotten this far, throwing Java into the mix really shouldn't be too difficult. Linux has some great programming aids for developing apps with graphical front-ends: Qt, Glade, and FOX. They're all free and probably available with most Linux distros.

You should consider Perl as it's often used as a "glue" language to connect C and C++ modules together into complete apps. Also, consider picking up some HTML. Not particularly difficult, and it can prove useful.
_______________________________

Powered by Mandrake Linux and Freedom
Computers are like air conditioners: they can't do their jobs if you open windows
(http://www.otakupc.com/etsig/dolphin.gif)

[ March 29, 2002: Message edited by: jtpenrod ]

[ October 06, 2002: Message edited by: jtpenrod ]

Title: Basic Programming for an utter novice.
Post by: foobar on 29 March 2002, 22:13
Assuming you have linux,

what really helped for me was to get a C or C++ book from  the library, create my own programming dir (like ~/programming), make an executable file named 'compile' and in that file was a syntax calling gcc to compile a certain file and provide all the nessicary option. Then use your favorite editor (heard vim was super, because of the syntax highlighting, but i use joe   :D  )
to edit your C or C++ code, and pop up another terminal to run the 'compile' prog after you have saved your try-outs.

It worked for me, kinda, but hope it helps you.
Title: Basic Programming for an utter novice.
Post by: badkarma on 29 March 2002, 23:39
quote:
Originally posted by -=f00bar=-:
Assuming you have linux,

what really helped for me was to get a C or C++ book from  the library, create my own programming dir (like ~/programming), make an executable file named 'compile' and in that file was a syntax calling gcc to compile a certain file and provide all the nessicary option. Then use your favorite editor (heard vim was super, because of the syntax highlighting, but i use joe    :D   )
to edit your C or C++ code, and pop up another terminal to run the 'compile' prog after you have saved your try-outs.

It worked for me, kinda, but hope it helps you.




Errm ... you ever heard of makefiles?

You can even use the autoconf/automake tools to make a configure script

check this link for more details:

ftp://ftp.ugcs.caltech.edu/pub/elef/autotools/toolsmanual.html (http://ftp://ftp.ugcs.caltech.edu/pub/elef/autotools/toolsmanual.html)
Title: Basic Programming for an utter novice.
Post by: psyjax on 29 March 2002, 23:55
Hey now, no need to be sarcastic, your motto is:

If you can't learn to do something well, learn to enjoy doing it poorly.

 :D
Title: Basic Programming for an utter novice.
Post by: Kintaro on 31 March 2002, 19:32
quote:
Originally posted by BadKarma:


And I would rather maintain tens of thousands of lines C++ code (which probably isn't even written by myself) then the same program in assembler.

  (http://smile.gif)  


I'd rather maintain 10000 lines of Machine Code thru
the front panel switches of a PDP-7!

Well, not realy, it just came to mind!
Title: Basic Programming for an utter novice.
Post by: Centurian on 31 March 2002, 23:55
Hey,

 
quote:
Originally posted by X11:

I'd rather maintain 10000 lines of Machine Code thru
the front panel switches of a PDP-7!

Well, not realy, it just came to mind!




HEHEH now that's an extremist.
Title: Basic Programming for an utter novice.
Post by: Calum on 1 April 2002, 02:26
that's toptastic, folks, thanks for all that!
i know you were joking voidmain, but is it really the case that a lot of ongoing systems still use those old languages?

i do have linux, and i do know a tiny bit of html. i find what i do know to be quite straightforward so i will continue to nose into it as i go. as i say i downloaded 2 books about c++, a document by B.Kernighan about C (written in 1975, so lots of comparisons to Fortran in it!) which i am reading now. I also have a couple of java books, one i downloaded and one i actually have the book of, so i'll get into them once i have read the C books.
Also, i'll try all the stuff you guys mentioned. i reckon i will be kept going for a lo o o o o ng time.
Re: assembly language, that's the one where you enter data purely as hex numbers isn't it? (they called it machine code when i was at school) i did an introductory course in machine code, as the technological studies course i was doing reckoned it was essential to have a knowledge of what was going on with binary and machine code. I thought it was very straightforward and i liked it, but i do reckon that a lot of its limitations could be addressed, obviously that is what programming languages are for.

I'll throw myself into it then, when i can, and see what i come up with. thanks a lot for all yr input, folks.......
Title: Basic Programming for an utter novice.
Post by: jtpenrod on 1 April 2002, 07:31
quote:
Re: assembly language, that's the one where you enter data purely as hex numbers isn't it? (they called it machine code when i was at school)

Not really. Assembly language uses mnemonics to stand for the actual hex code. Something like: MOV C,A (i.e. take the contents of a register called "C" and copy it to the accumulator) would be assembly. It uses these textual representations to make it easier to see what you're doing. The assembler can then take the text, parse it, and look up the corresponding machine code.
_____________________________

Powered by Mandrake Linux and Freedom
Computers are like air conditioners: they can't do their jobs if you open windows.
(http://www.otakupc.com/etsig/dolphin.gif)

[ October 06, 2002: Message edited by: jtpenrod ]

Title: Basic Programming for an utter novice.
Post by: Calum on 1 April 2002, 16:54
that sounds incredibly sensible. maybe i should look that up pretty early in my quest for knowledge.
Title: Basic Programming for an utter novice.
Post by: Master of Reality on 1 April 2002, 23:31
dont mind me.
just posting to look at the changes i made (such as my name druaga>Master of Reality)

[ April 01, 2002: Message edited by: Master of Reality ]

Title: Basic Programming for an utter novice.
Post by: psyjax on 2 April 2002, 00:26
quote:
Originally posted by Master of Realty:
dont mind me.
just posting to look at the changes i made (such as my name druaga>Master of Reality)

[ April 01, 2002: Message edited by: Master of Reality ]



Why the change? I was wondering who you were  (http://smile.gif) .

Druaga always sounded like the traditional name for dwarfs in D&D (yes Im a dork) Druagar.
Title: Basic Programming for an utter novice.
Post by: Master of Reality on 2 April 2002, 00:41
quote:
Originally posted by psyjax:


Why the change? I was wondering who you were   (http://smile.gif)  .

Druaga always sounded like the traditional name for dwarfs in D&D (yes Im a dork) Druagar.



The Babylonian God "Druaga" is the ruler of the devil world...
 i usually use the name Master of Reality in things like ICQ. But if you ever see someone named "The-Fridgerator or The-Freexor" anywhere, thats probly me too.
Title: Basic Programming for an utter novice.
Post by: psyjax on 2 April 2002, 01:20
quote:
Originally posted by Master of Reality:
The Babylonian God "Druaga" is the ruler of the devil world... .


Creepy, you Goth, you  ;)
Title: Basic Programming for an utter novice.
Post by: Master of Reality on 2 April 2002, 01:29
quote:
Originally posted by psyjax:


Creepy, you Goth, you   ;)  



i aint a goth, i just happen to know a lot of useless information, such as the baylonian gods.
Title: Basic Programming for an utter novice.
Post by: psyjax on 2 April 2002, 02:24
Jeez... another faild attempt at being funny.

I actually studied a bit on the Babylonian gods. Ever read the Epic of Gilgamesh? It's supper cool, something akin to the Illiad or herculease for the Babylonians.

Or was it mesopotamians... hmmm... no Babylonians.

Whatever  (http://smile.gif)
Title: Basic Programming for an utter novice.
Post by: Calum on 13 September 2002, 18:44
i wonder if you guys could point me in the direction of some good info webpages about babylonian gods then?

[ September 13, 2002: Message edited by: Calum ]

Title: Basic Programming for an utter novice.
Post by: Master of Reality on 14 September 2002, 00:21
there is a very VERY good website.... but i dont know the URL. I havent seen the site in many months (because i lost my bookmark to it) and i am very surpised that i even remember it. Its called Realm of Mist or Realm of Mists. Some chick wrote it who lives in Alaska and practices witchcraft (elemental focused). Try looking for it at google.