<?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 Alexander Anich on Medium]]></title>
        <description><![CDATA[Stories by Alexander Anich on Medium]]></description>
        <link>https://medium.com/@alexander.anich?source=rss-21ad72927709------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aYtqIAyB5qTMR5PKXZd88A.jpeg</url>
            <title>Stories by Alexander Anich on Medium</title>
            <link>https://medium.com/@alexander.anich?source=rss-21ad72927709------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:01:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexander.anich/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[First Look : SQL & SQL Data Types]]></title>
            <link>https://medium.com/@alexander.anich/first-look-sql-sql-data-types-ea817809d478?source=rss-21ad72927709------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea817809d478</guid>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[data-type]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Alexander Anich]]></dc:creator>
            <pubDate>Fri, 23 Oct 2015 20:16:21 GMT</pubDate>
            <atom:updated>2015-10-23T20:16:21.172Z</atom:updated>
            <content:encoded><![CDATA[<p>Data. Our world, especially concerning technology, revolves around data. Information about our world is a never-ending torrent, and every piece carries importance or significance to someone. How we store and retrieve data is such a enormous topic, and while it is overwhelming to take in, is very valuable to know as a developer — even at a basic level.</p><p>SQL stands for Structured Query Language, which is a special-purpose programming language for interacting with a RDBMS (relational database management system) which is a strictly-formed way to store data. Since data is so important, it is also very important that we do not mutate or destroy our data accidentally. Our database has to have integrity, so we can rely on the data we have. Could you imagine if pilots were passed incorrect coordinates? Or if a GPS guided system took you to the wrong location? The outcomes would be catastrophic. SQL maintains the integrity of our database with strict queries.</p><p>A part of the strict queries are strong types. This means that when a table is created in our database, we have to define the types of data we expect to be stored when we insert them later. A few commonly used data types include: integer, character varying, boolean, date and monetary. Its pretty clear to see why a few of these are commonly used — we don’t expect a USER_ID field to be a type of date or monetary type. Character varying and boolean might not be as obvious.</p><p><strong>Character varying (n)</strong>: takes in a text value that has a maximum character limit of n — this is great for usernames, emails or descriptions.</p><p><strong>Boolean</strong>: takes in a true or false value, which is useful for things like deactivating an account or removing a user from an email list.</p><p>There are more data types native to basic SQL, but vendors like PostgreSQL give us more options. PostgreSQL is an awesome open source database system that utilizes native SQL and empowers developers with more options for queries and data types. A few PostgreSQL data types include: serial, json and tsquery. These data types are hugely powerful, especially for today’s massive amount of consumers and website users.</p><p><strong>Serial</strong>: ‘serial’ is an integer data type that is mainly used for identifying the specific row in a table. It is mainly used on the Primary Key of a table so we can join or have our data be referenced by other table.</p><p><strong>JSON</strong>: As a web developer, having an ability to store ‘json’ as a datatype makes it easier and more seamless to integrate an SQL database into a Javascript or Node.js project.</p><p><strong>TSQuery</strong>: The ‘tsquery’ data type can store text search queries, which can useful for caching things people search for to save on server resources.</p><p>Even a shallow look into SQL and RDBMSs can be daunting, but it drives so much of our industry that it simply cannot be overlooked. All information carries importance, and to handle all different types of information we have specific data types. SQL databases are about reliability, and data types are one way to enforce that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea817809d478" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gintros Ritgohalms]]></title>
            <link>https://medium.com/@alexander.anich/gintros-ritgohalms-e926590ac5bd?source=rss-21ad72927709------2</link>
            <guid isPermaLink="false">https://medium.com/p/e926590ac5bd</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[born-in-the-right-time]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alexander Anich]]></dc:creator>
            <pubDate>Tue, 29 Sep 2015 19:41:20 GMT</pubDate>
            <atom:updated>2015-09-29T21:02:42.193Z</atom:updated>
            <content:encoded><![CDATA[<p>Perhaps you were pondering the title of this post. Most likely not, but I’m going to explain it anyways — its an anagram for the crazy, crazy world of sorting algorithms. An anagram isn’t the best analogy for sorting, because the string values would not be in that particular order, but an evil-wizard-like name sounds more formidable than 1234567. Which brings me to my point — formidable.</p><p>Before my experience with implementing specific algorithms, sorting was a breeze. Just wave the magic wand, call the sort method, and presto! You’ve got yourself a useless sorted array. But just like everything in life, magic in any kind of form doesn’t exist (yes, that’s right kids, Santa Claus is as fake as your parents love) and a fundamental understanding of how magic really happens is as important as it is painful. JavaScript frameworks, JavaScript libraries, hell, even JavaScript itself is built on work already done. Though it may seem arbitrary to learn the hard way of sorting, its’ fleeting sense of accomplishment and appreciation for the work of others gives just enough justification to actually do it.</p><p>In actuality, behind my snarky remarks, there is great value in truly understanding algorithms — not that I truly grok it, I understand them well enough. Attempting to implement the formidable sorting methods gave me a taste of the work and complexity that are used to operate such staple parts of the JavaScript language. Behind our simple Array.prototype.sort method, lies a performance-optimized variation of a sorting algorithm that took work and time to develop. Beyond that, for every language method, library and framework there lies a huge amount of time and bloody-tears baked into solving complex problems that empower our generation of developers with easy-to-use implementation.</p><p>I’m grateful. And blessed. After sorting the hard way, I feel two things for my developer ancestors — appreciation, and pity. Pity for those poor, poor bastards who had no choice but to do it the hard way. As a part of learning, I made some quick visualizations of a few sorting algorithms hosted here <a href="http://anichale.github.io/sorting-algorithms/">http://anichale.github.io/sorting-algorithms/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e926590ac5bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contextual]]></title>
            <link>https://medium.com/@alexander.anich/contextual-baf2e83479d3?source=rss-21ad72927709------2</link>
            <guid isPermaLink="false">https://medium.com/p/baf2e83479d3</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[context]]></category>
            <dc:creator><![CDATA[Alexander Anich]]></dc:creator>
            <pubDate>Sat, 05 Sep 2015 22:27:43 GMT</pubDate>
            <atom:updated>2015-09-05T22:27:43.109Z</atom:updated>
            <content:encoded><![CDATA[<p>This is contextual to javascript. But ‘this’ is context in javascript. Used as a referential pointer to objects, it can be very hand to reuse code without mutating the objects it is referencing. Means’ don’t f**k wid this.</p><h4>Methods</h4><p>There are a few function.prototype methods that can be extremely useful to illustrate this point:</p><p>in all cases ‘<em>this</em>’ is the object that the function wants to attach to.</p><p>function.prototype.<strong>apply</strong>(<em>this,[argsArray]</em>);</p><p><em>arguments: this, an array of arguments for the function</em></p><p>function.prototype.<strong>call</strong>(<em>this,[arg1[, arg2[, …argN]],]</em>);</p><p><em>arguments: this, any number of arguments for the function</em></p><p>function.prototype.<strong>bind</strong>(<em>this[, arg1[, arg2[, …]]]</em>);</p><p><em>arguments: this, number of arguments for the object</em></p><h4>Examples</h4><p>Say we have an two objects, cherry and blueberry. Both with the property delicious set to true and individual color properties.</p><p><em>var cherry = { delicious : true, color : ‘red’ };</em></p><p><em>var blueberry = { delicious : true, color : ‘blue’ };</em></p><p>Now we have some related functions.</p><p><em>function isDelicious () { return </em><strong><em>this</em></strong><em>.delicous };</em></p><p><em>function getColor () { return this.color };</em></p><p><em>function dirtyTouch () { console.log(‘ew’); };</em></p><p>Now, there are two different ways we can call these functions, we can give the object a new property and assign it to the pointer of the function,</p><p><em>cherry.dirty = dirtyTouch;</em></p><p>and we can now invoke the function.</p><p><em>cherry.dirty();</em></p><p><em>// ‘ew’</em></p><p>The other way is to use the apply, call or bind functions and give the objects we want to call the functions on as context,</p><p><em>getColor.apply(blueberry); // returns blue;</em></p><p><em>isDelicious.call(blueberry); // returns true;</em></p><p>So what’s the difference?</p><p>As far as the result is concerned, nothing. However, the object is a different story.</p><p>Since we assigned the function dirtyTouch to the property dirty on cherry, it will forever have this new property. We used getColor .apply() and isDelicious.call() on blueberry however, but it still only has the two properties delicious and color. If you want to keep your fruit objects nice and clean but still use functions on them, the context methods apply, call and bind are very awesome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baf2e83479d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Closure]]></title>
            <link>https://medium.com/@alexander.anich/closure-f44da0eccdc3?source=rss-21ad72927709------2</link>
            <guid isPermaLink="false">https://medium.com/p/f44da0eccdc3</guid>
            <category><![CDATA[closure]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Alexander Anich]]></dc:creator>
            <pubDate>Fri, 04 Sep 2015 19:41:58 GMT</pubDate>
            <atom:updated>2015-09-09T19:02:48.022Z</atom:updated>
            <content:encoded><![CDATA[<p>Closure works a lot like a house and people are like variables. You don’t want everyone in the world to be out in the open, they wouldn’t get along and there wouldn’t be any privacy. A closure is like a house that can be any size — it can hold any amount of people within — and all of the people inside can do whatever they want without bothering other people. Privacy of the people is super important!</p><p>Another great thing about closure, is that if some of the people inside want to stay inside the house, and others want to leave, it is totally acceptable! You just have to make sure that the house has doors and that the people have keys to get inside.</p><p>Houses contain designs which can or cannot be copied, it is usually decided by the architect who made the house. They can have lots of people, or no one at all. They can also have no doors, but that would be cruel to the people inside. If doors are removed, the people inside enter hyperbolic chambers and can be revived if they need to be talked to again. Keys are made specifically so that we can greet the people inside. All-in-all, houses are a great way to keep the world organized and keep people happy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f44da0eccdc3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>