Learning to program for Mac and/or iOS. The official thread. - Page 2 - ehMac.ca
Facebook
Twitter
YouTube
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Advertise


Reply
 
LinkBack Thread Tools Display Modes
Old May 10th, 2012, 05:33 PM   #11
Resident Hijacker
 
Sonal's Avatar
 
Join Date: Oct 2003
Location: Toronto, and proud of it.
Posts: 8,758
A long, long time ago, in a galaxy far, far away, I once programmed in C/C++.

Consequently, the most useful hand I can lend you is this one:
__________________
Interested in creative writing?
Sonal is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old May 10th, 2012, 05:48 PM   #12
Retired Mayor of ehMac
 
Join Date: Feb 2000
Location: Ontario
Posts: 10,264
Send a message via AIM to ehMax
Quote:
Originally Posted by Dennis Nedry View Post
I have one thing to tell you, and you can thank me later.

Do not rely on Interface Builder as much as everyone would like you to.

You absolutely 100% need to know how to create user interfaces in code. For some reason, a lot of Cocoa related topics teach this to you backwards- they'll tell you just to drag and drop stuff in Interface Builder, without explaining how anything actually works.

If you learn this way, you can get stuck in a rut where "Interface Builder is magical and I don't need to know how it works". And the world doesn't need another one of those programmers- we've got enough of them clogging up the iOS and Mac App Stores.

Once you know how to create user interfaces programatically (without using a single NIB or XIB file), THEN and ONLY THEN would I recommend that you learn to use Interface Builder properly- as a shortcut, and NOT as a substitute for foundation knowledge that you need to know.

I don't know why the majority of material out there teaches this backwards, but it does. So be warned. Knowing how to do things in code will separate you from the rest very quickly, it will let you do things that everyone else gets stumped over in IB (because a lot of things you simply cannot do in Interface Builder- like writing your own widgets).

Also, avoid ARC initially. You need to know how Objective C memory management works, and I'm not sure if ARC is being pushed as hard as Apple is pushing it elsewhere. And avoid storyboarding in iOS, it's almost just as bad as IB- it's great for saving time, but only once you know how to do things manually.

-DN
Thanks very much for advice Dennis. I will receive it and believe it.

When I started doing web-stuff a long time ago, I learned on GoLive CyberStudio, which was really nice drag-n-drop, but I would often hear how horrible the HTML was.

This time around, I hope to slowly and methodically learn C and really get a handle on that. Assuming I haven't decided by then that programming isn't for me, I will then expand from there.

I'd like to learn PHP and Ajax as well, as the software that ehMac runs on so heavily uses. Right now, I depend on a developer, but I'd like to learn to be able to know what I'm doing as well.
ehMax is offline   Reply With Quote
Old May 10th, 2012, 05:55 PM   #13
Retired Mayor of ehMac
 
Join Date: Feb 2000
Location: Ontario
Posts: 10,264
Send a message via AIM to ehMax
Question for those familiar with Xcode.

The course calls for simply a "C Compiler".

Any instructions / tips for using Xcode as a simple as possible "C Complier" for when I start the course? Is there any possibility I may run into trouble trying to do assignments on a Mac with Xcode, vs someone who is doing it on a PC with some other tools?
ehMax is offline   Reply With Quote
 
Old May 10th, 2012, 06:10 PM   #14
Full Citizen
 
Join Date: Sep 2007
Location: Isla Nublar
Posts: 507
[deleted]
__________________
Finally eaten by a Dilophosaurus.

Last edited by Dennis Nedry; May 16th, 2013 at 02:02 AM.
Dennis Nedry is offline   Reply With Quote
Old May 11th, 2012, 03:33 PM   #15
Honourable Citizen
 
Join Date: Jun 2009
Posts: 3,336
Quote:
Once you know how to create user interfaces programatically (without using a single NIB or XIB file), THEN and ONLY THEN would I recommend that you learn to use Interface Builder properly- as a shortcut, and NOT as a substitute for foundation knowledge that you need to know.
sound advice for anything really, not just learning code

you want to drive? learn to drive stick before automatic...want to dj? learn to beatmatch before getting onto traktor.
broad is offline   Reply With Quote
Old May 12th, 2012, 02:20 PM   #16
Assured Advertiser
Honourable Citizen
 
jfpoole's Avatar
 
Join Date: Sep 2002
Location: Waterloo, Ontario
Posts: 2,198
Quote:
Originally Posted by ehMax View Post
Question for those familiar with Xcode.

The course calls for simply a "C Compiler".

