Monday, March 11, 2019

Monday March 11

Mr. Brautigam will not be in class today. You will have a substitute teacher. This teacher worked in industry for many years. He may tell you about his career and he may give you some tips for your future.

Today you should be working on lessons 2.7 and 2.8. You may be a little behind. That is ok. But try to catch up as much as you can.

If your substitute teacher tells you about his experience in the technology industry, your assignment is to write me a coherent paper in Google Docs that tells me some of the things he talked about, since I cannot be there to hear him in person. The usual rules for writing assignments apply. Look at previous writing assignments from the Spring semester for examples. This assignment is due on Thursday. Try to do the assignment at home so you don't fall behind on the Xcode lessons.


Friday, March 8, 2019

Course Materials for Xcode 10

The lessons materials posted on the curriculum page may or may not work with Xcode 10. If your computer has upgraded to Xcode 10, you may want to use these lesson materials instead. When you download a unit, you'll download all the lessons in that unit.




Thursday, March 7, 2019

Revised Schedule

AM Class


Weeks 7-8
Week 7Unit 1, Lessons 1–8 and final project
Week 8Unit 2, Lessons 1–6
Week 9
Monday March 11Lesson 2.7: UIKit
Lesson 2.8: Data
Tuesday March 12Lesson 2.9: Controls
Lesson 2.10: Auto Layout
Weds. March 13Unit 2 Project: Apple Pie
Thurs. March 14Lesson 3.1: Optionals
Friday March 15Lesson 3.2: Type Casting
Week 10
Monday March 18Lesson 3.3: Guard
Tuesday March 19Lesson 3.4: Scope
Weds. March 20Lesson 3.5: Enumerations
Thurs. March 21Lesson 3.6: Navigation Controllers
Friday March 22Lesson 3.7: Tab Bar Controllers
Week 11
Monday March 25Lesson 3.8: Life Cycle
Tuesday March 26Lesson 3.9: Workflows
Weds. March 27Unit 3 Project: Personality Quiz
Thurs. March 28Core Data

PM Class

Week 8
Thurs. March 7Unit 2 Project: Apple Pie
Friday March 8Lesson 3.1: Optionals
Lesson 3.2: Type Casting
Week 9
Monday March 11Lesson 3.2: Type Casting
Lesson 3.3: Guard
Tuesday March 12Lesson 3.4: Scope
Lesson 3.5: Enumerations
Weds. March 13Lesson 3.5: Enumerations
Lesson 3.6: Navigation Controllers
Thurs. March 14Lesson 3.7: Tab Bar
Lesson 3.8: Life Cycle
Friday March 15Lesson 3.8: Life Cycle
Lesson 3.9: Workflows
Week 10
Monday March 18Unit 3 Project: Personality Quiz
Tuesday March 19Core Data



Sunday, February 24, 2019

Difficult Pages and New Concepts

Unit 1, Lesson 4:
  • Page 4 has some intricate logic but you should be able to work it out.
  • Page 7 uses switch statements with ranges. This is a new concept. Explanation is in the book.
  • Page 8 introduces the ternary operator. This is new. Explanation is in the book.
  • Page 9 also uses the ternary operator.

Unit 1, Lesson 6 will introduce you to debugging, breakpoints, and the debug console.

Unit 1, Lesson 8 has two different simple apps you will make.

Unit 1, Guided Light App will have you write and change code and change the UI to the best possible.


Unit 2, Lesson 1, Page 5 - You need to pay careful attention to the instructions, especially regarding the use of case sensitivity.

Unit 2, Lesson 2, Page 4 - The pacing function may be difficult for you to formulate. You want to compare the fraction of the distance completed (current distance / total distance) with the fraction of the time used (current time / goal time). If the distance is farther along than the time, then you will beat the goal time.

Unit 2, Lesson 2, Page 6 - This has another pacing function. To calculate the pace, remember that

current distance        total distance
-------------- = ------------
current time             total time

Or, you could look at it this way:

current distance / total distance = current time / total time
current distance        current time
-------------- = ------------
total distance             total time

You want to calculate the total time based on the other three. (This would tell you, for example, how many minutes it will take you to run a mile.) Figure out the equation to determine the total time.

Unit 2, Lesson 3, Page 7 - I could not get the didSet functions to work without causing an infinite loop.

Unit 2, Lesson 3, Page 8 - Be aware, the willSet function behaves differently than the didSet function.

Unit 2, Lesson 4 introduces classes, which is an entirely new concept. Classes are similar to structures but they have some added capabilities, such as inheritance. Inheritance is an important concept for you to know if you plan to continue on in the future to Java or Android programming or AP Computer Science. We should probably do this lesson together instead of independently.

