<?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>Forem: Sakib Bin Kamal</title>
    <description>The latest articles on Forem by Sakib Bin Kamal (@terrancoder).</description>
    <link>https://forem.com/terrancoder</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%2F1500239%2Fef644e67-335e-448c-abed-d9800a911548.jpg</url>
      <title>Forem: Sakib Bin Kamal</title>
      <link>https://forem.com/terrancoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/terrancoder"/>
    <language>en</language>
    <item>
      <title>Crafting Modern Web APIs with Django and Django REST Framework: A Comprehensive Guide</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Sun, 14 Jul 2024 07:53:33 +0000</pubDate>
      <link>https://forem.com/terrancoder/crafting-modern-web-apis-with-django-and-django-rest-framework-a-comprehensive-guide-4fh7</link>
      <guid>https://forem.com/terrancoder/crafting-modern-web-apis-with-django-and-django-rest-framework-a-comprehensive-guide-4fh7</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In the interconnected world of the internet, much of our online activities depend on the seamless interaction of multiple computers through APIs (Application Programming Interfaces). These APIs define the communication protocols between computers, and in the realm of web development, RESTful APIs (Representational State Transfer) have become the standard. This structured approach enables efficient data transfer over the web, supporting everything from simple tasks to complex interactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before delving into Django REST Framework (DRF), it is crucial to have a solid understanding of Python programming, as DRF is built on Django, a Python framework. Familiarity with the basics of Django, including models, views, templates, and URLs, is highly beneficial since DRF extends these concepts to create APIs. Additionally, a fundamental understanding of RESTful architecture and HTTP methods is necessary to comprehend how DRF structures API endpoints and manages data serialization. Lastly, proficiency in version control systems like Git and knowledge of database management with Django ORM will aid in effectively managing and deploying DRF-powered applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Evolution of Django and APIs
&lt;/h3&gt;

&lt;p&gt;Django, first released in 2005, was originally designed as a complete framework for building monolithic websites. At that time, websites were a single, unified codebase managing everything from database interactions to frontend presentation. However, as web development practices evolved, there was a shift towards an "API-first" approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why an API-First Approach?
&lt;/h3&gt;

&lt;p&gt;Separating the backend logic from the frontend presentation provides several distinct advantages. Firstly, it future-proofs applications by enabling different frontend frameworks, such as React or Vue, to interact with a consistent backend API. This flexibility ensures that as frontend technologies evolve, the backend API remains stable, thereby minimizing the need for significant rewrites.&lt;/p&gt;

&lt;p&gt;Secondly, an API-centric architecture supports diverse frontend implementations across various platforms and programming languages. Whether it is a web frontend using JavaScript, an Android app using Java, or an iOS app using Swift, all can seamlessly communicate with the same backend API..&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter Django REST Framework
&lt;/h3&gt;

&lt;p&gt;Django REST Framework (DRF) is the premier choice for developing web APIs with Django. Renowned for its maturity, extensive features, and comprehensive documentation, DRF simplifies the process of creating APIs within Django applications. It adheres closely to Django's conventions, allowing developers familiar with Django to easily transition to building APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of Django and DRF
&lt;/h3&gt;

&lt;p&gt;The combination of Django and DRF not only facilitates the transformation of traditional Django applications into powerful APIs but also enhances customization and maintainability. Major tech companies such as Instagram, Mozilla, and Pinterest favor this approach due to its scalability and reliability in managing large-scale applications.&lt;/p&gt;

&lt;p&gt;Whether you are new to building APIs or already proficient in Django, mastering DRF can unlock new opportunities. With minimal additional code, DRF can convert an existing Django project into a robust web API, ensuring both accessibility and efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In conclusion, Django and Django REST Framework provide a robust foundation for developing modern web APIs. Embracing an API-first approach enhances flexibility and scalability, ensuring compatibility with various frontend technologies. By leveraging Django and DRF, developers can adhere to best practices in web development, allowing them to create and extend sophisticated APIs efficiently.&lt;/p&gt;

</description>
      <category>django</category>
      <category>api</category>
      <category>restapi</category>
      <category>python</category>
    </item>
    <item>
      <title>A Beginner's Guide to Python List Comprehension</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Thu, 11 Jul 2024 08:08:01 +0000</pubDate>
      <link>https://forem.com/terrancoder/a-beginners-guide-to-python-list-comprehension-166a</link>
      <guid>https://forem.com/terrancoder/a-beginners-guide-to-python-list-comprehension-166a</guid>
      <description>&lt;p&gt;List comprehension is a powerful technique in Python for creating lists in a concise and efficient manner. It allows you to condense multiple lines of code into a single line, resulting in cleaner and more readable code. For those new to Python or looking to enhance their skills, mastering list comprehension is essential. &lt;/p&gt;

