PDA

View Full Version : Programming / developing



Insanely
9th May 2005, 10:57 PM
I want to learn how to program! One day I hope to contribute to open source products.
(I'm optimistic)

I found a movie on C programming. The instructor gears it for people who never have programmed before. He also adds that the labs will be done on windows with DEV C++ and will NOT be platform specific code. What is the alternate in xcode for a C/C++ interpreter? I know that C can be difficult. But...

One day on these forums someone recommend that I start on ruby. I have nowhere to begin. Can someone recommend me what language I should start on. I have not manage to find a tutorial that I can understand programming or programming concepts.

Can someone please point me in the right direction?

neilrobinson
9th May 2005, 11:03 PM
depending on what you want to develop - give us a quick idea and we should be able to be a bit more specific.

Insanely
10th May 2005, 11:03 AM
It's not a matter of what I want to develop. I would like to extend my knowledge to be able to write programs in general. I might stick with the C tutorial for now.

thomas
10th May 2005, 11:13 AM
C is a good one to start with.

From there you should move towards an Object Oriented language, such as C++ or Java, as they are probably the most accessible in terms of resources etc. Then you could always go to Objective-C and start making Cocoa apps for OS X!

Nevets_Anderson
10th May 2005, 11:19 AM
Good place to start is to get or install the developer tools (they are usually part of the system disks or you can down load apples Xcode 1.5 from the Apple Developer (http://developer.apple.com/) (http://developer.apple.com/) web site you need to join up with an account though it's free)

Apple script and or basic unix scripting is also a great thing as you can build a few scripts then build a stand alone application with xcode that can present your scripts in a professional manner.

sikosis
10th May 2005, 11:57 AM
Search the forums ...

Here's some linkage:-

http://forums.appletalk.com.au/index.php?showtopic=5602

http://forums.appletalk.com.au/index.php?showtopic=4533

http://forums.appletalk.com.au/index.php?showtopic=4442

http://forums.appletalk.com.au/index.php?showtopic=593

http://forums.appletalk.com.au/index.php?showtopic=5602

related:-

http://forums.appletalk.com.au/index.php?showtopic=850

http://forums.appletalk.com.au/index.php?showtopic=5550


That should be enough to keep you going :thumbup:

Squozen
10th May 2005, 02:13 PM
I would suggest looking at Perl or PHP - there's plenty of stuff about them on the net, they're easy to get into, platform-agnostic and PHP is not dissimilar to C (which you'll need to progress to eventually!).

lupine
10th May 2005, 11:48 PM
I want to learn how to program! One day I hope to contribute to open source products.(I'm optimistic)[
There's an awful long way between "Hello World" and collaborative development. It's a lofty goal, but not unheard of.

I found a movie on C programming. The instructor gears it for people who never have programmed before. He also adds that the labs will be done on windows with DEV C++ and will NOT be platform specific code. What is the alternate in xcode for a C/C++ interpreter? I know that C can be difficult. But...
Just use Xcode. I'd assume you're just making basic command-line-type applications. For that, create a new project of the type Command Line Utility -> C++ Tool. You should be able to do everything that a beginner's C tutorial would want to cover there.

One day on these forums someone recommend that I start on ruby. I have nowhere to begin. Can someone recommend me what language I should start on. I have not manage to find a tutorial that I can understand programming or programming concepts.

Can someone please point me in the right direction?
Essentially, it doesn't really matter what you learn. People will have big debates over the ideal language, but it's like learning anything new for the first time. It might be hard to get your head around some of the concepts, but once you know one language, it becomes much easier to pick up a new one.

If you've already found a good resource for learning C, which explains everything in a way you can understand, then that's a great place to start. C happens to be a rather central language, and it'll be quite easy for you to move in just about any direction with knowledge of C.

Some hints: Practice! Do all those exercises at the end of the chapter, or find a list of ideas for small applications and implement them. Any dummy can type out source code from a book or copy it from the web. Programming is all about using one's brain, and that's a great place to start.

Find some good books on the subject. I usually buy at least a tutorial-style book and a reference guide for any new subject. Sometimes you can get lucky and find both in the one book. Having a hunk of dead tree on your desk while you work can be very beneficial, particularly if you're not blessed with excessive screen real estate.

Get into good habits early! Comment your code so you can use it later as a reference (coupled with Spotlight, this is really useful), decide on a common formatting style and stick to it (that'll help make fewer enemies in the open source world), and look for other "best practices". People love to blog about this stuff, so it shouldn't be too hard to find.
Be patient. You won't be able to write big applications yet. Make some cool little apps to show off to your friends and family (who are usually very easily impressed). Write software that's useful to you. Then learn how to design larger software: patterns, structure and other tips and tools. Once you have the basics down, writing bigger applications becomes much easier.

And finally, have fun! If you're not enjoying yourself, have a break, or try something different. Find things that interest you, and use them as motivation (like my current 7-day CoreData binge). Arron Hillegass (author of Cocoa Programming for Mac OS X) recommends that you get at least 10 hours sleep each night while learning something new, which is as good an excuse as any for sleeping in...
Best of luck to you!

sikosis
11th May 2005, 09:58 AM
Originally posted by lupine@May 10 2005, 11:48 PM
Arron Hillegass (author of Cocoa Programming for Mac OS X) recommends that you get at least 10 hours sleep each night while learning something new
Yeh I remember reading that and thinking eeek I never get 10 hrs ... ever ...

lavo
11th May 2005, 10:46 AM
If that is the case, make sure you learn coding before you get married and have kids :-) I can't even remember the last time I slept more than 6!

The tip on if it gets tedious is good. I have found that if I am stuck on learning a certain part of coding (I'm starting to learn Java), I leave it for a couple of days and then come back to it. It took me quite a while to understand the basic crux of OOP, but once it clicks, whoohoo!

Psionic001
8th September 2005, 12:56 AM
I've been reading "Learning Cocoa with Objective C 2nd Ed" (O'Reilly) and "Programming in Objective C" (Kochan).

"Learning Cocoa with Objective C 2nd Ed" is an older book but seems to explain concepts a little better but they use the old Project Builder (what XCode used to be) for their examples, whereas the examples in "Programming in Objective C" are more relevant because they're done in XCode.

I have no programming experience and the whole OOP thing is just starting to click after about 2 weeks of flipping through the initial chapters.

(lupine @ May 10 2005, 11:48 PM)
There's an awful long way between "Hello World" and collaborative development. It's a lofty goal, but not unheard of.

Lofty Goal?? Not unheard of?? Come on... stop being such a pessimist. There are tens of thousands of programmers out there doing exactly that and I bet they all started with the metaphoric "Hello World!"


Insanely, please let me know if you find any good resources on the net like videos etc.

I'm hanging to put down the books for a bit and just watch some training vids.

Head hurts!

best,

Matty ;)

W2ttsy
27th October 2005, 12:11 PM
remember the safari library is now available over at apples developer (https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=D236F3C416E380A5BA8640A95B6192306EB 74EB042FA9A161F6A628F0291F620&path=//adcbookshelf/%3Fht) section. heaps of titles available. i know i have about 7 books on "loan" about now...

as for programming. java is a good way to start, as its platform independent, and code that works on windows will work on mac os as well. java is normally the langugage tought at unis and tafe colleges, so if youre planning to enter into a computer science course, then it will give you a good headstart...

the programming techniques are all the same, and once you nail OOP, everything else is just another step...

W2ttsy

edit: grave dig :ph34r: but a good one

Graham
27th October 2005, 12:44 PM
For those getting in to coding a bit more I suggest you read 'Writing Solid Code' by Steve Maguire. It concentrates on C but the techniques apply to all languages. For an overall discusssion of writing software Steve McConnell's 'Code Complete' is excellent and his book on the overall development process, 'Rapid Development', is brilliant. All professional developers should at least read these books. Amazingly they're all published by Microsoft Press.

For beginners scripting languages are good but they can lead to bad habits due to the flexibility they allow. My top five recommendations from almost two decades of doing this for a living are:

1) Read. Get a few tutorials from different sources. There's a number of ways of doing things; learn which works for you. Read other people's code. Read books on algorithms. A good design has a far greater impact than the quality of the code.

2) Document code. You know what it does now. In three months you won't remember.

3) Initialise *all* variables. This is massively important in C where random pointers can cause unexpected errors. If a value is initialised then it fails the same way every time which makes it easier to find the problem. The same goes for NULLing pointers when memory is freed.

4) Step through your code line-by-line with the debugger immediately after you've written it. Look at what all the variables are doing. Check you input and output parameters. Check *all* return codes - they're not just there for decoration.

5) Write test cases and do them. Implement regression testing whenever you make changes.

