Monday, May 6, 2013

Pitch Decks

Friday, May 3, 2013

Friday and My Feelings

I really hate my job.  I don't like the work so much just because I'm not learning anything new.  I thought it would be cool to know everything about my job, exactly  how to do it and what to do, etc.  But it isn't.  It's really boring.  I'm not learning anything new and it's not so cool.

Past that, though I've added tremendous value to my business unit my boss still doesn't value me as a person.  She tells me in no uncertain non-verbal terms that I am not valued.  I so want to get up and just quit.  But I can not and will not right now.  There are two reasons for this.


First,  because there are no new challenges, though I could very well get into another position I'm not sure that I would be paid as well right now, so the first is monetary.

Second, I'm not in a position where right now I could move career wise into the position that I would like to move into.  I want to move into being an iOS Developer next.  But right now I don't have an app in the iPhone store and so therefore I can not go into an interview and say, yes I have an app.  Yes I developed a couple websites.  Yes, I am awesome.  Please give me my 200K and my contract, thank you very much.

Now I understand something that I heard about Carlos Ghosn, the current CEO of Nissan.  The narrator of Revenge of the Electric Car said he was a desperately disciplined, desperately smart man.  (One of my favorite quotes is, "Carlos Ghosn doesn't get up in the morning unless there's money in it.")  

In order to make it in business you have to be desperately disciplined.  You have to subvert, submerge, and even smother your emotions in order to do well.  At every sneer, at every slight, though my pride is offended and I am annoyed even at some points incensed I must put my tongue on a leash, control my facial expressions, smile, laugh, and quietly seethe, biding my time.

Part of being wealthy is a war of attrition.  This is a war of attrition and self discipline.  Who ever is standing at the end wins.  I am getting too emotional.  Dial it back.

What I must do is build my app.  Then put out a resume.  Then build my website.  Then put out a resume.  Then build another app.  Then put out a resume.  By the end of the year I should have two websites up and two apps out there and one of my websites should be monetized.  That should be more than enough to get a new job.  It should be more than enough to launch my third company and to get VC funded. 

Do I want to be as successful as Carlos Ghosn?  Desperately.  Dare I say even more so.  Then I must be more disciplined.  My emotionally constrained.  Stronger. Until I can strike and win.

A battle is won or lost before it is ever fought.

Thursday, May 2, 2013

Goals for May 2nd, 2013

Goals:

1.  Fix the address check RESTful application

2.  Implement the RESTful application in the CourierRegistrationCoreViewController

3.  Implement the CoreData piece in the CourierRegistrationCoreViewController


4.  Implement the RESTful application in the CourierAddressViewController

5.  Implement the CoreData piece in the CourierAddressViewController


Wednesday, May 1, 2013

Bored@Work

I'm grateful for my job.  Very grateful.  Don't get me wrong. It allowed me to break into the sixes. And I'm grateful for that.  Very grateful.  I have a solid life because of it.  But I'm also very bored by it.

I'm learning nothing new. I'm able to perform at a high level and there really are very few twists and turns.  I could do more. I could actually hold two exact jobs like this and still do well.  Actually that'd be pretty cool considering I'd get paid twice as much. 

But the truth is money doesn't really do it for me in a pure sense.  Yes, I like money. Yes I need money.  But money is a tool. I am accumulating it but I'm not honing my skills at the same time.  I am working right now on an iPhone app and if I can get that into the marketplace then I'm going to apply to another job where I can actually hone my iOS skills and my web programming skills. I'm not intellectually stimulated here and the people aren't that sharp or passionate about their work or really about anything except BS and getting home on time. 

I look forward to working somewhere where I can program my ass off, increase my skills, and make money while I work on my craft at home.  But first I've got to get this iPhone App done.  That means no NY Knicks tonight.  It means going home and getting to work.

Yesterday I went home and got to work and enjoyed it thoroughly.  I turned off all television and everything else and just opened up my laptop and Malibuyao.  And I accomplished my task.  It was pretty cool.  

I think tonight I'll try to do two things:

First, get the Twilio piece to work.

Two, build another object that tests addresses.  

If that works then I should be able to, on Thursday, get the two of the screens on my View Controller to work.  

-- Pushing the information into Core Data and moving on.

Tuesday, April 23, 2013

iOS Scrap Book


Setting the title of a ViewController:

self.title = @"Clock In Time";

Setting the field placeholder:

signOutTimeField.placeholder = @"Time to Clock Out of Work";

Bending the corners of  a button

cancelJobButton.layer.cornerRadius = 8;
cancelJobButton.layer.borderWidth = 1;
cancelJobButton.layer.borderColor = [UIColor grayColor].CGColor;
cancelJobButton.clipsToBounds = YES;

Adding a Return Key to the Keyboard and Calling a method ("hideKeyBoard:") after the Keyboard Retracts

