<?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 Nishant Shukla on Medium]]></title>
        <description><![CDATA[Stories by Nishant Shukla on Medium]]></description>
        <link>https://medium.com/@binroot?source=rss-f2ba32aa75db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cjep-Olhty0ca_8MtXlUWQ.jpeg</url>
            <title>Stories by Nishant Shukla on Medium</title>
            <link>https://medium.com/@binroot?source=rss-f2ba32aa75db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 19:01:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@binroot/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[Pinocchio is Incompatible with Free-will]]></title>
            <link>https://medium.com/@binroot/pinocchio-1f289052a9e4?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f289052a9e4</guid>
            <category><![CDATA[free-will]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[poetry]]></category>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Wed, 22 Mar 2017 21:46:27 GMT</pubDate>
            <atom:updated>2017-03-24T07:20:05.029Z</atom:updated>
            <content:encoded><![CDATA[<h4>Pinocchio’s Paradox (original)</h4><p>The story of Pinocchio is an exercise of assuming the following mechanics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*VTvSDsTryNY081nA." /><figcaption>Pinocchio’s nose grows if and only if he tells lies</figcaption></figure><p>You’ve heard of the liar paradox, right? Or, as I like the call it, the Pinocchio paradox, which is a fun little thought-experiment: what happens when Pinocchio says <strong>“My nose will grow now”</strong>?</p><p>You guessed it, there’s no way to classify that sentence as true or false. If he is telling a lie, his nose will not grow. But, his nose grows if and only if he tells lies. “A contradiction!” shouts Kurt Gödel.</p><h4>Pinocchio’s Paradox (extended)</h4><p>I’m not the first to extrapolate the paradox to the future-tense. The modified Pinocchio paradox rephrases the statement and introduces the concept of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/0*ZzBwbveeQ7wdz8w0." /><figcaption>At time t=0, Pinocchio makes this strange claim.</figcaption></figure><p><em>NoseGrows</em> and <em>TellsLie</em> are now a time-varying function (otherwise known as a <em>fluent</em>s). Formally, Pinocchio has made the following claim at <em>t=0</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/0*m4Kny90Uu-l0RMJU." /></figure><p>Equivalently, Pinocchio is admitting that he will tell a lie in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/0*EGqfD08JzrsKZo73." /></figure><p>Here’s some interesting observations to conclude:</p><ul><li>If his nose grows in the future, he told the truth at <em>t=0</em>.</li><li>If his nose does not grow in the future, he told a lie at <em>t=0</em>.</li></ul><h4>Free-will</h4><p>If a person has free-will, they have the choice to either tell the truth or tell a lie at any given time in the future. A little more formally, free will means no simulation of a person can predict their behavior.</p><p>How does this relate to Pinocchio? First, let’s consider the two possible cases:</p><p><strong>Case 1:</strong> For t&gt;0, Pinocchio chooses to never lie again. Therefore his statement at t=0, “I will lie in the future” is false! Consequently, his nose will grow at t=0.</p><p><strong>Case 2:</strong> For t&gt;0, Pinocchio chooses to lie. His statement at t=0, “I will lie in the future” was true! Therefore his nose will remain normal and not grow at t=0.</p><p><strong>Here’s the exciting part:</strong> Regardless of whether Pinocchio’s nose grows or doesn’t, there is no such thing as free will!</p><p>What? Yes, you heard right!</p><ol><li>Assume free-will exists.</li><li>Therefore, the future must be unpredictable.</li><li>But, knowing the state of Pinocchio’s nose at t=0 reveals with certainty whether he will lie in the future.</li><li>A contradiction! Therefore, free-will does not exist.</li></ol><p>Even stranger argument:</p><ol><li>Assume free-will exists.</li><li>If Pinocchio chooses never to lie, then his past-self’s nose at t=0 will grow.</li><li>Thus his current nose at t&gt;0 will also grow, even if he was not lying.</li><li>A contradiction! Therefore, free-will does not exist.</li></ol><p>Poor Pinocchio.</p><p><em>This is a rewrite of my </em><a href="http://scimatek.blogspot.com/2009/08/pinocchio-dilemma.html"><em>earlier post in 2009</em></a><em>.</em></p><h4>Discussion:</h4><p><a href="https://www.reddit.com/r/philosophy/comments/60y3my/pinocchio_is_ncompatible_with_freewill/dfa8ury/">ribnag</a>:</p><blockquote>Interesting reasoning — Though I would note that you could also use Pinocchio as a boolean oracle under similar assumptions… Have him say “X will be one of this week’s winning lottery numbers” for every possible X, and his nose will have predicted the future.</blockquote><blockquote>I would point out, though, that this isn’t actually how it works either in the Disney movie or in Collodi’s original story; both make it clear that his nose only grows when he <em>knows</em> he’s lying. Merely being wrong isn’t sufficient, thereby undermining the problem of free will (or the potential for oracular powers) as a consequence of Pinocchio’s nose issues.</blockquote><p><a href="https://www.reddit.com/r/philosophy/comments/60y3my/pinocchio_is_ncompatible_with_freewill/dfa8u8h/">accountant0</a>:</p><blockquote>This fails to address a single problem: Pinocchio has no bearing on the Truth.</blockquote><blockquote>If Pinocchio states something that is untrue regardless of his intention his nose will grow and vice versa therefore the paradox isn’t a paradox. If Pinocchio states “my nose will grow” and it does not then he’s telling a universal truth and if he makes the same statement and it does then he told a universal lie.</blockquote><blockquote>This only covers lying with intent.</blockquote><p><a href="https://www.reddit.com/r/philosophy/comments/60y3my/pinocchio_is_ncompatible_with_freewill/dfb8o4m/">max225</a>:</p><blockquote>The premise that free will is incompatible with foreknowledge is the subject of much debate. If you assume that to be the case then yes, I agree with the conclusion, however, I personally do not believe this to be the case.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f289052a9e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting to Know TensorFlow]]></title>
            <link>https://medium.com/hackernoon/machine-learning-with-tensorflow-8873fdee2b68?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/8873fdee2b68</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Tue, 08 Nov 2016 17:52:49 GMT</pubDate>
            <atom:updated>2019-04-27T06:44:54.866Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article was excerpted from </em><a href="https://manning.com/books/machine-learning-with-tensorflow?a_aid=TensorFlow&amp;a_bid=042443a4"><em>Machine Learning with TensorFlow</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*xvNZGOmKHEUKO9lqnjDB9g.png" /></figure><p>Before jumping into <a href="https://hackernoon.com/tagged/machine-learning">machine learning</a> <a href="https://hackernoon.com/tagged/algorithms">algorithms</a>, you should first familiarize yourself with how to use the tools. This article covers some essential advantages of TensorFlow, to convince you it’s the machine learning library of choice.</p><p>As a thought experiment, let’s imagine what happens when we write Python code without a handy computing library. It’ll be like using a new smartphone without installing any extra apps. The phone still works, but you’d be more productive if you had the right apps.</p><blockquote><strong>Consider the following… </strong><em>You’re a business owner tracking the flow of sales. You want to calculate your revenue from selling your products. Your inventory consists of 100 different products, and you represent each price in a vector called </em>prices<em>. Another vector of size 100 called </em>amounts <em>represents the inventory count of each item. You can write the following chunk of Python code shown in listing 1 to calculate the revenue of selling all products. Keep in mind that this code doesn’t import any libraries.</em></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b91b681d2da4d6571411a03a4a173062/href">https://medium.com/media/b91b681d2da4d6571411a03a4a173062/href</a></iframe><p>That’s a lot of code just to calculate the inner-product of two vectors (also known as <em>dot product</em>). Imagine how much code would be required for something more complicated, such as solving linear equations or computing the distance between two vectors.</p><p>By installing the TensorFlow library, you also install a well-known and robust Python library called NumPy, which facilitates mathematical manipulation in Python. Using Python without its libraries (e.g. NumPy and TensorFlow) is like using a camera without autofocus: you gain more flexibility, but you can easily make careless mistakes. It’s already pretty easy to make mistakes in machine learning, so let’s keep our camera on auto-focus and use TensorFlow to help automate some tedious software development.</p><p>Listing 2 shows how to concisely write the same inner-product using NumPy.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2152af5a995501b4f7567a392ec52c42/href">https://medium.com/media/2152af5a995501b4f7567a392ec52c42/href</a></iframe><p>Python is a succinct language. Fortunately for you, that means you won’t see pages and pages of cryptic code. On the other hand, the brevity of the Python language implies that a lot is happening behind each line of code, which you should familiarize yourself with carefully as you work.</p><blockquote><strong>By the way… </strong>Detailed documentation about various functions for the Python and C++ APIs for TensorFlow are available at <a href="https://www.tensorflow.org/api_docs/index.html">https://www.tensorflow.org/api_docs/index.html</a>.</blockquote><p>This article is geared toward using TensorFlow for computations, because machine learning relies on mathematical formulations. After going through the examples and code listings, you’ll be able to use TensorFlow for some arbitrary tasks, such as computing statistics on big data. The focus here will entirely be about how to use TensorFlow, as opposed to machine learning in general.</p><p>Machine learning algorithms require a large amount of mathematical operations. Often, an algorithm boils down to a composition of simple functions iterated until convergence. Sure, you might use any standard programming language to perform these computations, but the secret to both manageable and performant code is the use of a well-written library.</p><p>That sounds like a gentle start, right? Without further ado, <strong>let’s write our first TensorFlow code!</strong></p><h3><strong><em>Ensuring TensorFlow works</em></strong></h3><p>First, we need to ensure that everything is working correctly. Check the oil level in your car, repair the blown fuse in your basement, and ensure that your credit balance is zero.</p><p>Just kidding, I’m talking about TensorFlow.</p><p>Go ahead and create a new file called <em>test.py</em> for our first piece of code. Import TensorFlow by running the following script:</p><pre>import tensorflow as tf</pre><p>This single import prepares TensorFlow for your bidding.<strong> </strong>If the Python interpreter doesn’t complain, then we’re ready to start using TensorFlow!</p><blockquote><strong>Having technical difficulty? </strong>A common cause of error at this step is if you installed the GPU version and the library fails to search for CUDA drivers. Remember, if you compiled the library with CUDA, you need to update your environment variables with the path to CUDA. Check the CUDA instructions on TensorFlow. (See <a href="https://www.tensorflow.org/versions/master/get_started/os_setup.html#optional-linux-enable-gpu-support">https://www.tensorflow.org/versions/master/get_started/os_setup.html#optional-linux-enable-gpu-support</a> for further information).</blockquote><h4><strong>Sticking with TensorFlow conventions</strong></h4><p>The TensorFlow library is usually imported with the <em>tf </em>qualified name. Generally, qualifying TensorFlow with <em>tf </em>is a good idea to remain consistent with other developers and open-source TensorFlow projects. You may choose not to qualify it or change the qualification name, but then successfully reusing other people’s snippets of TensorFlow code in your own projects will be an involved process.</p><h4><strong><em>Representing tensors</em></strong></h4><p>Now that we know how to import TensorFlow into a Python source file, let’s start using it! A convenient way to describe an object in the real world is by listing out its properties, or features. For example, you can describe a car by its color, model, engine type, and mileage. An ordered list of some features is called a <em>feature vector,</em> and that’s exactly what we’ll represent in TensorFlow code.</p><p>Feature vectors are one of the most useful devices in machine learning because of their simplicity (they’re lists of numbers). Each data item typically consists of a feature vector and a good dataset has thousands, if not thousands, of these feature vectors. No doubt, you’ll often be dealing with more than one vector at a time. A <em>matrix</em> concisely represents a list of vectors, where each column of a matrix is a feature vector.</p><p>The syntax to represent matrices in TensorFlow is a vector of vectors, each of the same length. Figure 1 is an example of a matrix with two rows and three columns, such as [[1, 2, 3], [4, 5, 6]]. Notice, this is a vector containing two elements, and each element corresponds to a row of the matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*KfxD28aLzP1Svj80NZeyPA.png" /><figcaption>Figure 1. The matrix in the lower half of the diagram is a visualization from its compact code notation in the upper half of the diagram. This form of notation is a common paradigm in most scientific computing libraries.</figcaption></figure><p>We access an element in a matrix by specifying its row and column indices. For example, the first row and first column indicate the first top-left element. Sometimes it’s convenient to use more than two indices, such as when referencing a pixel in a color image not only by its row and column, but also its red/green/blue channel. A <em>tensor</em> is a generalization of a matrix that specifies an element by an arbitrary number of indices.</p><blockquote><strong>Example of a tensor… </strong>Suppose an elementary school enforces assigned seating to its students. You’re the principal, and you’re terrible with names. Luckily, each classroom has a grid of seats, where you can easily nickname a student by his or her row and column index.</blockquote><blockquote>There are multiple classrooms, so you can’t say “Good morning 4,10! Keep up the good work.” You need to also specify the classroom, “Hi 4,10 from classroom 2.” Unlike a matrix, which needs only two indices to specify an element, the students in this school need three numbers. They’re all a part of a rank three tensor!</blockquote><p>The syntax for tensors is even more nested vectors. For example, a 2-by-3-by-2 tensor is [[[1,2], [3,4], [5,6]], [[7,8], [9,10], [11,12]]], which can be thought of as two matrices, each of size 3-by-2. Consequently, we say this tensor has a <em>rank</em> of 3. In general, the rank of a tensor is the number of indices required to specify an element. Machine learning algorithms in TensorFlow act on Tensors, and it’s important to understand how to use them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*bcVHGX66iW8A72i5aaD4bw.png" /><figcaption>Figure 2. This tensor can be thought of as multiple matrices stacked on top of each other. To specify an element, you must indicate the row and column, as well as which matrix is being accessed. Therefore, the rank of this tensor is three.</figcaption></figure><p>It’s easy to get lost in the many ways to represent a tensor. Intuitively, each of the following three lines of code in Listing 3 is trying to represent the same 2-by-2 matrix. This matrix represents two features vectors of two dimensions each. It could, for example, represent two people’s ratings of two movies. Each person, indexed by the row of the matrix, assigns a number to describe his or her review of the movie, indexed by the column. Run the code to see how to generate a matrix in TensorFlow.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5844577860e86250a99251f2b992c942/href">https://medium.com/media/5844577860e86250a99251f2b992c942/href</a></iframe><p>The first variable (<em>m1</em>) is a list, the second variable (<em>m2</em>) is an <em>ndarray </em>from the NumPy library, and the last variable (<em>m3</em>) is TensorFlow’s <em>Tensor </em>object. All operators in TensorFlow, such as <em>neg</em>, are designed to operate on tensor objects. A convenient function we can sprinkle anywhere to make sure that we’re dealing with tensors, as opposed to the other types, is <em>tf.convert_to_tensor( … )</em>. Most functions in the TensorFlow library already perform this function (redundantly), even if you forget to. Using <em>tf.convert_to_tensor( … )</em> is optional, but I show it here because it helps demystify the implicit type system being handled across the library. The aforementioned listing 3 produces the following output three times:</p><pre>&lt;class ‘tensorflow.python.framework.ops.Tensor’&gt;</pre><p>Let’s take another look at defining tensors in code. After importing the TensorFlow library, we can use the constant operator as follows in Listing 4.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7163955326959d79d041cbac46686538/href">https://medium.com/media/7163955326959d79d041cbac46686538/href</a></iframe><p>Running listing 4 produces the following output:</p><pre>Tensor( “Const:0”,<br>        shape=TensorShape([Dimension(1), <br>                           Dimension(2)]),<br>        dtype=float32 )</pre><pre>Tensor( “Const_1:0”,<br>        shape=TensorShape([Dimension(2), <br>                           Dimension(1)]),<br>        dtype=int32 )</pre><pre>Tensor( “Const_2:0”,<br>         shape=TensorShape([Dimension(2), <br>                            Dimension(3), <br>                            Dimension(2)]),<br>         dtype=int32 )</pre><p>As you can see from the output, each tensor is represented by the aptly named <em>Tensor </em>object. Each <em>Tensor </em>object has a unique label (<em>name</em>), a dimension (<em>shape</em>) to define its structure, and data type (<em>dtype</em>) to specify the kind of values we’ll manipulate. Because we didn’t explicitly provide a name, the library automatically generated them: “Const:0”, “Const_1:0”, and “Const_2:0”.</p><h4><strong>Tensor types</strong></h4><p>Notice that each of the elements of <em>matrix1 </em>end with a decimal point. The decimal point tells Python that the data type of the elements isn’t an integer, but instead a float. We can pass in explicit <em>dtype </em>values. Much like NumPy arrays, tensors take on a data type that specifies the kind of values we’ll manipulate in that tensor.</p><p>TensorFlow also comes with a few convenient constructors for some simple tensors. For example, <em>tf.zeros(shape)</em> creates a tensor with all values initialized at zero of a specific shape. Similarly, <em>tf.ones(shape)</em> creates a tensor of a specific shape with all values initialized at one. The shape argument is a one-dimensional (1D) tensor of type <em>int32 </em>(a list of integers) describing the dimensions of the tensor.</p><h3><strong><em>Creating operators</em></strong></h3><p>Now that we have a few starting tensors ready to use, we can apply more interesting operators, such as addition or multiplication. Consider each row of a matrix representing the transaction of money to (positive value) and from (negative value) another person. Negating the matrix is a way to represent the transaction history of the other person’s flow of money. Let’s start simple and run the negation op (short for operation) on our <em>matrix1 </em>tensor from listing 4. Negating a matrix turns the positive numbers into negative numbers of the same magnitude, and vice versa.</p><p>Negation is one of the simplest operations. As shown in listing 5, negation takes only one tensor as input, and produces a tensor with every element negated — now, try running the code yourself. If you master how to define negation, it’ll provide a stepping stone to generalize that skill to all other TensorFlow operations.</p><blockquote><strong>Aside…</strong> <em>Defining</em> an operation, such as negation, is different from <em>running</em> it.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/be6c72818f66e79232423b67ade5b0c2/href">https://medium.com/media/be6c72818f66e79232423b67ade5b0c2/href</a></iframe><p>Listing 5 generates the following output:</p><pre>Tensor(“Neg:0”, shape=(1, 2), dtype=int32)</pre><h4><strong>Useful TensorFlow operators</strong></h4><p>The official documentation carefully lays out all available math ops: <a href="https://www.tensorflow.org/api_docs/Python/math_ops.html">https://www.tensorflow.org/api_docs/Python/math_ops.html</a>.</p><p>Some specific examples of commonly used operators include:</p><pre>tf.add(x, y) <br>Add two tensors of the same type, x + y</pre><pre>tf.sub(x, y) <br>Subtract tensors of the same type, x — y</pre><pre>tf.mul(x, y) <br>Multiply two tensors element-wise</pre><pre>tf.pow(x, y) <br>Take the element-wise power of x to y</pre><pre>tf.exp(x) <br>Equivalent to pow(e, x), where e is Euler’s number (2.718…)</pre><pre>tf.sqrt(x) <br>Equivalent to pow(x, 0.5)</pre><pre>tf.div(x, y) <br>Take the element-wise division of x and y</pre><pre>tf.truediv(x, y) <br>Same as tf.div, except casts the arguments as a float</pre><pre>tf.floordiv(x, y) <br>Same as truediv, except rounds down the final answer into an integer</pre><pre>tf.mod(x, y) <br>Takes the element-wise remainder from division</pre><blockquote><strong>Exercise…</strong> Use the TensorFlow operators we’ve learned to produce the Gaussian Distribution (also known as Normal Distribution). See Figure 3 for a hint. For reference, you can find the probability density of the normal distribution online: <a href="https://en.wikipedia.org/wiki/Normal_distribution.">https://en.wikipedia.org/wiki/Normal_distribution.</a></blockquote><p>Most mathematical expressions such as “*”, “-“, “+”, etc. are shortcuts for their TensorFlow equivalent, for the sake of brevity. The Gaussian function includes many operations, and it’s cleaner to use some short-hand notations as follows:</p><pre>from math import pi</pre><pre>mean = 1.0<br>sigma = 0.0</pre><pre>(tf.exp(tf.neg(tf.pow(x — mean, 2.0) /<br>               (2.0 * tf.pow(sigma, 2.0) ))) *<br>(1.0 / (sigma * tf.sqrt(2.0 * pi) )))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bv4rtLWR5Dh1pz7VV-4mPQ.png" /><figcaption>Figure 3. The graph represents the operations needed to produce a Gaussian distribution. The links between the nodes represent how data flows from one operation to the next. The operations themselves are simple, but complexity arises in how they intertwine.</figcaption></figure><p>As you can see, TensorFlow algorithms are easy to visualize. They can be described by flowcharts. The technical (and more correct) term for the flowchart is a <em>graph</em>. Every arrow in a flowchart is called the <em>edge</em> of the graph. In addition, every state of the flowchart is called a <em>node</em>.</p><h3><strong><em>Executing operators with sessions</em></strong></h3><p>A session is an environment of a software system that describes how the lines of code should run. In TensorFlow, a session sets up how the hardware devices (such as CPU and GPU) talk to each other. That way, you can design your machine learning algorithm without worrying about micro-managing the hardware that it runs on. Of course, you can later configure the session to change its behavior without changing a line of the machine learning code.</p><p>To execute an operation and retrieve its calculated value, TensorFlow requires a session. Only a registered session may fill the values of a Tensor object. To do so, you must create a session class using <em>tf.Session()</em> and tell it to run an operator (listing 6). The result will be a value you can later use for further computations.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a5347e3ed3e5c3e4a9070857043430f/href">https://medium.com/media/5a5347e3ed3e5c3e4a9070857043430f/href</a></iframe><p>Congratulations! You have just written your first full TensorFlow code. Although all it does is negate a matrix to produce [[-1, -2]], the core overhead and framework are just the same as everything else in TensorFlow.</p><h4><strong><em>Session configurations</em></strong></h4><p>You can also pass options to tf.Session. For example, TensorFlow automatically determines the best way to assign a GPU or CPU device to an operation, depending on what is available. We can pass an additional option, <em>log_device_placements=True</em>, when creating a Session, as shown in listing 7.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5edcf896f50872938b7040065bd07571/href">https://medium.com/media/5edcf896f50872938b7040065bd07571/href</a></iframe><p>This outputs info about which CPU/GPU devices are used in the session for each operation. For example, running listing 6 results in traces of output like the following to show which device was used to run the negation op:</p><pre>Neg: /job:localhost/replica:0/task:0/cpu:0</pre><p>Sessions are essential in TensorFlow code. You need to call a session to actually “run” the math. Figure 4 maps out how the different components on TensorFlow interact with the machine learning pipeline. A session not only runs a graph operation, but can also take placeholders, variables, and constants as input. We’ve used constants so far, but in later sections we’ll start using variables and placeholders. Here’s a quick overview of these three types of values.</p><ul><li><strong>Placeholder</strong>: A value that is unassigned, but will be initialized by the session wherever it is run.</li><li><strong>Variable:</strong> A value that can change, such a parameter of a machine learning model.</li><li><strong>Constant:</strong> A value that does not change, such as hyper-parameters or settings.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*2mI_CfSOhyl0if-o-d7O4A.png" /><figcaption>Figure 4. The session dictates how the hardware will be used to most efficiently process the graph. When the session starts, it assigns the CPU and GPU devices to each of the nodes. After processing, the session outputs data in a usable format, such as a NumPy array. A session optionally may be fed placeholders, variables, and constants.</figcaption></figure><h3><strong><em>Hungry for more?</em></strong></h3><p>That’s it for now, I hope that you have successfully acquainted yourself with some of the basic workings of TensorFlow. If this article has left you ravenous for more delicious TensorFlow tidbits, please go <strong>download the first chapter of </strong><a href="https://www.manning.com/books/machine-learning-with-tensorflow?a_aid=TensorFlow&amp;a_bid=042443a4"><strong>Machine Learning with TensorFlow</strong></a> and see this <a href="http://www.slideshare.net/ManningBooks/machine-learning-with-tensorflow">Slideshare presentation</a> for more information (and a <strong>discount code</strong>).</p><figure><a href="http://bit.ly/HackernoonFB"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hqOaABQ7XGPT-OYNgiUBg.png" /></a></figure><figure><a href="https://goo.gl/k7XYbx"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vgw1jkA6hgnvwzTsfMlnpg.png" /></a></figure><figure><a href="https://goo.gl/4ofytp"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gKBpq1ruUi0FVK2UM_I4tQ.png" /></a></figure><blockquote><a href="http://bit.ly/Hackernoon">Hacker Noon</a> is how hackers start their afternoons. We’re a part of the <a href="http://bit.ly/atAMIatAMI">@AMI</a> family. We are now <a href="http://bit.ly/hackernoonsubmission">accepting submissions</a> and happy to <a href="/service/mailto:partners@amipublications.com">discuss advertising &amp; sponsorship</a> opportunities.</blockquote><blockquote>If you enjoyed this story, we recommend reading our <a href="http://bit.ly/hackernoonlatestt">latest tech stories</a> and <a href="https://hackernoon.com/trending">trending tech stories</a>. Until next time, don’t take the realities of the world for granted!</blockquote><figure><a href="https://goo.gl/Ahtev1"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35tCjoPcvq6LbB3I6Wegqw.jpeg" /></a></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fdde502%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2Fhackernoon%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href">https://medium.com/media/3c851dac986ab6dbb2d1aaa91205a8eb/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8873fdee2b68" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hackernoon/machine-learning-with-tensorflow-8873fdee2b68">Getting to Know TensorFlow</a> was originally published in <a href="https://medium.com/hackernoon">HackerNoon.com</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The New Laptop Ritual]]></title>
            <link>https://medium.com/@binroot/the-new-laptop-ritual-955b1254e3cc?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/955b1254e3cc</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Tue, 03 Nov 2015 20:48:33 GMT</pubDate>
            <atom:updated>2015-12-05T23:31:41.376Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s time again for a new laptop! You know the drill; it’s like moving into an unfurnished apartment. I’d like to share this moment with you, dear reader. Come join me rig my new laptop:</p><h4><strong>Thinkpad W550s</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*DhKV5hCb959Fe01w95ZTHA.jpeg" /><figcaption><em>“…the enemy of trendiness, design clichés, fleeting fashion, or competitive emulation.”</em> — David Hill, Vice President of Design for Lenovo</figcaption></figure><p>The two most popular models used by programmers are Thinkpads and MacBook Pros. Both have their cult following, and I belong to the former. Though the “W” series Thinkpads are known to be bulky powerhouses, the <strong>W550s</strong> is the slickest yet, with a battery lasting over 13 hours, packing a 3K IPS display, and taming a vicious 5th-gen Intel processor.</p><h4>Ubuntu Desktop 15.10</h4><p>It was a difficult choice between Arch Linux and Ubuntu. I’m in the middle of a busy grad-school semester, so Ubuntu is a local optima for me. There were no issues replacing the factory-provided Windows partition with Ubuntu, but that’s partly due to Thinkpad’s <a href="https://support.lenovo.com/us/en/documents/pd100744">loyalty to Linux support</a>.</p><h4>3K Display</h4><p>There is so much real-estate on the screen now, but it comes with a price if you’re not careful. Text will appear tiny unless you go to the <strong>Displays</strong> menu and increase the scale for menu and title bars to 1.25 or greater. As of November 2015, the pre-installed Firefox didn’t seem to support 3K resolution well, so I switched to Chrome as my default browser.</p><h4>$HOME</h4><p>Although everything works out of the box in Ubuntu, you’re left with bloatware. I highly recommend taking a moment to reorganize the system. For a start, clean up <em>$HOME</em> so it only contains 5 folders: <em>Desktop</em>, <em>Downloads</em>, <em>src</em>, <em>bin</em>, and <em>Dropbox</em> (or install an alternative to Dropbox). Make it a habit to move pictures, videos, and documents that you’ve downloaded from the web to Dropbox or an external hard-drive over time. All personal projects and source code should exist in the <em>src</em> folder. Scripts and binaries should exist in the <em>bin</em> folder.</p><h4>Unity</h4><p>Ubuntu’s default UI needs attention and beautification. First, install the <a href="http://gamblisfx.com/how-to-install-numix-theme-and-icons-on-ubuntu-14-04-trusty-tahr/">Numix</a> icon theme. Then, from the <strong>Workspace Settings</strong> in the Unity Tweak Tool, turn on the “Workspace switcher”. Remove all the icons from the launcher except Chrome and the file manager. From the <strong>Launcher</strong> menu, turn on “Auto-hide”. <a href="http://askubuntu.com/questions/450398/how-to-remove-amazon">Remove the Amazon spyware</a>.</p><h4>Text Editor</h4><p>Install Emacs. <a href="http://melpa.org/#/getting-started">Set up MELPA</a> so you have access to the greatest Emacs packages out there. After installing, you can lose an hour just awing at all the packages by running <em>M-x package-list-packages</em>. Find some <a href="https://github.com/search?o=desc&amp;q=emacs+config&amp;s=stars&amp;type=Repositories&amp;utf8=%E2%9C%93">inspiration on GitHub</a> for how to customize Emacs.</p><h4>Terminal</h4><p>There’s nothing particularly wrong with the default bash shell. That is, until you’ve discovered <a href="https://github.com/robbyrussell/oh-my-zsh">Oh My Zsh</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*_yFxwcf3OkXb_TCJdclUBA.jpeg" /></figure><p>The git integration and auto-complete are worth the switch from bash. Moreover, you should improve the gnome-terminal tab colors <a href="http://askubuntu.com/questions/40332/how-to-make-selected-tab-in-terminal-more-prominent">with this little hack</a>.</p><h4>JDK</h4><p>It’s hard to get by without Java support. It’ll be necessary sooner or later. <a href="https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get">Install it now</a>. Some of the IDEs in the next section depend on it.</p><h4>IDE</h4><p>I’m a loyal JetBrains fan. With a student account, you can get a year’s subscription of their products for free. Install CLion for C/C++, PyCharm for Python, and IntelliJ for Java. Extract the binaries in your <em>bin</em> folder. If using zsh, open up ~/.zshrc, (otherwise if using bash, open up ~/.bashrc) and append <em>PATH=“$HOME/bin:$PATH”</em>. Now you can open these executable binaries from the terminal without needing the specify the file-path. For completeness, install MATLAB.</p><h4>SSH Key</h4><p><a href="https://help.github.com/articles/generating-ssh-keys/">Generate SSH Keys</a> for authenticating with online repositories such as GitHub or BitBucket.</p><h4>Wallpaper</h4><p>Don’t let the default purple haze stare at you all day. Change the wallpaper. Pro tip: <a href="https://www.reddit.com/r/wallpapers/top/?sort=top&amp;t=month">r/wallpapers</a>. (<a href="https://imgur.com/a/EaAmP">This caught my eye</a>).</p><h4>Image Editor</h4><p>Believe it or not, Gimp is still one of the best open source image editors out there. You will certainly need it later, might as well get it now.</p><p>That’s it for day 0!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=955b1254e3cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Underappreciated Perspective for AI]]></title>
            <link>https://medium.com/@binroot/an-underappreciated-perspective-for-ai-9e394861bf84?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e394861bf84</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Sun, 17 May 2015 00:18:58 GMT</pubDate>
            <atom:updated>2015-05-17T04:05:18.364Z</atom:updated>
            <content:encoded><![CDATA[<p>Language and intelligence share a common thread. Maybe one is a consequence of the other. Either way, scholars sincerely consider language as a prominent topic in the field of Artificial Intelligence. But there’s more to the study of language than grammar parsing, parts of speech tagging, or semantic understanding. If we carefully examine <strong>our own words</strong> used to describe observations, we can gain a key insight about intelligence.</p><p>Take for example, this excerpt from a textbook chapter on water treatment.</p><blockquote>When water containing giardia cysts is ingested, the organism senses the unique conditions in the digestive track of the host triggering it to break out of the cyst and attach itself to the intestinal wall of the host.</blockquote><p>The words used to describe the organism are <em>sense</em>, <em>break out</em>, and <em>attach</em>. The personification of cells, viruses, and even subatomic particles is widespread in most scientific scripts. If we continue reading, we can really start to appreciate the brilliance of this microscopic cell.</p><blockquote>As the organism is attached to the intestinal wall, it absorbs nutrients from the intestine while reproducing every 5 to 10 minutes generating millions of organisms in a short period of time.</blockquote><p>Abstracting away from any biological context, it almost feels like this cell has a mind of its own. One last time, let’s look at the next line of text for the grand finale.</p><blockquote>As the body finally pushes them out of the small intestine wall and they enter the lower intestine, they transform into their cyst form to protect themselves before they exit the body into the environment, and wait to be ingested by another host.</blockquote><p>This cell <em>enters</em>, <em>transforms</em>, <em>protects</em>, <em>exits</em>, and <em>waits</em>. The lively language describing the organism brings cunning intelligence to an otherwise naive brain-less cell. We can entertain the idea that something whose processes are mediated by deterministic feedback loops can appear to us as having free-will.</p><p>The giardia cyst cell clearly does not have a brain; only the <strong>environment</strong> forces the cell to act as it does. In other words, the cell is nothing more than a reflection of its environment, just like how a flow of flower petals on a stream of water is characterized solely by the stream.</p><p>This is precisely the attitude needed for designing machines with minds.</p><p>We must set aside the concept of a brain, and think predominantly about how descriptive language may bring about life. It’s unnatural to digest, but Intelligence can instead be conceived as a <strong>social construct</strong>. And thus, modeling artificial intelligence requires a deeper appreciation of anthropology than currently respected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e394861bf84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The $1.29 Hypothesis]]></title>
            <link>https://medium.com/world-of-music/the-1-29-hypothesis-82e31a6c5d2f?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/82e31a6c5d2f</guid>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Wed, 04 Jun 2014 19:17:59 GMT</pubDate>
            <atom:updated>2014-06-04T19:17:59.935Z</atom:updated>
            <content:encoded><![CDATA[<h4>Strategicaly pricing music</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*yyDa-Gk7VSdrUkY-bIrFBQ.png" /></figure><p>Ever wonder why MP3s sell for that awkward number <strong>$1.29</strong>?</p><p>There was a time when $0.99 was the norm. Throughout the years, a growing number of services, such as Google, Amazon, and Apple have taken the liberty to charge an extra 30¢ on some best selling tracks.</p><p>If we were privileged with the authority to establish an increased price for the hottest tracks, we certainly wouldn&#39;t expect to charge $1.31 or $1.26; those numbers are just too random. Psychological studies indicate that prices ending with 9 just simply sell better [<a href="http://link.springer.com/article/10.1023%2FA%3A1023581927405">1</a>,<a href="http://marketing-bulletin.massey.ac.nz/V8/MB_V8_N1_Holdershaw.pdf">2</a>,<a href="https://dspace.mit.edu/bitstream/handle/1721.1/28682/59006092.pdf?sequence=1">3</a>], leaving us with the following candidates for a new price: $1.09, $1.19, $1.29, $1.39, $1.49, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*gczktcVWaP_KKo0dX5Lnhg.jpeg" /></figure><p>Now, we can’t start charging too much for just one song.</p><p>How much is too much?</p><p>In the field of Economics, there’s something called <strong>price elasticity of demand</strong>. A close friend, Marisa, describes it as a measure of the responsiveness of consumers to increases in price. A good is really elastic if demand goes down when price goes up, and less elastic if demand doesn&#39;t go down as much.</p><p>We need to hit that sweet spot.</p><p>Apple made the first move in April 7, 2009 changing prices of the hottests tracks to $1.29 [<a href="http://articles.latimes.com/2009/mar/26/business/fi-cotown-itunes26">4</a>].</p><p>Companies were then faced with the following constraints: Prices need to end with a 9, and had to be somewhere around the tight neighborhood of $1.29. otherwise they would suffer from the effects of price elasticity.</p><p>It turns out that $1.29 is a number that pairs well with $0.99 to maximizes unused currency in popular gift card denominations such as $10 or $25.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WEKrOuZRB7GbOetl7jkEzA.jpeg" /></figure><p>Most people that purchase in bulk from iTunes, Google Play. and Amazon MP3 are those with gift cards. The focus in pricing should be to pick a number that milks the most money out of gift cards, the primary source for bulk transactions.</p><p>Let’s suppose that in a less than sufficient attempt to personalize a birthday blessing, we were handed a $10 gift card. If the hottest MP3 tracks were priced at either $1.19, $1.29, or $1.39, then we can max out the gift card in one of the following ways, assuming the only other type of songs we buy cost $0.99.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KY9UKPFYzey2QPo24XJSOA.png" /></figure><p>On average, we end up with the most amount of unused currency if hit-songs are priced at the strategic $1.29. This is true for $25 and $50 gift cards as well. In fact, $1.29 is the magic number that leaves the most amount of pennies untouched. This, compounded with the thousands of people purchasing gift cards, makes for an incredible steam of revenue.</p><p>Of course, this is merely one of the factors that goes into pricing, but check the numbers yourself to be convinced that it can’t just be a coincidence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82e31a6c5d2f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/world-of-music/the-1-29-hypothesis-82e31a6c5d2f">The $1.29 Hypothesis</a> was originally published in <a href="https://medium.com/world-of-music">Re / verb</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spoilers in Mathematics]]></title>
            <link>https://medium.com/@binroot/spoilers-in-mathematics-bc24d904dd5c?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc24d904dd5c</guid>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Sat, 26 Apr 2014 20:45:21 GMT</pubDate>
            <atom:updated>2017-05-02T03:15:00.088Z</atom:updated>
            <content:encoded><![CDATA[<h4>A good theorem is a good mystery</h4><blockquote>Mystery is an intellectual process, like in a whodunit. But suspense is essentially an emotional process. Therefore, you can only get the suspense element going by giving the audience information. — Alfred Hitchcock</blockquote><p>The journey through a good mystery is nothing short of a suspenseful intellectual experience. After introducing the main characters and some back-story, the story develops and a conflict spawns. The mystery bubbles up, perhaps there is sign of blood, or a hint of lies, leading up the an enigmatic murder.</p><p>“What could be the cause?” I try to logically piece together each event. The game is in the deduction. I enumerate through all possibilities and formulate some of my most creative conjectures — “I <em>think </em>I know…”</p><p>A good theorem should read like a good novel. If you were to open any textbook on Mathematics today, you will be welcomed with an assortment of definitions, theorems, and proofs. You will certainly notice that theorems are almost always stated before their proofs. Or, in other words, movie spoilers are revealed before the plot. <strong>Undergraduate</strong> <strong>Mathematics is the worst movie ever</strong>. It is a backwards experience. We are told the answers, and then asked to prove them.</p><p>The process of Mathematics must also be one of suspense. Axioms are the core pieces that lay the foundations of truth. They are, so the speak, the first few minutes of the movie or novel consisting of character development and setting. With this collection of facts, we obtain the tools necessary to form astounding conclusions, filling up a bank of Mathematical knowledge. Each mathematical proof is like the story described above. The axioms are thrown together in a crucible to form truths that are again used to bootstrap more interesting conclusions until perhaps the main mystery is solved. And each conclusion made using just previous knowledge is called a <strong>theorem.</strong></p><p>Mathematics deserves a revamp. The old-age pedagogical techniques have much catching up to do. How does one expect us to forge new branches of mathematics without first building an intuitive understanding, when the current state of education is much like fixed guard rails.</p><p>Working bottom-up using low-level axioms and lemmas simulates mathematical research. In the real world, we explore the unknown. Rarely are researches given a truth and told to prove it, akin to mathematical education today that emphasizes proving well-known theorems instead of developing insight into the intuition behind the theorem.</p><p><strong>Teachers, professors, and educators:</strong></p><p>Allow us to work out some of the proofs in-class by ourselves. Let us develop the intuition before we start the proof, and let the proof lead itself to the theorem. Let’s go over difficult homework problems together in class, and finish up easy-to-follow lecture notes at home. Can we have lecture videos posted online, or at least the lecture slides to follow along? Help us develop mathematical wisdom, not just mathematical knowledge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc24d904dd5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Letter to Improve CS3240]]></title>
            <link>https://medium.com/@binroot/open-letter-to-improve-cs3240-c1c8d8f11af6?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1c8d8f11af6</guid>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Tue, 20 Aug 2013 18:44:56 GMT</pubDate>
            <atom:updated>2013-09-25T14:16:18.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jfj0h5VKQZvjdWWa.jpeg" /><figcaption>Rice hall, UVA</figcaption></figure><h4>A note to the University of Virginia’s CS department</h4><p>Professor Horton,</p><p>Thank you for your refreshing attempt to take our feedback for CS 3240 (Advanced Software Development Techniques).</p><p>I’ve outlined my experience in the following topics, and I hope my input is a valuable and pedagogical insight for the course in future years.</p><h4>Unit testing</h4><p>Unit testing is prevalent and should definitely be emphasized in this course. However, a point should be made that not all engineers will necessarily write unit tests in industry. It is essential to learn the high-level details, but the implementations are usually provided by a software testing (QA) engineer.</p><p>In previous years, it seems like we neglected unit tests for our semester-long project. By making it a requirement for future semesters, it could freshen our understanding on how to use and write them.</p><h4>Test driven development (TDD)</h4><p>To be honest, the companies I’ve interned at do not incorporate this strategy. But I do see the benefits, so it should certainly be one of the core ‘Software Testing’ topics.</p><h4>Continuous Integration (CI), e.g. hudson, jenkins</h4><p>CI was used heavily during my internship at Facebook through their internal tool. Learning the low-level details about <em>hudson </em>or <em>jenkins </em>would be counterproductive since companies often use their own tools specific to their needs. Please teach this topic on a high-level.</p><h4>Code Inspections</h4><p>Code reviews were a vital day-to-day activity for software developers in all of my internships. Learning to inspect code, and learning why we do it is undeniably important. Code inspection is one of the most useful topics, and I suggest future courses delve deeper. In-class or homework exercises to review each other’s code and share feedback could really help us develop this skill.</p><h4>Code Coverage tools</h4><p>Often times, code coverage metrics are managed by the ‘Software Testing’ team. Not all programmers will use such tools. A high level description and understanding should be sufficient for the course, but the specific implementation knowledge should be saved for a separate course on software testing.</p><h4>Other testing or quality assurance techniques</h4><p>A high-level description about static analyzers and coding style should be highlighted. Every company has their own coding styles, but there are many similarities and standards:</p><ul><li>80 char line limit</li><li>method naming convention</li><li>consistent white-space usage (tabbing vs space)</li><li>SCM (git, svn, etc) commit message standards</li><li>code reusability</li></ul><h4>Configuration management, version control</h4><p>Git is the most common SCM tool for open source development. I <strong>highly</strong> recommend students at UVa to get a strong initial grasp of git, as the ideas can be easily adapted to mercurial or SVN. Microsoft’s TFS is a proprietary platform, so I would feel hesitant to favor that over any other. From my experience in industry as well as from multiple personal projects and hackathons, git has been my main method of version control.</p><h4>Use of sites that support team development (e.g. GitHub, BitBucket, etc.)</h4><p>Yes! This is the right step to bring CS 3240 back up to speed with programming today. There should also be a section on useful references such as:</p><ul><li>StackOverflow</li><li>Search engine tips and tricks</li><li>Asking questions on IRC (along with using IRC!)</li></ul><h4>The Unified Method (formerly the Rational Unified Method)</h4><p>Honestly, knowledge about the Rational Method has never helped or hindered by ability to develop good software. Teaching it for awareness is fine if it doesn’t take away time from other more relevant material.</p><h4>Agile methods</h4><p>Agile methods were often used in my internship not because someone preached about ‘The Agile Way’, but instead because the common sense approach was labeled ‘agile’. From my perspective, new teams rarely started out claiming they will use agile methods and followed it strictly from the get-go. Instead, they look back at their progress and point out “Ah, ha! Looks like we were using the Spiral Model!”</p><p>Theory of the Agile is still important because it explains why companies do what they do, but is never a part of a software engineer’s mind. I wholeheartedly agree that we should be introduced to Agile methods (I think we already are from CS 2110), but too much attention on this topic is a distraction. Programmers should not be caught up in the definition of agile; let management worry about that. The deep, detailed, and thorough theory of Agile should be taught in a business class for potential managers, not in CS 3240.</p><h4>Scrum</h4><p>To be honest, the only thing a software engineer needs to know about scrum is that it’s a quick stand-up meeting where each person in a circle quickly mentions yesterday’s work and today’s goals. Anyone can pick up scrum, so it’s unacceptable spending more than half a class on this topic.</p><p>Scrum is certainly more than that! It involves being flexible and breaking down the requirements to ever-changing stories that are a part of a sprint. But as a developer, the intricacies of scrum are meaningless since each company adapts it’s own implementation. It’s something I pick up on the first few days of an internship.</p><h4>User stories</h4><p>Stores definitely help visualize all possible ways a system is used. I recommend keeping this in the syllabus.</p><h4>Agile task and effort estimation (story points, planning poker)</h4><p>I’ve never dealt with the <em>story points</em> or<em> planning poker</em> techniques in any of my internships, which either means I am inexperienced or that companies don’t regularly use these specific techniques. If they did, it would be easy to pick up. (For example, Twitter uses the notion of small, medium, and large tasks.)</p><h4>Gantt charts</h4><p>Gantt charts are only ever used by upper-level managers. One should learn to read Gantt charts, but making them is completely optional.</p><h4>Risk Management techniques</h4><p>Too much of the risk management topic was common sense, which became awkward at times. Actively participating in the semester-wide project was enough to develop an innate understanding of risk management.Being able to define risks and issues was very worthwhile, and being able to pose ways to mitigate risk was also helpful.</p><h4>Requirements definition with use-cases</h4><p>Use-cases, scenarios, and story-boards are great! I see them used all the times in my experience. This topic should be even more emphasized.</p><h4>Requirements definition using more precise specifications</h4><p>This is very important for clear communication, but learning SCR/A7 (like we did last year) was unnecessary. Every company has their own standards on how to write specifications, and it would behoove us to design our own among our team in our semester-long project.</p><h4>UML</h4><p>UML is universally used, in my experience. More focus on this topic would be great!</p><h4>OO Design Patterns</h4><p>I would appreciate more time spent on this topic. A formal high-level presentation about the singleton (and maybe even factory) design patterns would be very useful since it’s always used in my internships.</p><h4>Write multi-threaded programs</h4><p>Yes! Concurrent programming is becoming more and more relevant as more and more CPU cores are being stuffed in one machine.</p><h4>Handling concurrent access to resources</h4><p>I definitely want to see more thorough explanations of semaphores, mutex, and monitors. Even though this is covered in depth in OS, a solid lecture on it would be better than mentioning it every so often in class.</p><h4>Development of web applications using a web-framework</h4><p>There are too many web-frameworks from which to choose. Picking one may lead the course to fall under the same trap from which we’re trying to get out. Instead, maybe a homework assignment to create a RESTful web app in a web-framework of one’s choice would be more involved and memorable.</p><h4>Basic database principles, design and use</h4><p>Please also focus on NoSQL databases! UVa needs to catch up with the new world of mongodb, redis, and all sorts of key-value dbs. A basic SQL understanding is useful, but an introduction to other database is now a necessary exposure. An insight into database security by design would also be timeless and valuable. And most importantly, an explanation of where a database fits into a design of a software system would clear up a lot of confusion.</p><h4>Development in Java</h4><p>My internships have focused mainly on Java (for Android) and C# development. Java is still highly relevant today.</p><h4>Development in Python</h4><p>Python is gaining popularity, but it’s easy enough to pick up so CS 3240 can get away with not focusing too heavily on it.</p><h4>Development in C++</h4><p>If CS 2150 is insufficient, then more exposure in CS 3240 is understandable. C++ is still one of the most used languages, and it doesn’t hurt at all to know a bit more about it.</p><h4>A few individual programming assignments in the course before the project starts</h4><p>I see this as a way to hone our programming skills and get back in the proper mindset.</p><h4>Presentation skills</h4><p>Being able to explain/speak publicly about your project is a sought after skill. In the previous 3240 class, presentations were awkward, forced, and often boring.</p><p>Professionalism is important, but being able to engage your audience (whether it’s one person or 1000) is arguably more important than adhering to outdated IBM-like standards of professionalism.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1c8d8f11af6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Talk Like a Valley Monk]]></title>
            <link>https://medium.com/@binroot/how-to-talk-like-a-valley-monk-4ba27999c418?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ba27999c418</guid>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Fri, 09 Aug 2013 22:33:08 GMT</pubDate>
            <atom:updated>2013-08-12T11:31:38.177Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*dOwNmZKS_NsN87IG.jpeg" /><figcaption>Caltrain</figcaption></figure><h4>Phrases I keep hearing in the Bay Area</h4><p>Allow me to share some phrases I <strong>frequently</strong> overhear. These aren’t necessarily unique to the Bay Area, but in my experience, I don’t hear them nearly as often back in Virginia.</p><blockquote>User churn</blockquote><p>Managers love to talk about this one. User gain and involvement is a valuable metric, but minimizing the number of users that leave your product is the other half of the battle.</p><blockquote>Are you a committer?</blockquote><p>Too many variations of this question were asked in the Cassandra Summit 2013. There’s just something unbelievably god-like about it. That label, “committer” holds one of the highest regards in the world of open source software.</p><blockquote>Just do a MapReduce</blockquote><p>I stare into their eyes waiting for a punchline as someone tells me this. But no, they’re serious. I always thought of MapReduce as an ugly monolith of theoretical code. Well it may be, but “<strong><em>just</em></strong> do a MapReduce and you’re done”.</p><blockquote>Lowest hanging fruit</blockquote><p>Sure, this is nothing new, but what really surprises me is that people really do say this. It’s not just another buzz-word entrepreneurs use to sound edgy, but more so a casual and meaningful assessment of the task ahead.</p><blockquote>Core value proposition</blockquote><p>I hate this phrase, but it’s uttered all the time. Fortunately, everyone here knows how to use it properly.</p><blockquote>Send me a diff</blockquote><p>Thinking about code as <em>diffs</em> really changes the way you write. Every change you make is scrutinized and perfected. Or <em>should</em> be.</p><blockquote>Affordance</blockquote><p>I’m not going to lie, this one is completely new to me. Wikipedia suggests the currently used definition is based off <em>afford</em> meaning “to suggest” or “to invite” in reference to designers and those in the field of HCI.</p><blockquote>Full stack engineer</blockquote><p>A few startup engineers <em>(Imgur, Snapchat) that </em>I befriended rightfully took great pride in titling themselves as masters of the full software stack.</p><blockquote>Curated</blockquote><p>This is probably the most commonly used word out of everything else in this list. There’s a great debate on whether the power should be given to the user or the service to satisfy the user. Should the product assume what the user will like (Apple), or should the user decide for him or her self?</p><blockquote>Premature optimization</blockquote><p>This is the biggest no-no emphasized around here. Don’t overly correct your code in a way that it significantly delays shipping. Zuck, in one of his Q&amp;As this Summer, really brought to attention the importance of shipping code when you’re 80% there and fixing it later. Get your code out now, that’s the hardest step.</p><blockquote>Bets</blockquote><p>Risks, challenges, and new frontiers are best known as bets. This sounds a bit more manageable and ridicules the idea of impossibility.</p><blockquote>Run an experiment</blockquote><p>Sometimes you should let the numbers make the decisions for you. Comparing effects of a change against a control group wins any argument. The scientific method prevails once again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ba27999c418" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best Jokes Have No Punchline]]></title>
            <link>https://medium.com/@binroot/the-best-jokes-have-no-punchline-5f4713a963d6?source=rss-f2ba32aa75db------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4713a963d6</guid>
            <dc:creator><![CDATA[Nishant Shukla]]></dc:creator>
            <pubDate>Wed, 10 Jul 2013 07:03:28 GMT</pubDate>
            <atom:updated>2013-07-10T19:46:30.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/683/0*RnLEdEPnfQPURu0v.jpeg" /><figcaption>© ok.nice.supernice</figcaption></figure><p>Too many times I see people breathless with ecstatic eyes talking about pioneering the Next Big Thing™. Too few times do they actually follow up. The first step is not the hardest - the <strong>last </strong>is. It’s the least well-defined, and causes dreams to crumble. But if you maneuver carefully between ambiguity and indifference - that is to say, if you’re primarily preoccupied by the intrinsic rapture of coding and discovery, then the future welcomes you to institute a new frontier.</p><p>Earlier this year, two good friends and I competed in PennApps, a well-known 48-hour Hackathon in the East Coast. Last year we made <a href="http://www.youtube.com/watch?v=B0mrXYYInT4">BattSignal</a>, winning <a href="http://blog.pennapps.com/post/31797542186/pennapps-winners">Bay Area Favorite</a> , but this time we wanted to make something purely for the fun of hacking. A <strong>joke</strong>, essentially.</p><p>So we crafted <a href="http://snapgraph.me/">Snapgraph</a>, a way to visualize your juicy Snapchat social network. Snapchat has no API, but that didn’t stop us. We scraped their site to find any user’s top three friends, and made an interactive graph out of these social relationships. Now, a little perspective: at that time Snapchat was still a silly juvenile app that not many knew about <em>(I make no remarks on its current standing).</em></p><p>Realize, we exploited this back in January, way before it went viral [<a href="http://www.dailydot.com/news/snapchat-update-best-friends-public/">1</a>][<a href="http://www.huffingtonpost.com/ben-kosinski/you-snap-chatwith-who_b_3434723.html">2</a>][<a href="http://www.nbcnews.com/id/52125391/ns/technology_and_science-tech_and_gadgets/t/snapchat-outs-users-top-friends/#.Udzmsxor1No">3</a>]. I like to brag that in a sense, Snapgraph was ahead of it’s time. We taught ourselves how to <a href="https://github.com/Jasdev/snapgraph/wiki/Documentation">design our own API</a>, and got our hands dirty with node.js and mongodb. We started with mapping ourselves, then expanding out to our top friends, and so on until we saw interesting relationships. We kept automatically growing our database.</p><p>It was a hack with no closure, no purpose, nothing but a product of a joke. <em>The best type of hack.</em></p><p>Fast forward to June 23rd when we competed in San Francisco’s API Hackday, and continued this joke to an unprecedented level. A friend spent an afternoon tinkering with the Snapchat app, discovering a way to <strong>programmatically </strong>send snaps to any specified user.</p><p>With that in mind, we curiously checked back on our Snapgraph database. “Huh, db shows <strong>42,000 </strong>usernames.”</p><p>You can probably guess what was about to unfold here. The situation was begging for it. You would do the same if you were us. The opportunity was too perfect.</p><p>We sent <strong>everyone </strong>a video using the hack we just discovered.</p><p>The video asked them to smile back to enter in a photo contest. With over 2.5k replies, we built a social contest powered by snaps, won <a href="https://twitter.com/mansillaDEV/status/349009412184211457">3rd place</a>, and literally made thousands of people smile. At first we had no idea what to do with this new-found superpower. The joke already outlived itself, though we’ve yet to hear the punch line.</p><p>Snapchat noticed our post on Hacker News and kindly asked us to stop. <em>Alright</em>, so we did. This was more of a tribute than anything, and I think they appreciated our intrinsic passion of tinkering for the pure fun of it. They generously invited us over to meet the team. <strong><em>Yess!</em></strong></p><p>A hacker juggles 4-7 personal projects at any given time. While some may ultimately dwindle,the ones that succeed make up for more than double the losses. Failing fast and failing often is an indispensable skill, for it clears up time to work on projects that may unexpectedly triumph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*PIq6uuqAUr8VCAQN.jpeg" /><figcaption>The youth of Computer Science is the greatest asset you and I possess.</figcaption></figure><p>We’re at a point where a decentralized mesh-net could rightfully supersede the internet. And within a blink of time, the evolution of the CPU might transcend to a non-Von Neumann neural emulation. The future of mobile may lie in elegantly tangled nanocomputers. Code will learn to fix, improve, and analyze itself.</p><p>Stop wondering, and start programming.</p><p>Thinkers glimmer. Hackers glow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4713a963d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>