Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

k2k koos

macrumors 6502a
Original poster
I am about to embark on a self study path to learn to program.
I know HTML, I used to program in Basic years ago, but since then didn't do a lot with it.
I'd love to master the art of writing simple but useful applications running on OSX, and I am leaning towards C, C++ , and using this in X code to build my apps.

Which is the best path to choose? I am already a basic ADC member, but I can't afford a higher level subscription.

Tell me all about good books, tutorials, and other resources I could use to get started?
My ultimate goal is to develop simple and entertaining but educational software for my kids, and those of others, as there is such a lack of that here in the UK, if not elsewhere.
What would be realistic in terms of a time frame to learn this, with an input of approx 1 to 2 hours a day maximum?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
Tell me all about good books, tutorials, and other resources I could use to get started?
Start here: https://forums.macrumors.com/threads/90331/
What would be realistic in terms of a time frame to learn this, with an input of approx 1 to 2 hours a day maximum?

In my opinion, it would be quite difficult to learn how to program with one or two hours a day commitment. It takes years to master a language, but you should be able to get something basic put together in a few months time. The biggest issue you will find is that you will really start making progress or gaining momentum and then you are out of time - you start the next day trying to remember where you left off the day before, losing time in the process.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
Hi

What's more important, to be productive and get applications finished or to learn C/C++? To write an app for the Mac you are going to have to learn much more than just C/C++/Objective-C. There's all the OS calls etc. So I would agree with kingjr3, you are going to find it hard going simply because of the volume of stuff you are going to have to learn and the amount of time you have available. I don't want to put you off though as I may be completely wrong!

What you could do is use your existing knowledge of BASIC and start writing apps in RealBasic. There's advantages and disadvantages to RealBasic but on the plus side you will be able to write apps that run on Mac, Windows and Linux. With the 1 - 2 hours a day that you have I think you will be able to pick it up easily and feel like you are making progress each day. It is very easy to use and actually very quick to create apps with. The downside is that you have to pay for it, but there is a demo version that you can try out. I'm not sure on cost but there are two versions, standard and pro. They also do educational discounts.

b e n
 

k2k koos

macrumors 6502a
Original poster
Programming

Thanks guys for the advice and tips so far. I know it's going to be an uphill struggle, and it's the initial struggle of getting started and remembering stuff, which only will get better by continued use.

I have had a look at X code too, and while it all looks impressive, and was able to design a few simple application interfaces , I must say indeed a lot to learn. Getting my head round all kinds of abbreviations is the first hurdle.

Realbasic sounds like an option. Does this result in nicely responsive programs, once run throgh a compiler, or is it slower than a C program for instance once compiled?
Sorry for the novice questions, but I am trying to learn.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
RealBasic produces compiled code, but how fast the compiled code is, or rather how good the compiler is compared to a C compiler I cannot say. But I suspect the code will be more than fast enough for you. What I like about RealBasic is that it is very easy and fast to create the user interface. Also the libraries are comprehensive and cover a lot of ground including Internet, networking and graphics so you'll find it quite complete. The programming info is also very accessible which if you've only got a couple of hours a day to work/learn I think you'll really appreciate.

The best advice I can give though is to download the demo and documentation. There is an example project/tutorial which will take about an hour to complete and by then I think you'll be able to decide for sure whether you like it or not.

By the way I'm not trying to put you off Xcode and 'C' etc. I use RB and Xcode all the time. My preference would be Xcode but I just thought with your previous experience of BASIC you might like RB.

Good luck!

b e n
 

andrewface

macrumors 6502
May 17, 2006
284
56
RealBasic produces compiled code, but how fast the compiled code is, or rather how good the compiler is compared to a C compiler I cannot say. But I suspect the code will be more than fast enough for you. What I like about RealBasic is that it is very easy and fast to create the user interface. Also the libraries are comprehensive and cover a lot of ground including Internet, networking and graphics so you'll find it quite complete. The programming info is also very accessible which if you've only got a couple of hours a day to work/learn I think you'll really appreciate.