&lt;h2&gt;
  
  
  Basics of List Comprehension
&lt;/h2&gt;

&lt;p&gt;At its core, list comprehension offers a compact method to generate lists. The syntax follows a structured pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new_list = [expression for item in iterable if condition]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's what each part does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;expression: The output value to be stored in the new list.&lt;/li&gt;
&lt;li&gt;    item: The variable representing elements in the iterable (such as a list or range).&lt;/li&gt;
&lt;li&gt;    iterable: A collection of elements to iterate over, such as a list, tuple, or range.&lt;/li&gt;
&lt;li&gt;    condition (optional): An expression that filters elements based on a specific criterion. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example 1: Creating a List of Squares
&lt;/h2&gt;

&lt;p&gt;Let’s begin with a straightforward example. Suppose you want to create a list of squares of numbers from 1 to 5 using a traditional loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;squares = []
for num in range(1, 6):
    squares.append(num ** 2)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's achieve the same result using list comprehension:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
evens = [num for num in numbers if num % 2 == 0]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;evens&lt;/code&gt; will contain &lt;code&gt;[2, 4, 6, 8, 10]&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example 2: Filtering Odd Numbers
&lt;/h2&gt;

&lt;p&gt;You can also incorporate a condition to filter elements. Here’s how you would filter out odd numbers from a list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
evens = [num for num in numbers if num % 2 == 0]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nested List Comprehension
&lt;/h2&gt;

&lt;p&gt;List comprehensions can also be nested, enabling the creation of more complex structures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;matrix = [[1, 2, 3],
          [4, 5, 6],
          [7, 8, 9]]
flattened = [num for row in matrix for num in row]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;flattened&lt;/code&gt; will result in &lt;code&gt;[1, 2, 3, 4, 5, 6, 7, 8, 9]&lt;/code&gt;, effectively flattening the matrix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of List Comprehension
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Readability: It enhances the conciseness and clarity of your code, making it easier to understand, particularly for seasoned Python developers.&lt;/li&gt;
&lt;li&gt;Performance: List comprehension typically offers better performance compared to traditional looping techniques in Python.&lt;/li&gt;
&lt;li&gt;Expressiveness: It enables you to articulate complex operations in a single line, thereby reducing the cognitive load when reading the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;List comprehension is an essential skill that every Python programmer should master. It improves both the readability and performance of your code, while also demonstrating your proficiency with Pythonic syntax. Begin incorporating list comprehension into your projects today to experience immediate enhancements in your coding efficiency.&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>cleancode</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Using Plotly for Interactive Dice Roll Data Visualization</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Mon, 08 Jul 2024 07:35:15 +0000</pubDate>
      <link>https://forem.com/terrancoder/using-plotly-for-interactive-dice-roll-data-visualization-48f6</link>
      <guid>https://forem.com/terrancoder/using-plotly-for-interactive-dice-roll-data-visualization-48f6</guid>
      <description>&lt;p&gt;In this tutorial, we will learn how to use Plotly to create interactive visualizations. Our project focuses on analyzing the results of rolling dice. When rolling a single six-sided die, any number from 1 to 6 has an equal chance of appearing. However, when you roll multiple dice, some numbers become more likely than others. Our goal is to determine these probabilities by simulating dice rolls and creating a dataset. After that, we will visually represent the results of multiple rolls to show which outcomes are statistically more likely.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Plotly?
&lt;/h2&gt;

&lt;p&gt;Plotly is an open-source graphing library that lets users create interactive, web-based visualizations. It supports many chart types, including line plots, scatter plots, bar charts, and more. Plotly is especially useful for creating visualizations that can be embedded in web applications, as it offers interactive features like zooming, panning, and hover information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Plotly
&lt;/h2&gt;

&lt;p&gt;We'll install Plotly using pip. We also need to install pandas, a library for efficiently working with data, because Plotly Express depends on it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python -m pip install --user plotly
$ python -m pip install --user pandas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit the gallery of chart types at Plotly's website to see the different visualizations you can create with Plotly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the Die Class
&lt;/h2&gt;

&lt;p&gt;First, we'll create the following Die class to simulate the roll of a die. We'll name the file Die.py.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from random import randint

class Die:
    """A class representing a single die."""

    def __init__(self, num_sides = 6):
        """Assume a six-sided die"""
        self.num_sides = num_sides


    def roll(self):
        """Return a random value between 1 and number of sides."""
        return randint(1, self.num_sides)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The __ init __ method takes one optional argument. When an instance of Die is created, the number of sides will be six if no argument is provided. If an argument is given, it will set the number of sides on the die.&lt;/p&gt;

&lt;p&gt;The roll() method uses the randint() function to return a random number between 1 and the number of sides. This function can return the starting value (1), the ending value (num_sides), or any integer in between. Dice are named according to their number of sides: a six-sided die is called a D6, a ten-sided die is called a D10, and so on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling the Die
&lt;/h2&gt;

