Post Mobile Makers

I just arrived back in Virginia from Mobile Makers and it seemed like I just left. Mobile Makers was hands down the best experience of my life and I met some amazing people along the way. The amount of knowledge I was able to gather while I was there was more than I ever thought was possible. For the past three weeks my team, which includes Vik and Aaron, work on an event sharing app we call “With.” It was a great project and we are still working on it now to make it better. We ended up having over 25 view controllers and over 100 .h and .m files. I definitely learned the most these past three weeks working on the final project and it was an awesome experience. We incorporated a chat feature that used parse push notifications, pagination, page view controllers, friending, profiles, custom table view cells and the list goes on and on.

The open house was this past Thursday at Mobile Makers and was my first chance to interact with recruiters and show off our app. It was really fun and I met some great people. I can’t wait to start applying to jobs this week and to keep learning even more. I am so glad I took a chance and moved to Chicago for Mobile Makers. It has opened doors that I never even knew existed.

 

-Blake

Day 16 at Mobile Makers (NSNotification Center)

Today was the last day of official classes with the structured schedule we have been following. Next week we will get an assignment to build an app that is already in the app store and we only have until Thursday to finish it. It should be a blast, working every second possible to get the project done. The point of doing that is to show us and get accustomed to a client coming to us with a big project with a deadline. After that, we break up into groups for the big final project for the last three weeks. Vik, Aaron and myself are teaming up on the final project and we are doing something we think is really cool. We are going to code our final project in both Objective-C and Swift. I am really excited to dive into Swift more while continuing to expand my knowledge of Objective-C.

We had our group photo today and after that, mostly everyone left for the day. It ended up being only Vik and I at Mobile Makers so we decided to do a project together, to hopefully submit to the app store. We decided to do a project called “SeeNote.” The concept is that the user can take a photo anywhere they are and then write text associated with it. Then they can view all their photos and texts together in a tableView with the date they took it and a tag associated with it. Then they will also be able to view where the photo was taken on a map as well as seeing where all their photos on a map are. We got a really good start on it last night and I ended up working on it at Mobile Makers until 1am. It was a long 17 hour day but very productive and our app is looking great so far. The cool thing about our app is that it isn’t using a backend server like Parse, we are using core data to store everything and this is giving us great practice with core data, since it was such a hard topic from this past week. I am going to spend the weekend working on SeeNote while reviewing earlier concepts and diving into Swift a little bit.

The code below is awesome…

– (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGRect frame = self.floatingView.frame;
frame.origin.y = scrollView.frame.origin.y +440;
self.floatingView.frame = frame;

[self.view bringSubviewToFront:self.floatingView];
}

– I wrote it and it allows a “floating” button to be on a table view and it scrolls with the table view at the botton so it never disappears.

-Blake

Day 15 at Mobile Makers (Core Data, Relationships(code related))

Today I learned a lot but some things that really stuck are that viewDidLoad only gets called once. So if you go to another view controller and come back to the original one, then viewDidLoad will not be called. So then if you need to reload data or anything else back in the original view controller, you need to put those methods in the viewWillAppear. ViewWillAppear gets called each time the view “appears.”

self.items = [[self.managedObjectContext executeFetchRequest:request error:nil] mutableCopy];

The code above is really cool because it makes a mutableCopy of the array returned and sets it as self.items. This allows us to go from a NSArray to a NSMutableArray because originally, fetch request returns an array.

Don showed us this super awesome thing…

cell.detailTextLabel.text = @(adventurer.raid.count).description;

In the code above, the super awesome thing is in the (). Basically this expression that starts with @(code here). This expression allows us to turn anything into an object and call a description method on it. So you can turn a integer into a NSNumber or whatever else you like.

Today was really challenging for everyone, from simple mistakes with naming to anything else you can think of, we all struggled. I barely made it to the second step out of six from the MVP and that was right in line with half the class and the other half didn’t even make it that far.

I’m trying to picture how core data ties into using backend databases like Parse. I am thinking that we can save images we get sent on our own device so that we can still view them offline and then we get new images and items from the Parse backend or whatever else when we are online by using things such as pull to refresh etc…

“It’s not about what you know, it’s about what you know you can do”

-Blake

