15 Jun 2010

Objective-C/iPhone Training Reviewed

I recently attended a training class for Objective-C and iPhone development held by About Objects. I have never really attended a traditional training class before, but I have been very interested in "iOS" platform as a whole, but I have had no time to sit down and learn *another* platform…. Luckily my employer was kind enough to foot the bill for me to go and get a head start on it. (#win!!!)  Anyhow, I wanted to write a blurb about my experience incase any else was tinkering with the idea of training on the "iOS" platform, and particularly with About Objects.

I can't say enough about the quality of the training. Jonathan Lehr of About Objects, was a far better instructor than I have ever had in a university setting. Not only did I leave having a solid understanding of Objective-C and the platform, I gained an understanding of C and memory management so much better than I did before. 

The training class in particular was the "Introduction to Objective-C/iPhone and iPad" bundle which lasted 7 days. 

The first day or so we reviewed basic C constructs and memory management in the C realm. He pushed on understanding C because it you really will get lost if you go into Objective-C not grasping C types and quirks. By understanding it, later on we were able to check out header files within the Foundation Kit and figure out what was going on. This really came in handy when trying to figure out what type of parameters certain methods needed.

The next few days we got neck deep in Objective-C. All I can say is Objective-C is a sick language! It has a elegant syntax, an easy to assume API, object orientation, and dynamic binding as well as static typing. He reviewed just about everything you can imagine ranging from simple to complex types, i/o,  built in classes, custom classes, and cool features such as protocols and class extensions. We also spend a good deal of time on memory management, how to debug leaks, and how to leverage features like properties to help you out with all that.

The last few days we spend learning the ins and outs of UIKit and building iPhone apps. Once we understood some of the "harder ways" of coding all of our views , he introduced Interface Builder. At that point we were building our classes and mapping out methods and properties to Interface Builder.

We ended the classes building a great little application packed with fun features. So with all that said, I really just cant recommend About Objects enough. Jonathan has been programming Apple/NextStep devices longer than I have been alive. He knows his stuff! If you are able to attending any type of training, I would put this on top of your list.

And on a ending note, we were fortune enough to have an Apple employee taking the class with us, and she kindly invited us to eat at the employee Mac Caffe at Apple HQ. So that was a nice bonus! (not to mention I saw Steve Jobs on the way in OMG!)

 

13 Mar 2010

CharlotteJS

Who does not use JavaScript? I certainly do not know any developer that does not... even if its just copying and pasting in pre-baked solutions. So if there are so many developers using JS, why do we not have more groups dedicated to it? Well I am determined to solve this problem for the Charlotte, NC area at least. I recently started a JS User Group, dubbed CharlotteJS. We have our first meeting on Thursday the 18th, so if you are in the Charlotte area, be sure to check out our meetup.com page for more info (http://meetup.com/CharlotteJS/).

FYI: I guess you can tell from this post that my I am continuing my "JavaScript Journey" and it is going just fine! :-) I will post some code soon!

 

6 Feb 2010

JavaScript Journey - Update

So I last posted that I was taking a Journey through JavaScript. I kicked this off by reading "JavaScript: The Good Parts" By Douglas Crockford. I cannot say enough about the quality of this book. The book goes through JavaScript as a language, rather then just showing you how to find elements on the page, or do some nifty AJAX stuff. This is exactly what I was wanting to do. 

Not only does the book cover the syntax of JavaScript, but it dives into the mechanics of how and why many of the features in JavaScript work. More importantly it covers features that you should avoid and error prone features that you need to be aware of and how to work around them.

This book is perfect for a someone who already understands the concept of programming, or the basics of JavaScript. Due to many of the in depth topics, I would not recommend it for a total newbie to programming. So if you are tired of just toying around with JavaScript and are ready to take the first step in becoming a "JavaScript Programmer", this book is a must have!
1 Feb 2010

JavaScript Journey - The Beginning

Over the past couple years, like everyone else on the web, I have really started to utilize JavaScript in my day to day life as a developer. And just like many others, this is mainly because I am using jQuery (or framework XYZ). I am a little spoiled because when I first really started developing, jQuery was already out, so I started using it not long after I got my grip around the basics of JavaScript. It is safe to say though, I would have a much more difficult time developing some projects, if at all, without using jQuery.

Since it has been a little while now, I feel like I really need to step back and take an in depth look into JavaScript as a language and not just skim over the basics as if it were a small tool.

With that said, I am going to take the next several weeks to dwell through the in's and out's of JavaScript, starting with the very beginning. While doing so, I plan on posting a lot, mainly for self learning, but also for any new comers to JavaScript in the future. I am sure the first few posts will be boring for most people that come across, but hopefully they will be helpful to someone.

23 Jan 2010

Walk Before You Run

I was reading an excellent post from John Nunemaker the other day.  It made me think of something I think is probably an issue in all the programming communities, but I have personally seen it a lot in the Rails and the more "OO" ColdFusion world.

Here is fictional example of what I see in forums *ALOT*:

"This is my first Rails project and my first time using Ruby at that, actually I have never even programmed before, but anyways I am having trouble getting started. I am trying to use Authlogic, MongoMapper and 3 or 4 other plugins... all in a RESTful ways of course! But I keep gettings errors! HELP!

or

"I am using ColdBox, Transfer and ColdSpring for this project coming up. I am having a really hard time understanding whats going on! WTF is a Bean, Gateway and Service! How do I fit Singletons and Transients into this? HELP!"

Now let me set this straight, there is nothing wrong with asking for help, especially with rather complex tools and concepts like the ones mentioned above. In fact, if you want to skip straight to the big guns, go for it, but your doing your self a dis-favor.

If you want to be a successful programmer, you need to understand your platform thoroughly. You need to know the basics, and also the more advanced concepts before trying all these extra tools and frameworks.  It is tough these days for people just coming on to the scene because we do have so many excellent tools available, but you just need to resist and spend time practicing on your platform of choice without all the extras. And if you want to be on top with other "gurus" we are not just talking about spending a hour or two reading the docs. Its more like John Nunemaker said:

"The kind of practice where all of a sudden I realize that it is 2am and I’m exhausted physically so I should go to bed, but mentally I feel on fire so I let the code have me for another hour or two (I imagine this state to be like a marathon runner or ironman near the end of their race)."

That is how the people that lead our industries got to where they are, they did not just jump in and magically become a guru. Anyone can be up there with them, its just up to you to make the time and have the dedication to get there.

 

 

 

 

21 Jan 2010

Rails dependent delete_all gotcha

I was working on a Rails application the other day I made a small mistake that I thought I would just post about briefly to give a fair warning.

We all know that we can delete/destroy dependencies within ActiveRecord by utilizing the :dependent option on the relationship.



class Whatever < ActiveRecord::Base

  has_many :things, :dependent => delete_all 
 
end 
 

If you look twice, you see I forgot to make "delete_all" a symbol. So when this class got loaded, I of course received an error. So without thinking anything of this, I fixed my syntax error, but then noticed all my records were gone. Well, after thinking about it for a few, I figured since delete_all was not a symbol, what actually got evaluated was "Whatever.delete_all", thus deleting all my records.

Anyone else ever do this on accident before? :-)

