Thursday, April 19, 2018

Game of Life, Part 1

Step one: Storyboard

  1. Create a new Xcode app from scratch, iOS Single View Application, Swift.
  2. In the project settings, uncheck the landscape orientations so the app will work only in portrait mode.
  3. On the storyboard, add a UIView (View).
    1. Give it 1:1 aspect ratio
    2. Give it a background color so you can see where it is
  4. Add a caption above the square UIView that says Game of Life or something appropriate.
  5. Below the UIView, put 6 buttons in a row that say: Clear, Start, Stop, Step, +, and –. 
  6. Put the 6 buttons into a Stack View.
  7. Put the buttons, the UIView, and the caption into a Stack View.
  8. Add constraints to the main stack view, using the I-beam tool, to keep it 8 px away from the right and left edges of the screen.

Step two: Code

  1. Add a new file: 
    1. Cocoa Touch Class, 
    2. Derived from UIView,
    3. call it CellView. Be careful of upper and lower case letters here.
  2. Attach the new CellView class to the UIView on the storyboard.

Step three: figure out how to draw a grid.

  1. Math

Wednesday, March 7, 2018

Color Mix with Stack Views

How I did it:

  1. Make sure each slider has a width
  2. Make sure the color view has a height
  3. Make the stack views
  4. Test in landscape orientation and also on smaller and larger devices.
Questions to ask next:
  1. What, if anything, is clunky in this app? (Think: redundant)
  2. Could you make the app better?

Monday, February 26, 2018

Lesson 21: What's next?

With all you’ve learned in this course, you now have the skills to write lots ​
of apps.
You might wonder what kind of apps to write. Here are some suggestions ​
to get you started:
  • Look through your app journal for ideas. What are apps that you think ​
you can write with your current skill set?
  • Redo an app from the course without looking at the directions (except when you need to).
  • Brainstorm some fun ways to use combinations of images, text, buttons, and any other controls you’ve used.
You can also try making changes to the apps you wrote during the course:
  • Write a version of ElementQuiz about something more personal to you, or with questions and answers.
  • Keep track of the moves a user makes in Rock, Paper, Scissors, so the app can make better guesses.
  • Expand AnimalSounds to include more animal buttons and animal sounds.
In the end, you’ll improve your skills if you work on an app that hooks up actions and outlets, uses stack views and constraints, and uses Swift code to make something happen. After enough time, these challenges will become second nature to you.

What’s Next?
  • What app should you build next?​

  • What problem do you want to solve?​

  • What game do you want to create?

What now?
  • The answer is up to you.


Wednesday, February 14, 2018

Things to think about

Could you make an adaptive interface for the Color Sliders (Lesson 17) so that it will run on a smaller or larger phone, and in both landscape and portrait orientations?

How could you make the Color Sliders app look better on an iPad, which has a much larger screen than a phone?

How could you add more elements to the element quiz (Lesson 18) without making graphics for each element?

Can you add more animals to the animal sounds app? (Lesson 18)

Find me an online lesson/tutorial (perhaps a game) we have sufficient knowledge to do together.

Find me an online Apple Watch lesson/tutorial that we have sufficient knowledge to do together.

How could we make any of these apps even better, in addition to the ideas above?




Wednesday, January 24, 2018

Lesson 12 Problems

There is at least one page in Lesson 12 that generates errors due to an internal bug.

Don't worry about it. Just skip that page and continue working on the next page.


Thursday, January 18, 2018

Idea Storm #1

This is from Lesson 4 ... Due Monday, Jan. 22 ... Do this at night or over the weekend.

Outside of class, take about 20 minutes to quickly write down as many app ideas as you can. You should come up with 20 to 30 ideas. Write them up in Google Docs and print them out. Can you print this many ideas on one page? (You could try two columns.)

Have you ever wished that there was an app for that? Now’s your chance to get all of those wishes down on paper.