&lt;p&gt;We first import the Plotly Express module using the alias px to avoid typing plotly.express repeatedly. We'll create an instance of a die to simulate rolling two D8 dice. We name this file dice_visual.py.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import plotly.express as px

from die import Die

# Create two D8.
die_1 = Die(8)
die_2 = Die(8)

# Make some rolls, and store results in a list.
results = []
for roll_num in range(500_000):
    result = die_1.roll() + die_2.roll()
    results.append(result)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Analyzing the Results
&lt;/h2&gt;

&lt;p&gt;The smallest possible result is the sum of the smallest number on each die (2). The largest possible result is the sum of the largest number on each die (16) which is assigned to max_results. The variable max_result improves the readability of the code for generating poss_results. We could've written range (2,16), but this would work only for two D8 dice. When simulating real-world circumstances, it is best to develop code that can readily handle a wide range of scenarios.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
# Analyze the result.
frequencies = []
max_results = die_1.num_sides + die_2.num_sides
poss_results = range(2, max_results + 1)
for value in poss_results:
    frequency = results.count(value)
    frequencies.append(frequency)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Visualizing the results.
&lt;/h2&gt;

&lt;p&gt;We defined the title and assigned it to 'title'. We created a dictionary to specify axis labels. The dictionary's keys represent the labels we want to customize, while the values represent the custom labels we want to use. We name the x-axis as 'Result' and the y-axis as 'Frequency of Result'. To build a bar graph, we use the px.bar() function and pass in the optional variables 'title' and 'labels'.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Visualize the results.
title = "Results of Rolling Two D8 Dice 500,000 Times"
labels = {'x': 'Result', 'y': 'Frequency of Result'}
fig = px.bar(x = poss_results, y = frequencies, title = title,
 labels = labels)
fig.show()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The plot is generated with an appropriate title and labels for each axis, as seen in the picture below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9anajcml3b68xiirkso7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9anajcml3b68xiirkso7.png" alt="Image description" width="800" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Customizations
&lt;/h2&gt;

&lt;p&gt;There is one issue we need to address with the plot we just created. Because there are 11 bars, the default x-axis layout settings leave some of the bars unlabelled. While the default settings are adequate for most visualizations, this chart would appear better with all of the bars labeled.&lt;/p&gt;

&lt;p&gt;Plotly offers an update_layout() method that lets you make various changes to a figure after it has been created. Here's how you can instruct Plotly to give each bar its own label.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Further customize chart.
fig.update_layout(xaxis_dtick = 1)
fig.show()
#fig.write_html('dice_visual_d6d10.xhtml')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The update_layout() method applies to the fig object, which represents the entire chart. We use the xaxis_dtick option to set the distance between tick marks on the x-axis. We set the spacing to 1 so that each bar is labeled. When you run dice_visual.py again, you should see labels on each bar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjxfrq9h32k83zwmzibw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjxfrq9h32k83zwmzibw.png" alt="Image description" width="800" height="754"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This code can be easily customized to simulate rolling dice of different sizes. To create a D6 and D10, pass the arguments 6 and 10 when creating the two die instances. Change the first loop to the desired number of rolls and change the title of the graph accordingly.&lt;/p&gt;

&lt;p&gt;We can get our program to save the chart as an HTML file automatically by replacing the call to fig.show() with a call to fig.write_html().&lt;/p&gt;

&lt;p&gt;The write_html() method requires one argument: the name of the file to write to. If you only provide a filename, the file will be saved in the same directory as the .py file. You can also call write_html() with a Path object to save the output file anywhere on your system.&lt;/p&gt;

&lt;p&gt;Here is the complete code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import plotly.express as px

from die import Die

# Create two D8.
die_1 = Die(8)
die_2 = Die(8)

# Make some rolls, and store results in a list.
results = []
for roll_num in range(500_000):
    result = die_1.roll() + die_2.roll()
    results.append(result)

# Analyze the result.
frequencies = []
max_results = die_1.num_sides + die_2.num_sides
poss_results = range(2, max_results + 1)
for value in poss_results:
    frequency = results.count(value)
    frequencies.append(frequency)

# Visualize the results.
title = "Results of Rolling Two D8 Dice 500,000 Times"
labels = {'x': 'Result', 'y': 'Frequency of Result'}
fig = px.bar(x = poss_results, y = frequencies, title = title, labels = labels)

# Further customize chart.
fig.update_layout(xaxis_dtick = 1)
fig.write_html('dice_visual.xhtml')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Refactoring
&lt;/h2&gt;

&lt;p&gt;For clarity, the listings in this section use the long form of for loops. We can refactor the code by using list comprehensions for one or both of the loops. Here is the code using list comprehension:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import plotly.express as px

from die import Die

