Sunday, September 8, 2013

iOs Programming

iOS Programming


          It's been a few weeks since I've written anything and I've been missing these posts as a creative vent for structured periods of work. The process that I've locked on has been to set aside an hour or two to do an activity (program, guitar, read, etc), do said activity in silence, and then write about what I've learned from it. It feels like a good structure and allows me to really focus on what I'm doing and then digest it through writing afterward. The biggest challenge is making sure I stick to that schedule. 

          Tonight's activity was an admission of sloppiness. As you can see from my personal website (still in the works), I've worked on a few iPhone apps for various people and have learned a lot from those projects. Recently, I've been working on one that deals with an established servers with pictures stored with accounts  and is supposed to retrieve them after the user has logged into the app. It's not a huge project and in comparison to the scope of my last project, it seems fairly easy but I've had some major hiccups in it. My first few projects in Xcode were made by using what I knew about C and C++ and combining that with random tutorials that fitted my needs for those specific instances within the app. This worked for one app,  but not with the other. 

         My professors have always warned me of becoming a sloppy coder and to avoid taking shortcuts in learning new languages. Up until recently, I had no reason to believe this would ever be a threat to me as most of my projects had been school ran or at least text book ran, but I see now. This latest project has shown me that my understanding of the View, Controller, and Model method of programming for Objective-C has been set about all wrong. 

          I remember reading about this style of programming in the Apple Documentation but it didn't really occur to me that it was any different from Object Oriented Programming (OOP). When I started creating the app about the accounts and pictures I realized that I had overlooked some really important aspects of design. The first thing that I learned was his system is meant to keep objects in objects and maximize efficiency and reusability. It's standard knowledge that OOP is for efficiency and reusability but Apple's model takes it even further. Objective-C wants you to handle your programs like factory workers and management and really break up the process, but it makes sense. 

          Firstly, you think about the variables as models. Models are Apple's way of creating a visual way of imaging storage such as arrays so that the programmer can see what they have to offer. For instance, if we were to store a list of questions like "What color is the sky," "How many seas are there in the world," and "Why ask so many questions," we would store these in an array and create a pointer instance variable to reference them. So far, there isn't very much of a difference but it gets better.

         Next, we have the Views and the Controllers. To simply put it, the Views are what you see and the Controller...controls! It's so easy but the exchange of information is extraordinarily quick. Your view on your phone is what you see: the buttons, labels, pictures, etc and your Controller is what handles the processes between the Views and the Models. For instance, the View knows that it's supposed to be displaying a label with the question variable but it doesn't know where to get it from so it asks the Controller. The controller knows that it's variable is pointing at an array that holds the questions so it grabs it and passes it back to the view to display. Both the Model and the View act as single minded drones that only do one thing apiece: the Model stores, and the View displays. 

         This model of exchange doesn't seem that crazy of a concept but it makes a huge difference when you're taping together all of these Controllers which are conflicting with each other and causing heaps of errors. Tonight, I accepted my lack of discipline and settled to reread a book that I've had in my possession for some time but have never brought myself to get to the Big Nerd Ranch Guide to iOS Programming. It's a pretty good book but most importantly it stresses the process of design and that's something that I really wanted to refocus on. 

          Having a schedule and sticking to a format is good practice for life and programming. I hope you guys enjoyed this and I look forward to writing again soon!


Thursday, August 8, 2013

Focus


          Welcome back and I be pleased to hear if anybody had actually returned to the site but seeing as how there is only 29 views total so far, that's doubtful. Wether this is your first time reading this from the future (I suppose any form of reading would be the future) are more recently it's been a few days since I've posted anything. Today, I wanted to talk about project management and how to deal with the difficulties that arise from both the project and ourselves.

          The last few weeks have been a brain scramble from having to switch between projects and mindsets while also dealing with time management. Time has been a crucial concept for me lately because I have so little of it and so many things to do within it. One of my older projects has came back to life by the act of the company having found a designer for it, while my newer projects are fast approaching their deadlines with much programming still remaining. While these tasks are daunting in their own respects, they also make me excited. I love staying busy and having three projects to switch between, each with their own flavors, keeps me plenty busy. Time management is the most important virtue and demands a careful breakdown in order to weed out errors and feel proud of the positives.

         Important above all else to good time management is focus. Focus is being able to look at one task at a time, apply a step-by-step process, solve it while keeping it in perspective with the rest of a project. My definition of focus could be because I'm a programer and this approach is similar to  solving a programming problem but that's why I feel it's so effective in not only dealing with programming but a lot of life's issues. Firstly, being able to complete a tasks means forgetting everything that isn't related to the work and breaking it down.  I verbalize what the problem is (if it's not already in words), repeat it a few times, and then I begin listing my possible solutions in the broadest sense. For example, my last project required a data structure to be set up for storage of books with the author's names. I said to myself, "How do I get these books to be associated with these people?" Then I looked a little deeper, "How is every person going to be unique?" This is the first real base level, answerable question and is easily answered: unique id's. From this system I can build all of the parts that make up the project in my mind, the id's, fields of data, structure of trees, sorting, and create a blueprint of whats needed.

         From this point, it's easy. Like a recipe, I have all my ingredients and I just have to start building them then mix them together. Order within a program is crucial which has taught me how important it is for everything. Thinking, planning, and consistency are key in creating solid projects that aren't just passion but completion from consistency. Reward yourself for consistency and you'll be surprised by what your happiness ultimately creates.

         I have to get going but I really hope this starts getting a little more attention, perhaps I need to market myself more. Have a wonderful time and leave any comments that you'd like!

