3.7 Q&A - Apps and Learning
I was wondering, how many apps will we have made at the end of the course? And what kind of apps will that be? - Nick
10-24 apps - based on code exercises and app challenges.
Right now the course is super flexible, so I'm going to make a list to get more suggestions for "simple" apps.
The types of apps are up to the class, what do you want to learn?
If it fits with the materials, we can probably do it, otherwise I’ll try and use it in one of my more advanced courses.
Post on the forum: http://forum.iphonedev.tv/t/app-suggestions-for-code-exercises/195?u=paulsolt
I am a total programming beginner, so this exercise completely threw me for a loop (and on Day 2! That was a tad discouraging :D)
I actually found the bonus part easier to understand and do than #1 or 2 because a) I have no idea what Double or Int numbers are, and
b) Even when I found the code examples on stack overflow I was unsure where to put them in my code or what ways I would need to alter them in order for the answer given there to fit into my project.
String and NSString examples given there sailed right over my head like the Swift bird. - Chris
Day 4+ will go into the programming details and explain everything. Right now I want you to be a little confused, that is the first step in learning.
You need to get the big picture, which is the point of the first several days. Now that you see at a high-level, how an app works, I can start explaining the programming concepts, without boring you.
The Code Exercises will challenge you to think, and discover the parts you don't understand. Post questions on the forum, search Google, and watch the upcoming videos on the basics.
I am feeling so depressed, Its my last year in school and i very bad at c++ ;( i am getting really bad grades in computer science. Paul help !! - Kyle
- Did you get the lesson code working?
- Grades don’t matter in the big picture. Learn and follow your passion, then your grades will follow.
Being bad just means you don't have enough practice or experience. Set some goals to learn something new in this course.
It takes time to learn something new, and you need to be ok with going outside your comfort zone. Explore, experiment, and write code.
I think it helps to have an end goal in mind. C++ doesn't provide a tangible way to show something in the same way that Swift does. Make apps, it's a lot more rewarding to see something you create, instead of a boring algorithm in C++.
Personally, I don't like traditional programming courses that only focus on theory (I don't like theory), I'm a hands-on practice type of person. I need to try to learn, theory is just ... theory.
am I okay? ivar: new term for variables in swift. -Aldo
Short name for "instance variable" which means that it's owned by the current object. Used in object oriented programming languages (OOP).
I am surprised to see Swift String class not contain default Float or Double conversion methods. Do you feel this is something Apple left out because of time, or because they wanted a lighter weight String class that only casted out to NSString when necessary.
The reason I ask is that it seems a String extension is ideal for adding the functionality based on my research, but that would then, as I understand, burden the String class with the functionality anyway. The other way is to do that inline, but that seems inefficient if you have to do it more than once, as is the case here. The other option I found is the bridgeToObjectiveC method, but that just seems like a terrible idea as if I wanted to be using ObjectiveC, I'd be using ObjectiveC. - Josh
Double and String
I agree, the lack of type conversions from String was very frustrating. I would recommend you submit a bug report to apple, requesting the additions.
I think it was a time constraint, since there were major issues in the first beta's that they have since resolved.
Fernando had a nice post on the extension, which would solve the problem. But that's an additional chunk of code you'd have to maintain and keep in a "Swift code library" that you use between projects.
Not great for beginners or people coming from Objective-C expecting a full solution, like in Objc.
Performance
Don't worry about performance now, that's a slippery slope that leads to in-action. The naive code approach is the best place to start. Xcode comes with Instruments, which is a performance tool to check what areas actually need to be optimized.
Optimization is always last.
I understood the demonstration of breakpoints and how you can create them...but I don't understand WHY one would use them. - Benjamin
You mainly use them when you're tracking down crashing app bugs.
If Apple rejects your app due to crashing, you have to try and reproduce the error and find it in code to fix it. Otherwise you can't sell the app. That means no money!
It's like searching for a needle in a haystack without a debugger app, and that's what Xcode is. Using Xcode's breakpoints you can isolate chunks of code to look for the bad line or lines of code.
It let's you get into the CPU's brain and see what is really join on. Seeing the state of an app (variables + method calls + flow) is very useful in a complex program.
Right now you're dealing with <100 lines of code, but think, how would you deal with 10,000 lines of code, or 100,000 lines of code. You can't possible keep all the code in your mind, so you need to look at certain parts and leverage tools to help you uncover the real problem.
Until you get to a situation where you have a bigger program, some of these topics won't make sense, but then when you do, you can come back and re-learn what you didn't fully understand.
Any software you recommend for designing UI? - Shashwat
I love pen and paper.
Otherwise use fluid.io or balsamiq.com
2.6 Auto Layout for Beginners - At 2m50s, I don't know how do this this. The label is moving. I don't see rules in green.
Create a connection with right mouse click, not left. Or 2 fingers on trackpad, or using Ctrl+Left-click and drag.
problem with changing the keyboard layout. I've taken a screenshot to show you what i have...and it looks nothing like what paul gets when he selects his text field inputs! -Miles
You accidentally hide the options. Click the "Show" text to the right of Text Field, on the top of the Utilities Panel.
Spend a minute or so explaining what each new method or function does
I am happy that we get on with it in the manner you are doing. What I would like is a recommended reference source where I can go to read about whatever we have been discussing.
For instance, is there reference material (in addition to the Help text that Fernando kindly pointed out) to read about animateWithDuration and its parameters where we can go to discover more? -John
Yes, I plan on getting more links and resources to supplement the materials. I'll make a note for my upcoming lessons.
just a quick word to let you know I love your lessons. I do have to pause the video quite often to write some code and catch up, but I think this is the way to go so everyone can do the lesson at their own pace. I found the Day 2 exercise challenging, I tried a bunch of code before finding something that worked, but was very happy when I did found a solution. I think it could be nice to have some quick feedback from you in the Q&A the next day, just a minute or 2 where you could tell us what was the most efficient approach and why. Thanks again. - Eloise
Great!
There are many approaches. Depending on the complexity, I might provide a solution, but many of the posted code examples seem to provide enough direction.
At the end of the day, the naive approach is always best. It doesn't have to be the fastest, it just needs to get the job done.
Fight less battles and get something working, that way you'll be able to ship an app.
May I ask why you don't build the user interface in the any-any size class? Apple recommends doing as much work as possible in that size class (said in "What's new in Interface Builder" from WWDC 2014). - Ludvig
I'll investigate that and make changes based on what I find works best for new videos.
Visually I find the large "canvas" unwieldy and hard to explain to beginners.
The course is more focused on iPhone apps to start, and I want to reduce complexity for beginners.