<?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 Vubon Roy on Medium]]></title>
        <description><![CDATA[Stories by Vubon Roy on Medium]]></description>
        <link>https://medium.com/@vubon.roy?source=rss-4aafa7c36146------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cYpAHx5MtbkBPkQlQkTKMA.jpeg</url>
            <title>Stories by Vubon Roy on Medium</title>
            <link>https://medium.com/@vubon.roy?source=rss-4aafa7c36146------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:01:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vubon.roy/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[Fan-Out Fan-In in Golang — The easy way]]></title>
            <link>https://medium.com/@vubon.roy/fan-out-fan-in-in-golang-the-easy-way-df77e9a929cd?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/df77e9a929cd</guid>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 18:41:36 GMT</pubDate>
            <atom:updated>2025-08-18T02:26:01.896Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fan-Out Fan-In in Golang — The easy way</h3><p>These days, low latency isn’t “nice to have” — it’s table stakes. So let’s talk about the <strong>Fan-Out/Fan-In</strong> pattern and why it’s my go-to for faster APIs and background work. After 6+ years building FinTech systems, I’ll share a real example that makes the concept easy to digest and hard to forget. You’ll be able to plug it into your services right away.</p><p>But before the demo, let’s hit the basics.</p><h3>What’s Fan-Out / Fan-In?</h3><p>Think about making breakfast: You start the coffee machine ☕ and pop bread into the toaster 🍞 at the same time. Both run independently, and when they’re done, you bring them together for your meal.</p><p>That’s basically <strong>Fan-Out/Fan-In</strong> in Go:</p><ul><li><strong>Fan-out</strong> → Start multiple tasks at the same time.</li><li><strong>Fan-in</strong> → Wait for all of them to finish, then combine results</li></ul><p>Let’s visualize with the diagram below.</p><pre>        Request<br>           │<br>           ▼<br>     ┌───────────┐<br>     │   Fan-Out │<br>     └─────┬─────┘<br>           │<br>   ┌───────┴────────┐<br>   │                │<br>   ▼                ▼<br>Task A          Task B<br>   │                │<br>   └───────┬────────┘<br>           │<br>     ┌───────────┐<br>     │   Fan-In  │<br>     └─────┬─────┘<br>           │<br>           ▼<br>     Final Result</pre><h3>Visa Transaction Example</h3><p>Let’s walk through a real example. Assume we need to process a payment with <strong>Visa (Card Scheme)</strong>. But before we can hit Visa’s endpoint, we have to call to a couple of own internal microservices:</p><ul><li><strong>IIN Service</strong> → to figure out the issuing bank</li><li><strong>3DS Service</strong> → to check if authentication is required</li></ul><p>Once we have both, we can build the request payload and send it off to Visa. Now here’s the key point: <strong>these two service calls don’t depend on each other</strong>. That means we don’t need to call them one after the other — we can fire them off at the same time. By doing that, It will reduce the overall latency.</p><pre>func ProcessVisaTransaction(cardNumber string) (VisaPayload, error) {<br> var wg sync.WaitGroup<br> var iinResp IINResponse<br> var dsResp ThreeDSResponse<br> var iinErr, dsErr error<br><br> wg.Add(2)<br><br> // IIN Service<br> go func() {<br>  defer wg.Done()<br>  iinResp, iinErr = IINService(cardNumber)<br> }()<br><br> // 3DS Check<br> go func() {<br>  defer wg.Done()<br>  dsResp, dsErr = ThreeDSService(cardNumber)<br> }()<br><br> // FAN-IN happens here<br> wg.Wait()<br><br> // Do something base on failure logic<br> if iinErr != nil {<br>  return VisaPayload{}, fmt.Errorf(&quot;IIN error: %v&quot;, iinErr)<br> }<br> if dsErr != nil {<br>  return VisaPayload{}, fmt.Errorf(&quot;3DS error: %v&quot;, dsErr)<br> }<br><br> // Combine results and call Visa API<br> return VisaThirdPartyAPI(iinResp, dsResp)<br>}</pre><h3>Where’s the Fan-Out &amp; Fan-In?</h3><p>The <strong>fan-out</strong> is when we launch both goroutines:</p><pre>go func() { ... }()<br>go func() { ... }()</pre><p>The <strong>fan-in</strong> is here:</p><pre>wg.Wait()</pre><p>That’s the moment we stop, wait for <em>both</em> to finish, and then combine the results.</p><p>Let’s visualize the whole scenario — this will make it easier to remember the pattern for a long time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*V9XQeR3Lgwuzve8Vblr4HQ.png" /><figcaption><strong>Fan-Out/Fan-In Golang</strong></figcaption></figure><h3>Why Bother?</h3><p>Let’s put some numbers on this to see the difference. Suppose each service responds with the following latencies:</p><ul><li>IIN Service takes: <strong>200ms</strong></li><li>3DS Check takes: <strong>300ms</strong></li></ul><p><strong>Sequential way</strong>: 200ms + 300ms = <strong>500ms total</strong><br><strong>Concurrent way</strong>: max(200ms, 300ms) = <strong>300ms total</strong></p><h3>When to Use?</h3><p>You can use this pattern when each task can execute <strong>independently</strong>. So there’s no barrier to running them in parallel.</p><h3>Gotchas</h3><ul><li>Watch for <strong>data races</strong> when writing to shared variables.</li><li>Always <strong>handle errors separately</strong> for each goroutine.</li><li>Concurrency doesn’t always mean faster — if tasks are CPU-heavy instead of IO-heavy, you might just be adding complexity.</li></ul><h3>Final Thoughts</h3><p>Fan-Out/Fan-In is one of those patterns that’s super simple but incredibly useful. Whenever you’ve got independent tasks — whether it’s calling APIs, running background jobs, or anything else you can think of — you can consider using this pattern.</p><p><strong>Less waiting, more doing!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df77e9a929cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s integrate the Firebase Realtime Database with Golang]]></title>
            <link>https://medium.com/@vubon.roy/lets-integrate-the-firebase-realtime-database-with-golang-7c065a7b7313?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c065a7b7313</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[firebaserealtimedatabase]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Mon, 15 May 2023 14:27:00 GMT</pubDate>
            <atom:updated>2023-05-17T15:25:01.842Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Firebase Realtime Databae &amp; Golang" src="https://cdn-images-1.medium.com/max/1024/1*qRppDcc1Q57Ru-6WtQmgHg.png" /><figcaption>Image Credit: Internet</figcaption></figure><p>Recently, I worked on a small project for personal interest. The project is based on a REST API that provides a single endpoint for searching Bank Identification Numbers (BINs). Initially, I used PostgreSQL for database management.</p><p>However, I encountered a problem with free database management options. <strong>Heroku</strong> offers a small amount of free space, allowing me to store up to 500 MB of data, but only up to 10,000 rows[<strong>N.B. Right now Heroku does not offer any PostgreSQL database management</strong>]. This limitation was insufficient for my needs as I required the ability to store <strong>1 million</strong> rows in the database. As a result, I transitioned from a relational database to a NoSQL database. After researching various options, I discovered that <strong>Firebase Realtime Database</strong> was an excellent solution. Google offers a free storage limit of <strong>1GB</strong>, with a download data limit of <strong>10GB</strong> per month. This was a significant increase from my previous database management options and suited my project perfectly.</p><p>In this article, I will explain how I integrated Firebase Realtime Database with my Golang project. To get started, you will need to install the Firebase SDK using the following command (<a href="https://github.com/firebase/firebase-admin-go">Link</a>)</p><pre>go get firebase.google.com/go</pre><p>Now, we need to create a Go file to establish our database connection. Let’s name this file `<strong>firebasedb.go</strong>`and use the following codebase:</p><pre>package main<br><br>import (<br> &quot;context&quot;<br> &quot;fmt&quot;<br> &quot;os&quot;<br><br> firebase &quot;firebase.google.com/go&quot;<br> &quot;firebase.google.com/go/db&quot;<br> &quot;google.golang.org/api/option&quot;<br>)<br><br>type FireDB struct {<br> *db.Client<br>}<br><br>var fireDB FireDB<br><br>func (db *FireDB) Connect() error {<br> // Find home directory.<br> home, err := os.Getwd()<br> if err != nil {<br>  return err<br> }<br> ctx := context.Background()<br> opt := option.WithCredentialsFile(home + &quot;Your JSON File Location&quot;)<br> config := &amp;firebase.Config{DatabaseURL: &quot;Your Database URL&quot;}<br> app, err := firebase.NewApp(ctx, config, opt)<br> if err != nil {<br>  return fmt.Errorf(&quot;error initializing app: %v&quot;, err)<br> }<br> client, err := app.Database(ctx)<br> if err != nil {<br>  return fmt.Errorf(&quot;error initializing database: %v&quot;, err)<br> }<br> db.Client = client<br> return nil<br>}<br><br>func FirebaseDB() *FireDB {<br> return &amp;fireDB<br>}</pre><p>You can establish a connection with the Firebase database by the below code.</p><pre>err := FirebaseDB().Connect()<br> if err != nil {<br> log.Println(err)<br> return nil, err<br>}</pre><p>If there are any connectivity issues, you will receive an error. In the next step, we will create a data model and store it for our project. We will also implement <strong>CURD</strong> (Create, Update, Read, Delete) methods.</p><p>Let’s name our model file ‘bin_model.go’ and our store file ‘bin_store.go’. In the model file…</p><pre>package main<br><br>import (<br> &quot;time&quot;<br><br> &quot;github.com/google/uuid&quot;<br>)<br><br>type Bin struct {<br> ID             uuid.UUID `json:&quot;id&quot;`<br> BIN            string    `json:&quot;bin&quot;`<br> CardNetwork    string    `json:&quot;card_network&quot;`<br> CardType       string    `json:&quot;card_type&quot;`<br> CardLevel      string    `json:&quot;card_level&quot;`<br> IssuerWebsite  string    `json:&quot;issuer_website&quot;`<br> IssuerBankName string    `json:&quot;issuer_bank_name&quot;`<br> CountryName    string    `json:&quot;country_name&quot;`<br> CountryCode    string    `json:&quot;country_code&quot;`<br> CreatedAt      time.Time `json:&quot;created_at&quot;`<br> UpdatedAt      time.Time `json:&quot;updated_at&quot;`<br>}</pre><p>In the store file</p><pre>package main<br><br>import &quot;context&quot;<br><br>type Store struct {<br> *FireDB<br>}<br><br>// NewStore returns a Store.<br>func NewStore() *Store {<br> d := FirebaseDB()<br> return &amp;Store{<br>  FireDB: d,<br> }<br>}<br><br>// Create a new BIN object<br>func (s *Store) Create(b *Bin) error {<br> if err := s.NewRef(&quot;bins/&quot;+b.BIN).Set(context.Background(), b); err != nil {<br>  return err<br> }<br> return nil<br>}<br><br>func (s *Store) Delete(b *Bin) error {<br> return s.NewRef(&quot;bins/&quot; + b.BIN).Delete(context.Background())<br>}<br><br>func (s *Store) GetByBin(b string) (*Bin, error) {<br> bin := &amp;Bin{}<br> if err := s.NewRef(&quot;bins/&quot;+b).Get(context.Background(), bin); err != nil {<br>  return nil, err<br> }<br> if bin.BIN == &quot;&quot; {<br>  return nil, nil<br> }<br> return bin, nil<br>}<br><br>func (s *Store) Update(b string, m map[string]interface{}) error {<br> return s.NewRef(&quot;bins/&quot;+b).Update(context.Background(), m)<br>}</pre><p>So overall we have done our tasks. Now we will test the functionality of then each method. In the <strong>main.go</strong> file inside we will implement all methods and</p><pre>package main<br><br>import (<br> &quot;log&quot;<br> &quot;time&quot;<br><br> &quot;github.com/google/uuid&quot;<br>)<br><br>func main() {<br> // Initiate the database connection<br> err := FirebaseDB().Connect()<br> if err != nil {<br>  log.Println(&quot;Database connection  error&quot;, err)<br> }<br> // Initiate our store<br> store := NewStore()<br> // A new BIN creation<br> err = store.Create(&amp;Bin{<br>  ID:             uuid.New(),<br>  BIN:            &quot;1234&quot;,<br>  CardNetwork:    &quot;Visa&quot;,<br>  CardType:       &quot;credit&quot;,<br>  CardLevel:      &quot;Standard&quot;,<br>  IssuerWebsite:  &quot;https://hello.com&quot;,<br>  IssuerBankName: &quot;Hello World Bank&quot;,<br>  CountryName:    &quot;United States of America&quot;,<br>  CountryCode:    &quot;US&quot;,<br>  CreatedAt:      time.Now().UTC(),<br>  UpdatedAt:      time.Now().UTC(),<br> })<br> // Get the BIN by bin number<br> bin, err := store.GetByBin(&quot;1234&quot;)<br> // Update the BIN issuer information<br> err = store.Update(&quot;1234&quot;, map[string]interface{}{&quot;issuer_bank_name&quot;: &quot;Alpha Bank&quot;,<br>  &quot;issuer_website&quot;: &quot;https://alpha.com&quot;})<br> //// Checking update balance<br> bin, err = store.GetByBin(&quot;1234&quot;)<br> log.Println(&quot;Update&quot;, bin.IssuerBankName, bin.IssuerWebsite)<br> //// Delete the account<br> err = store.Delete(bin)<br><br> if err != nil {<br>  log.Println(&quot;BIN related error&quot;, err)<br> }<br><br>}</pre><p>I hope this article will help you integrate the Firebase Realtime Database into your Golang project. I’m planning to write my next article on <strong>Unit testing</strong>, so stay tuned for that. <strong><br></strong>Anyway, you can retrieve BIN details by using my REST API service. Here’s the <a href="https://bin.vubon.me/api/v1/bin/checker/424242"><strong>link</strong></a>. Please note that the data may not be up to date.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c065a7b7313" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D Secure or 3DS — Payment]]></title>
            <link>https://medium.com/@vubon.roy/3d-secure-or-3ds-payment-2d9f2a70efd4?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d9f2a70efd4</guid>
            <category><![CDATA[payment-gateway]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[credit-cards]]></category>
            <category><![CDATA[payment-systems]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Sat, 18 Mar 2023 14:51:42 GMT</pubDate>
            <atom:updated>2023-03-18T14:51:42.436Z</atom:updated>
            <content:encoded><![CDATA[<h3>3D Secure or 3DS — Payment</h3><p>In my last article, I mentioned that I would talk about 3DS or 3D Secure. If you have not read that article, please read it first using the following <a href="https://medium.com/@vubon.roy/how-to-work-a-card-network-payment-6b4e1b710161">Link</a>. Let’s revisit that topic. In that same article, I introduced a person named <strong>Roy</strong>. Let’s continue to use his name for this example. Roy places an order for food using the <strong>Pathao app</strong> and pays via his credit card. During the payment process, he submits all of his card details and is then redirected to another web page where he needs to enter an OTP (one-time password). Finally, he submits the OTP and completes the transaction.</p><p>If you pay close attention, you’ll notice that Roy needs to submit an OTP to complete his transaction, and this step is facilitated by the 3D Secure system. Nowadays, virtually all credit and debit cards are enabled with 3D Secure, which provides an extra layer of security for online transactions. In other words, it helps protect both the cardholder and the merchant against fraudulent activity and gives customers more peace of mind when shopping online.</p><p>What does mean by 3DS?<br>-<strong> 3DS stands for Three Domain Secure.</strong> It involves three parties: the merchant/acquirer, the card network (such as Visa or Mastercard), and the issuer. In other words, these three domains are involved in the entire process to ensure security.</p><p>Let’s take a look at the flow</p><figure><img alt="3DS Flows by Vubon Roy" src="https://cdn-images-1.medium.com/max/1024/1*o-Ocu8tKeGNjAyW1Dl0Q-g.jpeg" /></figure><p>If you pay attention to the infographic, you will notice that there are three existing domains: Acquirer, Card Network, and Issuer domains. This is the main reason why it is called 3DS. Let&#39;s break down the flows:</p><p><strong>Step 1:</strong> The acquirer receives a transaction request from Pathao (Merchant).<br><strong>Step 2:</strong> The acquirer sends an authentication request to the dedicated card network (DS).<br><strong>Step 3: </strong>The <strong>Directory Server</strong> (DS) knows the actual issuer of the card and forwards the authentication request to the Issuer.<br><strong>Step 4:</strong> The issuer processes the authentication request with basic validation (cardholder&#39;s identity) and gets back to DS, which then forwards the response to the acquirer.<br><strong>Step 5:</strong> The acquirer receives a response from the Issuer with an ACS (<strong>Access Control Server</strong>) URL. The acquirer opens that URL for Roy. This is called an authorization request.<br><strong>Step 6:</strong> Now, Roy enters the OTP (One-Time Password) and completes the transaction.<br><strong>Step 7:</strong> After validating the OTP, the ACS service forwards it to the Acquirer.<br><strong>Step 8:</strong> Finally, the acquirer completes the transaction and gives a response to our actual merchant, Pathao.</p><p>Nowadays, we are using the 3DS 2.0 version, which is more secure and reliable. This version uses device information, advanced cryptography algorithms, biometric information, and more, such as RSA, AES, HMAC, etc., to protect against fraudulent activity and safeguard customer information.</p><p>As I always say, security comes at a cost — it may require extra time or money. The 3DS program may take a few seconds to complete the transaction, which could be a drawback. However, in my personal opinion, it is okay if it takes some extra time to complete a transaction since security should be the top priority, not speed. Alright, I am thinking of writing my next article from a coding perspective, so stay tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d9f2a70efd4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Work A Card Network - Payment]]></title>
            <link>https://medium.com/@vubon.roy/how-to-work-a-card-network-payment-6b4e1b710161?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b4e1b710161</guid>
            <category><![CDATA[visa-card]]></category>
            <category><![CDATA[debit-card]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[credit-cards]]></category>
            <category><![CDATA[mastercard]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 16:28:02 GMT</pubDate>
            <atom:updated>2023-03-01T16:28:02.575Z</atom:updated>
            <content:encoded><![CDATA[<p>For a long time, I did not write a single article. Suddenly, I thought I should write something about the financial system because I have been working with financial companies for four years already. The concept may be old, but there are still a lot of people who do not know how it works!</p><p>First things first, in this article, we will design a “Card Network” and understand how VISA, Mastercard, JCB cards, and others work. Let’s suppose that “<strong>Vubon</strong>” is the brand name of our card network system.</p><p>Let’s break down our system into multiple parts.</p><ol><li><strong><em>Customer (A card holder)</em></strong></li><li><strong><em>Merchant (Service provider, e.g. Food Service, Ride Service, etc)</em></strong></li><li><strong><em>Acquirer Bank (Who provides POS machine, Payment Gateway, etc)</em></strong></li><li><strong><em>Issuer Bank ( Who provides cards to customers)</em></strong></li><li><strong><em>Vubon card Network</em></strong></li></ol><p><strong>Customer: </strong>A customer can obtain a credit card from any issuing bank. However, if the customer wants a debit card, they should have a bank account with the same issuing bank. For instance, let’s say the customer’s name is Roy and he has a credit card with the card number 2222–3333–4444–5555.</p><p><strong>Merchant</strong>: Let’s refer to the merchant as Pathao (which is my ex-company). Pathao is providing food services to customers.</p><p><strong>Acquirer Bank: </strong>This bank mainly provides services such as a POS machine, payment gateway, etc.</p><p><strong>Issuer Bank: </strong>The issuing bank primarily issues credit or debit cards on behalf of the card network company. In this case, Vubon is our card network company, and therefore all card numbers are provided by <strong>Vubon</strong>.</p><p><strong>Vubon card network: </strong>As we have already established <strong>Vubon</strong> as a card network company, it will communicate with both the Issuing Bank and the Acquiring Bank.</p><p><strong>Example:<br></strong>Roy, a Pathao customer, orders food and pays using his credit card with the number 2222–3333–4444–5555. What happens behind the scenes? Take a closer look at the diagram for some insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*s1YEMxrP78l4jHocSPkffg.png" /><figcaption>Vubon Card Network</figcaption></figure><p>Here’s how the payment process works: <br><strong>Step 1:</strong> <strong>Roy</strong> submits his card details to Pathao. <br><strong>Step 2:</strong> <strong>Pathao</strong> submits the card details to the Acquirer. <br><strong>Step 3:</strong> The Acquirer identifies the card brand and submits the card details to <strong>Vubon</strong>. <br><strong>Step 4:</strong> <strong>Vubon</strong> identifies the Issuing Bank and requests authorization for the transaction by submitting the transaction details. <br><strong>Step 5:</strong> The Issuing Bank checks Roy’s account details, including balance and limitations. If everything is in order, the card network will receive a response from the Issuing Bank. The card network will then relay this response to the Acquirer and the merchant.<br>Finally, Roy receives a successful response for his transaction.</p><p>So, this is a basic explanation of how a card network system works and how a card transaction is processed. In my next article, I will discuss the <strong>3DS system</strong>. It is another mechanism that helps facilitate transaction flows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b4e1b710161" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Principles with Python Examples]]></title>
            <link>https://medium.com/@vubon.roy/solid-principles-with-python-examples-10e1f3d91259?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/10e1f3d91259</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[solid]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Sat, 02 Nov 2019 15:19:12 GMT</pubDate>
            <atom:updated>2019-11-02T16:30:22.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*s0b7xHpy4AOhDA1ylPMGpw.png" /></figure><p>Let’s deep dive into SOLID principles. SOLID is a short form. It stands for</p><blockquote>1. Single Responsibility Principle<br>2. Open and Closed Principle<br>3. Lisvok Sub situation Principle<br>4. Interface Segregation Principle<br>5. Dependency Inversion Principle</blockquote><p>This is the meaning of the SOLID. In this article, I’m going to try to explain SOLID Principles in the simplest way so that it’s easy for beginners to understand.</p><p>The SOLID principles were defined in the early 2000s by <a href="https://en.wikipedia.org/wiki/Robert_C._Martin">Robert C. Martin </a>(Uncle Bob). Uncle Bob elaborated some of these and identified others already existing and said that these principles should be used to get good management of dependencies in our code.</p><p><strong>Why do you need to know?</strong></p><blockquote>1. Easy to understand the codebase<br>2. Easy to extend<br>3. Easy to maintain the codebase<br>4. Robust code<br>5. Minimum changing existing codebase or not at all.</blockquote><p>Let’s go through each principle one by one:</p><p><strong>Single Responsibility Principle(SRP):<br></strong><em>A class should have only one responsibility and only one reason to change. That means a class does not perform multiple jobs.</em></p><p><strong>Example:<br>Violation of SRP</strong></p><pre>class Account:<br>   “””Demo bank account class “””<br>   def __init__(self, account_no: str):<br>       self.account_no = account_no</pre><pre>   def get_account_number(self):<br>       “””Get account number”””<br>       return self.account_no</pre><pre>   def save(self):<br>     “””Save account number into DB”””<br>     pass</pre><p><strong>How does it violate the SRP?<br></strong>In the account class, I am performing two tasks. One is stored data and another one gets account number. So it violates the SRP.</p><p><strong>Solution: </strong>A common solution to this problem is to apply the facade pattern. Let’s create another class and this class will handle database management job and the account class will only handle his properties.</p><pre>class AccountDB:<br>   &quot;&quot;&quot;Account DB management class &quot;&quot;&quot;<br><br>   def get_account_number(self, _id):<br>       &quot;&quot;&quot;Get account number&quot;&quot;&quot;<br>       pass<br><br>   def account_save(self, obj):<br>       &quot;&quot;&quot;Save account number into DB&quot;&quot;&quot;<br>       pass<br><br><br>class Account:<br>   &quot;&quot;&quot;Demo bank account class &quot;&quot;&quot;<br><br>   def __init__(self, account_no: str):<br>       self.account_no = account_no<br>       self._db = AccountDB()<br><br>   def get_account_number(self):<br>       &quot;&quot;&quot;Get account number&quot;&quot;&quot;<br>       return self.account_no<br><br>   def get(self, _id):<br>       &quot;&quot;&quot;<br>       :param _id:<br>       :return:<br>       &quot;&quot;&quot;<br>       return self._db.get_account_number(_id=_id)<br><br>   def save(self):<br>       &quot;&quot;&quot;account save&quot;&quot;&quot;<br>       self._db.account_save(obj=self)</pre><p><strong>Open and Closed Principle(OCP):<br></strong><em>Software entities (classes, function, module) open for extension, but not for modification (or closed for modification)</em></p><p><strong>Example:<br>Violation of OCP</strong></p><pre>class Discount:<br>   &quot;&quot;&quot;Demo customer discount class&quot;&quot;&quot;<br>   def __init__(self, customer, price):<br>       self.customer = customer<br>       self.price = price</pre><pre>   def give_discount(self):<br>       &quot;&quot;&quot;A discount method&quot;&quot;&quot;<br>       if self.customer == &#39;normal&#39;:<br>           return self.price * 0.2<br>       elif self.customer == &#39;vip&#39;:<br>           return self.price * 0.4</pre><p>This example is failed to pass the Open and Close Principle(OCP). Assume, we have a super VIP customer and we want to give a discount of 0.8 percentage. What would we do in this case? Maybe we will solve the problem this way</p><pre>.......<br>    def give_discount(self):<br>       &quot;&quot;&quot;A discount method&quot;&quot;&quot;<br>       if self.customer == &#39;normal&#39;:<br>           return self.price * 0.2<br>       elif self.customer == &#39;vip&#39;:<br>           return self.price * 0.4<br>       elif self.customer ==  &#39;supvip&#39;:<br>           return self.price * 0.8</pre><p>But this solution violates the OCP. Because we can’t modify the give_discount method. Only we can extend the method.</p><p><strong>Solution:</strong></p><pre>class Discount:<br>   &quot;&quot;&quot;Demo customer discount class&quot;&quot;&quot;<br>   def __init__(self, customer, price):<br>       self.customer = customer<br>       self.price = price</pre><pre>   def get_discount(self):<br>       &quot;&quot;&quot;A discount method&quot;&quot;&quot;<br>       return self.price * 0.2</pre><pre>class VIPDiscount(Discount):<br>   &quot;&quot;&quot;Demo VIP customer discount class&quot;&quot;&quot;<br>   def get_discount(self):<br>       &quot;&quot;&quot;A discount method&quot;&quot;&quot;<br>       return super().get_discount() * 2</pre><pre>class SuperVIPDiscount(VIPDiscount):<br>   &quot;&quot;&quot;Demo super vip customer discount class&quot;&quot;&quot;<br>   def get_discount(self):<br>       &quot;&quot;&quot;A discount method&quot;&quot;&quot;<br>       return super().get_discount() * 2</pre><p><strong>Liskov Substitution Principle(LSP):<br></strong><em>Let φ(x) be a property provable about objects x of type T. Then φ(y) should be true for objects y of type S where S is a subtype of T.<br>More formally, this is the original definition (LISKOV 01) of Liskov’s substitution principle: if S is a subtype of T, then objects of type T may be replaced by objects of type S, without breaking the program.</em></p><p>Liskov Substitution Principle was introduced by Barbara Liskov in her conference keynote “Data Abstraction” in 1987.</p><p><strong>Example<br>Violation of LSP</strong></p><pre>class Vehicle:<br>   &quot;&quot;&quot;A demo Vehicle class&quot;&quot;&quot;<br><br>   def __init__(self, name: str, speed: float):<br>       self.name = name<br>       self.speed = speed<br><br>   def get_name(self) -&gt; str:<br>       &quot;&quot;&quot;Get vehicle name&quot;&quot;&quot;<br>       return f&quot;The vehicle name {self.name}&quot;<br><br>   def get_speed(self) -&gt; str:<br>       &quot;&quot;&quot;Get vehicle speed&quot;&quot;&quot;<br>       return f&quot;The vehicle speed {self.speed}&quot;<br><br>   def engine(self):<br>       &quot;&quot;&quot;A vehicle engine&quot;&quot;&quot;<br>       pass<br><br>   def start_engine(self):<br>       &quot;&quot;&quot;A vehicle engine start&quot;&quot;&quot;<br>       self.engine()<br><br><br>class Car(Vehicle):<br>   &quot;&quot;&quot;A demo Car Vehicle class&quot;&quot;&quot;<br>   def start_engine(self):<br>       pass<br><br><br>class Bicycle(Vehicle):<br>   &quot;&quot;&quot;A demo Bicycle Vehicle class&quot;&quot;&quot;<br>   def start_engine(self):<br>       pass</pre><p>In Bicycle class violates the LSP. Cause in the Vehicle class has an engine method. But naturally, a bicycle has no engine. So we could not start any engine.<br>Refactor the code and make a solution for this problem.<br><strong>Solution:</strong></p><pre>class Vehicle:<br>   &quot;&quot;&quot;A demo Vehicle class&quot;&quot;&quot;<br>   def __init__(self, name: str, speed: float):<br>       self.name = name<br>       self.speed = speed</pre><pre>   def get_name(self) -&gt; str:<br>       &quot;&quot;&quot;Get vehicle name&quot;&quot;&quot;<br>       return f&quot;The vehicle name {self.name}&quot;</pre><pre>   def get_speed(self) -&gt; str:<br>       &quot;&quot;&quot;Get vehicle speed&quot;&quot;&quot;<br>       return f&quot;The vehicle speed {self.speed}&quot;</pre><pre>class VehicleWithoutEngine(Vehicle):<br>   &quot;&quot;&quot;A demo Vehicle without engine class&quot;&quot;&quot;<br>   def start_moving(self):<br>      &quot;&quot;&quot;Moving&quot;&quot;&quot;<br>      raise NotImplemented</pre><pre>class VehicleWithEngine(Vehicle):<br>   &quot;&quot;&quot;A demo Vehicle engine class&quot;&quot;&quot;<br>   def engine(self):<br>      &quot;&quot;&quot;A vehicle engine&quot;&quot;&quot;<br>      pass</pre><pre>   def start_engine(self):<br>      &quot;&quot;&quot;A vehicle engine start&quot;&quot;&quot;<br>      self.engine()</pre><pre>class Car(VehicleWithEngine):<br>   &quot;&quot;&quot;A demo Car Vehicle class&quot;&quot;&quot;<br>   def start_engine(self):<br>       pass</pre><pre>class Bicycle(VehicleWithoutEngine):<br>   &quot;&quot;&quot;A demo Bicycle Vehicle class&quot;&quot;&quot; <br>   def start_moving(self):<br>       pass</pre><p>Actually, LSP is a concept that applies to all kinds of polymorphism. Only if you don’t use polymorphism of all you don’t need to care about the LSP.</p><p><strong>Interface Segregation Principle(ISP):<br></strong><em>Actually, This principle suggests that “A client should not be forced to implement an interface that it does not use”</em></p><p><strong>Example:<br>Violation of ISP</strong></p><pre>class Shape:<br>   &quot;&quot;&quot;A demo shape class&quot;&quot;&quot;<br>   def draw_circle(self):<br>       &quot;&quot;&quot;Draw a circle&quot;&quot;&quot;<br>       raise NotImplemented</pre><pre>   def draw_square(self):<br>       &quot;&quot;&quot; Draw a square&quot;&quot;&quot;<br>       raise NotImplemented</pre><pre>class Circle(Shape):<br>    &quot;&quot;&quot;A demo circle class&quot;&quot;&quot;<br>   def draw_circle(self):<br>       &quot;&quot;&quot;Draw a circle&quot;&quot;&quot;<br>       pass</pre><pre>   def draw_square(self):<br>       &quot;&quot;&quot; Draw a square&quot;&quot;&quot;<br>       pass</pre><p>In the above example, we need to call an unnecessary method in the Circle class. Hence the example violated the Interface Segregation Principle.<br><strong>Solution:</strong></p><pre>class Shape:<br>   &quot;&quot;&quot;A demo shape class&quot;&quot;&quot;<br>   def draw(self):<br>      &quot;&quot;&quot;Draw a shape&quot;&quot;&quot;<br>      raise NotImplemented</pre><pre>class Circle(Shape):<br>   &quot;&quot;&quot;A demo circle class&quot;&quot;&quot;<br>   def draw(self):<br>      &quot;&quot;&quot;Draw a circle&quot;&quot;&quot;<br>      pass</pre><pre>class Square(Shape):<br>   &quot;&quot;&quot;A demo square class&quot;&quot;&quot;<br>   def draw(self):<br>      &quot;&quot;&quot;Draw a square&quot;&quot;&quot;<br>      pass</pre><p>Another example</p><pre>class BankAccount:<br>   &quot;&quot;&quot;A demo Bank Account class&quot;&quot;&quot;<br>   def __init__(self, balance: float, account: str):<br>       self.account = {f&quot;{account}&quot;: balance}</pre><pre>   def balance(self, account: str):<br>       &quot;&quot;&quot;Get current balance&quot;&quot;&quot;<br>       raise NotImplemented</pre><pre>class Deposit(BankAccount):<br>   &quot;&quot;&quot;A demo circle class&quot;&quot;&quot;<br>   def balance(self, account: str):<br>      &quot;&quot;&quot;Get current balance&quot;&quot;&quot;<br>      return self.account.get(account)</pre><pre>   def deposit(self, amount: float, account: str):<br>       &quot;&quot;&quot;Deposit a new amount&quot;&quot;&quot;<br>       current = self.balance(account)<br>       new_amount = current + amount<br>       self.account.update({account: new_amount})</pre><p><strong>Dependency Inversion Principle(DIP):<br></strong><em>This principle suggests that below two points.<br>a. High-level modules should not depend on low-level modules. Both should depend on abstractions.<br>b. Abstractions should not depend on details. Details should depend on abstractions.</em></p><p><strong>Example:<br>Violation of DIP</strong></p><pre>class BackendDeveloper:<br>    &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>    @staticmethod<br>    def python():<br>        print(&quot;Writing Python code&quot;)</pre><pre>class FrontendDeveloper:<br>    &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>    @staticmethod<br>    def javascript():<br>        print(&quot;Writing JavaScript code&quot;)</pre><pre>class Project:<br>    &quot;&quot;&quot;This is a high-level module&quot;&quot;&quot;<br>    def __init__(self):<br>        self.backend = BackendDeveloper()<br>        self.frontend = FrontendDeveloper()</pre><pre>    def develop(self):<br>        self.backend.python()<br>        self.frontend.javascript()<br>        return &quot;Develop codebase&quot;</pre><pre>project = Project()<br>print(project.develop())</pre><p>Another example</p><pre>class NewsPerson:<br>    &quot;&quot;&quot;This is a high-level module&quot;&quot;&quot;<br>    @staticmethod<br>    def publish(news: str) -&gt; None:<br>        &quot;&quot;&quot;<br>        :param news:<br>        :return:<br>        &quot;&quot;&quot;<br>        print(NewsPaper().publish(news=news))</pre><pre>class NewsPaper:<br>    &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>    @staticmethod<br>    def publish(news: str) -&gt; None:<br>        &quot;&quot;&quot;<br>        :param news:<br>        :return:<br>        &quot;&quot;&quot;<br>        print(f&quot;{news} Hello newspaper&quot;)</pre><pre>person = NewsPerson()<br>print(person.publish(&quot;News Paper&quot;))</pre><p>The project class is a high-level module and backend &amp; frontend are the low-level modules. In this example, we found that the high-level module depends on the low-level module. Hence this example are violated the Dependency Inversion Principle. Let’s solve the problem according to the definition of DIP.<br><strong>Solution:<br></strong>Example 1</p><pre>class BackendDeveloper:<br>   &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>   def develop(self):<br>       self.__python_code()</pre><pre>   @staticmethod<br>   def __python_code():<br>       print(&quot;Writing Python code&quot;)</pre><pre>class FrontendDeveloper:<br>   &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>   def develop(self):<br>       self.__javascript()</pre><pre>   @staticmethod<br>   def __javascript():<br>       print(&quot;Writing JavaScript code&quot;)</pre><pre>class Developers:<br>   &quot;&quot;&quot;An Abstract module&quot;&quot;&quot;<br>   def __init__(self):<br>       self.backend = BackendDeveloper()<br>       self.frontend = FrontendDeveloper()</pre><pre>   def develop(self):<br>       self.backend.develop()<br>       self.frontend.develop()</pre><pre>class Project:<br>   &quot;&quot;&quot;This is a high-level module&quot;&quot;&quot;<br>   def __init__(self):<br>       self.__developers = Developers()<br>   def develops(self):<br>       return self.__developers.develop()</pre><pre>project = Project()<br>print(project.develops())</pre><p>Example 2:</p><pre>class NewsPerson:<br>   &quot;&quot;&quot;This is a high-level module&quot;&quot;&quot;<br>   @staticmethod<br>   def publish(news: str, publisher=None) -&gt; None:<br>       print(publisher.publish(news=news))</pre><pre>class NewsPaper:<br>   &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>   @staticmethod<br>   def publish(news: str) -&gt; None:<br>       print(&quot;{} news paper&quot;.format(news))</pre><pre>class Facebook:<br>   &quot;&quot;&quot;This is a low-level module&quot;&quot;&quot;<br>   @staticmethod<br>   def publish(news: str) -&gt; None:<br>       print(f&quot;{news} - share this post on {news}&quot;)</pre><pre>person = NewsPerson()<br>person.publish(&quot;hello&quot;, NewsPaper())<br>person.publish(&quot;facebook&quot;, Facebook())</pre><p>I hope the purpose of this article is clear and you now know when and how to use it. If you did, congratulations! I will meet you in the next one.<br>That all for today. Thank you for reading my article and please do not forget to give claps.</p><p><a href="https://github.com/vubon/SOLID-Principles">Source Code</a></p><p><strong>Reference</strong>:<br>1. <a href="https://raygun.com/blog/solid-design-principles/">https://raygun.com/blog/solid-design-principles/</a><br>2. <a href="https://learning.oreilly.com/library/view/clean-code/9780136083238/">https://learning.oreilly.com/library/view/clean-code/9780136083238/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10e1f3d91259" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python: Symbol is better than built-in function]]></title>
            <link>https://medium.com/@vubon.roy/python-symbol-is-better-than-built-in-function-fcfcd12bd2f8?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcfcd12bd2f8</guid>
            <category><![CDATA[set]]></category>
            <category><![CDATA[function]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Sun, 15 Sep 2019 16:32:35 GMT</pubDate>
            <atom:updated>2019-09-15T16:32:35.751Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*ee60IMDs9EQkqbUkzHa-2Q.png" /></figure><h3>Benchmarking Function Calls Vs. Symbol</h3><p>[The time difference in my corei3 machine. It may vary on your machine]</p><pre>#Example 1<br>from timeit import timeit<br>print(timeit(&quot;my_tuple = tuple([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])&quot;))<br>print(timeit(&quot;my_tuple = ([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])&quot;))</pre><pre># Output<br># 0.3789963669996723<br># 0.1345829190004224</pre><pre>#Example 2<br>print(timeit(&quot;my_set = set([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])&quot;))<br>print(timeit(&quot;my_set = {*[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]}&quot;))</pre><pre># Output<br># 0.6751592210002855<br># 0.547103707000133</pre><p>You will see a probably trivial difference. But a difference is always a difference. Think about huge amount of data. How much cost of time to execute that data?</p><p><strong>What is Python actually doing </strong><br>Here are a few things that Python needs to do with functions:<br>1. Look up the function in the memory for using it.<br>2. Initialize and manage a frame for the function<br>3. Store all local variable<br>4. Store activation records (i.e. call frames) that are kept on the runtime stack.<br>5. Push the frame to the top of the sack when it’s finally called.</p><p>That’s a lot of stuff Python needs to do in order to handle your set() and tuple() call! In contrast, here’s what Python needs to do when using set syntax:</p><p>– It needs to load the constant (i.e. constant folding) for the operator.</p><p>In set example I used <strong>* </strong>symbol for unpacking list data and convert to set object otherwise you could not convert list to directly set.</p><p>Hope the purpose of this article is clear and you now know when and how to use it. If you did, congratulations! I will meet you in the next one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcfcd12bd2f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Property a built-in Python Function]]></title>
            <link>https://medium.com/@vubon.roy/property-a-built-in-python-function-dce50f5624d0?source=rss-4aafa7c36146------2</link>
            <guid isPermaLink="false">https://medium.com/p/dce50f5624d0</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pythonic]]></category>
            <category><![CDATA[property]]></category>
            <dc:creator><![CDATA[Vubon Roy]]></dc:creator>
            <pubDate>Sat, 14 Sep 2019 14:12:51 GMT</pubDate>
            <atom:updated>2019-09-14T15:51:48.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*BblWdGEo40u007XELtilHQ.jpeg" /></figure><p>Hmm. I am thinking what is that? let’s deep a dive with me. Before I start I want to ask some questions myself.<br>1. What is property in Python?<br>2. When should I use the Property function?<br>3. How to use the property function?<br>In this article, you will understand what exactly the Python Property does.</p><ol><li>What is the Property in Python?<br>In Python property is a built-in function. But you can also use the property as a <strong>decorator</strong>. Property function is helping to modify class attributes and give backward compatibility. But you should have a basic concept of Python classes and method. Because of the property is typically used inside one.</li><li>When should I use the Property function?<br>Assume, You create a class that store user bank account information like a bank account number and balance.<br>Let’s create the class</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5997233b7b15a5bc1dbf315ef257dea/href">https://medium.com/media/f5997233b7b15a5bc1dbf315ef257dea/href</a></iframe><p>Now, from this account we transfer the fund what will we get after calling the account_information attribute? Let’s transfer the balance and call the account_information attribute of the instance.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3c56a1e71004e3075dc2aa1c3c769a9/href">https://medium.com/media/b3c56a1e71004e3075dc2aa1c3c769a9/href</a></iframe><p>No change! But we transferred the balance. We expected that the balance should be 500.25. But it does not happen. Because Python does not change the account_information value. If we call the balance attribute we will get the exact balance. I mean the Current balance is 500.25.</p><p>Assume, you are working with a team and you are the owner of this bank account module. Also, you share your bank account module with your colleagues. Let’s your team members are working with a new module that is called Payment Gateway and they want to charge an amount from the bank account. When they call the account_information attribute. They will get the account balance is 1000.50. But we had already transferred 500.25 amount from that account. In this case, all team members are falling in trouble.</p><p>In this case, we can solve the problem by creating a new method of account class. Let’s create the method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c784287793d450bc505c2e5c3132ae9/href">https://medium.com/media/6c784287793d450bc505c2e5c3132ae9/href</a></iframe><p>Now we get the expected result. But Did you notice?? I commented out the account_information attribute and created a new method as the same name as the attribute. It has a backward compatibility issue. Because your teammates do not know the new method as the same name as the attribute and their codebase lines could be 1k or more than of their Payment Gateway module.</p><p>In this case, The Property will help to solve these two types of issue. The balance amount change problem and backward compatibility.</p><p>3. How to use the property function?<br>Let’s solve the problem in a Pythonic way.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09905bb0aa2dcd10ba60f16e6884de1b/href">https://medium.com/media/09905bb0aa2dcd10ba60f16e6884de1b/href</a></iframe><p>Both problems solved by using just property decorator. But The property function has more features. Such as you can set a new value, get the value, and delete the value.<br>Example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e23e7d88e94afce534b98888892651a/href">https://medium.com/media/4e23e7d88e94afce534b98888892651a/href</a></iframe><p>Hope the purpose of Property is clear and you now know when and how to use it. If you did, congratulations! I will meet you in the next one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dce50f5624d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>