PDA

View Full Version : iOS programming for complete novices


torifile
2011-08-27, 22:46
Any pointers on where to start? I'm not interested in learning all that much theory unless it applies to specific programming issues I'll encounter. I have some books but without specific direction I feel lost. I'm not against taking an online course or something to help but I'd prefer it to be very hands on and give me a product that I can use for the apps I'm interested in developing. TIA.

Brad
2011-08-28, 10:49
How much other programming experience do you have? Does "complete novice" in this context mean "none"?

torifile
2011-08-28, 11:37
Some web programming with PHP and mySQL but that's all self taught and I don't know what concepts like object oriented vs. a procedural language, etc. means aside from the fact that Obj C is object oriented. I had some programming back in high school but that was getting on 20 years ago (holy shit I'm old!). Basically, I know enough programming to make sense of what I'm seeing in code some of the time (more so with web languages) but not enough to write my own stuff.

chucker
2011-08-28, 11:50
Well, that's more than I would have expected from the initial post. :) Maybe it's enough for Stanford's Developing Apps for iOS (http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=395605774) (fall 2010) class on iTunes U.

torifile
2011-08-28, 11:59
Well, that's more than I would have expected from the initial post. :) Maybe it's enough for Stanford's Developing Apps for iOS (http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=395605774) (fall 2010) class on iTunes U.
I saw that but I wasn't sure how good it was. I'll give it another look.

torifile
2011-08-28, 23:22
I worked through the first 2 classes of the series and I got stumped for a while making the translation from the SDK he was using to 4.0. After nearly pulling my hair out because I had "breakpoints" on in XCode and my app kept crashing, I got the calculator working. :) But I already feel a little over my head with the OO part of things. :\

I'm going to keep plugging away at it and see how far I can go. I kind of get the concept behind OO programming so I'm hoping I can figure it out. What I really need to do is go back to school and learn some of this stuff from the ground up... But, alas, no time for that. :lol:

chucker
2011-08-29, 00:26
Yeah, I think (it's been a while since I watched this) he assumes knowledge of C and OOP. But at the same time, he also does explain little bits of OOP as he goes along, since most people's idea of OOP relates to, say, C++ or Java, not the rather different Smalltalk/Obj-C flavor.

There's tons of tutorials out there to learn more of the basics, but I can't really fix your lack of time.

ThunderPoit
2011-08-29, 06:13
I was struggling a bit to start out too. I found a very helpful book tho: Programming in Objective-C (http://www.amazon.com/gp/product/0321711394/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0672325861&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=01KEM1FFAYGPWBKF9KN2)
It can be a little dry at times and you spend most or your time having your program write stuff out using NSLog and very little time in interface builder, but if you barely know what a class is, its a great place to start.

torifile
2011-08-29, 06:35
That's the problem with this programming thing for me - it's the complete lack of time. Between a full time job and having 2 kids, time's just in short supply. I'll have to prioritize this since I can't afford to pay a real iOS developer what they're worth and I'm tired of waiting for this app to magically appear. :)

I'm a bright guy - I can learn this on my own. :)

torifile
2011-08-29, 08:59
ok, this is a really stupid question and I'm even embarrassed to be asking it - but is there a reference for basic math functions? Like 1/x, etc? And what the hell is it called when you have the negative of a number? As in 2 and -2? (I swear, my tolerance for embarrassing myself amazes even me...)

I feel stupid. :o :lol:

chucker
2011-08-29, 09:10
Well, 1/x can be done just like that, e.g.:

float foo = 5;
float bar = 1/foo; // 0.2

Should work.

And negating a number can be done by multiplying it with -1:

int foo = 5;
int bar = foo * -1; // -5

A lot of useful functions like the square root are provided by math.h, as described here (http://developer.apple.com/library/ios/#documentation/System/Conceptual/ManPages_iPhoneOS/man3/math.3.html) (or by writing 'man 3 math' in Terminal). This page (http://www.touch-code-magazine.com/objective-c-math-functions/) shows some of the more useful ones.

Brad
2011-08-29, 09:13
ok, this is a really stupid question and I'm even embarrassed to be asking it - but is there a reference for basic math functions?
Google? ;) First hit for "objective-c math" gave a page that lists "pow" (exponentiation), "sqrt" (square root), "ceil" ("ceiling": always round up to nearest integer"), "floor" (always round down to nearest integer), "round" (traditional rounding), and so forth.

Like 1/x, etc?
In general, you have to "solve for x" on one side of the equation yourself before you program it. So, given an equation like "5y + 2 = 3z^2 - z - 10", you have to reduce to one unknown variable in terms of the known variables. If you know "z", then you'd have to manually that equation reduce to "y = 15z^2 - 5z - 40" before plugging it into code to do the actual arithmetic for you.

And what the hell is it called when you have the negative of a number? As in 2 and -2?
The additive inverse. Just multiply a value by -1 (or subtract it from zero if you hate multiplication) to get that.

torifile
2011-08-29, 10:07
Google? ;) First hit for "objective-c math" gave a page that lists "pow" (exponentiation), "sqrt" (square root), "ceil" ("ceiling": always round up to nearest integer"), "floor" (always round down to nearest integer), "round" (traditional rounding), and so forth.

Duh... :o I did google but all I found was a handful of functions. I tracked down a reference manual that has a few more built-in.


In general, you have to "solve for x" on one side of the equation yourself before you program it. So, given an equation like "5y + 2 = 3z^2 - z - 10", you have to reduce to one unknown variable in terms of the known variables. If you know "z", then you'd have to manually that equation reduce to "y = 15z^2 - 5z - 40" before plugging it into code to do the actual arithmetic for you.

For 1/x, I was just referring to the label on a calculator that inverses the number. Just dividing 1 by the number.

The additive inverse. Just multiply a value by -1 (or subtract it from zero if you hate multiplication) to get that.

Duh, again. Jeez. This is making me dust parts of my brain I have long forgotten. :lol:

709
2011-08-29, 12:53
Whoa. I was pretty decent in BASIC back in the day, and this looks fairly familiar.

I've been thinking myself about learning a little iOS programming for a couple of simple things I have in mind. I take it a knowledge of that may help a bit? Enough to overcome the initial hurdle of *not* wanting to do it because I thought I'd be drown in indecipherable code?