emailAddressField.returnKeyType=UIReturnKeyDone;
[emailAddressField addTarget:self action:@selector(hideKeyBoard:)
forControlEvents:UIControlEventEditingDidEndOnExit];

Defining a Method for Keyboard Retraction

-(void)hideKeyBoard: (id) sender
{
//Hiding the Keyboard
if ([sender tag] == 0) {
[emailAddressField resignFirstResponder];
}
else if ([sender tag] == 1) {
[passwordField resignFirstResponder];
}

[UIView beginAnimations:nil context:NULL];

//Setting the animation duration
[UIView setAnimationDuration:1];
CGRect rect = self.view.frame;

//Resetting the origin to 0
rect.origin.y = 0;
self.view.frame = rect;
[UIView commitAnimations];
}

Getting the ViewController to 'Roll' up and down when the Keyboard Retracts:

- (void)textFieldBegin:(NSNotification *)notif
{
UITextField *obj= [notif object];NSNumber *offsetValue=[[NSNumber alloc]
initWithFloat:obj.frame.origin.y];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
//Get a reference to the frame
CGRect rect = self.view.frame;
//Set the origin to a new value
rect.origin.y = 60.0-[offsetValue floatValue];
//Adjust the views height
rect.size.height += [offsetValue floatValue]-60.0;
//Commit the changes to the current frame
self.view.frame = rect;
//Commit the animations
[UIView commitAnimations];
}

Adding an Observer and Removing an Observer when the view Appears and a View Disappears

- (void)viewWillDisappear:(BOOL)animated
{
// unregister for textfield notifications while not visible.
[[NSNotificationCenter defaultCenter] removeObserver:self
name:UITextFieldTextDidBeginEditingNotification object:nil];
}

-(void) viewWillAppear:(BOOL)animated
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector
(textFieldBegin:) name:UITextFieldTextDidBeginEditingNotification object:self.view.window];
[super viewWillAppear:animated];
}

Building an Alert


alert = [[UIAlertView alloc]
initWithTitle:@"Unverified" 
message:@"Please enter a new name and password." 
delegate:nil cancelButtonTitle:@"OK" 
otherButtonTitles:nil];
 
[alert show];
[alert release];

Trimming the Whitespace from a NSString


cellPhoneNumberString = [cellPhoneNumberTextField.text stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]];

Accessing a Restful Service:

    NSString *urlString = @"http://www.samplesite.com/dtdOrdersExist.pl?";
    NSString *queryString = @"";
    queryString = [queryString stringByAppendingString:@"parameter1="];
    queryString = [queryString stringByAppendingString:p1];
    queryString = [queryString stringByAppendingString:@"parameter2="];
    queryString = [queryString stringByAppendingString:p2];
    
    // Step 5:  Make the RESTful call.
    
    urlString = [urlString stringByAppendingString:queryString];
    
    urlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
    
    
    NSLog(@"ConfirmationCodeViewController URL String: %@", urlString);
    
    // {cellPhoneNumberConfirmed => $cellPhoneNumberConfirmed, cellPhoneNumber => $cellPhoneNumber, customerID => $customerID};
    
    
    // RESTFUL CODE BLOCK A
    
    
    NSURL *url = [NSURL URLWithString:urlString];
    NSData *dataURL = [NSData dataWithContentsOfURL:url];
    NSDictionary *myDict = [NSJSONSerialization JSONObjectWithData:dataURL options:0 error:nil];
    
    // Step 6:  Retrieve the data from the RESTful call
    
    NSString* numberOfOrders = [myDict objectForKey:@"numberOfOrders"];
    
    NSLog(@"Post JSON: Verified jsonCustomerID: %@", numberOfOrders);


    return numberOfOrders;


Pushing a New ViewController:


