<?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 Alex Davis on Medium]]></title>
        <description><![CDATA[Stories by Alex Davis on Medium]]></description>
        <link>https://medium.com/@alexdavis_70639?source=rss-ae10adddf4e4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*k3dYWsdeviekFujs.</url>
            <title>Stories by Alex Davis on Medium</title>
            <link>https://medium.com/@alexdavis_70639?source=rss-ae10adddf4e4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:55:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexdavis_70639/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[Models and Views and Controllers Oh my!]]></title>
            <link>https://medium.com/@alexdavis_70639/models-and-views-and-controllers-oh-my-6dd3b2d32ff4?source=rss-ae10adddf4e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dd3b2d32ff4</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Alex Davis]]></dc:creator>
            <pubDate>Tue, 09 May 2017 20:19:27 GMT</pubDate>
            <atom:updated>2017-05-09T20:19:27.892Z</atom:updated>
            <content:encoded><![CDATA[<p>Acronyms. Everyone loves them! They are an amazing mnemonic that help’s us remember large or complicated things. They can be quite catchy at times too! But there are (roughly) a million acronyms out there and sometimes they can get confusing depending on what context you are in. The problem is that the same acronym can have different meanings depending on the context in which they are used!</p><p>Today we will be reviewing two acronyms in relation to their use in the computer science field, specifically when it comes to software architecture. First up is the Model-View-Controller, or fondly referred to as “MVC” by some, is a software architecture pattern for implementing user interfaces on computers.</p><p>The model component corresponds with the logic the user works with that is data-related. This can be data being transferred between the other components (views and controllers) or any business logic-related data. One would use models to retrieve customer/user information, manipulate said information and update it in the database.</p><p>The view component is used for the UI logic (another acronym meaning User Interface). This includes all the things a user might see or interact with such as text boxers, drop boxes and menus.</p><p>Controllers act as the middle man (or woman) between the previous two components. Meaning that the controller will handle the interactions and inputs from the View and update the database using the appropriate Model. I like to think of the controller as the pilot, the views as the instruments that relay crucial flight data, and the model is the aircraft controls. Together, they all work together so the aircraft (or whatever craft you want to imagine) can get to it’s destination. The metaphor breaks down at some point, but it’s an enjoyable mental picture that helps me to visualize what’s going on behind the scenes.</p><p>The second acronym that we will explore today is MVVM. Standing for Model-View-View Model, MVVM is similar to our previous acronym but has some dissimilarities as well. The view is responsible for defining the structure, layout and appearance of what a user might see on the screen. A view gets data from its view model through bindings or invoking methods on the view model.</p><p>The model in MVVM is an implementation of the application’s domain model that includes a data model along with business and validation logic. Examples of model objects include repositories, business objects, data transfer objects (DTOs), Plain Old CLR Objects (POCOs), and generated entity and proxy objects.</p><p>The view model acts as an intermediary between the view and the model, and is responsible for handling the view logic. Typically, the view model interacts with the model by invoking methods in the model classes. The view model then provides data from the model in a form that the view can easily use. The view model retrieves data from the model and then makes the data available to the view, and may reformat the data in some way that makes it simpler for the view to handle. The view model also provides implementations of commands that a user of the application initiates in the view.</p><p>Again, the pilot and the air/space/water craft metaphor can apply to this software architecture as well. But the roles are just switched up a bit. If you are asking yourself which one is better, then I would tell you to consult your magic 8 ball for more answers. They are both tools that do something similar but slightly different. So explore which one you personally like the best.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dd3b2d32ff4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The many faces of PostgreSQL data]]></title>
            <link>https://medium.com/@alexdavis_70639/the-many-faces-of-postgresql-data-2d52fd05edb6?source=rss-ae10adddf4e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d52fd05edb6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Alex Davis]]></dc:creator>
            <pubDate>Thu, 27 Apr 2017 20:09:52 GMT</pubDate>
            <atom:updated>2017-04-27T20:09:52.814Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with a PostgreSQL database, there are many datatypes. If you are new to working with so many different data options, one might feel overwhelmed. Fear not! Here is a quick and easy tour on the different PostgreSQL datatypes.</p><h3><strong>Let’s start with numbers!</strong></h3><p>There are many different ways to input numbers into your database, so how do you know which type of data is the best? Typically, using the <strong><em>integer </em></strong>datatype is sufficient, being able to hold any number from -2,147,483,648 to +2,147,483,647! However, if you want to limit how large the input can be, one could use <strong><em>smallint</em></strong>, which can only hold a number between <br>-32,768 and +32,767. If you need to go to the opposite end of the spectrum, bigint can be used to hold a number between -9,223,372,036,854,775,808 and +9,223,372,036,854,775,808!</p><p>For numbers with decimals, one could use the <strong><em>decimal</em></strong> datatype (go figure). There are many subcategories of the decimal type, like the <strong><em>real</em></strong> datatype that can only hold up to 6 decimals places and <strong><em>double precision</em></strong> that can hold 12. But the decimal datatype allows you to specify how many digit places you want (up to 131072 digits) so knowing all the fancy ways to do the same thing might impress that cute co-worker you are trying to talk to, but probably not your senior developer who has to look at your code.</p><p>Autoincrementing datatypes are great for giving every entry a unique distinction, so using the <strong><em>serial</em></strong> datatype is quite common when giving an id to tables ( as long as you don’t exceed the maximum of 2,147,483,647). However, much like the integers, if you want to limit or expand the autoincrementing min/max, <strong><em>smallserial</em></strong> will limit you to 32,767 and <strong><em>bigserial</em></strong> will give you 9,223,372,036,854,775,808 numbers to work with!</p><h3>So many Characters!</h3><p>Allowing characters or plain text is much more straight forward than numerical inputs. There is the <strong><em>character varying</em></strong> (n) <strong><em>datatype</em></strong> which can be shortened to <strong><em>varchar</em></strong>(n). Inputting an (n) value will limit the amount of characters allowed in the field. However, using the <strong><em>text</em></strong> datatype has no such restrictions, so it is useful if you have a lot of text that needs to be stored.</p><h3>Dates and Times</h3><p><strong><em>Timestamp </em></strong>is great to denote the time that something is created or completed dynamically. Typically displayed as ‘YYYY-MM-DD HH:MM:SS’, <strong><em>timestamp</em></strong> by default does not include the timezone. If the timezone is needed, use <strong><em>timestamp with timezone. </em></strong>If only a specific date is needed, use <strong><em>date</em></strong>, and if a specific time is needed use <strong><em>time. </em></strong>As with timezone, one can request the <strong><em>time</em></strong> with or without the timezone.</p><h3>Use the right tool for the job!</h3><p>When creating tables, make sure to use the most appropriate datatype for your purposes. Giving too much freedom may allow for unforseen problems. For instance, a <strong><em>text</em></strong> datatype has unlimited length, so the entire dictionary could be inputted and there would be a completely valid entry. However, setting too small of a limit could cause problems down the road. If you use a <strong><em>smallserial </em></strong>might look fancy, but may also limit the length of your database. It may be impossible for you to create 33,000 users for your app and therefore cap your growth. So resist the temptation to get fancy with your database without a reason why. Make life for your senior developer easy and he will usually do the same for you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d52fd05edb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The other day I was fortunate enough to run into my favorite five year old cousin Eli at a family…]]></title>
            <link>https://medium.com/@alexdavis_70639/eli5-oop-b87f693237b6?source=rss-ae10adddf4e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b87f693237b6</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Alex Davis]]></dc:creator>
            <pubDate>Thu, 23 Mar 2017 20:07:33 GMT</pubDate>
            <atom:updated>2017-03-23T20:08:15.303Z</atom:updated>
            <content:encoded><![CDATA[<p>The other day I was fortunate enough to run into my favorite five year old cousin Eli at a family get together. He is a curious young boy who always loves asking me a million questions about everything. This time around I took the initiative away from Eli and asked what he was studying in school. He told me told me all about his Kindergarten class and how hard it was to spell his name. But then before I knew it, he fired my question right back at me. “What are you learning in school Uncle Alex?”</p><p>“Oop!” I responded! “We are learning about Oop!”</p><p>“You are learning about POOP?” Eli shouted, overly excited about his seemingly favorite topic.</p><p>“Not POOP! OOP! It stands for Object Oriented Programming!”</p><p>“Wassat?” he asked with a curious look in his eye.</p><p>“Well…let me explain in small words you will understand.” I said. The banter hit it’s mark as frustration and irritation washed over Eli’s face. “In object oriented programming, JavaScript wizards like myself create ‘objects’. These objects do a very simple thing, but they do them really well. Then we combine a bunch of these smaller objects to make a great big complex object called an ‘application’ that does something super awesome!”</p><p>“Wow! So it’s just like the Power Rangers!” Eli shouted, even more excited about the current topic than he was about poop.</p><p>“Wat?” I snapped at him, slightly confused? “How?”</p><p>“Power rangers fight the small bad guys when they are people sized! But when the bad guys get bigger, they call their ZORDS! They get giant robot dinosaurs to fight the bigger bad guys and do awesome stuff!”</p><p>“Exactly!” I said, trying to remember back to the days where I was a 5 year old who watched power rangers. “And what happens when they have to fight an even BIGGER bad guy?!”</p><p>“They all come together and form the MEGAZORD!” Eli shouted as he jumped into what I can only assume was his version of the Megazord stance. A wave of nostalgia washed over me as this metaphoric explanation surprisingly made a lot of sense!</p><p>“Yeah! What does the Megazord look like?”</p><p>“It looks like a giant robot that is made of other robots! The left arm looks like the elephant robot and the legs looks like the other two dinosaurs!” Eli was really into the discussion at this point. I could tell that he was more machine than boy at this point, at least he imagined he was as he stomped around an imaginary city fighting the imaginary bad guys. His infectious enthusiasm had already began to creep up on me.</p><p>“That’s something we call…Inheritance! When the bigger zord gets attributes of the smaller zords!”</p><p>“Attributes? Inheritance? Wassat?” Eli seemed to wake from his daydream upon hearing these foreign words. He stopped his imaginary crusade against evil and stared at me blankly.</p><p>“Hmm…let me put it another way. When the Megazord is created, the smaller parts will pass on a part of themselves to the bigger part. That is why the bigger parts might look and feel like the smaller parts that make them!”</p><p>“Oooohhh.” Eli said, slowly starting to put the pieces together.</p><p>“There are two types of inheritance that I am learning about. Prototypical Inheritance and Classical Inheritance! Both are ways to create bigger things! Classical is like creating something with legos! You can make anything out of legos, but you don’t have much control around what the lego itself does. Prototypical inheritance gives you more control over the individual pieces! So its more like you are making something out of play doh! Does that make any sense?”</p><p>“Almost…”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b87f693237b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rebooting one’s computer can often be the easiest way to fix an issue.]]></title>
            <link>https://medium.com/@alexdavis_70639/rebooting-ones-computer-can-often-be-the-easiest-way-to-fix-an-issue-d7773abda34e?source=rss-ae10adddf4e4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7773abda34e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Alex Davis]]></dc:creator>
            <pubDate>Mon, 20 Mar 2017 20:03:22 GMT</pubDate>
            <atom:updated>2017-03-20T20:03:22.195Z</atom:updated>
            <content:encoded><![CDATA[<p>Rebooting one’s computer can often be the easiest way to fix an issue. It’s the first thing that the tech support guy will tell you to do when you call regarding your blue screen of death. It’s a way to start over anew and try to avoid the mistakes that got you stuck in the first place. But it wasn’t my computer but my life that was frozen, stuck in an infinite loop, unable to move forward. Rebooting my computer is easy, but how does one reboot their life? That is exactly what DevLeague is to me, a soft reset.</p><p>Years of working customer service has gotten me nowhere in life. I was in a loop of low paying jobs that lead nowhere and were unfulfilling. I felt like my potential and my skills were never utilized and I was never challenged in any meaningful way. Much like a hamster on a wheel, there is a lot of motion, but I wasn’t going anywhere. Every attempt to escape the cycle landed me in the same cycle. I had to do something radically different, and fast!</p><p>What was I to do? College would take years of studying for any sort of result that I desired. Maybe in my early 20’s I would have considered it, but I wanted a quicker turn around that would thrust me into a new direction in life. That is when a friend introduced me to DevLeague. It was everything I was hoping for and it was right in my back yard of Honolulu, Hawaii!</p><p>DevLeague is an intense program that lasted 12 weeks and would give me the skills to succeed in a new career. I grew up with computers and feel at home in front of a computer screen, but I hadn’t the faintest idea what code was or did. I was more than intimidated, thinking that only super geniuses could practice the high tech wizardry known as coding. Luckily DevLeague had a prep-course that helped me with all the basics and was an invaluable help to completing the entrance exam/project that DevLeague requires of any applicant.</p><p>Now, one week into DevLeague, I am 1/12 or 8.25% done with the course. It doesn’t sound like much, but this past week has been an amazing roller coaster ride! “Drinking from a fire hose” is an apt description for how I felt the first few days. The hardest thing about the first week was staying positive. Doubt plays havoc with your confidence as thoughts of quitting and throwing in the towel start to creep into your mind. “Ego-less” programming says that “you are not your code”, meaning don’t take it personally when receiving criticism. My best piece of advice is to give yourself a lot of grace. No one is great at anything they do for the first time, that only happens in the movies. IRL (In Real Life), you are going to suck, and that’s okay! The learning process is about figuring how to NOT suck (or suck less)!</p><p>Just stick with it! Because when your code works, and your program actually functions like you want it to, it’s a high all of its own! I enjoyed struggling through every new lesson with my peers and was genuinely excited when everyone started to excel! You will realize that you don’t have to be a savant to code, you don’t even have to have a Ph.D! You can do it if you have the passion to learn and the passion to improve!</p><p>I am excited thinking about how DevLeague is helping me to chase after the life and career that I always wanted. What’s even more exciting is that ANYONE can do it! So if you want a faster way to get into the Tech industry than college, DevLeague is an amazing option for you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7773abda34e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>