 |
 |
Im a newbie what should be mt 1st stab@programming?
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
Ive been using mac os and os x for a long time and ive done the whole gimp and x windows thing...i even got gnome running over os x but i havent learned to program anything yet. i want to learn to be able to mess w/ app and make my own....how shouldi start? what language should i learn? perl? python? what is the difference between these? what books should i get?
sorry for all the questions, im just very curious! = )
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status:
Offline
|
|
Actually all computer languages are the same,they just have different names-just kidding,but there is a lot of similarity between many languages-I don't consider myself to be a very experienced programmer at all,but after becoming familiar with just a few languages I got to the point where I can pretty much pick up a language and start coding it within a couple of hours.Basically you start to see variations of the same functions and data structures over and over again,with a couple of exceptions-most languages have a couple of unique features.The four main types of higher level languages are:
1.Declarative-HTML and XML are in this category,you tell the computer what to do,not how to do it.
2.Query-You ask questions,Q languages are used mostly for databases,SQL is an example.
3.Logic-In a logical language you present the comptuer with logical problems to be solved.PROLOG is an example.
4.Imperative-With an imperatve language you give the computer directions on how to do something.Most popular languages in use today are imperative languages.Examples include PERL,Python,C,Objective C.Imperatve languages are divided into two main types:
1.Procedural-Commands are generally executed in the order they are written,except where control flow statements jump the order,the fastest way to write a short program,but also very difficult to organize and control in a larger program,for the reason that every part of the program affects every other part;the more complex the program becomes,the more untrackable bugs begin to appear.C is the most popular procedural language.
2.Object Oriented-The program is organized into self contained objects,which limit access to variables and functions.This way it is much easier to control the program.All the other languages in the C family,such as C++,Objective C,and C# are object oriented,or OO.There are languages such as Java and Objective C,which can only be written in OO style,or mixed languages such as ActionScript(used in Flash),which can be written in either a procedural or an OO style.PERL is another example of such a mixed language,as is AppleScript,although there are very few OO AppleScripts floating around.
If you want to program for OSX the most relevant languages would be C,Objective C,and Java,and PERL .Cocoa uses the first three,and the UNIX underbelly is written mostly in C and PERL.As far as books are concerned,install the Developers tools and start looking through the documentation.Also I recommend a firm understanding of the mathematic and logical underpinnings of programming,a great place to start is Introduction to Algorithms by Thomas Cormen et al,one of the best technical books there is,it starts from a basic level and moves to a very advanced one.You may want to read first How Computer Programming Works by Daniel Applebaum,this is a very basic explanation of the core of programming languages I found it to be very helpful.
P.S. I forgot to mention another important division in computer languages,that between:
1.Interpreted and
2.Compiled languages.
Interpreted languages are translated into assembly language,which communicates directly with the processor,as the program is running,and compiled programs are translated ahead of time.Needless to say compiled languages run faster.XML and JavaScript are interpreted,Objective C is compiled,and Java is both.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
thankyou.....i appreciate that answer so much more than a one -liner!
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Sep 2000
Location: Medford, MA
Status:
Offline
|
|
This is a good place to start.
Uhm... kiddding. I'll think about this and post later. C isn't exactly the best learning language. Python is probably the language that makes the most sense to me, but I'm not sure if there's a great beginner's book about it. It's mostly a language people pick up when they're frustrated by perl. It's simple, easy to read, and you can do powerful things with it.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Meida, PA USA
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
I'm thinking of getting the UNIX in a nutshell book by the O'reilly company
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Dec 2000
Location: Rehoboth Beach,DE USA
Status:
Offline
|
|
The whole ***** in a Nutshell series is good,they make excellent reference works.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
Whats with the *****? Why noy just say UNIX? and what does*NIX mean? is it any different?
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2001
Location: Rehoboth Beach DE
Status:
Offline
|
|
***** stands for wild card,there are other books in the series covering other languages,such as Java and PERL,by the way the * operator comes from PERL,at least used in this way,in the C languages * is for pointer declaration
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by 4.669:
<STRONG>***** stands for wild card,there are other books in the series covering other languages,such as Java and PERL,by the way the * operator comes from PERL,at least used in this way,in the C languages * is for pointer declaration</STRONG>
* is also a wildcard in the shell, too, among other places 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
i just learned that.....find *.p would find all files ending in .p
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: New York
Status:
Offline
|
|
Originally posted by Rick1138:
<STRONG>=
P.S. I forgot to mention another important division in computer languages,that between:
1.Interpreted and
2.Compiled languages.
Interpreted languages are translated into assembly language,which communicates directly with the processor,as the program is running,and compiled programs are translated ahead of time.Needless to say compiled languages run faster.XML and JavaScript are interpreted,Objective C is compiled,and Java is both.</STRONG>
 This is a mistake! You got the definitions of compiled and interpreted backwards!
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Computer Error: Unknown
Status:
Offline
|
|
Try REALbasic. It's got to be the easiest language to learn and use. It's also very powerful.
|
"...Because the people who are crazy enough to think they can change the world,
are the ones who do."
-To the Crazy Ones
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by davecom:
<STRONG>  This is a mistake! You got the definitions of compiled and interpreted backwards!</STRONG>
No, he got them the right way round, they just weren't terribly clear 
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by graphiteman:
<STRONG>Try REALbasic. It's got to be the easiest language to learn and use. It's also very powerful.</STRONG>
It's not terribly powerful. It's also bloated, slow, buggy, and costs $$. Use it as an introduction to OO principles, if anything 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
im getting UNIX in a nutshell and maybe a book on c
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Get Practical C Programming. It's by O'Reilly too. I have it and it's pretty good. Although I'd suggest Java for a begginer, cause automatic garbage collects rocks, and it's easier to understand.
But whatever u want,
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Meida, PA USA
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Computer Error: Unknown
Status:
Offline
|
|
Originally posted by Angus_D:
<STRONG>
It's not terribly powerful.</STRONG>
It's quite powerful. And if a function you need isn't directly available, you can make just about any toolbox call. The only thing you can't do is access Cocoa functions, and that can acheived with plugins.
Originally posted by Angus_D:
<STRONG>
...It's also bloated...</STRONG>
REALsoftware is working on a new compiler for version 4.0.
Originally posted by Angus_D:
<STRONG>
... slow...</STRONG>
REALbasic is quite fast. Where is it slow exactly?
Originally posted by Angus_D:
<STRONG>
...buggy...</STRONG>
This is somewhat true, and many bugs are being fixed with each release. Also REAlsoftware has a bug reporting application to let users report bugs, which makes it easy and quick to fix bugs. REALsoftware will work with you if you have a showstopper, too.
Originally posted by Angus_D:
<STRONG>
...and costs $$...</STRONG>
The standard edition costs around $100. There is also academic pricing available.
Originally posted by Angus_D:
<STRONG>
...Use it as an introduction to OO principles, if anything  ...</STRONG>
Not only is it an excellant introduction to Object-Oriented principals, but it also is a very powerful implementation of the princepals. It is just fine for everyday use.
Let's continue this debate in this thread: *DEBATE*:"]http://forums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=34&t=001405]*DEBATE*: REALbasic vs. Cocoa[/url].
|
"...Because the people who are crazy enough to think they can change the world,
are the ones who do."
-To the Crazy Ones
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
how do i compile a c program in os x? i tried cc -o hello.c hello.o but it didnt seem to work.
|
|
_______void_______
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Originally posted by v0id7:
<STRONG>how do i compile a c program in os x? i tried cc -o hello.c hello.o but it didnt seem to work.</STRONG>
You got hello.c and hello.o backwards. After -o should be the desired executable file, while at the end should be the source file.
HTH,
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Nowhereland
Status:
Offline
|
|
ok thanks! 
|
|
_______void_______
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|