Quamen
27th October 2005, 08:57 PM
Originally posted by Squozen@May 10 2005, 02:13 PM
I would suggest looking at Perl or PHP - there's plenty of stuff about them on the net, they're easy to get into, platform-agnostic and PHP is not dissimilar to C (which you'll need to progress to eventually!).
Only problem is that PHP and perl are both scripting languages. There is quite a bit of difference.

Personally I think you should follow the same path they made me do at uni, I found it a very easy one.

Start with Java, then move to C.

You can do both of these in xCode no problems and that's what I used for most of my uni assignments.

If you want the names of the text-books uni made me buy (well the good ones at least them PM me) and I'll give you a list. Might even be able to dig up the specs of a few assignments and the solutions I submitted too for you to have a look at.

jbillett
27th October 2005, 09:15 PM
I wouldn't suggest starting with Java. Languages progressed from structured (C, etc) to Object Oriented (C++, Java, etc) and if you want to learn to code, I'd suggest you do the same. Otherwise, you may well find yourself doing too many things to get your coding started without understanding why.

As for tutorials etc, a lot of universities publish their courseware online. So... take the courses! You may not get the piece of paper with the degree, but you will get the knowledge.

Finally, as for development environment I would suggest if you start with C, to also start with a text editor such as vi. Compile with gcc. This way, you are involved with everything that happens, nothing going on behind the scenes. Once you understand things on this level, then progress to an IDE. Eclipse is a great one for Java and other languages.

gelfie
27th October 2005, 09:22 PM
Programming in Objective C by Stephen G Kochan (http://www.amazon.com/gp/product/0672325861/104-8578432-3134308?v=glance&n=283155&s=books&v=glance)

Teaches Objective-C and Object Oriented concepts for those with no previous C or Java or OOP experience.

Teaches you the C you need to know as you go.

Doesn't delve into Cocoa. At least, not the Appkit, there are no funky GUI apps here, it uses the Foundation Kit and consists of lots of CLI exercises.

Quamen
28th October 2005, 01:45 PM
Originally posted by jbillett@Oct 27 2005, 09:15 PM
I wouldn't suggest starting with Java. Languages progressed from structured (C, etc) to Object Oriented (C++, Java, etc) and if you want to learn to code, I'd suggest you do the same. Otherwise, you may well find yourself doing too many things to get your coding started without understanding why.

While that may be the way in which programming has evolved, I don't think it is the easiest way to learn the basics. The evolution to object orientated code is happening for a reason, it's easier to understand and design.

I think Java is probably the easiest language to learn on, there are no requirements for understanding or using pointers and memory management techniques. Something which C++ takes from its C origins and makes it a nightmare for those trying to learn it with no previous C experience.
This is turn allows the beginner to focus on learning the basics of the different control structures which are the same accross most languages.



Finally, as for development environment I would suggest if you start with C, to also start with a text editor such as vi. Compile with gcc. This way, you are involved with everything that happens, nothing going on behind the scenes. Once you understand things on this level, then progress to an IDE. Eclipse is a great one for Java and other languages.

This part I do agree on. Using the command line and a simple editor is a good way to start. But once you start doing some more complicated work then the IDE becomes a much nicer tool to have.

Kallikak
28th October 2005, 02:39 PM
Originally posted by Quamen@Oct 28 2005, 01:45 PM
I think Java is probably the easiest language to learn on, there are no requirements for understanding or using pointers and memory management techniques. Something which C++ takes from its C origins and makes it a nightmare for those trying to learn it with no previous C experience.
Without doubt java is easier to learn than C in terms of the language itself. But it also comes with such a huge library these days, and that adds a lot to the burden. However I would never recommend C to start with - far too many low level concepts that are by and large irrelevant for a general programmer these days.

For someone completely new to programming, playing around with an interactive scripting environment for a while is probably a good idea. Input and output is easy, while at the same time you learn about data types (to some extent at least) and flow and structure. Then move onto a high-level, modern, expressive, OO lnaguage like Java, or C# depending on your requirements.

iSlayer
28th October 2005, 02:49 PM
i went from web languages such as php and javascript right to Objective-C.
It took me a while to understand the syntax and basicis but after a month ive got most of that nailed and im producing some pretty cool stuff

If you want to get some good books without paying alot check out Safari Bookshelf -> http://developer.apple.com/adcbookshelf/
For $19.99 US a month you get access to hunreds of books in html format.
You can 'loan' up to 10 books at a time.You can save as pdf(costs extra if you use all your credits i think) or print them.
Ive been using it for a few weeks and its fantastic

zac
28th October 2005, 04:10 PM
I started out on RealBasic before moving onto C.

Seriously, although RB is expensive and pretty limited for serious developing, it is such a lovely way to enter the world of programming. You get immediate results from very simple code which is encouraging in learning more; and you get all the basic concepts pretty clear (loops, if-statements, methods, classes, arrays, booleans etc).

By dabbling in RB, you can really get a feel for whether developing is really your thing.