<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: chanduthedev</title>
    <description>The latest articles on DEV Community by chanduthedev (@chanduthedev).</description>
    <link>https://dev.to/chanduthedev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F138764%2Fd7d16a01-488d-468b-bb66-64111eb04769.jpg</url>
      <title>DEV Community: chanduthedev</title>
      <link>https://dev.to/chanduthedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chanduthedev"/>
    <language>en</language>
    <item>
      <title>Book a Cook</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Thu, 31 Oct 2024 04:09:36 +0000</pubDate>
      <link>https://dev.to/chanduthedev/testing-4bi2</link>
      <guid>https://dev.to/chanduthedev/testing-4bi2</guid>
      <description>&lt;p&gt;These days I am finding lot of requests in our gated community for cook for a day, only morning session etc. I think it will be good idea to have an mobile app for this.&lt;/p&gt;

</description>
      <category>idea</category>
    </item>
    <item>
      <title>Decorators in python</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sun, 11 Apr 2021 09:46:20 +0000</pubDate>
      <link>https://dev.to/chanduthedev/decorators-in-python-1g9j</link>
      <guid>https://dev.to/chanduthedev/decorators-in-python-1g9j</guid>
      <description>&lt;p&gt;Before learning decorators in python, lets check what is decorator in general.&lt;/p&gt;

&lt;p&gt;As the name itself says, decorator means, decorating or wrapping. If we say, decorating a table means making the table more beautiful by adding/placing other things like flowers, lights etc. So decorating basically means adding/modify extra things to make things looks differently.&lt;/p&gt;

&lt;p&gt;A similar way, in python, decorators means decorating or wrapping functions. We can add some more functionality before/after executing the actual function.&lt;/p&gt;

&lt;p&gt;Let's see this with example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decorator example with no arguments:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Normal function
def add_num():
    return 2 + 3

# Decorator function
def decorator_func(fun):
    def wrapper():
        res_str = f'Sum of 2 + 3 is '
        re = fun()
        return res_str + str(re)
    return wrapper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Normal function call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;add_num()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Decorator function call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dec_result = decorator_func(add_num)
print(dec_result)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;Sum of 2 + 3 is 5&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;span&gt;In Decorator function, we added an extra string value to make the result more clear. In this way decorators are very useful.&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Instead of calling decorator function directly, we can use annotations by using @ symbol like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@decorator_func
def add_num():
    return 2 + 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Normal function call with decorator annotation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dec_annot_call = add_num()
print(dec_annot_call)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Outout:&lt;br&gt;
&lt;code&gt;Sum of 2 + 3 is 5&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Decorator example with arguments:
&lt;/h3&gt;

&lt;p&gt;To pass arguments to the decorator function, we need to use keyword arg params *args and *kwargs like shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Decorator function with arguments
def decorator_func(fun):
    def wrapper(*args, **kwargs):
        res_str = f'Sum of {args[0]} + {args[1]} is '
        re = fun(*args, **kwargs)
        return res_str + str(re)
    return wrapper

# Decorator annotations for normal function with args
@decorator_func
def add_num(arg1, arg2):
    return arg1 + arg2

# Calling with args
dec_annot_call = add_num(8, 9)
print(dec_annot_call)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;code&gt;Sum of 8 + 9 is 17&lt;/code&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>decorator</category>
    </item>
    <item>
      <title>What is first class object in python?</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sat, 10 Apr 2021 05:55:43 +0000</pubDate>
      <link>https://dev.to/chanduthedev/what-is-first-class-object-in-python-1kh4</link>
      <guid>https://dev.to/chanduthedev/what-is-first-class-object-in-python-1kh4</guid>
      <description>&lt;p&gt;In &lt;strong&gt;python&lt;/strong&gt;, functions are first class objects in python.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of first class objects:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;We can treat functions like other normal objects like int, string, list etc&lt;/li&gt;
