Author Topic: Basic Programming for an utter novice.  (Read 2425 times)

Calum

  • Global Moderator
  • Member
  • ***
  • Posts: 7,812
  • Kudos: 1000
    • Calum Carlyle's music
Basic Programming for an utter novice.
« 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 Siteand downloaded one of Bruce Eckel's books, he seems to get good reviews.
Also i found this Introduction to C++ 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) 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 ]

visit these websites and make yourself happy forever:
It's my music! | My music on MySpace | Integrational Polytheism

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Basic Programming for an utter novice.
« Reply #1 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).

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

Someone please remove this account. Thanks...

badkarma

  • VIP
  • Member
  • ***
  • Posts: 497
  • Kudos: 0
Basic Programming for an utter novice.
« Reply #2 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 and the C++-faq are unmissable sources.

good luck, and if you ever want to dabble with OpenGL game programming send me a PM  ;)
If you can't learn to do something well, learn to enjoy doing it poorly.

Centurian

  • Member
  • **
  • Posts: 235
  • Kudos: 0
    • http://www.darkmares.2ya.com
Basic Programming for an utter novice.
« Reply #3 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.
Later
Centurian

badkarma

  • VIP
  • Member
  • ***
  • Posts: 497
  • Kudos: 0
Basic Programming for an utter novice.
« Reply #4 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.

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

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Basic Programming for an utter novice.
« Reply #5 on: 29 March 2002, 02:34 »
Naw, I changed my mind. Calum, you should learn COBOL. Second choice would be FORTRAN.     I actually spent a few years as a FORTRAN programmer. I hear the future is going to be in COBOL though.  

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

Someone please remove this account. Thanks...

psyjax

  • VIP
  • Member
  • ***
  • Posts: 1,871
  • Kudos: 55
Basic Programming for an utter novice.
« Reply #6 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.        I actually spent a few years as a FORTRAN programmer. I hear the future is going to be in COBOL though.      

[ 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.
Psyjax! I RULEZZZZ!!! HAR HAR HAR

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Basic Programming for an utter novice.
« Reply #7 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 ]

Someone please remove this account. Thanks...

Centurian

  • Member
  • **
  • Posts: 235
  • Kudos: 0
    • http://www.darkmares.2ya.com
Basic Programming for an utter novice.
« Reply #8 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.

   



HEHEH Yep whatever works for us.  


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.  

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.
Later
Centurian

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Basic Programming for an utter novice.
« Reply #9 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.
Someone please remove this account. Thanks...

Centurian

  • Member
  • **
  • Posts: 235
  • Kudos: 0
    • http://www.darkmares.2ya.com
Basic Programming for an utter novice.
« Reply #10 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.  
I do have to agree a knowledge of assembler can be very useful.
Later
Centurian

jtpenrod

  • VIP
  • Member
  • ***
  • Posts: 675
  • Kudos: 105
Basic Programming for an utter novice.
« Reply #11 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 and Adv BASH Programming)

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


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

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

Live Free or Die: Linux
If software can be free, why can't dolphins?

foobar

  • Member
  • **
  • Posts: 308
  • Kudos: 0
    • http://www.fuckmicrosoft.com
Basic Programming for an utter novice.
« Reply #12 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.
Linux user #283039

Gosh, I love Linux Quake.


badkarma

  • VIP
  • Member
  • ***
  • Posts: 497
  • Kudos: 0
Basic Programming for an utter novice.
« Reply #13 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
If you can't learn to do something well, learn to enjoy doing it poorly.

psyjax

  • VIP
  • Member
  • ***
  • Posts: 1,871
  • Kudos: 55
Basic Programming for an utter novice.
« Reply #14 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
Psyjax! I RULEZZZZ!!! HAR HAR HAR