Assembly language.
Don't laugh. At a top university, in the days
As for brain damage, I know PhD's in CS who started out and got interested this way as kids (hacking Basic and peek/poking 6502 asm on their Apple II, C64, et.al.)
Don't laugh. At a top university, in the days before everyone had a laptop, in the "Intro to Computers" course for non-CS/engineering/science-majors, they started out teaching an assembly language. It was a toy assembly language with only a dozen op codes, designed to teach the basic concept of the parts of a computer (ALU, addressable memory, etc.)Assembly language.![]()
My primary goal is programming for Mac and the iPhone because I love the interface prettiness and the operating system.![]()
People learn differently. ...
That's why there's no universal answer to this question. The answer will vary from person to person depending on their goals and learning style. Given these variables, I have a few suggestions based on some over-simplified stereotypes derived from an aggregate of the many similar threads on this subject:
Hit the ground running This person wants to get up and running on Apple technologies quickly and will get discouraged if they aren't able to start working with Interface Builder making simple GUI apps relatively quickly. I say go for the Kochan-Hillegass Route. After you've satisfied your need to make "physical" things and see the basics of how apps are made, come back to C and invest the time and energy into mastering the details of how everything works.
I did assembly language in my first year at uni. Quite enjoyed it actually, it was nice being so close to the metal, banging around single bits and running comparators and complicated jumps. It's a bit old-school for today's times, especially for a 15 year old, so I don't recommend getting heavily into it. Learning a little bit about it is fine.
GorillaPaws made the best post in this thread. From what you say, the 'hit the ground running' option seems to fit your age and what you want to do. Hell, it's probably the best for me too if I ever seriously try to get back into programming.
My primary goal is programming for Mac and the iPhone because I love the interface prettiness and the operating system.![]()
There you have it. You like the pretty interface and the nice operating system. A perfectly valid reason to want to create more, and that's a helpful hint as to the path that's best for you.
Sarcastic or serious? I am in little doubt lol![]()
|---------------C#
|----------- Java----------------
|---> C++------------------------------
C |
----> Obj-C-----------------------------
If I succeed some day making an application for Mac, how difficult is it to male it compitable with Windows?
That depends on what language you program it in, what framework(s)/libraries you use, how complicated your program is and if you wrote it to be portable. If you do it the 'mac way', with Objective-C and Cocoa, then it could be very difficult to port it to Windows just like how a Windows .NET application could be very hard to port to a Mac. If, however, you use a language and framework that is supported on multiple platforms, it could be almost trivial.
For example, if you wrote a Mac application using C++ and Qt (my language and gui toolkit of choice) then getting it to run on windows could be as simple as just compiling it on a windows machine. Not only that, the 'mac version' will look and feel very much like a native Cocoa app and the 'windows version' will look and feel very much like an app using native windows APIs. I try to avoid using Objective-C and Cocoa for this very reason. I want my apps to run on both Macs and Windows boxes, if possible. If I must use native OS APIs, then I only use them when I have to and do the rest with portable frameworks/libraries/etc.
This is all getting ahead of where you need to concentrate for now. For now, just worry about learning the basics of some language, be it C, objective-C, java, whatever. You've got lots of time to learn how to write cool looking GUI applications, that could run on multiple platforms.
Which of the following names are invalid names? Why?
Int playNextSong [B]6_05[/B]
[B]_calloc[/B] Xx alphaBetaRoutine
clearScreen [B]_1312[/B] z
ReInitialize [B]_[/B] [B]A$[/B]
Because they can't start with _ or a number, and $ is not legal anytime
#include <stdio.h>
int main (int argc, const char * argv[]) {
int Int;
int _1312;
int _calloc;
//int 6_05;
int A$;
int _;
Int = 10;
_1312 = 23;
_calloc = 32;
A$ = 43;
_ = 34;
printf("%d, %d , %d\n",Int, _1312, _calloc);
printf("%d , %d", A$, _);
return 0;
}
Or you could try them out in xcode and see if they work.
I did, because I certainly se no problem with naming things _calloc, and _1312 looked suspicious, _ seemed rediculous, as did Int and A$.
But guess what? Only 6_05 didn't compile and run fine!! (I knew that one wouldn't)
Code:#include <stdio.h> int main (int argc, const char * argv[]) { int Int; int _1312; int _calloc; //int 6_05; int A$; int _; Int = 10; _1312 = 23; _calloc = 32; A$ = 43; _ = 34; printf("%d, %d , %d\n",Int, _1312, _calloc); printf("%d , %d", A$, _); return 0; }
If A$ wasn't supposed to work.. then maybe its because you can't be sure what character encoding the document or compiler will be aware of. There are LOTS of reasons not to use names like these, Apple reserves _function methods (or at least they say they do...), but they say nothing about using _name variables.
Time to replace all my counter variables with a single _
Now you gotta explain me what Forth is x)
Programmer education algorithm #1:
Step 1. Google it.
Step 2. Search Wikipedia.
Step 3. Ask on a forum.
You left out Steps 1 and 2.
Now try that in Forth.
VARIABLE Int
VARIABLE _1312
VARIABLE _calloc
VARIABLE 6_05 ( not illegal in Forth )
VARIABLE A$
VARIABLE _
DECIMAL
10 Int !
23 _1312 !
32 _calloc !
605 6_05 !
43 A$ !
34 _ !
: %d ( addr -- ) @ . ;
: ., ( -- ) ." , " ;
: %d, ( addr -- ) %d ., ;
Int %d, _1312 %d, _calloc %d CR
A$ %d BL EMIT ., _ %d CR
6_05 %d CR
When I see code like that I understand why there is a caps lock key.Code:VARIABLE Int VARIABLE _1312 VARIABLE _calloc VARIABLE 6_05 ( not illegal in Forth ) VARIABLE A$ VARIABLE _ DECIMAL 10 Int ! 23 _1312 ! 32 _calloc ! 605 6_05 ! 43 A$ ! 34 _ ! : %d ( addr -- ) @ . ; : ., ( -- ) ." , " ; : %d, ( addr -- ) %d ., ; Int %d, _1312 %d, _calloc %d CR A$ %d BL EMIT ., _ %d CR 6_05 %d CR
Makes me want to program microcontrollers again.
When I see code like that I understand why there is a caps lock key.
I think this speaks to the point of why this poll question is fairly useless. People learn differently. Probably the worst thing that could happen is that a potentially talented programmer gets discouraged early and gives up (unless of course programming really isn't for them--then the sooner they figure this out the better).
People want to get different things out of programming. Some like coding really close to the metal, others like working with high level abstractions that allow them to do complicated things quickly. Some people are really passionate about programming specifically for Apple platforms, others want to program professionally where knowledge of many languages and technologies is critical. Some are interested in pursuing programming as a hobby and having "fun" is the prime motivation.
That's why there's no universal answer to this question. The answer will vary from person to person depending on their goals and learning style. Given these variables, I have a few suggestions based on some over-simplified stereotypes derived from an aggregate of the many similar threads on this subject:
Hit the ground running This person wants to get up and running on Apple technologies quickly and will get discouraged if they aren't able to start working with Interface Builder making simple GUI apps relatively quickly. I say go for the Kochan-Hillegass Route. After you've satisfied your need to make "physical" things and see the basics of how apps are made, come back to C and invest the time and energy into mastering the details of how everything works.
Meticulous This person is very detail oriented and wants to build from the ground up; they are patient and don't want to move on to the next thing until they've mastered what they've covered. This person should probably start with C or possibly even assembly.
Broad and Diverse This person's ultimate goals is learning a range of languages, but they like to start off with the easier concepts, and dig deeper into the details after they understand the high-level concepts. I think Python is a great language for this type of person. They will have fewer syntactical issues to deal with and will be able to write code that works on a variety of platforms. Once they feel comfortable solving problems with code they can move on to lower-level languages.
These categories are neither perfect nor exhaustive, but hopefully they are helpful in giving someone trying to figure out how to start some direction (because honestly, with such a diversity of languages figuring this out can be daunting).
If I some day in the feature wanted to do some Windows programming (C++ or C# I believe), will it be possible to learn C fairly quick if I know Objective-C?
I just have a quick question about it: where do I get the exercises?
Sure there is his forum, but it's not ALL the exercises there is.