<?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 Gareth David on Medium]]></title>
        <description><![CDATA[Stories by Gareth David on Medium]]></description>
        <link>https://medium.com/@garethdavid.za?source=rss-d83651670505------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZCndikNlD7uWe9z9Ss49XA.jpeg</url>
            <title>Stories by Gareth David on Medium</title>
            <link>https://medium.com/@garethdavid.za?source=rss-d83651670505------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 01:49:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@garethdavid.za/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[Changing Lives Through Insignificance]]></title>
            <link>https://medium.com/@garethdavid.za/changing-lives-through-insignificance-d3aeccbffc5f?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3aeccbffc5f</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[mental-health]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Thu, 27 Mar 2025 21:15:03 GMT</pubDate>
            <atom:updated>2025-03-27T21:15:03.331Z</atom:updated>
            <content:encoded><![CDATA[<p>This is just a thought that has been running in my head for some time. It’s nothing new, revolutionary, innovative or evolutionary for that matter. It’s a simple idea of a kind act, even if it is insignificant to yourself, can make a extensive positive difference to somebody else’s life.</p><p>More than two decades ago I got my post graduate degree. I was humble, ambitious and thinking anything is possible and still do within reason. Especially considering how hard it was to have had and earned the privilege to go study after school while working hard throughout to pay for the studies. We couldn’t afford a loan to pay the studies and grants weren’t coming my due to government regulations claiming die to the colour of my skin, I don’t qualify. My goals were to make a positive change to the world.</p><h3>Starting my professional career</h3><p>While studying, I did good enough to become an assistant lecturer, and outside of the university did projects by building software for a defence technology company that helped manage their projects. I also got recommend by the university to be used to train some employees at a defence technology research institute on how to program in C++. Soon after, I got an offer for a well paying career at an international petrochemicals company with projects around the world. The local office of the company and the people were great and being young and ambitious, I wanted to impress.</p><p>The company rewarded me with good salary increases, trust and bigger responsibilities. During this time, about three to four years, the humbleness started to fade, ego began to flourish and the thought of being unstoppable started to reign. I was being trained to possibly become the head or lead for the African region. Although the ambitions were there, my goals were more for myself and using the idea of wanting to change the world and improve the lives of others.</p><h3>Negative change and building the future</h3><p>During this time, I helped discover some inter-company billings which we probably weren’t suppose to know of (an ethical issue rather than legal) and through company red tape our whole team was made redundant. I suspect it’s not something they like people asking questions about. In essence, this ended my career at the company and consequently ended the career of most of my colleagues. They just wanted sceleton staff to simply do what the group head office tells them to do.</p><p>This act of suddenly being made redundant and getting retrenched, was not a great experience. It did however bring me back to reality to some extent. I say to some extent because I still had a bit of cockiness in the form of confidence in me and had financial buffers in place to protect me.</p><p>When you’re young, you are still learning and more often than not, think you can do anything and take anybody on. You bump heads, step on toes and usually do so without meaning and with consequences that you do not realise does not only affect yourself.</p><p>After the retrenchment, I was forced to find another means of survival. With some friends, we started a company, with the ambitious and confident attitude that we will succeed.</p><p>Looking at it now, confidence can only get you so far and we didn’t have a proper plan, didn’t know what would set us apart from the rest of the market and in a way didn’t entirely know what we were doing or how we were going to do it. We did however have many ideas. Because we didn’t properly plan, most of those ideas never realized.</p><p>Our venture started out rough, we managed to create some form of income to survive. Without following the normal route of getting funding as we wanted to have full control of our ideas and wanted to prove we did it our way. In time, through reputation with clients and from previous colleagues we earned more stable contracts which added stability and a chance to breath after to constant chaos over the last couple of years. We thought we could relax a bit, but this was one of our biggest fault. The second one is trusting your gut when it comes to people.</p><p>In this time of stability we should’ve pushed on, to secure our future. We started without a proper plan, and we continued this way, we didn’t secure our future. In retrospect, we needed to use this time and financial stability to plan ahead.</p><h3>Downward spiral</h3><p>With economic circumstances changing in the country, we lost some contracts due to stricter governmental regulatory policies which required us to have a different skin colour that was disguised as creating balance for “historic injustices”. Yes, let’s balance racism with more or reversed racism. Some clients had to downscale such as one that was struck by an armed robbery and insurance not wanting to pay out the full amount they lost along with others problems other clients were experiencing.</p><p>We ended building up personal debt while trying to pretend we will make it. You can almost think it’s a fake it till you make it mindset. Out of desperation we made relationships with people who had lots of empty promises. Being blinded by desperation and ignoring my gut feeling, we didn’t see this at first, but it became glaringly obvious when our income was getting even less. These people starting to take work from us by using us to get in front on clients then start engaging with them behind our backs while taking the ideas and plans we proposed for projects.</p><p>With these emotional ups and downs, one learns who your friends are and how most if not everybody is fighting their way through life in order to survive. Some just more unethical than others.</p><p>We were forced to stop and liquidate our venture as we had so much personal debt and things weren’t getting better. It wasn’t an easy choice to make, but we had to make it. With our venture closed, the people who took the work from us, couldn’t actually do the work and wanted us to help them. We refused, because we weren’t in business anymore and secondly, why would you want to help the hand who chopped off your hands?</p><p>Personally, I had to sell my car, couldn’t afford my own place, didn’t really have money for food and even the most of the clothes I had on me was given to me by somebody else. This time there were no financial buffer with lots of debt and the banks wanting their money. Me and my life partner had to stay with my parents (who thankfully could provide some help at the time). Needless to say, I’m still paying off the debt after 10 years.</p><p>Now this is a fairly short summary of my life experiences, and for the purpose of this story I’m not going to elaborate any more on as that is a whole story on it’s own.</p><p>From this, getting a new job opportunity and working from nothing, you realize the value of getting even the smallest rewards for working hard.</p><h3>Leadership and moving towards being enlightened</h3><p>Recently we have been way more fortunate, making a success of myself again, including my life partner building her own career. We have been fortunate enough to afford the occasional date nights to go out and have meal at restaurants along with raising two beautiful girls. This got me thinking about the waiters and waitresses who serve you at restaurants.</p><p>Having worked as a waiter in the past, albeit temporarily, I have come to realize how difficult it can be for waiters and waitresses to survive on the little scraps most people give them given most of then earn a salary based on tips. From experience, with waiting tables, you struggle to earn much. Generally in our country if a waiter did a decent to great job they’ll be lucky if they get a 10% tip. This is all they get, after running around, working hard and forcing a smile at times. In a lot of cases this up to 10% can’t even buy yourself a meal, never mind thinking of feeding your family.</p><p>I do not entirely agree with the tip system as a form of salary, but it’s the current reality. I’d much rather have waiters or waitresses get a basic salary with tips being something like a performance bonus.</p><p>What I’ve started doing is giving a minimum of 10%, even if the waiter or waitress was not great. They still worked and it’s better than begging.</p><p>As for the rest, generally most waiters or waitresses do a decent job and prefer to give double to the norm. Our general norm is between 20 to 30%.</p><p>We usually do the in the form of a game by asking them to pick a number between 1 and 20. If they choose ten or less, we add the number to 20% and for above ten, the number plus 10%. If they were really great, we might even up the base percentage to 30 and 20% respectively. So it may end up as something like them choosing 7 and we say something like: “So that means, we’ll give you a 20 + 7 % tip”. We are yet to see a negative reaction from the game.</p><p>It might seem like a significant increase to some, but relative to what we earn, it’s more insignificant when we go out to eat something on a special occasion. This insignificance can in some cases mean that waiter or waitresses can afford to buy their family food for the coming day(s).</p><p>We’ve had some that even started crying and asked to give us a hug because we don’t know how much they appreciate it or what it means to them. Some said now they can afford to travel to see their family again which they haven’t seen in years, get their children school clothes or pay for medicine.</p><p>In other areas, I’ve started giving away 10% of my annual performance bonus and distributing it to my team members at the office. They don’t know I do this, but the little bump in their own bonus is definitely appreciated when we provide them with the numbers.</p><h3>Insignificant acts can change someone’s world</h3><p>These insignificant or small acts, tends to creates a brief moment of happiness in somebody else’s life. You don’t always know what someone else is experiencing, their challenges, objectives or needs.</p><p>Personally, even if you only help one deserving person at a time, you are changing the world. I believe we should never underestimate the butterfly effect or chain reaction you can create which ultimately could reduce the difficulties others are experiencing or enhance the happiness in the lives of others around you.</p><p>You don’t need some grand plan to change the world, you can use something insignificant in your own life but it’s valuable to others to make improvements and change the world around you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3aeccbffc5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Does Medium describe a subscription as an upgrade?]]></title>
            <link>https://medium.com/@garethdavid.za/does-medium-describe-a-subscription-as-an-upgrade-9a2e43f8572d?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a2e43f8572d</guid>
            <category><![CDATA[subscription]]></category>
            <category><![CDATA[decentralized]]></category>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Wed, 03 Jan 2018 08:22:29 GMT</pubDate>
            <atom:updated>2018-01-03T08:22:29.488Z</atom:updated>
            <content:encoded><![CDATA[<p>Haven’t been on Medium for a while and on my return found an upgrade button.</p><p>I was expecting, perhaps an updated interface or something which might resemble an actual upgrade. Not a subscription. Why on earth is it called an upgrade?</p><p>No thanks, I’ll pass on the so called “upgrade” aka subscription membership which gives me access to articles written by so called experts. There is a wealth of articles available through the downgraded/normal grade Medium “subscription”.</p><p>If these normal grade articles where to disappear, so would I from Medium. I’ve always loved the idea of Medium and potential is has. A subscription service was never one of them so hopefully they will not try to force this on us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a2e43f8572d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[’Tis but an SQL wound, with MongoDB: Part III]]></title>
            <link>https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-part-iii-b42b57d6b693?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/b42b57d6b693</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nosql]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Sun, 20 Nov 2016 13:44:01 GMT</pubDate>
            <atom:updated>2016-11-21T06:19:11.391Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-c106617e10ae">Part I</a> and <a href="https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-part-ii-c874b4a65bfd">Part II</a> spoke about my introduction to MongoDB and NoSQL and the design of (or working with) the data model used within an application. This story is more about some areas that have been slightly troubling for me working with MongoDB.</p><p>Before diving into it; some context to help create understanding around my problem areas. MongoDB can be used with various languages. Official drivers for the following languages exist, with documentation, and can be found on their website:</p><ul><li>C</li><li>C++</li><li>C#</li><li>Java</li><li>Node.js</li><li>Perl</li><li>PHP</li><li>Python</li><li>Motor</li><li>Ruby</li><li>Scala</li></ul><p>My poison of choice is C#. This is mainly due to my familiarity with C# and .NET Framework as well as most of our locally or in-house created solutions are built with the .NET Framework. Although can use most of the languages above, with the exception of Node.js, Motor and Scala (because of lack of exposure to them) I still prefer C# due to vast amount of resources and support associated. Plus it’s easier getting proficient C# developers than most of the others, with the exception of Java. So my main gripes will be around using MongoDB through the officially supported C# driver.</p><p>My experience is limited still, but these are some of the common scenarios I’ve encountered through my current experience. There is still much to learn, lots to optimise and the certification to be completed.</p><p>Using MongoDB, one of my favourite things is the aggregation framework. The aggregation framework works in a similar way as piping in the UNIX environment. Now piping can be quite a quick way of passing output from one command to the next to generate some other information. It’s like searching through a file system, with the list of files as output, you pass this list to a comparison tool which only shows certain files.</p><p>The aggregation framework works in a similar way, executing a stage, and passing the output to the next stage. There are fair amount of different types of stages the most popular I have used (coming from SQL) is:</p><ul><li>project — reshapes documents;</li><li>match — filters documents;</li><li>limit — limits the number of documents;</li><li>skip — skips a number of documents;</li><li>unwind — flattens arrays, or replicates a document so that each array element is a single field value or document;</li><li>group — group documents to create totals, sums, etc.;</li><li>sort — sorts document; and</li><li>lookup — left outer join documents from another collection.</li></ul><p>Most of these is used fairly often, with the exception of lookup, it is seldom used due to collection documents already having most information in embedded arrays or documents.</p><h4>Queries</h4><p>Let’s look at a basic example query. The query is straight forward, we want to retrieve ColumnA, ColumnB and ColumnC as Field1, Field2 and Field3 respectively from a table named SomeTable where the ColumnC is equal to a string 1234. Finally we want the output sorted in a descending order by ColumnB. An SQL query which might look like this:</p><pre>SELECT ColumnA AS Field1, ColumnB AS Field2, ColumnC AS Field3<br>FROM SomeTable<br>WHERE ColumnC = &#39;1234&#39;<br>ORDER BY ColumnB DESC<br>LIMIT 10 OFFSET 20</pre><p>With Microsoft SQL Server the limit/offset will look different:</p><pre>SELECT ColumnA AS Field1, ColumnB AS Field2, ColumnC AS Field3<br>FROM SomeTable<br>WHERE ColumnC = &#39;1234&#39;<br>ORDER BY ColumnB DESC<br>OFFSET 20 FETCH NEXT 10 ROWS ONLY</pre><p>It’s all semantics I guess, but same thing.</p><p>Generally an SQL server would execute the SQL expression like this:</p><ol><li>Retrieve initial data executing the FROM statement and join tables data if necessary,</li><li>Filter data with the WHERE statement conditions,</li><li>Process SELECT statement to return data requested,</li><li>Sort the selected data by the conditions in ORDER BY, and finally,</li><li>Limit the output to the LIMIT(m)/OFFSET(n) statements, to skip the first n results and only select the first m results.</li></ol><p>That’s a rough generalisation of how it would be executed by an SQL server, it might differ from SQL server to server depending on technology or platform. Each to their own way of optimising the same results. The main thing here is that the order in which it was executed didn’t really make sense by just reading the SQL statement. You don’t really have over it.</p><p>Now let’s do the same query in MongoDB. We use a collection called SomeCollection. Where SQL uses a text based language to create queries, MongoDB’s queries are constructed using JavaScript syntax and JSON. The previous query would look like this:</p><pre>db.SomeCollection.aggregate([<br>{ $match : { ColumnC : &#39;1234&#39; } }, <br>{ $project : { <br>    Field1 : &#39;$ColumnA&#39;, <br>    Field2 : &#39;$ColumnB&#39;, <br>    Field3 : &#39;$ColumnC&#39; <br>} }, <br>{ $sort : { Field2 : -1 } }, <br>{ $skip : 20 }, <br>{ $limit : 10 }<br>])</pre><p>Here, the sequence makes sense. You only want certain documents, and you want to output reshaped to Field1, Field2 and Field3. This output you want sorted by Field2 in descending order (the -1 is descending and 1 would be ascending). Finally, you skip 20 documents and limit the document collection to the first 10 document afterwards. Logically it makes sense and you had control. You could’ve even sorted before projection which could potentially have made use of defined indices within the database to look like this:</p><pre>db.SomeCollection.aggregate([<br>{ $match : { ColumnC : &#39;1234&#39; } }, <br>{ $sort : { ColumnB : -1 } }, <br>{ $project : { <br>    Field1 : &#39;$ColumnA&#39;, <br>    Field2 : &#39;$ColumnB&#39;, <br>    Field3 : &#39;$ColumnC&#39; <br>} },<br>{ $skip : 20 }, <br>{ $limit : 10 }<br>])</pre><p>This on it’s own it pretty cool. In C# this can be done a view ways. I’m going both the Find() function provided by the driver and the Aggregate() function provided to show how to build the same query in .NET/C#. The assumption is we have a MongoDB Database object called Database.</p><p>First with the Find() function:</p><pre>var objects = await Database<br>  .GetCollection&lt;BsonDocument&gt;(&quot;SomeCollection&quot;)<br>  .Find(Builders&lt;BsonDocument&gt;.Filter.Eq(&quot;ColumnC&quot;, &quot;1234&quot;)<br>  .Project(x =&gt; new {<br>    Field1 = x[&quot;ColumnA&quot;],<br>    Field2 = x[&quot;ColumnB&quot;],<br>    Field3 = x[&quot;ColumnC&quot;]})<br>  .SortByDescending(x =&gt; x[&quot;Field2&quot;])<br>  .Skip(20)<br>  .Limit(10)<br>  .ToListAsync();</pre><p>With the Aggregate() function:</p><pre>var objects = await Database<br>  .GetCollection&lt;BsonDocument&gt;(&quot;SomeCollection&quot;)<br>  .Aggregrate()<br>  .Match(Builders&lt;BsonDocument&gt;.Filter.Eq(&quot;ColumnC&quot;, &quot;1234&quot;))<br>  .Project(x =&gt; new {<br>    Field1 = x[&quot;ColumnA&quot;],<br>    Field2 = x[&quot;ColumnB&quot;],<br>    Field3 = x[&quot;ColumnC&quot;]})<br>  .SortByDescending(x =&gt; x.Field2)<br>  .Skip(20)<br>  .Limit(10)<br>  .ToListAsync();</pre><p>Both works pretty well, they map fairly clearly to the native syntax provided and you can still control the execution stage sequence. Only real difference is that the Aggregate function uses an IAggregateFluent&lt;T&gt; interface and the Find function uses an IFindFluent&lt;T&gt; interface. The IAggregateFluent&lt;T&gt; interface returned an anonymous class to the next stage, which allowed .NET to discover the field name of the class object. Where the IFindFluent&lt;T&gt; interface returned a BsonDocument.</p><p>Generally for basic queries, the IFindFluent&lt;T&gt; interface is sufficient, but for more complex queries, preference shifts towards the use of the IAggregateFluent&lt;T&gt; interface.</p><p>With both interfaces you can use strongly-typed classes to project the results to objects of the class types. Let’s assume we have documents which were stored with TypeA and projected to TypeB. A lot of time with Web Applications and REST API’s and .NET this will be required. This is because you saved the documents with one type, but when returning information you might be returning them as what is commonly known as Data Transfer Objects. Add these, and your query now looks like this:</p><pre>var objects = await Database<br>  .GetCollection&lt;TypeA&gt;(&quot;SomeCollection&quot;)<br>  .Aggregrate()<br>  .Match(x =&gt; x.ColumnC == 1234)<br>  .Project(x =&gt; new TypeB {<br>    Field1 = x.ColumnA,<br>    Field2 = x.ColumnB,<br>    Field3 = x.ColumnC})<br>  .SortByDescending(x =&gt; x.Field2)<br>  .Skip(20)<br>  .Limit(10)<br>  .ToListAsync();</pre><p>With the strongly-typed query, we get a list of type TypeB, or List&lt;TypeB&gt;. This already helps a lot as there is no other casting or translation functions required for each returned object. This is really helpful as in loads of cases you need to first instantiate an object of type TypeB. Then assign the values to the object and finally add it to the list to be sent to the next point that requested the list. Here the MongoDB drivers does it for you.</p><h4>Grouping</h4><p>Grouping is used often to find totals, sums or just count the number of specific combination of columns/fields. This might be for something like the total number of orders, orders items or the sum of the value orders done.</p><p>In SQL, to get the total number of orders and sum of value of orders for orders done in October 2016 for each sales person, you would have query like this:</p><pre>SELECT Orders.SalesPerson, <br>  COUNT(*) AS NumberOfOrders, <br>  SUM(Total) AS OrdersTotal<br>FROM Orders<br>WHERE Orders.OrderDate BETWEEN &#39;2016-10-01&#39; AND &#39;2016-10-31&#39;<br>GROUP BY Orders.SalesPerson<br>ORDER BY Orders.SalesPerson ASC</pre><p>The same query in MongoDB and C# would look like:</p><pre>DateTime date = new DateTime(2016, 10, 1);<br>var orderTotals = await db<br>  .GetCollection&lt;Order&gt;(&quot;Orders&quot;).Aggregate()<br>  .Match(x =&gt; <br>    x.OrderDate &gt;= date &amp;&amp; x.OrderDate &lt; date.AddMonths(1))<br>  .SortBy(x =&gt; x.SalesPerson)<br>  .Group(x =&gt; x.SalesPerson, g =&gt; new { <br>    Id = g.Key,<br>    NumberOfOrders = g.Count(),<br>    OrdersTotal = g.Sum(x =&gt; x.Total)})<br>  .ToListAsync();</pre><p>This will return a list of documents with fields _id (the key used to group the collection by), NumberOfOrders as the number of orders for each sales person and OrdersTotal the sum of the orders for each sales person.</p><p>To get the totals across all sales people for orders in the month of October 2016 the SQL query would be:</p><pre>SELECT COUNT(*) AS NumberOfOrders, <br>  SUM(Total) AS OrdersTotal<br>FROM Orders<br>WHERE Orders.OrderDate BETWEEN &#39;2016-10-01&#39; AND &#39;2016-10-31&#39;</pre><p>The MongoDB and C# equivalent would be:</p><pre>DateTime date = new DateTime(2016, 10, 1);<br>var orderTotals = await db<br>  .GetCollection&lt;Order&gt;(&quot;Orders&quot;).Aggregate()<br>  .Match(x =&gt; <br>    x.OrderDate &gt;= date &amp;&amp; x.OrderDate &lt; date.AddMonths(1))<br>  .Group(x =&gt; BsonNull.Value, g =&gt; new { <br>    Id = g.Key,<br>    NumberOfOrders = g.Count(),<br>    OrdersTotal = g.Sum(x =&gt; x.Total)})<br>  .ToListAsync();</pre><p>All that was required was the replacement of the grouping key from the SalesPerson string to the value null to run across all documents in the collection.</p><p>With grouping and totals in mind, there is one thing I would love to see in the future. Currently when querying for a subset of data, I would still like to know how many documents there were in total before the skip and limit was applied. If it was something like a property which could be access that would be amazing. The reason I say this is that there a numerous places where I have to do two queries in essence:</p><ol><li>Group to count the total number of documents, and</li><li>Finished the query to skip and limit to return the required documents.</li></ol><p>This is often required when viewing data in something like a table or data grid. Currently I’ll just have to live with the two queries I guess.</p><h4>Unwinding</h4><p>Now this has been an interesting one for me. Firstly, you create documents, embed the contextually same information inside the document. The main idea here is to reduce the requirement for using joins (or lookups in MongoDB) by embedding documents, arrays of documents or just arrays of values.</p><p>The unwind aggregation stage, reverses this in a way. It replicates all the information in the rest of the document so that each element in the array is assigned to the document information. An example would be:</p><pre>{<br>  _id: 1, student_id: 123, classes: [<br>    { class_id: 456, grade: 60 },<br>    { class_id: 789, grade: 56 }<br>  ]<br>}</pre><p>When we unwind on “tests” we get the following documents:</p><pre>{ _id: 1, student_id: 123, classes: { class_id: 456, grade: 60 } },<br>{ _id: 1, student_id: 123, classes: { class_id: 789, grade: 56 } }</pre><p>This has its uses when you want to work with embedded arrays across different documents and what to either display the information or do calculations on them.</p><p>The problem I have here is that you cannot (or perhaps I’m doing it wrong) project the embedded documents to its own “documents” without reshaping each individual field. What I mean is that, as can be seen above, the classes property remains classes and to access the grade you have to use “classes.grade”. When it comes to strongly typed queries, the aggregate is transformed to a BsonDocument type. You cannot just say some like:</p><pre>var orderItems = Database.GetCollection&lt;Order&gt;(&quot;Orders&quot;)<br>  .Aggregate()<br>  .Project&lt;List&lt;OrderItem&gt;&gt;(Builders&lt;Order&gt;.Projection<br>    .Exclude(x =&gt; x.Id).Include(x =&gt; x.OrderItems))<br>  .Unwind&lt;OrderItem&gt;()<br>  .ToListAsync();</pre><p>This for me is quite annoying to an extent, as now I have to use the .NET functionality and overhead to create a list of objects which result in the collection of objects I want to return to the caller. At least there is a relatively easy work around using LINQ to assist with additional changes to the data which might be required. Would be nice to do so.</p><h4>Polymorphism aka Inheritance</h4><p>The last thing I want to quickly talk about it polymorphism. Now polymorphism a fairly exhaustive topic in the field of Computer Science and Object-Oriented Programming. So I’m not going to talk much about the concept and reasoning behind it.</p><p>Now MongoDB does support inheritance and specialisation of classes through discriminators and other methods defined by the MongoDB team. You can set it up and works by saving a discriminator field called “_t” (for type I suppose) within the document. It seems to work to an extent, but not entirely for what I was hoping.</p><p>The problem comes in that I use .NET reflection to generate other client side code for me based on the specialisation class. In C# you can specify something as virtual in the base/root class, then state override for the specialised class to override the property. The reason why I do this is also to do with specific attributes applied to the properties which differs in the specialised classes. This is for customer specific information where a display name for a property is different for the one customer and that’s what they want to see.</p><p>I can code this easily with something like SQL Server, but for some reason the MongoDB C# drivers don’t like it. The problem is it doesn’t want to override the class property to which an element was already assigned to. Unfortunately, I do know how to change this, but I do know it’s slightly annoying. One of the workarounds is to store the specialised classes with the overridden properties to another element name, but this for me is not entirely idea. I’m not entirely happy with this, but unfortunately the drivers can only facilitate so much currently and I do understand polymorphism can be a complex topic.</p><p>That’s it for now, I’ll continue my experience in another story. If you liked this, please remember to recommend it or share it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b42b57d6b693" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[’Tis but an SQL wound, with MongoDB: Part II]]></title>
            <link>https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-part-ii-c874b4a65bfd?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/c874b4a65bfd</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nosql]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Wed, 16 Nov 2016 13:05:37 GMT</pubDate>
            <atom:updated>2016-11-17T09:16:03.611Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the second story of my dive into the world of MongoDB and NoSQL as a practical solution. If you missed the first story, you can click on this link: <a href="https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-c106617e10ae#.53sohti0i">’Tis but an SQL wound, with MongoDB</a></p><p>This is some things I’ve learned about MongoDB and using it. I’ve also started doing some training provided by MongoDB University. The lessons have taught me a few things that are either not said in their documentation or not as clear. The documentation is quite comprehensive, don’t get me wrong. What I would love to see is more examples either within the API as to how to use the functions. The Microsoft Developer Network (MSDN) is a great example of this type of documentation.</p><p>Apart from the documentation being comprehensive, the drivers have excellent support from the developers of MongoDB itself.</p><h4>Designing systems is not what you expect</h4><p>I say this because; system design is changing from traditional engineering. It is a mind shift. The shift is in how to approach designing a solution and how to expand on an existing one. When I first started programming, I would see a problem; create a solution for it and then only worry about storing the data.</p><p>During my formal studies in Computer Science, Mathematics, Statistics and Information Management, we were taught more concisely how to store with database management systems, how they work and how to interact with them. This was primarily for Relational Database Management Systems (or RDBMS for short). With the System Development Life Cycle (or SDLC) we were trained that the traditional and best approach is to analyse the problem, write documentation describing the problem and the proposed solution. Then you would design the data models to fit the proposed solution. Implement the processes using the data models for the said solution. Design and create the user interfaces for the processes. Finally, it gets to testing it all with the users. After this, the cycle repeats.</p><p>From an engineering perspective, this works. In the physical work, if you make a mistake with a piping design for a refinery, you don’t want that mistake to be built. The problem is, software mainly works in a virtual world, but we follow models developed from a physical world.</p><p>The whole SDLC is summarized by the following sequence for system development in my mind:</p><pre>Data Modelling --&gt; Process Design --&gt; UI/UX Design --&gt; Testing</pre><p>What often happens though is that you describe a problem, what you would like to see, or how you would like to work with, in the system. In that respect, people don’t come to you talking about the data, but about what they want to experience. Now a great analyst might assist with this, but in today’s environment, you see the analytical role being more done by designers and developers themselves due to budget constraints and other reasons.</p><p>With this, it seems like the summarized sequence which tends to happen more often in my experience is this:</p><pre>UX Design --&gt; Process Design --&gt; UI/UX Migration --&gt; Data Modelling<br>     |                                  ˄                 |<br>     |                                  |                 ˅<br>     +---&gt; UX Testing/Implementation ---+              Testing</pre><p>The clear difference here is that user experience design is an ongoing process throughout the design of the business processes which both feed into the user interface and ultimately dictate what data needs to be stored. It seems slightly backward style of thinking.</p><p>Is it really though? Especially considering how people struggle seeing something virtual being developed. It’s always a constant fight explaining how we are meeting targets of something they cannot see. This works especially for the people paying for the development. With the latter approach, there is constant visual feedback for non-technical people.</p><h4>MongoDB is an application-centric mind shift</h4><p>It’s forcing developers to treat the data storage as just that, the data storage. The data should be logically stored, easy and quickly retrievable and make sense.</p><p>But hang on, doesn’t RDBMS’ with structured tables store data logically, enable easy and quick retrieval of the data? It does yes, but for this to happen it has to go through various iterations of design. You start by looking at the problem, separating the facts or future scenario’s which need to be stored. Structure the logically similar data together and ensure that each piece of information is generally only stored once and the rest repeating that information reference that information through foreign keys and indices.</p><p>You end up with something commonly known as normalized data models.</p><p>To get to this state is not always that difficult, but it can be time consuming. Also you need to guess what will be required to an extent and how users will want to interact with the system to ensure that you cover all the bases. Usually down the line you discover you need extra data columns or something can be removed as you overstated the complexity of the problem or solution.</p><p>This isn’t <em>application-centric</em> at all, this is <em>data-centric</em>. I’m using the terms application- and data-centric to relate to which one prescribes what the solution will ultimately look like architecturally.</p><blockquote>Application-centric is where the application or solution drives what needs to be developed and the application being the focal point of the overall solution.</blockquote><blockquote>Data-centric is where the data drives the application or solution to define what needs to be developed and data being the focal point of the overall solution.</blockquote><p>With the traditional SDLC mind set, it makes sense, in the latter version, following modern trends, you already know what the users want, how they will work and processes involved. All you need to do is save it logically together. MongoDB enables this quite easily, in my mind anyways.</p><p>The data is supposed to support the application/solution from the ground up, logically.</p><p>I repeat logically, because we tend to have these normalized data models, which are very space efficient. Recombining the data, to retrieve information from it, at times, can be time very consuming. Even with the best of processors and servers and amount of memory.</p><p>As an example, you might have project management solution. Let’s use something simple. You’ll have projects with milestones. Each milestone with have tasks and their hours required to complete the task in the milestone. Like I said; a basic example.</p><p>The first thing would be to model all the data to be stored. This would entail traditionally from a quick guess we’ll need three tables at least. Which is Projects, Milestones and Resources with relationships which will be a Project instance can have many Milestones. A Milestone can belong to one Project but can have many Tasks. Lastly, a Task can belong to one Milestone.</p><p>This traditionally created tables with something like this:</p><pre>+----------+        +------------+        +-------+<br>|          |        |            |        |       |<br>| Projects | -----&gt; | Milestones | -----&gt; | Tasks |<br>|          |        |            |        |       |<br>+----------+        +------------+        +-------+</pre><p>That was data-centric, and is sufficient. In MongoDB however, you would only have a single collection (or table) called Projects. Each project would contain the contextually related data for the project. A similar model would look like this:</p><pre>+--------------------+<br>|                    |<br>| Project            |<br>|                    |<br>| +----------------+ |<br>| |                | |<br>| | Milestones     | |<br>| |                | |<br>| | +------------+ | |<br>| | |            | | |<br>| | | Tasks      | | |<br>| | |            | | |<br>| | +------------+ | |<br>| |                | |<br>| +----------------+ |<br>|                    |<br>+--------------------+</pre><p>Now for me this, logically, makes more sense.</p><p>But it data is the same? It is the same, in part. The benefit of this model is the fact that the when you retrieve, or work with a project, you already have all the milestones relating to that project, or even all the tasks. To get this from the structured world from normalized data models. You need to either need to do a second query, to filter out the relevant milestones, then a third query to filter for each milestone the tasks. You can also “just join” them and let the database system do that for you through the foreign keys and indices. This on hundreds of thousands of records in each table becomes time consuming to just re-join the data into its application represented structure.</p><p>Now, I know of size constraints in MongoDB documents which will force you to separate documents and create another collection, but this happens less often than in a tabular world.</p><p>The way MongoDB structures and stores data is close to a one-to-one mapping of how my application is representing it, visually or through code. Performance plus logically relating data. It just makes sense.</p><h4>MongoDB is schema-less</h4><p>Now the last thing I want to talk about, in this story, is schema design. Think of data modelling as defining what data need to be stored. The schema represents what into how.</p><p>In a structural world, it’s important having schema’s. The problem is when these schemas have to change and impacts the rest of the system as a whole. With data-centric systems, each record within a table schema has the exact same fields, of the exact same data types and sizes of the specific data type. The data schema change can have a significant effect. This is true especially when you start getting two different types of a single table. The solution would be extra columns or an extra table or tables.</p><p>Let’s say for the project management solution above, you get billable and non-billable tasks. Each type will have their own set of columns with some shared data columns. So you can either just add extra columns, but now many records will have space they are not using, which for indexing could mess around slightly. You can also just add one extra table. You’ll also have to either add another reference in the milestone table to the new table, or perhaps the billable tasks will need to have the extra reference. Lastly, you can keep the tasks table, remove the billable data columns, add them into a second billable tasks table with a third non-billable tasks table. Milestones keep reference to tasks. You now have this:</p><pre>+----------+      +------------+      +-------+     +----------+<br>|          |      |            |      |       |     |          |<br>| Projects | ---&gt; | Milestones | ---&gt; | Tasks | --- | Billable |<br>|          |      |            |      |       |     |   Tasks  |<br>+----------+      +------------+      +-------+     +----------+<br>                                          |<br>                                          ˅<br>                                      +--------------+<br>                                      |              |<br>                                      | Non-billable |<br>                                      |     Tasks    |<br>                                      |              |<br>                                      +--------------+</pre><p>In MongoDB, it’s different, you there is no strict schema. You do not have to define a structure in the database system on how you want to save the data. You just save it. So MongoDB can have documents (records) in the same collection (table) which all have different structures.</p><p>It’s not up the MongoDB as a database system to control the structure; it’s up to the driving factor, the application on what needs to be stored. MongoDB just ensures the availability of the facility to store and retrieve the data. Whatever the structure, with MongoDB for the aforementioned changes, the data “structure” might still look like:</p><pre>+--------------------+<br>|                    |<br>| Project            |<br>|                    |<br>| +----------------+ |<br>| |                | |<br>| | Milestones     | |<br>| |                | |<br>| | +------------+ | |<br>| | |            | | |<br>| | | Tasks      | | |<br>| | |            | | |<br>| | +------------+ | |<br>| |                | |<br>| +----------------+ |<br>|                    |<br>+--------------------+</pre><p>That’s because MongoDB is not data-centric, but application-centric.</p><p>For me, personally, these save a lot of time as well as accommodate the way system is being designed as opposed to an academic or engineering method.</p><p>Does this mean that MongoDB systems will have inferior designs? Not at all. You just get freed from the structured chaos of strictly controlled environments. Where the focus is not on is having the right data model to fit the processes proposed. Rather the focus is on, does the system do what the user wants it to do, regardless of how it’s stored.</p><p>The benefits here for me are obvious, others might not agree based on their experience and perception. That’s fine and that’s their choice.</p><p>Think that’s all for now. I will continue in a follow up story of my experiences working with and exploring MongoDB.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c874b4a65bfd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘Tis but an SQL wound, with MongoDB]]></title>
            <link>https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-c106617e10ae?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/c106617e10ae</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 21:02:37 GMT</pubDate>
            <atom:updated>2016-11-17T09:20:24.516Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I am; with reference to Monty Python, primarily from a structurally controlled world of relational database management systems.</p><p>I’ve been designing and developing information and process management systems, architectures, concepts, data models, data structures and algorithms for more than a decade. All of the aforementioned was to facilitate the creation of a solution. A solution which either in part, or in whole, assists in solving a larger problem; or even potential future problem.</p><p>One of the most mundane and time consuming bits, apart from talking to people who talk in circles or in synergy, are designing, developing and testing data models and against a given data structure or processes. With experience, certain trends have exposed themselves to simplify the modelling process, especially for reoccurring generic problems. This experience has helped me a lot and have saved me so much measurable time designing the data models for storage in a database.</p><p>In the past, it has been easy to build and accommodate various problems through relational database management systems (or RDBMS for short). This is because of formal training with my degree in Computer Science and because people managed their information through basic tables of data. Data which has usually been in the form of something like a Microsoft Excel Spreadsheet. Products like Excel filled a gap, or part of a solution to a problem, which was storing the data with relationship to something else. This allowed us to focus on the next thing, managing the processes using the data.</p><p>With the evolution of business and the way we communicate, so does the need for what data must be stored and how it must be stored to accommodate the current and changing data structure and processes. The solution to this is fairly simple, but also time consuming. As we need to analyse the changes, determine how to change the data structures for the changed processes. Modify the data models and transform and translate the database tables to accommodate this.</p><p>Sometimes, this process of change could take long. So long that just before you are done, the processes you are attempting to accommodate has changed again. In a world of business, this also costs a lot of money.</p><p>Conway’s Law, which was created by a computer programmer called Melvin Conway said the following in 1968:</p><blockquote>organizations which design systems… are constrained to produce designs which are copies of the communication structures of these organizations</blockquote><p>With Conway’s law in mind, we need to be able to adapt systems rapidly and quickly to represent the communication structures. Be it for the business in whole, or communication and contractual structures per customer. At times, it can be a deal breaker if the systems cannot accommodate the communications or customer requirements. Being able to adapt, and rapidly, has become increasingly import in recent years; if not the norm.</p><p>Although the traditional days of project management still exist in companies with loads of corporate red tape, these days, it’s more about being agile, lean and quick on you feet (or fingers). There isn’t time any more to first do a complete analysis, create use cases and write a complete user requirement specification. Then only to get it all reviewed by non-technical people to get this signed off only to start development followed by testing. The users want to changes now, or in a few weeks, not in 6 to 12 months.</p><p>The glory of relational database systems which helped save space through referencing and the space efficiency thereof as well as the extensive usage of indexing of the data stored. This allowed a large amount of pleasure and usefulness from systems using lots of data. Creating changes and transforming the data models for these systems is a pain though. Especially if done properly and not just slapped into the data as an extra column. It does not like the agile world too much. Storage space is not a problem anymore. Large data sets (which is now popularised with the buzzword “big data”) joining data from the various references is time consuming and slows the process down.</p><p>It slows it down because if how it requires to create joined pieces of data of equal length, sizes while maintaining referential integrity with a large amount of data which is processed by a standardised (and sometimes bastardised) structured language called SQL, or Structured Query Language.</p><p>Enter NoSQL.</p><p>NoSQL might sound like there is no SQL (pronounced S-Q-L not sequel, its not a continuation on something). Commonly NoSQL refers to not only using SQL. Until recently I believed NoSQL meant just that, no SQL. I believe many others still do. If you are familiar with RDBMS systems like Microsoft’s SQL Server, (unfortunately Oracle’s) MySQL, MariaDB, PostgreSQL and others you will be familiar with SQL. With NoSQL database systems, they might not comply fully with the complete SQL standards as it might not support all the language requirements. It might not use SQL at all, but it’s own variation of a &lt;Insert your own phrase&gt; Query Language.</p><p>My first exposure to a NoSQL based system was through a Object Oriented database system called InterSystems Caché. Caché in itself and the speed enhancements over traditional relational SQL based databases. It was part of the motivation of why we started using it. Licensing from InterSystems was very complex though which kind of deterred me from using it.</p><p>Recently, I’ve been working with relational databases again, I started looking at improving performance of these systems as the biggest problem was extracting financial reports. Due to the amount of data and the complexity of the data structures, joins and data references associated, reports can take 6 to 8 hours to process.</p><p>While looking for something to assist with improving performance, I came across MongoDB. Which uses BSON to store data. I like BSON because it’s a binary form of JSON, and JSON is commonly used in JavaScript, REST API’s and the modern web applications in general. With this I thought, it will be easy to translate information across from the user interface to the database for the communication and transferring of data.</p><p>I’ve always enjoyed consistency.</p><p>Diving into MongoDB I’ve realised, there is more than just consistency here. There is a mind shift in simplifying our thinking, to storing data in almost the same way our data structures are built. This helps us keep context of of the data we are working with. Also, there is (mostly) no joining required in MongoDB. That’s because relationships are generally stored within the the master data. Thus coming back to consistency and keeping context.</p><p>Although it feels like a mind-shift, it’s actually so easy to adapt and use MongoDB.</p><p>I’ve started creating some test scenario for myself processing data and extracting data for the reports. Now having the similar data stored in smallish data sets, or collections as MongoDB calls it. Extracting information would take approximately four to five minutes with the traditional systems running on a dedicated server with an indexed relational database. With the preliminary, yet to be indexed, MongoDB database, running on my 3 years old notebook, I extracted the same information in three to four seconds! Yes, three to four seconds!</p><p>That in it’s own was a major jump in performance which blew my mind. Right now I built myself a data synchronisation process which automatically extracts the data from the traditional database, transforms the data and saves them as MongoDB documents. This process runs in parallel using asynchronous and concurrent computing. I’m hoping when I have a fairly replica of the current database to run some tests again. To see the difference in real world performance.</p><p>If the difference is significant enough, it will be enough motivation to either force the current third party provider to improve their system we are using, or to just build our own. Exciting times lay ahead and I can’t wait to get involved.</p><p>In time I’m going to add follow up stories to tell of my experiences. Areas where I struggled, or that was simplified by MongoDB and NoSQL. Perhaps someone else will find value in what I learn throughout the process to inspire them to create something big.</p><p><a href="https://medium.com/@garethdavid.za/tis-but-an-sql-wound-with-mongodb-part-ii-c874b4a65bfd">’Tis but an SQL wound, with MongoDB: Part II</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c106617e10ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[American Drama, Err… Democracy]]></title>
            <link>https://medium.com/@garethdavid.za/american-drama-err-democracy-58ee30b9749c?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/58ee30b9749c</guid>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[2016-election]]></category>
            <category><![CDATA[hillary-clinton]]></category>
            <category><![CDATA[america]]></category>
            <category><![CDATA[donald-trump]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 20:29:36 GMT</pubDate>
            <atom:updated>2016-11-21T06:26:36.054Z</atom:updated>
            <content:encoded><![CDATA[<p>Firstly, I am not an American (thankfully), nor do I strive to be. Secondly, I cannot state with confidence anything I say as fact, as my experiences is limited from my perspective only, and form the perceptions generated from the political bubble America is expressing themselves.</p><p>Viewing in, from the outside, the last couple of weeks (or months rather) has been an interesting one, politically speaking.</p><p>Locally we had local (or municipal) elections, in which the ruling party lost quite some ground. It was quite fun and intriguing to see how people start to turn on political “leaders”. The ruling party shrugged this loss of due everything from the lies being spread by “fake news”, to bad weather, and also that not all their voters showed up due to being confident plus it not being a general election.</p><p>Some of the top brass in the ruling party even convinced themselves and others around them that the loss also included rigging of votes.</p><p>All I can say is, politically…</p><blockquote>they are sore losers.</blockquote><p>Not to deviate too much from the topic at hand, back to American Horror Stories, or should I say American Republican Reign. Being an outsider, I couldn’t really care less who is steering America. What is interesting is the joy, sadness, anger, despair and a whole other emotions people are experiencing. I’m not really one for emotions, but I can relate towards things I might be passionate about, albeit because it interests me, not because I find it emotionally appealing.</p><p>On the one end, I’m glad Hillary didn’t win, on the other, I’m not so glad that a TV personality chop like Trump, got his greedy paws on the upper echelons of the American Government. Time will only tell if he will do more harm than good to the American people.</p><p>Apart from the political figures, what I find interesting is the social whiplash of the result. Most of the people who are screaming the loudest, reminds me of our local ruling losers. Creating rumours about rigging, voters not showing up and the biggest one, fake news.</p><p>They aren’t looking at what the winners were saying and that people who elected them actually found meaning in what was said. They aren’t thinking of perhaps, just perhaps, they are part of the 1% that are the significant privileged few who actually has access to TV. Who listened, watched and politically agreed with the democratically biased media. The whole “make America great again” was a load of horse… manure. It resonates to people are struggling, they are looking for a way out of their hell hole. Poor and struggling people are looking for something different. The same party, with the same principles and promises, with the same people running it, might just not be the answer in their mind. Especially when the larger majority are the ones who are poor and struggling.</p><p>They are looking for somebody, or something, to blame. To point a finger at it and say, it’s your fault. You stole my candy which I haven’t bought in the store yet. Millions were spent; in time, money and energy.</p><p>The losers feel cheated. Blaming all kinds of radical things, some more illogical than others.</p><p>The best one for me is how Facebook allegedly caused Hillary to lose due to spreading fake news. Mind you, I’m not on Facebook, because of just that, all the drama, stupid stories and recurring themes presented to you in your Facebook algorithm generated bubble of interest. Pretty much, the same liberal people who are apparently for freedom of speech, expression and protection for all are those who now want to hang and burn the messenger at same time, with a smile.</p><p>Feel like that doesn’t make sense?</p><p>Let’s look at it this way, people like to communicate. Facebook facilitates this. Like a post office. The post office is not concerned with the messages itself, but rather the transport of the messages, like the messenger forwarding a message. Suddenly to assume that a post office is to blame for a speeding fine you received is rather stupid. You shouldn’t have drove that fast in the first place. Same goes for the democratic party and Hillary. If there wasn’t as many controversies, people wouldn’t have felt compelled to transmit these messages or “fake news”. They would know it’s fake and the buck would stop there.</p><p>The Clinton, or democratically biased, media could not hide the fire fast enough. Now feeling that Facebook should control the “fake news” is rather ridiculous. Would you allow the post office to read through all your mail, log, index and document everything, before sending it to you?</p><p>Without Facebook, what stops people from talking? If Facebook didn’t exist, would they sue people for talking to each other? Surely this also caused people to create a negative view of Democrats and Hillary?</p><p>It’s all been very entertaining while not affecting me in any real, or meaningful, way except creating humour in how people have recurring reactions to similar scenarios. We are all so predictable. If this entertainment continues I sincerely hope the a spin-off of “<em>The Apprentice</em>” starts in soon on TV called “<em>The Vice-Presidency</em>”. This is because people like the drama, which is why the Kardashian’s are actually a thing in America. Worst show ever. My girlfriend enjoys it because of how stupid they are.</p><p>To end this piece, lets stop blaming others and work with what we’ve got. Learn to understand others. You can’t throw somebody who is living in a ditch in another ditch and expect them to realise how bad living in a ditch is. That is all this blame game and aggression is doing while proving nothing. Sometimes you have to fail to understand where you went wrong or to find your roots again.</p><p><strong>Good luck to all Americans and those living in it.</strong></p><p><em>PS — Those who threatened to leave America is Trump won… why aren’t you leaving? Are you following the Hulk smashed footsteps left by your untruthful party leader, Hillary? And don’t tell me you are giving Trump a chance, you aren’t fooling anyone. Hypocrisy is hypocrisy, doesn’t matter how you pretend to slice the bread.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58ee30b9749c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uber motivated me to buy a car]]></title>
            <link>https://medium.com/@garethdavid.za/uber-motivated-me-to-buy-a-car-49f8adb77ef3?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/49f8adb77ef3</guid>
            <category><![CDATA[uber]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Fri, 09 Sep 2016 13:52:22 GMT</pubDate>
            <atom:updated>2016-09-09T13:52:22.318Z</atom:updated>
            <content:encoded><![CDATA[<p>Over the past 12 months I’ve been a frequent Uber rider and have made use of the platform almost on a daily basis.</p><p>When Uber first arrived abroad I was quite excited to see something similar locally. Unfortunately, due to market constraints, political policies and the control from the metered taxi associations, we didn’t see similar services in the country until a few years ago.</p><p>Throughout this time, there has been numerous riots from metered taxi operators. Firstly claiming Uber was stealing clients, even though at least 90% of the users have never, and never want to or will, use their shoddy and expensive services. Uber has become part of my daily commute. I’ve even on a personal level been threatened by metered taxi operators that they physically harm me if I use Uber. At times, I’ve had six to seven guys follow me to ensure I don’t use Uber. This was during the riots.</p><p>I’ve been using the Windows mobile platform for several years now, starting from Windows Phone to now more recently, Windows 10 mobile. So when Uber created an app for the platform, I was elated. It simply worked, and it worked well. Wish it remained that way.</p><p>Uber solved a few basic, but vital key points which I hate about the taxi industry. First being, knowing how long the driver will take to get to you. Secondly, a fairly accurate estimated price for the trip. Lastly, giving me a choice.</p><p>Lately, Uber has been attempting to expand into too many areas becoming moving from an expert of one to a master of many but expert of none area.</p><p>This has lately been reflected in the amount of errors I’ve been experiencing through their app and platform in whole. There are numerous times where I had a working connection and location working on my phone, but the app couldn’t connect. At times the app cannot find my location, so I have to type it in manually. Then after manually entering an address, it pins my location to the driver approximately 10 km (or 6.25 miles) away. Sometimes, in the middle of a freeway.</p><p>I’ve contacted their support. Hoping it will make them aware of the problems or even recommend a solution. Even though I have stated I have closed the app, forced closed it, reboot the app, reboot the phone, reinstalled the app, etc. Their support would request me reboot the app or my phone without reading that’s what I already did.</p><p>The best was when I was stuck in a place, requested support, but their support’s response was so fantastic that their recommendation was to try another phone.</p><p>Why do you publish on a platform when clearly are not going to support it properly?</p><p>With all that said, this morning, I again had troubles with the app, from not getting my location, to selecting drivers which are more than 30 minutes away. I’ve honestly had enough. With the amount of money I’m throwing at Uber every month, I can buy my own leather seated sedan with climate control.</p><p>Personally, I would like to thank Uber for making me buy my own car and hopefully never use Uber, the app or contact their support staff again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49f8adb77ef3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Misguided Passion Is Dangerous]]></title>
            <link>https://medium.com/@garethdavid.za/misguided-passion-is-dangerous-3d02283517e9?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d02283517e9</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Wed, 01 Jun 2016 10:56:58 GMT</pubDate>
            <atom:updated>2016-06-01T10:56:58.701Z</atom:updated>
            <content:encoded><![CDATA[<p>The last couple of weeks I’ve been reminded why I’ve tried to escape the commonly known rat race so often.</p><p>I’ve tried numerous times and failed numerous times with this venture. Each time learning something new from the experience. Every time you are forced to go back to roots. With the new found knowledge, work for a few employers before attempting your own thing again.</p><p>The one thing I do value at most places I’ve been involved with is working with people who has passion for what they are doing. Passion which guides them to be the best in what they can be with their knowledge. Passion to want to improve. Passion to want to succeed in their life. Passion to create a positive influence to those around them.</p><p>It’s always a pleasure working with these types of people from various industries, functional groups or departments.</p><p>Reason for this is, their passion is contagious. You want to learn form them, and consequently their passion leads them to want to learn something from you. It’s a great and nurturing environment of people driving each other forward to achieve bigger and better things.</p><p>Every now and then, people can get their passion pointing in the wrong direction. I’ve been there and it nearly destroyed me. What is meant by pointing in the wrong direction, or becoming misguided?</p><p>An example of this would be working in a team. Where the team gets rewarded for collectively doing great. Where people want to help each other, or need to for that matter. A team where, if one person does not perform, or do execute their role correctly, for whatever reason, the team might get reprimanded in whole.</p><p>Enter the passionate individual, who cares so much for the success of the team, that he/she will do everything to ensure success. Even if that means fulfilling the role(s) of another. This in turn makes the passionate individual negative. More often than directly addressing the situation, the passionate individual will get burned trying to make the team succeed. The passionate individual will get tired. He/she will generate frustration and lead to their passion getting directed to an emotional state. An emotional state which might become vocal out bursts or continual aggregated complaints with regards to a situation.</p><p>It’s not a nice place to be in. Especially if you are that passionate individual. Stuck in a world of negativity not seeing how easy it is to escape the hell you are putting yourself in.</p><p>Day in, day out, life becomes a series of unfortunate events which you want to escape. Your passion gets directed towards negativity towards your own position and towards those around you.</p><p>I’ve been there and escaped. I have this fundamental belief that people like to complain. Then again, thinking about it, like a teenager rebelling or cutting themselves, it’s a cry for help when I look at it now. Unfortunately, when you are in this state, you want help, but you are not willing to accept help or guidance when offered. For me, when negative, I thought, how dare you insult me like this. A catch-22 per se.</p><p>What I often found, which worked for me, is to just not spend my energy or passion on others anymore. I spend my passions on myself and what I need to do. Indirectly, this passion turned my own work into perfectionism. Passion in doing the best I could possibly be for the role. Be it when designing complex systems to making a sandwich for a loved one. The results in itself is satisfying and so gratifying then it breaks down the negativity around me.</p><p>By doing this, I remained a team player. I stopped protecting the non-team players. The team suffered for a short period. The burden got shared. The team quickly identified the problem which gave an opportunity to let every one get involved. An opportunity to expose the weakness, force it out or fix it collectively. This was much better than covering it up and then wanting to live in hell, alone.</p><p>Guide your passion towards your own successes. Ignore the failures of others, but learn from them. Only involve yourself in their failure when you are asked to get involved by the people failing. Even in a management position, you’ll most likely merely delegate this and ensure that involvement is achieved to resolve the problem.</p><p>It’s not always easy letting somebody else negatively influence or destroy something you are passionate about. Something you care about dearly. Because of this I love the poem by Dylan Thomas named “<a href="https://www.poets.org/poetsorg/poem/do-not-go-gentle-good-night">Do not go gentle into that good night</a>”.</p><p>Do not let others destroy or misguide your light, your passion and success. They can only destroy or aid in misguiding it if you allow them to do so or let them influence you.</p><p>I’ll end this story with a quote:</p><blockquote>Go confidently in the direction of your dreams. Live the life you have imagined. ~ Henry David Thoreau</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d02283517e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Sense Is Becoming Mythical]]></title>
            <link>https://medium.com/@garethdavid.za/common-sense-is-becoming-mythical-d2f439699727?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2f439699727</guid>
            <category><![CDATA[public-transport]]></category>
            <category><![CDATA[security-guards]]></category>
            <category><![CDATA[common-sense]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Tue, 01 Mar 2016 09:05:33 GMT</pubDate>
            <atom:updated>2016-03-01T09:05:33.888Z</atom:updated>
            <content:encoded><![CDATA[<h4>Just how does unskilled staff with little to no common sense damage a company?</h4><p>Lately I’ve been wondering, is common sense a commodity and can common sense be transferred to other people? Reason I’m asking this is because of my recent experiences with public transport in South Africa. Specifically Gauteng, the commercial hub for South Africa, and the Gautrain.</p><p>There’s so many things which can improve in Gauteng, one of these is public transport. It’s drastically lacking. Majority of people in our country probably use some kind of “public” transport. The roads are getting over crowded and we need to get people to use other forms of public transport more. Every time the government has tried though, the Taxi Associations have committed to anarchy. This was followed by the weak government backing off. Taxi’s do no like competition. Just look at the Uber drivers, who are scared to pick people up for the fear of being brutally assaulted by taxi drivers.</p><p>Several years ago, the Gautrain was announced and it appeared to be the first step towards a better future. Several years later, the routes pretty much are the same, there aren’t enough trains, it’s expensive due to a weakened economy proudly brought to you by the Zupta conglomerate.</p><p>Wanting to move forward, I supported this project up until now.</p><p>I don’t want to anymore. This is most likely due to what can only be presumed is because of unskilled staff. Unskilled due to the bad levels of basic education which is provided by the Zupta/ruling party conglomerate. Unskilled perhaps of weak company policy or procedural enforcement.</p><p>Recently as the product of the ruling pary’s efforts is moving into the work force I cannot help but feel there is little common sense in this product. It’s difficult to work with people like this. People without common sense tend to be stubborn. They are especially stubborn when they are unskilled and don’t understand something.</p><p>Getting back to the Gautrain, recently I’ve had a number of problems with their staff. Specifically the security staff of late. George Degnan M.D., Chief Surgery, Founding Residency Director, County Health Director, Contra Costa County, California, USA in 1950–1980 once said:</p><blockquote>We do common things uncommonly well</blockquote><p>Thinking of this, this is something we should all achieve. Here is what seems to be the rule for the Gautrain security staff:</p><blockquote>We do uncommon things commonly bad</blockquote><p>They are lacking so much common sense. It’s hard to understand why. Especially when their job description in essence is so simplistic. They tend to do uncommon things, like blocking off a circle or roundabout at the Gautrain station entrance. Or force everybody to drive through a narrow drop off zone which is already overfilled and backed up with cars, bakkies (or pickups) and other taxi’s. This while a bus drop off zone parking is empty and can easily be utilized and right next to the drop off zone.</p><p>A friend recently dropped me off at a Gautrain station. He got a bad tire puncture as we entered the parking area. I said I’ll help with changing the tire quick, because the tire was completely flat. The two Gautrain security staff members were just looking at us. In clear view of them we jacked the car up. We proceeded to remove the flat tire. At this point in time, the one security staff member approached us. He was insistent we cannot park here.</p><p>I looked with a dumbstruck look on my face asking him: “<em>Does it looks like we are just parking here?</em>” He’s response: “<em>You must move the car immediately because this is a drop off zone. You are not allowed to park here.</em>” I thought to myself, what the actual… (you can finish the sentence). Still looking at him, with the wheel off the car. I asked again: “<em>Does it look like we are parked here? Do you not notice the wheel is off the car and we cannot move?</em>” He had a difficult time processing an answer, looking back at his security buddy. Looked back to us. He then said: “<em>You must move the car now!</em>” Before overreacting, my friend intervened who was taking out the spare wheel saying: “<em>We will move now.</em>” The security guard, turned around with this sense of accomplishment on this face and walked away.</p><p>What just happened? Where was the common sense in that whole scenario? Luckily my friend had the common sense to just tell him what he was expecting to hear.</p><p>Our hands were dirty. I quickly ran to the nearest rest room inside the station to fetch us some paper towels to clean our hands, partially. Inside the station I was confronted coming out with the paper towels. Think they were suspecting me to be the elusive and notorious paper towel thief. At last, they are catching the elusive and notorious paper towel thief, ending his reign of terror. I just shook my head and kept my thoughts to myself before somebody decides to prosecute me.</p><p>This was the one day and there has been numerous of events like these.</p><p>Recently though, remember the staff blocking the circle at the entrance? Enter me with an Uber lift needing to drop me off. The Uber driver wasn’t from the area, scared to stop close to the drop off area for fear of being confronted by Taxi’s drivers. Especially considering how it has been reported how Taxi driver beat Uber drivers, physically. This in front of the world class security staff. The drop off area was full again and I didn’t want him to waste time to get out of the station as quick as possible. I told him to go through the bus stop area which was clear and there was no risk. Clearly I was wrong, as I saw the security staff member was eyeing the driver.</p><p>The Uber driver stopped, I thanked him and climbed out of the car. As he went around to exit I noticed the security staff member walking around going to confront the driver. I walked towards him asking if he is going to confront him. He ignored me. I told the security staff member, I made him stop there. I told the driver to drive there. I take responsibility. But the security staff member would not accept that until he could harass the poor scared driver first.</p><p>While he was confronting or harassing the driver, I was still there asking him why is he ignoring me. That’s when he basically told me to shut up and go. I don’t know what I’m talking about and I must just go. Common sense, none. People skills, none. Ability to do his job, definitely none.</p><p>How much common sense must you be lacking to not realize the situation which he forced on the scenario. Somebody was willing to take responsibility, but he didn’t want to accept it. In fact, he was more that happy to prey on the weak. Yes, that’s the type of thuggery we need working as a company’s security staff.</p><p>What’s next? What will be my next misventure? My misfortune combined with adventure. I can confidently say, the only solution for me is this… Stop using the Gautrain.</p><p>As with many stress in life, it’s self inflicted. Self inflicted because we allow it to happen. I’m deciding to move away from all this stress associated with using the Gautrain.</p><p>From a once everyday user of the Gautrain, I will not use the Gautrain ever again. My suggested slogan for the Gautrain service:</p><blockquote>Gautrain, where we do uncommon things commonly bad.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2f439699727" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marketing On Medium]]></title>
            <link>https://medium.com/@garethdavid.za/marketing-medium-ab97c248a767?source=rss-d83651670505------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab97c248a767</guid>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[writers-on-medium]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Gareth David]]></dc:creator>
            <pubDate>Sat, 20 Feb 2016 11:29:04 GMT</pubDate>
            <atom:updated>2016-02-20T20:46:09.517Z</atom:updated>
            <content:encoded><![CDATA[<h4>Medium is becoming a marketing platform</h4><p>Quite some time ago I stumbled upon Medium… Now I’ve never really been one for reading, but in the last few years I’ve started to enjoy it more. Before Medium I’ve started browsing through internet news sites and various blogs.</p><p>I mostly just scanned through the articles; looking at the pictures and scan read here and there getting the just of what’s going on. I never really read the whole thing as I found it a bore. With the increase in start ups and mobile apps came the advent of apps consolidating news feeds. This in itself wasn’t really new, as things like RSS feeds existed for quite some time.</p><p>What made it nice was the fact that you could explore, browse and discover similar content providers quite easily. It was a lot quicker than browsing through forums or discovering them through a search engine.</p><p>Enter Medium</p><p>I found it, enjoyed the typography and layout with the rich stories. I signed up. It was easy to use and follow topics or tags you like. The content from not so commercial articles was a pleasure to read. You could sense the author was trying to tell you something about an experience, lesson or story. With this I’m not talking about five tips to improve your productivity.</p><p>The stories grew, and so was the amount of people using it. I have friends who I got addicted to Medium as well.</p><p>Now enter the existing or established bloggers and writers.</p><p>Besides enjoying the freedom of writing themselves or writing about various topics, they saw an additional potential. To market themselves. This is all fair as Medium allows them to do so easily. Being established or skilled writers, they writings or stories attract a vast amount of attention. Besides enriching Medium as a writing platform, it’s also bring the variation of stories down.</p><p>I say this because lately there has been an influx of a short read, followed by a “If you liked this and want to read more like this, visit <em>myblogorwebsite.com</em>” or a “Read more in my book about some controversial subject or innovative thoughts and it can be purchased <em>here”.</em></p><p>Apart from it being a free platform and the you are marketing to a crowd who predominantly like reading, I find this insulting. Insulting in which they are trying to draw people away from Medium. Insulting because we are seeing less quality stories and more commercial and covert marketing “stories”.</p><p>Maybe I’m wrong, but this marketing I believe this is going to reduce Medium growth and only enrich the marketers and not the audience which is Medium’s current user base. They are using the marketing wave Medium and it’s existing user have created to promote themselves, shamelessly.</p><p>With all this said, everybody is welcome on Medium. Please though, use Medium to enrich Medium and the people who use it. Don’t use Medium to enrich yourself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab97c248a767" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>