Thank you,
Joseph Priest

Saturday, August 3, 2013

Website Design

          Last week I purchased my first domain name and hosted it through GoDaddy.  I did this to solidify my work resume by tying all my social media/networking sites together. It's incredible to be that it takes so many of these types of websites to be considered a viable candidate. That's actually a half truth. The fact that I've only been able to find a few programmers online that have laced all of these things together tells me one of two things; programmers don't have to do all of this to get a job or they're not very Google friendly. Regardless of the answer, my hope is that this will get me a job or at the least boost my chances. So I downloaded my design resources, made a collection images and content I wanted to use and stepped off.

          Website design has never been an interest of mine because it seemed like a softer, more front end aspect of technology and I've always been interested in the more in depth, programming side of it.  I've grown a large appreciation for web developers in the last few weeks due to my efforts in making my web site and having to create a site from scratch. Let me clarify that I am not talking about those that are concerned with just the design aspect. This is a very important aspect of the creation process but it can all be done by one person while the coding is a different realm entirely.

          A company that I'm currently writing an app for, or have been writing an app for, has been waiting to release the app because we've been missing a designer on the project. To be honest, I didn't understand why this was a difficult person to find; in college there were hundreds of them and they were all looking for work. I waited patiently, hoping that a person with the specific "skill" set they were looking for would come along. Three other projects came up during that time and I kept busy with them and after three months, I had started to think the app was bunked until they finally found one. It turns out that the manager for the project was looking for somebody who had good design work, efficient, and could code their own designs. That last one was the confusing to me.

It confused me to hear that most designers weren't able to design and code their projects. College was a time of pressing yourself to understand brand new concepts and become familiar with them to a functional level as quickly as possible, which meant exploring every concept of their field. Didn't everybody do that?

          Software developers are faced with thinking about a big problem such as allowing a customer to input a variable amount of inputs in order to receive a solution, and are then required to break that problem down step-by-step and design a program to execute those steps; design and code. From what the project manager was telling me, most web designers didn't do that. In fact, most only got as far as Fireworks and called it done. This was pretty amazing to me and coincided with my need for a personal web site, so I explored.

          After buying the domain, paying for the hosting, setting up an FTP I was ready to go. Then I hit the problem of design, which I thought would easily be solvable by template, but I was wrong. Of the templates, very few of them had anything that I wanted on my website and even fewer had the flexibility that I was looking for. Like most of the programmers that I know, I approached it like a new language and decided to learn from the basics; the only way to learn something is to try. I spent the next two weekends working with everything from templates with no CSS, to complex frameworks, to JS outlines and any combination of those tools. It was daunting, but I kept my focus and researched everything I didn't understand and eventually I came to an understanding. My website is still in it's alpha phase, but I realize how difficult it is to design and code. I love coding and while I don't consider (I don't think anybody does) scripting or web programming to actually be programming, it is a very difficult thing to wrap you're head around. You've got to consider every aspect of what you're designing and think of the tools to make that vision come alive which shares a lot of parallels to programming.

I'll wrap this up but I just wanted to acknowledge the magnitude of work that somebody do that it overlooked. I still love designing programs far more and enjoy piecing everything together and producing a working program from scratch more than anything else in the market, but I'm always glad to cross train and try something new. Here are some of the tools I used for the website:
- Frame Work: Twitter Bootstrap
- Design Program: Dreamweaver
- Code Editing: Komodo
- FTP:  Cyber Ducky
-Google Chrome's Developer Tools are amazing

I'll make sure to upload some other tools in the future for those who are interested and I'd love to hear some suggestions too.

Thank you,
Joseph Priest


Wednesday, July 31, 2013

Introduction Piece

Hello everybody!

          I'm not really used to writing my thoughts out in a public place, but seeing as how I routinely write them down for myself in order to organize my thoughts, this shouldn't be too much of a difference.

          This is just going to be a quick introduction as I haven't had time to organize the pages of notes that I've written over the last few years into a presentable fashion. My goal here is to create a place where I can dump my creative thoughts, discoveries, epiphanies, and frustrations and organize it into a neat timeline so others can see what I've been doing. Not only will this allow others to see where I'm at in my programming mind set but it will also allow an open form for people to comment constructively on what i'm doing.

          I look forward to eventually getting some replies on these post but for now it will be a good place to organize thoughts on some projects that I currently working on. Recently, I graduated from Park University, having transferred from the University of California Irvine, and have been working on iPhone apps for various companies and people that i'll have to check with if it's ok to write about the details of their projects. These projects have been getting increasing more difficult to work on due to the various time constraints imposed by work (active duty Marine Corps), my wife, and most recently and enjoyably, Comic Con. I've had an continue to have a very supportive wife who lets me stay up all night and type into the wee hours.

          I'll wrap this up with a promise of future posts, some of which will visit past projects, future projects and current projects, and wish everybody a wonderful day. I feel like this should have some articles or news for people to see, like a link to something interesting. I watched this video (linked below) earlier when I was working on my website (which will be up later this week) and thought it was really interesting and potentially something that I could write a response to during the next few days. Enjoy the video and I look forward to hearing some feedback.

Thank you,
Joe

The Future of Programming: http://worrydream.com/dbx/