# Create two D8.
die_1 = Die(8)
die_2 = Die(8)

# Make some rolls, and store results in a list.
results = [die_1.roll() + die_2.roll() for roll_num in range(500_000) ]

# Analyze the result.
max_results = die_1.num_sides + die_2.num_sides
poss_results = range(2, max_results + 1)
frequencies = [results.count(value) for value in poss_results]

# Visualize the results.
title = "Results of Rolling Two D8 Dice 500,000 Times"
labels = {'x': 'Result', 'y': 'Frequency of Result'}
fig = px.bar(x = poss_results, y = frequencies, title = title, labels = labels)

# Further customize chart.
fig.update_layout(xaxis_dtick = 1)

fig.write_html('dice_visual_list_comprehension.xhtml')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, analyzing and presenting statistical data becomes powerful and engaging with Plotly for interactive dice roll data visualization. By simulating dice rolls and visualizing the outcomes, we can better understand the probabilities of different results. Plotly's interactive features, such as hover information, panning, and zooming, enhance the user experience and make data more accessible. Additionally, the ability to customize and save visualizations as HTML files makes it easy to share and integrate them into web applications. This article demonstrates how to use Plotly's features to create informative and attractive charts. Plotly is an excellent tool for data analysis and presentation.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>plotly</category>
      <category>programming</category>
    </item>
    <item>
      <title>Python Cheat Sheet: Essential Guide for Beginners</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Sun, 09 Jun 2024 06:25:52 +0000</pubDate>
      <link>https://forem.com/terrancoder/python-cheat-sheet-essential-guide-for-beginners-2bdl</link>
      <guid>https://forem.com/terrancoder/python-cheat-sheet-essential-guide-for-beginners-2bdl</guid>
      <description>&lt;p&gt;This cheat sheet is designed as a helpful guide for those who have a solid understanding of &lt;strong&gt;Python basics&lt;/strong&gt;. It serves as a convenient reference while coding in Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables and Strings
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt; are used as containers to store data values in python. A string is a sequence of characters, enclosed in either single or double quotes, used for representing text data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Using a variable
greetings = "Good Morning!"
print(greetings)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  f-strings (using variables in strings)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;f-strings&lt;/strong&gt; enable the inclusion of variables within strings to create dynamic messages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;first_name = 'Sakib'
last_name = 'Kamal'
full_name = f"{first_name} {last_name}
print(full_name)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lists&lt;/p&gt;

&lt;p&gt;Lists are ordered collections of items, mutable (can be changed), enclosed in square brackets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Make a list
cars = ['bmw', 'audi', 'volvo']

#Get the first item in a list
first_car = cars[0]

#Get the last item in a list
last_car = cars[-1]

#Looping through a list
for car in cars:
    print(cars)

#Adding items to a list
cars = []
cars.append('bmw')
cars.append('audi')
cars.append('volvo')

#Making numerical lists
cubed_numbers = []
for i in range(1, 12):
    cubed_numbers.append(i ** 3)

print(cubed_numbers)

#List comprehensions
cubed_numbers = [i ** 3 for i in range(1, 12)]
print(cubed_numbers)

#Slicing a list
my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Get the first three elements
first_three = my_list[:3]
print(first_three)  # Output: [1, 2, 3]

# Get elements from index 2 to index 5 (exclusive)
middle_part = my_list[2:5]
print(middle_part)  # Output: [3, 4, 5]

# Get elements from index 5 to the end
last_part = my_list[5:]
print(last_part)  # Output: [6, 7, 8, 9, 10]

# Get every second element
every_second = my_list[::2]
print(every_second)  # Output: [1, 3, 5, 7, 9]

# Reverse the list
reversed_list = my_list[::-1]
print(reversed_list)  # Output: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tuples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tuples&lt;/strong&gt; are ordered collections of items, immutable (cannot be changed), enclosed in parentheses.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Making a tuple
candidates = ('Steve', 'Bill', 'Erwin')
scores = ('120', '116', '132')

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  If Statements
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If statements&lt;/strong&gt; are conditional statements that execute code based on whether a specified condition evaluates to true or false.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#equal
x == 78

#not equal
x ! = 78

#greater than
x &amp;gt; 78

#greater than or equal to
x &amp;gt;= 78

#less than
x &amp;lt; 78

#less than or equal to
x &amp;lt;= 78

#Conditional tests with lists
'audi' in cars
'toyota' not in cars

#Assigning boolean values
camera_on = True
can_record = False

#A simple if test
if age &amp;gt;= 18:
    print("You can drive!")

#if-elif-else statements
x = 10

if x &amp;gt; 10:
    print("x is greater than 10")
elif x == 10:
    print("x is equal to 10")
else:
    print("x is less than 10")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dictionaries
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dictionaries&lt;/strong&gt; are collections of key-value pairs, unordered and mutable, accessed by keys rather than by their position.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# A simple dictionary
student = {"name": "Alice","age": 20}