17 Jan 2010

Just about got things working

I just about have things working the way I want. Syntax highlighting on here is decent, I really enjoy "SyntaxHighlighter", I have used it before with other sites, but I wish I was able to make use of the themes and customize it a bit. Maybe you can? Below is a little test for myself.

class UserSessionsController < ApplicationController
  
  layout "site"
  
  before_filter :require_user, :only => [:destroy]
  
  def new
    @user_session = UserSession.new
  end

  def create
   @user_session = UserSession.new(params[:user_session])
   if @user_session.save && current_user.is_active?
     flash[:notice] = "Login successful!"
     redirect_to dashboard_path
   else
     render :action => :new
   end
 end

 def destroy
   current_user_session.destroy
   flash[:notice] = "Logout successful!"
   redirect_to login_path
 end
 
end

Here is the link describing how to get the highlighting if anyone is wondering... http://news.ycombinator.com/item?id=366718

I will probably keep poking around with my theme on my off time, but I am pretty content with it for now!

16 Jan 2010

First post from posterous

I decided for one of my new years resolutions that I would actually start blogging about code and what not. I had a wordpress last year, but I really did not like it much nor make use of it.  I messed with writing my own with Rails, but I really liked what I saw in posterous.

Posterous has some really sick features that I look forward to using. I have not quite figured out how to enable code highlighting, but I have seen a few blogs out there with it, so I'm sure I am just missing a little something. Soon as get the syntax highlighting quirks out, I will start posting some code.

 

Garrett Johnson's Posterous

Garrett is a software developer from Charlotte, North Carolina. He is sickly obsessed with building software, enjoys skating when he has the time, and has a wonderful girlfriend Elizabeth, whom puts up with his non-stop, late night programming.