Monday, February 1, 2016

Day 71

CodingDojo Review and Future Plans


To sum up the bootcamp:
  • 14 weeks of learning
    • First 2 weeks are web fundamentals and are off-site
    • 12 weeks of on-site instructions
  • Python Stack -> MEAN Stack -> iOS Stack
  • Earned red belt and 2 black belts
I think this bootcamp really tested me in two ways: how do learn things by myself and how to maintain motivation to fix a problem through an extended amount of time. The bootcamp is by no means a sprint, but a fast-paced marathon. There were times that I felt really burned out (2nd stack), there were times where I felt extremely frustrated at basic mistakes that I was making that broke my code. But I came out of this program a much more careful programmer. I started the program with some knowledge of CS but it put me to the test by hours upon hours of homework assignments. I had an issue of writing code to quickly and not being careful, therefore leading to syntax errors that gave me pretty ambiguous debug error as well as not knowing how to debug my code by myself. As an engineer, your job is to find solutions by yourself. This required a lot of patience and confidence on my part.

For me, when I ran into a problem I couldn't instantly fix in 1 minute, I would ask my instructor. Kris, my Python and MEAN instructor would look at my code and then walk away without giving me the answer. And I'm very thankful for that because it taught me to be patient with my work and to dissect my code so I know it intimately and how all the moving parts work together. By the 2nd stack, I had very few syntax errors and the ones I would get, I would know where to look for them. By the end of the bootcamp, I had the confidence to debug my code although I would not always be able to do it quickly but that comes with time and many more mistakes.

Now everything wasn't perfect. I didn't like how we only had 1 day to work on our project in our Python stack because of the Thanksgiving break. And for our MEAN Stack, we didn't have one at all because of the holiday break. Of course we can work on the project outside of the Dojo but collaborating with team members are hard when we don't have time to discuss what we want to do in person. The learning platform as well has its fair share of issues with the iOS platform having some outdated code. But, that might be their way of having to rely on yourself to read online the documentations to understand what is happening.

Their goal of creating "self sufficient developers" hold true. I can now make projects by myself and although I might not know off the bat how to do everything, I know how to learn everything that I need to, to make the project work. What I've taken away from the Dojo is that I really only scratched the surface of a vast ocean of knowledge. Was it worth the 12 grand? I think the long run yes, because I am confident that I will be able to find a high paying job. But that's because I put in 60-70 hours a week. 

This bootcamp isn't for slackers. You can suck at coding but you need to have the work ethic and patience to make mistakes and learn from them. So for any potential students, I would say this: any bootcamp you go into is gonna be a lot of work. If you're here to get the same jobs a full CS degree students apply for, you need to know just as much if not more since you won't have a degree to fall back on to get you interviews. Be prepared to work hard, be prepared to be very frustrated at your code, be prepared to feel overwhelmed, be prepared to feel mentally exhausted. But also be prepared to learn a lot, and be prepared to gain new confidence and skills as an engineer, as well as using words that you didn't even know the meaning of in the beginning of this and be prepared for the elation when your create a robust and cool application from scratch.

Future plans? Going to be a resident at the Dojo, working on my projects to show employers. They have a resume/career bootcamp afterwards too so we'll see how it goes! 

Friday, January 29, 2016

Day 66-70

Project Week + Graduation


This is the first stack where I had a full week to work on stack's project. My project's function is to be able to have a workout log, where you can customize each workout from a list of exercises where you can add/delete/edit each exercise. These workouts would then go to a log where, for every workout, a time would be displayed to show when you did these workouts.

This blog entry is going to be my entire project week wrapped up in one. I decided to do this project alone since I feel that I would learn more if I just did it by myself. 

My idea going into this was to use core data. However, there were a lot of hiccups when it came to using it since I've never used it before. I went through the learning platform's chapter on it. Core data is a database within each iPhone. It's structure is liteSQL. I haven't worked with a SQL database since my first stack so it took some adjustment. The first problem I ran into was the one to many relationships: I realized my entity structures weren't correct. I wanted to link my list of exercises to each individual workout. But what I needed to do was to create an exercise table that contains all the exercises but IS NOT connected to any other tables. 

After using MongoDB, I was blessed to have the ability to write arrays as a data type in my rows. Now, back to core data, I have to create another entity to just hold these many exercises. Cool, got that figured out. But the next problem was how to correctly link each exercise to a workout. My UI design is now at fault, since I haven't created a workout first before trying to add my exercises to said workout. What happened was a bunch of unwrapping nil errors. 

This issue took me a day to overcome because I was too stubborn with how I was approaching it, thinking up and failing with 5 different solutions. Eventually I had to go about it in a different way and I realized that I had to first add the workout and the workout exercises has to come later.

By the end of the week, I had the ability to customize prototype table views, add/delete/edit exercises, add/edit/delete workouts and ability to add exercises to each of their own workouts and almost had the ability to add these workouts to the log. Unfortunately, I couldn't fetch properly the data. So all my workout log had was just the title. This is a project that I'm going to keep working on because I'm passionate about fitness but it's also a good way to keep my Swift knowledge intact.

