<?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 Salman Ahmad on Medium]]></title>
        <description><![CDATA[Stories by Salman Ahmad on Medium]]></description>
        <link>https://medium.com/@ahmadsalman145?source=rss-e83f41bd4d6f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Rv-Q1llF7NC5r0C8kxsYjg.jpeg</url>
            <title>Stories by Salman Ahmad on Medium</title>
            <link>https://medium.com/@ahmadsalman145?source=rss-e83f41bd4d6f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:06:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahmadsalman145/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[Fixing Data Mismatch Problem: A Job I Delivered on Fiverr]]></title>
            <link>https://medium.com/@ahmadsalman145/fixing-data-mismatch-problem-a-job-i-delivered-on-fiverr-93c51ef58cb8?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/93c51ef58cb8</guid>
            <category><![CDATA[fiverr]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[pytorch]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Mon, 20 May 2024 14:40:34 GMT</pubDate>
            <atom:updated>2024-05-20T14:40:34.536Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S-Nk0c6xJT_3qT-E" /><figcaption>Photo by <a href="https://unsplash.com/@johannekek?utm_source=medium&amp;utm_medium=referral">Johanneke Kroesbergen-Kamps</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently, a client contacted me on Fiverr to debug his PyTorch code for binary classification. Binary classification is a type of classification problem where there are only two classes or labels.</p><p>The dataset was tabular, containing records about HTTP requests to a website. The problem he faced was data mismatch problem. A data mismatch occurs when the training data has more features than the test data or production data. Below is the dataset head.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*VrUTXrftetEQT-ExwFe6HQ.png" /><figcaption>dataset samples I worked on</figcaption></figure><p>Multiple columns like agent, protocol, and method are categorical. There are various approaches to working with categorical data and training a deep learning model: label encoding, one-hot encoding, frequency encoding, target encoding, and embedding layers, to name a few. There is no one-size-fits-all solution.</p><p>The code provided by my client was for training a very basic Dense Neural Network — a neural network with only Dense or Linear layers. Here is his PyTorch implementation of the network:</p><pre>class LogClassifier(nn.Module):<br>    def __init__(self, n_features, n_classes):<br>        super(LogClassifier, self).__init__()<br>        self.layer1 = nn.Linear(n_features, 128)<br>        self.layer2 = nn.Linear(128, 64)<br>        self.output_layer = nn.Linear(64, n_classes)<br><br>    def forward(self, x):<br>        x = F.relu(self.layer1(x))<br>        x = F.relu(self.layer2(x))<br>        x = self.output_layer(x)<br>        return x</pre><p>To handle the categorical data, he used the one-hot encoding method. This resulted in an enormous list of 37,669 feature columns in the training data. With this approach, every value or category in the categorical columns becomes a separate column.</p><p>For example, if the method column has GET, POST, PING, HEAD, and OPTIONS and there are 100 rows, the one-hot encoding will result in a 100 x 5 table. Let&#39;s see some code:</p><pre>import pandas as pd<br>data = pd.DataFrame({<br>    &#39;method&#39;: [&#39;GET&#39;, &#39;POST&#39;, &#39;HEAD&#39;, &#39;OPTIONS&#39;, &#39;PING&#39;]<br>})<br>encoded_train_data = pd.get_dummies(data, columns=[&#39;method&#39;])</pre><p>In pandas, the get_dummies function converts categorical data into one-hot encoded data. Each unique value in the method column is converted into a new binary (0/false or 1/true) column. Each row in the original column is represented by a 1/true in the corresponding new column and 0s/false in all other new columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*CLMLGFSfYw4v7MzufYyLDw.png" /><figcaption>encoded_train_data</figcaption></figure><p>And this is where data mismatch or data misalignment happens. If there is a unique category present in the training set but not in the test set, it will result in one less column in the one-hot encoded test data. For instance, if the above is our training data and our test data has only two samples of POST, we will get a 2 x 1 test input, but our model trained on the above data expects input in an N x 5 shape; where N is the number of rows or samples.</p><p>Dealing with data mismatches is crucial, especially when transitioning a trained model to production. In an ideal world (which does not exist), the input data in production would always match the training data perfectly. However, this is rarely the case in reality. Data in production can vary significantly, and it’s essential to handle these discrepancies to ensure the model performs reliably.</p><p>So how did I fixed the problem?</p><p>Before I write the solution, let me ask you: how would you solve this problem?</p><p>Pause reading here and think.</p><p>Have you thought of something? Let me know in the comments.</p><p>If your answer is ‘padding’, you are half way there.</p><p>The key to solving this problem is not only to add padding to the test data but also to maintain the exact sequence of the columns as it is in the training data.</p><p>For example, if the data looks like this:</p><pre>test_data = pd.DataFrame({<br>    &#39;method&#39;: [&#39;HEAD&#39;, &#39;HEAD&#39;, &#39;POST&#39;]<br>})</pre><p>The one-hot encoding will look like this:</p><pre>encoded_test_data = pd.get_dummies(test_data, columns=[&#39;method&#39;])</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*wNXMlh3vH9nH7suep1diSw.png" /><figcaption>encoded_test_data</figcaption></figure><p>Neural networks do not see the column names and process only values. So let’s extract only values:</p><pre>values = encoded_test_data.values<br><br>#result<br>array([[ True, False],<br>       [ True, False],<br>       [False,  True]])</pre><p>If we add padding to the values, it will look like this:</p><pre>#np is numpy, of course everybody knows it<br>padded_values = np.pad(encoded_test_data.values, ((0,0), (0, 3)))<br><br>#result<br>array([[ True, False, False, False, False],<br>       [ True, False, False, False, False],<br>       [False,  True, False, False, False]])</pre><p>Do you see the problem with just padding the data? It is hard to see without the column names but give it a try.</p><p>Using padding, we just solved the syntactical error, and we can feed this data to our model for training without getting any errors. But this encoding does not represent the test data accurately. Hence, we won’t get accurate results from our trained model.</p><p>If we decode the padded_values using the encoded training data, our test data would be GET, GET, and HEAD. But originally, it is HEAD, HEAD, and POST. I hope you get the point.</p><p>To fix this issue, you must consider the sequence of columns in the one-hot encoded training data along with the number of columns.</p><p>Here is the solution I delivered on Fiverr.</p><p>The first thing I did was to export the columns of the encoded training data to a pickle file:</p><pre>with open(&#39;data_columns.pkl&#39;, &#39;wb&#39;) as f:<br>    pickle.dump(encoded_train_data.columns, f)</pre><p>This file is to be used along with the ready-to-deploy trained model. Wherever the production code is deployed, it will need this pickle file to preprocess the incoming data for prediction.</p><p>The test data preprocessing would look like this:</p><pre>#load encoded training data columns from pickle file<br>with open(&#39;data_columns.pkl&#39;, &#39;rb&#39;) as f:<br>    data_columns = pickle.load(f)<br><br>#find which columns are missing in the test data<br>missing_columns = [col for col in data_columns if col not in test_data.columns]<br><br>#create an empty dataframe. This padding is to be added to the actual test data<br>padding_df = pd.DataFrame(np.empty((test_data.shape[0], len(missing_columns))), columns=missing_columns)<br><br>#merge padding data to the test data. With default params, the Pandas DataFrame <br>#join function joins/merge two dataframes using index-on-index method<br>test_data = test_data.join(padding_df)<br><br>#drop all those columns which are not in the training columns.<br>#if new categories are found in the test data which do not exist in the training set,<br>#this line of code drops all columns.<br>test_data = test_data.drop(columns=[col for col in test_data.columns if col not in data_columns])<br><br>#and finally rearrange the test data columns to match with the sequence of training data columns<br>#because, sequence matters. Yes, it does matter<br>test_data = test_data[data_columns].astype(&quot;float32&quot;)</pre><p>With this approach, you ensure that the test data has the same structure as the training data, making it suitable for model inference.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93c51ef58cb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Key to Become Successful at Freelancing]]></title>
            <link>https://medium.com/@ahmadsalman145/the-key-to-become-successful-at-freelancing-c704ed596af9?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c704ed596af9</guid>
            <category><![CDATA[freelancing-tips]]></category>
            <category><![CDATA[freelancing]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Sat, 07 Oct 2023 20:04:47 GMT</pubDate>
            <atom:updated>2023-10-07T20:04:47.156Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*X-qOn_lGXLA48_mPmx2mxw.jpeg" /></figure><p>The picture above is a screenshot of some feedback from one of my early freelance clients in 2017. I loved the content, felt proud of myself and shared it on my Facebook profile. Today, Facebook showed it to me as a memory.</p><p>The reason I am writing about this message here is that it comprehensively describes what clients expect from freelancers. However, it is missing a very crucial key to success in freelancing. I will let you know about that but first, here are the key takeaways from the message to become a successful freelancer.</p><h4>1. Believe in yourself</h4><p>Not only freelancing but everything worthy you do, start with “I got this” mindset. With this mindset, you will get the ability to keep moving forward and to keep pushing yourself the extra mile. It also helps you send a message to your subconscious mind to embrace for hard work and prepare not to let you give up. On the contrary, when you doubt on your ability to do something, you fail at that very moment. It is just a matter of how soon you will realize it. You are able to do all the things that you think you can do.</p><p>In freelancing, it will give you the confidence that you need to present yourself and make the person on the other side believe that you are the right person for the job.</p><h4>2. Take ownership of the work</h4><p>We, human are programmed to prefer the best for ourselves. It is necessary for our survival or maybe we think it is. In both cases, let it be materialistic or non-materialistic thing, if it has something to do with us, we want the best of it.</p><p>When you take ownership of the work given to you, you deal with it as it is your own personal project and your personal assets are on stack. Do your best to deliver the best. Always try to put a cherry on the top for your client. If you think something can be done in a better way than how your buyer asked you to do, don’t hesitate to communicate. Don’t worry about whether you will get paid for the extra work or not. Believe me, it will pay you more than what you expect. Go above and beyond in serving your clients.</p><h4>3. Help your client save their time</h4><p>Time is priceless for everyone of us. No one can bring back the time which has passed. Not a single person can buy himself an extra minute. We all get 24 hours in a day. The value of each hour is decided by who we are and how we use it.</p><p>If you are getting paid for doing a job, your client is not only paying for your skills but also for your time. How do you pay back? By doing the job in time. During your initial conversation with your client, never set any false expectation by promising early delivery to get the job. Be honest, communicate openly and try to get the job done before the deadline. If a mishap occurs (after all we are human), be transparent and never beat around the bush.</p><h4>4. Think out of the box</h4><p>It is highly unlikely that you are given some work to do that has never been done before in the entire human history. All you have to do is to sit down, break down the problem and figure out how to find a solution. This is the part where your mindset play a critical role. If you believe that you can do it, you can do it.</p><p>Make logical decisions and do what makes sense. Do your best. But if you fail, do not start looking for something to blame. Instead, communicate with your client and come up with a solution.</p><h4>5. End the project gracefully</h4><p>Long term relation with clients is the key to make freelancing a full time job. The percentage of repeating buyers (number of clients who hired you for more than once) determines the scale of your business in near future. Therefore, whether you succeed or fail in delivering the work, you should end it gracefully.</p><p>Sometimes, failure does not matter as much as how you see it and how others see it. If you succeed and meet all the requirements and the deadlines, it is a good opportunity to connect with client and offer your services for the next work they might have for you. Let them know that you are available and would love to work again with them. But if for some reason you fail to deliver, tell them about your efforts for the work to be done. Also, give a brief on why you failed so that they will know what works and what doesn’t. Again, end it gracefully and offer your services for future.</p><h4>6. Consistency</h4><p>Now, the missing piece — consistency. This is my personal favorite because I have been struggling with inconsistency for years. I can write about this all day long but let’s keep it short for now.</p><p>Whatever you do, if your dream is to escape the 9–5 grind and become a full time freelancer, inconsistency in your skill set can be a nightmare. Freelancing is not for jack of all trades. Freelance markets respect experts, those who specialize in a specific niche and consistently deliver quick, high-quality services.</p><p>Top clients seek efficiency and reliability. While an intermediate freelancer can provide efficient results, inconsistency may hinder speed. If you lack consistency in your skill set, it’s unlikely you’ll stand out in the competitive freelancing landscape.</p><h4>Conclusion</h4><p>In conclusion, freelancing offers tremendous opportunities for those who believe in themselves, take ownership of their work, value their clients’ time, think creatively, and maintain consistency. The journey to full-time freelancing may have its challenges, but these principles will guide you toward success.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c704ed596af9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Idea of CTRL + F in Real Life]]></title>
            <link>https://medium.com/@ahmadsalman145/the-idea-of-ctrl-f-in-real-life-bc9f9d88ec78?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc9f9d88ec78</guid>
            <category><![CDATA[productivity-tools]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[productivity-apps]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 16:26:56 GMT</pubDate>
            <atom:updated>2023-03-10T16:26:56.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nUZZU71Mc-Doowb7" /><figcaption>Photo by <a href="https://unsplash.com/@freegraphictoday?utm_source=medium&amp;utm_medium=referral">AbsolutVision</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>I love shortcuts, you love shortcuts, everybody loves shortcuts.</em></p><p>Computer technology has a critical role in our daily life. Imagine how the world today would look like if computers got vanished for some reason. What would you be doing without your phone, laptop, smartwatch and other smart gadgets? I would probably be sitting beneath an apple tree.</p><p>Do you know how Isaac Newton discovered gravity? He saw an apple falling off an apple tree and thought why the apple is falling to the ground? The key enabler of this discovery is not the apple falling down but the fact that Isaac Newton was sitting there not playing with his iPad or iPhone. If he has a phone or laptop to play with, I bet he would have never got the thought.</p><p>The point is that technology is making our lives easier with the passage of time. It saves us time and effort by providing a shortcut solution for a draining activity. Technology enables us to mitigate the hard work to machine and let us do other things we enjoy.</p><p>Speaking of shortcuts, everybody knows about ctrl + c, ctrl + v, ctrl + f and ctrl + z. The list is long but these and a few more have become part of our life and we often wish if we had somehow these shortcuts in real life (at least I do wish). If one of us had the power to copy and paste whatever he wanted as many times as possible, undo something regretful, or find things in split second, we would call him a superhuman.</p><p>Unfortunately, we do not have some magic pills yet, but we have artificial intelligence and gadgets which we can use to imitate some of these shortcuts up to an extent. One example of ctrl + c and ctrl + v is a photocopy machine and 3D printer. You can think of many more.</p><p>I am not sure about what surveys say if there is any, but I think the ctrl + f shortcut is the second top if not the first in a list of most daily used shortcuts. It contributes so much to our daily productivity and enable us to do the tedious task of searching in seconds.</p><p>In physical world we look for books in a bookshelf, we search for a record in printed lists, we look for a phrase in a book or newspaper that we have read and many more. When we try to find some text in real world, we always end up with unnecessary reading the entire content (silent speech or subvocalization).</p><p>Silent speech itself is a natural process when reading and it helps the mind to access meanings to comprehend and remember what is read, potentially reducing cognitive load. But when the goal is to find something, it becomes an overhead. We can call it the cost of searching. It reduces our productivity because we are implicitly using our energy in an activity that is not required and can be skipped.</p><p>To save ourselves from useless subvocalization, we can either work on our reading skills or adapt a smarter solution.</p><p>I tried to provide a smart solution by making <a href="https://play.google.com/store/apps/details?id=com.meancoder.livetextfinder">Live Text Finder</a>. It is an everyday productivity app which saves you time and effort when it comes to searching text in physical word. Text could be the name of a book that you are looking for in a bookshelf, an entry in a printed list, a quote or a phrase from a book or a newspaper that you have read. There are many other use cases where I believe a smart app like this can help us.</p><p>Live Text Finder can you find whatever text you are looking for in a few seconds. It saves you from subvocalization and reading all the stuff you don’t need to.</p><h3>How to use?</h3><p>After you have installed the app from play store, you just need to grab your phone, open the app, click the search button in the lower right corner, type what you are searching for, press done and point the camera towards your target. It will highlight the text if it is there in the frame. Easy peasy.</p><p>The app gives you some other options like you can turn on/off flash of your camera if needed. You can change the width and color of the bounding box that is used to highlight the searched text as well.</p><p>The app has just been launched a few days ago. In order to make it better, user feedback is the most valuable resource. I would love to know your suggestions and recommendations.</p><p>The app can be downloaded from <a href="https://play.google.com/store/apps/details?id=com.meancoder.livetextfinder">this link</a>. Thank you reading. Looking forward to your feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc9f9d88ec78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Art to Remain Silent]]></title>
            <link>https://medium.com/@ahmadsalman145/the-art-to-remain-silent-860de7d90ea5?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/860de7d90ea5</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Thu, 09 Mar 2023 18:17:11 GMT</pubDate>
            <atom:updated>2023-03-09T18:17:11.991Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WXY87MncEJd0a7gs" /><figcaption>Photo by <a href="https://unsplash.com/@tinaflour?utm_source=medium&amp;utm_medium=referral">Kristina Flour</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>When you are speaking, you don’t listen. If you don’t listen, you don’t learn. And there is no progress without learning. No matter what you are doing and whatever you are aiming for, the secret to success is consistent progress.</em></p><p>In a world that values constant communication and self-promotion, the art of remaining silent is becoming increasingly rare. But silence is not always a sign of weakness or a lack of knowledge; in fact, it can be a powerful tool for communication and self-awareness. Learning to remain silent when appropriate can lead to more effective communication, deeper understanding, and a greater sense of inner peace.</p><p>The first step in mastering the art of silence is to recognize when it is appropriate to remain quiet. In many situations, speaking up may be necessary, such as when sharing ideas, providing feedback, or expressing feelings. However, there are also times when remaining silent can be more productive, such as when listening to others, reflecting on a situation, or allowing space for others to speak. By learning to recognize when silence is appropriate, you can avoid interrupting others or speaking without purpose, and instead create a more respectful and productive environment.</p><p>One of the benefits of remaining silent is the opportunity to listen and learn from others. When we are focused on speaking, we may miss important information or insights from those around us. By remaining silent, we can absorb the perspectives of others and gain a deeper understanding of their experiences and opinions. This can help us build stronger relationships, develop empathy, and expand our own knowledge and awareness.</p><p>In addition to listening to others, the art of remaining silent can also help us listen to ourselves. When we take time to reflect on our own thoughts and feelings without immediately sharing them, we can gain a greater sense of clarity and insight. This can help us make more thoughtful decisions and communicate more effectively in the long run.</p><p>Finally, learning to remain silent can also lead to a greater sense of inner peace and calm. In a world that often values constant activity and stimulation, taking time to be still and quiet can be a powerful antidote to stress and anxiety. By giving ourselves space to simply be, we can recharge our minds and bodies, connect with our inner selves, and find a greater sense of balance and purpose.</p><p>In conclusion, the art of remaining silent is not about being passive or avoiding communication altogether. Rather, it is about recognizing when silence can be more productive and meaningful than speaking, and learning to listen to others and ourselves in a more thoughtful and intentional way. By practicing the art of silence, we can become more effective communicators, deepen our understanding of others and ourselves, and find greater peace and balance in our lives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=860de7d90ea5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Freelancing: Pros and Cons]]></title>
            <link>https://medium.com/@ahmadsalman145/freelancing-pros-and-cons-e7fb228e6831?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7fb228e6831</guid>
            <category><![CDATA[freelancing]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 18:06:47 GMT</pubDate>
            <atom:updated>2023-01-12T18:06:47.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mAlgY2vBLQj-ieCn" /><figcaption>Photo by <a href="https://unsplash.com/@abdullishere?utm_source=medium&amp;utm_medium=referral">Abdul A</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Working as a freelancer for a few years has been a good side hustle. It gave me some extra money and many opportunities to work with different people from different geographies and different field of expertise. I learned many things from my clients which I think I would never have got a chance to learn otherwise. But from the last few months, I am not actively working as freelancer due to my engagements in other things.</p><p>I reviewed the hours I worked for clients and found that freelancing has been a good journey. I love those notifications saying that client has left 5 stars and dollars of course. Freelancing is good side hustle or even a full-time income source, but it is not a moon walk on a buttery smooth stage either.</p><p>If you want to become a freelancer, here are some pros and cons of freelancing that I think you should consider before diving in.</p><p><strong><em>Note:</em></strong><em> </em><strong><em>These are my views, and you might not agree with it. If some or all of the content does not resonate with you, please ignore. But if it makes you think about freelancing even for a minute then the job is done.</em></strong></p><h3>Pros</h3><p><strong>Good income</strong> — Freelancers get paid well all over the world. You get paid better than you would if you work for local companies in your country. However, it is harder to get rolling initially. High profile clients do not trust new sellers as much as they do ranked sellers. But if you have work history or some open-source portfolio projects that you can show on your profile then it will help in developing trust between you and your clients. Otherwise, I will suggest you offer a competitive price for the services you offer and get a few quality reviews from clients. 5 stars matter more than anything else.</p><p><strong>Diversity</strong> — Buyers from all over the world are looking for hiring sellers on different freelance platforms. These platforms typically have a diverse range of buyers, including individuals, small businesses, and larger companies. While working as a freelancer, you meet with clients having different requirements and different expertise than yours. As you discuss their work with them and do their job, you get a lot to learn. It broadens the lens you see the world and yourself with and expands your skillset.</p><p><strong>PR —</strong> I work started working on Fiverr and joined Upwork a year ago. I have done more than 100 small and medium tasks for different clients. I usually ask some special clients to connect with me on LinkedIn. Although we do not talk regularly as friends do but I often get expert advice from them.</p><p><strong>Skill improvement —</strong> Freelancing can be a great way to develop new skills, as it provides an opportunity to take on a variety of projects and work with different clients. By taking on different projects, freelancers can gain experience in a wide range of industries, technologies, and disciplines, which can help them develop a diverse set of skills. As you keep working and your profile grows, you will need to improve your time management skills as well. Being flexible and finding a good work-life balance is one of the most challenging tasks for freelancers. Sooner or later in your freelancing journey, you will have to take initiative to improve your time management and self-management skills.</p><p><strong>Market awareness — </strong>Freelancing expose you to a variety of industries and market. You get an idea what kind of the problems people are addressing and what are the trends, challenges and opportunities in the market. You get better market awareness than those working only in their local markets. Better market awareness help you stay up to date with modern day demands and requirements and help you build your own personal brand.</p><p><strong>Freedom —</strong> Time and location flexibility is one of the major pros of freelancing. You can work from anywhere in the world at any time you want. All you need is just your laptop and an Internet connection. Apart from time and movement independence, freelancers have almost full control over their workload and schedule. Freelancers have the freedom to choose which projects to work on and how much work to take on. This can provide a sense of control over your workload and help you manage your time and energy more effectively.</p><p><strong>Being your own boss —</strong> Freelancers work on their own terms. They set their schedule as they think is the best for them. They set their own working hours. As a freelancer, you decide what projects to work on and how much work to take on. It gives you the freedom of saying no which very few employees have in corporate world. Freelancing allows you to be your own boss, giving you the freedom to make decisions about your business and your career.</p><h3>Cons</h3><p><strong>Active involvement —</strong> Active involvement is crucial for success as a freelancer. Individual freelancers are like a one-man army. They are actively involved in marketing and business management as well as looking for new clients. Also, unlike passive income streams and regular salary-based jobs, in freelancing you get paid only when you work unless you develop a long-term relation with some of your clients and you hire a team to do the work.</p><p><strong>Wrong money —</strong> Saying yes to every opportunity often leads to wrong paths. Wrong money, not in terms of its legal status and definition, is the money earned from work that does not align with long-term goals. Freelancing offers good amount of instant money and saying no to juicy dripping dollars is challenging. I am not saying that every penny earned on freelancing platforms is wrong money but the odds of earning it are high.</p><p><strong>Order crisis —</strong> An order crisis in freelancing is a situation in which a freelancer experiences a lack of work or projects. This can happen for a variety of reasons, such as a downturn in the economy, a decrease in demand for a particular type of work, or increased competition in the freelancing market. Order crisis can lead to financial hardship and uncertainty. Some common effects of an order crisis can include loss of income, difficulty paying bills, and stress.</p><p><strong>Dealing with hard clients — </strong>Hard clients are those who are difficult to work with due to various reasons<strong>. </strong>Clients who have unrealistic expectations of a project’s scope, timelines, or budget, who are difficult to reach or who do not provide clear instructions and clients who want to be involved in every detail and decision can be hard clients. This type of clients are often slow to pay or dispute invoices which can cause financial stress for freelancers and can damage the working relationship. And cherry on top is customer support favors the buyer/client 99% of the time in case of a conflict between buyer and seller. Dealing with such clients is a constant pain in the as*.</p><p><strong>Self-motivation —</strong> For me, this is one of the hardest parts. Freelancing requires a high level of self-discipline and self-motivation to manage your time and stay on top of your workload. Being actively involved in your work and setting goals for yourself can help you stay motivated and productive. You will need to keep pushing yourself in order to complete a job and keep working.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7fb228e6831" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Self-Discipline: Tips and Techniques for Achieving Your Goals]]></title>
            <link>https://medium.com/@ahmadsalman145/mastering-self-discipline-tips-and-techniques-for-achieving-your-goals-cf0145d3a7f6?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf0145d3a7f6</guid>
            <category><![CDATA[self-awareness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[habit-building]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Wed, 21 Dec 2022 16:32:03 GMT</pubDate>
            <atom:updated>2022-12-21T16:32:03.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lFDOB0NcOqN9lMmQ" /><figcaption>Photo by <a href="https://unsplash.com/@h4x0r3?utm_source=medium&amp;utm_medium=referral">Thao LEE</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Self-discipline is a critical skill that can help you achieve your goals and lead a more fulfilling life. It involves the ability to control your thoughts, emotions, and behaviors, and to make choices that align with your values and long-term objectives.</p><p>Self-discipline requires effort and determination, but it can be developed and strengthened over time with practice. Here are some strategies for cultivating self-discipline:</p><h4>1. Set clear goals</h4><p>The first step in developing self-discipline is to have a clear understanding of what you want to achieve. This might involve setting long-term goals, such as completing a degree or starting a business, as well as shorter-term goals, such as saving money or exercising regularly. Setting specific, measurable, achievable, relevant, and time-bound (SMART) goals can help you stay motivated and focused on your progress.</p><h4>2. Make a plan</h4><p>Once you have identified your goals, it’s important to develop a plan for achieving them. This might involve breaking your goals down into smaller, more manageable tasks, and setting deadlines for completing each one. Having a plan can help you stay organized and avoid feeling overwhelmed by the work ahead.</p><h4>3. Create a routine</h4><p>Establishing a daily routine can help you develop self-discipline by providing structure and predictability to your days. This might involve setting aside specific times for working, exercising, and relaxing, and sticking to those schedules as closely as possible. A routine can also help you prioritize your tasks and responsibilities, and make it easier to stay focused and avoid distractions.</p><h4>4. Find accountability</h4><p>Having someone to hold you accountable for your goals and actions can be a powerful motivator. This might be a friend, family member, coach, or mentor who can provide support and encouragement as you work towards your goals. Sharing your progress with others can also help you stay on track and stay motivated.</p><h4>5. Practice mindfulness</h4><p>Mindfulness is the practice of paying attention to your thoughts and feelings in the present moment, without judgment. Cultivating mindfulness can help you become more aware of your habits and behaviors, and can help you make more intentional choices. This can be particularly helpful in developing self-discipline, as it allows you to notice when you are veering off course and to make adjustments as needed.</p><h4>6. Learn to say no</h4><p>Sometimes, the most self-disciplined choice is to say no to things that distract or sidetrack you from your goals. This might involve declining invitations to social events, turning down requests for your time or energy, or setting boundaries with others. Learning to say no can be difficult, but it can be an important step in developing self-discipline and staying focused on what’s most important to you.</p><h4>7. Reward yourself</h4><p>Self-discipline doesn’t have to be all work and no play. It’s important to celebrate your achievements and reward yourself for your hard work. This might involve taking a day off, indulging in a favorite activity, or treating yourself to something you’ve been wanting. Rewarding yourself can help you stay motivated and can provide a sense of accomplishment and satisfaction.</p><h4>8. Practice self-control</h4><p>Self-discipline involves the ability to control your thoughts, emotions, and behaviors, and this requires a certain level of self-control. Self-control is the ability to resist temptations or impulses that might distract or sidetrack you from your goals. Practicing self-control can involve setting limits for yourself, such as not checking social media during work hours, or avoiding certain triggers that might lead to unhealthy behaviors, such as keeping junk food out of the house if you are trying to eat healthier.</p><h4>9. Stay motivated</h4><p>Self-discipline requires effort and determination, and it can be easy to lose motivation along the way. To stay motivated, it can be helpful to remind yourself of the reasons why you are pursuing your goals, and to celebrate your progress and accomplishments along the way. Surrounding yourself with supportive people who share your goals and values can also be a great source of motivation.</p><h4>10. Persevere through setbacks</h4><p>Self-discipline is not about being perfect or achieving your goals without any challenges or setbacks. It’s about staying committed to your goals and working through obstacles as they arise. When you encounter setbacks, it can be helpful to reframe your thinking and see them as opportunities for growth and learning. Remember that self-discipline is a journey, and that it takes time and practice to develop and strengthen this skill.</p><p>Self-discipline is a valuable skill that can help you achieve your goals and lead a more fulfilling life. By setting clear goals, making a plan, establishing a routine, finding accountability, practicing mindfulness, learning to say no, and rewarding yourself, you can cultivate self-discipline and make progress towards the things that matter most to you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf0145d3a7f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regularization in Deep Learning with Early Stopping: The Intuition]]></title>
            <link>https://medium.com/@ahmadsalman145/regularization-in-deep-learning-with-early-stopping-the-intuition-136e5b5de7a0?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/136e5b5de7a0</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 17:04:11 GMT</pubDate>
            <atom:updated>2022-11-27T17:04:11.614Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_njGWtP4bsmdOVBs" /><figcaption>Photo by <a href="https://unsplash.com/@picoftasty?utm_source=medium&amp;utm_medium=referral">Mae Mu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Disclaimer</h3><p>This article is written to establish intuition behind early stopping regularization technique. It does not describe or explain the algorithm or math behind the mechanism. Code sample is provided in TF Keras.</p><p>An artificial neural network is a combination of artificial neurons which does some math and try to estimate a mathematical function for mapping inputs to the outputs. This estimation process is called training or fitting.</p><h4>Basic training mechanism</h4><p>The math involved in ANN is mostly MAC (Multiply-Accumulate) operations where the input is multiplied by weights and biases are added to the product. One of the activation functions is applied to the output and it is forwarded to the next layer and the same process continues until it reaches to the end layer. This process is called feed-forward.</p><p>After the end layer calculation, the output computed by the network is compared with the actual output. The difference between actual output and estimated output is calculated using a function called loss function. Common loss functions these days are Mean Squared Error, Mean Absolute Error, Root MSE, Cross-Entropy etc.</p><p>The error calculated using loss function is propagated backward throughout the neural network in the form of gradients. This phase is called back propagation. In this phase, all the network parameters (weights and biases) are updated in order to minimize the error using another function called optimizer. There are different optimizer functions like SGD, Adam, Adadelta, Nadam, RMSprop etc.</p><p>One feed-forward and one back-propagation makes a single iteration. After each iteration, the model moves towards better estimation. The number of iterations is the ratio of total data samples over batch size. For example, if a dataset contains 10,000 samples and it is fed to a network in 100 samples per batch then the entire dataset is processed in 10,000/100 = <strong>100</strong> iterations. This makes a single epoch.</p><h4>What is overfitting and underfitting?</h4><p>After each epoch, the model improves and estimates better output. But the problem is that too much training leads to overfitting. An overfit model performs best only on the data it has been trained on and gives its worst performance for unseen data. It means the training needs to be stopped before the model overfits the data. However, it is just one end of the problem. The other end is if training is stopped too early, the model underfits. In underfitting conditions, a trained model gives average or worst performance on both seen and unseen data.</p><h4>So when do we stop training?</h4><p>To avoid overfitting and underfitting, we need an optimal value for network error or loss where the model neither overfits nor underfits. But there is no such theory which can recommend a perfect point. So how can we know when to stop training?</p><p>Fortunately, there are different algorithms designed to define the stopping point. And another good news is that all the famous deep learning libraries provide functions for these algorithms. As a fan and a user of TensorFlow, I will talk only about one of the functions provided by TensorFlow called <a href="https://www.tensorflow.org/api_docs/python/tf/keras/callbacks/EarlyStopping">EarlyStopping</a>. It is a callback method which needs to be hooked with train/fit function. It is available in <strong>tf.keras.callbacks</strong> module.</p><p>What it actually does is it monitors the neural network model while training and gives a stop command when the model no longer improves. <strong>Simple but read it again.</strong></p><p>To better understand this, let&#39;s assume that you are studying in a school which has strict monitoring and evaluation policy (I know it is a horrible scene but bear with me). Your performance is evaluated in your school at the end of each term. They keep you in the school as long as you are learning and improving. But as soon as you stop learning, they give you a warning and ask you to restore to your best learning mode. You try again for the next term and fail to improve. They give you another warning and let you keep doing the school things. You try again and harder this time but fail to learn effectively and they kick your ass out of the school this time.</p><p>Now think about yourself as the artificial neural network in the above story and your school as the legendary <strong>EarlyStopping</strong> callback.</p><p><strong>EarlyStopping</strong> gives you the ability to design your own custom convergence criteria by providing a comprehensive list of parameters (see the list below).</p><p><strong>monitor (string):</strong> this parameter specifies the metric which will be used as a base for making the holly decision (to stop the training). Remember how they evaluated you in the school story? Yah, it is the grads, curriculum and behavior. This parameter can have any of the two options: ‘val_loss’ and ‘val_acc’. The first refers to the loss value of your network after an epoch while the latter refers to the accuracy of the model.</p><p><strong>min_delta (float):</strong> it is the minimum change in the monitored quantity to be considered as an improvement e.g if you assigned val_acc to monitor and 0.01 to min_delta, it simply means that if accuracy of the model at the end of the current epoch is greater than the accuracy after previous epoch by at least 0.01, it would be considered as improvement otherwise, no improvement.</p><p><strong>patience (integer):</strong> patience is similar to the number of warnings given to a student in the school story. It specifies the number of epochs you want the EarlyStopping callback to wait for the model to improve. For example, if it is given a value of 3, the callback will ignore the no improvement state of the model for 3 epochs.</p><p><strong>verbose (integer):</strong> I bet you know this. No explanation.</p><p><strong>mode (string):</strong> One of {“auto”, “min”, “max”}. In min mode, training will stop when the quantity monitored has stopped decreasing; in max mode it will stop when the quantity monitored has stopped increasing; in auto mode, the direction is automatically inferred from the name of the monitored quantity. i.e. for ‘val_loss’, default value of mode is ‘min’ and for ‘val_acc’ default value is ‘max’.</p><p><strong>baseline (integer):</strong> Baseline value for the monitored quantity. Training will stop if the model doesn’t show improvement over the baseline.</p><p><strong>restore_best_weights (bool):</strong> Whether to restore model weights from the epoch with the best value of the monitored metric. If False, the model weights obtained at the last step of training are used.</p><p><a href="https://github.com/mrmean007/tfortechie/blob/master/mnist.py"><strong>sample python code at github</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=136e5b5de7a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the biggest mistake people make while learning programming?]]></title>
            <link>https://medium.com/@ahmadsalman145/what-is-the-biggest-mistake-people-make-while-learning-programming-695e672e1b8e?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/695e672e1b8e</guid>
            <category><![CDATA[programming-tips]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Sat, 19 Nov 2022 18:59:30 GMT</pubDate>
            <atom:updated>2022-11-19T18:59:30.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1mI9NNNv9cQRzEi7" /><figcaption>Photo by <a href="https://unsplash.com/es/@krakenimages?utm_source=medium&amp;utm_medium=referral">krakenimages</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Computer programming was the new swag in the old days. and it is till today.</p><p>Programmers are cool. aren’t they? Although they have a really f*cked up routine. Correction, they have no routine at all.</p><p>Despite all this, most of the gamers would like to meet those who created Pubg or COD if they get a chance.</p><p>If you know how to code, you can make your computer dance on your fingertips like a bar dancer. And how can we forget the new cool, AI. If you are a graphic designer and reading this, FYI AI does not mean only Adobe Illustrator all the time. It means artificial intelligence here.</p><p>And the most attractive thing you can get from programming is online money. $$$$</p><p>What else you can get from programming? You can design a mobile game as a gift for your girlfriend and hang her photos everywhere. You can give her whatever you want in the game. Even a little spy which can tell you about her activity, location, etc. Sounds interesting?</p><p>What else? You can make an automation tool that can get you a date on tinder automatically.</p><p>There are many free online courses that teach you how to code in different languages. Some people learn quickly, and some don’t. Some of them who don’t learn quickly give up and change their track. The rest keep going but still don’t make it far enough.</p><p>I agree with the people who say programming is a natural talent. If you don’t have it, just leave it and do something else.</p><p>But how do you know if you have the talent for programming or you are just an idiot? When computer professionals say idiot, they really mean users. No offense. <a href="http://www.techdoodling.com/2019/12/be-yourself-can-actually-ruin-your-life.html">Here</a> I talk about how to find the best version of yourself. Have a look, you will find it interesting.</p><p>Ok, back to programming. In my opinion, your talent for something is not a piece of cake waiting for you to go and eat it. It is a hidden treasure. It is easier to mine diamonds in Minecraft than identifying your talents. The difference between a talented person and an idiot is that the former has explored himself and the latter just gave up after a few steps.</p><p>There is a third group of people who are quite sure about themselves that they can become successful programmers. But they end up doing HTML.</p><p>Why? Here is the problem. They get themselves stuck in a loop that will curse them until they get out of it or die inside. I call it the basics loop.</p><p>People, who are in the loop, are obsessed with learning the basics of programming. They never move forward. They believe that they don’t know even the basics because they cannot write a piece of code in one try or due to any other reason.</p><p>They learn the basics. They somehow get a feeling that they don’t know the basics very well and they need to repeat. They get demoralized and get back to learning the basics. They fell into the trap again and the loop goes forever until they give up.</p><p>So, if you are trapped in the loop, how do you get out of it? Simply by not giving a f*ck.</p><p>Convince yourself that it is ok to let go of some things. It is ok if you don’t know the best practices in programming. It is ok if you write 10 lines of code for some tasks and your friend does the same in only 3 lines. It is ok if you get errors in your code, and you have to work your ass off to correct it. You know what the best part is? Nobody in the world can write 100% accurate and correct code for the first time. We all do get errors. Writing code is an iterative process.</p><p>Do you know? When developers write code and when they check it a week after, they always think what the heck was I thinking when I wrote this piece of shit?</p><p>How do you move forward?</p><p>If you don’t know for instance how to implement polymorphism in C++, you tried to learn but you couldn’t learn it 100%, just leave it there, pretend that you have learned it very well, and move to the next lesson. At some point in the future, return to the lesson that you have left and try to learn again. If you don’t get it, leave it and move forward. Then come back and repeat the same process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=695e672e1b8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modularity In Artificial Neural Networks]]></title>
            <link>https://medium.com/@ahmadsalman145/in-general-a-system-is-said-to-be-modular-if-it-can-be-divided-into-a-number-of-independent-dbe6c20d6a35?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbe6c20d6a35</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Wed, 16 Nov 2022 18:22:39 GMT</pubDate>
            <atom:updated>2022-11-16T18:23:47.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-uV92ZI2PkE-UwSu" /><figcaption>Photo by <a href="https://unsplash.com/@kaleidico?utm_source=medium&amp;utm_medium=referral">Kaleidico</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In general, a system is said to be modular if it can be divided into a number of independent subsystems, called modules. Modularity is a characteristic of any system where different modules work in coordination to achieve a common goal. Although, modular design is achieved with an additional cost but still it is preferred over a monolithic system.</p><p>Each module in a modular system is designed to solve an isolated sub-problem. This structure of loosely coupled modules coordinating with each other enhance fault tolerance of the system. Modular design also facilitates parallelism and scaling up the system to add additional functionality with no interference to the existing functions. Moreover, it makes it easier to localize and fix errors. In addition to facilitating, scaling up of the system, modularity also assists in reallocation of the functional units to new tasks.</p><p>A modular neural network is a neural network that incorporates the concepts and practices of modular design. A modular neural network can be decomposed into a number of sub-networks (modules) based on a certain criterion. The decomposition criteria may vary from system to system based on the level of modularity applied and the perspective of decomposition.</p><p>Artificial neural networks, since its inception, are inspired by biological neural networks in many aspects including modularity. Evolutionary studies have found that modularity of biological neural networks contributes to their stability and robustness. An ideal process for implementing biological design principles in artificial neural networks begins with highlighting the key functions of the design principles. There are a number of complex biological structural and functional details which are irrelevant to the design principle and can be abstracted away. The rest of the identified functions may be enhanced in the artificial domain. Both the abstracted and enhanced functions are mapped to artificial neural network to construct modular neural networks.</p><p>Biological neural networks exhibit structural and function modularity at different levels. Structural modularity refers to a pattern of anatomical synaptic links between neurons. The inter-regional pathways between cortical and subcortical gray matter region in human brain which from the human connectome is an example of structural modularity. In contrast to structural modularity, functional modularity dictates that a different clusters of neurons in a modular biological nervous system control different function.</p><p>The existence of different sub-problems in a system promotes modularity by providing a base for problem decomposition and functional separation of operations. Despite the fact that modularity has several advantages, but it is a challenging task to achieve modularity in artificial neural networks. Domain decomposition, additional hyperparameter tuning and inter-modules decision conflicts resolution are well known challenges in modular design in the context of ANN.</p><p>Modularity in ANN has been a center of interest for researchers since 1980s. The next decade follows the trend and several of fundamental techniques for modular neural networks has been introduced for various machine learning problems. In the literature, modularization techniques are divided into four categories in named: domain, topology, formation and integration. This classification is performed on the basis of the level of modularity induced by different solutions. A modularization technique can contribute to one or more of the mentioned categories. Domain refers to the input domain of an MNN which define the problem addressed. Topology is the overall architecture of an MNN where formation correspond to the process of path selection for input inside a modular network. It is the process that give rise to modularity. Integration algorithms integrate output of different modules that contribute to the final decision of the network.</p><p><strong>Domain</strong></p><p>The domain consists of all the data that a neural network process and learn from to generalize unseen data. It defines the problem that need to be addressed. Domain modularization is based on the rationale that a problem can be divided into pieces, each piece acting on a separate subdomain. Consequently, a module in MNN that is constructed by other techniques at different modularization levels can process one of the subspaces instead of the entire domain.</p><p><strong>Topology</strong></p><p>Modularity in the topology of a network create clusters of nodes called modules. Nodes inside a module are densely connected with each other while sparsely connected with nodes of other modules. The intra-module and inter-module connectivity pattern defines the level of modularity in a modular structure.</p><p><strong>Formation</strong></p><p>Formation in modular neural networks refer to the process that generates modularity in a network by path selection for input inside a modular network. In a given set of available modules in a network, formation technique makes a selection that will process the input. Formation can either be manual or automatic. In manual formation, human expert utilizes heuristics and intuition to define modularity in a network. Automatic techniques use evolutionary and machine learning algorithms for formation.</p><p><strong>Integration</strong></p><p>Integration defines how the final output from different modules is calculated. It could be either cooperative or competitive. In competitive integration, only one out of all the modules output is selected to contribute to the final output. However, cooperative integration leads to the contribution of all the modules to the final output. To the best of our knowledge, integration techniques combine modules output by arithmetic logic or by learning algorithms.</p><p>Modularity in neural networks enable us to convert the black box behavior of the monolithic network to somewhat understandable form where we know which group of weights respond to which cluster of data. It enables us to further divide a problem and transfer part of a trained network to be used for another problem. Despite the fact that modularity gives us finer control over the network, but it comes with a cost. One of the challenging problems is to create modular neural networks without or with minimum computational overhead.</p><p>During my master’s degree in computer science, I worked on inducing modularity in pretrained convolution neural networks by exploiting information in the confusion metrics. The paper is published in <a href="https://link.springer.com/article/10.1007/s11042-022-12331-2">Multimedia Tools and Publications</a>. My code is available on <a href="https://github.com/salman-git/Confusion-matrix-based-modularity-induction-into-pretrained-CNN">github</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe6c20d6a35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Tips to Become Good at Programming]]></title>
            <link>https://medium.com/@ahmadsalman145/4-tips-to-become-good-at-programming-d572c6aeabd9?source=rss-e83f41bd4d6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d572c6aeabd9</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming-tips]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Salman Ahmad]]></dc:creator>
            <pubDate>Sun, 13 Nov 2022 08:51:53 GMT</pubDate>
            <atom:updated>2022-11-13T08:51:53.536Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QlpxAzhdYHYgnuex" /><figcaption>Photo by <a href="https://unsplash.com/@jessbaileydesigns?utm_source=medium&amp;utm_medium=referral">Jess Bailey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I have heard many novice programmers saying that they want to get better at programming, but they hardly see a slight improvement in their skills with time. The reason that I have observed is that most of them just say they want to get better, they don’t really mean it. They mere wish to improve their skills. They do not work for it. Wishful thinking does not guarantee success at anything.</p><p>Many other people who have developed an interest in computer programming do not know how to reach to a point where they will be called successful programmers. They either keep wandering in the middle of nowhere or just give up. The same goes for them as well, your wish does not make you successful.</p><p>Programming is a field which requires intensive work to master. Along with improving your technical knowledge of programming, you need to work on your interest. You need to develop a habit of not giving up. You need to make your brain believe that it is capable of the things it thinks it is not. You need to know how to start and how to keep moving forward. You need to convince your inner self that one day you will become the person who they call a successful programmer.</p><p>I am not saying that technical knowledge is not necessary at all, and you should concentrate all your efforts on the non-technical things. What I am trying to say is that in order to get better at programming, a non-technical parallel process will help you. I am calling it a non-technical process for no good reason. You can call it whatever you want but let’s see what I mean by non-technical process.</p><p>It is nothing but a few habits and characteristics. The process is not specific to programming. It can be used for anything you want to achieve. It can be used to make more money, to get a sound health or make your relationships better. The reason I am calling it a process is that you need to keep practicing it. It never ends. Being a successful programmer is your goal and this is the process you need to repeat until you reach your goal.</p><p>The process has four key elements which are given below in the order it works for me.</p><h3>Four elements of the process:</h3><ol><li>Burning Desire</li><li>Faith</li><li>Imagination</li><li>Persistence</li></ol><h4>1. Burning Desire</h4><p>Desire is defined in oxford dictionary as a strong feeling of wanting to have something or wishing for something to happen. Desire is the first reason why we do anything. It gives us a direction to move on. It is desire which motivates us to do something.</p><p>But the desire itself it not enough for success. Desires are often replaced by other desires. In order to achieve what you desire for; you must have a burning desire and not just a desire. You must feel the urge to get whatever you want to. You must develop extreme interest, an interest which could not be diminished by procrastination.</p><h4>How to cultivate a burning desire to become a successful programmer?</h4><p>First of all, convince your mind that there is no backing out. Promise yourself that you will never quiet. Close all the doors that will help you escape.</p><p>Try to connect with people somehow who are already better than you in programming. Dan Peña, a successful businessman and a multimillionaire says:</p><blockquote>Show me your friends and I’ll show you your future.</blockquote><p>People you surround yourself with always have an influence on your personality. Surround yourself with people better than you to get inspiration and also with the people who are not as good as you. People below you in your circle will help you see your progress and will learn from you. Make new connections on LinkedIn and join programming communities on Facebook, Reddit, etc.</p><p>Next, reinforce your mind to believe that you are serious with programming, it is not a joke. Surround yourself with things which motivates you like print quotes and image of brilliant programming gurus and put them up around your house. Changing desktop and mobile backgrounds to motivating wallpapers really boost the desire.</p><p>There is nothing better than reading if you want to get good at something. Of course, practice is necessary, but reading is the first step. Practice comes next. Read books related to your topic, attend seminars, listen to podcasts etc. Most importantly, read success stories of successful programmers. Try to know how they got there where they are and what are they doing now. It will help you not to lose your interest.</p><p>There are a lot of ways to keep your desire alive. Search for them and follow them or be creative and create your own ways. There is no wrong or right way. What matters the most is which works for you.</p><h4>2. Faith</h4><p>Faith is complete trust or confidence in someone or something. I am talking about your belief in your abilities to succeed, self-confidence. You will never ever get the things that you believe you cannot.</p><p>The Power of Your Subconscious Mind is a wonderful book by Dr. Joseph Murphy who describe in detail how thoughts and believes are imprinted on subconscious mind and how these thoughts gain physical shape in the real world.</p><p>Confident people do not hesitate to ask questions. The more you ask, the more you learn. It gives you the ability to say yes to right things and no to wrong and inappropriate things. Confidence makes you able to overcome any sort of fear, fear of failure, fear of success, fear of misfortune, fear of what others think, fear of loss of love and relationship. It is self-confidence and faith in yourself which can make you set your goals high. If you believe that you will succeed, you will.</p><h4>3. Imagination</h4><p>If you can imagine yourself where you want to be, you will be there one day. Imagination is considered one of keys to success. All successful people are dreamers. If you can imagine something in your possession, you will have it. Either it is a skill, fortune, good relationship or anything else. Just believe in yourself, work for it and chase you dreams.</p><p>Let’s make it more related to programming. Powerful imagination helps a lot in logic building. Each concept of programming is a piece of puzzle. If you want to solve a problem, you need to combine these pieces. While you learn the basic concepts of programming, give each concept a unique shape in your imagination. For example, <strong>if statement</strong> could have a tree like shape and a loop could have a circular shape. Recall these shapes when you need to solve a problem.</p><p>To make the process more interesting, add sounds to it. As the two magnets make a sound when they come together, you imagine similar sounds when you combine two pieces of puzzle successfully.</p><p>Any combination that might sound perfect might not work in real. The only way to know is to try it. If it works, that’s cool, if it doesn’t, don’t give up and try again. Try different.</p><p>The imagination faculty of mind gets better with practice. The more you practice, the more powerful your imagination becomes. One day you will reach to a point where you will make more than half of the logic to solve a problem while reading or listening to a problem statement.</p><h4>4. Persistence</h4><p>Persistence is something that if you don’t have, you will never succeed. It does not matter how good you are at logic building, it does not matter how powerful your imagination is, it does not matter if you have a burning desire or not. If you are not persistent, you will never succeed.</p><p>Inconsistency is like a parasite. It eats all your efforts and all your hard work you done. I have listed inconsistency as first in 5 Mistakes That I Have Made. I know how inconsistency pushes one backward. How it downgrades the progress and how it vanishes most of the efforts one make. It is like an income tax. You work to make money for yourself and family and the govt takes its share for no reason.</p><p>If you want to be a good programmer, stick to programming. Never change your field. Learning how to code is a tedious task. Take your time to decide one programming language to learn and stick to it. Once you think you know how to code, then start learning other languages.</p><p>Remember, each and every concept is like a piece of puzzle. It does not matter what kind of color it has, if it fits somewhere, it will work. Same is the case with different programming languages. All basic concepts work the same in all languages, just the syntax is different. Once you become a master of a programming language, then learning a new language becomes just a matter of time. You just need to get familiar with its syntax.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d572c6aeabd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>