Day 14 at Mobile Makers (Core Data, NSFetchRequest, NSManagedObjects

Persistence is preserving data from one application load to the next time it is loaded, a way to save data offline and this is also how our topic today, core data, ties into everything. Core data is a way to save data each time the user uses the app so that the next time they open it, that same data is still there. The key thing to remember with this is to check the core data box when making your new project in the master template. Then you can make a new entity and with this entity you can give it attributes with specific types like string or int. Then you can reference these attributes because they are key/value pairs.

This week is really challenging and my mind is on overload with the announcement of swift as well. I have dived into swift some already and once I become a little more familiar with it, I think I am going to love it. Some of the main things I noticed are that you don’t have to specify variable types, which is really neat. Also, everything you type shows up on the right side so you can see what is happening as you are typing.

Don showed me a neat trick today using animations. The code is below and then I will explain it.

– (IBAction)onTextFieldTapped:(id)sender

{

[UIViewanimateWithDuration:0.5

delay:1.0

options: UIViewAnimationCurveEaseIn

animations:^{

self.containingView.center = CGPointMake(self.containingView.center.x, (self.containingView.center.y -50);

//way to set this to the center of the view?

}

completion:^(BOOL finished){

}];

}

This code above is an action that is tied into each textField on a view controller. All these textFields are in their own view, separate from the main view. Every time a textField is exited, the code above runs and after a 1 second delay, it moves the view as a whole down the y axis by 50 pixels. This is pretty cool because as the user moves down from a textField to the next, the whole view moves up with it and this ensure that the keyboard is never covering any of the textfields.

Kevin gave a really awesome github tutorial today and it cleared a lot of things up for me. He showed us a example of two people working on a project and showed us how to do a project from start to near completion. He showed us best practices to ensure that we did not run into merge errors as well. I will go more in depth on his tutorial in a future blog post after working with it more. Next week we form groups and that will be our first chance to really dig into using push and pull requests along other developers and seeing how the whole process works.

-Blake

Day 13 at Mobile Makers (Persistence, NSUserDefaults)

Today was a huge day not only for us at Mobile Makers but all developers. Apple announced at the WWDC that iOS 8 would be out in the fall and that they have a new programming language to use to build iphone apps called Swift. At first this really made me nervous that I am learning Objective-C now and then in the fall Swift will be introduced but the more I thought about it, the more excited I got. It is going to be a great opportunity for me to be on the same level as all other developers. No one is going to have 20 years of experience on me with Swift because we are all going to be new to it at the same time. I have already downloaded the 500 page Swift iBook and am going to read it daily. I couldn’t be more excited. Aside from that, Apple introduced some truly amazing features like continuity across all iOS devices and it should be an amazing experience when they are officially released.

I was the “driver” today in class. Meaning, that I was in charge of typing everything the instructor said. Kevin was our instructor today for the first time as Max is in SF for the WWDC. Kevin did a great job and I learned a lot of cool tricks like when initializing an array I can do NSMutableArray *array = [NSMutableArray array]; instead of the whole alloc]init]; It’s little short cuts like this that are going to save me a lot of time in the future.

We did data persistence today and I am still trying to wrap my head around it. It is basically a way to store data when the iphone is offline. I am going to need more time to work with it and really see how it works. For now, I am going to go code more and start reading some about Swift.

-Blake

Day 12 at Mobile Makers (Auto Layout, Constraints)

Auto layout and constraints were the two topics of the hackwitch today. I am pretty comfortable with the basics of these because I did some tuitorials before coming to Mobile Makers. I think the key with these two items is to practice practice practice and try to have your app as laid out as possible in storyboard before putting constraints on objects.

Some things we re-went over today included delegates. A Delegate is a way for two objects to interact. They perform functions for an object without another object knowing about it. We discussed the app delegate for the first time and found out that it is loaded every time the app starts. So we want to limit what goes into it because it will take longer to load if we put too many things in it.

One topic for me that is still hard to wrap my brain around is blocks. I know blocks happen when we don’t know how long something is going to take when we are retrieving data from an outside source. They also almost always happen asynchronously, meaning in the background while other stuff is still going on. This benefits the app because it isn’t waiting for everything from the block to come back before moving on with other tasks.

A random cool Xcode trick I learned today is that when the stimulator is open, you can press command left arrow or right arrow and it will change from portrait to landscape view and vice versa. This is really useful when using autolayout and different constraints.

A small reminder I had today when building a project was that primitives are not objects, thus you cannot put them in an array. Only objects can go in an array. Primitives are bool, float, int, double etc…so you must have NSNumber when you have class properties that are numbers that are going into an array because NSNumber is an object.

image

 

Above is a picture of something I made while trying to understand maps and map kit better. It really helped to write everything out and step back and see how everything worked.

-Blake