Annnnd....THAT'S IT! I graduated! I graduated as a double black belt student and it feels weird to be done but so exciting. For some people, it's a big weight of their back but honestly I feel like the pressure is still on until you find a job. Cause one, as a dev, you're never done learning, and two, you have to do all the linkedin and resume stuff to start applying for jobs on top of learning more CS.
My next blog will be a review of the bootcamp and my future plans.

Friday, January 22, 2016

Day 65

iOS Black Belt


Today is finally here! Time to get my last black belt. The test wasn't that bad as the materials on it are all things that we've done before. Now, my app didn't work completely the way it should have, instead I did some front-end manipulation to create a similar effect. Now I won't say too much about the test but after working with sockets, core motion, core location and kind of AV foundations, the black belt wasn't as bad as I thought. Although a big hamstring that happened was when you delete a reference to an outlet on your view controller but not in your story board..which led to an hour wasted on googling the answer and only realizing this is the error they warned you in the very beginning. 

The grading was instant and I boom, I got my last black belt!

Thursday, January 21, 2016

Day 64

AVFoundations


Last day of Hackathons. honestly, I'm pretty burnt out learning so quickly the new technologies we have the past week. AV Foundations is the library for all video audio and camera capabilities that an iPhone has. Unfortunately there are no solid tutorial online as a lot of them are written in objective-C. Mental note to myself: learn how to read obj-C so I can learn more Swift related projects. I found a tutorial that has me import 2 different libraries and the only thing I got done was having an app that accesses my phone's camera. After that, saving photos/videos don't work because I didn't write in the code where I want to save. This was annoying since you'd think there would be a default storage location but there isn't.

I decided to prepare for my black belt instead. So this blog entry isn't as exciting as it should be. Although if I do think of a cool app to make with this library, I will do so in the future.

Wednesday, January 20, 2016

Day 63

Core Motion and SpriteKits


Onto the third straight day of Hackathons, we are using Core Motion (using iPhone's gyroscopes and accelerometer). Naturally I thought of making games that requires tilting. To build an app like this, Xcode actually has a game development framework. We first import the Core Motion library as well as the SpriteKit framework. Core Motion allows us to use the accelerometers and gyroscope capabilities of the iPhone. So the first thing David and I did was to write a basic app that tells us the x/y/z coordinate tilt of the phone to make sure we understand how it works.

The next part was utilizing Sprite Kit. Instead of a storyboard for our UI design, we have a .sks file that's a scene for the game. We just added a picture of an asteroid and a built in object of a spaceship. The project design is whatever data we get from the Core Motion, we want to affect our game scene. Core motion is utilized by instantiating a motion manager class. We first got to move the spaceship around in the directions that we wanted via accelerometers. Now the second part is messing around with the velocity of our spaceship. 

Once we go the physics and movement of our spaceship down, we created asteroids. At this point, we don't know what the objective of our game is, we just wanted to see how to make stuff. Now, we would populate asteroids and give them a random direction and velocity. Now, we need a collision detector function that would detect collisions and alter the velocity and direction of both the spaceship and asteroid. The cool thing about this is that there are already methods to do this for you via contactTestBitMask. That function tests for if two bodies enter a shared space and run the logics of what angles and speed the two objects will have.

Tuesday, January 19, 2016

Day 62

Core Location



I think one of benefits of learning the different core libraries of the iPhone is really cool, but also super frustrating. The learning platform has no chapters on core location so we do what every software engineers do...we google. Core location actually isn't that bad; there are a lot of tutorials online for using it. Import MapKit to the view controllers to be able to use all the different methods and attributes. I partnered up with Maric and we wanted to do something like FireChat. FireChat is a group messaging app that is uses bluetooth rather than cell data. Our idea was to create a map app that can ping other individual coordinates so if you're at a large concert or venue that has limited connectivity, there would be a way to find each other.

The first day we spent just messing around with how to use MapKit and figured how to zoom upon our phone's location. Maric found a beacon library that uses cell data to see how close a phone is with another phone but we scratched the idea cause we wanted something that didn't use cell data. Eventually we conceded that cell data is required and our project became just a map that can ping locations of other phones who are connected to the same server.

The set up is simple, creating a server.js file with all the sockets that we need. However, it got a bit tricky when we wanted to send in and pull out data from the phone. Remember how I said Xcode doesn't have Javascript support? Well, Everything in MapKit relies on coordinates so every time we update our location, we have to send our new coordinates to the server (which is easy), however sending it to the other phones got tricky because we couldn't pull the information out of it and it wasn't a JSON object (it was an AnyObject) so instead of adding more features to our project, we could only add annotations of other people's position. Eventually Maric found a way to parse the data that we got from the server via swiftJSON. 

Monday, January 18, 2016

Day 61

Chopsticks Project


Building the project for Chopsticks was pretty cool and David did a lot of heavy lifting. He already finished the front end of project and I supplied the knowledge of sockets and servers (since he didn't take MEAN yet). When you enter a the lobby, it'll prompt for a name. Only when the name is put in will the connection be made. We built a pseudo game lobby by having a tableview with names on the cells and when you click on them, they notify the user to play the game. If clicked yes, both users are going to a game lobby. Once a winner is announced, both users will be sent back to the original app with their socket connection deleted. The app will once again prompt for their name to establish a new socket connection.

This project led me to getting the elusive green belt! With that under wraps, my instructor told us that we will be doing a project every day for the next 3 days using different iOS libraries. The first one we will be using is Core Location.