&lt;li&gt;We can pass functions as another function arguments, return a function in another function and assign a function to another variable&lt;/li&gt;
&lt;li&gt;Define a function within a function (Inner functions)&lt;/li&gt;
&lt;li&gt;This first class object plays a key role in python for decorator design pattern.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Simple function for adding two numbers
def add_num(num1, num2):
    return num1 + num2

# Passing function as a first argument
def add_values(fun, arg1, arg2):
    result = fun(arg1, arg2)
    return result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Assigning function name to the variable:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun = add_num
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Passing function as a parameter
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;two_num_sum = add_values(fun, 5, 8))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>functions</category>
      <category>decorators</category>
    </item>
    <item>
      <title>Category type in pandas</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Fri, 09 Apr 2021 13:16:25 +0000</pubDate>
      <link>https://dev.to/chanduthedev/category-type-in-pandas-3h73</link>
      <guid>https://dev.to/chanduthedev/category-type-in-pandas-3h73</guid>
      <description>&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; pandas library supports a data type called Category. When working with pandas dataframe, using Category will help in many ways. Let's see about Category datatype.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Category data type in pandas?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Category is a datatype which can be used when we have a fixed number of string values like 

&lt;ul&gt;
&lt;li&gt;Months(Jan, Feb)&lt;/li&gt;
&lt;li&gt;Country Names(India, Singapore)&lt;/li&gt;
&lt;li&gt;Size(Small, Medium, Large)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;In a simple way is using a sequence of integer values for the strings(Jan - 1, Feb - 2 etc)&lt;/li&gt;
&lt;li&gt;Categories are similar to ENUM data types in other programming languages like C/C++, Java.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Advantages of using Category:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Saving lot of memory by reducing the size &lt;/li&gt;
&lt;li&gt;Increasing processing speed&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How to use Category in pandas dataframe:
&lt;/h3&gt;

&lt;h5&gt;
  
  
  - While reading the CSV file:
&lt;/h5&gt;

&lt;p&gt;We can convert column from object to category while reading the file like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;filename = "~/Downloads/US_Accidents_Dec20.csv"
# Converting into category data type while reading CSV file
us_accidents_dec20_cat = pd.read_csv(filename, dtype = {'State' : 'category', 'City' : 'category'})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  - Converting column into category type:
&lt;/h5&gt;

&lt;p&gt;We can convert the column on the fly like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Loading csv file into data frame
filename = "~/Downloads/US_Accidents_Dec20.csv"
us_accidents_dec20_cat = pd.read_csv(filename,)

# Normal column access
us_accidents_dec20['State']

# Converting to category data type
us_accidents_dec20['State'].astype('category')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Memory comparison between Object vs Category data types:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Normal object column:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;us_accidents_dec20['State'].memory_usage(deep=True) / 1e6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;code&gt;249.720047&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Category column:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;us_accidents_dec20['State'].astype('category').memory_usage(deep=True) / 1e6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;code&gt;4.23684&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can clearly observe storage space reduced from 249 to 4 which is a very huge difference.&lt;/p&gt;

&lt;p&gt;Converting to Category data type will certainly help improve processing speed and space with a large set of data.&lt;/p&gt;

&lt;p&gt;Happy Learning!!&lt;/p&gt;

&lt;p&gt;P.S: Used Accidents' data of December 2020 from The USA, You can get this data from kaggle.&lt;/p&gt;

</description>
      <category>pandas</category>
      <category>dataframe</category>
      <category>python</category>
    </item>
    <item>
      <title>Python List vs NumPy Array</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sat, 09 Jan 2021 07:05:14 +0000</pubDate>
      <link>https://dev.to/chanduthedev/python-list-vs-numpy-array-3pjp</link>
      <guid>https://dev.to/chanduthedev/python-list-vs-numpy-array-3pjp</guid>
      <description>&lt;p&gt;I will try to explain why NumPy is more powerful and efficient compare with Python List. &lt;/p&gt;

&lt;p&gt;First we will see basic definition of the list vs Array programming terminology&lt;/p&gt;