Unit 2, Lesson 6 introduces new uses of the for...in loop, such as indexes and key/value pairs. It also introduces while loops, which are an alternative to for...in loops.

Unit 2, Lesson 8 asks you to create two small apps and make them look nice, but you do not need to use constraints or auto layout, which will be in a future lesson.

Unit 2, Lesson 9 asks you to connect a tap gesture recognizer. The gesture recognizer exists only in the document outline, so you'll need to make sure it is open.






Everyone Can Code, Part 2: Schedule

The ECC 180 hour series will be mostly review of the 90 hour series for units 1 and 2. So we will expect to do the lessons at a pace of about one per hour. For the morning class, this means two lessons per day. For the afternoon class, we can do three lessons per day.

Some lessons have new or difficult concepts, and we will allow extra time for those lessons.

AM Schedule


Week 7
Monday Feb 25Developer Account
Lesson 1.2: Constants and Variables
Lesson 1.3: Operators
Tuesday Feb 26Lesson 1.4: Control Flow
Lesson 1.5: Xcode App
Wednesday Feb 27Lesson 1.6: Debugging
Thursday Feb 28Lesson 1.8: Interface Builder
Unit 1 App: Guided Light
Friday March 1Lesson 2.1: Strings
Lesson 2.2: Functions
Week 8
Monday March 4Lesson 2.3: Structures
Lesson 2.4: Classes
Tuesday March 5Lesson 2.4: Classes (continued)
Lesson 2.5: Collections
Wednesday March 6No class?
Thursday March 7Lesson 2.6: Loops
Lesson 2.7: UIKit
Friday March 8Lesson 2.7: UIKit
Lesson 2.8: Data
Week 9
Monday March 11Lesson 2.9: Controls
Lesson 2.10: Auto Layout
Tuesday March 12Unit 2 App: Apple Pie


PM Schedule


Week 7
Monday Feb 25Developer Account
Lesson 1.2: Constants and Variables
Lesson 1.3: Operators
Lesson 1.4: Control Flow
Tuesday Feb 26Lesson 1.5: Xcode App
Lesson 1.6: Debugging
Wednesday Feb 27Lesson 1.8: Interface Builder
Unit 1 App: Guided Light
Thursday Feb 28Lesson 2.1: Strings
Lesson 2.2: Functions
Lesson 2.3: Structures
Friday March 1Lesson 2.4: Classes
Lesson 2.5: Collections
Week 8
Monday March 4Lesson 2.6: Loops
Lesson 2.7: UIKit
Lesson 2.8: Data
Tuesday March 5Lesson 2.9: Controls
Lesson 2.10: Auto Layout
Wednesday March 6Unit 2 App: Apple Pie
Thursday March 7Lesson 3.1: Optionals
Lesson 3.2: Type Casting
Friday March 8Lesson 3.3: Guard
Lesson 3.4: Scope

Saturday, February 9, 2019

Grades at Progress Report One

Monday night, 9:55 pm

GradeAM ClassPM Class
A65
B94
C112
D20
F13
Median8181
Highest9899
Lowest5326

AM class: Median came up from 73 to 81.

PM class: Median came up from 73 to 81 as students turned in the App Journals.





Tuesday, February 5, 2019

Create a free developer account for Xcode

Please follow the steps of this quick tutorial today.


HVAC App?

This is a dictionary of symbols used in HVAC (Heating, ventilation, and air conditioning). We have an HVAC class at SVCTE. The class needs to learn all these symbols. Could you write an app that helps these students?

HVAC Symbols Information Sheet


Friday, February 1, 2019

App Journal (PM Class only)

PM Class Only

Write up App Journal for lessons 4, 5, 6, and 7.

Due on Monday, Feb. 4.

Share your app journal with me from Google Docs. DO NOT print it out.


Why Morse Code?

Morse code … has become an efficient tool for people that struggle with communication. Tania Finlayson struggled with communication for most of her life due to cerebral palsy. ~ Anthony

Recently Google added the ability to type in Morse code, which to most seems like more of a gimmick rather than a feature. However, to a person with cerebral palsy or others who have trouble keeping their hands steady, using Morse code must be more convenient to use since there are only two buttons to press. ~ Randy

This system may be effective for those with issues in either speaking or typing. Tania Finlayson, an assistive tech developer with cerebral palsy, is a major beneficiary of this app because it has allowed her to communicate. ~ Ayush

Morse code seems inefficient in the sense that a majority of the population do not understand it. 

Finlayson was born with cerebral palsy, which made it difficult for her to talk with others. ~ Catherine

Morse code allows people with speech disabilities to communicate faster than just using a standard keyboard. ~ Huy

The target audience for this app are people who are not able to talk. ~ Brian

Tania’s life was really hard because she has a head stick to point until she got two switches near her head that help her to communicate with other people. ~ Dat