The best advice I can give though is to download the demo and documentation. There is an example project/tutorial which will take about an hour to complete and by then I think you'll be able to decide for sure whether you like it or not.

By the way I'm not trying to put you off Xcode and 'C' etc. I use RB and Xcode all the time. My preference would be Xcode but I just thought with your previous experience of BASIC you might like RB.

Good luck!

b e n


hey i pmed you
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
I would recommend learning C++ first. Once you learn it, you can program in a variety of platforms and APIs, even make games. Or, if you want to stay in OS X platform, you could learn Objective C and use that with Cocoa.
 

k2k koos

macrumors 6502a
Original poster
Programming

Thanks all:

Now let's say I've created a small program in C++, or C, or whatever I choose to start with, using a text editor.
How can I now view/test what I've done? Are there any free editors-compilers out there for OSX that are simple to use, or is X code my only good option?

Basically, I need something simple to use, where I can type in a few lines of code and then press a'run' button or something to see the results of what I've done. All in the name of practice.
Once I get proficient enough, I can dwell into the realms of x-code perhaps, unless the above is integrated there in a simple way...
 

toddburch

macrumors 6502a
Dec 4, 2006
748
0
Katy, Texas
XCode is what you want to use. Really. Go into XCode, File>New Project, pick Command Line Utility>C++ Tool>Next. Then, under Project Name, enter a directory_name / file_name, like XCode/FirstProg, then Finish.

You'll get a dialog box. Double click on FirstProg.cpp. You'll get another dialog with some sample code that prints "Hello World". Click "Build and Go".

You'll get another dialog window, which is the Run Log. You'll see the output of the program. Now, just toggle back and forth between your edit session and the Run Log and build incrementally.

Nothing could be easier.

Todd
 

k2k koos

macrumors 6502a
Original poster
Thank you

thank you all for your advice.

I know what I need to know now to get started, wish me luck.
BTW: the 1 to 2 hours max daily are due to my current work situation, but I'll be able to put in some more time at weekends, and have more time in the future, so things can only get better.
 

savar

macrumors 68000
Jun 6, 2003
1,950
0
District of Columbia
Thanks guys for the advice and tips so far. I know it's going to be an uphill struggle, and it's the initial struggle of getting started and remembering stuff, which only will get better by continued use.

I have had a look at X code too, and while it all looks impressive, and was able to design a few simple application interfaces , I must say indeed a lot to learn. Getting my head round all kinds of abbreviations is the first hurdle.

Realbasic sounds like an option. Does this result in nicely responsive programs, once run throgh a compiler, or is it slower than a C program for instance once compiled?
Sorry for the novice questions, but I am trying to learn.

Realbasic is pretty fast, depending on what you want to do with it. Quake 4 written in Realbasic would probably be lousy, but an e-mail client could be quite normal.

Jumping from HTML (which is not a programming language) and BASIC (which is a very old programming language) into C or (shudder) C++ will be quite a dramatic change. Programming in C/C++ requires some knowledge of computer architecture, and even at 15 hours per week I think it will take you a few years to become a competent programmer.

Still, if you're very serious about it, C is still a great language for cementing your understanding of computer architecture and is still a useful language.
 

k2k koos

macrumors 6502a
Original poster
Realbasic is pretty fast, depending on what you want to do with it. Quake 4 written in Realbasic would probably be lousy, but an e-mail client could be quite normal.

Jumping from HTML (which is not a programming language) and BASIC (which is a very old programming language) into C or (shudder) C++ will be quite a dramatic change. Programming in C/C++ requires some knowledge of computer architecture, and even at 15 hours per week I think it will take you a few years to become a competent programmer.

Still, if you're very serious about it, C is still a great language for cementing your understanding of computer architecture and is still a useful language.
As far as computer architecture is concerned, I am pretty confident on that part, as far as hardware is concerned (I am an electronics engineer) but my software knowledge needs polishing up, as I am not too involved with that in my daily job, I'm a software user, not a programmer, but that is something I want to change :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.