&lt;p&gt;Lets see basic data structures &lt;strong&gt;arrays&lt;/strong&gt; and &lt;strong&gt;lists&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arrays:&lt;/strong&gt; are used to store  &lt;em&gt;homogeneous&lt;/em&gt; data (same data type) of &lt;em&gt;fixed&lt;/em&gt; size storing in &lt;em&gt;sequential&lt;/em&gt; order in memory&lt;br&gt;
&lt;strong&gt;Lists&lt;/strong&gt; are used to store data of &lt;em&gt;growing&lt;/em&gt; in size and storing this data in available place &lt;em&gt;anywhere&lt;/em&gt;(not sequential) in the memory.&lt;/p&gt;

&lt;p&gt;Almost same logic applies to Python List and NumPy Array. You can see in the below picture, how list and array stores data in memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F767ysmx0hpyq62ba89uh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F767ysmx0hpyq62ba89uh.png" alt="Python list and NumPy array"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python List:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Able to store different data types in the same list&lt;/li&gt;
&lt;li&gt;Storing each item in random location in the memory&lt;/li&gt;
&lt;li&gt;Good for the scenario where list can grow dynamically&lt;/li&gt;
&lt;li&gt;Inbuilt data type.&lt;/li&gt;
&lt;li&gt;It has more inbuilt functions &lt;/li&gt;
&lt;li&gt;Appending will take less time in O(1) time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;NumPy Array:&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can store only one data type in an array at any time&lt;/li&gt;
&lt;li&gt;Storing each item is sequential  which makes array more effective in processing.&lt;/li&gt;
&lt;li&gt;Good for the scenario where the items are fixed size and same data time&lt;/li&gt;
&lt;li&gt;Need to install external library NumPy&lt;/li&gt;
&lt;li&gt;No extra functions, so it will not more memory store.&lt;/li&gt;
&lt;li&gt;Appending elements will take more time in O(N) time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Happy Learning!!!&lt;/p&gt;

</description>
      <category>python</category>
      <category>numpy</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Error when trying to delete docker image</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sat, 02 Jan 2021 03:59:38 +0000</pubDate>
      <link>https://dev.to/chanduthedev/error-when-trying-to-delete-docker-image-1p68</link>
      <guid>https://dev.to/chanduthedev/error-when-trying-to-delete-docker-image-1p68</guid>
      <description>&lt;p&gt;When I try to remove docker image using &lt;code&gt;docker rmi image-id&lt;/code&gt;, many times I got below error.&lt;br&gt;
&lt;code&gt;Error response from daemon: conflict: unable to delete e3c37a7601a1 (must be forced) - image is referenced in multiple repositories&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Which means image was used by some other process.&lt;br&gt;
But When I use &lt;code&gt;docker ps&lt;/code&gt; to get docker process, got empty container list. &lt;/p&gt;

&lt;p&gt;Follow below three steps to delete docker image if you get this error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step1.&lt;/strong&gt; Use below command to show all container list.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker ps -a&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step2.&lt;/strong&gt; User below command to remove container&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker rm container-id&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step3.&lt;/strong&gt; Use below command to remove docker image.&lt;br&gt;
&lt;code&gt;docker rmi image-id&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Another way to delete docker unused containers.
&lt;/h4&gt;

&lt;p&gt;This will delete all unused  containers, networks, images (both dangling and unreferenced).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker system prune&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Be cautious while using this command as it will delete all containers.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerfile</category>
    </item>
    <item>
      <title>Is removing Duplicate code always good?</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sat, 19 Dec 2020 01:01:06 +0000</pubDate>
      <link>https://dev.to/chanduthedev/is-removing-duplicate-code-always-good-3771</link>
      <guid>https://dev.to/chanduthedev/is-removing-duplicate-code-always-good-3771</guid>
      <description>&lt;p&gt;While refactoring code, If I see duplicate code, I will do below&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a function with common code snippet &lt;/li&gt;
