Pitch Perfect App – Udacity Nanodegree iOS Developer (Course 1 – App 1)

In the first Udacity Nanodegree iOS Developer (course 1) I built an app called Pitch Perfect from scratch. Pitch Perfect allows the user to record audio using the device’s built-in microphone. The user is then able to use this recorded audio file to add four (4) different effects to it. Those effects are namely, Slow Speed (Snail Image), Fast Speed (Rabbit Image), High Pitch (Chipmunk Image) and Low Pitch (Darth Vader Image). The Framework that was used is AVFoundation. Introduced to iOS 8 is AVAudioEngine which is used in Pitch Perfect to vary the Pitch to “Chipmunk” and “Darth Vader” effect . One of the main resources/websites I used in researching during building Pitch Perfect was Stackoverflow.

Here is my Github repo for Pitch Perfect:
https://github.com/alexpaul/PitchPerfect

Screen Shot 2015-06-07 at 9.58.43 AM

First Screen where user records audio

Second screen with four (4) Effects to add to recorded audio

Second screen with four (4) Effects to add to recorded audio

Swift and Udacity

I have been writing iOS code since 2012. I have taken some online courses along the way as well. During this journey I have released three (3) apps on the AppStore. This year I am head first into making a transition to becoming a full-time iOS developer. Currently my daytime job is in the construction industry, namely doing carpentry/framing of interior spaces in New York City. I am very excited to do this career transition. However there are voids in my coding that I feel need improving upon, hence Udacity iOS Nanodegree. I came across Udacity last weekend while searching for tutorials on iOS integration with Web Services. Udacity provides a structured course with career development guidance.

What have I learned so far in the Udacity Nanodegree course?
The current lecturer, namely ,Kunal Chawla, started lesson 1 with walking us through the Xcode development environment. We learnt about the Xcode UI. The three main windows being: the Navigator on the left, Editor in the center and the Utilities Area on the right. The navigator as the name implies allows you to navigate through the files and assets of your project. The Editor is where code is written for your app and the Storyboard/UI is also manipulated and configured in the Editor area. The Utilities area has the object library, widgets to add to the UI such as buttons, labels, image view etc. In lesson 2 we started working on an app called Pitch Perfect. The app enables a user to record audio and modify that audio recording with various effects. In that lesson we started building the app. We added a microphone button and stop button to the initial view. We also custom added an image asset to the microphone and stop button. In iOS there are three asset sizes that a developer needs to provide. There is the 1x asset for iOS devices prior to Retina and there is 2x that’s Retina optimized and the newest 3x asset for iPhone 6 and 6 Plus. Autolayout was used by adding constraints to views to keep them aligned in various screen sizes relative to a reference point. In lesson 3 and 4 more implementation was added to the app to create its feature set. We embedded the initial scene in a Navigation Controller to allow transitioning between screens. With the navigation controller the Pitch Perfect app is now able to transition from the first screen with the microphone to the second screen which has the effects the user can choose from to manipulate their recorded audio.

AVFoundation framework enables all the audio development in Pitch Perfect. As with any Framework the library needs to be imported into your class so you can make full use of its methods and properties.

In iOS there is a fundamental programming concept known as MVC. Model, View, Controller. This practice is highly recommended in developing apps as it keeps those three principles separate and concise thus making the apps implementation easier for the developer and anyone reading their code to understand.

The Model is all the data objects of the app. In an app like Flickr that would be the photos, users, geolocation, etc. In Pitch Perfect its the recorded audio, title, file path.

The View is the user interface of the app. All the UI the user interacts with makes up the View. Buttons, Keyboard, Text Fields, Date Picker and so on. UIKit, a Cocoa class makes most of those UI View elements available to your app. Examples are UITableView, UIButton, UIViewController, UIDatePicker…… More can be seen under the documentation for UIKit.

The controller is the glue that keeps it all together. The communicator between the Model and View is handled by the Controller class. In the case of Pitch Perfect it’s the file RecordSoundsViewController.swift This file responds to actions that the user makes. Example, tapping on the microphone to record their voice. Switching between views, that’s all the job of the Controller. UIViewController is one of the most powerful UIKit classes. The view cycle of an application lies within the functions of UIViewController. Setting up the initial state of an app when it first launches for example can be customized in the viewDidLoad method of UIViewController. This class is also the parent class of UINavigationController which in itself is a powerful class.

To test our application development builds we used the iOS simulator. It’s able to simulate all iOS devices including the iPad.

To become a great developer you have to get use to reading and exploring the Apple Developer Documentation is paramount. In the docs there is code for Objective-C and now Swift. Most of the API is still written in Objective-C. So knowing Objective-C is still essential to landing an iOS developer job.

Delegation is one of the widely used practices in everyday iOS development. That’s where a calling object delegates task to the delegate and is able to be notified of changes in that Framework. That particular Cocoa Framework would have a set of protocols, some of which are optional and some may be required. If the protocol method is required it must be implemented in order for it to conform to the Class’s Delegate. A typical example is what cell did a user tap on? In the UITableView Class this delegation is done by the method didSelectCellAtIndexPath method. More on delegation in the documentation.

Race Report: 2015 NYRR Brooklyn Half Marathon

At the Brooklyn Half Packet Pickup

brooklyn half race pickup

I have kept my running miles to a bare minimum since my left knee got injured a few months ago. I however managed to do a long run (13 miles) last Monday in preparation for today’s Half. I am very glad I was able to complete this run because it at least gave me confidence that my knee would be able to hold up for the mileage. Unfortunately not the speed for racing. So the pace I would be able to hold today was very unclear (I would have been quite content just breaking 2 hours).

Anh and I decided to run together since we haven’t done so for a very long time.