# Accessing values in the dictionary
print("Name:", student["name"])

# Adding a new key-value pair
student["university"] = "XYZ University"

# Removing a key-value pair from the dictionary
del student["age"]

#Looping through all key value pairs
top_speeds = {'audi': 120, 'bmw': '190', 'volvo': 170}

for car, speed in top_speeds.items()
    print(f"{car} top speed is {speed}.")

#Looping through all keys
top_speeds = {'audi': 120, 'bmw': '190', 'volvo': 170}

for car in top_speeds.keys():
    print(f"{car} has some speed.")

#Looping through all the values
top_speeds = {'audi': 120, 'bmw': '190', 'volvo': 170}

for speed in top_speed.values():
    print(f"{speed} is the top speed.")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  User input
&lt;/h2&gt;

&lt;p&gt;Data provided by the user during program execution. All inputs are used as strings&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Prompting for a value
name = input("What's your name?")
print(f"Hello, {name}!")

age = input("How old are you?")
age = int(age)

pi = input("What's the value of pi? ")
pi = float(pi)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  User input
&lt;/h2&gt;

&lt;p&gt;Data provided by the user during program execution. All inputs are used as strings&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Prompting for a value
name = input("What's your name?")
print(f"Hello, {name}!")

age = input("How old are you?")
age = int(age)

pi = input("What's the value of pi? ")
pi = float(pi)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  While loops
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;While loops&lt;/strong&gt; repeatedly executes a block of code as long as a specified condition is true.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# A simple while loop
count = 1

while count &amp;lt;= 5:
    print(count)
    count += 1

#Letting the user choose when to quit
message = ''
while message != 'quit':
    message = input("What's your message? ")
    print(message)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Functions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt; are blocks of reusable code that perform a specific task. They take inputs, perform operations and return outputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# A simple function
def print_hello():
    """Display a simple greeting."""
    print("Hello, welcome to the world of Python!")

print_hello()

# Passing an argument
def greet_user(username):
    """Display a personalized greeting"""
    print(f"Hello, {username}!")

greet_user('Reid')

# Default values for parameters
def icecream_flavors(flavor = 'strawberry')
    """Choose your favorite icecream flavor"""
    print(f"Have a {flavor} icecream!")

icecream_flavors()
icecream_flavors('vanilla')

# Returning a value
def add_numbers(x, y):
    """Add two numbers and return the sum"""
    return x+y

sum = add_numbers(2,8)
print(sum)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Classes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Classes&lt;/strong&gt; are blueprints for creating objects in Python. They define the properties and behaviors of objects. The information in a class is stored in attributes and functions that belong to a class are called methods. A child class inherits the attributes and methods from its parent class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Creating a drone class
class Drone:
    """Represent a Drone."""

    def __init__(self,model)
    """Initialize user object"""
        self.model = model

    def fly(self):
        """Simulate flying"""
        print(f"{self.model} is flying.")

my_drone = Drone('QuadCopter')

print(f"{my_drone.model) is capable of long flights!")
my_drone.fly()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#Inheritance
class SearchDrone(Drone):
    """Represent a search and rescue drone."""
    def __init__(self,model):
    """Initialize the search and rescue drone."""
    super().__init__(name)

    def search(self):
        """Simulate search and rescue operation."""
        print(f"{self.model} is carrying a search and rescue mission")

my_drone = SearchDrone('UAV')

print(f"{my_drone.model} is a search and rescue drone.")
my_drone.fly()
my_drone.search()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Working with files
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Working with files&lt;/strong&gt; in Python involves reading from and writing to files on your computer's filesystem. Python provides built-in functions and methods for opening, reading, writing, and closing files. Files are opened in &lt;strong&gt;read mode ('r')&lt;/strong&gt; by default, but can also be opened in &lt;strong&gt;write mode ('w')&lt;/strong&gt; and &lt;strong&gt;append mode ('a')&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exceptions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Exception&lt;/strong&gt; helps you respond to possible errors that are likely to occur. The code that might cause an error is put in the try block. Code that should run in response to an error goes in the except block. Code that should run only if the try block is successful goes in the else block.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try:
    # Code that may raise an exception
    x = 10 / 0  # Attempting to divide by zero
except ZeroDivisionError:
    # Handling the specific exception (division by zero)
    print("Error: You cannot divide by zero!")
else:
    # This block will execute if no exception occurs
    print("Division successful!")
finally:
    # This block will execute whether an exception occurs or not
    print("End of the program.")

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This &lt;strong&gt;Python cheat sheet&lt;/strong&gt; provides a concise yet comprehensive overview of essential concepts for beginners. By leveraging this guide, you can quickly reference key topics such as &lt;strong&gt;variables, strings, lists, tuples, if statements, dictionaries, user input, loops, functions, classes, file handling, and exceptions.&lt;/strong&gt; Keep this cheat sheet handy to reinforce your understanding and enhance your coding efficiency in Python.&lt;/p&gt;