&lt;li&gt;Remove all the similar duplicate code &lt;/li&gt;
&lt;li&gt;Calling common method whenever required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  My opinion on duplicate code.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Need to update the code in all the places when some changes need in that code snippet &lt;/li&gt;
&lt;li&gt;Need to test all the flow which involves this code snippet &lt;/li&gt;
&lt;li&gt;There is a definite chance to miss to modify in all places (Major problem)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Removing duplicate code is good for maintainability as we will have less code(and less bugs ;-))&lt;/p&gt;

&lt;p&gt;But Removing duplicate code is not always good. &lt;br&gt;
As per the design principle &lt;strong&gt;keep it simple, stupid(KISS)&lt;/strong&gt;,&lt;br&gt;
unnecessary complexity should be avoided. All functions kept simple rather than made complicated.&lt;/p&gt;

&lt;h4&gt;
  
  
  Let's take below examples with sample code.
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Validating date format (startdate and enddate)&lt;/li&gt;
&lt;li&gt;Validating username (admin and customer)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These code samples are only for example purpose, so writing very basic validation code.&lt;/p&gt;

&lt;h5&gt;
  
  
  1. Validating date format:
&lt;/h5&gt;

&lt;p&gt;See duplicate code in the two methods validate_start_date and validate_end_date. &lt;br&gt;
In this case you can remove duplicate code and make a common method as validate_date().&lt;/p&gt;

&lt;h5&gt;
  
  
  Reason for making a common method are.
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;validation format is same (yyyy-mm-dd) for both methods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7rZXMbMC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gl6srwbcg9yw26sb3tgy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7rZXMbMC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gl6srwbcg9yw26sb3tgy.png" alt="Duplicate_code_example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  2. Validating username:
&lt;/h5&gt;

&lt;p&gt;for admin and customer users, even though code is almost same in both methods, validate_admin_username() and validate_customer_username(), It's NOT advised to replace into common method validate_usernmae() like validating date for below reasons.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y4Cgyqfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4oi5qmh15v0piyzjvpoz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y4Cgyqfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4oi5qmh15v0piyzjvpoz.png" alt="user_name_validation_duplicate_code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simplicity is the higher priority than maintainability&lt;/li&gt;
&lt;li&gt;Remove dependency between admin and customer - As per KISS design principle , not making complicated &lt;/li&gt;
&lt;li&gt;Different Feature enhancement may come in future for admin and customers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If we keep separate methods for admin and customer, later it will be very easy and simple for adding features separately for admin and customer.&lt;/p&gt;

&lt;p&gt;In conclusion, It is &lt;strong&gt;absolutely fine&lt;/strong&gt; to have duplicate code  until it matches KISS principle.&lt;/p&gt;

&lt;p&gt;Happy Learning!!!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>TOGAF 9.2 components</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sun, 29 Nov 2020 04:00:11 +0000</pubDate>
      <link>https://dev.to/chanduthedev/togaf-9-2-components-1flb</link>
      <guid>https://dev.to/chanduthedev/togaf-9-2-components-1flb</guid>
      <description>&lt;p&gt;For clearing TOGAF certification, there are two key topics.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Architecture Development Method(ADM)&lt;/li&gt;
&lt;li&gt;TOGAF Components.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have published article on TOGAF ADM, You can refer &lt;a href="https://dev.to/chanduthedev/togaf-9-2-architecture-development-method-adm-in-one-page-2387"&gt;here&lt;/a&gt; if not read earlier. &lt;br&gt;
If you memorize these two topics, I am sure you will clear TOGAF exam very easily.&lt;br&gt;
You can refer in the below picture all about TOGAF components in detail.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aFA9TgQx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lyijq87fekzd6e5rtgw9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aFA9TgQx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lyijq87fekzd6e5rtgw9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get the original image from &lt;a href="https://drive.google.com/file/d/16b0ytSMP2s8pHv-qJ9QpSQJYVb8sfV-V/view?usp=sharing"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>togaf</category>
      <category>enterprisearchitect</category>
      <category>ea</category>
    </item>
    <item>
      <title>TOGAF 9.2 Architecture Development Method(ADM) in one page</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Sun, 22 Nov 2020 05:26:31 +0000</pubDate>
      <link>https://dev.to/chanduthedev/togaf-9-2-architecture-development-method-adm-in-one-page-2387</link>
      <guid>https://dev.to/chanduthedev/togaf-9-2-architecture-development-method-adm-in-one-page-2387</guid>
      <description>&lt;p&gt;I have completed my TOGAF 9.2 certification part1 exam with 80% score. For TOGAF, Architecture Development Method(ADM) is the key architecture framework. After reading TOGAF documentation, I prepared completed ADM process in one page. I hope this will help others to complete TOGAF9.2 certification.&lt;br&gt;