CourierViewController *cvc = [[CourierViewController alloc
  initWithNibName:@"CourierViewController" 
  bundle:nil];

[self.navigationController pushViewController:cvc animated:YES];
[cvc release];

Trimming Leading and trailing Whitespaces  off NSString:


NSString *trimmedString = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

Deleting all objects from Core Data:


-(NSManagedObjectContext *)deleteCustomerObject: (NSManagedObjectContext *) context
{
    
    NSLog(@"deleteCustomerObject");
// self.navigationController = [[UINavigationController alloc] initWithNibName:@"Go_For_MeViewController" bundle:nil];
// NSManagedObjectContext* context = [fetchedResultsController managedObjectContext];
if (context == nil)
    {
context = [(Go_For_MeAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
NSLog(@"After managedObjectContext: %@",   context);
}
NSLog(@"GFMVC: Test Point 1");
    
// INPUT THE ENTITY NAME SLATED FOR DELETION HERE
    
    NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"CustomerInformation"
  inManagedObjectContext:context];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:entityDesc];
// NSPredicate *pred = [NSPredicate predicateWithFormat:@"(loggedIn == 1)"];
// [request setPredicate:pred];
NSError *error = nil;
NSArray *results = [context executeFetchRequest:request error:&error];
    /*
    entityDesc =  [NSEntityDescription entityForName:@"jobData"
  inManagedObjectContext:context];
[request setEntity:entityDesc];
pred = [NSPredicate predicateWithFormat:@"(jobCompleted == NO)"];
[request setPredicate:pred];
    
NSError *jobsError = nil;
NSArray *jobsResults = [context executeFetchRequest:request error:&jobsError];
    */
    
    if (results != nil && [results count] >= 0)
    {
NSLog(@"GFMVC:  Valid Request Results");
int size = [results count];
NSLog(@"GFMVC: Number of Results: %d", size);
        
        // DELETING THE OBJECTS IN THE MANAGED OBJECT CONTEXT.
for (NSManagedObject *newManagedObject in results)
        {
// [self printContext:newManagedObject];
[context deleteObject:newManagedObject];
}
        [self saveContext:context];
        return context;
        
}
else if (results == nil)
{
        
        [self saveContext:context];
        return context;
}

    [self saveContext:context];
    return context;
    
}



How to Save an object with a relationship.  BOOYAH!
        
[customerManagedObject setValue:ordersManagedObject forKey:@"customerToOrders"];

-- customerManagedObject -- the object that is the parent

-- ordersManagedObject -- the object that is the child object

-- customerToOrders -- the name of the relationship object


Setting up UIPickerView:

UIPickerView Set Up

Making UIPickerView Appear When UITextField is Selected

Printing a Date and a Time:


      timeLoggedIn = [NSDateFormatter localizedStringFromDate:[managedObj valueForKey:@"timeLoggedIn"]
      dateStyle:NSDateFormatterShortStyle
      timeStyle:NSDateFormatterFullStyle];

Changing ViewControllers with Storyboard Programatically:


If you're in a Navigation Controller:
ViewController *viewController = [[ViewController alloc] init];
[self.navigationController pushViewController:viewController animated:YES];
or if you just want to present a new view:
ViewController *viewController = [[ViewController alloc] init];    
[self presentViewController:viewController animated:YES completion:nil];

MySQL:

Alter a column:  Dropping the NOT NULL provision:


ALTER TABLE tbl_name MODIFY columnA varchar(6) NULL DEFAULT NULL;





Where I'm at Now

Spiritually

Spiritually I am in a reasonable place.  I guess that originally comes from a revelation.  A while back my body felt strong and healthy, my mind is always being fed (the joy of being an intellectual) but my soul felt thin and weak, frail.  It shook often and would quake at negative energy.  I realized it was because while I fed my body daily and my mind was well nourished my soul was starving.  I never fed it.  I took very poor care of it.  That's why it was weak and emaciated.  I changed that by reading the Bible daily.  That changed my life.  Slowly my soul began to heal and get bigger.  Bit-by-bit my confidence returned.  My mind became stronger and negativity cleared away slowly.  I no longer shook but rather knew I could rely on my internal strength quite a bit.  Slowly power came back to me.  

When I was little I said that children were so happy because they had just come from God.  But as they got older and farther away from him that happiness waned.  I began to return to Him and my happiness and internal strength returned to me. 

It led me to a conclusion.  The internal strength of a person is in direct correlation to their relationship with God.  And everything else springs from that spiritual strength. 

I used to clamor for a girlfriend.  Now I'm like, it'll come to me when I'm ready and God sees fit.  And even if it doesn't, I'm happy so it doesn't really matter.

I used to say, look tough.  Now I rest on my internal strength, my rock, and just allow life to happen.  I just allow the universe to work.  

I used to ask, who am I?  Now I say I am in my right mind, my body is strong, and my spirit is getting stronger.  I don't know exactly where I'm going but I trust my Navigator.  I know that I am going to get there.  Everything is okay.

Faith is letting go, knowing you'll be able to fly.  I'm much happier.  But that is because of my balance and my God.

Career-wise

I just want to be a part of creating the future.  The future is being created right now.  I just want to be a part of that more than anything else.  I'm in such a rush to be a part of creating the future.  The future is being created faster and faster and I want to be one of the people that architects it, a member of the team that actually creates it.  

Because of that I can't just go and do whatever makes me happy, political science or whatever.  I have to be a part of what's going on.  It's like the Fat Boy Slim album, Right Here, Right Now.  I really must be a part of creating the future.  I just don't know another way.

I'm in the midst of building this App and then I'll demo it for someone at a Meetup.  But that's where I'm at.  I have to be a part of what Elon Musk and other great entrepreneurs inside and outside of digital tech are doing.  I just have to.  I can't just sit idly by and watch. I'd never be able to live with myself.  The dye is set in this regard.