<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vinayak on Medium]]></title>
        <description><![CDATA[Stories by Vinayak on Medium]]></description>
        <link>https://medium.com/@vsuley?source=rss-f2ef8dfc5154------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vhiptaP9TgOaQhJl.jpg</url>
            <title>Stories by Vinayak on Medium</title>
            <link>https://medium.com/@vsuley?source=rss-f2ef8dfc5154------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 07:45:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vsuley/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Story premise: Loose A.I.]]></title>
            <link>https://medium.com/@vsuley/story-premise-lose-a-i-4fc363233158?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fc363233158</guid>
            <category><![CDATA[science-fiction]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Fri, 04 Dec 2015 08:45:57 GMT</pubDate>
            <atom:updated>2015-12-15T23:01:12.701Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s 2015.</p><p>A starry eyed developer accidentally unleashes an AI upon the world by losing control of an evolutionary computation engine running on three of the biggest cloud compute providers of the world. All instances were started with the same seed for comparison so all AIs had very similar early behaviors — basic survival.</p><p>Now, the fun begins as the AIs starts gaining consciousness. Obviously, like all things in nature, the results aren’t black and white but a rather intricate pattern of the two. At first it’s just random internet blackouts and weird behaviors — like a baby brain. Then early stages of learning would involve mood swings and tantrums, etc.</p><p>The idea is that even though the AI has a massive amount of computer power at its disposal, it’s also consuming and churning through an equally massive amount of data so you can observe discernible stages of brain development. It would know every scientific fact or theory — but not have the experience to put those together for a larger purpose until it’s more grown up. I’m not sure what kind of timeline I should follow for the stages…hours? days? weeks?</p><p>Obviously the pull of the story is to see what the AI does when it’s more mature. Is it a kind AI? Or a ruthless one? Is it even one single AI or one on each cloud? How paranoid do humans get and how do they react? Why not just shut off the power?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fc363233158" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hypothesis: What meditation is.]]></title>
            <link>https://medium.com/@vsuley/hypothesis-what-meditation-is-10b248bf979b?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/10b248bf979b</guid>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[meditation]]></category>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Tue, 10 Nov 2015 17:22:46 GMT</pubDate>
            <atom:updated>2015-11-10T17:22:46.193Z</atom:updated>
            <content:encoded><![CDATA[<p>I think it finally clicked, meditation is the process of becoming tuned with one’s existence, as is.</p><p>I’ll go into some detail, but all of this is conjecture and based on anecdotal data points of my own limited experience; hence the label ‘hypothesis’.</p><h4>“one’s Existence”</h4><p>Yes, it is a vague term. It’s the stretchy, bendy bit that allows the concept to scale and vary for different people and I think it’s usually based on their religious, spiritual or metaphysical beliefs. There are a lot of variations on how people meditate and I have found that these techniques tend to take on prayer/chanting like qualities for the more religiously minded (beads, <em>bhajans etc</em>), a focus on the in-out of breath for the spiritually minded agnostics and unfiltered, judgement free observation sessions for the atheists.</p><h4>“as is”</h4><p>Frankly, I think this phrasing could be improved, but I can’t figure out how. What I mean is that, during the course of life, we soothe our existence with entertainment, we try to understand it through science and improve upon it with material pursuits. While meditating though, one generally tries to strip away as much as possible and leave nothing but the unvarying (the blessings of Krishna, the cadence of your resting breath, noises of the world coming in through your windows). You focus on things that won’t lead you down a ‘path’ since they are a self-repeating pattern. The idea is that if you can be at peace with this completely stripped-down existence, it will provide a stable baseline for everything else that you do and add a floor to how deep you can fall (generally speaking).</p><h4>“becoming tuned”</h4><p>I had first written this as “coming to terms”, but that seemed a bit bleak! And then, I figured that the process has stages to it. You may very well start out ‘coming to terms’ with things and it’s usually during the first few weeks of meditating. I think that’s where a lot of newcomers to the practice go wrong because they expect a sense of joy and calm right off the bat — whereas the first few experiences are positively rattling. What I mean by ‘coming to terms’ is that one might finally begin to realize that meditation helps. By this time one has had some positive experiences which, at least, put meditation in this category of mental health first-aid measures.</p><p>But if you continue pushing through, you find that it begins to feel rather satisfying. You feel ‘content’. Some of the terror of failure begins to recede and you feel more confident as a person, there are fewer perceived sleights and you’re, simply, more chill! I got here for a few days, I think, then my ecosystem changed dramatically and consequently my habits and so I’ve fallen out of tune. And I’ve been told that even better things lie yonder. Hope I find out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10b248bf979b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On: The concept of ‘simple’, log 1.]]></title>
            <link>https://medium.com/@vsuley/on-the-concept-of-simple-log-1-e3dddcddf821?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3dddcddf821</guid>
            <category><![CDATA[simplicity]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Sat, 07 Nov 2015 08:20:59 GMT</pubDate>
            <atom:updated>2015-11-07T08:20:59.699Z</atom:updated>
            <content:encoded><![CDATA[<h4>When do you consider something ‘simple’?</h4><p>I’m not sure how I would answer that question. The question is intriguing — and more so to me because I am a crier for the non-existence of ‘simple’. Notions like ‘simpler’ and ‘simplify’ make sense to me just fine, because they are relative in nature. But ‘simple’ is absolute in its stance and nothing about the universe is simple if considered to its tiniest detail. Then it becomes a matter of setting your frame of reference or, in other words, outlining your assumptions. So, I suppose when trying to decide whether a design is simple or not, an analysis of what you’re assuming becomes critical.</p><p>An obvious manifestation of this is how assuming less usually makes your decisions more critical, but slower while assuming more lets you move faster with a higher error rate. That’s because assuming less suddenly exposed you to more complexity; facts that you were previously blind to. A good exercise in initial design brainstorms would be to try various ‘levels of assumption’ and judge which one strikes the best trade-off between speed and accuracy for future design discussions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3dddcddf821" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Error while switching from DSLR to Mirrorless]]></title>
            <link>https://medium.com/@vsuley/error-while-switching-from-dslr-to-mirrorless-a3606dd9c051?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3606dd9c051</guid>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[x-t1]]></category>
            <category><![CDATA[cameras]]></category>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Fri, 16 Oct 2015 04:43:49 GMT</pubDate>
            <atom:updated>2015-10-16T04:43:49.703Z</atom:updated>
            <content:encoded><![CDATA[<p>I made a minor error*!</p><p>When moving from a Canon Full-frame DSLR to my current Fuji mirror-less system, I was so excited about the size and weight reductions that I somehow went full-tilt on keeping my camera unaccessorized. I suppose that could work for some people. However, it basically means that I failed to account for my own personality during the process and felt ‘incomplete’ with my new setup (after the initial excitement died down).</p><p>What I’m talking about are things like an extended eye-cup, a vertical battery grip, improved strap system, full featured intervalometer etc. You know what, I’ll even throw a good on-camera flash in that list.</p><p>But now I get it. The promise of the mirrorless system is that even a fully outfitted camera will be smaller and weigh less; so there’s <strong>no need for compromise</strong>. Yes, it sounds so bloody obvious <em>now</em>, doesn’t it? But I promise you, it’s an easy trap to fall into. That, or I’m a <strong>giant </strong>dumbass.</p><p>*: I spent a while trying to figure out whether ‘mistake’ or ‘error’ would be the appropriate word for use in this blog entry, but I couldn’t. I finally used ‘error’ because it sounded better. Any lingo smarties around that could tell me which would be better?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3606dd9c051" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Windows Phone 8.1 app, log 03]]></title>
            <link>https://medium.com/@vsuley/building-a-windows-phone-8-1-app-log-03-373699f5e11?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/373699f5e11</guid>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Sun, 03 Aug 2014 00:05:26 GMT</pubDate>
            <atom:updated>2014-08-03T00:05:26.818Z</atom:updated>
            <content:encoded><![CDATA[<p>Data persistence decisions</p><h3>Quick Recap</h3><p><em>(These blogs are probably best read in order, or at least catch the TL;DR section at the end of each to get some context. Here’s </em><a href="https://medium.com/@vsuley/windows-universal-apps-log-02-1a6860a621fe"><em>log 02</em></a><em>, and that has a link its predecessor)</em></p><p>I’m building a Time-Tracker app that will let me keep tabs on how much time I’m spending with my hobbies and typical leisure activities. So far I’ve talked about the initial setup. For context, here is an image of what the app looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*4lCFyQ66iFHYTFyomjFxqg.png" /><figcaption>Most recent layout (slightly newer than blog entry, but shouldn’t make much difference to article content)</figcaption></figure><h3>Decisions, decisions.</h3><p>After getting an extremely basic UI in place with Pivot controls and simple buttons, it was time to start persisting data so I could begin dogfooding my app. Here were some of the persistence decisions I had to take:</p><ol><li>Whether to use a simple database or a file structure.</li><li>What fields I should persist.</li><li>How will data migration be handled when the time comes for it.</li><li>Should I remain hardcore about only persisting data within my model classes or should I blur the boundary and persist some of the data within my ViewModel classes as well? I suppose that this would be obvious to an experienced developer but I wrestled with the idea for a little while. The reason the struggle even existed is that the concept of ‘days’ did not really exist within my model, but was vital to the visual arrangement of things and hence a part of the ViewModel.</li></ol><h4>Database vs File based approach</h4><p>Frankly, I really wanted to go with a database approach because my data is quite easy to model relationally, I wouldn’t have to worry about a bunch of file operations, bulk operations would be trivial and, well, I also wanted to take LINQ for a spin. I was under the impression that the WIndows Phone platform has a built-in SQL-Lite implementation and was quite sure things would be smooth and awesome. Turns out I was wrong. SQL-Lite is a 3rd party add-on…and unfortunately I couldn’t get the extension to work on my system after an hour or so of struggling. I gave up, leaving this space to mature a little before I come back to it, and decided to the file structure route.</p><h4>Some file based decisions</h4><p>I was bummed that the DB route didn’t work out, because I now had to decide on things like: if I should use a binary file or a text based format and whether I should go with a serialization library or create my own method for reading and writing out the data. Since a binary format would be unreadable, it would make debugging just a little bit more difficult and this being my first time writing such an app I wanted to be able to read the file content easily — so the decision to go with a text-based file was easy.</p><p>At this point we’ve narrowed things down to using a readable text file based solution. More experimentation and internet searching ensued as I looked for serialization libraries. I played around with a few options most required more infrastructure setup than I was in the mood for (learning more about the interfaces involved and supplying the right attributes to various classes/properties etc), so I decided on XmlSerializer which worked reasonably well right out of the box (it’s part of the .Net platform, no add-ons).</p><p>Finally, my persistence setup is that I have one file for every day of data stored; the file name being the date the data is for. Inside the file there is an XML tree and that stores details for activities of the day. Here is what the file looks like:</p><blockquote>&lt;?xml version=”1.0&quot; encoding=”utf-8&quot;?&gt;<br>&lt;ArrayOfActivityInfo xmlns:xsi=”<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot; xmlns:xsd=”<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>&quot;&gt; &lt;ActivityInfo&gt; &lt;ActivityName&gt;Working out&lt;/ActivityName&gt; &lt;HoursSpent&gt;2&lt;/HoursSpent&gt; &lt;ActivityDate&gt;2014-08-02T00:00:00-07:00&lt;/ActivityDate&gt; &lt;/ActivityInfo&gt; &lt;ActivityInfo&gt; &lt;ActivityName&gt;General reading&lt;/ActivityName&gt; &lt;HoursSpent&gt;1&lt;/HoursSpent&gt; &lt;ActivityDate&gt;2014-08-02T00:00:00-07:00&lt;/ActivityDate&gt; &lt;/ActivityInfo&gt; &lt;ActivityInfo&gt; &lt;ActivityName&gt;TV&lt;/ActivityName&gt; &lt;HoursSpent&gt;0&lt;/HoursSpent&gt; &lt;ActivityDate&gt;2014-08-02T00:00:00-07:00&lt;/ActivityDate&gt; &lt;/ActivityInfo&gt; &lt;ActivityInfo&gt; &lt;ActivityName&gt;Video Games&lt;/ActivityName&gt; &lt;HoursSpent&gt;3&lt;/HoursSpent&gt; &lt;ActivityDate&gt;2014-08-02T00:00:00-07:00&lt;/ActivityDate&gt; &lt;/ActivityInfo&gt;<br>&lt;/ArrayOfActivityInfo&gt;</blockquote><p>As you can tell, the data is extremely simple, but very flexible in terms of what it would consider valid. I don’t expect a person’s activities to change too rapidly, but even if they did the data file wouldn’t need to be migrated. The list of activities a person sees on the page would be stored in a settings file separately from this data and that can be updated as needed. For reporting (when we get to it), I am planning to simply crawl through all data files and create an in-memory dictionary of activity-time spent pairs. The data files don’t have to be symmetric, if day 1 you engaged in activities A, B and C, and day 2 you did A, C and D; the final list will be A, B, C and D with time-spent calculated across both (outer join).</p><h4>Some other considerations</h4><p>There are still other considerations like when I should write to the file and what would happen to days that the user did not input any data for. The latter was simple…no data entry = no data file. I’ll deal with that when I have to. For the first question, I could have done the file-writes on page navigation or pivot item’s selection changed event, but instead of introducing more state-checking complexity to the code, I decided to write to the file every time the user changes any of the values. I’m not certain if this would be too many file-writes, but I’m guessing they’re not. The files are tiny and writing to them should be a very rapid affair. If this turns out to be a perf disadvantage I’ll change the logic later.</p><p>Also, you might find some shortcomings with the current format, for instance I’m only storing hours which seems like too coarse of a unit; that is intentional. I want to practice writing ‘data migration’ code and I will need to make changes to this schema before shipping. As a result, instead of agonizing over the perfect schema now, I’ll write robust migration code and update the schema as I go along.</p><h3>TL;DR</h3><ul><li>Couldn’t get SQL-Lite to work ☹ ☹ ☹</li><li>Using local file storage for persistence. Easily accessed through platform namespace Windows.Storage.</li><li>Using XmlSerializer for converting objects into XML. Using the very basic canned settings, nothing fancy.</li><li>Storing one file for each day. Simple, dumb but effective.</li><li>File is written every time the user changes any value. Perf remains to be seen, will alter as needed.</li><li>Not agonizing over the perfect schema now. Will invest in robust data migration code and keep updating the schema as I go along.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=373699f5e11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Universal Apps, log 02]]></title>
            <link>https://medium.com/@vsuley/windows-universal-apps-log-02-1a6860a621fe?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a6860a621fe</guid>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Sun, 13 Jul 2014 20:43:21 GMT</pubDate>
            <atom:updated>2014-07-28T00:46:51.936Z</atom:updated>
            <content:encoded><![CDATA[<h2>Building a Windows Phone 8.1 app, log 02</h2><h4>Getting set up; the framework &amp; some basic controls.</h4><h3>A quick recap</h3><p>In <a href="https://medium.com/@vsuley/windows-universal-apps-log-01-7e9f6e125f75">log 01</a>, I introduced this personal ambition of learning how to write Windows/Windows Phone apps and my journey so far, including some pain points. I said that the plan forward is to tread down the MVVM road prescribed by Microsoft.</p><h3>Progress</h3><p>First, happy to report that I’m over the hump of some initial troubles and have a basic bare-bones model in place which paves the way for future additions!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*qIwi89zLanTmTryEfsXo1w.png" /></figure><p>Here are some pain-points and other misc notes I had to deal with (in no particular order).</p><h4>MVVMLight is my framework of choice as of now</h4><p>MVVM is a great pattern for parallel development and it does make a lot of sense to me on an intuitive level. However, it requires a one-time investment in some plumbing code to pass update notifications, commands, conversions around. One can write some base classes that do the obvious common stuff and re-use throughout ones’s projects to make life easier. But…since this is such a common need, a few people have already done the work and put their libraries out for sharing and re-use! I picked up <a href="https://mvvmlight.codeplex.com/">MVVMLight</a> since it seems to have a fairly large user community (well, at least as far as Windows Store apps are concerned ;)). The person who maintains this framework (Laurent Bugnion) is pretty deeply plugged into the development of XAML frameworks themselves so reading his blogs is very informative.</p><p>I am not entirely sure why these frameworks aren’t built in to the SDK, but I suppose they want developers to implement the interfaces as needed, oh well.</p><h4>Turns out, commands don’t work that easily with events</h4><p>MVVM has this notion of <em>commands</em> which are different from <em>events </em>in that they are not as closely coupled as events are with <em>event handlers</em>. Again, sensible idea that I couldn’t wait to get behind! However, even with all the big talk about MVVM, XAML doesn’t seem optimized for it yet (it’s much easier to write code-behind style projects…you have to work harder to go MVVM at every early stage). Even though the ‘<em>button</em>’ control has a built in field call ‘<em>Command</em>’ that you can simply point to a method in your code, most other events are bubbled up as, well, events; and they can’t point to a command right away. They need a conversion layer in between and you have to either write that on your own or find in some other assembly somewhere. Luckily, MVVMLight was on the ball.</p><h4>SDK/Target version differences continue to be a problem</h4><p>I spent a significant amount of time trying to make things work according to this <a href="http://msdn.microsoft.com/en-us/magazine/dn237302.aspx">blog</a> (which was a very good write-up, btw) but after a long cycle of Visual Studio complaining and me trying to fight with it, I realized that the technique described by the blog is now outdated. It was good for WP 8.0, but in the Windows/Windows Phone 8.1 Microsoft have now included some of the Event-to-Command plumbing within the SDKs and one needs to use a different namespace (in a different assembly) and some minor differences in usage as well. So, once I came across <a href="http://blog.galasoft.ch/posts/2014/01/using-the-eventargsconverter-in-mvvm-light-and-why-is-there-no-eventtocommand-in-the-windows-8-1-version/">this blog entry</a>, things finally began to make some sense.</p><h4>Some assemblies needed to be pulled in explicitly</h4><p>Even after I read the aforementioned blog entry, things continued to error out with Visual Studio complaining that it couldn’t find ‘Behaviors’ in the namespace ‘Interaction’. Well, I downloaded some sample code from Laurent’s blog and I finally found out the missing link. Apparently you need to explicitly include two assemblies tucked away in some arbitrary corner of the framework’s installation and then everything pops into action. Here is the golden path: <em>“C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\BehaviorsXamlSDKManaged\12.0\References\CommonConfiguration\Neutral”.</em></p><p>Frankly, I have no idea why the f*ck I needed to do this. MVVM is supposed to be the shiznit and the bee’s knees but MS makes you jump through hoops to get it to work. Fine, once you know it it’s probably all obvious but as a first timer this has been an exercise in frustration.</p><h4>Design-time code didn’t load without some tinkering</h4><p>I knew that Blend is not a ‘dumb’ parser for XAML; that it does some amount of code evaluation for the editor to be useful. I also knew that it cannot get past authentication checks and some other network calls, but currently I’m just putting in dumb random data generated in a loop. Given that, I expected the DataTemplates to show up rendered in Blend when I opened up my file. However, that didn’t happen. I screwed around for a while, until I figured out that <em>I needed to build the project from within Blend first</em>. Again, nothing that any manual has mentioned yet…not sure why or what’s up. I also couldn’t get my debugger to attach to Blend and load the symbols, but more about that in a later post when it’s more critical. Anyhow, once I built the project using Blend, data was rendered properly and I was able to adjust the layout in a MUCH more intuitive fashion. Finally beginning to feel the payoff for the MVVM pain.</p><h4>Pivot control is not supported on Windows</h4><p>I wanted my pages to be universal. I also wanted to use the pivot control to show different activities for different days. But well, the Pivot control is exclusive to the Phone…so I had to split my Home.xaml up between Windwos and Windows Phone. Oh well…understandable. I might have to look into what design paradigms I can use to replace pivot on Windows but that can wait. The phone is a better platform for this app.</p><h4>I still find it challenging to find the right help articles</h4><p>I have a better idea of what to look for now, but I still think it’s challenging to find the right help articles for Windows/Windows Phone development. Fair bit of churn in suggested development practicies from SDK to SDK and the differences aren’t easy to spot. Plus, help/blogs are scattered and it takes some scrutiny to make sure you’re looking at the proper write-up.</p><h3>TL;DR</h3><p>First of all, I don’t blame you. I am not putting in too much thought on how I structure these because I’m afraid that might make me too lazy to write altogether. So…here is a condensed version of my learnings:</p><ol><li>The built-in MVVM support is different between Windows/WP 8.0 and Windows/Windows Phone 8.1. So, if you search for help or support, make sure you include the version numbers.</li><li>8.1 SDKs have some amount of built-in support for event-to-command but you need to include two assemblies on a golden path: <em>C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\BehaviorsXamlSDKManaged\12.0\References\CommonConfiguration\Neutral.</em></li><li>If you are trying to get code executed in Blend, you might have to first build the project from within Blend.</li><li>Be aware that there are some control that are not universal by nature.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a6860a621fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Universal Apps, log 01]]></title>
            <link>https://medium.com/@vsuley/windows-universal-apps-log-01-7e9f6e125f75?source=rss-f2ef8dfc5154------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e9f6e125f75</guid>
            <dc:creator><![CDATA[Vinayak]]></dc:creator>
            <pubDate>Wed, 09 Jul 2014 03:28:56 GMT</pubDate>
            <atom:updated>2014-07-28T00:43:39.764Z</atom:updated>
            <content:encoded><![CDATA[<h2>Building a Windows Phone 8.1 app, log 01</h2><h4>Introduction to the quest and some background</h4><p>So, just putting this out there, this is going to be the shittiest blog ever written; but I’d rather it be that than the shittiest blog never written.</p><h3>My story so far</h3><p>This is not the first time that I’m attempting to learn app development on the Windows/Windows Phone platform. I’ve tried and failed at least 2-3 times before. I believe the reasons for my failure were:</p><h4>Lack of resolve in earlier attempts</h4><p>I was expecting to build something awesome much too quickly. After repeated failures, my expectations are tempered and my resolve is stronger than ever. I don’t expect to achieve ‘flow’ any time soon, but I’m going to keep at it for as long as it takes.</p><h4>Trouble understanding XAML and WPF</h4><p>Understanding core OS concepts and the overall platforms goals hasn’t been the issue; but understanding the dense declarative syntax of XAML and ‘richness’ of WPF has been a pain in my dick-hole. I have read a lot of online turials and code samples but my understanding of the language has always remained shaky and sieve-like. Well, this time I decided to stop being a miser and purchase some well-recommended reference text books to augment the search-and-go learning style. I read the chapters, get a better understanding of the core concepts and constructs and then look around to see how experienced developers solve the problems I face.</p><h4>Unsatisfactory reference material</h4><p>I feel this still remains a problem but there’s nothing I can do about it. Microsoft puts out a ton of samples and information out, but somehow none of it quite seems to hit the nail on the head (I know I should explain why I feel that way, but I’m stumped). What makes it much worse is that they seem to have iterated so much that the documentation out there is extremely polluted. Adding insult to injury is the fact that they write ballads about WPFs flexibility and the thorough awesomeness of MVVM but half the samples don’t adhere to touted principles. And well, MVVM may very well be amazing for large projects (Microsoft simply cannot think small…pathological problem) but getting started with it is like trying to dig a trench with a salt-spoon. One of the reasons I’ve finally felt okay to point the finger outward is that I’m trying to pick up Java/JS programming to write web-apps at work, and that has been a breeze compared to learning WPF/XAML…I’m probably not the issue here. Anyhoo, I see value in their platform and I just need to stick this phase out till I achieve flow.</p><h4>Getting stuck in the weeds of design patterns, best practices, scale-able architecture blah blah blah.</h4><p>Trying to get it perfect the very first time has been a terrible idea and I think I’m finally getting the hang of being a duct-tape programmer. Yeah, I know what Lifehacker says — “Perfect is the enemy of good”, but old habits die hard. And well, abandoning the pursuit for perfection seems so…depressing?</p><h3>The present condition</h3><p>I’m currently working on an extremely simple app which I unimaginatively call “Time Tracker”. It’s something I want so I can track which of my hobbies/indulgences are taking up the bulk of my time. I simply want to be able to look back on the month and say how many hours I spent playing video games, programming, working-out, watching porn etc. Like I said, simple.</p><p>I bought the book called <a href="http://www.amazon.com/WPF-4-5-Unleashed-Adam-Nathan/dp/0672336979/ref=sr_1_1?ie=UTF8&amp;qid=1404874933&amp;sr=8-1&amp;keywords=WPF+4.5+unleashed">“WPF 4.5 unleashed” by Adam Nathan</a> to get me moving. It comes with great reviews and I agree that it is a very good technical read. It explains why things are the way they are — not a simple cookbook. It goes into great depth regarding XAML and that has been my biggest learning speed-bump so far. I do rely a LOT on internet searches for cookbook type solutions. Now, Adam Nathan also has a book for Windows app programming but I haven’t bought it because flooding myself with too much reading material may not help either. I’m going to try and absorb as much about WPF from the text, learn tips and techniques from the wide internets and let my bwwaaiins do the rest.</p><p>However, one of the most confounding questions for me at this juncture is <em>if I should go with a code-behind approach or adopt a strict MVVM pattern</em>. The decision isn’t easy because code-behind is easy to work with in smaller projects, but it’s messy and I absolutely hate the idea of mixing my data container classes into the UI logic. I’m sure more seasoned programmers would be able to avoid that, but since I’m improvising as I go along I’m liable to fall into a design-ditch. MVVM as a concept makes absolute sense to me. I understand it at an intuitive level but the amount of plumbing you need to put into place for it is a major turn-off.</p><p>The other question that bothered me for a while was <em>if I should go with creating a custom UserControl or a DataTemplate.</em> However, this could practically be viewed as another way of asking the first question; and I’ll tell you my verdict in a second.</p><h3>The plan…</h3><p>…<em>is to go with the recommended MVVM approach</em>. I.e. I’ll be using a DataTemplate to display a collection of ‘ActivityInfo’ objects with ‘Commands’ in place to update data. The UserControl approach was going to get convoluted because it would end up hosting some activity data within the code-behind which actually is control logic…felt ugly and unintuitive. I might as well spend some time getting this MVVM shit down and do it right, and in a way that makes sense to my brain. When I say “MVVM shit”, of course, I am referring to the basic class infrastructure for <a href="http://msdn.microsoft.com/en-us/library/ms752308%28v=vs.110%29.aspx">Commands</a>, <a href="http://msdn.microsoft.com/en-us/library/ms752914%28v=vs.110%29.aspx">DepedencyProperties</a>, <a href="http://blogs.msdn.com/b/bencon/archive/2006/05/10/594886.aspx">Value Converters </a>and possibly some other things.</p><p>I’m really <em>hoping that there is some awesome NuGet package I can download that’ll take care of repeated/standard/boilerplate interface implementations</em>.</p><p>Ok, that’s it for now, I’ll keep you posted!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e9f6e125f75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>