When I prepare this page, TOGAF version was 9.2 and this one page prepared basing on TOGAF 9.2 version.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PuXRauuz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ypgnyp2ltjxy2hw144zm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PuXRauuz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ypgnyp2ltjxy2hw144zm.png" alt="TOGAF 9.2 ADM in one page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get the original image from &lt;a href="https://drive.google.com/file/d/1_okgOGMayUv219E_vnXVVaorEaJ0-rsB/view?usp=sharing"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Try to remember everything in the page and do not skip anything form this page. This will cover ~12-15 questions out of 40 questions. &lt;/p&gt;

&lt;p&gt;Happy Learning!!&lt;/p&gt;

</description>
      <category>togaf</category>
      <category>ea</category>
      <category>enterprise</category>
      <category>architecture</category>
    </item>
    <item>
      <title>docker learning</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Wed, 12 Aug 2020 15:23:08 +0000</pubDate>
      <link>https://dev.to/chanduthedev/docker-learning-dlo</link>
      <guid>https://dev.to/chanduthedev/docker-learning-dlo</guid>
      <description>&lt;p&gt;Recently I started working on a project which includes both NodeJS and Python application. We planned to Deodorization build process for our project. During Deodorization I faced multiple issues which I eventually solved. I thought of writing a post on my docker experience to help others. Below are the some of my observations/issues I found during my journey&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using multiple FROM in docker file&lt;/li&gt;
&lt;li&gt;Speed up docker docker builder by NOT copy all files at the same time&lt;/li&gt;
&lt;li&gt;Using RUN stead of CMD&lt;/li&gt;
&lt;li&gt;Use docker exec to run commands on docker container&lt;/li&gt;
&lt;li&gt;Showing docker containers (running docker images)&lt;/li&gt;
&lt;li&gt;Connect to the docker container
&lt;code&gt;docker exec -it CONTAINERID /bin/bash&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;How to access host application from docker container&lt;/li&gt;
&lt;li&gt;Expose Port numbers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Refer &lt;a href="http://www.chanduthedev.com/2020/08/my-docker-learnings.html"&gt;chanduthedev&lt;/a&gt; for more details.&lt;/p&gt;

&lt;p&gt;Happy Learning!!!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>tips</category>
      <category>dockerization</category>
    </item>
    <item>
      <title>ElasticSearch error message 'The [dims] property must be specified for field'</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Tue, 21 Jul 2020 13:56:14 +0000</pubDate>
      <link>https://dev.to/chanduthedev/elasticsearch-error-message-the-dims-property-must-be-specified-for-field-524l</link>
      <guid>https://dev.to/chanduthedev/elasticsearch-error-message-the-dims-property-must-be-specified-for-field-524l</guid>
      <description>&lt;p&gt;When I try to insert dense_vector values to ElasticSearch(ES), I got below error. I will explain how I resolved this error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PyTEcveg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v8swq09i6235iewfzjdi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PyTEcveg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v8swq09i6235iewfzjdi.png" alt="ES mappings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Used PUT method to create a index in ES with mappings as body&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PUT http://localhost:9200/my_index&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Created successfully and got below response.&lt;br&gt;
