<?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: Inder from lightspeedev</title>
    <description>The latest articles on Forem by Inder from lightspeedev (@lightspeedev).</description>
    <link>https://forem.com/lightspeedev</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%2F1869183%2F25b1a191-5e0a-476f-9e81-2f7fc6a96765.jpg</url>
      <title>Forem: Inder from lightspeedev</title>
      <link>https://forem.com/lightspeedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/lightspeedev"/>
    <language>en</language>
    <item>
      <title>Build Your Own Stock Data Downloader in Under 50 Lines of Python</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Sun, 14 Dec 2025 13:33:41 +0000</pubDate>
      <link>https://forem.com/lightspeedev/build-your-own-stock-data-downloader-in-under-50-lines-of-python-4be7</link>
      <guid>https://forem.com/lightspeedev/build-your-own-stock-data-downloader-in-under-50-lines-of-python-4be7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Fetch Stock Data the Clean Way (No More Eye Strain)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before we jump into the code: If you need custom data tools or dashboards built, I’m currently open for freelance projects. Feel free to reach out to me on &lt;a href="https://www.linkedin.com/in/inderchandel782/" rel="noopener noreferrer"&gt;[LinkedIn Here]&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We’ve all been there. You need historical price data for a specific stock to run some analysis. You go to Yahoo Finance, search for the ticker, navigate to the “Historical Data” tab, filter the dates, apply the filter, and then finally hunt for the download button and now its doesn’t work as well :&amp;gt; .&lt;/p&gt;

&lt;p&gt;It’s tedious. Especially if you need to do it for five or ten different stocks.&lt;/p&gt;

&lt;p&gt;I decided to solve this problem by building a dedicated tool. I wanted something clean, simple, and fast. The goal was to build a web app that takes a stock symbol and hands me a CSV file — no ads, no navigation menus, just data.&lt;/p&gt;

&lt;p&gt;Thanks to Streamlit and yfinance, I managed to pull this off in under 50 lines of code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here is how I built it, and how you can run it too.
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The Code
&lt;/h2&gt;

&lt;p&gt;Here is the full script. It handles the UI, fetches the data from Yahoo Finance, handles errors (in case you mistype a symbol), and generates a download button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import streamlit as st
import yfinance as yf

# Page Setup
st.set_page_config(page_title="Stock Downloader", layout="centered")
st.title(" Personal Stock Data Downloader")

# User Inputs should be exactly same as it would be on yahoo finance
ticker = st.text_input("Enter Stock Symbol", value="AAPL").upper()
mode = st.radio("Select Date Mode:", ["Period", "Date Range"], horizontal=True)

data = None 

try:
    # Logic to fetch data based on mode
    if mode == "Period":
        period = st.selectbox("Select Period", ["1mo", "3mo", "6mo", "1y", "5y", "max"])
        if st.button("Fetch Data"):
            data = yf.download(ticker, period=period, progress=False)

    elif mode == "Date Range":
        dates = st.date_input("Select Range", [])
        if len(dates) == 2 and st.button("Fetch Data"):
            data = yf.download(ticker, start=dates[0], end=dates[1], progress=False)

    # Display and Download Section
    if data is not None and not data.empty:
        st.success(f"Data fetched for {ticker}!")
        st.dataframe(data)
        csv = data.to_csv().encode('utf-8')
        st.download_button("Download CSV", csv, f"{ticker}_data.csv", "text/csv")
    elif data is not None and data.empty:
        st.error("No data found. Please check the ticker symbol.")

