Wednesday, August 29, 2012

Connecting IBOutlet in Interface Builder


I did a combination of the things in this thread and I finally had success.
In Interface builder (not xcode)
  1. File->Reload All Class Files
  2. File->Read Class Files (select MyClass.h)
  3. Reconnect File's Owner by
    a. Setting the Class to "MyClass"
    b. Reconnecting the View to the File's Owner's View
Everything is back to normal now. Weird.
Hope this helps more than it confuses ;-)

Monday, August 27, 2012

Drive and Flightpath

I'm in a fun yet funny place.  

Day Work

My hand at work has become skilled, so much so that today in two hours I completed a large portion of the task I was assigned.  I should be able to complete the entire task by tomorrow.  (I think I should probably stop there or close to so as not to raise expectations by too high a standard but we'll see.  As they say in Baltimore, let me think on it.)  

This meant that I had some extra time which I used to read about expert PHP and MySQL.  That's the title of the book.  Nonetheless, as I was reading this book I realized that in order to truly elevate my programming skills into becoming a computer scientist I had to start thinking about concepts.

The notes in that book are peppered with writing assignments (self assigned) which ask me to think deeply about a specific topic, i.e. object design patterns or the difference between ISAM and InnoDB as database engines for MySQL.  I am becoming a professional at what I do.  I am passing the stage where syntax and such matter and entering a stage where architecture and programming data models are much more important.

I'm transitioning from programmer to intermediate developer with architect fast approaching.  This is a good thing but I am somewhat nervous about it.  This is a rubicon but this rubicon should allow me to serve my community the more I master and dedicate myself to it.

Night Work

Tonight I came home, ate a sandwich and took a nap.  It was a nice nap.  And a good sandwich.   Then after I woke up I programmed two view controllers.  But it was the ease of which I programmed them that disturbs me somewhat.  It took no time at all.  I literally programmed two View Controllers in two hours including all of the navigation.  

I have four more view controllers to program and then this phase of this project is complete.  Next it'll be time to migrate my website to my server and set up a LAN and a RESTful service and then to get my app talking to my server.  I may have to purchase another machine just to run the MySQL server on.  Maybe not now but it should be soon.

Nervous

I'm nervous.  When it was all grunt work and drudgery I could just slog through and go about my day laboring through.  But now I'm becoming a developer and an architect.  All of the books (and there aren't that many more ... Scalable Architecture, Amazon EC3, Advanced JQuery, Web Design, maybe Magneto finally) are all advanced in nature (except Magneto ... but it's a framework so it should be reasonable).  

But in large part everything that I'm learning and implementing at this stage is advanced.  I'm growing nicely.  I'm on a path to wealth and creation and possibly influence or maybe even beyond that.  So then why am I nervous?  

"Be careful what you wish for.  You might receive it he said." -- Jay-Z, A Dream

The Use of #Pragma

This lesson is completely useful.  It tells you what #pragma is really used for as 
opposed to just a cursory definition.  It's really great.

Check it out.

Nutshell:  #pragma in iOS can be used for a number of purposes.  Really it's just to 
speak directly to the compiler and give it specific instructions. 

It can be used to give a warning in the compiler, i.e.

#warning dude, do not forget to add error checking code here.

It can be used to add an error:

#error dude, stop.  You have got to put a div by zero exception here.

It can be used to tell the compiler not to alert you to something that you all ready know 
about, i.e.,

NSString *foo;
#pragma unused(foo)

return 5;

Above it supresses the unused foo string warning.

Also it can be used to suppress other more intricate warnings.  

1
2
3
4
5
6
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
 
[myObj performSelector:mySelector withObject:name];
 
#pragma clang diagnostic pop

See this Praga Link Uses for that.  Nice.

Thursday, August 23, 2012

Setting a UIColor with the RGB


// R: 128 G: 90 B: 200
UIColor *myColor = [UIColor colorWithRed:(128.0 / 255.0) green:(90.0 / 255.0) blue:(200.0 / 255.0) alpha: 1];

Monday, August 20, 2012

Things I Want to Learn to Do

These are recreational things

1.  Play basketball

2.  Become an expert snowboarder

3.  Become an expert at Mui Thai

4.  Become good a yoga

5.  Become good at horseback riding

6.  Scuba dive and see the best reefs in the world

7.  Become an amateur nature photographer

8.  Learn how to play tennis well

9.  Become an excellent fly fisherman

Finishing What You Start

I'll tell you people out there that I've never met and never known.  Maybe this is why I'm telling you.  But I've got a lot of flaws.  I won't enumerate them for you.  That may be a little bit much.  But I'll also tell you this.

I finish what I start.  I don't like living in New York really.  It loud.  Today I traveled to work in a metal box.  The people are intense.  I just don't really like it.  It's home but I'm not in love with it.  I'm not in love with computer programming either.  Sure, I'm good at it.  Getting better every day.  I do like solving problems and programming is ripe with problems.  And I enjoy the artistic piece of it, perfecting a craft, building a product that's elegant when it's done right.  But it's not phenomenal fun.  But I don't give up.  I finish what I start.  In all humility I've got plenty of flaws.  But follow through is my strong suit. 

After I get this company up and running I'm going to learn how to play basketball.  After this company is doing 1,000 dollars a day I'm going to learn how to seriously play basketball.

Another thing I like about myself is that I enjoy learning skills.  I do seriously enjoy learning new skills.  I don't enjoy the skill life cycle.  The stumbling, the frustration, the tripping over yourself, but I do enjoy it when I've finally gotten to a point where I know what I'm doing, where I know how to do what I want to do.  I do enjoy it when it becomes almost artistic.  Where the technique is out of the way and you just begin to create.   That's cool.  :-D  I really can't wait to get a product out there for tons of people to use.  There's just a thrill in giving it away.  Letting people actually use the product.  It's cool and fun.

Right now I'm stumbling through this iPhone App development.  I'm getting better.  I'm like a confident toddler. I can walk but sometimes I fall a bit.  Yet I'm doing okay.  After I get through with setting up this delegate and protocol piece I think I've got nothing but grunt work (bread and butter techniques that I've all ready used).  Then I'll be moving onto the server side, setting up my Linux box, and setting up my first RESTful service.  Whoa.