&lt;code&gt;{&lt;br&gt;
    "acknowledged": true,&lt;br&gt;
    "shards_acknowledged": true,&lt;br&gt;
    "index": "my_index"&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But when I try to insert values, got below error for the POST request.&lt;br&gt;
&lt;code&gt;POST http://localhost:9200/my_index/_creat&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Request Body:
&lt;/h4&gt;

&lt;p&gt;&lt;span&gt;{&lt;br&gt;
"name": "chanduthdev",&lt;br&gt;
"vector" : [ 8.56176019e-02, 6.78501204e-02]&lt;br&gt;
}&lt;/span&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Response :
&lt;/h4&gt;

&lt;p&gt;&lt;span&gt;{&lt;br&gt;
  "error": {&lt;br&gt;
    "root_cause": [&lt;br&gt;
      {&lt;br&gt;
        "type": "mapper_parsing_exception",&lt;br&gt;
        "reason": "The [dims] property must be specified for field [vector]."&lt;br&gt;
      }&lt;br&gt;
    ],&lt;br&gt;
    "type": "mapper_parsing_exception",&lt;br&gt;
    "reason": "The [dims] property must be specified for field [vector]."&lt;br&gt;
  },&lt;br&gt;
  "status": 400&lt;br&gt;
}&lt;/span&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution:
&lt;/h3&gt;

&lt;p&gt;To resolve this error, replace &lt;strong&gt;_creat&lt;/strong&gt; with &lt;strong&gt;_doc&lt;/strong&gt; in the url for the POST method.&lt;br&gt;
&lt;code&gt;POST http://localhost:9200/my_index/_doc&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Response:
&lt;/h4&gt;

&lt;p&gt;&lt;span&gt;{&lt;br&gt;
    "_index": "my_index1",&lt;br&gt;
    "_type": "_doc",&lt;br&gt;
    "_id": "3VbDcHMBBskIYHrmDycX",&lt;br&gt;
    "_version": 1,&lt;br&gt;
    "result": "created",&lt;br&gt;
    "_shards": {&lt;br&gt;
        "total": 2,&lt;br&gt;
        "successful": 1,&lt;br&gt;
        "failed": 0&lt;br&gt;
    },&lt;br&gt;
    "_seq_no": 0,&lt;br&gt;
    "_primary_term": 1&lt;br&gt;
}&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Happy Learning!!!&lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>es</category>
    </item>
    <item>
      <title>Difference between CLI and GUI</title>
      <dc:creator>chanduthedev</dc:creator>
      <pubDate>Mon, 09 Dec 2019 06:38:00 +0000</pubDate>
      <link>https://dev.to/chanduthedev/difference-between-cli-and-gui-1781</link>
      <guid>https://dev.to/chanduthedev/difference-between-cli-and-gui-1781</guid>
      <description>&lt;p&gt;One of the key thing I observed was that there are &lt;b&gt;NO&lt;/b&gt; hidden actions performed when using CLI where as in GUI, there might be some extra hiden actions will be performed which we are not aware off.&lt;/p&gt;

&lt;p&gt;When using CLI, "we know what exactly we are doing" whereas in GUI, "we dont know what extra things happening in the background". One of the best example of this was using &lt;b&gt;Sourcetree&lt;/b&gt; tool to commit code changes &lt;b&gt;git&lt;/b&gt; repository.&lt;/p&gt;

&lt;p&gt;Using CLI, to commit changes in git, there are two CLI commands, one is &lt;code&gt;git add&lt;/code&gt; to add files and second one is &lt;code&gt;git commit&lt;/code&gt; to add commit message.&lt;/p&gt;

&lt;p&gt;When using GUI with Sourcetree, We just need to provide the commit message after selecting files. &lt;/p&gt;

&lt;p&gt;GUI has the advantage of providing ease and simplicity to the customer. But as a developer or technical person, we should know what we are doing. My Suggestion is always prefer CLI and you never go to GUI until and unless you know what exactly what GUI tool is doing.&lt;/p&gt;

&lt;p&gt;Happy Learning!!!&lt;/p&gt;

</description>
      <category>git</category>
      <category>productivity</category>
      <category>tips</category>
    </item>
  </channel>
</rss>