Brainstorm as many ideas as you can for apps you want to make. It doesn’t have to be something new. You could have ideas about an app that already exists, but maybe you want to know how it works or how to make it better. Write down even the apps you think are impossible or just plain silly. The sky’s the limit.

This will be a list you’ll return to over and over again as you learn about developing apps. Keep it handy so you can add to it and refine it as you go.

Suggestions:

Just write down whatever comes to mind. You’ll get into what might be “doable” later.

Think about problems you have. ​
It doesn’t have to be anything big. Think about your daily routine or a social activity. What kind of app could make life easier for you or others?”

Think about different categories of apps. An app about animals or plants. A health-related app. A travel-related app. A social app that doesn't exist yet. An app related to your schoolwork or your parents’ work. A game.


Friday, January 12, 2018

Naming Playground

Things we talked about:
  • DRY = Don't Repeat Yourself
  • Identifier
    • Start with a lower case letter
    • Camel Case
  • Constant (keyword "let")
  • Variable (keyword "var")
  • Autocompletion - use the arrow, tab, and return keys
  • Assignment operator (=)
  • Making your code understandable

Pet Show code
let numberOfTickets = 150
let ticketPrice = 10
let roomRentalFee = 1000
let posterCost = 40

let revenue = numberOfTickets * ticketPrice
let expenses = roomRentalFee + posterCost
let income = revenue - expenses

iPhone Video code
let iPhoneCapacity = 64000
let iPhoneCapacityUsed = 10000
let iPhoneCapacityAvailable = iPhoneCapacity - iPhoneCapacityUsed

let mbPerMinuteOfVideo = 180
let minutesOfVideoAvailable = iPhoneCapacityAvailable / mbPerMinuteOfVideo

Watermelons and Oranges code

Understanding this code means understanding what each of the abbreviated variable names means. Understanding the variable names means you must understand what the problem is and how to solve it. This is a mathematical problem and you should be able to figure out what they are trying to do. Understanding what you are trying to accomplish, using math, is the first part of accomplishing any programming task.

co = orange pallet count
cw = watermelon pallet count
ow = orange pallet weight
ww = watermelon pallet weight
to = total weight of oranges
tw = total weight of watermelons
ttl = total weight
es = weight on each side of the truck
lhso = orange pallets on the left hand side of the truck
rhso = orange pallets on the right hand side of the truck



Tuesday, May 30, 2017

Letters of Competency

The letters of competency are attach to your certificates. The letter of competency evaluates you on a scale of 1 to 4 on several different skills. Here are the different skills and how I evaluated them.

You may not be receiving a certificate if you attended only one semester or if you did not receive at least a C grade. In that case, you may still receive a letter of competency with no certificate attached.

  • Technology - I observed you using the computer
  • Mac skills - did you clean up your Mac desktop?
  • Design - based on your Portfolio
  • Web and JavaScript - based on your portfolio
  • Technical vocabulary - I observed you
  • English - several writing assignment including your case studies, Young Girl programmer, Football player mathematician, and your Homeless story
  • Math - several assignments including the Geometry Coordinate quiz, the gears, and navigation icons
  • Research - based on several writing assignments including Hidden Figures and Automaton
  • Basic App skills - based on early apps such as Word Collage, Clock, Stopwatch, and Unit Converter
  • Advanced app skills - based on your ability to do the modifications, plus fruits and vegetables, the advanced unit apps such as Flash Cards, and your final app
  • Initiative - based only only on your willingness to do the modifications and the extra credit assignments
  • Attendance - I looked at your numbers in Jupiter
  • Appearance and Dress - adherence to the school dress code
  • Cooperation - how you behaved in your two group projects
  • Respect - by observation
  • Accepts Responsibility - by observation of you working in your group
  • Productivity - based on your overall grade, plus your willingness to work outside of class
  • Follows instructions - based on how many assignments you did not turn in
  • Honesty - based on whether you misled me or your group about your intentions


Monday, May 22, 2017

BMI Calculator in HTML and SVG

US UK Metric









Results

10 15 18.5 25 30 35