The invention is important because it translates Morse code and speaks out the words aloud in English, giving the user a voice of their own. It allows people with limited mobility to operate a cell phone. ~ Jaiya

This app’s target audience is people who cannot speak and have poor motor skills. It removes communication as a burden for those with cerebral palsy or similar conditions. ~ David


Wednesday, January 23, 2019

Google Adds Morse Code Accessibility Feature to Gboard on iOS

Read the following article about a Morse Code app for iOS. It includes a link to a Google Blog post. Read that article also; it is a more complete version. Your response should demonstrate that you read both whole articles (not just the headline or first paragraph) and understand it.

https://www.macrumors.com/2018/07/12/google-adds-morse-code-to-gboard-on-ios/

In your response, consider answering these questions:

What is Morse Code?
Is Morse Code an efficient way to communicate?
Who is the target audience for this invention or app?
What do you think about this invention or app?
Why is this invention or app important?
What did you learn by reading this article?
What did you find particularly interesting in this article?
Any other issues you find interesting or appropriate.

Your assignment should be written in paragraphs, not bullet points, and the above questions should not appear anywhere in your response.

Rubrics for this assignment are posted here: 

http://mobileapps1819.svctestudents.org/lessons/m0/Writing_Rubrics.pdf

Write up this assignment however you like (Google Docs, MS Word, or ???) but you must print out the assignment (preferably at home) and turn in the printout. Do not share your work with me on Google Docs. If you share with me on Google Docs, I will reduce your grade. This assignment is due on Friday, Jan. 26.


Tuesday, January 15, 2019

Santa Clara student creates DNA test for food allergies

Read the following article and respond. Your response should demonstrate that you read the whole article (not just the headline or first paragraph) and understand it.

https://www.sfchronicle.com/health/article/Why-is-there-not-something-better-Teen-13525123.php

In your response, consider answering these questions:
  1. How did this person learn how to do this?
  2. What purpose does this invention or app serve?
  3. Who is the target audience for this invention or app?
  4. What do you think about this invention or app?
  5. Why is this invention or app important?
  6. What did you learn by reading this article?
  7. What did you find particularly interesting in this article?
Rubrics for this assignment are posted here: http://mobileapps1819.svctestudents.org/lessons/m0/Writing_Rubrics.pdf

Write up this assignment however you like (Google Docs, MS Word, or ???) but you must print out the assignment (preferably at home) and turn in the printout. Do not share your work with me on Google Docs. If you share with me on Google Docs, I will reduce your grade. This assignment is due on Thursday, Jan. 17.


Monday, January 7, 2019

Welcome to Mobile Apps Spring 2018

Focus

This semester, we will focus on learning Swift and Xcode with the objective of making iPhone and iPad apps.

Overview

  1. Basics: Constants, Variables, Data Types, Operators
  2. Control Flow (decisions)
  3. Xcode and Interface Builder
  4. Strings
  5. Functions
  6. Structures and Classes
  7. Collections and Loops
  8. Data
  9. Controls
  10. Auto Layout and Stack Views
  11. Segues and Navigation Controllers
  12. Tab Bar Controllers
  13. Model View Controller (MVC)
  14. Scroll Views and Table Views
  15. Saving Data

Grading

  • 1/3 = Career Readiness: Participation and professionalism.
  • 1/3 = Technical competence: Writing code and turning in a final app.
  • 1/3 = Academic preparation: App planning, research, and idea generation.

Tentative Schedule

WeekAM ClassPM Class
190-hour lessons 9-1690-hour lessons 1-8
290-hour lessons 17-20
180-hour lessons 1.1-1.3
90-hour lessons 9-20
3180-hour lessons 1.4-1.6180-hour lessons 1.1-1.5
4180-hour lessons 1.7-1.8; 2.1-2.2180-hour lessons 1.6-1.8
5180-hour lessons 2.3-2.5180-hour lessons 2.1-2.4
6180-hour lessons 2.6-2.9180-hour lessons 2.5-2.8
7180-hour lessons 2.10-2.11; 3.1180-hour lessons 2.9-2.11
8180-hour lessons 3.2-3.4180-hour lessons 3.1-3.4
9180-hour lessons 3.5-3.7180-hour lessons 3.5-3.7
10180-hour lessons Unit 4...180-hour lessons Unit 4...
11-12Additional TutorialsAdditional Tutorials
13-18Final App ProjectFinal App Project

And more ...

You will also write more in your App Journal. You will study apps written by other students. You will do more app tutorials than those above. And you will plan and create your own useful app from beginning to end.



Tuesday, January 1, 2019

Homework Policies

Sharing Google Docs

Share your Google Docs with me at this email address:

mbrautigam@metroed.net

Please do not use any email address that appears to be MetroED but is actually Gmail. That email address has been decommissioned.