Day 11 at Mobile Makers (CLLocation, MKDirections, MKLocalSearch

Today was the most challenging day so far at Mobile Makers by far. We got the location of the current user while also being able to find locations near that user based on a search. There are what seem like to be 10+ new class methods that were thrown at us today. I am glad tomorrow is the weekend so I can catch up and look through them all and read the documentation and really see what they do.

It was a challenging today but I am glad we are learning about maps and locations. It is an essential skill to master to be an IOS developer. I plan on doing a lot of mini side projects this weekend to really grasp the steps in being able to use maps.

One cool thing I learned today while Max was teaching, is that you can have a NSMutableString. With this mutable string you can append items to it so that you have a list of items or directions etc… Here is an example…

[directionsString appendFormat:@”%d: %@ \n”, x++, step.instructions];

The NSMutableString is named directionString and what we are doing taking each instruction in the step and assigning it a value of X, which starts at 1 and then increments up from there by one each time. The ++ after the X increments it and if you did minus minus on the other side of the X it would decrement it. So in this example, we are printing out directions to a location and giving the directions step numbers so they are easier to read. The \n makes a new line so that each numbered direction is on its own line. This was very useful to learn and I anticipate using it quite often in the future. BTW- we had the above code in a for loop that was iterating over the steps of a whole route and that’s how we were getting each one. Instructions is a property of steps, which is of class MKRouteStep.

Tomorrow is auto layout and constraints. I have a little practice with them and I know it is going to be extremely challenging. I’m excited to learn all the best practices associated with auto layout.

-Blake

Day 10 at Mobile Makers (MKMapView)

This week is the week I am most excited for. We are learning about maps and core location, both of which are critical to know when making apps. Today we started with MapKit and apple has already done a lot of the work for us. Within a few short steps, we can have a working map of the world and drop “pins” anywhere onto it. Today we used more JSON data and I am starting to get familiar with it and its syntax. On a lot of job applications I have seen so far they are looking for people who are well versed using JSON data so I am going to continue to work on my skills in this area more and more.

I learned a cool trick today that for placeholder text when setting a label or something put your variable first and then do     ?:       “Placeholder Text” this will set the text to “Placeholder Text” if the variable is nil. Pretty cool. Fast enumeration is going to be used a lot I believe and I am trying to practice with it as much as possible. Fast enumeration allows us to take an array or dictionary of objects and display them on a large scale, like a bunch of individual items on a whole map, by retrieving their longitude and latitude.We can create new objects each time when going through an array or dictionary.

Today I really dug into the documentation that apple provides and I learned a bunch. I am going to make it a goal to read the documentation first on my own before going to sites like stack overflow. Tomorrow is going to be awesome dealing with Core Location and I am really excited.

 

-Blake

Day 9 at Mobile Makers (Dictionaries, API, NSUrlConnection)

After an extend memorial day weekend, we were back at it at Mobile Makers and we focused on API’s. API stands for Application Programming Interface and it is a way to access data from a website like Instagram or Twitter etc… In order to do this in Objective-C, you must first declare a URL then declare a request. From there you can connect to the API and get information. Depending upon how the API is set up, it could either be a Dictionary or Array or a combination of either or both. Today we used MeetUp.com’s API and it was a Dictionary of Array’s with more dictionaries within. This was a little hard to wrap my head around at first but after thinking through the problem and getting a little help along the way from Don, I got it.

A random thing I learned today is that the cell of a UITableViewCell has its own image property that you can access when populating a UITableView and this allows you to put a nice image on the left side of the screen.Today we also really focused on dictionaries and basically they have “key” “value” pairs. So the key could be name and the value of that name is “Blake.” This is a way to reference large quantities of data and is really useful. The syntax is a little weird at first because they use {} braces instead of [], but after awhile, it becomes second nature. We accessed MeetUp’s JSON data this way today and using array methods as well.

I met with Kevin today and he showed me what the Model View Controller (MVC) is all about and I am going to start working on a side project under his mentorship to start focusing on MVC. I am going to do a matching game and it should be a lot of fun.

-Blake

Day 8 at Mobile Makers (Animation, Dynamics)

So today I got picked to show my code to the class and it was a lot of fun. I didn’t finish all the stretch goals but myself and Robert wrote some really good code and I was proud to show it off. I had a lot of complements after showing my code and one person even told me it was the best code walk through they had seen so far. The NSPredicate method seemed to really impress Don as well. Today was all about animation and during the hackwitch we made half of the game pong. It seemed like it was going to be really hard at first but after learning about the different tools at our disposal like collisions, behaviors and push etc…it really wasn’t that difficult. Xcode figures out most of the hard stuff behind the scenes, we just have to put the pieces together to make it work.

We had an assessment today and I knew the material really well, I just got hung up on one problem that I spent the entire hour of the assessment trying to figure out. I made a new custom class and in that class had a custom initializer method. In the .m of the custom NSObject class I was declaring the parameters of the method.

city = self.city;

state = self.state;

    return  self;

The above code is NOT how it is supposed to look within the custom initializer. This is what I had and I needed to say self.city = city; a small mistake but a lesson learned.

I have been working out the specs for a big weekend project that incorporates everything from week one and week two. I am really going to focus on the areas I am not comfortable coding and specificly focus on the Model-View-Controller as well as writing clean and easily readable code. Don showed me some cool tricks I will be implementing today. We have four full days to work this weekend and I’m excited to combine everything I have learned. Naomi and I are most likely meeting with our mentor tomorrow as well.

 

-Blake