<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Natasha The Robot</title>
	<atom:link href="http://natashatherobot.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://natashatherobot.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 22 May 2013 22:57:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>How To Set Global Variables In Your iOS App</title>
		<link>http://natashatherobot.com/set-global-variables-ios-app/</link>
		<comments>http://natashatherobot.com/set-global-variables-ios-app/#comments</comments>
		<pubDate>Wed, 22 May 2013 22:57:34 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Global Variable]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2384</guid>
		<description><![CDATA[I am currently working with the Foursquare API to build a simple app which will display local restaurants based on the number of checkins in has (so think Yelp sorted by Foursquare checkins vs user reviews). The Foursquare API uses authorization with a Client ID and a Client Secret token, which I wanted to store as a global variable...]]></description>
			<content:encoded><![CDATA[<p>I am currently working with the Foursquare API to build a simple app which will display local restaurants based on the number of checkins in has (so think Yelp sorted by Foursquare checkins vs user reviews). The Foursquare API uses authorization with a Client ID and a Client Secret token, which I wanted to store as a global variable.</p>
<p>Here is how to do it:</p>
<h2>Add A Build Setting</h2>
<p>In your app target, select Build Setting option at the top. In the bottom right corner, there is a button with a big plus called &#8220;Add Build Setting&#8221;. Click on that button, and select &#8220;Add User-Defined Setting&#8221;.</p>
<p style="text-align: center;"><a href="http://natashatherobot.com/wp-content/uploads/buildsettings.png"><img class="aligncenter  wp-image-2386" title="buildsettings" src="http://natashatherobot.com/wp-content/uploads/buildsettings.png" alt="" width="492" height="314" /></a></p>
<h2>Add The Global Variable</h2>
<p>You should now have a field where you can enter your global variable name (e.g. FOURSQUARE_CLIENT_ID) and the value (e.g. &#8220;12344455656ifsadjkfdsfjklfdjkfjk&#8221;). Pro-tip: use tabs to tab between the variable name and value!</p>
<p><img class="aligncenter size-full wp-image-2389" title="user-defined" src="http://natashatherobot.com/wp-content/uploads/user-defined.png" alt="" width="582" height="97" /></p>
<p>You&#8217;d think you&#8217;re done, but you&#8217;re not!</p>
<h2>Find The Preprocessor Macros</h2>
<p>In the Build Settings search box, enter the word &#8220;macro&#8221;, and the Preprocessor Macros section should come up:</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-2390" title="macro" src="http://natashatherobot.com/wp-content/uploads/macro.png" alt="" width="542" height="190" /></p>
<h2>Set The Variables</h2>
<p>Now, the the Debug and Release sections, define your variables (DEBUG=1) is already set for you as an example. This serves as a search and replace, so the macro will look for the word &#8220;DEBUG&#8221; in your codebase, and replace it with a 1 before compiling. For strings, you want the variable replaced with an @ sign and double quotes, so set all your string variables as follows: FOURSQUARE_CLIENT_ID=@\&#8221;$(FOURSQUARE_CLIENT_ID)\&#8221;.</p>
<p>Here is an example of what your settings should look like:</p>
<p><img class="aligncenter size-full wp-image-2393" title="macro-settings" src="http://natashatherobot.com/wp-content/uploads/macro-settings.png" alt="" width="648" height="247" /></p>
<p>The blacked out parts are the actual values that are auto-completed for you. Again, make sure to copy over your variables to the Release section as well, and change them if they&#8217;re different, or your production app won&#8217;t work!</p>
<h2>Use The Variables!</h2>
<p>So now, every time I need to use the Foursquare Client Id or the Foursquare Client Secret token, I can just use FOURSQUARE_CLIENT_ID / FOURSQUARE_CLIENT_SECRET throughout my app, without having to remember what the actual client id or client secret is. And if my client id changes, I can easily just update the value in one place &#8211; my user defined build settings!</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/set-global-variables-ios-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explaining iOS Delegates: A Story About Your Morning Coffee</title>
		<link>http://natashatherobot.com/explaining-ios-delegates-a-story-about-your-morning-coffee/</link>
		<comments>http://natashatherobot.com/explaining-ios-delegates-a-story-about-your-morning-coffee/#comments</comments>
		<pubDate>Thu, 16 May 2013 14:20:22 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[coffee]]></category>
		<category><![CDATA[delegates]]></category>
		<category><![CDATA[ios]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2363</guid>
		<description><![CDATA[One of the hardest programming concepts for me to understand in the past few weeks as I'm learning iOS development was, you guessed it, Delegates! So I'd like to share how I've come to think of them... using a CoffeeShop analogy. So here is the story:]]></description>
			<content:encoded><![CDATA[<p>One of the hardest programming concepts for me to understand in the past few weeks as I&#8217;m learning iOS development was, you guessed it, Delegates! So I&#8217;d like to share how I&#8217;ve come to think of them&#8230; using a CoffeeShop analogy. So here is the story:</p>
<p>You wake up this morning, and you want coffee. But alas, you can&#8217;t make coffee yourself. So you get up, get dressed and go to a coffee shop. You know that every coffee shop conforms to a specific protocol. You walk in and say &#8220;makeMeMyCoffee&#8221;, and they make you your coffee. In other words, you&#8217;re delegating coffee making to a coffee shop:</p>
<pre class="brush: cpp; title: ; notranslate">
// CoffeShopDelegate.h

@protocol CoffeeShopDelegate &lt;NSObject&gt;

- (void)makeMeMyCoffee

@end

</pre>
<p>So when you wake up, you want to delegate out your coffee making:</p>
<pre class="brush: cpp; title: ; notranslate">
// You.h
#import &quot;CoffeeShopDelegate.h&quot;

@interface You : NSObject

   @property (strong, nonatomic) id&lt;CoffeeShopDelegate&gt; coffeeDelegate;

@end

// You.m

@implementation You

- (void)whenIWakeUp
{
   // you don't want to make the coffee yourself, 
   // so you delegate it out to the delegate (the coffee shop)
   [self.coffeeDelegate makeMeMyCoffee];
}

@end
</pre>
<p>Each coffee shop, whether it&#8217;s Starbucks or Dunkin&#8217; Donuts or your neighborhood mom and pop coffee shop, conform to the CoffeeShop protocol. When you walk in and say &#8220;makeMeMyCoffee&#8221; they know to make you coffee. Let&#8217;s say this morning you&#8217;re feeling like Starbucks:</p>
<pre class="brush: cpp; title: ; notranslate">
// Starbucks.h
#import &quot;CoffeeShopDelegate.h&quot;
#import &quot;You.h&quot; // you walk into the coffeeshop

@interface StarbucksViewController : UIViewController &lt;CoffeeShopDelegate&gt;

@end

//Starbucks.m
@implementation StarbucksViewController

- (void)viewDidLoad
{
   [super viewDidLoad];

   // Starbucks is now your coffee delegate, in charge of making you coffee
   You.coffeeDelegate = self; 
}


- (void)makeMeMyCoffee
{
   addSlowRoastedCoffee;
   addTwoSpoonsOfSugar;
   addASplashOfSyrupyGoo;
   addHalfCupOfMilk;
   GiveCoffeeToCustomer;
}

@end
</pre>
<p>If you decided to go with Dunkin&#8217; Donuts, they would have a different implementation of the makeMeMyCoffee method:</p>
<pre class="brush: cpp; title: ; notranslate">
// DunkinDonuts.h
#import &quot;CoffeeShopDelegate.h&quot;
#import &quot;You.h&quot;

@interface DunkinDonutsViewController : UIViewController &lt;CoffeeShopDelegate&gt;

@end

// DunkinDonuts.m
@implementation DunkinDonutsViewController

- (void)viewDidLoad
{
   [super viewDidLoad];
   
   // Dunkin Donuts is now in charge of making your coffee
   You.coffeeDelegate = self; 
}

- (void)makeMeMyCoffee
{
   // The Dunkin Donuts coffee follows a different recipe than Starbucks Coffee
   addCoffee;
   addFiveSpoonsOfSugar;
   addASplashOfHersheySyrup;
   addAThirdCupOfMilk;
   GiveCoffeeToCustomer;
}

@end
</pre>
<p>So that is all. Delegates are basically a way to outsource your tasks, and allow different classes (Starbucks vs Dunkin Donuts) to implement the task in their own different way. </p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/explaining-ios-delegates-a-story-about-your-morning-coffee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Great Software Is About Love</title>
		<link>http://natashatherobot.com/why-great-software-is-about-love/</link>
		<comments>http://natashatherobot.com/why-great-software-is-about-love/#comments</comments>
		<pubDate>Sat, 11 May 2013 16:09:01 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2353</guid>
		<description><![CDATA[I've been thinking a lot about what separates great software from mediocre or bad software. Here is the clear differentiator I keep noticing time...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been thinking a lot about what separates great software from mediocre or bad software. And the clear differentiator I keep noticing time and time again is the attention to detail. The <em>business logic</em> that is responsible for the user experience.</p>
<p>For example, this morning I got an email with the following subject from 1-800-CONTACTS, where I order my contacts:</p>
<blockquote><p>Your last order should run out on 05/10/2013, reorder today!</p></blockquote>
<p>The idea behind this email is awesome. I&#8217;d love to get reminders that my contacts will be running out and an easy link to just reorder them. But they missed a small detail in this email. It is 05/11/2013 today! In other words, they send me this email AFTER the estimated date of when my contacts will run out! If I actually woke up this morning with no more contacts to be found and then saw this email, I&#8217;d be pretty upset. Now, I have to wait for a few days until my contacts are shipped to me!</p>
<p>In other words, there is a very fine line between great and mediocre software. Getting the details of the implementation right is more important that just executing a general half-baked good idea.</p>
<p>In contrast, when I hold my iPhone in my hand, I feel like I&#8217;m handling an amazing piece of art. That&#8217;s because Apple, that created the iPhone, took the time to think about every single detail that makes up this device &#8211; from what it looks like, to the materials it&#8217;s made of, to the software that&#8217;s on it. It makes me feel loved to think that someone took the time to actually think of all these little details, just for me!</p>
<p>So great software is not just about functionality, but it&#8217;s also about love. All the details that have been thought of communicate to the user that whoever built this masterpiece really really cared about it. They put their soul into it, and that&#8217;s something that all of us want to feel more of in our lives.</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/why-great-software-is-about-love/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS: How To Submit Text From A Text Field Using Just The Return Key</title>
		<link>http://natashatherobot.com/ios-submit-text-from-text-field-using-return-key/</link>
		<comments>http://natashatherobot.com/ios-submit-text-from-text-field-using-return-key/#comments</comments>
		<pubDate>Tue, 07 May 2013 16:06:55 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[textField]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2330</guid>
		<description><![CDATA[I was working on a simple challenge today at Mobile Makers. We were basically adding some text to a text field, clicking an "Add Button" and showing the text in a text view, and there was something that kept bothering me...]]></description>
			<content:encoded><![CDATA[<p>I was working on a simple challenge today at Mobile Makers. We were basically adding some text to a text field, clicking an &#8220;Add Button&#8221; and showing the text in a text view (see below):</p>
<p><img class="aligncenter size-full wp-image-2333" title="Screen Shot 2013-05-07 at 10.58.51 AM" src="http://natashatherobot.com/wp-content/uploads/Screen-Shot-2013-05-07-at-10.58.51-AM.png" alt="" width="317" height="565" /></p>
<p>However, one thing that kept annoying me over and over again was that I could not just click &#8220;Return&#8221; on my keyboard to get the field added without pressing the &#8220;Add&#8221; button. So I looked around for a simple way to do this: </p>
<p>First, make your ViewController a UITextFieldDelegate:</p>
<pre class="brush: cpp; title: ; notranslate">
// ViewController.h
#import &lt;UIKit/UIKit.h&gt;

@interface ViewController : UIViewController &lt;UITextFieldDelegate&gt;

@end
</pre>
<p>Now, in your ViewController.m file, delegate your text field in the viewDidLoad method:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.textField.delegate = self;
}
</pre>
<p>Finally, implement the code you want implemented when the user clicks the return button on the keyboard. Mine was as follows (I was basically adding the new string to an array of strings and then printing out the array as a string to the textView):</p>
<pre class="brush: cpp; title: ; notranslate">
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    [self.listOfStrings addObject:self.textField.text];
    [self displayArrayAsString];
    self.textField.text = @&quot;&quot;;
    
    return YES;
}
</pre>
<p>Of course, now that I think about it, my problem was really caused by using the simulator. It&#8217;s much easier to press the return key on my computer keyboard than clicking the &#8220;Add&#8221; button on an iPhone or iPad. I&#8217;ll need to experiment more with whether this interaction is really necessary on these devices!</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/ios-submit-text-from-text-field-using-return-key/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Objective-C Reflections: Calling Methods By Their String Name</title>
		<link>http://natashatherobot.com/objective-c-reflections-calling-methods-by-their-string-name/</link>
		<comments>http://natashatherobot.com/objective-c-reflections-calling-methods-by-their-string-name/#comments</comments>
		<pubDate>Mon, 06 May 2013 22:36:28 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[metaprogramming]]></category>
		<category><![CDATA[reflections]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2321</guid>
		<description><![CDATA[I'm learning to refactor in Objective-C with a little bit of metaprogramming!]]></description>
			<content:encoded><![CDATA[<p>Today, I was making a pretty simple app to test out delegations (<a href="https://github.com/NatashaTheRobot/DelegateMadness" target="_blank">source code here</a>). Basically, as you press on one of the four buttons (Magenta, Purple, Green, or Red), the background color of view behind the buttons turns the pressed color (see below):</p>
<p><img class="aligncenter size-full wp-image-2322" title="Screen Shot 2013-05-06 at 5.24.34 PM" src="http://natashatherobot.com/wp-content/uploads/Screen-Shot-2013-05-06-at-5.24.34-PM.png" alt="" width="314" height="563" /></p>
<p>My initial take at the method to change the background color looked like this:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void)changeColor:(NSString *)colorName
{
    
    if ([colorName isEqualToString:@&quot;Green&quot;]) {
        self.view.backgroundColor = [UIColor greenColor];
    } else if ([colorName isEqualToString:@&quot;Red&quot;]){
        self.view.backgroundColor = [UIColor redColor];
    } else if ([colorName isEqualToString:@&quot;Purple&quot;]){
        self.view.backgroundColor = [UIColor purpleColor];
    } else if ([colorName isEqualToString:@&quot;Magenta&quot;]){
        self.view.backgroundColor = [UIColor magentaColor];
    }

}
</pre>
<p>Obviously the above is very repetitive &#8211; the only thing that changes between the methods in the color called on the UIColor object &#8211; but it is also not scalable. Imagine if you had 50 buttons with color names! Or if you wanted to change up the color names on the buttons &#8211; you&#8217;ll have to find the previous color if statement and change it!</p>
<p>Good thing Objective-C has a bit of metaprogramming built in. So you can use <a href="http://en.wikipedia.org/wiki/Reflection_(computer_programming)" target="_blank">Reflections</a> to call the method by it&#8217;s string name! In other words, you can concatenate the color name (e.g &#8220;green&#8221;) with the word &#8220;Color&#8221;, and then call the method name &#8220;greenColor&#8221;. </p>
<p>Here is what my new and nicely refactored code looks like:</p>
<pre class="brush: cpp; title: ; notranslate">
- (void)changeColor:(NSString *)colorName
{
    
    NSString *colorMethodName = [[colorName lowercaseString] stringByAppendingString:@&quot;Color&quot;];
    self.view.backgroundColor = [UIColor performSelector:NSSelectorFromString(colorMethodName)];
}
</pre>
<p>Nice, right?!</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/objective-c-reflections-calling-methods-by-their-string-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Reasons I LOVE iPhone Development</title>
		<link>http://natashatherobot.com/5-reasons-i-love-iphone-development/</link>
		<comments>http://natashatherobot.com/5-reasons-i-love-iphone-development/#comments</comments>
		<pubDate>Sun, 05 May 2013 17:02:18 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[xcode]]></category>
		<category><![CDATA[zen]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2310</guid>
		<description><![CDATA[I can't believe I'm feeling this way. It's like I'm in love. As someone who's come from working with Ruby on Rails, it's hard to imagine falling in love with another programming language. But it's happened. ]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe I&#8217;m feeling this way. It&#8217;s like I&#8217;m in love. As someone who&#8217;s come from working with Ruby on Rails, it&#8217;s hard to imagine falling in love with another programming language. But it&#8217;s happened. Only a week into <a href="http://mobilemakers.co/" target="_blank">Mobile Makers</a>, and I already LIVE for coding iPhone apps! It&#8217;s just so much fun. Here is what makes me love iPhone development so much:</p>
<h2>XCode: One Tool To Rule Them All</h2>
<p>When I was graduating Dev Bootcamp last summer, I have to admit I was a bit worried. In my new company, will they be using Vim or Emacs or TextMate or Sublime? I wasn&#8217;t very comfortable with Vim, so I was happy that we use <a href="http://www.jetbrains.com/ruby/" target="_blank">RubyMine</a> as the standard IDE. Since I never used RubyMine before, I had to learn the shortcuts and the capabilities of it on the job, by observing my coworkers when I paired with them.</p>
<p>In contrast, XCode is pretty much the only iOS IDE out there! It is managed by Apple and it has been perfected since somewhere in the 80s. It is the industry standard, so, as a new iPhone developer, I don&#8217;t have to worry about picking a tool to do my job. I can just focus on the coding.</p>
<h2>Everything In One Place</h2>
<p>In web development, there are so many components that make up your coding environment. There&#8217;s the IDE where you write code, the terminal where your output is printed out, then there is the website, at localhost:3000, where you can see your progress, and of course when you&#8217;re stuck, you pretty much have to Google around for the documentation or StackOverflow questions and answers. This results in me constantly trying to resize all the screens I have open! And, to be honest, I still haven&#8217;t found that optimal screen placement where I have everything I need in one place.</p>
<p>With iPhone development, XCode provides all the components you need to stay in XCode! It includes the IDE, the logging, the errors, the iPhone simulator, and, of course, the documentation. It takes up your whole screen, and I&#8217;ve found that besides occasional Googling for more complex implementations of something I&#8217;m working on, I pretty much stay in XCode the whole time I&#8217;m writing code. I&#8217;ve actually found that this makes me go into the amazing <a href="http://en.wikipedia.org/wiki/Flow_(psychology)" target="_blank">flow state</a> a lot quicker than anything I&#8217;ve experienced in web development so far.</p>
<h2>Just Objective-C</h2>
<p>I know, the crazy Objective-C syntax can be off-putting at first. I mean, semi colons, square brackets, curly braces, strong typing, etc! It&#8217;s definitely scary coming from a beautiful and simple language like Ruby! But the nice thing about iPhone development, is that the whole thing is using Objective-C, even the views!</p>
<p>In contrast, for web development, you have to know HTML / CSS / JavaScript (just for the view), and then a backend language, such as Ruby, and hopefully a web framework, such as Ruby on Rails to get everything organized! When I first started with Ruby on Rails and web development, it was really hard to figure out how all the pieces, especially JavaScript, fit together! I figured it out eventually, but it&#8217;s very hard to be an expert in any of these things when you&#8217;re working on the full-stack.</p>
<p>It&#8217;s definitely been refreshing to open up XCode, and start and finish my project all in one language, Objective-C. And back to the whole flow thing, it&#8217;s definitely helps when your mind is focused on the code, and not switching between the different syntax of CoffeeScript vs Ruby vs HAML and how they should all work together best!</p>
<h2>Standard Device</h2>
<p>I cannot express how happy I am to not have to worry about making sure my code works in Internet Explorer!! On the web, you have to make sure your code works with IE, Safari, Chrome, Firefox, and not only that, but that it also works on different screen sizes (is responsive). With Android programming, it&#8217;s a similar situation &#8211; there are so many custom devices, it&#8217;s almost impossible to test for all of them.</p>
<p>With Apple, it&#8217;s different. There&#8217;s the iPhone and the iPad and they&#8217;re very standard. My code will work on all the devices! Goodbye IE!</p>
<h2>Project Restrictions</h2>
<p>I really love that the iPhone has a small screen (compared to the web). That means that an app can only do so many things! I&#8217;ve found it really hard to limit my projects on the web. There are always more features or more links or more pages I can add to the website. But with iPhone projects, less is really more.</p>
<p>For example, this weekend, I&#8217;m working on a timer app. The functionality includes entering a time, clicking start to have it count down, clicking pause to pause it or cancel to cancel it, and that&#8217;s it! I love that small and simple projects like these  can be so powerful and useful on a mobile device.</p>
<p>Have you tried iPhone programming? If so, how do you like it?</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/5-reasons-i-love-iphone-development/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Weird Objective-C Method Names</title>
		<link>http://natashatherobot.com/the-weird-objective-c-method-names/</link>
		<comments>http://natashatherobot.com/the-weird-objective-c-method-names/#comments</comments>
		<pubDate>Fri, 03 May 2013 01:19:47 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[naming]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[parameters]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2302</guid>
		<description><![CDATA[In Objective-C, methods with multiple parameters look very weird, and they method name is even weirder!]]></description>
			<content:encoded><![CDATA[<p>In Objective-C, methods with multiple parameters look very weird, and they method name is even weirder!</p>
<p>Earlier in the week at Mobile Makers, we were working on a Paper, Scissors, Rock app. The user and the computer would choose one of the three (paper, scissors, or rock), and I had a method that would compare the inputs and output YES if the computer won, and NO if the computer lost.</p>
<p>In Ruby, this method would be simple, something like this:</p>
<pre class="brush: ruby; title: ; notranslate">
def computer_won?(computer_choice, user_choice)
  # method implementation
end
</pre>
<p>The Ruby method name in this case would simply be &#8220;computer_won?&#8221;. </p>
<p>Now, compare this to the same method in Objective-C:</p>
<pre class="brush: cpp; title: ; notranslate">
-(BOOL)didComputerWinWithChoice:(NSString *)computerChoice 
                    humanChoice:(NSString *)humanChoice
{
   // method implementation
}
</pre>
<p>You&#8217;d think the name of the Objective-C method would be &#8220;didComputerWinWithChoice&#8221;, but that is NOT correct! The actual name of the above method is &#8220;didComputerWinWithChoice: humanChoice:&#8221;. Notice the colons, they are part of the name! Weird, huh?</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/the-weird-objective-c-method-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C: How To Covert A String Into An Integer</title>
		<link>http://natashatherobot.com/objective-c-covert-a-string-into-an-integer/</link>
		<comments>http://natashatherobot.com/objective-c-covert-a-string-into-an-integer/#comments</comments>
		<pubDate>Fri, 03 May 2013 01:01:08 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2290</guid>
		<description><![CDATA[One the common things you need to do in any programming language is convert a string (e.g. "12") into a corresponding integer. Here is how it's done in the weird Objective-C syntax...]]></description>
			<content:encoded><![CDATA[<p>One the common things you need to do in any programming language is convert a string (e.g. &#8220;12&#8243;) into a corresponding integer. Coming from Ruby, I was pretty much taking this task for granted &#8211; there is a very simple &#8220;to_i&#8221; method (e.g. &#8220;12&#8243;.to_i) would do it.</p>
<p>Looking through Apple&#8217;s API Reference for NSString, I found that the same function is not too bad in Objective-C, although the syntax is much longer than in Ruby as usual. Just use the intValue method like this:</p>
<pre class="brush: plain; title: ; notranslate">

[@&quot;12&quot; intValue];

</pre>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/objective-c-covert-a-string-into-an-integer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Makers: Day 1 Checkin</title>
		<link>http://natashatherobot.com/mobile-makers-day-1-checkin/</link>
		<comments>http://natashatherobot.com/mobile-makers-day-1-checkin/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 22:45:30 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[mobile makers]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2273</guid>
		<description><![CDATA[I couldn't be more excited to finally start Mobile Makers today! In just 8 short weeks, I'll have a new super power: iPhone application development! Here are my reflections from day 1. ]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t be more excited to finally start <a href="http://mobilemakers.co/" target="_blank">Mobile Makers</a> today! In just 8 short weeks, I&#8217;ll have a new super power: iPhone application development!</p>
<p>As part of the program, we&#8217;re asked to reflect on our day by answering a few prompts. I&#8217;ll be blogging those on here as part of the experience. So here it goes:</p>
<h2>0. Where did you get to?</h2>
<p>I&#8217;m really happy with my progress. All the pain of learning Java in <a href="http://see.stanford.edu/see/courseinfo.aspx?coll=824a47e1-135f-4508-a5aa-866adcae1111" target="_blank">Stanford&#8217;s CS106A</a>, then Ruby, the Ruby on Rails, then going to Dev Bootcamp, then learning JavaScript and everything else I needed to be a web developer is definitely paying off BIG TIME!</p>
<p>I had no problem with getting through the Mobile Maker&#8217;s prep materials &#8211; mainly reading <a href="http://www.amazon.com/Objective-C-Programming-Ranch-Guide-Guides/dp/0321706285/ref=sr_1_2" target="_blank">the Big Nerd Ranch Objective-C Guide</a> and watching a few Lynda.com tutorials. And I even went ahead and started the <a href="http://www.amazon.com/iOS-Programming-Ranch-Edition-Guides/dp/0321821521/ref=pd_bxgy_b_img_y" target="_blank">Big Nerd Ranch iOS Programming book</a>.</p>
<p>Today, since it&#8217;s the first day, we mostly talked about learning. In the afternoon, we had a short lecture on pointers and arrays, and then got into groups of four to figure out two challenges, which were really fun. I&#8217;m happy I was able to finish the challenges while helping out some of the other members of my group.</p>
<h2>1. What did you learn?</h2>
<p>Although not related to the material, I love learning about XCode shortcuts. Our challenge involved a pre-existing XCode project, and we just had to fill in the missing code for one of the methods, one to confirm whether or not a string is a palindrome and one to sum a string of comma-separated integers in C.</p>
<p>I had a problem locating the names of the methods when I first opened the program, so I asked one of the instructors to show me how I would go about doing that. Turns out, XCode has an &#8220;Open Quickly&#8230;&#8221; option, which you can use to search your code. Just go to File -&gt; Open Quickly. The command shortcut for it is &#8220;Shift + Command + O&#8221;. I&#8217;ll be using that one a lot!</p>
<p>Another way to do that (the longer way), is to just got the left pane, where the folder layout is, and click on the search icon. And, of course, if you know which file the function is in, you can just do the standard &#8220;Command + F&#8221; to find what you&#8217;re looking for.</p>
<h2>2. What questions are you left with?</h2>
<p>As I&#8217;m going through the Big Nerd Ranch iOS Programming book, where they just magically use convenient and correct functions to get the job done, I&#8217;m getting pretty nervous. In the real world, when building iOS apps, there is no security blanket. I&#8217;ll have to look through the API Reference to find the functions that I need to use in my application. But how do I know what to look for if I don&#8217;t even know what&#8217;s there? I&#8217;d like to get a much better grasp of how to look through and read the API Reference.</p>
<p>I&#8217;m also interested in doing unit testing with iOS. I know it would have helped A LOT with the challenges we were working on already. But I&#8217;m not even sure where to start. Since unit testing is not ingrained in iOS development culture, it&#8217;s going to be a slightly uphill battle to learn it.</p>
<p>Well, that is it for day. Now, I have to go do my evening hack and see if I can go through more of the iOS Programming book. I&#8217;m going to be an iOS developer!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/mobile-makers-day-1-checkin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Keyboard Shortcut For Switching Between The Class Header And Method Files In XCode</title>
		<link>http://natashatherobot.com/keyboard-shortcut-switch-between-class-header-and-implementation-files-xcode/</link>
		<comments>http://natashatherobot.com/keyboard-shortcut-switch-between-class-header-and-implementation-files-xcode/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 18:47:19 +0000</pubDate>
		<dc:creator>Natasha Murashev</dc:creator>
				<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://natashatherobot.com/?p=2269</guid>
		<description><![CDATA[I'm still new to XCode, so I get pretty excited when I learn new keyboard shortcuts. Here is one I learned today:]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still new to XCode, so I get pretty excited when I learn new keyboard shortcuts. When switching between a class&#8217;s header (.h) and implementation (.m) file, I&#8217;ve been using my mouse. Lame, I know!</p>
<p>But today, I learned a cool keyboard shortcut to quickly go between the two:</p>
<pre class="brush: plain; title: ; notranslate">
Command-Control-Up (or Down) arrow
</pre>
<p>Do you know any other good XCode shortcuts? If so, please share in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://natashatherobot.com/keyboard-shortcut-switch-between-class-header-and-implementation-files-xcode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
