PDA

View Full Version : Going To Learn To Program



Lamsey
05-12-2003, 01:27 PM
Hey all, I'm going to go to uni in autumn to study a MEng in Computer Science.
I'd like to learn to program a bit before then, so that I'm well prepared for what I find in uni.

My only previous experience of programming is mucking about in Basic using my old Commodore 64 (64k RAM, 1MHz CPU - those were the days :lol: ... that computer still works, you know!)
I made a few games - a simple Breakout clone and a version of Snake were my best achievements... :rolleyes:

I'd like to start programming some Windows programs - start simple and work my way up. Eventually I'd like to be able to write utilities or programs that I could release as freeware on my website.

So here's the question:
Which programming language should I use :unsure: ? My computing teacher in school says C would probably be best - do you agree?
Also, does anyone know where I could get an assembler and tutorial(s) for whatever language I choose to learn - for free if at all possible?
My computing teacher recommended this page (http://www.cs.virginia.edu/~lcc-win32/) for learning C...

amphoteric88
05-12-2003, 01:31 PM
java is widely used in first year comp sci
which uni you going to?

vivitron 15
05-12-2003, 01:35 PM
Delphi is quite a good one, relatively easy to learn, it isn't used too much but that makes it a rare skill :)

also, it will give a good guide as to how things work, what the commands do etc. All the languages are basically the same, but with different syntax

Kid1A
05-12-2003, 01:54 PM
java or c++, pacal is a easy one for begginers

Lamsey
05-12-2003, 02:41 PM
Originally posted by amphoteric88@12 May 2003 - 13:31
java is widely used in first year comp sci
which uni you going to?
Strathclyde University, Glasgow


I could just be being ignorant here but do Java programs have a GUI? I seem to remember my brother's Java programs coming up in a DOS window. Since I'm eventually going to want to write programs for general release, I'd definitely prefer a language that allows easy implementation of a Windows interface.

What about Delphi/C?

And what's the difference between C and C++?

amphoteric88
05-12-2003, 02:57 PM
well done in getting into strathy, it's quite a good uni. it also has the largest licensed premises in europe, which is nice :D
and sometimes you can cheat to getting free games of pool.
i know quite a few people who go there (including myself) and a lot of them do comp sci.
you can create a gui in java, but as you say, a lot of the learning is dos based.
the most advanced thing i've ever seen in first year comp sci was a naughts and crosses game, so it doesn't seem too hard.
remember to enjoy the summer holidays though (not that you'll need a lot of encouragement), cos the actual course is pretty hard. maths is exceptionally difficult, but if you've done it at advanced higher it shouldn't be too bad

Lamsey
05-12-2003, 03:07 PM
but if you've done it at advanced higher it shouldn't be too bad
Doing it this year, sitting the exam on the 21st - in 9 days time!!!! :ph34r: :( :ph34r:

It's the same day as the Celtic UEFA cup final game too, and I got AH computing the next day. :angry:


So is it easier to create programs with a GUI in C++ or Delphi? (I think Pascal is mostly text based too :unsure: )

AuthorizedDeale
05-12-2003, 03:33 PM
C++, Delphi and pascal are good ,maybe you wil get pascal in school.
The best to begin is in Visual Basic; You wil learn the basics of programming and debugging.
beacuse this program wil help you with command and lay-out, the other languages.
So remind that you must start with C++ from a white page where you must program al functions and window properties.

After learing the basics of Public Functions, creating DLL files, Using INI files and more you can begin with C++.
The best is that you have a beginning manual or templates, just to start.
Programming you won't learn very easy, but by using templates and mixing some templates you will learn pretty fast...

4play
05-12-2003, 05:01 PM
vb is the tool for gui making but it is not the best language to learn first. It starts up bad habits and can only be used on windows.

no one has recommended python (http://www.python.org). it is free and easily ported to many platforms. creating gui's is pretty simple and it is also good for making websites. Google uses it for its search engine. It is highly recommended by many of my mates who have programmed for a long while.

C or c++ is a good language to learn but creating a nice gui with it is very complicated and programs are normally confined to one operating system.

I have also seen borland kylix for linux in action. It is a delphi/pascal based tool that has a nice rad interface that lets you make yourself a gui just like visual basic does.

Billyness
05-12-2003, 07:39 PM
If you're wanting to get straight into a GUI then i would suggest VB or delphi/pascal. Out of prefernce i would go with the latter.

But, i would also suggest picking up C++. Although pretty darn hard to learn it's exceptionally powerful and if you're wanting to go anywhere with programming it's a must!

And as 4play said, if you're going to pick up VB, do it after you'ev had some other experience as from perosnal experience, it does seem to start you on bad habits!

Lamsey
05-12-2003, 09:45 PM
I've just had a look at the Python page and it looks interesting. Will look into it further when I have more time (I'm at WeeMouse's house just now and have to go home).

Cheers guys :beerchug:

Spindulik
05-13-2003, 03:09 AM
I recommend that you get one of those "Learn C/C++ in 21 Days" books. Get a copy of C/C++, where ever you find it. Even a dummy with absolutely no programming experience can learn the basics in 21 days (like me).

If you learn C/C++, then you will have an edge on other languages. That particular language will actually teach you the concept of programming, rather than just a programming language itself.

If you just stick with C/C++, and decide to master it, then you will be able to create some great software! It is a very powerful language. Great programs and games were designed with it. Wolfestein, DOOM, Quake, etc... are all C/C++ programs!



With that information, then learning Visual Basic will be a breeze and a lot of rewarding fun.

Oh! Download one of my programs that I wrote from scratch! Looks seriously professional, yet I wrote it all in about 1 hour! Download Ebonic Slots (http://mysite.verizon.net/vze3nvj6/EbonicSlots.exe)

Lamsey
05-13-2003, 01:25 PM
I've just been looking at the Python site - it's an interpreter; wouldn't that make it a lot slower than compiled languages?

I'm thinking that perhaps C would be a good idea - from what Spindulik said, I'd be able to go from beginner to advanced programmer using the same language all along.

Plus, my teacher has pointed me at a site where I can get C for free (http://www.cs.virginia.edu/~lcc-win32/).


Will someone answer this though: What's the difference between C and C++? :blink:

Lamsey
05-13-2003, 03:59 PM
Ahh forget that - went and found out for myself like a good Googler.


It is two different languages which each has their ANSI standard. These two standards are different because the languages are different.

C++ is based on C though and C is like an ancestor language. Because of this, almost every C construct and C statement is also valid C++. The reverse is far from true. There are a zillion statements which are valid C++ but which will not compile in C.

However, C++ is not a true superset. There are some valid C constructs which are not valid C++. There aren't many of them and ignoring C99 for a small moment one can easily say that every valid C construct can be rewritten to a form which is also valid C++ construct. Thus it was very easy to make code that would compile for both compilers.

However, because C99 made numerous changes to C this is no longer true. C's handling of complex numbers is very different from C++ and C++ has no need for C-style handling of complex numbers since it has a more powerful template mechanism that both handles complex numbers as well as many other things without requiring special syntax as the C handling does.

And yes, people use C and C++ for slightly different things even though there are overlapping areas where either can be used.

C++ is perfect for applications, simulations, object oriented programming games, windows programming, etc etc.

C can also be used for the same types of programs but C++ is better at it than C is. Especially if the program is large and complex.

Some OSes cannot handle C++ for driver development etc and you have to use C for this purpose.

In addition, C tend to produce smaller executables, more lightweight code than C++ tend to do and is therefore also often used for programming micro controllers and stuff. However, C++ is also more and more available to such hardware as the price of memory goes down.


Looks like I should go for C++ then...

sandrathom60
05-13-2003, 05:15 PM
Good compiler for C++.

http://www.bloodshed.net

And it's free.

walleye
05-13-2003, 09:31 PM
The difference between C and C++ ?

With C you have a pretty good chance of shooting yourself in the foot.

With C++ you have the ability to blow off your entire leg.

Very powerful languages (windows was written in C), but harder to learn. Syntax is not as forgiving as Visual Basic or Delphi. You will lock up your share of computers testig your code.

Tom

Lamsey
05-13-2003, 09:42 PM
I think I'm gonna go with C++ - see if I'm up to it.

I'll let you know if I ever develop anything good - it will of course be released as freeware on my site if it's useful.


Thanks for all the advice guys :) :beerchug:

4play
05-13-2003, 10:04 PM
If your gonna go the c route I would learn c first.

The syntax is identical to c++ but it makes you declare placeholders for output and teachers you about declaring variables properly.

c++ is slighty more forgiving but having c behind you is better.

borland give's away a free compiler on there website but it is only command line and the setup is hard. The bloodshed one posted before is excellent but has some major problems dealing with windows.

You could always just get visual c++ there are hashes about for it.

http://www.cprogramming.com/
c programming in unix. (http://www.cs.cf.ac.uk/Dave/C/CE.html)start reading through that will give you a good idea of what is happening when you compile and such.
http://www.fortunecity.com/rivendell/final...Forgers.htm#1.3 (http://www.fortunecity.com/rivendell/final/355/files/Forgers.htm#1.3). the top guide for creating a nice gui with c. It is very complicated and you will want to spend at least a few months with console programming before you try this.

Lamsey
05-13-2003, 10:12 PM
Cheers 4play.

I'm going to try out the free Digital Mars C++ compiler first - it looked pretty good.

melgl
05-13-2003, 10:40 PM
i did E/Eng and it was mainly C if that helps

Lamsey
05-14-2003, 09:31 PM
I'll be doing a MEng but Amphoteric says Strathclyde Uni use Java a fair bit... I'll learn that when I come to it - I like the sound of
C will teach you good habits