Any instructions / tips for using Xcode as a simple as possible "C Complier" for when I start the course? Is there any possibility I may run into trouble trying to do assignments on a Mac with Xcode, vs someone who is doing it on a PC with some other tools?
I'd recommend creating an Xcode project for a command-line tool. That way you don't have to futz with command line tools.
Attached Images
File Type: png xcode-terminal.png (157.9 KB, 6 views)
jfpoole is offline   Reply With Quote
Old May 15th, 2012, 10:06 AM   #17
Retired Mayor of ehMac
 
Join Date: Feb 2000
Location: Ontario
Posts: 10,264
Send a message via AIM to ehMax
Quote:
Originally Posted by jfpoole View Post
I'd recommend creating an Xcode project for a command-line tool. That way you don't have to futz with command line tools.
Thanks jfpoole. That's the way I'll go. I was playing around with the first assignment, and that works good. With the "Editor" and "View" buttons on the top right, I'm able to create a screen that's pretty much a place to write code, and see the output at the bottom, and giving me what I need to do for assignments for now.



With that, and the day off, and access to the course figure out, today's the first day I can really sink my teeth into things.
ehMax is offline   Reply With Quote
Old May 17th, 2012, 01:02 PM   #18
Retired Mayor of ehMac
 
Join Date: Feb 2000
Location: Ontario
Posts: 10,264
Send a message via AIM to ehMax
Going well so far!

We're in Week 1, but I got my Week 2 assignments complete already, and have read the first 3 Chapters of the text book we are using, Absolute Beginner's Guide to C.

Really like the text book, as it starts from the VERY beginning, assuming that you know nothing about programming. (Me!) I've tried to get into programming several times now, but whenever I found a resource, it always seemed to assume certain knowledge. This one starts from the basics.

First week was just getting our C Compilers installed and testing, how the online course works, virtual introductions.

Week 2, I learned about basic of a program, some background to programming and C etc.. Then learned about the main() function, and different kinds of data, like Characters, Integers and Floating Points. Finally, we learned about commenting as you code, and also using white space and indenting to make the code also more readable.

First assignment was to take a program that was written in a singe, continuous line, and put code on their own lines, appropriate double line spacing, and appropriate indenting.

Code:
#include<stdio.h>
main() { int x=8; float y; y = (float) x; printf("When you convert %d to a 
floating point number,\n",x); printf("You get %f.\n", y); return 0; }
2nd assignment was a program that had lots of comments on it. We had to remove commenting that was frivolous / not necessary, keep comments that were applicable, and add some comments that the program should of had.

Code:
#include <stdio.h>
int main()     // start of main() function
{
   int age;
   // get user's age
   printf("How old are you? \n");   // prints How old are you?
   scanf("%d", &age);
   // compute future ages and print them
   age = age + 10;
   printf("In 10 years, you will be %d.\n", age);
   age = age + 10;
   printf("A decade after that, you'll be %d.\n", age);
   return 0;  // returns 0
}
Just got my first marks back! Hey, gotta start somewhere.
Attached Images
File Type: png Screen shot 2012-05-17 at 12.53.14 PM.png (28.5 KB, 26 views)
ehMax is offline   Reply With Quote
Old May 17th, 2012, 02:01 PM   #19
Honourable Citizen
 
Join Date: Nov 2004
Location: Southern Saskatchewan
Posts: 5,974
Yes, learn to comment. Very important!

I worked with a C programmer who used to joke that a really good C programmer couldnt understand HIS OWN code.
__________________
Like my art page on Facebook
winwintoo is offline   Reply With Quote
Old May 17th, 2012, 02:42 PM   #20
Seriously?
 
Joker Eh's Avatar
 
Join Date: Jan 2008
Location: Mississauga, Ontario
Posts: 4,442
comments have saved my rear many times.
Joker Eh is offline   Reply With Quote
Reply

Tags
beginner, compiler, mac, programming, xcode

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iPad 2 trade-ins fetch up to $320 in Apple's official recycling program Lawrence All iOS - iPhone, iPad, iPod touch, Apple TV & iTunes 4 Mar 25th, 2012 07:39 PM
Official ehMac WWDC Thread ehMax Anything Mac 14 Jun 29th, 2004 01:13 AM
Official MWSF Rumors Thread Chealion Anything Mac 7 Jan 3rd, 2004 08:35 PM
Official MWSF Rumors Thread Chealion Anything Mac 7 Jan 3rd, 2004 08:35 PM
The Official WWDC-EhMac thread! Neil Yates Anything Mac 143 Jun 24th, 2003 03:26 PM


All times are GMT -4. The time now is 05:42 AM.



Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 1999 - 2012, ehMac.ca All rights reserved. ehMac is not affiliated with Apple Inc. Mac, iPod, iTunes, iPhone, Apple TV are trademarks of Apple Inc. Content Relevant URLs by vBSEO 3.6.0 RC 2

Tribe.ca: Urban living in Toronto!