<?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 ASleekGeek on Medium]]></title>
        <description><![CDATA[Stories by ASleekGeek on Medium]]></description>
        <link>https://medium.com/@bojanskr?source=rss-3897769475bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TY7AMGixnZptvjkC0255OQ@2x.jpeg</url>
            <title>Stories by ASleekGeek on Medium</title>
            <link>https://medium.com/@bojanskr?source=rss-3897769475bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 10:42:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bojanskr/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[Invictus]]></title>
            <link>https://medium.com/@bojanskr/invictus-76d0f6b2ba5d?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/76d0f6b2ba5d</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[invictus]]></category>
            <category><![CDATA[poetry]]></category>
            <category><![CDATA[selfesteem-selfconfidence]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 22:28:29 GMT</pubDate>
            <atom:updated>2023-03-26T22:27:44.754Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://en.wikipedia.org/wiki/Invictus?wprov=sfti1"><strong><em>|</em></strong><em> The poem of the unconqerable soul</em></a></p><p>William Ernest Henley — 1849–1903</p><blockquote><em>Out of the night that covers me,</em></blockquote><blockquote><em>Black as the Pit from pole to pole,</em></blockquote><blockquote><em>I thank whatever gods may be.</em></blockquote><blockquote><em>For my unconquerable soul.</em></blockquote><blockquote><em>In the fell clutch of circumstance</em></blockquote><blockquote><em>I have not winced nor cried aloud.</em></blockquote><blockquote><em>Under the bludgeonings of chance.</em></blockquote><blockquote><em>My head is bloody, but unbowed.</em></blockquote><blockquote><em>Beyond this place of wrath and tears.</em></blockquote><blockquote><em>Looms but the Horror of the shade,</em></blockquote><blockquote><em>And yet the menace of the years.</em></blockquote><blockquote><em>Finds, and shall find, me unafraid.</em></blockquote><blockquote><em>It matters not </em><strong><em>how strait the gate</em></strong><em>,</em></blockquote><blockquote><strong><em>How charged with punishments the scroll</em></strong><em>,</em></blockquote><blockquote><strong>I am the master of my fate:</strong></blockquote><blockquote><strong>I am the captain of my soul.</strong></blockquote><p>William Ernest Henley, born August 23, 1849, was an influential British poet, perhaps best known for his poem “Invictus” (1875). He is the author of A Song of Speed (D. Nutt, 1903), Hawthorn &amp; Lavender with Other Verses (D. Nutt, 1901), and For England’s Sake: Verses and Songs in Time of War (. Nutt, 1900), among others. He died in Woking, England, on July 11, 1903.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/156/1*YDGO3wLMcp9y4IZRy_H1hg@2x.jpeg" /></figure><p><a href="https://en.wikipedia.org/wiki/William_Ernest_Henley?wprov=sfti1">William Ernest Henley</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76d0f6b2ba5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API Security Checklist]]></title>
            <link>https://medium.com/@bojanskr/api-security-checklist-9809cdc03f4e?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9809cdc03f4e</guid>
            <category><![CDATA[checklist]]></category>
            <category><![CDATA[developing-secure-systems]]></category>
            <category><![CDATA[systemsecurity]]></category>
            <category><![CDATA[software-security]]></category>
            <category><![CDATA[api-security]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 22:10:48 GMT</pubDate>
            <atom:updated>2023-03-21T22:10:48.305Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Checklist of the most important security countermeasures when designing, testing, and releasing your API.</em></p><figure><img alt="Visual Abstract Representation of Security" src="https://cdn-images-1.medium.com/max/1024/0*BT_0p8N2fOndRdFp" /><figcaption>Photo by <a href="https://unsplash.com/@adrienl?utm_source=medium&amp;utm_medium=referral">Adrien Ledoux</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Authentication</h3><ul><li>Don’t use Basic Auth. Use standard authentication instead (e.g., <a href="https://jwt.io/">JWT</a>).</li><li>Don’t reinvent the wheel in Authentication, token generation, password storage. Use the standards.</li><li>Use Max Retry and jail features in Login.</li><li>Use encryption on all sensitive data.</li></ul><h3>JWT (JSON Web Token)</h3><ul><li>Use a random complicated key (JWT Secret) to make brute forcing the token very hard.</li><li>Don’t extract the algorithm from the header. Force the algorithm in the backend (HS256 or RS256).</li><li>Make token expiration (TTL, RTTL) as short as possible.</li><li>Don’t store sensitive data in the JWT payload, it can be decoded <a href="https://jwt.io/#debugger-io">easily</a>.</li><li>Avoid storing too much data. JWT is usually shared in headers and they have a size limit.</li></ul><h3>Access</h3><ul><li>Limit requests (Throttling) to avoid DDoS / brute-force attacks.</li><li>Use HTTPS on server side with TLS 1.2+ and secure ciphers to avoid MITM (Man in the Middle Attack).</li><li>Use HSTS header with SSL to avoid SSL Strip attacks.</li><li>Turn off directory listings.</li><li>For private APIs, allow access only from safelisted IPs/hosts.</li></ul><h3>Authorization</h3><h3>OAuth</h3><ul><li>Always validate redirect_uri server-side to allow only safe listed URLs.</li><li>Always try to exchange for code and not tokens (don’t allow response_type=token).</li><li>Use state parameter with a random hash to prevent CSRF on the OAuth authorization process.</li><li>Define the default scope, and validate scope parameters for each application.</li></ul><h3>Input</h3><ul><li>Use the proper HTTP method according to the operation: GET (read), POST (create), PUT/PATCH (replace/update), and DELETE (to delete a record), and respond with 405 Method Not Allowed if the requested method isn&#39;t appropriate for the requested resource.</li><li>Validate content-type on request Accept header (Content Negotiation) to allow only your supported format (e.g., application/xml, application/json, etc.) and respond with 406 Not Acceptable response if not matched.</li><li>Validate content-type of posted data as you accept (e.g., application/x-www-form-urlencoded, multipart/form-data, application/json, etc.).</li><li>Validate user input to avoid common vulnerabilities (e.g., XSS, SQL-Injection, Remote Code Execution, etc.).</li><li>Don’t use any sensitive data (credentials, Passwords, security tokens, or API keys) in the URL, but use standard Authorization header.</li><li>Use only server-side encryption.</li><li>Use an API Gateway service to enable caching, Rate Limit policies (e.g., Quota, Spike Arrest, or Concurrent Rate Limit) and deploy APIs resources dynamically.</li></ul><h3>Processing</h3><ul><li>Check if all the endpoints are protected behind authentication to avoid broken authentication process.</li><li>User own resource ID should be avoided. Use /me/orders instead of /user/654321/orders.</li><li>Don’t auto-increment IDs. Use UUID instead.</li><li>If you are parsing XML data, make sure entity parsing is not enabled to avoid XXE (XML external entity attack).</li><li>If you are parsing XML, YAML or any other language with anchors and refs, make sure entity expansion is not enabled to avoid Billion Laughs/XML bomb via exponential entity expansion attack.</li><li>Use a CDN for file uploads.</li><li>If you are dealing with huge amount of data, use Workers and Queues to process as much as possible in background and return response fast to avoid HTTP Blocking.</li><li>Do not forget to turn the DEBUG mode OFF.</li><li>Use non-executable stacks when available.</li></ul><h3>Output</h3><ul><li>Send X-Content-Type-Options: nosniff header.</li><li>Send X-Frame-Options: deny header.</li><li>Send Content-Security-Policy: default-src &#39;none&#39; header.</li><li>Remove fingerprinting headers — X-Powered-By, Server, X-AspNet-Version, etc.</li><li>Force content-type for your response. If you return application/json, then your content-type response is application/json.</li><li>Don’t return sensitive data like credentials, passwords, or security tokens.</li><li>Return the proper status code according to the operation completed. (e.g., 200 OK, 400 Bad Request, 401 Unauthorized, 405 Method Not Allowed, etc.).</li></ul><h3>CI &amp; CD</h3><ul><li>Audit your design and implementation with unit/integration tests coverage.</li><li>Use a code review process and disregard self-approval.</li><li>Ensure that all components of your services are statically scanned by AV software before pushing to production, including vendor libraries and other dependencies.</li><li>Continuously run security tests (static/dynamic analysis) on your code.</li><li>Check your dependencies (both software and OS) for known vulnerabilities.</li><li>Design a rollback solution for deployments.</li></ul><h3>Monitoring</h3><ul><li>Use centralized logins for all services and components.</li><li>Use agents to monitor all traffic, errors, requests, and responses.</li><li>Use alerts for SMS, Slack, Email, Telegram, Kibana, Cloudwatch, etc.</li><li>Ensure that you aren’t logging any sensitive data like credit cards, passwords, PINs, etc.</li><li>Use an IDS and/or IPS system to monitor your API requests and instances.</li></ul><h3>See also:</h3><ul><li><a href="https://github.com/yosriady/api-development-tools">yosriady/api-development-tools</a> — A collection of useful resources for building RESTful HTTP+JSON APIs.</li></ul><p>For more languages, updated information, go to either my fork <a href="https://github.com/bojanskr/API-Security-Checklist">https://github.com/bojanskr/API-Security-Checklist</a></p><p>or to the original repo of the guys from “Shieldfy”: <a href="https://github.com/shieldfy/API-Security-Checklist">https://github.com/shieldfy/API-Security-Checklist</a></p><p>Hope this helps a lot of you out there…..Happy Coding boyz and girls!</p><p>TehBoyan AKA ASleekGeek!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9809cdc03f4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latency numbers every programmer should know]]></title>
            <link>https://medium.com/@bojanskr/latency-numbers-every-programmer-should-know-d85f8d3f8e6a?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d85f8d3f8e6a</guid>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 21:57:39 GMT</pubDate>
            <atom:updated>2023-03-21T22:00:32.852Z</atom:updated>
            <content:encoded><![CDATA[<p>Latency comparison numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DOX7ShDxaHHbdPJp" /><figcaption>Photo by <a href="https://unsplash.com/@possessedphotography?utm_source=medium&amp;utm_medium=referral">Possessed Photography</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Before anything I would like to post a disclaimer that none of these are my measurements and are collected from various different places, GitHub, blogs etc. Within the industry they are commonly known as “<a href="https://en.wikipedia.org/wiki/Back-of-the-envelope_calculation">napkin estimations</a>”, They are there to serve as a guide for various effects on the ways you choose to communicate.</p><p>You can find much more information on my <a href="https://github.com/bojanskr/system-design#latency-numbers-every-programmer-should-know">GitHub fork on System Design</a></p><pre>Latency Comparison Numbers<br>--------------------------<br>L1 cache reference                           0.5 ns<br>Branch mispredict                            5   ns<br>L2 cache reference                           7   ns                      14x L1 cache<br>Mutex lock/unlock                           25   ns<br>Main memory reference                      100   ns                      20x L2 cache, 200x L1 cache<br>Compress 1K bytes with Zippy            10,000   ns       10 us<br>Send 1 KB bytes over 1 Gbps network     10,000   ns       10 us<br>Read 4 KB randomly from SSD*           150,000   ns      150 us          ~1GB/sec SSD<br>Read 1 MB sequentially from memory     250,000   ns      250 us<br>Round trip within same datacenter      500,000   ns      500 us<br>Read 1 MB sequentially from SSD*     1,000,000   ns    1,000 us    1 ms  ~1GB/sec SSD, 4X memory<br>HDD seek                            10,000,000   ns   10,000 us   10 ms  20x datacenter roundtrip<br>Read 1 MB sequentially from 1 Gbps  10,000,000   ns   10,000 us   10 ms  40x memory, 10X SSD<br>Read 1 MB sequentially from HDD     30,000,000   ns   30,000 us   30 ms 120x memory, 30X SSD<br>Send packet CA-&gt;Netherlands-&gt;CA    150,000,000   ns  150,000 us  150 ms<br><br>Notes<br>-----<br>1 ns = 10^-9 seconds<br>1 us = 10^-6 seconds = 1,000 ns<br>1 ms = 10^-3 seconds = 1,000 us = 1,000,000 ns</pre><p>Handy metrics based on numbers above:</p><ul><li>Read sequentially from HDD at 30 MB/s</li><li>Read sequentially from 1 Gbps Ethernet at 100 MB/s</li><li>Read sequentially from SSD at 1 GB/s</li><li>Read sequentially from main memory at 4 GB/s</li><li>6–7 world-wide round trips per second</li><li>2,000 round trips per second within a data center</li></ul><p><a href="https://www.youtube.com/watch?v=FqR5vESuKe0">A nice video on Youtube that explains this very well</a></p><h3>Latency numbers visualized</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4B3UkWWaznKanPYQ" /><figcaption>Source is embedded in the image</figcaption></figure><h4>Source(s) and further reading</h4><ul><li><a href="https://gist.github.com/jboner/2841832">Latency numbers every programmer should know — 1</a></li><li><a href="https://gist.github.com/hellerbarde/2843375">Latency numbers every programmer should know — 2</a></li><li><a href="http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf">Designs, lessons, and advice from building large distributed systems</a></li><li><a href="https://static.googleusercontent.com/media/research.google.com/en//people/jeff/stanford-295-talk.pdf">Software Engineering Advice from Building Large-Scale Distributed Systems</a></li></ul><p>Thanks to everyone that have supported me so far, I just want to know that I deeply appreciate it.</p><p>Happy coding!</p><p>TehBoyan AKA ASleekGeek</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d85f8d3f8e6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Scalability]]></title>
            <link>https://medium.com/@bojanskr/database-scalability-53a65f2006df?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/53a65f2006df</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[database-scalability]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Sat, 29 Oct 2022 22:03:09 GMT</pubDate>
            <atom:updated>2023-03-03T01:12:53.450Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QF6DHkFJpgUuQBP-" /><figcaption>Photo by <a href="https://unsplash.com/@fabioha?utm_source=medium&amp;utm_medium=referral">fabio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>So, imagine the following scenario: You’ve had your good run up to 10K users with everything you know about MS SQL Server for many years. It has served you well. You’ve normalized, structured and re-structured the cr.p out of it. You’ve used profilers and you’ve optimized the indexes so that you can have your cascaded queries run to an acceptable level — just enough to hold the boss of your back for a while :)</blockquote><p>MS SQL Server falls into a group of (you guessed it):</p><h4>Relational database management systems (RDBMS)</h4><p>A relational database like SQL is a collection of data items organized in tables. <strong>ACID </strong>is a set of properties of relational database transactions. —</p><ul><li><em>Atomicity </em>— Each transaction is all or nothing</li><li><em>Consistency </em>— Any transaction will bring the database from one valid state to another</li><li><em>Isolation </em>— Executing transactions concurrently has the same results as if the transactions were executed serially</li><li><em>Durability </em>— Once a transaction has been committed, it will remain so.</li></ul><h4>RDBMS Scalability</h4><p>There’s usually two sides of this discussion I hear often:</p><ul><li>SQL Server is crap — It does not scale</li><li>You can solve EVERTHING with RDBMS (usually SQL Server)</li></ul><p>Both are not true and are a really bad smell of incompetence.</p><p>Dogmatizing approaches to and limiting your access to tools that can help you solving at least even part of a complex problem is a dangerous stand to take. Especially since there are many techniques to, or at least try to scale a relational database: <em>master-slave replication, master-master replication, federation, sharding, denormalization, SQL tuning etc.</em></p><p>We will talk a little bit on this and how, given that you already are in a situation like this, which options you have.</p><h4>Master-slave replication</h4><p>The master serves reads and writes, replicating writes to one or more slaves, which serve only reads. Slaves can also replicate to additional slaves in a tree-like fashion. If the master goes offline, the system can continue to operate in read-only mode until a slave is promoted to a master or a new master is provisioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*2g_aoEUOqiXEN-ueisu0-w.png" /><figcaption>Master-slave replication</figcaption></figure><p>Disadvantage(s): master-slave replication</p><p>Additional logic is needed to promote a slave to a master.</p><p>See Disadvantage(s): replication for points related to both <strong>master-slave</strong> and <strong>master-master</strong>.</p><h4>Master-master replication</h4><p>Both masters serve reads and writes and coordinate with each other on writes. If either master goes down, the system can continue to operate with both reads and writes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NH1acRb4YId_OYjSLyThdg.png" /><figcaption>Master-master replication</figcaption></figure><p>This doesn’t come without disadvantages though:</p><ul><li>You’d need a load balancer or you’ll need to make changes to your application logic to determine where to write.</li><li>Most master-master systems are either loosely consistent (violating ACID) or have increased write latency due to synchronization.</li><li>Conflict resolution comes more into play as more write nodes are added and as latency increases.</li></ul><p><strong><em>Replication </em></strong>as a scalability method generally comes at a price with a lot of disadvantages:</p><ul><li>There is a potential for loss of data if the master fails before any newly written data can be replicated to other nodes.</li><li>Writes are replayed to the read replicas. If there are a lot of writes, the read replicas can get bogged down with replaying writes and can’t do as many reads.</li><li>The more read slaves, the more you have to replicate, which leads to greater replication lag.</li><li>On some systems, writing to the master can spawn multiple threads to write in parallel, whereas read replicas only support writing sequentially with a single thread.</li><li>Replication adds more hardware and additional complexity.</li></ul><h4>Federation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*scRoOjqw7qHZz5X8YXDHdw.png" /><figcaption>Federation</figcaption></figure><p>Federation (or functional partitioning) splits up databases by function. For example, instead of a single, monolithic database, you could have three databases: forums, users, and products, resulting in less read and write traffic to each database and therefore less replication lag. Smaller databases result in more data that can fit in memory, which in turn results in more cache hits due to improved cache locality. With no single central master serializing writes you can write in parallel, increasing throughput.</p><p><em>Disadvantage(s):</em></p><ul><li>Federation is not effective if your schema requires huge functions or tables.</li><li>You’ll need to update your application logic to determine which database to read and write.</li><li>Joining data from two databases is more complex with a <a href="https://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers">server link.</a></li><li>Federation adds more hardware and additional complexity.</li></ul><h4>Sharding</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*YPXfmH-ysDHrZEV-Vy9B5g.png" /><figcaption>Sharding</figcaption></figure><p>Sharding distributes data across different databases such that each database can only manage a subset of the data. Taking a users database as an example, as the number of users increases, more shards are added to the cluster. Similar to the advantages of federation, sharding results in less read and write traffic, less replication, and more cache hits. Index size is also reduced, which generally improves performance with faster queries. If one shard goes down, the other shards are still operational, although you’ll want to add some form of replication to avoid data loss. Like federation, there is no single central master serializing writes, allowing you to write in parallel with increased throughput. Common ways to shard a table of users is either through the user’s last name initial or the user’s geographic location.</p><p>Since SQL Server is not built to utilize sharding — unlike MongoDB for example. We would practically need to simulate or emulate this which already comes with a great deal of things to be careful about<em>:</em></p><ul><li>You’ll need to update your application logic to work with shards, which could result in complex SQL queries.</li><li>Data distribution can become lopsided in a shard. For example, a set of power users on a shard could result in increased load to that shard compared to others.</li><li>Rebalancing adds additional complexity.</li><li>A sharding function based on consistent hashing can reduce the amount of transferred data.</li><li>Joining data from multiple shards is more complex.</li><li>Sharding adds more hardware and additional complexity.</li></ul><p>Nevertheless it’s an interesting approach. You can find more info here:</p><ul><li><a href="http://highscalability.com/blog/2009/8/6/an-unorthodox-approach-to-database-design-the-coming-of-the.html">The coming of the shard</a></li><li><a href="https://en.wikipedia.org/wiki/Shard_(database_architecture)">Shard database architecture</a></li><li><a href="http://www.paperplanes.de/2011/12/9/the-magic-of-consistent-hashing.html">Consistent hashing</a></li></ul><h4>Denormalization</h4><p>This is an attempt to improve read performance at the expense of some write performance. Redundant copies of the data are written in multiple tables to avoid expensive joins. Some RDBMS such as PostgreSQL and Oracle support materialized views which handle the work of storing redundant information and keeping redundant copies consistent. Once data becomes distributed with techniques such as federation and sharding, managing joins across data centers further increases complexity. <strong><em>Denormalization might circumvent the need for such complex joins.</em></strong> In most systems, reads can heavily outnumber writes 100:1 or even 1000:1. A read resulting in a complex database join can be very expensive, spending a significant amount of time on disk operations.</p><p><em>Disadvantage(s):</em></p><ul><li>Data is duplicated. As it is always the case in algorithms we need to sacrifice space for speed.</li><li>Constraints can help redundant copies of information stay in sync, which increases complexity of the database design.</li><li>A denormalized database under heavy write load might perform worse than its normalized counterpart.</li></ul><p>Since I have a lot of experience with denormalization within the data analysis context. I would like to turn the attention to a<a href="https://dl.acm.org/doi/10.1016/j.dss.2004.12.004"> study done in 2006</a>. <a href="https://dl.acm.org/doi/10.1016/j.dss.2004.12.004">It is a study on data denormalization in decision support systems</a>. A context in which I’m personally quite involved at the moment.</p><p>This is going to be a series of posts that deal with system design.</p><p>So, until next time…Happy coding my brothers and sisters!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ga18uv2j1r62tvNX" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53a65f2006df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are Service-Oriented Architecture and Microservices Really a Different Thing?]]></title>
            <link>https://medium.com/@bojanskr/are-service-oriented-architecture-and-microservices-really-a-different-thing-30266f2e52bf?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/30266f2e52bf</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[debate-tech]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Thu, 27 Oct 2022 17:56:55 GMT</pubDate>
            <atom:updated>2023-03-01T00:54:25.302Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Most of the stuff in this article is not written nor invented by me. In fact the majority of the definitions and concepts described in this article can be found in “Building Microservices” by Sam Newman and by Martin Fowler here: <a href="https://martinfowler.com/articles/microservices.html">https://martinfowler.com/articles/microservices.html</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fYtNq1ooC481mJky" /><figcaption>Photo by <a href="https://unsplash.com/@ahmadirini?utm_source=medium&amp;utm_medium=referral">Ahmad Dirini</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>…but they are reiterated by me…</blockquote><h3>Service-oriented architecture (SOA)</h3><p><em>Service-oriented architecture (SOA)</em> is a design approach in which multiple services collaborate to provide a certain end set of capabilities. (A service here typically means a separate operating system process.) Communication between these services occurs via calls across a network rather than method calls within a process boundary.</p><p>SOA emerged as an approach to combat the challenges of large, monolithic applications. This approach aims to promote the reusability of software; two or more end-user applications, for example, could use the same services. SOA aims to make it easier to maintain or rewrite software, as theoretically we can replace one service with another without anyone knowing, if the semantics of the service don’t change too much.</p><p>SOA at its heart is a sensible idea. However, despite many efforts, there is a lack of good consensus on how to approach implementing SOA well. The past has shown that much of the industry failed to look holistically enough at the problem and present a compelling alternative to the narrative set out by various vendors in this space.</p><p>Many of the problems laid at the door of SOA are problems with things like communication protocols (e.g., SOAP), vendor middleware, a lack of guidance about service granularity, or the wrong guidance on picking places to split your system. A cynic might suggest that vendors co-opted (and in some cases drove) the SOA movement to sell more products, and those self-same products in the end undermined the goal of SOA.</p><p>There are plenty of examples of SOA in which teams were striving to make the services smaller, but they still had everything coupled to a database and had to deploy everything together. Service oriented? Yes. But it’s not “<em>micro</em>”-service oriented.</p><p>The <em>microservice approach</em> has emerged from real-world use, taking our better understanding of systems and architecture to do SOA well.</p><p>One could think of microservices as being a specific approach for SOA in the same way that <em>Extreme Programming (XP) </em>or <em>Scrum </em>is a specific approach for Agile software development.</p><h3>Microservices</h3><p>A few core ideas must be understood when you are exploring microservices. Given that some aspects are often overlooked, even though so much has been written about microservices (<a href="https://microservices.io/">https://microservices.io/</a>) — it’s vital to explore these concepts further to help ensure that you understand just what it is that makes microservices work.</p><h4>Independent deployability</h4><p>Independent deployability is the idea that we can make a change to a microservice, deploy it, and release that change to our users, without having to deploy any other microservices. More important, it’s not just the fact that we can do this; it’s that this is how you manage deployments in your system. It’s a discipline you adopt as your default release approach.</p><p>To ensure independent deployability, we need to make sure our microservices are loosely coupled: we must be able to change one service without having to change anything else. This means we need explicit, well-defined, and stable contracts between services. Some implementation choices make this difficult — the sharing of databases, for example, is especially problematic.</p><p>Independent deployability in and of itself is clearly incredibly valuable. But to achieve independent deployability, there are so many other things you have to get right that in turn have their own benefits. So you can also see the focus on independent deployability as a forcing function — by focusing on this as an outcome, you’ll achieve a number of subservient benefits.</p><h4>Business Domain Modeling</h4><p>Techniques like domain-driven design can allow you to structure your code to better represent the real-world domain that the software operates in. With microservice architectures, we use this same idea to define our service boundaries. By modeling services around business domains, we can make it easier to roll out new functionality and to recombine microservices in different ways to deliver new functionality to our users.</p><p>Rolling out a feature that requires changes to more than one microservice is expensive. You need to coordinate the work across each service (and potentially across separate teams) and carefully manage the order in which the new versions of these services are deployed. That takes a lot more work than making the same change inside a single service (or worse inside a monolith). It therefore follows that we want to find ways to make cross-service changes as infrequent as possible.</p><p>In a layered architecture each layer in represents a different service boundary, with each boundary based on related technical functionality. If we need to make a change to just the presentation layer for example, that would be fairly efficient. However, experience has shown that changes in functionality typically span multiple layers in these types of architectures — requiring changes in presentation, application, and data tiers.</p><p>This problem is emphasized if the architecture is even more layered than the simple layers, often each tier is split into further layers.</p><p>By making our services end-to-end slices of business functionality, we ensure that our architecture is arranged to make changes to business functionality as efficient as possible. Arguably, with <a href="https://asleekgeek.com/high-cohesion-loose-coupling-1731b1f74bf6">microservices we have made a decision to prioritize high cohesion of business functionality over high cohesion of technical functionality</a>.</p><p><strong><em>Note:</em></strong></p><p>When looking to split a large application into parts, often management focuses on the technology layer, leading to UI teams, server-side logic teams, and database teams. When teams are separated along these lines, even simple changes can lead to a cross-team project taking time and budgetary approval. A smart team will optimize around this and plump for the lesser of two evils — just force the logic into whichever application they have access to. Logic everywhere in other words. This is an example of <a href="https://martinfowler.com/bliki/ConwaysLaw.html">Conway’s Law</a> in action.</p><blockquote>Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization’s communication structure.</blockquote><blockquote>— Melvin Conway, 1968</blockquote><h4>Decentralized Data Management</h4><p>One of the things we see people having the hardest time with is the idea that microservices should avoid the use of <em>shared </em>databases. If a microservice wants to access data held by another microservice, it should go and ask that second microservice for the data. This gives the microservices the ability to decide what is shared and what is hidden, which allows us to clearly separate functionality that can change freely (our internal implementation) from the functionality that we want to change infrequently (the external contract that the consumers use).</p><p>If we want to make independent deployability a reality, we need to ensure that we limit backward-incompatible changes to our microservices. If we break compatibility with upstream consumers, we will force them to change as well. Having a clean delineation between internal implementation detail and an external contract for a microservice can help reduce the need for backward-incompatible changes.</p><p>Hiding internal state in a microservice is analogous to the practice of encapsulation in object-oriented (OO) programming. Encapsulation of data in OO systems is an example of information hiding in action.</p><p>Decentralization of data management presents in a number of different ways. At the most abstract level, it means that the conceptual model of the world will differ between systems. This is a common issue when integrating across a large enterprise, the sales view of a customer will differ from the support view. Some things that are called customers in the sales view may not appear at all in the support view. Those that do may have different attributes and (worse) common attributes with subtly different semantics.</p><p>This issue is common between applications, but can also occur <em>within</em> applications, particular when that application is divided into separate components. A useful way of thinking about this is the Domain-Driven Design notion of <a href="https://martinfowler.com/bliki/BoundedContext.html">Bounded Context</a>. DDD divides a complex domain up into multiple bounded contexts and maps out the relationships between them. This process is useful for both monolithic and microservice architectures, but there is a natural correlation between service and context boundaries that helps clarify, and as we describe in the section on business capabilities, reinforce the separations.</p><p>As well as decentralizing decisions about conceptual models, microservices also decentralize data storage decisions. While monolithic applications prefer a single logical database for persistent data, enterprises often prefer a single database across a range of applications — many of these decisions driven through vendor’s commercial models around licensing. Microservices prefer letting each service manage its own database, either different instances of the same database technology, or entirely different database systems — an approach called <a href="https://martinfowler.com/bliki/PolyglotPersistence.html">Polyglot Persistence</a>. You can use polyglot persistence in a monolith, but it appears more frequently with microservices.</p><h4>Designed for failure</h4><p>A consequence of using services as components, is that applications need to be designed so that they can tolerate the failure of services. Any service call could fail due to unavailability of the supplier, the client has to respond to this as gracefully as possible. This is a disadvantage compared to a monolithic design as it introduces additional complexity to handle it. The consequence is that microservice teams constantly reflect on how service failures affect the user experience. Netflix’s <a href="https://github.com/Netflix/SimianArmy">Simian Army</a> induces failures of services and even datacenters during the working day to test both the application’s resilience and monitoring.</p><p>This kind of automated testing in production would be enough to give most operation groups the kind of shivers usually preceding a week off work. This isn’t to say that monolithic architectural styles aren’t capable of sophisticated monitoring setups — it’s just less common in our experience.</p><p>Since services can fail at any time, it’s important to be able to detect the failures quickly and, if possible, automatically restore service. Microservice applications put a lot of emphasis on real-time monitoring of the application, checking both architectural elements (how many requests per second is the database getting) and business relevant metrics (such as how many orders per minute are received). Semantic monitoring can provide an early warning system of something going wrong that triggers development teams to follow up and investigate.</p><p>This is particularly important to a microservices architecture because the microservice preference towards choreography and <a href="https://martinfowler.com/eaaDev/EventCollaboration.html">event collaboration</a> leads to emergent behavior. While many pundits praise the value of serendipitous emergence, the truth is that emergent behavior can sometimes be a bad thing. Monitoring is vital to spot bad emergent behavior quickly so it can be fixed.</p><p><em>Monoliths </em>can be built to be as transparent as a microservice — in fact, they should be. The difference is that you absolutely need to know when services running in different processes are disconnected. With libraries within the same process this kind of transparency is less likely to be useful.</p><p><em>Microservice </em>teams would expect to see sophisticated monitoring and logging setups for each individual service such as dashboards showing up/down status and a variety of operational and business relevant metrics. Details on circuit breaker status, current throughput and latency are other examples we often encounter in the wild.</p><h4>Products not Projects</h4><p>Most application development efforts that we see use a project model: where the aim is to deliver some piece of software which is then considered to be completed. On completion the software is handed over to a maintenance organization and the project team that built it is disbanded.</p><p>Microservice proponents tend to avoid this model, preferring instead the notion that a team should own a product over its full lifetime. A common inspiration for this is Amazon’s notion of <a href="https://queue.acm.org/detail.cfm?id=1142065">“you build, you run it”</a> where a development team takes full responsibility for the software in production. This brings developers into day-to-day contact with how their software behaves in production and increases contact with their users, as they have to take on at least some of the support burden.</p><p>The product mentality, ties in with the linkage to business capabilities. Rather than looking at the software as a set of functionality to be completed, there is an on-going relationship where the question is how can software assist its users to enhance the business capability.</p><p>There’s no reason why this same approach can’t be taken with monolithic applications, but the smaller granularity of services can make it easier to create the personal relationships between service developers and their users.</p><h4>Smart endpoints and dumb pipes</h4><p>When building communication structures between different processes, we’ve seen many products and approaches that stress putting significant smarts into the communication mechanism itself. A good example of this is the Enterprise Service Bus (ESB), where ESB products often include sophisticated facilities for message routing, choreography, transformation, and applying business rules.</p><p>The microservice community favorites an alternative approach: <em>smart endpoints and dumb pipes</em>. Applications built from microservices aim to be as decoupled and as cohesive as possible — they own their own domain logic and act more as filters in the classical Unix sense — receiving a request, applying logic as appropriate and producing a response. These are choreographed using simple REST protocols rather than complex protocols.</p><p>The two protocols used most commonly are HTTP request-response with resource API’s and lightweight messaging<a href="https://martinfowler.com/articles/microservices.html#footnote-protobufs">[7]</a>. The best expression of the first is</p><blockquote>Be of the web, not behind the web</blockquote><blockquote>— <a href="https://www.amazon.com/gp/product/0596805829/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596805829&amp;linkCode=as2&amp;tag=martinfowlerc-20">Ian Robinson</a></blockquote><p>Microservice teams use the principles and protocols that the world wide web (and to a large extent, Unix) is built on. Often used resources can be cached with very little effort on the part of developers or operations folk.</p><p>The second approach in common use is messaging over a lightweight message bus. The infrastructure chosen is typically dumb (dumb as in acts as a message router only) — simple implementations such as RabbitMQ don’t do much more than provide a reliable asynchronous fabric — the smarts still live in the end points that are producing and consuming messages; in the services.</p><p>In a monolith, the components are executing in-process and communication between them is via either method invocation or function call. The biggest issue in changing a monolith into microservices lies in changing the communication pattern. A naïve conversion from in-memory method calls to RPC leads to chatty communications which don’t perform well. Instead you need to replace the fine-grained communication with a coarser -grained approach.</p><h4>Decentralized Governance</h4><p>One of the consequences of centralized governance is the tendency to standardize on single technology platforms. Experience shows that this approach is constricting — not every problem is a nail and not every solution a hammer. We prefer using the right tool for the job and while monolithic applications can take advantage of different languages to a certain extent, it isn’t that common.</p><p>Splitting the monolith’s components out into services we have a choice when building each of them. You want to use Node.js to standup a simple reports page? Go for it. C++ for a particularly gnarly near-real-time component? Fine. You want to swap in a different flavor of database that better suits the read behavior of one component? We have the technology to rebuild him.</p><p>Of course, just because you <em>can</em> do something, doesn’t mean you <em>should</em> — but partitioning your system in this way means you have the option.</p><p>Teams building microservices prefer a different approach to standards too. Rather than use a set of defined standards written down somewhere on paper they prefer the idea of producing useful tools that other developers can use to solve similar problems to the ones they are facing. These tools are usually harvested from implementations and shared with a wider group, sometimes, but not exclusively using an internal open source model. Now that git and GitHub have become the de facto version control system of choice, open source practices are becoming more and more common in-house .</p><p>Netflix is a good example of an organization that follows this philosophy. Sharing useful and, above all, battle-tested code as libraries encourages other developers to solve similar problems in similar ways yet leaves the door open to picking a different approach if required. Shared libraries tend to be focused on common problems of data storage, inter-process communication and as we discuss further below, infrastructure automation.</p><p>For the microservice community, overheads are particularly unattractive. That isn’t to say that the community doesn’t value service contracts. Quite the opposite, since there tend to be many more of them. It’s just that they are looking at different ways of managing those contracts. Patterns like <a href="https://martinfowler.com/bliki/TolerantReader.html">Tolerant Reader</a> and <a href="https://martinfowler.com/articles/consumerDrivenContracts.html">Consumer-Driven Contracts</a> are often applied to microservices. These aid service contracts in evolving independently. Executing consumer driven contracts as part of your build increases confidence and provides fast feedback on whether your services are functioning. Indeed we know of a team in Australia who drive the build of new services with consumer driven contracts. They use simple tools that allow them to define the contract for a service. This becomes part of the automated build before code for the new service is even written. The service is then built out only to the point where it satisfies the contract . These techniques and the tooling growing up around them, limit the need for central contract management by decreasing the temporal coupling between services.</p><p>Perhaps the apogee of decentralized governance is the build it / run it ethos popularized by Amazon. Teams are responsible for all aspects of the software they build including operating the software 24/7. Devolution of this level of responsibility is definitely not the norm but we do see more and more companies pushing responsibility to the development teams. Netflix is another organization that has adopted this <a href="https://martinfowler.com/articles/microservices.html#footnote-netflix-flowcon">ethos</a>. Being woken up at 3am every night by your pager is certainly a powerful incentive to focus on quality when writing your code. These ideas are about as far away from the traditional centralized governance model as it is possible to be.</p><h4>Infrastructure Automation</h4><p>Infrastructure automation techniques have evolved enormously over the last few years — the evolution of the cloud and AWS in particular has reduced the operational complexity of building, deploying and operating microservices.</p><p>Many of the products or systems being build with microservices are being built by teams with extensive experience of <a href="https://martinfowler.com/bliki/ContinuousDelivery.html">Continuous Delivery</a> and it’s precursor, <a href="https://martinfowler.com/articles/continuousIntegration.html">Continuous Integration</a>. Teams building software this way make extensive use of infrastructure automation techniques.</p><p>A monolithic application will be built, tested and pushed through these environments quite happily. It turns out that once you have invested in automating the path to production for a monolith, then deploying <em>more</em> applications doesn’t seem so scary any more. Remember, one of the aims of CD is to make deployment boring, so whether its one or three applications, as long as its still boring it doesn’t matter.</p><p>Another area where we see teams using extensive infrastructure automation is when managing microservices in production. In contrast to our assertion above that as long as deployment is boring there isn’t that much difference between monoliths and microservices, the operational landscape for each can be strikingly different.</p><h3>How big is a microservice?</h3><p>Although “microservice” has become a popular name for this architectural style, its name does lead to an unfortunate focus on the size of service, and arguments about what constitutes “micro”. In our conversations with microservice practitioners, we see a range of sizes of services. The largest sizes reported follow Amazon’s notion of the Two Pizza Team (i.e. the whole team can be fed by two pizzas), meaning no more than a dozen people. On the smaller size scale we’ve seen setups where a team of half-a-dozen would support half-a-dozen services.</p><p>This leads to the question of whether there are sufficiently large differences within this size range that the service-per-dozen-people and service-per-person sizes shouldn’t be lumped under one microservices label. At the moment we think it’s better to group them together, but it’s certainly possible that we’ll change our mind as we explore this style further.</p><h4>Evolutionary Design</h4><p>Microservice practitioners, usually have come from an evolutionary design background and see service decomposition as a further tool to enable application developers to control changes in their application without slowing down change. Change control doesn’t necessarily mean change reduction — with the right attitudes and tools you can make frequent, fast, and well-controlled changes to software.</p><p>Whenever you try to break a software system into components, you’re faced with the decision of how to divide up the pieces — what are the principles on which we decide to slice up our application? The key property of a component is the notion of independent replacement and upgradeability — which implies we look for points where we can imagine rewriting a component without affecting its collaborators. Indeed many microservice groups take this further by explicitly expecting many services to be scrapped rather than evolved in the longer term.</p><p>Emphasis on <em>replaceability </em>is a special case of a more general principle of modular design, which is to drive modularity through the pattern of change. You want to keep things that change at the same time in the same module. Parts of a system that change rarely should be in different services to those that are currently undergoing lots of churn. If you find yourself repeatedly changing two services together, that’s a sign that they should be merged.</p><p>Putting components into services adds an opportunity for more granular release planning. With a monolith any changes require a full build and deployment of the entire application. With microservices, however, you only need to redeploy the service(s) you modified. This can simplify and speed up the release process. The downside is that you have to worry about changes to one service breaking its consumers. The traditional integration approach is to try to deal with this problem using versioning, but the preference in the microservice world is to <a href="https://martinfowler.com/articles/enterpriseREST.html#versioning">only use versioning as a last resort</a>. We can avoid a lot of versioning by designing services to be as tolerant as possible to changes in their suppliers.</p><h4>The circuit breaker and production ready code</h4><p><a href="https://martinfowler.com/bliki/CircuitBreaker.html">Circuit Breaker</a> appears in <a href="https://www.amazon.com/gp/product/B00A32NXZO/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00A32NXZO&amp;linkCode=as2&amp;tag=martinfowlerc-20">Release It!</a> alongside other patterns such as Bulkhead and Timeout. Implemented together, these patterns are crucially important when building communicating applications. This <a href="http://techblog.netflix.com/2012/02/fault-tolerance-in-high-volume.html">Netflix blog entry</a> does a great job of explaining their application of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QetHbKDNpFukbZah3B0qDA.jpeg" /></figure><h3>Microservices and SOA</h3><p>When we’ve talked about microservices a common question is whether this is just Service Oriented Architecture (SOA) that we saw a decade ago. There is merit to this point, because the microservice style is very similar to what some advocates of SOA have been in favor of. The problem, however, is that SOA means <a href="https://martinfowler.com/bliki/ServiceOrientedAmbiguity.html">too many different things</a>, and that most of the time that we come across something called “SOA” it’s significantly different to the style we’re describing here, usually due to a focus on ESBs used to integrate monolithic applications.</p><p>In particular we have seen so many botched implementations of service orientation — from the tendency to hide complexity away, to failed multi-year initiatives that cost millions and deliver no value, to centralized governance models that actively inhibit change, that it is sometimes difficult to see past these problems.</p><p>Certainly, many of the techniques in use in the microservice community have grown from the experiences of developers integrating services in large organizations. The <a href="https://martinfowler.com/bliki/TolerantReader.html">Tolerant Reader</a> pattern is an example of this. Efforts to use the web have contributed, using simple protocols is another approach derived from these experiences — a reaction away from central standards that have reached a complexity that is, <a href="http://wiki.apache.org/ws/WebServiceSpecifications">frankly, breathtaking</a>. (Any time you need an ontology to manage your ontologies you know you are in deep trouble.)</p><p>This common manifestation of SOA has led some microservice advocates to reject the SOA label entirely, although others consider microservices to be one form of SOA, perhaps <em>service orientation done right</em>. Either way, the fact that SOA means such different things means it’s valuable to have a term that more crisply defines this architectural style.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30266f2e52bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mental Models]]></title>
            <link>https://medium.com/@bojanskr/mental-models-12c75083396e?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/12c75083396e</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[think-different]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[mental-toughness]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Wed, 08 Jun 2022 21:12:39 GMT</pubDate>
            <atom:updated>2023-03-01T02:52:07.113Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>My notes based on the book: “Mental Models: Tools for better thinking” by Ryan Duffy — Knowable</blockquote><p>Types of mental models that have been identified and used as principles or even foundations of what is considered success in many contexts:</p><p><strong>- Inversion: Thinking in reverse</strong></p><p><strong>- Process Thinking: The importance of what is happening now, at this present moment</strong></p><p><strong>- First principle thinking</strong></p><p><strong>- Circles of competence</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d2AhDXlkKjkUOyEFlTaLxQ.png" /><figcaption>A great idea — product of an appropriate mental model used in the correct way at the correct time</figcaption></figure><h3>Inversion: Thinking in reverse</h3><p>The key point of inversion thinking is that instead of focusing on the solution of a certain problem i.e. focusing on success as an end goal we are focusing on identifying the things that could go wrong and avoid doing them. This way by mitigating the risk and avoiding any obstacles we have identified in advance, the outcome would generally be in our favor and inevitably lead to success.</p><p>This way of thinking is useful when for example we don’t know what to do exactly. So, by identifying what not to do we are actually providing value that can lead to further progress.</p><p>Inversion thinking does not lead to solution all the time. But it is very useful in situations where we can provide value by identifying and mitigating risk.</p><h3>Process Thinking: Why only this moment matters</h3><p>Process thinking focuses on discipline, precision, trust, especially in team settings. The process itself emphasizes and values preparation over prize.</p><p>It requires us to let go of any considerations of past, future, what has happened and what might happen. What matters is the present moment.</p><p>By perfecting each step of the process, our desired outcome =&gt; success, however we define it, becomes almost inevitable.</p><p>Process thinking comes in very handy when we are facing huge, intimidating tasks ahead of us. Be it a huge several year project that we need to get done, or a season starting for a football team. Nevertheless, it helps us split things up into small — bite size tasks that deal with the present, that are predictable and repeatable.</p><h3>First principle thinking: How Elon Musk and the whole scientific world makes decisions</h3><p>First principle thinking is a mental model emphasizing the deconstruction of problems to their essential elements. in other words, the main focus is <a href="https://www.merriam-webster.com/dictionary/analysis">analysis</a>. It requires that we remove all assumptions and preconceptions on a specific problem we are trying to solve. This is the basics of the scientific principal as well.</p><p>It’s a framework build upon only what we know is empirically true.</p><p>Once we deconstruct the problem to basic elements that are considered empirically true , we can start <a href="https://www.merriam-webster.com/dictionary/deduction">deducting </a>possible solutions to the problem we are trying to solve. The results and the conclusions are almost always unexpected and might even be considered shocking in terms of common understanding of success.</p><p>First principle thinking is a 3 step process:</p><ul><li>Define your assumptions (lay the groundwork for your theory)</li><li>Reduce the assumptions to their first empirically or otherwise proven true principles</li><li>Deduct (reverse engineer ) solutions based on the information you know to be verifiably true.</li></ul><h3>Circles of Competence: Know your strike zone</h3><blockquote>It is not competence if you don’t know the edge of it…It is really important to stay in your circle of competence. If you’re not sure what your boundaries are of your competence circle, then you don’t have mastery of your field</blockquote><blockquote>Charlie Munger</blockquote><p>Knowing the boundaries of our competence is essential. Knowing what we don’t know and being honest about it is as important as knowing what we need to do in a certain situation.</p><p>Knowing our circles of competence, gives us that confidence when making important decisions (last second shot at the buzzer by Michael Jordan)</p><p>Going forward, we improve by testing our boundaries of our circles of competence and self-examine and identify areas of improvement. This requires ability of true self-reflection, humility and intellectual honesty — things that don’t come easy to everyone.</p><p>That’s it. Hope you liked this recap. I really loved the book and it gave me a reason and a boost to explore this area even further. I highly recommend you to get the book in any form and try to understand these models and use them as tools in your everyday path to success.</p><p>Peace and Love!</p><p>TehBoyan AKA ASleekGeek</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12c75083396e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make Medium Always Be In Dark Mode On The Web]]></title>
            <link>https://medium.com/@bojanskr/how-to-make-medium-always-be-in-dark-mode-on-the-web-875acfd4324e?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/875acfd4324e</guid>
            <category><![CDATA[dark-mode]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Sat, 04 Jun 2022 23:08:22 GMT</pubDate>
            <atom:updated>2022-06-04T23:09:22.398Z</atom:updated>
            <content:encoded><![CDATA[<h4>If you’re like me and it frustrates you that you are forced to always read Medium articles in bright mode on the website — read on - I have some solutions for you</h4><p>If you are reading on your computer, than I have bad news for you — there is no built-in night mode. In this case you can either accept the burning bright color or look for other solution. (Not reading Medium is not an option!)</p><p>Why Medium doesn’t have “dark mode” switch on the website I don’t know. Honestly, I cannot find a reasonable answer to that question even though it has been frustrating me for quite a some time now :)</p><p>When it comes to making dark mode work on Medium (to be specific I’m writing about Chrome in particular) you have two options:</p><h4>Install an extension</h4><ul><li>Notable mentions here would be: <a href="https://darkreader.org/">Dark Reader</a>, <a href="https://chrome.google.com/webstore/detail/night-eye-dark-mode-on-an/alncdjedloppbablonallfbkeiknmkdi">Night Eye</a> — which comes with quite <a href="https://nighteye.app/how-to-enable-dark-night-mode-on-medium/">neat settings for Medium </a>. You could find gazillion more on extension store in Google Chrome.</li></ul><h4>Enable the “force-dark-mode” flag</h4><p>Enable the “force-dark-mode” flag in Chrome or any other Chromium based browser</p><ul><li>In your URL bar, type (or copy/paste) this:</li></ul><pre>chrome://flags/#enable-force-dark</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*ftL-9wCag1hsRI1-A8yTyA.png" /><figcaption>You will see a setting there to enable Auto-Dark content for al web content</figcaption></figure><p>DISCLAIMER: I have to warn you this is messing around with experimental features in the browser and it’s quite easy to mess things up, do if you don’t know what you’re doing, skip it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=875acfd4324e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bojan talks Azure]]></title>
            <link>https://medium.com/@bojanskr/the-bojan-talks-azure-747071f648b8?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/747071f648b8</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[presentations]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Sat, 04 Jun 2022 22:08:50 GMT</pubDate>
            <atom:updated>2023-03-01T00:59:30.091Z</atom:updated>
            <content:encoded><![CDATA[<h4>A video of a talk I did on “Overview of Azure” to on an internal conference while I was working as a consultant at tretton37. It’s a high-level brief overview of Microsoft Azure.</h4><p>This is a long time ago, somewhere prior to 2017, I think. I go trough cloud computing basics, patterns and terminology, and then an overview of what Azure offered back then in terms of virtual machines, web sites, cloud services, and building blocks for applications.</p><p><a href="https://player.vimeo.com/video/164007899?h=b8eb6a62d4">https://player.vimeo.com/video/164007899</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCVLjN0zEmHrNvwnEZ-hIw.png" /><figcaption>@ copyright Microsoft Azure 2022</figcaption></figure><p><a href="https://player.vimeo.com/video/164007899?h=b8eb6a62d4">https://player.vimeo.com/video/164007899</a></p><p>I did not consider my self a good public speaker back then. I’m no public speaker now so, the quality of the presentation might not be something you would put in a world-class level, but it is an effort I’m proud of regardless.</p><p>Drop your thoughts in the comments, all feedback is welcome, good or bad.</p><p>Till next time…</p><p>The Boyan AKA ASleekGeek</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=747071f648b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2: I Can Probably See It for What It Is]]></title>
            <link>https://medium.com/@bojanskr/part-2-i-can-probably-see-it-for-what-it-is-1a1dd30fe23c?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a1dd30fe23c</guid>
            <category><![CDATA[equality]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[digital-life]]></category>
            <category><![CDATA[mental-health]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Mon, 22 Nov 2021 23:52:18 GMT</pubDate>
            <atom:updated>2023-03-01T02:52:48.228Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>. …Still not liking myself, just so there’s no misunderstandings here :)</blockquote><p><em>(I believe a disclaimer is in order, as I feel negative aura is circling these series. Whatever you read here is a personal experience and a personal interpretation of events happening in no particular order. If there is a mention of an individual or a title he or her recognizes themselves in, I do not feel the need or reason to apologize)</em></p><p><a href="https://bojanskr.medium.com/i-cant-always-at-every-moment-say-that-i-love-myself-and-it-s-perfectly-fine-7c1376d19b72">Well, I told you this was a multipart series.</a> Oh, yeah, we’re going trough it all and you’re coming with me. You’re writing blog posts about it aren’t you. It can only benefit you from reading this trough. It’s nothing you don’t already know. Well, tag along I’ll show you your “5 things every developer should know” and your “13 (How in the world does one come up with a number like 13) things you need to know to become a senior” or whatever it is the title you gave yourself to make your own self at peace and your ego at high. After all you need that self-defense up front, standing strong. You can’t let people see, not even glimpse what’s in there, oh, no, no, no!</p><p>But, we’ll get to that too.</p><p>Let’s go back to that “<em>general after battle”</em> syndrome where we left of last time. Now you’re in a state where you know “everything”, after it already happened. The all too familiar burst of self confidence, makes you forget and burry that last episode of self-doubt, worthlessness, regret and pretty much everything negative deep down. Not only that it’s easier that way, but it’s how our brain works — after an intensive event or period in life that was crucial in some way it filters out the bad stuff, leaving only the feeling of a romantic memory. If you’re one of those people that are too proud to admit to yourself and others that you failed, miserably, missed by miles kind of failure, then lucky you. It’s just easier to act like nothing happened. You can sleep better.</p><p>I’m not one of those people. I give all I got each time every time. Sometimes it works, sometimes it doesn’t. It’s that second one that counts. Nobody ever learned anything by succeeding all the time.</p><p>But if you failed and then you didn’t learn anything from it. That’s a serious problem right there.</p><p>What I find a very interesting and intriguing phenomenon is that some if not majority of people end up here somewhere, in this space, forever. One part of the brain working constantly to convince, the other to do just enough to keep an almost perfect equilibrium of wanting and being able to and perform exactly as much to be considered what they projected about themselves to the environment around them. Not more nor less is expected of these individuals. A visible presentable result here, a blog post there and they’ve earned their badge. Perhaps promotion is in order, or an honorable title: “Principal Developer”. How good does that sound?</p><p>What if I tell you that there is another, perhaps equally representative group of individuals that are part of this industry that are mere mortars! Sufferers.</p><p>Well not really. More, like, disappointed of how it ended here type of people. The type of people that projected success in their minds but ended up gutted, defeated, drained physically and emotionally. At some point in our lives careers, relationships we all end up in this place. We all experience to be that guy/girl (well, unless you’re Tom Brady :)))) ). What brought you there can be a plethora of reasons at first hard to grasp because you’re fatigued and mentally exhausted anyway, let alone clustering reasons that brought you in this bad head-space. It’s a difficult head-space, I can say first hand. it’s one of those things that can paralyze you in an important moment and completely rob you of the ability to make a sound, reasonable judgement in life — usually when it’s needed the most. The reason why you sometimes need to retreat to self-isolation so that you don’t risk bringing others into this closed circle of unhappiness at first, that slowly trough time and range of actions that you tried, because you wanted to get back. Back to that period where you felt happy and productive and important to the project or your life, or your relationship.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*OFUtyJXfzmkt0CzkrljWWQ@2x.jpeg" /><figcaption>@ copyright NASA 2021 — Hubble telescopic image</figcaption></figure><p>If we speak in the context of work and teamwork in particular, there are two roads that gets paved in a organizational unit such as a team or a company if we generalize. I have experienced both, so I’ll try to give some more insight but also signs that will lead to the organization unit taking one path or the other, often unaware until much later when someone from senior management or a new clueless employee points it out to them by asking “why”!</p><ol><li>The road of keeping calm and keep on grinding until we can’t grind no more. Carefully thread the ways of rebuilding suggestions and complete reconstruction. If you get support of this kind it is a often s sign sign of a very mature and supportive group! Again you will in vas majority of cases recognize them by the infamous “it depends…” in every technical discussion (or any discussion for that matter).</li><li>The “jump on every single known and unknown initiative out there, justified or not just to keep the hip badge flying high” most of the time as a goal in itself.</li></ol><p>Both just illustrate my point that eventually you realize that there is no perfect environment or rather environments are not black and white. Regardless of how much you as an individual feel burned out and tired. The world rarely makes an effort to accommodate YOU. The current society led heavily by values of entitlement and political correctness at all cost — a world where everyone gets offended by anything and everything couldn’t care less for the knowledge and beliefs that you carry. They are irrelevant to the modern world.</p><p>In all this 2 things come to light, worth enough so that everyone in the industry, even life in general if we’re being philosophical, stops and thinks for a moment (or just wait until governing bodies think about it for you)</p><ol><li>Your excitement around buzzwords that are just another naming for a 50 year invention and paradigm is causing the industry to watch! (especially kids that are putting in everything that they got into learning principles and practices that they study trough university to first jobs that they probably got as interns). Let’s take a theoretical example where half of them believe your Web 3.0 assumptions (it is nowhere near being proven, so I’ll call it an assumption, a bet if you will-cause that’s what it is at this point). In our theoretical example half kids below 24 go for careers into Web 3.0, half don’t. The industry is tricky and sneaky — it will only show and re-show 1M times the 3 people that made billion dollars out of it. The way this all works is by creating god programmers (random nobody’s that have more to do with accounting that software development), myths, stories, events. Everything the media feeds of. Unfortunately, forgetting to mention in all that excitement that: for every successful project there were at least 50 that failed, and secondly and even more sadly- the number of people that took a career bet is 100:1 success rate at best (for those of you that like to analyze historical data to reach informed conclusions/we’ll be coming back to this as well)</li><li>There is an army of the workforce that don’t buy in on your hip tech and free lunches and whatever even Google realized they were irrelevant. This army of individuals are getting depressed in alarming numbers when they think what even bigger army of profiteers and opportunists are injecting themselves into levels of the process where they least belong. What’s worse is that they trademark and sell their unwanted and can live without it injected processes, persuading upper and executive management that they will among other things provide better means of control.</li></ol><p>Now, wherever you turn there’s something or someone that is a living representation of the upper described concepts. You find yourself in winter: it’s dark, the time is short and somehow everything and everyone has an upper hand. Inevitably you pop the question: is that it? Should I even try to fight this lost war? Should I continue the path of the ninja warrior?</p><p>We’ll be touching upon these questions and more in part 3: “You won’t be able to turn it around overnight, but it’s not so complicated either!”</p><p>….stay tuned…..</p><p>Until then…Happy coding!</p><p>TehBoyan AKA ASleekGeek!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a1dd30fe23c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Can’t Always Say I Love Myself. And That’s Perfectly Fine]]></title>
            <link>https://medium.com/@bojanskr/i-cant-always-at-every-moment-say-that-i-love-myself-and-it-s-perfectly-fine-7c1376d19b72?source=rss-3897769475bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c1376d19b72</guid>
            <category><![CDATA[health]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[digital-life]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[lifestyle]]></category>
            <dc:creator><![CDATA[ASleekGeek]]></dc:creator>
            <pubDate>Mon, 15 Nov 2021 19:11:10 GMT</pubDate>
            <atom:updated>2022-05-30T09:12:04.784Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Hell, most of the time I wonder if I like myself</blockquote><h4><strong>D</strong>o you really think it’s fun failing this much?</h4><p>For every little thing that people consider success there are hundreds of failures I had to learn from. The end result we <em>like to call </em><strong><em>success </em></strong>is not even as romantic as they make it sound. By the time you reach it you’re so drained that you can’t tell the difference anymore. You get a tap on your back, or you give yourself one. Dust off and you’re off to the next big thing you inevitably going to f… up.</p><p>But, guess what? It’s not supposed to be!</p><p>I know what you’re thinking, I can prepare myself. I can do the research, try to sharpen the saw prior to the new stuff I’ll be working on, use only the latest and the greatest of best practices that people before me have came up with, from experience. I’ll wake up at 3AM and I’ll start weeks earlier so I’ll be totally ready for it. But, that’s not the answer I’ll give you as it is the one you are expecting!</p><p>Let’s keep following the story, shall we?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*XkG8qkzcd30BnK0xioBEwg@2x.jpeg" /><figcaption>copyright @ 2021 NASA</figcaption></figure><p>Couple of days in you slowly and disarmingly realize that you lack the practice and the routine that the same very people you read the advice from already had. You failed to predict and avoid several traps in approaching the problem and you go so deep into the wrong direction that by the time you realize you need to get some help from your peers in the team it’s already waist in deep so you risk it anyway and drag one or two of them into it and instead of taking a day or two like you initially thought, now it’s taking 2 weeks for the 3 of you, and no end in sight. People start asking questions, they understand that we now have a bigger problem, so they now try to help out by bringing some more people in to get fresh perspective and maybe offer a way out. You shift focus to get the new people, which are from another team in the organization, but they have faced something similar in the past. Gradually, after two more weeks of them trying to figure out how to help they realize they lack the insights from the team’s knowledge, so they get back to their team with the conclusion that they can’t help us without dedicating a lot of time for this, which they don’t have since some pressing issues have come up in their team as well.</p><p>After a month or so you spend a couple or more night shifts and you realize that it was some small detail you forgot to include in the very beginning which would be obvious and routine to a domain expert, but not you. You solve the problem or at least have a solution in mind. But, by this time you’re tired and suffer from “speed blindness”. You are so proud of your self and self confidence is back. You hack something together and call in a demo to show off your precious effort. After having to listen to something that makes no sense to anyone else but a person in your position and your perspective, everyone concludes you’ve just waisted their time with something trivial in their line of work that doesn’t require even mentioning let alone doing a technical heavy demo that they didn’t even understand. So, they leave in anger with comments to come back when you have something concrete. You are paralyzed and shocked. How can they don’t see?!?! How can they not understand?</p><p>Next few days you sulk and feel sorry for your self since the only way you value yourself short term is trough other people’s feedback on your worth. People often not qualified or out of context to give that feedback.</p><p>Doubt start’s kicking in. Your paranoia makes you start being doubtful about your teammates are not looking at you the way they used to before. They don’t include you or don’t ask you for opinions anymore. You start to suspect you’re getting isolated. You can’t sleep anymore and slowly go from one mistake to another, this is emphasized by the fact that some people are even happy about it. But, they all give you that same robotic feedback that is just empty voices in the distance. Your boss changes the tone of feedback which now contain elements of negativity with a touch of avoidance to be direct and straight honest as well as acting on the “last episode to not repeat itself anymore”.</p><p>Only a matter of time and headspace later you inevitably pop the:</p><blockquote>“Should I even consider staying in this team anymore?”</blockquote><p>To yourself at first then officially to everyone else. You gave up. You’re going to search harder and deeper to find that place. The happy land, The Eldorado.</p><p>Does it sound familiar now?</p><p>It’s not supposed to be. The key difference between success and failure and you liking yourself or not is in the case of failure and dislike you gave up, in the other you didn’t!</p><h4>Looking trough the eye of your “best” version of yourself</h4><p>If I only knew in before I took on that task, heh? I would have never taken the obligation or promised anything….</p><p>…We’ve all told ourselves that. I call it <em>“The after-battle general&quot;</em> syndrome. Like when we were in university and somehow knew all the answers after the exam, but were totally blocked during the same, when it mattered!</p><p>Watch this space going forward These are going to be series of posts that I intend to assemble into a book eventually. There’s just too much lessons learned and too many anecdotes such as the one above to just forsaken them.</p><p><a href="https://link.medium.com/n99Gw3f9olb">Read more in part 2…</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c1376d19b72" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>