<?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>Alonso Robles</title>
	<atom:link href="http://alonsorobles.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://alonsorobles.com</link>
	<description>technology, academia, life, and other tidbits from the trenches of a boggled mind</description>
	<lastBuildDate>Mon, 26 Jan 2015 16:00:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.2</generator>
<site xmlns="com-wordpress:feed-additions:1">3840457</site>	<item>
		<title>Eating Primal at Five Guys</title>
		<link>http://alonsorobles.com/2015/01/26/eating-primal-at-five-guys/</link>
		<comments>http://alonsorobles.com/2015/01/26/eating-primal-at-five-guys/#respond</comments>
		<pubDate>Mon, 26 Jan 2015 16:00:46 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[From the Trenches]]></category>
		<category><![CDATA[Health & Fitness]]></category>
		<category><![CDATA[business travel]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[nutrition]]></category>
		<category><![CDATA[Primal Power Method]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=505</guid>
		<description><![CDATA[Being in the consulting business, I travel from time to time. Travel sometimes makes it difficult to eat well. In my case, I am trying to eat according to the Primal Power Method. Last week, I traveled to Houston. It&#8217;s was nice three-hour drive there. During my stay, I needed to grab a quick lunch &#8230; <a href="http://alonsorobles.com/2015/01/26/eating-primal-at-five-guys/" class="more-link">Continue reading<span class="screen-reader-text"> "Eating Primal at Five Guys"</span></a>]]></description>
				<content:encoded><![CDATA[<p>Being in the consulting business, I travel from time to time. Travel sometimes makes it difficult to eat well. In my case, I am trying to eat according to the <a href="http://www.amazon.com/gp/product/B00FUQ5TZ0/ref=as_li_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B00FUQ5TZ0&#038;linkCode=as2&#038;tag=importchaos-20&#038;linkId=3JF4WZPYZM4EMA3X">Primal Power Method</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=importchaos-20&#038;l=as2&#038;o=1&#038;a=B00FUQ5TZ0" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.</p>
<p>Last week, I traveled to Houston. It&#8217;s was nice three-hour drive there. During my stay, I needed to grab a quick lunch and ended up at <a href="http://www.fiveguys.com/" title="Five Guys">Five Guys</a>.</p>
<p>This was tough. I really like a good burger and I really (and I mean REALLY) like <a href="http://www.fiveguys.com/" title="Five Guys">Five Guys</a>.</p>
<p>So I rushed my order and asked for a &#8220;Bacon Burger&#8221; all the way. Usually, I would order a bacon cheese burger but my Spidey-sense told me to skip the cheese. Then something inside me asked if I could have it lettuce wrapped. The guy who took my order said, &#8220;No problem!&#8221;. I smiled and paid for my order.</p>
<p>While waiting for my order, I realized that I should have asked for no mayo and no ketchup. I love mayo, but I am not sure it is a good source of fat according to the <a href="http://www.amazon.com/gp/product/B00FUQ5TZ0/ref=as_li_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B00FUQ5TZ0&#038;linkCode=as2&#038;tag=importchaos-20&#038;linkId=3JF4WZPYZM4EMA3X">Primal Power Method</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=importchaos-20&#038;l=as2&#038;o=1&#038;a=B00FUQ5TZ0" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. Ketchup has a lot of sugar and was probably a bad idea.</p>
<p>A few minutes later, they called my order. Turns out the ketchup, mayo, and mustard were in separate containers and I enjoyed my lettuce wrapped bacon burger without them.</p>
<p>The other ingredients (grilled mushrooms, grilled onions, and pickles) seemed okay to me. Although I should probably double-check on the pickles and the bacon was probably cured (eat uncured bacon instead), it looks like a <a href="http://www.amazon.com/gp/product/B00FUQ5TZ0/ref=as_li_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B00FUQ5TZ0&#038;linkCode=as2&#038;tag=importchaos-20&#038;linkId=3JF4WZPYZM4EMA3X">Primal Power Method</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=importchaos-20&#038;l=as2&#038;o=1&#038;a=B00FUQ5TZ0" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> meal is possible there.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2015/01/26/eating-primal-at-five-guys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">505</post-id>	</item>
		<item>
		<title>Home Projects for 2015</title>
		<link>http://alonsorobles.com/2015/01/24/home-projects-for-2015/</link>
		<comments>http://alonsorobles.com/2015/01/24/home-projects-for-2015/#respond</comments>
		<pubDate>Sat, 24 Jan 2015 16:00:29 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[Other Tidbits]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[homestead]]></category>
		<category><![CDATA[nutrition]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=508</guid>
		<description><![CDATA[Last year with the help of my father-in-law, we started our home garden. We made a number of mistakes. Such as: Putting garden beds next to the foundation. The watering caused a lot of erosion that, if continued, may result in costly foundation problems. Planting randomly. We planted things we commonly used like Thai chili &#8230; <a href="http://alonsorobles.com/2015/01/24/home-projects-for-2015/" class="more-link">Continue reading<span class="screen-reader-text"> "Home Projects for 2015"</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last year with the help of my father-in-law, we started our home garden. We made a number of mistakes. Such as:</p>
<ul>
<li>Putting garden beds next to the foundation. The watering caused a lot of erosion that, if continued, may result in costly foundation problems.</li>
<li>Planting randomly. We planted things we commonly used like Thai chili peppers, Serrano peppers, Habanero peppers, Thai basil, mint, lemon grass, Thai egg-plant, bell peppers as we created the garden beds without planning. </li>
</ul>
<p>As a result, we are doing some planning while I build out two 12&#215;4 foot raised garden beds about 6 feet away from the foundation. I am using 2&#215;12 pre-treated wood to build the beds and planing on getting about 3.5 cubic yards of garden soil from a local nursery to start the beds.</p>
<p>Other projects this year include:</p>
<ul>
<li>Composting bins &#8211; we have enough kitchen and garden waste to cut our cost of commercial compost and other garden products.</li>
<li>Rain water collection system &#8211; we spent a lot on water last year and I am confident we can cut it by collecting and using rain water as our primary garden water source.</li>
<li>Building out Grandma&#8217;s pantry &#8211; we wasted some of our garden produce this year and want to make the best of this year&#8217;s bounty by storing it. Additionally, we always run to the store at the last-minute to prepare our holiday meals and want to get ahead of it this year.</li>
</ul>
<p>There are plenty of other home projects we want to complete and we may do more this year. But we have to start somewhere, and these three projects are a good spot to start.</p>
<p>More details on each as we roll them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2015/01/24/home-projects-for-2015/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">508</post-id>	</item>
		<item>
		<title>Getting Back Into Eating Right</title>
		<link>http://alonsorobles.com/2015/01/21/getting-back-into-eating-right/</link>
		<comments>http://alonsorobles.com/2015/01/21/getting-back-into-eating-right/#respond</comments>
		<pubDate>Thu, 22 Jan 2015 04:57:16 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[From the Trenches]]></category>
		<category><![CDATA[Health & Fitness]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[nutrition]]></category>
		<category><![CDATA[Primal Power Method]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=500</guid>
		<description><![CDATA[If you have followed this blog or know me personally for any length of time, then you know that I have constantly battled with my weight since high school. So much so that a few years back I wrote a few posts on nutrition when I had gotten a few wins under my belt. Three &#8230; <a href="http://alonsorobles.com/2015/01/21/getting-back-into-eating-right/" class="more-link">Continue reading<span class="screen-reader-text"> "Getting Back Into Eating Right"</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you have followed this blog or know me personally for any length of time, then you know that I have constantly battled with my weight since high school. So much so that a few years back I wrote a <a href="http://alonsorobles.com/tag/nutrition/">few posts on nutrition</a> when I had gotten a few wins under my belt.</p>
<p>Three years ago I stopped focusing on my nutrition and exercise and managed to put on over 50 lbs. Well the time has come again to wage war on obesity and I figured I would openly share my goals and my progress against it.</p>
<p>Now, I am no expert on nutrition or health. So what I do, I do with the goal of living a better life and being a better father, husband, friend, and employee (in that order).</p>
<p>In terms of nutrition, I started eating according to the  <a href="http://www.amazon.com/gp/product/B00FUQ5TZ0/ref=as_li_tl?ie=UTF8&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B00FUQ5TZ0&#038;linkCode=as2&#038;tag=importchaos-20&#038;linkId=3JF4WZPYZM4EMA3X">Primal Power Method</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=importchaos-20&#038;l=as2&#038;o=1&#038;a=B00FUQ5TZ0" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> a little over two weeks ago and have seen great results.</p>
<p>In terms of exercise, didn&#8217;t change a thing. I still try to walk about 15-30 minutes every day. I still try to take the stairs instead of the elevator. I usually park a good distance from my non-home destinations (driving large truck forces that on you anyway). And that&#8217;s it.</p>
<p>So,  what are my results?</p>
<ul>
<li>On January 5th, 2015, I weighed in at 284 lbs. </li>
<li>On January 12th, 2015, I weighed in at 275 lbs. </li>
<li>On January 19th, 2015, I weighed in at 270 lbs. </li>
</ul>
<p>That&#8217;s 14 lbs in two weeks.</p>
<p>My goal is to get under 200 lbs. Which means I still have a long way to go. However, I am hopeful after these results and will keep on trucking for now.</p>
<p>I will share some of my challenges along the way. I hope you will take the steps necessary to live better and become an improved version of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2015/01/21/getting-back-into-eating-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">500</post-id>	</item>
		<item>
		<title>Houston TechFest 2013</title>
		<link>http://alonsorobles.com/2013/08/01/houston-techfest-2013/</link>
		<comments>http://alonsorobles.com/2013/08/01/houston-techfest-2013/#respond</comments>
		<pubDate>Thu, 01 Aug 2013 14:30:53 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[ravendb]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=480</guid>
		<description><![CDATA[Houston TechFest 2013 is around the corner. This is a free to the public (except for parking) event with a number of great presentations and exhibits taking place at the Reliant Center on September 28. I will be giving my Up and Running with RavenDB presentation for the third time. Although, I have revamped it &#8230; <a href="http://alonsorobles.com/2013/08/01/houston-techfest-2013/" class="more-link">Continue reading<span class="screen-reader-text"> "Houston TechFest 2013"</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.houstontechfest.org" title="Houston TechFest 2013">Houston TechFest 2013</a> is around the corner. This is a free to the public (except for parking) event with a number of great presentations and exhibits taking place at the Reliant Center on September 28. </p>
<p>I will be giving my <a href="http://alonsorobles.com/2013/04/19/ravendb-up-and-running-north-houston-net-user-group/" title="RavenDB – Up and Running @ North Houston .NET User Group">Up and Running with RavenDB</a> presentation for the third time. Although, I have revamped it by incorporating the feedback I received from earlier events. </p>
<p>Hope to see you at my session!</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2013/08/01/houston-techfest-2013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">480</post-id>	</item>
		<item>
		<title>Am I Doing Dynamic Views with AngularJS Right?</title>
		<link>http://alonsorobles.com/2013/07/30/am-i-doing-dynamic-views-with-angularjs-right/</link>
		<comments>http://alonsorobles.com/2013/07/30/am-i-doing-dynamic-views-with-angularjs-right/#respond</comments>
		<pubDate>Tue, 30 Jul 2013 14:30:56 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[Single Page Application]]></category>
		<category><![CDATA[SPA]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=464</guid>
		<description><![CDATA[I have played around with a lot more JavaScript and single page applications (SPAs) as of late. More specifically, I have fiddled with AngularJS in my most recent personal project and it has been a lot of fun. However, client side web application development is not the same as server-side web application development. In this &#8230; <a href="http://alonsorobles.com/2013/07/30/am-i-doing-dynamic-views-with-angularjs-right/" class="more-link">Continue reading<span class="screen-reader-text"> "Am I Doing Dynamic Views with AngularJS Right?"</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have played around with a lot more JavaScript and single page applications (SPAs) as of late. More specifically, I have fiddled with AngularJS in my most recent personal project and it has been a lot of fun. However, client side web application development is not the same as server-side web application development. In this post, I will describe a challenge I had with client side routing using AngualrJS, how I solved it, and how I feel about the solution. Hopefully, somebody will give me a little feedback on my approach.</p>
<h2>The Problem</h2>
<figure id="attachment_466" style="max-width: 300px" class="wp-caption alignright"><img class="size-medium wp-image-466 " alt="The Facebook home page when you are not logged in." src="https://i1.wp.com/alonsorobles.com/wp-content/uploads/2013/07/Screen-Shot-2013-07-29-at-7.40.56-PM.png?resize=300%2C245" srcset="https://i1.wp.com/alonsorobles.com/wp-content/uploads/2013/07/Screen-Shot-2013-07-29-at-7.40.56-PM.png?resize=300%2C245 300w, https://i1.wp.com/alonsorobles.com/wp-content/uploads/2013/07/Screen-Shot-2013-07-29-at-7.40.56-PM.png?resize=367%2C300 367w, https://i1.wp.com/alonsorobles.com/wp-content/uploads/2013/07/Screen-Shot-2013-07-29-at-7.40.56-PM.png?w=995 995w" sizes="(max-width: 300px) 85vw, 300px" data-recalc-dims="1" /><figcaption class="wp-caption-text">The Facebook home page when you are not logged in.</figcaption></figure>
<p>At the root level of my web site, I want to show one view to an authenticated use and a different view to an anonymous user. This is a very common need and feature in many web applications. For example, let&#8217;s look at Facebook. When you point your browser to http://facebook.com, you will get one of two things depending on whether you have an authenticated session. If there is no active session, then you are presented with a welcome message which asks you to create an account. If there is an active session, then your get your timeline.</p>
<p>The solution for this from the server-side is actually  simple. When the server receives the request for the home page, then we can simply check the session and use it to decide which view to respond with. Done. Easy as pie!</p>
<p>With a SPA, the solution wasn&#8217;t  as clear. At least not to me with my limited AngularJS experience.</p>
<h2>Solution</h2>
<p>To be honest, I hope somebody else has a better solution than this to share with me. But this is what I did. I started an <code>app.js</code> file containing some simple AngularJS configuration logic:</p>
<script src="https://gist.github.com/6109861.js"></script><noscript><pre><code class="language-javascript javascript">var MyApp = MyApp || {};

(function () {
    'use strict';

    var homeController,
        app = angular.module('myApp', []);

    app.config(function ($routeProvider) {
        $routeProvider
            .when('/', {
                templateUrl: 'templates/home',
            })
            .otherwise({
                templateUrl: 'templates/404'
            });
    });

    MyApp.App = app;
}());</code></pre></noscript>
<p>The template pulled down by the root route was empty at this point and I was forced to make a choice. Should this template contain the welcome page content? Or should it contain the authenticated user content? Or what?</p>
<p>I decided it would contain the authenticated user content. This is because I expect (well more like hope) that most people who visit my application will log in and use it. This hopeful assumption made sense and so I set out to build my home page controller.</p>
<p>The first thing that I thought I would do was to inject the <code>$http</code> service so I could make a call to my website&#8217;s API and get the user&#8217;s session object. If I get a session back then I can go ahead with displaying the home page for the authenticated user. If I don&#8217;t then I can route them to the welcome page using the injected <code>$location</code> service and ask them to sign up or log in.</p>
<p>At this point my update <code>app.js</code> file looks like this:</p>
<script src="https://gist.github.com/6109851.js"></script><noscript><pre><code class="language-javascript javascript">var MyApp = MyApp || {};

(function () {
    'use strict';

    var homeController,
        app = angular.module('myApp', []);

    // controllers
    homeController = function ($scope, $http, $location) {
        $http
            .get('/api/session')
            .success(function (data) {
                if (data.session) {
                    $scope.session = data.session;
                } else {
                    $location.path('/welcome');
                }
            });
    };

    app.config(function ($routeProvider) {
        $routeProvider
            .when('/', {
                templateUrl: 'templates/home',
                controller: homeController
            })
            .when('/welcome', {
                templateUrl: 'templates/welcome'
            })
            .otherwise({
                templateUrl: 'templates/404'
            });
    });

    MyApp.App = app;
}());</code></pre></noscript>
<h2>Thoughts</h2>
<p>This approach is very simple. At the end of the day, it is not really what I wanted. What I wanted to do is to dynamically tell the <code>$routeProvider</code> which <code>tempalteUrl</code> to use dynamically. This is probably due to my experience writing server-side MVC logic to select a view based on the session state. I didn&#8217;t like that I now have an extra route for my welcome page. This doesn&#8217;t feel right to me. At least, it doesn&#8217;t feel natural.</p>
<p>Another approach that I considered after this implementation is using an <code>ngView</code> directive in my template and dynamically setting the <code>templateUrl</code> value using the <code>$scope</code> in the controller. However, I don&#8217;t like the idea of branching logic in the controller to populate the scope differently based on the session. That doesn&#8217;t feel right either.</p>
<p>So what&#8217;s next? Well, I think I am going to stick with this solution for a bit and probably create a session service to get the session object since I will probably need it between various controllers. I will probably also push a response interceptor in the <code>$httpProvider</code> to handle unauthorized responses from the API. While I am not entirely comfortable with this approach yet. It looks promising giving my limited exposure to AngularJS. I am hopeful that a fellow reader may offer some suggestions and/or advice.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2013/07/30/am-i-doing-dynamic-views-with-angularjs-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">464</post-id>	</item>
		<item>
		<title>RavenDB &#8211; Up and Running @ North Houston .NET User Group</title>
		<link>http://alonsorobles.com/2013/04/19/ravendb-up-and-running-north-houston-net-user-group/</link>
		<comments>http://alonsorobles.com/2013/04/19/ravendb-up-and-running-north-houston-net-user-group/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 19:03:40 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=459</guid>
		<description><![CDATA[I had a lot of fun showing the North Houston .NET User Group how to get RavenDB up and running. Below you will find the enter seven slide presentation. The code used during the presentation is available on my GitHub. This was fun talk that I would like to give again.]]></description>
				<content:encoded><![CDATA[<p>I had a lot of fun showing the <a href="http://nhdnug.org">North Houston .NET User Group</a> how to get RavenDB up and running. Below you will find the enter seven slide presentation. The code used during the presentation is <a href="https://github.com/alonsorobles/nhdnug-04182013">available on my GitHub</a>.</p>
<iframe src='https://www.slideshare.net/slideshow/embed_code/19174678' width='840' height='688' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
<p>This was fun talk that I would like to give again.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2013/04/19/ravendb-up-and-running-north-houston-net-user-group/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">459</post-id>	</item>
		<item>
		<title>Deep Dive into RavenDB Indexes</title>
		<link>http://alonsorobles.com/2012/08/14/deep-dive-into-ravendb-indexes/</link>
		<comments>http://alonsorobles.com/2012/08/14/deep-dive-into-ravendb-indexes/#respond</comments>
		<pubDate>Tue, 14 Aug 2012 14:49:41 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[ravendb]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=447</guid>
		<description><![CDATA[Last night, I presented a deep dive session on RavenDB indexes at the Austin .NET User Group. It was a blast as I got to see some familiar faces and was able to engage in some exciting RavenDB discussions. Here are the slides from the presentation: There are a few upcoming RavenDB events that I &#8230; <a href="http://alonsorobles.com/2012/08/14/deep-dive-into-ravendb-indexes/" class="more-link">Continue reading<span class="screen-reader-text"> "Deep Dive into RavenDB Indexes"</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last night, I presented a deep dive session on RavenDB indexes at the <a href="http://adnug.org/Home/august-13-2012-ravendb/">Austin .NET User Group</a>. It was a blast as I got to see some familiar faces and was able to engage in some exciting RavenDB discussions.</p>
<p>Here are the slides from the presentation:</p>
<iframe src='https://www.slideshare.net/slideshow/embed_code/13968714' width='840' height='688' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
<p>There are a few upcoming RavenDB events that I am very excited to be a part of. Check the links for more information:</p>
<ul>
<li>August 23rd: <a href="http://www.headspring.com/blog/small-talk-and-big-news/openhouseparty/">Open House Party with Oren Eini</a></li>
<li>August 25th: <a href="http://houstoncodecamp.com/sessions/22">Getting Started with RavenDB</a> (a Houston Code Camp session)</li>
<li>September 5th-6th: <a href="http://www.headspring.com/events/ravendb-boot-camp/">RavenDB Boot Camp</a></li>
</ul>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/08/14/deep-dive-into-ravendb-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">447</post-id>	</item>
		<item>
		<title>Intro to RavenDB at Austin Code Camp 2012</title>
		<link>http://alonsorobles.com/2012/06/10/intro-to-ravendb-at-austin-code-camp-2012/</link>
		<comments>http://alonsorobles.com/2012/06/10/intro-to-ravendb-at-austin-code-camp-2012/#respond</comments>
		<pubDate>Sun, 10 Jun 2012 19:27:19 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[.NET Development]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[MVC 3]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[ravendb]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=423</guid>
		<description><![CDATA[If you would like to see the source code for the Depot Application in MVC 3 with RavenDB presented towards the end of the presentation, it is available on GitHub. Don&#8217;t forget to check out the upcoming Central Texas GiveCamp! I am really looking forward to seeing the developer community get together to give to charity.]]></description>
				<content:encoded><![CDATA[<iframe src='https://www.slideshare.net/slideshow/embed_code/13269280' width='840' height='688' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
<p>If you would like to see the source code for the <a href="https://github.com/alonsorobles/DepotOnAspNetMvc3WithRavenDB">Depot Application in MVC 3 with RavenDB</a> presented towards the end of the presentation, it is available on GitHub.</p>
<p>Don&#8217;t forget to check out the upcoming <a href="http://ctxgivecamp.org">Central Texas GiveCamp</a>! I am really looking forward to seeing the developer community get together to give to charity.</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/06/10/intro-to-ravendb-at-austin-code-camp-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">423</post-id>	</item>
		<item>
		<title>A C# Developer&#8217;s Adventures in Objective-C</title>
		<link>http://alonsorobles.com/2012/04/16/a-c-developers-adventures-in-objective-c/</link>
		<comments>http://alonsorobles.com/2012/04/16/a-c-developers-adventures-in-objective-c/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 00:25:17 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=410</guid>
		<description><![CDATA[The other day, my father asked me how to get started developing for the iPhone and iPad. He is looking for a technical hobby that he can do while he travels in his upcoming retirement. I had no idea really how to get started so I asked around. I learned quickly that it doesn’t take &#8230; <a href="http://alonsorobles.com/2012/04/16/a-c-developers-adventures-in-objective-c/" class="more-link">Continue reading<span class="screen-reader-text"> "A C# Developer&#8217;s Adventures in Objective-C"</span></a>]]></description>
				<content:encoded><![CDATA[<p>The other day, my father asked me how to get started developing for the iPhone and iPad. He is looking for a technical hobby that he can do while he travels in his upcoming retirement. I had no idea really how to get started so I asked around. I learned quickly that it doesn’t take much to learn if you have an Apple computer.</p>
<p>All that I did is:</p>
<ol>
<li>Download <a href="https://developer.apple.com/xcode/">XCode 4</a> which is a free download from the Mac App Store.</li>
<li>Download the Stanford University <a href="http://itunes.apple.com/itunes-u/ipad-iphone-application-development/id473757255">iPhone and iPad Application Development</a> Collection for <a href="http://www.apple.com/education/itunes-u/">iTunes U</a>.</li>
<li>Watched the first 2 lectures from the course.</li>
<li>Fired up XCode 4.</li>
<li>Attempted the <a href="https://github.com/alonsorobles/ReversePolishNotationCalculator">Reverse Polish Notation Calculator</a> targeting the iPhone described in the second lecture.</li>
</ol>
<p>Of course, this was a very simple iPhone application that was built with only about three ours exposure to <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html">Objective-C</a> (the programming language), <a href="https://developer.apple.com/technologies/ios/cocoa-touch.html">Cocoa Touch</a> (the iOS framework), and XCode (the integrated development environment). It was a fun exercise. However, if you are only familiar with .NET and/or Java there are some uncomfortable moments with the Object-C syntax that you are bound to encounter. Mind you I am a complete novice with the language, the framework, the development environment, and the platform. Nevertheless, these are my experiences.</p>
<p>First things first… The iPhone application makes heavy use of the model-view-controller (MVC) pattern. I like this. I am familiar with the MVC pattern and I can work with that. What was surprising is that the only code I really touched was the model objects and controller objects. The view was entirely created with the visual designer which generated <a href="https://github.com/alonsorobles/ReversePolishNotationCalculator/blob/master/ReversePolishNotationCalculator/en.lproj/MainStoryboard.storyboard">a storyboard file</a> to describe the view. This file is an XML file. This wasn’t difficult to get used to as I only really worked with the native Cocoa view objects. I am curious to find out what the story for creating your own view objects is.</p>
<p>After dragging and dropping controls on the storyboard, I started working with the controller. This experience was mostly clicking and dragging connections from the visual designer to the controller source code and implementing a few properties and methods. Take a moment to review the controller header file:</p>
<script src="https://gist.github.com/2402607.js"></script><noscript><pre><code class="language-objective-c objective-c">#import &lt;UIKit/UIKit.h&gt;

@interface CalculatorViewController : UIViewController

@property (weak, nonatomic) IBOutlet UILabel *display;

@end
</code></pre></noscript>
<p>Even with some exposure to C and C++ over a decade ago, this header file appeared strange to me. It’s purpose is similar to C or a C++ header file as it serves to declare class, type,  function, and constant declarations.</p>
<p>Now look at the source file:</p>
<script src="https://gist.github.com/2402660.js"></script><noscript><pre><code class="language-objective-c objective-c">#import &quot;CalculatorViewController.h&quot;
#import &quot;Calculator.h&quot;

@interface CalculatorViewController ()

@property (nonatomic) BOOL userIsEnteringANumber;
@property (nonatomic, strong) Calculator *calculator;

@end

@implementation CalculatorViewController
@synthesize display = _display;
@synthesize userIsEnteringANumber = _userIsEnteringANumber;
@synthesize calculator = _calculator;

- (Calculator *) calculator {
    if (!_calculator) _calculator = [[Calculator alloc] init];
    return _calculator;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
    [self setDisplay:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

- (IBAction)digitPressed:(UIButton *)sender {
    NSString *digit = sender.currentTitle;
    if (self.userIsEnteringANumber) 
        self.display.text = [self.display.text stringByAppendingString:digit];
    else if (digit != @&quot;0&quot;) {
        self.display.text = digit;
        self.userIsEnteringANumber = YES;
    }
}

- (IBAction)operandPressed:(UIButton *)sender {
    if (self.userIsEnteringANumber) [self enterPressed];
    double result = [self.calculator perform:sender.currentTitle];
    self.display.text = [NSString stringWithFormat:@&quot;%g&quot;, result];
}

- (IBAction)enterPressed {
    [self.calculator push:[self.display.text doubleValue]];
    self.userIsEnteringANumber = NO;
}

@end
</code></pre></noscript>
<p>This is the source file which contains the implementation details of the declarations in the header file. There really is a lot going on in both of these files that are needed to compile the view controller.</p>
<p>To be honest, at first glance I was really confused and it took me some time to understand the high level basics of the syntax and what it was doing. The @notation did not make sense. There are many keywords here that don’t translate directly to C#, or Java. I didn’t understand what the dash (-) in front of method declarations and implementations was for. What was the difference between the @interface structure in the header file and source file? I was really lost. The syntax was extremely foreign. Did you notice all the square brackets?</p>
<p>I will summarize what I can here, but really at this point I would recommend looking at a good Objective-C primer like the <a href="https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/_index.html">Learning Objective-C Primer</a> found the <a href="https://developer.apple.com/library/ios/navigation/">iOS Developer Library</a>. By the way, the documentation packaged with XCode 4 and the developer libraries found in the <a href="http://developer.apple.com/">Apple Developer Center</a> are your friends!</p>
<h2>Concepts in the Header File</h2>
<h3></h3>
<h3>#import</h3>
<p>The header file is small and concise and is not too hard to understand. The first think you should notice is the <em>#import</em> directive. This directive is similar to the <em>using</em> keyword in C#. It tells the compiler that you want to include code defined somewhere else in your header. In my header file, I am telling the compiler to include the UIKit header file where the interface of the UIViewController class is declared.</p>
<h3>@interface</h3>
<p>The @ symbol indicates a compiler directive. The interface directive is used to presents the class name (CalculatorViewController) and begins the declaration of the class interface. This should not be confused with the concept of an <em>interface</em> in C#.</p>
<p>It is my understanding that the declarations made in the header file are accessible to other header and source files when they are imported.  So in C# terms, you can think of these declarations to have the <em>public</em> visibility modifier applied to them.</p>
<h3>@property (weak, nonatomic)</h3>
<p>The property directive is a convenient way of declaring a property backed by an instance variable. The closest think I can think of is a the declaration of a property in a C# interface like this (even though it is a really far stretch):</p>
<script src="https://gist.github.com/2403022.js"></script><noscript><pre><code class="language-c# c#">interface IMyObject
{
    Object MyProperty { get; set;}
}</code></pre></noscript>
<p>The next thing are the custom options contained in the parenthesis. These options define how the accessor methods behave. If you want to find out more, check out the <a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProperties.html#//apple_ref/doc/uid/TP30001163-CH17-SW14">declared properties documentation</a>.</p>
<h3>@end</h3>
<p>This directive is used to close other opening directives. In this case, it closes the <em>@interface</em> directive.</p>
<h2>Concepts in the Source File</h2>
<h3>#import</h3>
<p>Here we see the <em>#import</em> directive again. In this file we have two of them. The first is the header file for this source file. The second is the header for a Calculator class that is used in the controller.</p>
<h3>@interface</h3>
<p>Again we see the interface directive. This time it is followed by parenthesis. I have no clue what these are for yet. Again my understanding here is that the declarations in this interface block are only visible to my implementation in this source file (somebody please correct me if this assumption is incorrect). Nothing really new here besides those things I don’t quite get.</p>
<p>Within this interface I declare two more properties and introduce some more custom options. I suppose these would be how you declare private properties in C#. But again it is a really far stretch that is not an accurate translation.</p>
<h3></h3>
<h3>@implementation</h3>
<p>The implementation directive is similarly structured to the interface directive as it begins with the presentation of the class name. The difference is that this directive contains the implementation details of the class. It is closed with the <em>@end</em> directive at the bottom of the page.</p>
<h3>@synthesize</h3>
<p>The synthesize directive the implementation counterpart to the <em>@property</em> directive. This directive tells the compiler to generate the setter and getter methods for the property according to the custom options presented in the interface declaration. In addition, we can also specify the instance variable that backs the property.</p>
<h3>&#8211; (ReturnType)methodSignatureKeywords:(ParameterType)parameterName moreMethodSignatureKeywords:(ParameterType)parameterName</h3>
<p>What the heck is this? Tons of stuff going on here. What you have here is the pattern of a method prototype. It starts with a dash (-) or a plus (+). The dash makes it an instance method while the plus makes it a class method (or a static method). In the first parenthesis we present the return type. This is followed by the method name interlaced with parameter types and names. I found this very hard to read at first. But with a little practice you can get some really readable methods.</p>
<p>When declaring a method with in the context of the the <em>@interface</em> directive you would terminate it with a semicolon. By contrast, within the context of the <em>@implementation</em> directive it is followed by an open curly brace, the method body, and terminated with a closing curly brace.</p>
<p>For instance, take a look at this method:</p>
<script src="https://gist.github.com/2403099.js"></script><noscript><pre><code class="language-objective-c objective-c">- (Calculator *) calculator {
    if (!_calculator) _calculator = [[Calculator alloc] init];
    return _calculator;
}</code></pre></noscript>
<p>This method specifies the getter method for the <em>calculator</em> property. Yes, the compiler would have created a simple getter for the calculator property since I used the property and synthesize directives. But since I implemented the getter, the compiler will only generate the getter method. But moving on to talk about the method. Here I am declaring an instance method that returns pointer to a Calculator object. The method name is “calculator”. This is followed by curly braces that contain the method implementation details.</p>
<p>A loosely translated C# equivalent might look like this:</p>
<script src="https://gist.github.com/2403112.js"></script><noscript><pre><code class="language-c# c#">Calculator Calculator 
{
    get
    {
        if (_calculator == null) _calculator = new Calculator();
        return _calculator;
    }
    set;
}</code></pre></noscript>
<p>I added the auto setter in the translation to give you an idea of what the <em>@property</em> and <em>@synthesize</em> directives did for me in this source file.</p>
<p>Let’s look at one more method in the source file:</p>
<script src="https://gist.github.com/2403118.js"></script><noscript><pre><code class="language-objective-c objective-c">- (IBAction)operandPressed:(UIButton *)sender {
    if (self.userIsEnteringANumber) [self enterPressed];
    double result = [self.calculator perform:sender.currentTitle];
    self.display.text = [NSString stringWithFormat:@&quot;%g&quot;, result];
}</code></pre></noscript>
<p>This example method takes a single parameter. And may be loosely translated to C# like this:</p>
<script src="https://gist.github.com/2403174.js"></script><noscript><pre><code class="language-c# c#">void DigitPressed(UIButton sender)
{
    string digit = sender.CurrentTitle;
    if (this.UserIsEnteringANumber)
        this.Display.Text = this.Display.Text + digit;
    else if (digit == @&quot;0&quot;)
    {
        this.Display.Text = digit;
        this.UserIsEnteringANumber = true;
    }
}</code></pre></noscript>
<p>You will notice the return type here is void and that is because the IBAction return type is a constant in the UIKit that the compiler translates down to void. The constant is used for integration between XCode and the Interface Builder tools. I probably don’t have this right either, but it is my understanding at this time (again if I wrong please point it out to me).</p>
<h3>[targetObject methodSignatureKeywords:parameter moreMethodSignatureKeywords:parameter]</h3>
<p>I’m sure you are asking about these now. The brackets are another notation that just did not make sense to me until some discussion in the Stanford lecture discussed them and even then I had to do a little reading in the documentation. The bottom line is this is the syntax for sending a message to an object. You can also think about this notation invoking a method.</p>
<p>So there you have it… my first experience with Objective-C, Cocoa, and XCode. I have much more to learn, but I am really happy that I tried it out. It was fun working with something new. I am still curious about how refactoring will work and I am sure I will miss my <a href="http://www.jetbrains.com/resharper/">ReSharper</a> features (if I do get into this I will probably try <a href="http://www.jetbrains.com/objc/">AppCode</a>). I am also interested to investigate the unit testing options available.</p>
<p><strong>[Update 4/17/2012] </strong>The walkthrough for the iOS calculator is <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/system/files/assignments/Walkthrough%20iOS%205_0.pdf">available in PDF</a> on the <a href="http://www.stanford.edu/class/cs193p/cgi-bin/drupal/">Stanford Course web site</a>.</p>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/04/16/a-c-developers-adventures-in-objective-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">410</post-id>	</item>
		<item>
		<title>2012 Arthritis Walk Austin</title>
		<link>http://alonsorobles.com/2012/04/05/2012-arthritis-walk-austin/</link>
		<comments>http://alonsorobles.com/2012/04/05/2012-arthritis-walk-austin/#respond</comments>
		<pubDate>Fri, 06 Apr 2012 01:39:33 +0000</pubDate>
		<dc:creator><![CDATA[Alonso Robles]]></dc:creator>
				<category><![CDATA[Other Tidbits]]></category>
		<category><![CDATA[health]]></category>

		<guid isPermaLink="false">http://alonsorobles.com/?p=407</guid>
		<description><![CDATA[My family just registered a family and friends team, Team Robles, for the 2012 Arthritis Walk Austin event. This event has a special place in our heart as we have friends and family who live with arthritis including our son who was diagnosed four years ago with polyarticular juvenile rheumatoid arthritis. At this time, we &#8230; <a href="http://alonsorobles.com/2012/04/05/2012-arthritis-walk-austin/" class="more-link">Continue reading<span class="screen-reader-text"> "2012 Arthritis Walk Austin"</span></a>]]></description>
				<content:encoded><![CDATA[<p>My family just registered a family and friends team, <a href="http://austinarthritiswalk.kintera.org/teamrobles">Team Robles</a>, for the <a href="http://austinarthritiswalk.org/">2012 Arthritis Walk Austin</a> event. This event has a special place in our heart as we have friends and family who live with arthritis including our son who was diagnosed four years ago with polyarticular juvenile rheumatoid arthritis. At this time, we are looking for friends and family who would like to support us by either <a href="http://austinarthritiswalk.kintera.org/teamrobles">joining our team and/or making a donation</a> that will go to the <a href="http://www.arthritis.org/">Arthritis Foundation</a> via the <a href="http://lmt.arthritis.org/">Let’s Move Together</a> project.</p>
<p>Thanks in advance for all your support!</p>
]]></content:encoded>
			<wfw:commentRss>http://alonsorobles.com/2012/04/05/2012-arthritis-walk-austin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">407</post-id>	</item>
	</channel>
</rss>