</description>
      <category>python</category>
      <category>coding</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>FastAPI vs Flask vs Django: Which Framework to Choose?</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Sun, 09 Jun 2024 05:40:01 +0000</pubDate>
      <link>https://forem.com/terrancoder/fastapi-vs-flask-vs-django-which-framework-to-choose-2b5h</link>
      <guid>https://forem.com/terrancoder/fastapi-vs-flask-vs-django-which-framework-to-choose-2b5h</guid>
      <description>&lt;p&gt;Picking the right web framework is super important for your project's success. With so many choices out there, it can be tough to figure out which one is the best fit for you. In this article, we'll compare three popular Python frameworks—Flask, Django, and FastAPI. We'll highlight their key features, use cases, and advantages to help you make a well-informed decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview of the Frame works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Flask&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flask is a Python-based micro web framework that is lightweight and adaptable.&lt;/li&gt;
&lt;li&gt;    It's designed to be simple and easy to use, allowing developers to quickly create web apps.&lt;/li&gt;
&lt;li&gt;    Flask includes tools and libraries for routing URLs to functions, handling HTTP requests and responses, and managing sessions.&lt;/li&gt;
&lt;li&gt;    It follows the WSGI (Web Server Gateway Interface) specification and can be deployed on various web servers.&lt;/li&gt;
&lt;li&gt;    Flask is often used for smaller projects or when developers want more control over the app's design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Django&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Django is a high-level Python web framework that makes development fast and straightforward.&lt;/li&gt;
&lt;li&gt;    It follows the MVC (Model-View-Controller) pattern, but calls it MTV (Model-Template-View).&lt;/li&gt;
&lt;li&gt;    Django provides a complete solution, including an ORM (Object-Relational Mapper) for database work, an admin interface, URL routing, form handling, and templates.&lt;/li&gt;
&lt;li&gt;    It focuses on DRY (Don't Repeat Yourself) principles and has many built-in features to help you develop quickly.&lt;/li&gt;
&lt;li&gt;    Django is perfect for bigger, more complex applications where you need a comprehensive set of tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;FastAPI&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FastAPI is a modern and speedy web framework for building APIs with Python 3.7+ using standard Python type hints.&lt;/li&gt;
&lt;li&gt;    It's built on top of Starlette for the web parts and Pydantic for the data parts.&lt;/li&gt;
&lt;li&gt;    FastAPI is designed for high performance, using async/await syntax to handle requests asynchronously.&lt;/li&gt;
&lt;li&gt;    It automatically creates interactive API documentation (Swagger UI) based on the code's type annotations, making it easy to understand and test APIs.&lt;/li&gt;
&lt;li&gt;    FastAPI is becoming popular because it's easy to use, performs well, and supports modern Python features like type hints and async/await.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Comparing Flask, Django, and FastAPI: Learning Curve, Performance, and Use Cases
&lt;/h2&gt;

&lt;p&gt;Now that we have an overview of these frameworks, let's compare them in terms of &lt;strong&gt;'Ease of Learning'&lt;/strong&gt;, &lt;strong&gt;'Performance'&lt;/strong&gt;, and '&lt;strong&gt;Use Cases'&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ease of Learning
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Flask&lt;/strong&gt; is the easiest to learn. With Flask, you can have a fully functioning website or API in just a few minutes. Flask is known for its simplicity and straightforward style, making it easy for newcomers to pick up. Its documentation is thorough and well-organized, with clear instructions for getting started and building applications. Flask's flexibility allows developers to start small and gradually expand their knowledge as they dive deeper into web development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django&lt;/strong&gt;, while more feature-rich than Flask, has a steeper learning curve due to its extensive feature set and strict conventions. However, Django's comprehensive documentation, including the official tutorial, makes it accessible to developers of all skill levels. Once users grasp Django's concepts and standards, they can leverage its powerful built-in tools for rapid development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FastAPI&lt;/strong&gt; strikes a balance between simplicity and power, making it very easy to learn, especially for those familiar with modern Python syntax. Its documentation is detailed, highlighting its key features and providing clear examples for implementation. FastAPI's automatic generation of API documentation helps developers quickly understand and utilize its capabilities, enabling them to start building high-performance APIs in no time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Flask:&lt;/strong&gt; Flask is a lightweight microframework that performs well for small to medium-sized applications. It's designed to be flexible and minimalist, so for larger and more complex systems, you might need to add some extra optimizations. The performance of Flask largely depends on the libraries and extensions you choose to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django:&lt;/strong&gt;&lt;br&gt;
 Django is a full-stack framework, which means it has a bit more overhead compared to Flask because of its many features. However, Django is still quite powerful, especially for larger applications. It comes with built-in optimizations and caching mechanisms that help handle high traffic loads effectively. With the right configuration and tweaks, Django can perform exceptionally well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FastAPI:&lt;/strong&gt; FastAPI is known for its amazing performance, thanks to its asynchronous design and efficient request handling. By using modern Python features like async/await, FastAPI can manage a large number of concurrent connections with minimal resources. This makes it particularly great for building APIs where speed and scalability are crucial. FastAPI's speed makes it a fantastic choice for high-performance applications and microservices.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Cases
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Flask:&lt;/strong&gt; Flask is perfect for creating small to medium-sized web applications and APIs where you need simplicity and flexibility. It's a favorite for projects that need a lightweight framework with minimal fuss. Flask's modular design lets you pick only the parts you need, making it great for prototyping, quick development, and projects with specific needs or limitations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django:&lt;/strong&gt; Django shines when building large, full-featured web applications and content management systems (CMS). It's the go-to for projects that need a lot of built-in tools, like user authentication, an admin interface, ORM for database interactions, and URL routing. Django's all-in-one approach is ideal for complex data models, high-traffic sites, or projects that need to be developed quickly without losing scalability or maintainability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FastAPI:&lt;/strong&gt; FastAPI is all about building high-performance APIs with minimal code and maximum efficiency. It's the best choice for projects that need speed, scalability, and asynchronous processing, like microservices, real-time apps, or backends handling many concurrent requests. FastAPI also automatically generates interactive API documentation, making it perfect for projects where clear documentation and easy integration are key.&lt;br&gt;
Community and Ecosystem&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flask:&lt;/strong&gt; Flask has a lively and active community, with many third-party extensions and libraries contributed by developers from all over the world. The Flask ecosystem provides plenty of resources, including tutorials, documentation, and community forums, making it easy for developers to get help and find solutions to their problems. While Flask's ecosystem might not be as large as Django's, its simplicity and flexibility inspire community members to create lightweight and specialized tools for specific needs, encouraging innovation and experimentation within the Flask community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Django:&lt;/strong&gt; Django has one of the biggest and most established ecosystems among Python web frameworks. It comes with a strong set of built-in features and a huge collection of third-party packages and extensions available through the Django Package Index (PyPI). The Django community is known for being inclusive, accessible, and actively involved in developing and maintaining the framework. With reusable apps and plugins, detailed documentation, and community-driven forums, Django offers developers a ton of resources and support for building web applications of any size and complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FastAPI:&lt;/strong&gt; Despite being a newer player compared to Flask and Django, FastAPI has quickly become a favorite in the Python community. Its outstanding performance and modern way of building APIs have won many hearts. The FastAPI ecosystem is growing fast, with more and more contributors and a rising number of third-party tools and integrations. Although it's still evolving, the FastAPI community is known for its enthusiasm and helpfulness. Developers are always sharing resources, tutorials, and best practices, making it easy for newcomers to get started and for experienced users to fine-tune their projects for top efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Job Prospects
&lt;/h3&gt;

&lt;p&gt;Which of these frameworks should you learn if you're aiming to land a developer role? Honestly, Django is the most popular framework and appears in most job listings. It's the go-to choice for building websites or back-end services with Python. If you're looking to secure a developer job, learning Django is your best bet.&lt;/p&gt;

&lt;p&gt;There are also opportunities for Flask and FastAPI, especially with smaller companies or startups. However, you'll most often see Django as the primary framework in job descriptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In conclusion, choosing the right web framework depends on your project's specific needs and goals. Flask is ideal for small to medium-sized applications where simplicity and flexibility are key. Django is perfect for larger, more complex projects that require a full-featured framework with built-in tools and scalability. FastAPI stands out for its high performance and modern features, making it the best choice for building high-performance APIs and microservices. Each framework has its strengths, and understanding these can help you make an informed decision that aligns with your project requirements and development preferences.&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>flask</category>
      <category>django</category>
    </item>
    <item>
      <title>Mastering the job hunting strategy: Tips for aspiring developers.</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Thu, 16 May 2024 06:39:34 +0000</pubDate>
      <link>https://forem.com/terrancoder/mastering-the-job-hunting-strategy-tips-for-aspiring-developers-5b7m</link>
      <guid>https://forem.com/terrancoder/mastering-the-job-hunting-strategy-tips-for-aspiring-developers-5b7m</guid>
      <description>&lt;p&gt;If you are eager to learn and grow as a developer then learn how to learn. You need to have an accurate view of your current abilities and limitations to be learning oriented. ‘Benjamin Barber, an eminent political theorist, once said,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don’t divide the world into the weak and the strong, or the successes and the failures. . . . I divide the world into the learners and non learners.&lt;br&gt;
    -Carol Dweck, “Mindset - Updated Edition: Changing The Way You think To Fulfill Your Potential”&lt;br&gt;
Success is about learning and not proving you’re smart.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you start hunting for jobs, start with your ‘why’. Go beyond generic answers such as “I want to become a front end developer”. “I want a higher income”. Dig deep and find out what is driving you to pursue this path. This will help you stay on the path when you encounter setbacks and rejections.&lt;/p&gt;

&lt;p&gt;Look into a company not for the company name but rather the people who are behind it. They’re the ones you will be working for and they are the one’s who set the company culture.&lt;/p&gt;

&lt;p&gt;There is no need to be a perfectionist. Get enough foundational knowledge of the programming language that you are learning and get yourself a foot in the door. As beginner, you would apply for a junior developer role so you are not expected to know everything. Never enter into the job interview pretending to be someone you are not. This doesn’t mean you shouldn’t be developing your soft skills. Remember, the recruiters are looking for you not some make believe persona.&lt;/p&gt;

&lt;p&gt;Work on your resume and portfolio. Get your portfolio reviewed by other developers. This should be a continuous process. Avoid generic projects and resumes. Research the company that you want to work for. Find out about the people in that company, their values and their culture. Design your resume and cover letter based on your research. It should show that not only do you want to work for them but the reason why you want to work for them. Don’t forget to network. Your next opportunity may come from someone you aren’t expecting.&lt;/p&gt;

&lt;p&gt;Finally, think of your whole life. Job is just one small part of it. There is your family, health and relationship. Maintain a healthy balance as you continue to learn and grow as a developer.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>learning</category>
      <category>career</category>
    </item>
    <item>
      <title>Effective living for better coding, Successful Career Change and landing a job</title>
      <dc:creator>Sakib Bin Kamal</dc:creator>
      <pubDate>Thu, 16 May 2024 06:33:07 +0000</pubDate>
      <link>https://forem.com/terrancoder/effective-living-for-better-coding-successful-career-change-and-landing-a-job-k1g</link>
      <guid>https://forem.com/terrancoder/effective-living-for-better-coding-successful-career-change-and-landing-a-job-k1g</guid>
      <description>&lt;p&gt;One of the most crucial things to remember when learning to code is that the path is not without its challenges. You may have read or heard about 3 month or 6 month boot camp success stories. These stories could be more harmful then good especially if you need more time. Learning to code is a gradual shift and it’s different for each of us. You may need more time. Don’t let these “success stories” dishearten you. I’m writing this to help the fellow coders who are on a learning journey like me. This is as much a reflection as well as advice based on my journey on learning how to code.&lt;/p&gt;

&lt;p&gt;We all have set some goals when we decide to learn to code. Of course, we all want to land that ideal job, earn more etc. But let’s dig deeper. Why do I want that job? Why do I want to earn more? It’s quite important to know our why. I wanted to learn to code so that I could live a life of freedom and dignity. Knowing your "why" will make it easier for you to stay on track and stick with it when things go tough. Goal is the result we want but we need to focus on the process and the results will materialize. It’s much too easy for us to go on a tangent because of the sheer amount choices available to us. Distraction does little to contribute to your personal growth or getting things done. An effective method will help avoid the trap of perfectionism and prevent burnout. I’m not here to provide a ready-to-use system since there isn’t a “one size fits all” solution. Everyone has their own way of learning and approaching things and we must figure out what works for us. Instead I’ve to tried to explain the principles I try and use to help me reach my goals. We can apply these principles and create a system that works for each of us.&lt;/p&gt;

&lt;p&gt;Say no often. Actually, say “no” to most things and most of the time. Develop the ability to discern the essentials from the non-essentials. Make your own choices. Get rid of these three presumptions: "I can do both," "I have to," and "It's all important." They are both tempting and dangerous at the same time. They’ll suck you in and leave you overwhelmed, lost. Replace these false assumptions with “I chose to,” “Only a few things really matter,” and “I can do anything but not everything.” This will help you cut all the non-essentials from your life and focus on what is important.&lt;/p&gt;

&lt;p&gt;We can’t always control the output especially with something as hard as being a developer. Instead of focusing on something broad like looking for a job ask yourself What can I do right now? Break it down to small chunks. Don’t set goals like I’ll complete this tutorial in 3 days or complete a project in a week. As a beginner developer we’re not yet aware of the extent of our abilities. Orient the plan around effort for e.g. I’ll study for 1 hour today. Remember every team has the same goal: to win. But what each team does to achieve that is what separates the winners from the losers. Decide on one programming language and stick to it till you have a firm grasp of the foundational knowledge. Then you can start applying for jobs.&lt;/p&gt;

&lt;p&gt;Effort and hard work is what gets you there not luck.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>learning</category>
      <category>career</category>
    </item>
  </channel>
</rss>