I've also got to encrypt the information passed through the URL in the website code.  But that's after getting the iPhone app all set up and getting information to correctly pass backward and forward.  Still lots of work to do but it's coming along.   I'm about to move onto a whole nother level.  Programs talking to programs and moving things into and out of a DB and then automatically communicating with mobile devices. 

After I can successful get a mobile device to talk to a server and manage the server and the PERL scripts that should talk to the mobile device even when the applications closed I should be in good shape.

At that point I should be able to actually build and sell a service.  FlyingFiftyTwo should be first.  Then FallingFiftyTwo.  Then DryCleanForMe.com/mobile.  I should develop a Android app for that one.  Maybe Bodega Buddy after that.  Then Sumpter Retail Consulting and go after the restaurant businesses.    One business at a time.  Cobble together revenue streams a dollar at a time.  One step at a time.

Thursday, August 9, 2012

Customizing a UITableViewController With Multiple Cell Types

In order to do this look at three sources:

1.  Core Data book (p. 62-64)

2.  Custom Cells in UITableView

3.  BillViewController (Line 217 - 339)

Awesome.

Have you ever discovered something so cool you just have to stop programming to digest it?

Thursday, August 2, 2012

Self Actualization

The other day I was sitting thinking about my first business goal, a real tangible goal to increase my personal net worth.  The goal I came up with was to start a company that made me personally 100.00 dollars a day in profit straight to me, essentially giving myself a $36,000 / yr. raise.  It's my first real monetary goal using the capitalist system the way I believe it should be used: to provide goods and services, not to trade financial instruments (not to criticize others).


Nonetheless, I had some thoughts about doing other things but I quickly decided against those.  The reason: I wanted to self-actualize.  


That was a huge thought for me, namely, that this path that I'm on, the technology path, is truly a path to self-actualization.  That means that I can't get off it for any reason.  This is the path that I must walk.  It's not an option but the only option.


The plan is simple:

  • Keep working at the SCA and by March have a site up and running and open to the public that is generating 3,000 US per month after costs back to me.  
  • Manage the server, manage the site, and drive the business. 
  • Maintain that site up and start another one.
That's it.

Tonight's Goal

Tonight's Goal is to complete two view controller objects and to map out how far I have to go to complete the iOS framework.  My goal is to have the complete iOS framework done by the 15th.  That'd be ideal.  Then by the 30th have my website up on the web and have a web service from the iOS talking to the server for a REST service.  It'll probably be done by September 15th but I'll keep you posted.  This is a huge leap.  Getting the mobile platform to communicate with the server is huge.

Twenty Two Days to Rebalance

Twenty-two days ago I was a bit burned out.  Instead of taking seven days to relax and just read a novel or do something that I'd enjoy, maybe pick up a new short term skill or something (learn how to make a killer chili?) I decided to embark on something new.  I spoke with my sister and started writing.  It took me twenty-two days to make that happen.  Now I'm done with those tasks and I've learned a valuable lesson.  The next time I'm tired instead of starting something new I'm going to a bookstore, I'll pick up a book and read it.  By the time I'm done my batteries will be recharged and I can get back to work.  Instead of breathing life into something new I'll just take the time to relax.

Relax.  Not start a new project.  Hard lesson but the truth.