At mile 1 we started off at an 8:30 minute / mile pace. I felt great from the start thanks in part to warmup running to the start from the subway. It was almost too good given my lack of mileage so I was a bit skeptical about the latter part of the run but knowing the Brooklyn Half Marathon course pretty well I knew the second half of the race is ideal for negative splitting so I know if my knee help up I would be okay. The second mile was the same 8:30/mile. We saved a bit for the one steady climb in Prospect Park. Again I was able to comfortably push my way up the hill with no knee issues. If anything the downhill is where I used more caution.

At mile 7 about right where we exit the Park and head towards Ocean Parkway I started pushing the pace a bit more due to how great I felt. I made sure to ask Anh if the pace was okay for her. Being that we haven’t trained together lately keeping pace moves comfortable for us both was essential.

From mile 10 to the finish I told her and we agreed to really push the pace for the last 5K. The weather did forecast for rain it wasn’t until mile 10-11 did it start drizzling (which I welcomed and loved) and went on to full torrential rain (which at this point I just wanted to finish). As in hollywood it stopped pouring immediately upon our crossing the finish line :-) (I swear I didn’t make that stuff up, lol) There was a slight pain in my right hip after mile 6 at which point I made sure to increase my cadence and shorten my stride. During the race we tried to make sure we walked most aid stations and fuel appropriately. It was only pass mile 11 that we ran through the stations. I had to stop twice for potty breaks but made sure Anh kept going with the steady pace we were running and I met up with her. At the two occasions I had to catch up to her I was able to hold 7:05s and felt good. This blew my mind because for the entire season I haven’t gone pass 8:30/mile in training.

We finished on the Coney Island boardwalk in a time of 1:47:41 / 8:13 per mile. The last 5K we averaged 7:50s. I couldn’t be any more proud of my performance today. This gives me some confidence heading into the start of training for the NYC Marathon in July. Nutrition was on point. I took one gel at mile 9 and water and gatorade throughout. Another great Brooklyn Half.

Before

2015 Brooklyn Half Pic 1

After 1

2015 Brooklyn Half Pic 2

After 2

2015 Brooklyn Half Pic 3

After Dark

2015 Brooklyn Half Pic 4

Race Report – Scotland Day Run

The year started out with some hopes of having a great running season. This hope would be short lived due to a left knee injury. This injury seems to still be somewhat a puzzle even after consultation with my orthopedic. With the MRI report he said there is degenerative cartilage and some bone marrow edema. Recommedation: R.I.C.E (Rest, Ice, Compression, Elevation). He also went on to say it could be genetic since it wasn’t an apparent training injury. So since that visit about three weeks ago I haven’t done any running. Fortunately I have done swimming and bike training. I have also been taking “I live Pain Free” supplements recommended by my Physician.

Today’s race my goal was to run without aggravating the injury in any way and evaluate my running for the short term.

Mile 1 to 3 of the 10K race I held MAF zone and took it deliberately easy out there. I’ve said it before and will iterate here, keeping a slower pace than normal especially in a race is quite challenging even with my MAF training. I did my best to keep this slow pace. Right at Mile 3 I started feeling very warmed up and ready to take the pace slightly higher. That’s when my cadence went at least 10 spm higher and I somewhat envisioned Chrissie Wellington’s last Kona performance where she appeared to be running with shorter more turnover strides. In doing so there was no pain present and I felt great. I kept this form throughout the race and in doing so I timed 7:30s on mile 5 and 6.

I am extremely satisfied with the turnout of this race. It gives me much needed confidence heading into Brooklyn Half marathon next month. I will still keep running to a bear minimum and continue my swim, bike sessions.

Finish Time: 54:23 (8:46/mile)

Sliding Door for Bikes/Utility

Built a sliding door 66″ x 93″ to conceal our bikes. The sliding door mechanism is by Johnson Hardware. The door was build using 3/4″ MDF. Currently it’s being painted with Chantilly Lace OC-65 Satin Oil.

IMG_7716-0

IMG_7720-0

IMG_7721-0

IMG_7724-0

IMG_7725-0

IMG_7750-0

IKEA Rationell Drawer Modification

I love the ease of changing the front face on the IKEA drawers so I bought a Rationell drawer and worked on modifying it to fit a 12″ base cabinet. Below are some pics showing the mod.

Sample Work Pics

Just a preview of work I’ve done

Stripped and Color Washed Table

After completing two leafs on our dining table I stripped and color washed for the final look.

Apartment Renovation Update

Since receiving a “Side.By.Side – French Door” Bosch Evolution 800 Refrigerator a few weeks ago from a friend we have been engaged in doing some Kitchen renovation on our place. We have been working on the apartment on a room by room basis since moving in back in April. The first room we focused on was our toddler’s room. We did some lighting, plaster work and some wall upgrade in his room. The living room, hallway, bathroom, son’s room have all been totally skim coated with plaster to gain a smooth new wall feel and look. The Kitchen is now being upgraded somewhat “accidentally”. The plan was to work on it sometime in the future. But as with life there is the factor on unpredictability. With a 36″ fridge the cabinets had to be reworked because what we had before was the standard 30″ refrigerator. Stay tuned for more updates…..

 

KneeFit App now on the Apple AppStore and the Google Play Store

Injured? Just looking to keep your knee strong and healthy? The KneeFit App is for you. Now available on the Apple AppStore and the Google Play Store.

icon

Keep your knee strong and healthy by using the strength and stretch exercises in the KneeFit App.  Doing a few exercises daily will keep your knee healthy and fit. As an active individual I use the exercises in the KneeFit App before and after my workouts. Whether you are going through therapy, recovering, or maintaining an active fitness lifestyle the KneeFit App is for you.

app_banner

google-play-logo

Follow

Get every new post delivered to your Inbox.