except Exception as e:
    st.error(f"An error occurred: {e}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;I wanted this to be robust, not just a script that works once and breaks the next time. Here is the logic behind the build:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Setup&lt;/strong&gt;&lt;br&gt;
We import streamlit for the interface and yfinance to tap into market data. I used st.set_page_config to give the browser tab a proper title and center the layout—small details that make the app feel polished.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible Inputs&lt;/strong&gt;&lt;br&gt;
Sometimes you want “the last 3 months” of data. Other times, you need a specific date range (e.g., from Jan 1st, 2020 to Jan 1st, 2021). I used a radio button to let the user switch between these two modes:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Period Mode: Uses a simple dropdown menu.&lt;/li&gt;
&lt;li&gt;Date Range Mode: Uses a calendar picker. Note the check if len(dates) == 2. This ensures the code only runs once the user has picked both a start and an end date, preventing crashes.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error Handling (The “Pro” Touch)&lt;/strong&gt;&lt;br&gt;
APIs can be finicky. Sometimes the internet cuts out, or more likely, you mistype “GOOG” as “GOOGGG.” I wrapped the logic in a try...except block and added a check for data.empty. Instead of the app crashing with a wall of red code, it simply tells the user: "No data found. Please check the ticker symbol."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Download Button&lt;/strong&gt;&lt;br&gt;
This is the most important feature. Displaying data on a screen is nice, but useless if you can’t take it with you. The st.download_button converts our DataFrame into a CSV string and lets you save it directly to your machine.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;This project proves you don’t need complex frameworks&lt;/strong&gt; to build useful tools. In less than 50 lines, we have a functional, interactive web app that solves a real-world workflow problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you’re looking to build something similar — maybe a dashboard that visualizes this data, or a portfolio tracker — I’m available&lt;/strong&gt; for freelance work. &lt;a href="https://www.linkedin.com/in/inderchandel782/" rel="noopener noreferrer"&gt;[Reach out to me on LinkedIn]&lt;/a&gt; and let’s talk about your project.&lt;/p&gt;

</description>
      <category>streamlit</category>
      <category>data</category>
      <category>stockdata</category>
      <category>python</category>
    </item>
    <item>
      <title>Simplified Machine Learning: Supervised and Unsupervised Learning</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Mon, 27 Jan 2025 11:14:30 +0000</pubDate>
      <link>https://forem.com/lightspeedev/simplified-machine-learning-supervised-and-unsupervised-learning-2p37</link>
      <guid>https://forem.com/lightspeedev/simplified-machine-learning-supervised-and-unsupervised-learning-2p37</guid>
      <description>&lt;p&gt;Machine Learning can be divided into four main types: &lt;strong&gt;Supervised Learning, Unsupervised Learning, Semi-Supervised Learning, and Reinforcement Learning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this blog, you will learn about &lt;strong&gt;Supervised Learning and Unsupervised Learning in the simplest and most concise way possible&lt;/strong&gt;, along with examples and applications of each.&lt;/p&gt;

&lt;p&gt;Feel free to reach out if you’re looking for freelance opportunities or collaborations. I’m always open to new projects and challenges! You can contact me &lt;a href="https://x.com/inder_codes" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Supervised learning ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Supervised learning is a &lt;strong&gt;machine learning technique&lt;/strong&gt; where the algorithm is trained on a labeled dataset.&lt;/p&gt;

&lt;p&gt;Here, labeled means that the input data is paired with a corresponding correct output, similar to a &lt;strong&gt;key-value pair format&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example of Supervised Learning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One common example is predicting house prices based on house sizes. The dataset includes house sizes (input) paired with their prices (output). The model learns how the size of the house affects its price and then predicts prices for unseen data.&lt;/p&gt;

&lt;p&gt;Applications of Supervised Learning&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sentiment Analysis&lt;/strong&gt;: Analyzing text data (e.g., reviews, tweets) and classifying them as negative, positive, or neutral.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stock Price Prediction&lt;/strong&gt;: Predicting stock prices using historical data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recommendation Systems&lt;/strong&gt;: Generating movie or product recommendations based on user preferences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Medical Analysis&lt;/strong&gt;: Using medical images to classify conditions such as tumors, fractures, or infections. Blood test data can also be analyzed to predict diseases.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is Unsupervised learning ?
&lt;/h2&gt;

&lt;p&gt;Unsupervised learning is a machine learning technique where the model is trained on unlabeled data. The primary goal is to discover hidden patterns or structures within the data without predefined labels.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Anomaly Detection&lt;/strong&gt;: Identifying unusual patterns or outliers in data, such as fraudulent transactions, without labeling them as fraud beforehand.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Targeted Marketing&lt;/strong&gt;: Clustering customers based on their purchasing behavior, demographics, or browsing habits to enable personalized marketing strategies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Association Rule Learning&lt;/strong&gt;: Finding frequent patterns in transactional data. For example, identifying that customers who buy bread are also likely to buy butter.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By understanding these &lt;strong&gt;two core techniques&lt;/strong&gt;, you can start &lt;strong&gt;exploring how machine learning algorithms&lt;/strong&gt; can simplify complex tasks and uncover valuable insights. Whether you're analyzing customer behavior or making medical predictions, s*&lt;em&gt;upervised and unsupervised learning serve as the foundation for numerous real-world applications.&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;The area of &lt;strong&gt;machine learning that interests the most to me is using ml model to predict stock prices&lt;/strong&gt; and &lt;strong&gt;testing various trading systems, strategies and forecasting methods&lt;/strong&gt;. If that's something that interest you too, stay tuned for future blogs.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
    <item>
      <title>Introduction to Hibernate : Simplifying Database Interaction in Java</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Mon, 27 Jan 2025 09:48:09 +0000</pubDate>
      <link>https://forem.com/lightspeedev/introduction-to-hibernate-simplifying-database-interaction-in-java-57g</link>
      <guid>https://forem.com/lightspeedev/introduction-to-hibernate-simplifying-database-interaction-in-java-57g</guid>
      <description>&lt;p&gt;As a developer, working with data is a common task—whether it’s storing, fetching, updating, or deleting it. This typically &lt;strong&gt;involves interacting with databases&lt;/strong&gt;, which can be broadly categorized into two types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NoSQL databases like MongoDB&lt;/li&gt;
&lt;li&gt;SQL databases like MySQL, PostgreSQL, or Oracle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When working with SQL databases (SQL stands for Structured Query Language), you need to &lt;strong&gt;write queries for CRUD&lt;/strong&gt; (Create, Read, Update, Delete) operations. However, writing &lt;strong&gt;SQL queries manually can become tedious and repetitive&lt;/strong&gt;, especially for complex applications.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;&lt;u&gt;ORMs come to the rescue.&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Feel free to reach out if you’re looking for freelance opportunities or collaborations. I’m always open to new projects and challenges! You can contact me &lt;a href="https://x.com/inder_codes" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What are ORMs?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;ORM stands for &lt;strong&gt;Object-Relational Mapping&lt;/strong&gt;. Its primary goal is to &lt;strong&gt;simplify database interaction&lt;/strong&gt; for developers. It bridges the gap between the &lt;strong&gt;object-oriented nature of programming&lt;/strong&gt; languages like Java and the relational nature of databases.&lt;/p&gt;

&lt;p&gt;Using an ORM, developers can interact with the d*&lt;em&gt;atabase using objects instead of writing raw SQL queries.&lt;/em&gt;* This makes the code cleaner, more maintainable, and easier to understand.&lt;/p&gt;

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

&lt;p&gt;Hibernate is a &lt;strong&gt;popular Java-based Object-Relational Mapping (ORM) framework.&lt;/strong&gt; It simplifies database &lt;strong&gt;interaction in Java by automating many repetitive and boilerplate tasks&lt;/strong&gt;, such as writing SQL queries, managing transactions, and mapping objects to database tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features of &lt;strong&gt;Hibernate&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Hibernate offers several powerful features, many of which are common across ORM frameworks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ORM Framework&lt;/strong&gt;: Hibernate maps Java classes to database tables and Java objects to rows in the tables. It handles data persistence seamlessly without requiring you to write SQL queries explicitly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database Independence&lt;/strong&gt;: Hibernate is database-agnostic, meaning you can switch between databases (like MySQL, PostgreSQL, Oracle, etc.) with minimal configuration changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automatic Schema Management&lt;/strong&gt;: Hibernate can automatically create or update the database schema based on your Java object definitions, reducing manual effort.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt;: Hibernate supports caching to optimize performance by reducing database interactions. It provides first-level caching (default, session-based) and second-level caching (shared across sessions).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Use Hibernate?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here are the key reasons why Hibernate is a great choice for Java developers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduces Boilerplate Code&lt;/strong&gt;: Hibernate eliminates the need to write repetitive JDBC (Java Database Connectivity) code for basic CRUD operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improves Maintainability&lt;/strong&gt;: By decoupling database logic from application logic, Hibernate makes the code easier to maintain and refactor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhances Performance&lt;/strong&gt;: Hibernate’s caching mechanisms minimize database interactions, improving application performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplifies Complex Operations&lt;/strong&gt;: Hibernate makes it easier to handle complex database operations, such as joins and relationships, through its built-in tools and HQL (Hibernate Query Language).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>java</category>
      <category>hibernate</category>
      <category>backenddevelopment</category>
      <category>prisma</category>
    </item>
    <item>
      <title>What is Machine Learning ?</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Sun, 26 Jan 2025 09:47:03 +0000</pubDate>
      <link>https://forem.com/lightspeedev/what-is-machine-learning--4bea</link>
      <guid>https://forem.com/lightspeedev/what-is-machine-learning--4bea</guid>
      <description>&lt;p&gt;&lt;strong&gt;Imagine an Excel sheet&lt;/strong&gt; with 10,000 rows and 10 columns, representing data like stock prices, house prices, medical records, or anything else. As a human, &lt;strong&gt;analysing such a massive dataset to uncover meaningful patterns or make predictions would be incredibly challenging&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is where machine learning comes to the rescue. &lt;strong&gt;It enables computers to process vast amounts of data, uncover patterns, make predictions—such as forecasting stock or house prices—or even evaluate the accuracy of medical procedures, all with remarkable efficiency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Machine learning is the &lt;strong&gt;subset of artificial intelligence&lt;/strong&gt;, which &lt;strong&gt;enables computers to learn from the data without being explicitly programmed&lt;/strong&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Building Blocks of a Machine Learning Model
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Data&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Data is &lt;strong&gt;the foundation on which your machine learning model&lt;/strong&gt; is built. The quality and quantity of data directly influence the model's performance. The phrase &lt;strong&gt;"Garbage in, Garbage out"&lt;/strong&gt; holds true—if the &lt;strong&gt;data is flawed or irrelevant, the model's predictions will be unreliable&lt;/strong&gt;. Ensuring clean, accurate, and representative data is critical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Features&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Features are the &lt;strong&gt;measurable characteristics or attributes extracted from your data&lt;/strong&gt; that the model uses for learning.&lt;/p&gt;

&lt;p&gt;Example: For stock prices with OHLC (Open, High, Low, Close) data, features like moving averages or RSI (Relative Strength Index) can be created.&lt;br&gt;
For other domains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Medical data: &lt;strong&gt;Features could include age&lt;/strong&gt;, &lt;strong&gt;blood pressure&lt;/strong&gt;, or &lt;strong&gt;cholesterol levels&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real estate: Features might include &lt;strong&gt;house size&lt;/strong&gt;, &lt;strong&gt;location&lt;/strong&gt;, and &lt;strong&gt;number of rooms&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Effective &lt;strong&gt;feature engineering helps the model uncover patterns&lt;/strong&gt; more easily.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Algorithm&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;An algorithm is the &lt;strong&gt;set of instructions the model follows&lt;/strong&gt; to interpret the data and learn from it. It defines the way the model processes inputs to produce outputs. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of algorithms:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decision Trees&lt;/li&gt;
&lt;li&gt;Linear Regression&lt;/li&gt;
&lt;li&gt;Naive Bayes&lt;/li&gt;
&lt;li&gt;The choice of algorithm depends on the type of problem (classification, regression, clustering, etc.) and the data structure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Training and Testing Data&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;The data is typically split into two parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training Data&lt;/strong&gt;: Used to train the model, allowing it to learn patterns and relationships within the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing Data&lt;/strong&gt;: Used to evaluate how well the model performs on unseen data, ensuring it generalizes effectively.&lt;/li&gt;
&lt;li&gt;A common split is &lt;strong&gt;80:20 or 70:30&lt;/strong&gt;, but this can vary based on the dataset size and problem requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;model is the output of the machine learning&lt;/strong&gt; process—a representation of the &lt;strong&gt;patterns and relationships&lt;/strong&gt; learned from the data. It is used to &lt;strong&gt;make predictions or decisions&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After creating the model, &lt;strong&gt;additional steps like hyperparameter tuning&lt;/strong&gt;, &lt;strong&gt;cross-validation&lt;/strong&gt;, or &lt;strong&gt;benchmarking can further enhance its performance and reliability&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>datascience</category>
    </item>
    <item>
      <title>What are access modifiers in Java?</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Fri, 24 Jan 2025 13:10:45 +0000</pubDate>
      <link>https://forem.com/lightspeedev/what-are-access-modifiers-in-java-2b8b</link>
      <guid>https://forem.com/lightspeedev/what-are-access-modifiers-in-java-2b8b</guid>
      <description>&lt;p&gt;Access modifiers are keywords in Java that &lt;strong&gt;control the visibility&lt;/strong&gt; and &lt;strong&gt;accessibility&lt;/strong&gt; of classes , methods and constructors and data members.&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;&lt;u&gt;four types&lt;/u&gt;&lt;/strong&gt; of access modifiers in Java&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public&lt;/strong&gt; - This makes the class, methods , data members &lt;strong&gt;accessible from anywhere in the program&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class MyClass {
    public void display() {
        System.out.println("Public method");
    }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Private&lt;/strong&gt; -Private keyword makes sure that the data members are only &lt;strong&gt;accessible within the same class&lt;/strong&gt; where they are declared. They are &lt;strong&gt;not accessible to other classes&lt;/strong&gt; even within the same package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class MyClass {
    private int data = 10;
    private void display() {
        System.out.println("Private method");
    }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Protected&lt;/strong&gt; - Protected keyword makes sure that the data members and the methods are &lt;strong&gt;accessible within the same package and subclasses&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class MyClass {
    protected int data = 10;
    protected void display() {
        System.out.println("Protected method");
    }
}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt; - When none of the keyword is &lt;strong&gt;used to define the access&lt;/strong&gt; of the class, method or data members the &lt;strong&gt;default access modifier&lt;/strong&gt; is applied to it which makes it accessible only &lt;strong&gt;within the same package&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyClass {  // default access
    void display() {  // default access
        System.out.println("Default method");
    }
}

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

&lt;/div&gt;



&lt;p&gt;Thanks for reading , try simplifying more in the comments and help others :&amp;gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
    </item>
    <item>
      <title>What are AI Agents and How Can They Help You?</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Tue, 14 Jan 2025 10:19:53 +0000</pubDate>
      <link>https://forem.com/lightspeedev/what-are-ai-agents-and-how-can-it-help-you--14nh</link>
      <guid>https://forem.com/lightspeedev/what-are-ai-agents-and-how-can-it-help-you--14nh</guid>
      <description>&lt;h2&gt;
  
  
  What is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;AI agents are a buzzword these days, and for good reason—they’re &lt;strong&gt;transforming the way we approach tasks&lt;/strong&gt; and problem-solving. In this blog, we’ll explore what an AI agent is, what it does, and how it can be useful, particularly for your specific use case. Let’s break it down into simple terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding an AI Agent
&lt;/h2&gt;

&lt;p&gt;An AI agent is a &lt;strong&gt;&lt;u&gt;software program designed to perform tasks autonomously&lt;/u&gt;&lt;/strong&gt; on behalf of a user or another system. It interacts with its &lt;strong&gt;environment, gathers data, and executes actions&lt;/strong&gt; to achieve predefined goals—without requiring constant human intervention.&lt;/p&gt;

&lt;p&gt;AI agents are versatile and can be applied to a wide range of fields, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Financial Analysis&lt;/strong&gt;: Automating trading strategies, portfolio management, or risk assessments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recommendation Systems&lt;/strong&gt;: Suggesting products, content, or services tailored to user preferences.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;E-commerce Management&lt;/strong&gt;: Handling inventory, automating customer support, or optimizing pricing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fraud Detection&lt;/strong&gt;: Identifying suspicious activities in financial transactions or online systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom Tasks&lt;/strong&gt;: Performing niche tasks specific to your needs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Makes AI Agents Unique?
&lt;/h2&gt;

&lt;p&gt;What sets AI agents apart is their ability to address niche challenges specific to your domain or business. &lt;strong&gt;Instead of generic tools&lt;/strong&gt;, AI agents can be tailored to &lt;strong&gt;help with the precise tasks&lt;/strong&gt; you need &lt;strong&gt;assistance with—be it automating a repetitive process&lt;/strong&gt;, improving &lt;strong&gt;decision-making&lt;/strong&gt;, or &lt;strong&gt;providing actionable insights&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Financial Trading&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Execute strategies&lt;/strong&gt; by analysing market data, calculating volatility, and placing trades.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate portfolio rebalancing&lt;/strong&gt; or generate real-time insights for risk management.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Customer Service&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Act &lt;strong&gt;as a chatbot&lt;/strong&gt; to handle user queries intelligently and escalate issues when necessary.&lt;/li&gt;
&lt;li&gt;Provide &lt;strong&gt;personalized recommendations&lt;/strong&gt; or follow-up actions based on customer history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;E-commerce Management&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automate inventory updates&lt;/strong&gt;, optimize pricing strategies, and manage product recommendations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyse customer behaviour&lt;/strong&gt; to predict trends and improve marketing campaigns.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Healthcare and Diagnostics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assist in &lt;strong&gt;diagnosing medical conditions&lt;/strong&gt; by analyzing patient data and symptoms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor patient health remotely&lt;/strong&gt; and send alerts for anomalies in real-time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Content Creation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate blog posts&lt;/strong&gt;, social media captions, or product descriptions tailored to your audience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suggest creative ideas&lt;/strong&gt; or provide editing and optimization for existing content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Education and Training&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create &lt;strong&gt;personalized learning paths&lt;/strong&gt; for students based on their progress and performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Act as a virtual tutor&lt;/strong&gt;, answering questions and explaining concepts in real-time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Supply Chain and Logistics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Optimize routes for delivery&lt;/strong&gt;, predict delays, and ensure efficient inventory management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate order processing&lt;/strong&gt; and tracking for seamless operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Legal and Compliance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automate document review&lt;/strong&gt; and extraction of key information for legal cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ensure compliance by monitoring regulations&lt;/strong&gt; and flagging potential violations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Research and Development&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Assist researchers by summarizing academic papers&lt;/strong&gt;, extracting insights, or proposing hypotheses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate data analysis&lt;/strong&gt; to accelerate experiments or product development.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>llm</category>
    </item>
    <item>
      <title>Solana Account Model Simplified</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Mon, 13 Jan 2025 13:27:59 +0000</pubDate>
      <link>https://forem.com/lightspeedev/solana-account-model-simplified-49mb</link>
      <guid>https://forem.com/lightspeedev/solana-account-model-simplified-49mb</guid>
      <description>&lt;p&gt;When starting your learning journey in Solana, it's very important to focus on the fundamentals. One such concept that often feels difficult when getting into blockchain, especially Solana development, is the Solana accounts model.&lt;/p&gt;

&lt;p&gt;In this blog, we are going to simplify one of the &lt;strong&gt;core concepts&lt;/strong&gt; of the Solana blockchain: the account model.&lt;/p&gt;

&lt;p&gt;As always, if you have any feedback or opportunities where I can provide value, feel free to reach out to me here: &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://x.com/inder_codes" rel="noopener noreferrer"&gt;
      x.com
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Let’s get started with the topic!&lt;/p&gt;

&lt;p&gt;Solana stores everything as a &lt;strong&gt;key-value store&lt;/strong&gt;: the key is the account address (or public key) that you own, and attached to it is the account information.&lt;/p&gt;

&lt;p&gt;Here’s a representation of this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtbv88lcadivhw1xnbgc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtbv88lcadivhw1xnbgc.png" alt="here" width="632" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, everything you’ve heard about in blockchain—tokens, NFTs, your wallet, etc.&lt;strong&gt;—has its own account&lt;/strong&gt;. The only &lt;strong&gt;&lt;u&gt;difference is the functionality&lt;/u&gt;&lt;/strong&gt; or what they can do.&lt;/p&gt;

&lt;p&gt;The account information associated with each account address has the following data structure:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Key Data Fields in Solana Accounts:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data&lt;/strong&gt; -&amp;gt; This depends on the &lt;strong&gt;&lt;u&gt;account's purpose&lt;/u&gt;&lt;/strong&gt;, and the data stored will vary accordingly. For example, a wallet account stores the Solana balance or token information it holds. If the account is a smart contract, it will store executable code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Executable&lt;/strong&gt;-&amp;gt; &lt;strong&gt;This field is either true or false&lt;/strong&gt;. In the case of a smart contract, it will be &lt;strong&gt;true because it has executable logic&lt;/strong&gt;. In other cases, such as a wallet, it will be false.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lamports&lt;/strong&gt; -&amp;gt; &lt;strong&gt;This represents the account balance in lamports&lt;/strong&gt;, the smallest unit of SOL (1 SOL = 1 billion lamports)..&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Owner&lt;/strong&gt; -&amp;gt; *&lt;em&gt;Specifies the public key *&lt;/em&gt;(program ID) of the program that owns the account.&lt;/p&gt;

&lt;p&gt;The owner is crucial because it determines what actions can be performed on the account. &lt;strong&gt;Think of the owner as having the rights to modify the data&lt;/strong&gt;. For example, in the case of a wallet, the owner can decrease the balance or transfer tokens.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;If the &lt;strong&gt;owner is the System Program&lt;/strong&gt;, it can &lt;strong&gt;handle basic wallet management tasks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the &lt;strong&gt;owner is the BPF Loader&lt;/strong&gt;, it can &lt;strong&gt;run smart contracts.&lt;/strong&gt;&lt;br&gt;
Here’s a visual representation of how the owner is involved in the process:&lt;/p&gt;

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

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

&lt;p&gt;From the above, you can see how the owner differs in terms of what it can do, and &lt;strong&gt;how it governs the actions that can be performed on the account&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Next we are going to learn about some native programs and how data is stored on Solana. Stay tuned, for further blog posts.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>solana</category>
      <category>rust</category>
    </item>
    <item>
      <title>Why Python is worth learning ?</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Tue, 22 Oct 2024 07:27:02 +0000</pubDate>
      <link>https://forem.com/lightspeedev/2-minute-pitch-why-python-is-worth-learning-27om</link>
      <guid>https://forem.com/lightspeedev/2-minute-pitch-why-python-is-worth-learning-27om</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4v0zr1bbjlv7no4kirbt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4v0zr1bbjlv7no4kirbt.jpg" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No matter &lt;strong&gt;who you are or what do you do&lt;/strong&gt; , Imagine having a language with which you can do &lt;strong&gt;almost anything&lt;/strong&gt; - &lt;strong&gt;automate tasks&lt;/strong&gt;, &lt;strong&gt;analyse datasets&lt;/strong&gt;, &lt;strong&gt;delve into AI&lt;/strong&gt;, or even &lt;strong&gt;build real-world applications&lt;/strong&gt;. That's Python.&lt;/p&gt;

&lt;p&gt;If you find this blog useful, I welcome any feedback - whether it's criticism or appreciation. Feel free to drop me a message in my &lt;a href="https://x.com/Lightspeedev" rel="noopener noreferrer"&gt;inbox here.&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Python is a high-level, versatile programming language known for its simplicity and readability. It allows you to write clear, logical code for projects big and small, across a wide range of industries.&lt;/p&gt;

&lt;p&gt;Simplicity and Ease of Learning&lt;/p&gt;

&lt;p&gt;Here's is a code snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = 2 
b = 3

print(a+b)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You see? That's why Python is so popular - it feels almost like &lt;strong&gt;writing English&lt;/strong&gt;. You're writing a language the computer understands, without unnecessary jargon or complex boilerplate code. &lt;strong&gt;It's clear, crisp, and to the point.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's another example to demonstrate why writing Python feels so intuitive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = 5
b = 6

if a&amp;gt;b:
  print("a is bigger Sir!")
else:
  print("No B is big :&amp;gt;")

## A program that can't stop itself is called an infinte loop here is an example

## just press CTRL + C to stop :&amp;gt;

while a &amp;gt;0:
  print("Infinite loop started ")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Versatility and Applications
&lt;/h2&gt;

&lt;p&gt;How can Python help you? Let's break it down by profession:&lt;/p&gt;

&lt;h2&gt;
  
  
  Lawyer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Document Review and Automation&lt;/strong&gt;: Lawyers can automate the review of legal documents, highlighting key sections, clauses, or discrepancies using Python's Natural Language Processing (NLP) libraries like spaCy. This saves time and reduces the risk of missing critical information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contract Generation&lt;/strong&gt;: Python can automatically fill in templates for routine contracts or legal forms, reducing human error and making legal processes more efficient.&lt;br&gt;
Legal Research: Python can scrape case law databases for relevant precedents, statutes, or rulings, helping lawyers stay up-to-date and better prepare cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Doctor
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Medical Diagnosis&lt;/strong&gt;: Python can be used with AI tools to analyze medical images like X-rays or MRIs for early detection of diseases such as cancer or fractures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Patient Management System&lt;/strong&gt;: Automate patient scheduling, tracking treatment plans, and managing patient records securely using Python with &lt;br&gt;
Flask or Django for backend support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Predictive Healthcare&lt;/strong&gt;: Predict patient outcomes, such as readmission rates or recovery time, using machine learning models built with Python libraries like Scikit-learn or TensorFlow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trader
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Algorithmic Trading&lt;/strong&gt;: Build trading bots, automate trade execution, and backtest strategies using Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Financial Data Analysis&lt;/strong&gt;: Analyse stock market data and predict market trends with Python's machine learning libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Scientist
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data Analysis&lt;/strong&gt;: Use Pandas to manipulate and analyse large datasets with ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt;: Build predictive models using Scikit-learn, TensorFlow, or PyTorch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Visualization&lt;/strong&gt;: Create visual representations of data with Matplotlib, Seaborn, or Plotly to communicate insights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No matter your profession,&lt;/strong&gt; &lt;strong&gt;whether you're in a traditional business or fast-evolving tech, Python can automate your repetitive tasks&lt;/strong&gt;, giving you more time to focus on what truly matters. It's the key to unleashing your full potential.&lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>coding</category>
      <category>learning</category>
    </item>
    <item>
      <title>Getting Started with Docker: Build, Run, and Manage Your Applications</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Mon, 14 Oct 2024 11:06:24 +0000</pubDate>
      <link>https://forem.com/lightspeedev/getting-started-with-docker-build-run-and-manage-your-applications-425o</link>
      <guid>https://forem.com/lightspeedev/getting-started-with-docker-build-run-and-manage-your-applications-425o</guid>
      <description>&lt;p&gt;Docker is a &lt;strong&gt;revolutionary tool&lt;/strong&gt;  that &lt;strong&gt;emerged in 2013&lt;/strong&gt; and has since transformed the landscape of software development. By addressing common challenges developers faced, Docker has made development &lt;strong&gt;workflows more efficient and streamlined.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this blog post, we’ll simplify Docker’s core functionalities, explore its key components, and demystify some of its essential commands that might seem like jargon at first glance.&lt;/p&gt;

&lt;p&gt;If you find this blog useful, I welcome any feedback — whether it’s criticism or appreciation. Feel free to drop me a message in my inbox &lt;a href="https://x.com/Lightspeedev" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Technical Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker is a platform that enables developers to &lt;strong&gt;automate the deployment of applications inside lightweight, portable containers.&lt;/strong&gt;These &lt;strong&gt;containers package an application&lt;/strong&gt; along &lt;strong&gt;with its dependencies&lt;/strong&gt;, ensuring consistent performance across various environments — whether it’s on a developer’s laptop, a test server, or a production environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simplified Explanation
&lt;/h2&gt;

&lt;p&gt;To &lt;strong&gt;put it simply&lt;/strong&gt;, Docker allows you to &lt;strong&gt;run applications without worrying about the underlying environment.&lt;/strong&gt; Traditionally, running an app involved steps like cloning the source code from a repository, installing dependencies, and configuring the environment. &lt;strong&gt;Docker streamlines this process by packaging everything the application needs into a container.&lt;/strong&gt; This guarantees that the &lt;strong&gt;app behaves identically wherever it’s deployed&lt;/strong&gt;, &lt;strong&gt;eliminating&lt;/strong&gt; issues like &lt;strong&gt;“it works on my machine.”&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Docker Concepts
&lt;/h2&gt;

&lt;p&gt;Before diving deeper, let’s familiarize ourselves with some fundamental Docker concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Docker &lt;strong&gt;Image&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Docker &lt;strong&gt;Hub&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Docker &lt;strong&gt;File&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Docker &lt;strong&gt;Compose&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Docker Image
&lt;/h2&gt;

&lt;p&gt;A Docker image is a &lt;strong&gt;read-only template&lt;/strong&gt; used to &lt;strong&gt;create containers&lt;/strong&gt;. Think of it as a &lt;strong&gt;snapshot of your application&lt;/strong&gt; along with all &lt;strong&gt;its dependencies&lt;/strong&gt;, &lt;strong&gt;libraries, environment variables&lt;/strong&gt;, and configuration files. Docker images &lt;strong&gt;can be stored in repositories like Docker Hub&lt;/strong&gt;, allowing them to be shared and versioned easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you have an application that requires Python and specific libraries to run. You can create a Docker image that includes Python, the necessary libraries, and your application’s code. This image can then be used to spin up containers that run your application consistently across different environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Docker Hub
&lt;/h2&gt;

&lt;p&gt;Docker Hub is a &lt;strong&gt;cloud-based repository&lt;/strong&gt; where &lt;strong&gt;Docker images are stored, shared, and managed.&lt;/strong&gt; It’s akin to a library for Docker images, &lt;strong&gt;hosting a vast variety&lt;/strong&gt; of pre-built images that you can use to get started quickly.&lt;/p&gt;

&lt;p&gt;Key Features:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public and Private Repositories&lt;/strong&gt;: Store your images securely.&lt;br&gt;
Automated Builds: Automatically build images from your source code repositories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Official Images&lt;/strong&gt;: Trusted images for popular software maintained by Docker.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Docker File
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Docker File&lt;/strong&gt; is a &lt;strong&gt;simple text file&lt;/strong&gt; that contains a &lt;strong&gt;series of instructions for building a Docker image.&lt;/strong&gt; It specifies the base image, &lt;strong&gt;copies application code&lt;/strong&gt;, &lt;strong&gt;installs dependencies&lt;/strong&gt;, &lt;strong&gt;sets environment variables&lt;/strong&gt;, and defines the &lt;strong&gt;command to run the application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic Structure of a Docker File:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Use an official Python runtime as the base image
FROM python:3.8-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variable
ENV NAME World

# Run app.py when the container launches
CMD ["python", "app.py"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Docker Compose
&lt;/h2&gt;

&lt;p&gt;Docker Compose is a tool that allows you to &lt;strong&gt;define and manage multi-container Docker applications&lt;/strong&gt; using a &lt;strong&gt;simple YAML file&lt;/strong&gt; (docker-compose.yml). It simplifies the &lt;strong&gt;process of running applications&lt;/strong&gt; that consist of multiple services, &lt;strong&gt;such as a web server, database, and cache.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Docker Compose:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Single Command Deployment&lt;/strong&gt;: Start all services with docker-compose up.&lt;br&gt;
Centralized Configuration: Manage all services in one file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Service Dependencies&lt;/strong&gt;: Define the order in which services should start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Networking&lt;/strong&gt;: Automatically creates a network for services to communicate.&lt;/p&gt;

&lt;p&gt;Example docker-compose.yml:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: '3.8'

services:
  web:
    image: my-web-app:latest
    ports:
      - "8000:8000"
    volumes:
      - ./web:/app
    environment:
      - DEBUG=1
    depends_on:
      - db

  db:
    image: postgres:13
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: password
      POSTGRES_DB: mydb
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;In this example&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;web Service&lt;/strong&gt;: Runs the web application, maps port 8000, mounts the local web directory, and depends on the db service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;db Service&lt;/strong&gt;: Runs a PostgreSQL database with specified environment variables and persistent storage.&lt;/p&gt;

&lt;p&gt;Docker has &lt;strong&gt;undeniably revolutionized the way developers build, deploy, and manage applications.&lt;/strong&gt; By &lt;strong&gt;encapsulating applications&lt;/strong&gt; and &lt;strong&gt;their dependencies within containers&lt;/strong&gt;, Docker ensures consistency across various environments, &lt;strong&gt;simplifies deployment processes&lt;/strong&gt;, and &lt;strong&gt;enhances scalability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Docker’s core concepts&lt;/strong&gt; — such as images, containers, Docker Hub, Docker Files, and Docker Compose — &lt;strong&gt;is essential for leveraging its full potential&lt;/strong&gt;. Additionally, mastering key Docker commands and optimizing your workflow can significantly streamline your development and deployment pipelines.&lt;/p&gt;

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

</description>
      <category>docker</category>
      <category>containers</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>THE META TOOL THAT HELPED MILLIONS</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Sat, 17 Aug 2024 06:28:44 +0000</pubDate>
      <link>https://forem.com/lightspeedev/the-meta-tool-that-helped-millions-1o4p</link>
      <guid>https://forem.com/lightspeedev/the-meta-tool-that-helped-millions-1o4p</guid>
      <description>&lt;p&gt;No matter how much people criticize Facebook for various reasons, one thing worth noting is its significant contributions to the open-source community, whether through React, LLaMA, or GraphQL.&lt;/p&gt;

&lt;p&gt;In this blog, we’ll explore one such tool that Facebook developed internally in 2012 and then open-sourced for the world to use in 2015: GraphQL.&lt;/p&gt;

&lt;p&gt;GraphQL, which stands for Graph Query Language, transformed the way APIs were queried, simplifying processes that often became chaotic as the load of information increased..&lt;/p&gt;

&lt;p&gt;When learning something new, I love using the Feynman technique — I’ll write a simple blog about what it is and how you can use it, but for now, we’ll apply it to understand what GraphQL is and why it exists.&lt;/p&gt;

&lt;p&gt;Let’s take some examples:&lt;/p&gt;

&lt;p&gt;Reading Data: When you open Instagram, your device pings the backend and says, “Hey, I want to read the changes or posts that were made while I was away.” At its core, this is a read operation.&lt;br&gt;
Creating Data: When you post something on Instagram, the frontend sends a POST request to the backend to insert something new.&lt;br&gt;
Updating Data: If you want to update the caption of an already posted image, it becomes an update request.&lt;br&gt;
Deleting Data: Deleting a post is, of course, a delete request.&lt;br&gt;
And that’s the basic function of APIs — they simplify communication and handle tasks that are mostly:&lt;/p&gt;

&lt;p&gt;C — Create&lt;br&gt;
R — Read&lt;br&gt;
U — Update&lt;br&gt;
D — Delete&lt;br&gt;
This is essentially what REST APIs do. These are endpoints that, when pinged, perform CRUD operations and sometimes handle more complex tasks.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/@inderchandel782/the-meta-tool-that-helped-millions-7bad44b7741f" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fda%3Atrue%2Fresize%3Afill%3A88%3A88%2F0%2AB_l5gt32_6G6NXHa" alt="Inder Singh Chandel"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/@inderchandel782/the-meta-tool-that-helped-millions-7bad44b7741f" class="ltag__link__link" rel="noopener noreferrer"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The Meta Tool That Helped Millions | by Inder Singh Chandel | Medium&lt;/h2&gt;
      &lt;h3&gt;Inder Singh Chandel ・ &lt;time&gt;Aug 19, 2024&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fmedium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>The Rise of Smart Contracts in the Digital Age</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Fri, 02 Aug 2024 07:41:13 +0000</pubDate>
      <link>https://forem.com/lightspeedev/the-rise-of-smart-contracts-in-the-digital-age-1hpo</link>
      <guid>https://forem.com/lightspeedev/the-rise-of-smart-contracts-in-the-digital-age-1hpo</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4zj97gb9e5lhzymcozc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4zj97gb9e5lhzymcozc.jpg" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Humans learn from their mistakes and continually improve on the past, fixing loopholes and enhancing systems. Contracts have existed for centuries, but as we enter the digital age, they are evolving into something smarter.&lt;/p&gt;

&lt;p&gt;In this blog, we will explore what smart contracts are, why they matter, and how they can benefit us. After all, the purpose of any technology is to serve and improve our lives.&lt;/p&gt;

&lt;p&gt;But,&lt;br&gt;
Let’s condense the meaning of a Contract first, shall we ?&lt;/p&gt;

&lt;p&gt;What is a Contract?&lt;br&gt;
A contract is an agreement between two or more parties that specifies their mutual obligations — the responsibilities or duties each party must fulfill — and the conditions under which these obligations are to be met.&lt;/p&gt;

&lt;p&gt;Why is it Needed?&lt;br&gt;
A contract clearly outlines the terms, conditions, and responsibilities of each party involved. It serves to govern their interactions and provides a framework for resolving disputes should they arise.&lt;/p&gt;

&lt;p&gt;Now,&lt;/p&gt;

&lt;p&gt;Imagine a situation where one party fails to adhere to the terms and conditions of a contract. In such cases, the matter can be escalated through legal channels, involving government authorities or other parties. However, this process can be resource-intensive, requiring significant time and effort.&lt;/p&gt;

&lt;p&gt;Additionally, there may be situations where the parties involved in a contract are not committed to fulfilling their obligations. For example, in lending and borrowing activities, if you trusted someone to lend you money but the lender failed to adhere to ethical terms, resulting in a loss of funds, it can be quite frustrating.&lt;/p&gt;

&lt;p&gt;Situations like these inspired the development of a new type of contract. With the rise of transparent systems like blockchain, smart contracts were introduced to enhance trust and transparency while reducing reliance on third parties.&lt;/p&gt;

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

&lt;p&gt;What is a smart contract ?&lt;br&gt;
Smart contract is simply a contract that is a immutable piece of code that is on the blockchain and is self executing based on the situation that are set in the contract while coding it.&lt;/p&gt;

&lt;p&gt;So, simply it is a contract which is smart doesn’t require trust as it just lines of code , can’t be changed because it is immutable and can be verified because it’s on the blockchain.&lt;/p&gt;

&lt;p&gt;Smart contracts can be coded and can be deployed on the chain which can be either etherium , solana or bitcoin.&lt;/p&gt;

&lt;p&gt;Uses of smart contracts&lt;br&gt;
Smart contracts can have a wide range of use cases. For instance, in lending and borrowing scenarios, a smart contract can manage the entire process. The agreement between the lender and borrower is encoded as a smart contract that automatically executes based on predefined conditions.&lt;/p&gt;

&lt;p&gt;It ensures that the lender receives both the principal and interest, while also verifying collateral without the need for a third party. This reduces the risk of manipulation and fraud.&lt;/p&gt;

&lt;p&gt;Now think of various use cases such as&lt;/p&gt;

&lt;p&gt;Insurance — Smart contracts can efficiently manage when the premium shall be given and under which situation the claim should be given, brining in transparency in the system, which is still very common in insurance.&lt;/p&gt;

&lt;p&gt;Real Estate — This is yet to be true but many believe that the process of buying real estate one day will be as fast as buying a mobile theses days, well given the pace at which blockchain is evolving, smart contracts can speed up the process, reducing the hassle the system has today.&lt;/p&gt;

&lt;p&gt;Voting systems — Another use cases can be voting systems where they are often prone to getting tampered and are accused of, smart contract can help reducing the opaqueness of it leading to a more efficient system.&lt;/p&gt;

&lt;p&gt;Gaming and NFTs — Transfer of digital assets like game assets or NFT’s or intellectual property where transparency and trust is required is a good use case of smart contract, reducing the need of trust and making it transparent.&lt;/p&gt;

&lt;p&gt;There can be many more like Decentralised exchange (DEX), yield farming, I just tried to pick the simple ones to convey the concept.&lt;/p&gt;

&lt;p&gt;If you liked this do let me know and you can share your thoughts to me on by dropping a Hi on my X. I’ll link it with this blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/Lightspeedev" rel="noopener noreferrer"&gt;https://x.com/Lightspeedev&lt;/a&gt;&lt;/p&gt;

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

</description>
      <category>blockchain</category>
      <category>smartcontract</category>
      <category>solana</category>
    </item>
    <item>
      <title>5 Essential Rust Keywords You Should Know Before Learning Rust</title>
      <dc:creator>Inder from lightspeedev</dc:creator>
      <pubDate>Thu, 01 Aug 2024 10:19:59 +0000</pubDate>
      <link>https://forem.com/lightspeedev/5-essential-rust-keywords-you-should-know-before-learning-rust-1gf1</link>
      <guid>https://forem.com/lightspeedev/5-essential-rust-keywords-you-should-know-before-learning-rust-1gf1</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdwuat3ddtl3fn01i8pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdwuat3ddtl3fn01i8pt.png" alt="Image description" width="709" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recently, I started learning Rust, and unlike other languages like Python or JavaScript, which are high-level languages and involve a lot of abstraction, Rust is more complex. Low-level languages like Rust, C, or C++ often use jargon-like keywords that can be mind-boggling at first.&lt;/p&gt;

&lt;h2&gt;
  
  
  So here are 5 keywords with simplified meanings to make your Rust learning easier:
&lt;/h2&gt;

&lt;p&gt;1.) pub — It stands for “public” in Rust. By default, variables, functions, modules, and methods are private. Using pub makes them public, meaning they can be accessed from anywhere.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn something(){} // this is a private function
pub fn something(){} // this is a public function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.) mod — The next one on the list is mod. It stands for "module". A module in Rust encapsulates functions, structs, enums, and implementations. A simpler way to think of modules is like classes in Python or JavaScript, but with much more functionality and flexibility.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mod my_module {
    // `pub` stands for public and `fn` for function
    pub fn say_hello() {
        println!("Hello from my_module!");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.) fn — fn is the easiest; if you have used any other programming languages, you know fn stands for functions. It is used to define functions, which are reusable pieces of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fn hithere() {
    println!("hi there");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.) Structs &amp;amp; Enums — Structs stand for “structure”. To understand structs, they are used to group related data into a single unit, so all attributes are combined, preventing bugs from missing data.&lt;/p&gt;

&lt;p&gt;Structs and enums are related, so I decided to group them together. Enums allow you to choose one value as an option from the defined group. For example, an AppleSize enum can be either Big or Small; it can't be both.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Car {
    name: String,
    model: u32,
    color: String,
} // The `Car` struct groups all related properties. Without it, missing data could lead to bugs.

enum AppleSize {
    Big,
    Small,
} // The `AppleSize` enum defines the options you can choose from, but you can select only one.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.) impl — impl stands for "implementations". It was the one that sort of confused me when I started; it felt jarring for some reason. The one-line definition I came up with is: impl is used to encapsulate functions with their enums and structs.&lt;/p&gt;

&lt;p&gt;Now , here is the complete code to clearly demonstrate the use of all the five keywords , pub , fn , struct , enums, mod&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pub mod shapes{
    // i defined a public module name shapes

    struct Rectangle{

    }
    struct Circle{

    }
    struct Square{

    }
    // a mod can have structs here Rectangle, Circle , Square are defined
    enum Rectangle{

    }
    enum Circle{

    }
    enum Square{

    }
    // it can have enums where we can define the properites from which we can choose one 

    impl Rectangle{
        fn Rect_area(){

        }
        fn Rect_perimter(){

        }
    }
    impl Square(){
        fn square_area(){

        }
        fn square_other(){

        }
    }
    // and similiarly other impl for other as well
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>rust</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