Turning in multi-file projects using ZIP/compress

This applies to:
  • Web sites with multiple files 
  • Logos (multiple formats) 
  • Xcode projects 
  • Perhaps others ... 
You must put all the files together into a folder and zip them up, then upload them to the server.

Playgrounds must be zipped up but you do not need to put them into a folder first.

Resubmit Policy

Written Assignments

You can upgrade written assignments at any time by turning in a new printed copy with the old version (or versions) attached behind.

The reason for this is that we want you to have every opportunity to improve your English skills.

Web and Xcode Assignments

Don't bother turning in a technical assignment if you got 80% (usually 8 points) or more on it. I can revise your grade upward, but then I'll have to assess a late penalty.

The lesson is: turn in all your technical assignments on time.

SVG code template

Use this code to get started using SVG:

<svg width='600' height='400' viewBox='0 0 600 400'
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink= "http://www.w3.org/1999/xlink">

    <!-- the clipping paths and masks will go here -->

    <defs>
    </defs>

    <!-- the shapes and stuff will go here -->

    <rect x='0' y='0' width='600' height='400' fill='beige' />

</svg>

Radial gradients:

http://www.w3schools.com/svg/svg_grad_radial.asp

HTML Code Template

Here is a template for the minimal complete HTML page. If your page doesn't have all these elements, you should edit your page to include all of them. When you start a new page, you can copy and paste this code to get started.

<!DOCTYPE html>
<html>
<head>
    <!--
    YOUR NAME HERE, date, project name, class, etc.
    -->
    <meta charset='utf-8' />
    <title>My Web Page</title>
    <style type='text/css'>
    /* styles go here */

    </style>
</head>

<body>
    <h1>My Web Page</h1>
    <!-- page content will go here -->

    <script type='text/javascript'>
    // scripts will go here

    </script>
</body>
</html>

Add this line in the <head> section if you use responsive design:
    <meta name="viewport" content="width=device-width" /> 

Here is the code for a bullet list:

<ul>
    <li>Mission College
    <li>Ohlone College
    <li>West Valley College
    <li>Foothill College
</ul>

Here is the code for a table:

<table>
    <tr>
        <th>Key</th>
        <th>Command</th>
    </tr>
    <tr>
        <td>Cmd-Space</td>
        <td>Spotlight</td>
    </tr>
    <tr>
        <td>Cmd-S</td>
        <td>Save</td>
    </tr>
</table>

Here is an excellent tutorial on HTML tables (thank you to the student who linked this to your page):

http://www.w3schools.com/html/html_tables.asp

Spring 2018

Any posts beyond this point are from Spring 2018 and are here for informational purposes only.

Friday, May 4, 2018

Tips

Hide status bar

You apparently need to put this in every view controller where you want the status bar hidden.
override var prefersStatusBarHidden: Bool {
    return true
}


Incorporating video into your iOS app

Introduction

This tutorial should take 20 to 30 minutes to complete. Yes, it's really quick.

Apple does not have a widget or view for playing a video in. Instead, starting a video using the AVPlayerViewController will cause a segue to a popup where your video will play full screen. So, you'll probably want to have a button that initiates the popup and playback of your video.

You can play a video that is on the internet through its URL. You can also play a video that you store as a local file within your app. (Just like you store other files such as images, sounds, and fonts within your app.)

Materials needed

  1. Do the iOS section of Tutorial #1 above. Note that the page has instructions for both iOS and MacOS. Do only the iOS portion, about half the web page. When you get to the middle of the web page, and it says "Your app is complete" and then it goes on to Mac OS, you're finished with this step.
  2. Run the app and verify that the video plays when you tap the button.

Part 2

  1. Tutorial #2 above is similar to the first tutorial, but it has a different link to a different video. In the app you already made, add a second button that plays this video instead: https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4. You could make a second action method to play the video, but instead, just use the same action method, and distinguish between the buttons using their tags. When you tap the button with the other tag, it should trigger the playback of the alternate video URL.
  2. Run the app and verify that both videos play.

Part 3

  1. Download the nature.mp4 video file and drag it into your project. Make sure to check the "Add to targets" checkbox. 
  2. Look at the project settings (blue folder at the top of the Project navigator). Look at the Build Phases. Look at the Copy Bundle Resources. Check that nature.mp4 is in the list. (See the tutorial for pictures of how this works.)
  3. Create a third button to play the local nature.mp4 file.
  4. Create an action for the third button and use Tutorial #3 above to write the code. See the green checkmark for the appropriate code to write. It's best to type in this code instead of copy and paste. The code to play a local file is similar to the code for playing a remote URL. It is also similar to the code for playing audio (c.f. the Noise Maker project). 
  5. Run the app and verify that all three videos play properly.