tag:codysand.svbtle.com,2014:/feedCody Sand2014-02-26T13:45:13-08:00Cody Sandhttps://codysand.svbtle.comSvbtle.comtag:codysand.svbtle.com,2014:Post/setting-aspnet-forms-authentication-timeout2014-02-26T13:45:13-08:002014-02-26T13:45:13-08:00Specifying ASP.NET Forms Authentication Timeout in Code<p>Microsoft’s Forms Authentication is the preferred mechanism to get login and security up-and-running on ASP.NET applications. In fact, it comes enabled by default in ASP.NET MVC projects.</p>
<p>Typically, you’d configure the timeout via IIS, or by directly editing the <code class="prettyprint">web.config</code> for the application. </p>
<pre><code class="prettyprint"><!-- Example Web Config -->
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All" timeout="1" path="/" slidingExpiration="true" />
</authentication>
</code></pre>
<p>By default, your MVC application calls <code class="prettyprint">FormsAuthentication.SetAuthCookie()</code>, which sets a cookie using the timeout declared in your <code class="prettyprint">web.config</code> file. This is good for setting a default timeout, but there may be certain cases where you’d like a longer timeout per user role or some other criteria.</p>
<p>In these cases, you can use a <a href="http://msdn.microsoft.com/en-us/library/system.web.security.formsauthenticationticket(v=vs.100).aspx"><code class="prettyprint">FormsAuthenticationTicket</code></a> object to specify your own expiration date, as shown below.</p>
<pre><code class="prettyprint">var ticket = new FormsAuthenticationTicket(
version: 1,
name: userName,
issueDate: DateTime.Now,
expiration: DateTime.Now.AddMonths(1),
isPersistent: false,
userData: "");
var encryptedTicket = FormsAuthentication.Encrypt(ticket);
var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
Response.Cookies.Set(cookie);
</code></pre>
<p>In this example, I’m instantiating a new <code class="prettyprint">FormsAuthenticationTicket</code> object and setting the expiration date of the cookie to one month from now instead of the one minute from now, as dictated by the <code class="prettyprint">timeout="1"</code> attribute in the <code class="prettyprint">web.config</code> example above. </p>
<p>Next, I use <code class="prettyprint">FormsAuthentication.Encrypt()</code> to encrypt my <code class="prettyprint">ticket</code>. Finally, I create a new cookie using the <code class="prettyprint">FormsAuthentication.FormsCookieName</code> key, using my <code class="prettyprint">encryptedTicket</code> as my cookie value, which I set on the <code class="prettyprint">Response.Cookies</code> collection. </p>
<p>There’s plenty of use cases for functionality like this. In our case, my team needed a way to allow a user to login using a hidden login that would allow them access to only certain parts of the system with an extended timeout. </p>
tag:codysand.svbtle.com,2014:Post/so-do-you-need-jquery-or-not2014-02-02T12:11:49-08:002014-02-02T12:11:49-08:00So Do You Need jQuery or Not?<p>There’s been a lot of talk lately about the necessity of tools like jQuery for web applications in 2014. This is a result of a <a href="https://news.ycombinator.com/item?id=7152068">link that was posted on Hacker News this past week</a>, fueling a large debate with parties from each side defending their position on going without tools like jQuery.</p>
<p>Proponents for these tools argue that some of the examples on the <a href="http://youmightnotneedjquery.com/">You Might Not Need jQuery</a> site are misleading by making assumptions that you already have handles to certain elements you might otherwise be retrieving by jQuery selector, or overly basic examples that don’t accurately reflect real-world usage.</p>
<p>On the other wise of the argument, I generally agree with the sentiment that developers who are writing a reusable framework that doesn’t involve much DOM manipulation should make attempts to refrain from including jQuery as a dependency.</p>
<p>jQuery’s biggest selling point was its ability to obscure away all of the nasty browser quirks and inconsistencies between much older browsers. If you’re targeting only modern web browsers (IE10+ and latest versions of Chrome, FIrefox, Opera, and Safari), I think you can easily get away with going without jQuery, especially if you’re starting a new project with the assumption that you want to avoid jQuery.</p>
<p>I think another one of the big cases for jQuery is that it’s become ubiquitous. Everyone knows jQuery. Getting someone up to speed on a large web application takes time, and developers with a jQuery background are much more plentiful than those who’re familiar with the newer web standards that enable a lot of that same functionality.</p>
<p>At <a href="http://www.cartegraph.com/">Cartegraph</a>, we’re lucky enough to not have to support web browsers older than IE9, but we still use jQuery. We use a variety of features provided by jQuery beyond simple selectors and UI effects. We make extensive use of jQuery’s Widget Factory to construct entry points for our UI views and it’s worked really well for us. We also use jQuery Events for our global pub/sub model.</p>
<p>Passionate software developers take their tools seriously. Like any true craftsman, we always need to make sure we’re using the right tool for the job. Sometimes the tool we’re most familiar with is that tool, sometimes it isn’t. It’s good that we’re talking about it though.</p>
tag:codysand.svbtle.com,2014:Post/simulate-mobile-network-latency-delay-and-packet-loss-in-os-x-and-ios-simulator2013-04-27T12:00:43-07:002013-04-27T12:00:43-07:00Simulate Mobile Network Latency, Delay, and Packet Loss in OS X and iOS Simulator<p>Recently, our team at work has been running into very intermittent issues with the sync process for our applications. Our users are sometimes working in rural areas, on mobile data networks, and we have reason to believe that our issues might be because of an intermittent or low-quality data connection. After a bit of searching, I came across a <a href="http://stackoverflow.com/questions/4808433/is-it-possible-to-disable-the-network-in-ios-simulator">StackOverflow post</a> that referenced Apple’s ‘Network Link Conditioner’. This utility allows you to simulate a variety of delays, network speeds, and levels of packet loss, allowing you to more realistically test how your app might perform on these networks. </p>
<p>Of course, you can always manually disconnect from your network to simulate a complete loss of connectivity, but being able to simulate packet loss and latency is a much more accurate test of what your users will experience when using real-world data networks. On top of that, installing the app is simple:</p>
<ol>
<li>Download the <a href="https://developer.apple.com/downloads/index.action?name=network%20link%20conditioner#">Hardware IO Tools for Xcode</a> and open the DMG. (<strong>NOTE</strong>: This is only for OSX 10.7+)</li>
<li>From the disk image, install the ‘Network Link Conditioner’ preference pane. </li>
<li>You can now open the pane from System Preferences. </li>
</ol>
<p>Upon opening the app, you will find that the app itself is mostly self explanatory, easy to use, and includes a number of presets for your to accomplish your testing:</p>
<p><a href="https://svbtleusercontent.com/85h7v8ph55qvhg.png"><img src="https://svbtleusercontent.com/85h7v8ph55qvhg_small.png" alt="select-profile.png"></a></p>
<p>It’s worth mentioning that this will take effect on the entire machine, including your web browser and any files you may be downloading. That being said, this isn’t applicable just to testing in the iOS Simulator, but is also quite useful for testing web application performance on slow networks. Try this on your web site, or any website, and sit back and remember about how we all complained about how slow dial-up was.</p>
<p><a href="https://svbtleusercontent.com/e0lkf2obu6rmlq.png"><img src="https://svbtleusercontent.com/e0lkf2obu6rmlq_small.png" alt="slow.png"></a></p>
<p>Remember when downloading one megabyte took more than a full minute? Those were the days…</p>
tag:codysand.svbtle.com,2014:Post/learning-objectivec-os-x-and-ios-programming2013-03-20T11:53:38-07:002013-03-20T11:53:38-07:00Learning Objective-C, OS X, and iOS Programming<p>Since switching to a Mac last year, I’ve been determined to learn as much as I can about Objective-C and native OS X and iOS development. Typically, when I’m looking to learn a new language or subject, after I’ve exhausted the free online materials, I head straight to books from <a href="http://oreilly.com/">O'Reilly</a>, <a href="http://www.manning.com/">Manning</a>, or <a href="http://www.amazon.com/Programming-Objective-C-Edition-Developers-Library/dp/0321811909">Addison-Wesley</a> for a more in-depth look at the topic. This time around, I was very surprised to find dozens of very high quality programming guides and reference documents for developing on Apple platforms. To be honest, I was blown away by the quality of this documentation, and have yet to pick up a Cocoa or Objective-C book as I would have done in the past.</p>
<p>For starters, <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html">Programming with Objective-C</a> is Apple’s official Objective-C language documentation. I started with this document, as I had never worked with Objective-C before and figured this was as good a starting place as any. Once you are able to wrap your head around the differences between things like Objective-C’s “message passing” (and it’s syntax) versus a language like C#, Java, or even JavaScript’s “method calling”, things start to become a lot easier. However, this is a pretty rigorous piece of documentation, as is not for the novice programmer. It assumes very much that you are a competent programming and doesn’t shy away from deep technical details. For those who can keep up, though, I think this is by far the best document for learning the language itself. </p>
<p>In my research online, I had also come across the <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html">Cocoa Fundamentals</a> guide, which I read off and on while I was reading through Programming with Objective-C. This document explains Cocoa (and Cocoa Touch), Apple’s APIs for application development. It explains at a fairly high level what building blocks are available to you for developing your apps. It also talks a bit about the MVC pattern utilized by most Cocoa applications, as well as the general application lifecycle.</p>
<p>After graduating from these guides, I began stumbling across these more specific documents outlining particular APIs or topics on Apple’s developer site called <strong>Programming Guides</strong>. Simply put, these guides are AWESOME. They’re very thorough and walk you through the ins and outs of almost any topic you can think of.</p>
<p>I’ve been reading these guides the past few weeks, but have been putting my <a href="http://www.urbandictionary.com/define.php?term=google-fu">Google-fu</a> to the test trying to find each and every one of these guides. I’ve got a respectable list started, but I feel like there are a few out there I haven’t included. Let me know if you find one!</p>
<p>Below this huge list of Apple docs, you’ll find a short list of other Apple programming sites and blogs I’ve been reading in order to soak up as much I can about these platforms. More adventures in Objective-C to follow in future articles. </p>
<p>Without further delay…</p>
<h3 id="the-ultimate-list-of-apple-programming-guides_3">The Ultimate List of Apple Programming Guides <a class="head_anchor" href="#the-ultimate-list-of-apple-programming-guides_3">#</a>
</h3>
<p>Last Update: February 2, 2014</p>
<h5 id="getting-started_5">Getting Started <a class="head_anchor" href="#getting-started_5">#</a>
</h5>
<ul>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html">Cocoa Fundamentals</a></li>
<li><a href="https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AppDesignBasics/AppDesignBasics.html">App Programming and Design</a></li>
<li><a href="http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/Introduction.html">Start Developing iOS Apps Today</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/Accessibility.html">Cocoa Core Competencies</a></li>
</ul>
<h5 id="ios_5">iOS <a class="head_anchor" href="#ios_5">#</a>
</h5>
<ul>
<li><a href="http://developer.apple.com/library/ios/#DOCUMENTATION/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html">iOS Human Interface Guidelines</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/00-About_the_iOS_Application_Development_Workflow/introduction.html">Application Development Workflow</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/">iOS 7 Transition Guide</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/iPhoneAccessibility/Making_Application_Accessible/Making_Application_Accessible.html">Accessibility</a></li>
<li><a href="https://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html">View Controllers</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/AboutTableViewsiPhone/AboutTableViewsiPhone.html">Table Views</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/Introduction/Introduction.html">Collection Views</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/Introduction/Introduction.html">Views</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/UIScrollView_pg/Introduction/Introduction.html">Scroll Views</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/DocumentBasedAppPGiOS/Introduction/Introduction.html">Document-based Applications</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/Introduction/Introduction.html">Text, Web, and Editing Support</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/Introduction/Introduction.html">Events</a></li>
</ul>
<h5 id="os-x_5">OS X <a class="head_anchor" href="#os-x_5">#</a>
</h5>
<ul>
<li><a href="https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html">OS X Human Interface Guidelines</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/OSXWorkflowGuide/Introduction/Introduction.html">Application Development Workflow</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/Introduction/Introduction.html">App Programming and Design</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Accessibility/cocoaAXIntro/cocoaAXintro.html">Accessibility</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaViewsGuide/Introduction/Introduction.html">Views</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TableView/Introduction/Introduction.html">Table Views</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/Introduction.html">Scroll Views</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/Introduction/Introduction.html">Document-based Applications</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/Introduction/Introduction.html">Events</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html">App Sandbox</a></li>
</ul>
<h5 id="multimedia-amp-location_5">Multimedia & Location <a class="head_anchor" href="#multimedia-amp-location_5">#</a>
</h5>
<ul>
<li><a href="http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/Introduction/Introduction.html">Multimedia Programming</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Introduction/Introduction.html">Camera and Photo Library</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html">Location Awareness</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/WindowAndScreenGuide/Introduction/Introduction.html">Multiple Displays</a></li>
<li>
<a href="http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html">iPod Library Access</a> </li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/QTKitApplicationProgrammingGuide/Introduction/Introduction.html">QTKit</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html">Audio Session</a></li>
</ul>
<h5 id="core-foundation_5">Core Foundation <a class="head_anchor" href="#core-foundation_5">#</a>
</h5>
<ul>
<li><a href="https://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CoreFoundation_Collection/_index.html">Core Foundation Framework Reference</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html">Core Animation</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/graphicsimaging/conceptual/drawingwithquartz2d/Introduction/Introduction.html">Core Graphics / Quartz2D</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CoreGraphicsReferenceCollection/_index.html">Core Graphics Reference Collection</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/StringsTextFonts/Conceptual/CoreText_Programming/Introduction/Introduction.html">Core Text</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro/ci_intro.html">Core Image</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/graphicsimaging/conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html">OpenGL</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/cocoa/Conceptual/CoreData/cdProgrammingGuide.html">Core Data</a></li>
</ul>
<h5 id="application-architecture_5">Application Architecture <a class="head_anchor" href="#application-architecture_5">#</a>
</h5>
<ul>
<li><a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIKit_Framework/_index.html">UIKit Framework Reference</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/_index.html">Application Kit Framework Reference</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html">Memory Management</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html">URL Loading</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorHandling/ErrorHandling.html#//apple_ref/doc/uid/TP40001806-CH201-SW1">Error Handling</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Exceptions/Exceptions.html">Exceptions</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Timers/Timers.html">Timers</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html">Threading</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/EventKitProgGuide/Introduction/Introduction.html">Calendars and Reminders</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/Introduction/Introduction.html">File System and iCloud</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html">Concurrency</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Printing/osxp_aboutprinting/osxp_aboutprt.html">Printing</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/PasteboardGuide106/Introduction/Introduction.html">Pasteboards</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Introduction/Introduction.html">Quick Look</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/DisplayWebContent/DisplayWebContent.html">WebKit</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Archiving/Archiving.html">Archives and Serialization</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/introStrings.html">Strings</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/Streams/Streams.html">Streams</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html">Local and Push Notifications</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html">CFNetwork</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html">Key-Value Observing</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/UserDefaults/Introduction/Introduction.html">Preferences and Settings</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/security/Conceptual/keychainServConcepts/01introduction/introduction.html">Keychain Services</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/General/Conceptual/iCloudDesignGuide/Chapters/Introduction.html">iCloud Design Guide</a></li>
<li><a href="https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Frameworks.html">Framework Programming Guide</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/2ddrawing/conceptual/drawingprintingios/introduction/introduction.html">Drawing and Printing</a></li>
</ul>
<h5 id="xcode-testing-debugging-and-project-structure_5">Xcode, Testing, Debugging, and Project Structure <a class="head_anchor" href="#xcode-testing-debugging-and-project-structure_5">#</a>
</h5>
<ul>
<li><a href="http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/Xcode_User_Guide/000-About_Xcode/about.html">Xcode User Guide</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LoadingResources/Introduction/Introduction.html">Resources and Nib Files</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/CoreFOundation/Conceptual/CFBundles/Introduction/Introduction.html">Bundles</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html">Instruments</a></li>
<li><a href="http://developer.apple.com/library/ios/#DOCUMENTATION/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html">Cocoa Coding Guidelines</a></li>
<li><a href="http://developer.apple.com/library/ios/#recipes/xcode_help-interface_builder/_index.html">Interface Builder Help</a></li>
<li><a href="http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/UnitTesting/00-About_Unit_Testing/about.html">Unit Testing</a></li>
</ul>
<h5 id="app-store-and-distribution_5">App Store and Distribution <a class="head_anchor" href="#app-store-and-distribution_5">#</a>
</h5>
<ul>
<li><a href="https://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html">App Distribution Guide</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html">In-App Purchases</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/About.html">iTunes Connect</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Introduction.html">Address Book</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/iAd_Guide/Introduction/Introduction.html">iAd</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Introduction.html">Passbook</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html">Game Center</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/DevPortalGuide/Introduction/Introduction.html">iOS Team Administration Guide (Dev Portal, Certificates, Provisioning, etc)</a></li>
<li><a href="https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html">Code Signing</a></li>
</ul>
<h3 id="honorable-mentions_3">Honorable Mentions <a class="head_anchor" href="#honorable-mentions_3">#</a>
</h3><h5 id="nshipster_5">NSHipster <a class="head_anchor" href="#nshipster_5">#</a>
</h5>
<p><a href="http://nshipster.com/">NSHipster</a> is, as they put it, “a journal of the overlooked bits in Objective-C and Cocoa” and they offer a series of very well written, thorough articles on a lot of more obscure stuff you may encounter in your Apple programming adventures. The articles blend the perfect amount of technical content with a touch of humor which makes them very fun to read. </p>
<h5 id="cocoa-literature-list_5">Cocoa Literature List <a class="head_anchor" href="#cocoa-literature-list_5">#</a>
</h5>
<p>The <a href="http://osx.hyperjeff.net/Reference/CocoaArticles">Cocoa Literature List</a> has over 3500 categorized links to articles on Objective-C and Apple programming. You’ll find almost everything here; things like JSON, SQLite, and Bluetooth. The site includes a search and continues to be updated.</p>
tag:codysand.svbtle.com,2014:Post/sink-or-swim-and-taking-the-plunge2013-03-03T02:00:22-08:002013-03-03T02:00:22-08:00Sink or Swim and Taking the Plunge<p>When I finished college in 2010, I had already secured a job with <a href="http://www.cartegraph.com">Cartegraph</a> by the time I graduated. Fresh off a COBOL internship with another company, working with C# and .NET 4 was a huge breath of fresh air.</p>
<p>When I first started, I was working on a project that would eventually allow us to create platform applications based on UML diagrams. It was on this project that I finally realized that I actually was a competent programmer and was eventually able to overcome the <a href="http://en.wikipedia.org/wiki/Impostor_syndrome">imposter syndrome</a> that had my anxiety peaking as graduation approached.</p>
<p>About a year later, Cartegraph started development of their new flagship web application. We began constructing the server in ASP.NET MVC 3, and things began scaling quickly. I eventually found my way to the client-side, as the web-app had grown into a single-page web application, and we needed a more dynamic client with each passing day. Outside of work, I studied JavaScript, REST APIs, client-side MV* frameworks… everything I needed to become the best web developer I could be.</p>
<p>The topic of HTML5 vs. native for mobile applications came up probably a dozen times. Being a web developer, I had become accustomed to designing UIs in HTML/CSS. I had worked with Android’s XML based layouts, but it never felt as nice as using CSS. Combine that with the ability to work cross-platform, I favored HTML5 over native despite the performance costs. Eventually, Cartegraph decided on Xamarin’s MonoTouch to developer their iPad application. Because I had done some prototypes and other previous work in HTML5, I was selected as a programmer for this new mobile team. It was here that I became familiar with the Cocoa Touch APIs and iOS programming in general. It got me peeking at Apple’s developer documentation (which, I might add, is considerably nicer than Microsoft’s documentation). Eventually, I was becoming curious about writing in Objective-C.</p>
<blockquote class="short">
<p>“Objective-C? Eww…”</p>
<p>-Everyone who’s never used Objective-C.</p>
</blockquote>
<p>Almost everyone that I’ve talked to about Objective-C cringes when I even utter its name. Those of us who have actually taken the time to look past the square brackets (<code class="prettyprint">[ ]</code>) know that the language isn’t as scary as it looks. I knew that if thousands of other developers were able to grasp this language and be putting their apps in the app store, then so could I. </p>
<p>At the time of this writing, I don’t even own an iOS device. I had switched to a Macbook Air and OS X after 15 years on Windows, and was originally intending to write apps for OS X after having fallen in love with it. I began studying Objective-C in my spare time, while continuing to familiarize myself with Cocoa Touch classes working with MonoTouch at Cartegraph. In the meantime, I had come across an opportunity working with Objective-C for a local company and was interested in interviewing. It was like a perfect storm was brewing.</p>
<p>I like interviewing for jobs. It’s not a scary thing for me. I’ve interviewed for jobs that I knew I probably wouldn’t take. It’s good practice, and it’s a good way to find out what other companies are doing. My interview was the most fun I’d ever had in a job interview, and I was very interested in taking on the challenge of completely switching development stacks, especially since I was already hoping to learn Objective-C on my personal time. It wasn’t an easy decision, but I eventually decided that it was time for a change in my life. </p>
<p>Getting yourself out of your comfort zone is almost always sure way to grow yourself as a person. For me, this means a new job…with a new company…in a new programming language…on a new platform. I know that I can do this, and I’m looking forward to all of the new stuff I’ll get to learn. I’m taking the plunge, and it feels good.</p>
<p><strong>Update:</strong> After 5 months with the new company, I decided to return to Cartegraph and web development. I enjoy native mobile application development, but JavaScript is where I belong, and that’s okay. I may never have found out if not for taking the chance.</p>
tag:codysand.svbtle.com,2014:Post/why-i-left-facebook2013-01-01T12:13:10-08:002013-01-01T12:13:10-08:00Why I Left Facebook<p>Yesterday, I made the decision to deactivate my Facebook account. This is something I’ve done once or twice in the past, but this time I’m hoping to go without Facebook for a significant period of time (the entire year would be nice, forever would be even better). </p>
<h2 id="too-much-to-39like39_2">Too Much To ‘Like’ <a class="head_anchor" href="#too-much-to-39like39_2">#</a>
</h2>
<p>My primary complaint with Facebook is the abundance of mundane things that people can ‘Like’ and the resulting notifications that end up in my several news feeds. The promoted stories are especially more intrusive than anything you’ll find on Twitter, and Facebook just allows too much junk into the news feeds in general. The stuff I want to see never seems to be at the top, and the stuff I couldn’t care less about always appears front-and-center.</p>
<h2 id="people-i-don39t-want-to-friend_2">People I Don’t Want to Friend <a class="head_anchor" href="#people-i-don39t-want-to-friend_2">#</a>
</h2>
<p>Recently, co-workers and others I’d rather not let into my personal life have requested my friendship. I don’t have anything against these people, I just don’t want them seeing everything I do. I realize that Facebook has security controls to prevent over-sharing, but it’s too complicated. It’s nowhere near as simple as Google+‘s 'Circles’ mechanism. I really wish that Google+ had caught on with everyone that I know like Facebook has. Though it has it’s flaws, it’s a much nicer platform for social networking that Facebook.</p>
<h2 id="i-want-to-focus_2">I Want to Focus <a class="head_anchor" href="#i-want-to-focus_2">#</a>
</h2>
<p>Facebook is a serious distraction. It has gotten to the point where I involuntarily open a new tab and start typing f-a-c-e in the location bar. Autocomplete finishes the URL and jumping into the time-suck is only a return key away. It’s out of control. Every minute I spend on Facebook reading about my old neighborhood friend’s dog being ill is a minute I could be spending more productively, learning something new or spending quality time with my son. This, to me, is a no-brainer. Seeing a smile on my son’s face brings more satisfaction than any number of ‘likes’ on a post could ever hope to bring.</p>
<h2 id="what-i39m-giving-up_2">What I’m Giving Up <a class="head_anchor" href="#what-i39m-giving-up_2">#</a>
</h2>
<p>It wasn’t an easy decision to make. Facebook is my primary means of communicating with a number of people, which means I’ll have to establish a new route of communication with these people. In times when I have tried to leave Facebook before, I was afraid that I wouldn’t be able to stay current with local events. I was afraid that I’d lose contact with those friends I had lost contact with before I found them on Facebook. </p>
<p>Maybe it’s time to start cutting away the excess in life. Sure, it was great to reconnect with those people, to let them know that you’re still alive, but what about after that? I’m ready to start making things happen in my life, rather than reading about what everyone else is doing. </p>
<h2 id="summary_2">Summary <a class="head_anchor" href="#summary_2">#</a>
</h2>
<p>Facebook, for all intents and purposes, has become the worldwide people index. Everyone who’s anyone is on Facebook. This is why people get addicted to their news feeds, thinking that what they’re seeing is important and that in 2013 it makes sense to know everything about everyone simply because we can. When I was getting serious about deactivating my account, I brought up my newsfeed to see if there was anything in there that I was truly glad that I saw. </p>
<p>There wasn’t. </p>
<p>And I realized that there very rarely was anything that I was truly gracious to have learned through Facebook. This is not a rant against social networking. I’m still a fan of twitter (<a href="http://www.twitter.com/marpstar">@marpstar</a>), and plan on using Google+ a lot more. </p>
<p>I’m committed to avoiding the platform for non-professional purposes indefinitely. Should some situation arise where I need to contact something I thought I could only contact via Facebook, I’ll do what it takes to get around using Facebook. </p>
<p>Expect futures updates. Have you quit Facebook, or know someone who still hasn’t gotten one? Leave me a message in the comments below.</p>
tag:codysand.svbtle.com,2014:Post/learning-fundamental-css-selectors2012-12-19T12:15:19-08:002012-12-19T12:15:19-08:00Learning Fundamental CSS Selectors<h2 id="introduction_2">Introduction <a class="head_anchor" href="#introduction_2">#</a>
</h2>
<p>This past January, I gave a presentation at <a href="http://www.cartegraph.com">work</a> on CSS selectors, reviewing the basic CSS selectors and introducing our team to a number of selectors they hadn’t yet used, in order to ensure the everyone had been made aware of CSS’s more powerful selectors</p>
<p><em>This is an adaptation of that presentation.</em></p>
<p>This article assumes that you’re already familiar with constructing simple ID (<code class="prettyprint">#someId</code>) and class (<code class="prettyprint">.someClass</code>) selectors, and covers more advanced selectors that may be created when combining these simple selectors.</p>
<h2 id="table-of-contents_2">Table of Contents <a class="head_anchor" href="#table-of-contents_2">#</a>
</h2>
<ol>
<li>
<strong>Hierarchical Selectors</strong>
<ol>
<li>Descendant</li>
<li>Child</li>
<li>Adjacent</li>
<li>Sibling</li>
</ol>
</li>
<li>
<strong>Attribute Selectors</strong>
<ol>
<li>Has Attribute</li>
<li>Attribute Equals</li>
<li>Attribute Contains</li>
<li>Attribute Starts With</li>
<li>Attribute Ends With</li>
</ol>
</li>
</ol>
<hr>
<h2 id="hierarchical-selectors_2">Hierarchical Selectors <a class="head_anchor" href="#hierarchical-selectors_2">#</a>
</h2>
<p>Hierarchical selectors allow elements to be selected depending on how it is positioned in relation to another element. </p>
<h4 id="descendant-selector_4">Descendant Selector <a class="head_anchor" href="#descendant-selector_4">#</a>
</h4>
<p>The descendent selector is represented by a space between two selectors.</p>
<pre><code class="prettyprint">#parent .child { color: #FFF; }
</code></pre>
<p>This will select all of the elements with the <code class="prettyprint">class</code> <strong>child</strong> that descend from the element with an ID of <strong>parent</strong>. </p>
<p>Besides the type, ID, and class selectors, this is probably the most popular type of selector. A slightly more performant child selector is available for when only one child level must be searched. This child selector is outlined next. </p>
<h4 id="child-selector_4">Child Selector <a class="head_anchor" href="#child-selector_4">#</a>
</h4>
<p>The child selector is represented by the <code class="prettyprint">></code> character between selectors and allows an element to be selected if it is a direct descendant of a parent element. </p>
<pre><code class="prettyprint">#parent > .child { color: #FFF; }
</code></pre>
<p>Some developers I know tend to skip this selector, even when they are only selecting direct children. There is a performance increase when using this selector appropriately, instead of the descendent selector.</p>
<h4 id="adjacent-selector_4">Adjacent Selector <a class="head_anchor" href="#adjacent-selector_4">#</a>
</h4>
<p>The adjacent selector is represented by the <code class="prettyprint">+</code> character between selectors and allows an element to be selected depending on whether or not it’s previous sibling node matches the first part of the selector.</p>
<pre><code class="prettyprint">.apple + .orange { display: none }
</code></pre>
<p>This rule will hide an element containing the <code class="prettyprint">orange</code> class so long as it’s immediately preceded by an element with the <code class="prettyprint">apple</code> class, provided that both elements share the same parent. </p>
<pre><code class="prettyprint"><div class="orange"></div>
<div class="apple"></div>
<div class="orange"></div> <!-- rule above only selects this one -->
</code></pre>
<p>In this example, our selector will only select the second element with the <code class="prettyprint">orange</code> class, as it is the only one preceded by the element with an <code class="prettyprint">apple</code> class. </p>
<h4 id="sibling-selector_4">Sibling Selector <a class="head_anchor" href="#sibling-selector_4">#</a>
</h4>
<p>The sibling selector works much like the adjacent selector, but allows any element to be selected based on <strong>any</strong> of it’s previous siblings. This selector uses the ‘~’ character between two selectors.</p>
<pre><code class="prettyprint">.apple ~ .orange { display: none; }
</code></pre>
<p>This will allow any element with the <code class="prettyprint">orange</code> class to be selected as long as it has a <strong>preceding</strong> sibling with a class of <code class="prettyprint">apple</code></p>
<pre><code class="prettyprint"><div class="apple"></div>
<div class="orange"></div> <!-- rule selects both -->
<div class="orange"></div> <!-- rule selects both -->
</code></pre>
<hr>
<h2 id="attribute-selectors_2">Attribute Selectors <a class="head_anchor" href="#attribute-selectors_2">#</a>
</h2>
<p>While hierarchical selectors are the most popular selectors, there also exists great functionality in selecting elements based on the value of one of the element’s attribute values. There exist a handful of these selectors.</p>
<h4 id="has-attribute_4">Has Attribute <a class="head_anchor" href="#has-attribute_4">#</a>
</h4>
<p>The ‘Has Attribute’ selector, as I call it, allows you to select an element based simply on whether or not that element has a the specified attribute. </p>
<p>These rules are in a slightly different format:</p>
<pre><code class="prettyprint">div[id] { color: #F00; }
</code></pre>
<p>This rule will match any <code class="prettyprint">div</code> element that has an <code class="prettyprint">id</code> attribute.</p>
<h4 id="equals_4">Equals <a class="head_anchor" href="#equals_4">#</a>
</h4>
<p>The equals attribute selector allows you to select an element when the value of an elements attribute matches a provided pattern. </p>
<p>For example, the following rule will select any <code class="prettyprint"><a></code> tags that have a title attribute equal to ‘Home’ </p>
<pre><code class="prettyprint">a[title="Home"] { font-weight: bold; }
</code></pre>
<p>The ID selector can also be written using this syntax: </p>
<pre><code class="prettyprint">div[id="some-id"] { border: 1px solid black; }
/* is equivalent to */
div#some-id { border: 1px solid black; }
</code></pre>
<p>These rules can also be written without the tag selector, too:</p>
<pre><code class="prettyprint">[id="some-id"] { border: 1px solid black; }
/* is equivalent to */
#some-id { border: 1px solid black; }
</code></pre>
<h4 id="contains_4">Contains <a class="head_anchor" href="#contains_4">#</a>
</h4>
<p>The attribute contains selector allows a match to be made on only a substring of the value of an element’s attribute. This is much like the <strong>equals</strong> selector, but uses the operator <code class="prettyprint">*=</code> in place of <code class="prettyprint">=</code>. </p>
<p>The following rule will select any <code class="prettyprint">div</code> that has an <code class="prettyprint">id</code> containing a dash (<code class="prettyprint">-</code>).</p>
<pre><code class="prettyprint">div[id*="-"] { font-weight: bold; }
</code></pre>
<h4 id="starts-with_4">Starts With <a class="head_anchor" href="#starts-with_4">#</a>
</h4>
<p>This selector operates much like you’d expect, matching a substring of an attribute’s value, provided that the substring occurs at the beginning of the attribute’s value. This works like the previous examples, using instead the <code class="prettyprint">^=</code> operator. </p>
<pre><code class="prettyprint">#parent > div[id^="cs-"] { border: none; }
</code></pre>
<p>This rule matches any <code class="prettyprint">div</code> that is child to <code class="prettyprint">#parent</code> who have an <code class="prettyprint">id</code> with a prefix of <code class="prettyprint">cs-</code>.</p>
<h4 id="ends-with_4">Ends With <a class="head_anchor" href="#ends-with_4">#</a>
</h4>
<p>This selector operates much like you’d expect, matching a substring of an attribute’s value, provided that the substring occurs at the end of the attribute’s value.</p>
<pre><code class="prettyprint">#parent > div[id^="Btn"] { border: none; }
</code></pre>
<p>This rule matches any <code class="prettyprint">div</code> that is child to <code class="prettyprint">#parent</code> who have an <code class="prettyprint">id</code> ending in <code class="prettyprint">Btn</code>.</p>
<h2 id="summary_2">Summary <a class="head_anchor" href="#summary_2">#</a>
</h2>
<p>This is by no means a complete list of everything that is possible with CSS selectors. There are a number of <a href="http://docs.webplatform.org/wiki/css/selectors#Pseudo-classes">psuedo-classes</a> you can use in your selectors to target elements with even greater control. Learning to effectively use these selectors will make your work a lot easier, and getting a firm grasp on them all is one of the big milestones to reach when learning web development. </p>
tag:codysand.svbtle.com,2014:Post/book-review-javascript-web-applications-by-alex-maccaw2012-05-14T12:18:16-07:002012-05-14T12:18:16-07:00Book Review: JavaScript Web Applications by Alex MacCaw<p>I began developing in JavaScript just over a year ago. The company I’m working for had announced a brand new product that was to be web-based, and with not a single web developer on our team, I took the initiative to completely immerse myself in web application architecture. I started, like many others, with JavaScript: The Good Parts. After devouring that, it was time to understand how large-scale JavaScript applications might be constructed. It was around that time that I discovered <a href="http://www.amazon.com/JavaScript-Web-Applications-Alex-MacCaw/dp/144930351X">JavaScript Web Applications</a> by <a href="http://alexmaccaw.com/">Alex MacCaw</a>.</p>
<p>The book begins with a primer on the MVC pattern and how it applies to JavaScript, and takes the reader through a pretty easy read on other important topics like events, models, state, client-side templating, dependency management, and other very relevant topics. </p>
<p>What I like most about this book is the author’s willingness to include examples from a variety of frameworks and libraries. The author covers Spine, Backbone, and JavaScriptMVC applications frameworks, as well as Yabble and RequireJS loaders. It’s nice to see an author including these examples, as they highlight the differences between frameworks, and help budding JavaScript developers learn new ways of solving problems. The book does use jQuery all over the place, which was nice as it’s our framework of choice where I work. </p>
<p>What amazes me most about this book is the amount of information the author managed to pack in to just over 220 pages. He covers the basics on just about every area of web application development you might need to know, including primers on jQuery, CSS3, and LESS. The content is broken out beautifully in concise, easy-to-read, easy-to-understand chapters. The Testing and Debugging chapter is the only one to exceed 25 pages, which makes it easy to read a chapter over lunch.</p>
<p>Even now, a year later, it’s not easy to find other books that cover as many JavaScript and web application topics as this book. It’s a great introduction to everything you’ll need to know about large-scale web application development. </p>
tag:codysand.svbtle.com,2014:Post/staying-focused-while-using-the-internet2011-09-13T12:20:50-07:002011-09-13T12:20:50-07:00Staying Focused While Using The Internet<p>As software engineer, I use a computer every day. Seven days a week. It’s no secret either that a growing number of careers are requiring workers to use computers as a part of their job. Of course most, if not all, of these computers they’ll be using are internet connected. This means that companies are asking their employees to use the same machine and technology they use to check their facebook, send email, and watch YouTube to perform meaningful work. For serious internet users, this is sometimes easier said than done, especially with my next task unclear.</p>
<p>It’s been said before: everybody procrastinates. Even the people with the most detailed of organizational systems struggle with procrastination, usually for fear of even having to look at that seemingly endless to-do list. Life can get overwhelming, as we all know, but it’s during those times that its most important to remain focused and in control of the things that need to be done. At times when it seems impossible to get anything done, try visualizing that feeling you get when everything is going your way.</p>
<p>Think about the last time you were “in the zone”. By that, I mean think of the last time where you were working on something, and you couldn’t think of anything but what you were working on. When you felt like nothing could break your focus. This state, called flow, is crucial to performing at your highest level and is defined as “completely focused motivation”. Anything that you can do to help yourself achieve this state of mind should be made habit.</p>
<p>What is your average computer session is like? My web browser is open at all times, which means I’m only an CTRL+T and f-a-c-e-[enter] away from a black hole of pointless browsing 45 minutes long. Being able to identify bad habits such as these and intercept the distraction before you turn your attention from the task at hand. Make it a habit to consciously acknowledge these urges to get leave your task and do whatever you can to resist. If you can close the browser tab before facebook loads and switch back to what you were working on quickly, it’s usually still possible to get back on track quickly. Frustration, anxiety, and depression all bar the mind from obtaining this flow. Identifying sources of these three things may help in your journey to increase your focus and help you get more things done. Software like RescueTime can help you monitor possible time-wasting websites by recording how long you spend on them. Every week you’ll be emailed a report on your browsing habits. The report can be very eyeopening, showing you every minute you’ve spent browsing.</p>
<p>Try eliminating pop-up notifications and email alerts, as they can derail good flow in an instant. Because achieving flow isn’t as easy as losing it, it’s very important that you do whatever you can to maintain your state of flow. If receiving these alerts in a timely manner is important to you, then get in the habit of checking it as needed manually, but not before you’ve gotten some work done. This will at least help you from being interrupted unexpectedly.</p>
<p>People who aren’t at an internet-connected computer all day may not experience these mentioned types of distractions. However, when I’m working on something I’m not focused on a particular task, it can sometimes feel like Opera is yelling for me. “Hey Cody! Come check your GMail. It’ll only take a second!” Maybe it’s the internet addiction.</p>
<p>Regardless, once you’ve taken action to identify these detours, you’ll find yourself becoming more aware of what good and bad habits as you’re working, as well as more time spent in flow. The moment in time at which these pieces come together is when you have successfully begun training your brain to better focus. All it takes is a little conscientious reflection on your own habits.</p>
tag:codysand.svbtle.com,2014:Post/the-hidden-stress-of-procrastination2011-09-01T12:21:47-07:002011-09-01T12:21:47-07:00The Hidden Stress of Procrastination<p>When I get home after a long day at work, I sometimes find myself frustrated and in a bad mood. Sometimes it’s hard to pinpoint the exact cause of this stress, as your inability to concentrate renders your ability to figure out what’s wrong with yourself useless. Too often when this happens, it continues all night and I end up wasting the entire night sitting online or watching TV.</p>
<p>What about the other days? What is different about them? How do we one day fall prey to frustration and laziness, yet other days get back on track and feel better about ourselves. What if nobody’s around to cheer you up? I’ve spent many a night lying in bed, regretting the hours of the time I just lost, only to repeat my same actions the next day.</p>
<p>I’ve found that very often I feel this way after work when something I wanted to get done that day is not being taken care of. Maybe I needed to stop at the grocery store or the bank after work and forgot, or had hoped to clean out my office or my car. Whatever it may be, I’ve noticed that when I have these plans and I get caught up in the haste of the day, my mood suffers greatly and clouds my vision of what I had hoped to achieve that day.</p>
<p>Take a step back and ask yourself “What did I want to do today?” Is there any reason you (really) can’t do it right now? If not, go and do it. Right now. You’ll feel better once it’s done.</p>