<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John Johnson Okah</title>
    <description>The latest articles on DEV Community by John Johnson Okah (@jjokah).</description>
    <link>https://dev.to/jjokah</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%2F400237%2Fd858a856-41c2-4781-a785-7a2b36f9499d.png</url>
      <title>DEV Community: John Johnson Okah</title>
      <link>https://dev.to/jjokah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jjokah"/>
    <language>en</language>
    <item>
      <title>Small Language Models (SLMs): A Comprehensive Overview</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Fri, 21 Feb 2025 17:17:20 +0000</pubDate>
      <link>https://dev.to/jjokah/small-language-models-slms-a-comprehensive-overview-7og</link>
      <guid>https://dev.to/jjokah/small-language-models-slms-a-comprehensive-overview-7og</guid>
      <description>&lt;p&gt;The past few years have been a blast for artificial intelligence, with large language models (LLMs) stunning everyone with their capabilities and powering everything from chatbots to code assistants. However, not all applications demand the massive size and complexity of LLMs, the computational power required makes them impractical for many use cases. This is why Small Language Models (SLMs) entered the scene to make powerful AI models more accessible by shrinking in size.&lt;/p&gt;

&lt;p&gt;Let's go through what SLMs are, how they are made small, their benefits and limitations, real-world use cases, and how they can be used on mobile and desktop devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Small Language Models?
&lt;/h2&gt;

&lt;p&gt;Small Language Models (SLMs) are lightweight versions of traditional language models designed to operate efficiently on resource-constrained environments such as smartphones, embedded systems, or low-power computers. While large language models have hundreds of billions—or even trillions—of parameters, SLMs typically range from &lt;strong&gt;1 million to 10 billion parameters&lt;/strong&gt;. The small language models are significantly smaller but they still retain core NLP capabilities like text generation, summarization, translation, and question-answering. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Some practitioners don't like the term "Small Language Model", because a billion parameter is not small by any means. They prefer "Small Large Language Model", which sounds convoluted. But the majority went with Small Language Model, so SLM it is. By the way, note that &lt;em&gt;it is only small in comparison with the large models.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How Are They Made Small?
&lt;/h2&gt;

&lt;p&gt;The process of shrinking a language model involves several techniques aimed at reducing its size without compromising too much on performance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge Distillation&lt;/strong&gt;: Training a smaller "student" model using knowledge transferred from a larger "teacher" model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pruning&lt;/strong&gt;: Removing redundant or less important parameters within the neural network architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quantization&lt;/strong&gt;: Reducing the precision of numerical values used in calculations (e.g. converting floating-point numbers to integers).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Examples of Small Language Models
&lt;/h2&gt;

&lt;p&gt;Several small yet powerful language models have emerged, proving that size isn’t everything. The following examples are SLMs ranging from 1-4 billion parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/meta-llama/Llama-3.2-1B" rel="noopener noreferrer"&gt;&lt;strong&gt;Llama3.2-1B&lt;/strong&gt;&lt;/a&gt; – A Meta-developed &lt;em&gt;1-billion-parameter&lt;/em&gt; variant optimized for edge devices.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct" rel="noopener noreferrer"&gt;&lt;strong&gt;Qwen2.5-1.5B&lt;/strong&gt;&lt;/a&gt; – A model from Alibaba designed for multilingual applications with &lt;em&gt;1.5 billion parameters&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B" rel="noopener noreferrer"&gt;&lt;strong&gt;SmolLM2-1.7&lt;/strong&gt;&lt;/a&gt; – From HuggingFaceTB, a state-of-the-art "small" (&lt;em&gt;1.7 billion-parameter&lt;/em&gt;) language model trained on specialized open datasets (FineMath, Stack-Edu, and SmolTalk).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/google/gemma-2-2b" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemma-2-2B&lt;/strong&gt;&lt;/a&gt; – Developed by Google DeepMind, this &lt;em&gt;2 billion-parameter&lt;/em&gt; model balances performance and efficiency; it also scores high in writing and safe classification.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://huggingface.co/microsoft/Phi-3.5-mini-instruct" rel="noopener noreferrer"&gt;&lt;strong&gt;Phi-3.5 Mini&lt;/strong&gt;&lt;/a&gt; – Microsoft's tiny-but-might open model with &lt;em&gt;3.8 billion-parameters&lt;/em&gt; optimized for reasoning and code generation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are other more powerful small language models available out there: &lt;strong&gt;Mistral 7B&lt;/strong&gt;, &lt;strong&gt;Gemma 9B&lt;/strong&gt;, and &lt;strong&gt;Phi-4 14B&lt;/strong&gt; (though I'm not sure if Phi-4 with 14 Billion parameters still qualifies as "small" but it's so damn capable :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Small Language Models
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Low Compute Requirements&lt;/strong&gt; – Can run on consumer laptops, edge devices, and mobile phones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lower Energy Consumption&lt;/strong&gt; – Efficient models reduce power usage, making them environmentally friendly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Inference&lt;/strong&gt; – Smaller models generate responses quickly, ideal for real-time applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Device AI&lt;/strong&gt; – No need for an internet connection or cloud services, enhancing privacy and security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cheaper Deployment&lt;/strong&gt; – Lower hardware and cloud costs make AI more accessible to startups and developers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizability&lt;/strong&gt;: Easily fine-tuned for domain-specific tasks (e.g., legal document analysis).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations of Small Language Models
&lt;/h2&gt;

&lt;p&gt;While SLMs offer numerous advantages, they also come with certain trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Narrow Scope&lt;/strong&gt;: Limited generalization outside their training domain (e.g., a medical SLM struggles with coding).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bias Risks&lt;/strong&gt;: Smaller datasets may amplify biases if not carefully curated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Complexity&lt;/strong&gt;: Smaller models may struggle with highly nuanced or complex tasks that require deep contextual understanding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Less Robustness&lt;/strong&gt;: They are more prone to errors in ambiguous scenarios or when faced with adversarial inputs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Applications of Small Language Models
&lt;/h2&gt;

&lt;p&gt;Despite their limitations, SLMs have a broad range of practical applications:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Chatbots &amp;amp; Virtual Assistants&lt;/strong&gt;: Efficient enough to run on mobile devices while providing real-time interaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Generation&lt;/strong&gt;: Models like Phi-3.5 Mini assist developers in writing and debugging code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language Translation&lt;/strong&gt;: Lightweight models can provide on-device translation for travelers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summarization &amp;amp; Content Generation&lt;/strong&gt;: Businesses use SLMs for generating marketing copy, social media posts, and reports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare Applications&lt;/strong&gt;: On-device AI for symptom checking and medical research.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IoT &amp;amp; Edge Computing&lt;/strong&gt;: Running AI on smart home devices without cloud dependency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Educational Tools&lt;/strong&gt;: Tutoring systems can utilize SLMs to generate personalized explanations, quizzes, and feedback in real-time.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Running Small Language Models on Edge Devices
&lt;/h2&gt;

&lt;p&gt;SLMs bring AI power directly to your smartphone (using PockPal) or PC (using Ollama), offering offline access, enhanced privacy, and lower latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  SLMs on Mobile Device with PocketPal
&lt;/h3&gt;

&lt;p&gt;For users interested in experiencing SLMs firsthand, the PocketPal AI app offers an intuitive way to interact with these models directly on your smartphone, without the need for an internet connection. Whether you want to draft emails, brainstorm ideas, or get answers to quick questions, PocketPal provides a seamless interface powered by optimized SLMs. Its offline capabilities ensure your queries remain private.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Offline AI Assistance: Run language models directly on your device without internet connectivity.&lt;/li&gt;
&lt;li&gt;Model Flexibility: Download and swap between multiple SLMs, including Danube 2 and 3, Phi, Gemma 2, and Qwen.&lt;/li&gt;
&lt;li&gt;Auto Offload/Load: Automatically manage memory by offloading models when the app is in the background.&lt;/li&gt;
&lt;li&gt;Inference Settings: Customize model parameters like system prompt, temperature, BOS token, and chat templates.&lt;/li&gt;
&lt;li&gt;Real-Time Performance Metrics: View tokens per second and milliseconds per token during AI response generation.
Download PocketPal AI on &lt;a href="https://apps.apple.com/us/app/pocketpal-ai/id6502579498" rel="noopener noreferrer"&gt;iOS&lt;/a&gt; and &lt;a href="https://play.google.com/store/apps/details?id=com.pocketpalai" rel="noopener noreferrer"&gt;Android&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Running SLMs on PC  with Ollama
&lt;/h3&gt;

&lt;p&gt;Ollama, an open-source tool, simplifies SLM deployment on PCs:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Management&lt;/strong&gt;: Run models like Llama3.2-1B or Phi-3.5 Mini with minimal setup.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPU Optimization&lt;/strong&gt;: Leverages consumer-grade GPUs for faster inference.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Workflows&lt;/strong&gt;: Integrate SLMs into data pipelines or creative tools (e.g., automated code reviews).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting Started with Ollama:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Ollama from &lt;a href="//Https://ollama.com"&gt;ollama.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the terminal and download a model:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama pull gemma2:2b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the model interactively:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama run gemma2:2b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This setup enables local AI-powered chatbots, coding assistants, and document summarization without needing cloud services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fine-Tuning Small Language Models
&lt;/h2&gt;

&lt;p&gt;One of the most exciting aspects of SLMs is their adaptability through fine-tuning. By exposing an SLM to domain-specific datasets, you can enhance its performance for niche applications. &lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Fine-tune a model on legal documents to create a contract analysis assistant.&lt;/li&gt;
&lt;li&gt;Train an SLM on technical manuals to build a troubleshooting guide for engineers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are several ways to fine-tune an SLM:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Full Fine-Tuning – Retraining all parameters with new data (requires significant compute).&lt;/li&gt;
&lt;li&gt;LoRA (Low-Rank Adaptation) – Fine-tunes only a few layers, making it lightweight and efficient.&lt;/li&gt;
&lt;li&gt;Adapters &amp;amp; Prompt Tuning – Adds extra layers or optimizes prompts to guide model responses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example: Fine-Tuning with LoRA&lt;br&gt;
Using Hugging Face’s &lt;code&gt;peft&lt;/code&gt; library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;peft&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;LoraConfig&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;get_peft_model&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AutoModelForCausalLM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;AutoTokenizer&lt;/span&gt;

&lt;span class="n"&gt;model_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemma-2-2b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AutoModelForCausalLM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tokenizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AutoTokenizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LoraConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lora_alpha&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lora_dropout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_peft_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Train the model on new data...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fine-tuning not only improves accuracy but also ensures the model aligns closely with your unique requirements.&lt;/p&gt;

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

&lt;p&gt;Small Language Models (SLMs) represent a crucial step toward efficient, accessible, and cost-effective AI. They provide practical solutions for businesses, developers, and researchers looking for powerful AI without the heavy computational burden of LLMs.&lt;/p&gt;

&lt;p&gt;With tools like &lt;strong&gt;Ollama&lt;/strong&gt; for PCs and &lt;strong&gt;fine-tuning options&lt;/strong&gt; for customization, SLMs are reshaping the AI landscape—making AI more personal, private, and available to everyone.&lt;/p&gt;

&lt;p&gt;Let's discover how compact AI can transform our projects.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>mobile</category>
      <category>datascience</category>
    </item>
    <item>
      <title>How Django Finds Static and Template Files: A Quick Guide</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Fri, 21 Feb 2025 01:47:57 +0000</pubDate>
      <link>https://dev.to/jjokah/how-django-finds-static-and-template-files-a-quick-guide-dk6</link>
      <guid>https://dev.to/jjokah/how-django-finds-static-and-template-files-a-quick-guide-dk6</guid>
      <description>&lt;p&gt;Ever wondered how Django magically finds your CSS, JavaScript, images, and HTML files?  It's not magic, but a well-defined system of settings and conventions!  Understanding how Django locates static and template files is crucial for any Django developer (esp. those like me who can't get their favicon to display ;) &lt;br&gt;
Here's a quick guide ↴&lt;/p&gt;


&lt;h2&gt;
  
  
  Static Seeker: How Django Hunts for CSS, JS, and Images
&lt;/h2&gt;

&lt;p&gt;Static files, like stylesheets, scripts, and images, are the non-dynamic assets that make your web pages look and function beautifully. Django knows where to find them by checking a few key places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;App-Specific Static Folders:&lt;/strong&gt;  The primary place Django looks is within your apps themselves!  Inside each app, Django expects a &lt;code&gt;static&lt;/code&gt; directory.  To avoid naming clashes, it's convention to create a subdirectory within &lt;code&gt;static&lt;/code&gt; named after your app.  So, for an app called &lt;code&gt;my_app&lt;/code&gt;, the path would be &lt;code&gt;my_app/static/my_app/&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project-Level Static Folders (&lt;code&gt;STATICFILES_DIRS&lt;/code&gt;):&lt;/strong&gt; Sometimes you have static files that are not specific to any single app, like global stylesheets or shared images.  The &lt;code&gt;STATICFILES_DIRS&lt;/code&gt; setting in your &lt;code&gt;settings.py&lt;/code&gt; is your go-to for this.  It's a list of directories where Django will look for static files in addition to the app-specific folders.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Production Powerhouse (&lt;code&gt;STATIC_ROOT&lt;/code&gt;):&lt;/strong&gt;  For production, you'll want to serve all your static files from one place for efficiency. That's where &lt;code&gt;STATIC_ROOT&lt;/code&gt; comes in. This setting defines the absolute path to a directory where the &lt;code&gt;collectstatic&lt;/code&gt; management command will gather all your static files into a single location. Your web server then serves these files from &lt;code&gt;STATIC_ROOT&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Settings in &lt;code&gt;settings.py&lt;/code&gt; for Static Files:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# settings.py
&lt;/span&gt;
&lt;span class="n"&gt;STATIC_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/static/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;  &lt;span class="c1"&gt;# URL to access static files (browser-facing)
&lt;/span&gt;
&lt;span class="n"&gt;STATICFILES_DIRS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;BASE_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;static&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# Project-level static files in the root 'static' folder
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;STATIC_ROOT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;BASE_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;staticfiles&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="c1"&gt;# Where 'collectstatic' puts all static files
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Directory Structure:&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;myproject/
├── myapp/
│   ├── static/
│   │   ├── myapp/
│   │   │   ├── css/
│   │   │   │   └── style.css
│   │   │   ├── images/
│   │   │   │   └── logo.png
├── static/             # Project-level static folder
│   └── global.css
├── settings.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Accessing Static Files in Templates:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your Django templates, you load the &lt;code&gt;static&lt;/code&gt; template tag set and then use &lt;code&gt;{% static 'path/to/your/static/file.ext' %}&lt;/code&gt; to generate the correct URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;{% load static %}
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{% static 'myapp/css/style.css' %}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"{% static 'images/logo.png' %}"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"My Logo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Template Tracker: Django's Path to HTML Files
&lt;/h2&gt;

&lt;p&gt;Templates are your HTML files that Django dynamically fills with data. Django's template finding process is similarly structured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;App-Specific Template Folders:&lt;/strong&gt;  Just like static files, Django checks for a &lt;code&gt;templates&lt;/code&gt; directory within each app.  Following convention, create a subdirectory inside &lt;code&gt;templates&lt;/code&gt; named after your app: &lt;code&gt;my_app/templates/my_app/&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Project-Level Template Folders (&lt;code&gt;TEMPLATES['DIRS']&lt;/code&gt;):&lt;/strong&gt;  For templates that are used across multiple apps or project-wide layouts, you can define global template directories in the &lt;code&gt;TEMPLATES&lt;/code&gt; setting in &lt;code&gt;settings.py&lt;/code&gt; under the &lt;code&gt;DIRS&lt;/code&gt; key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;APP_DIRS: True&lt;/code&gt; Magic:&lt;/strong&gt;  Within the &lt;code&gt;TEMPLATES&lt;/code&gt; setting, &lt;code&gt;APP_DIRS: True&lt;/code&gt; is crucial! This setting tells Django to automatically look inside each app's &lt;code&gt;templates/&lt;/code&gt; directory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Settings in &lt;code&gt;settings.py&lt;/code&gt; for Templates:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# settings.py
&lt;/span&gt;
&lt;span class="n"&gt;TEMPLATES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;BACKEND&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.template.backends.django.DjangoTemplates&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;DIRS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;BASE_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;templates&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;  &lt;span class="c1"&gt;# Project-level templates directory
&lt;/span&gt;        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;APP_DIRS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;#  Look for templates in app 'templates' folders
&lt;/span&gt;        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;OPTIONS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;context_processors&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="c1"&gt;# ... default context processors
&lt;/span&gt;            &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Directory Structure:&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;myproject/
├── myapp/
│   ├── templates/
│   │   ├── myapp/
│   │   │   ├── index.html
│   │   │   ├── detail.html
├── templates/          # Project-level templates folder
│   ├── base.html
│   ├── home.html
├── settings.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Using Templates in Views:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In your Django views, you use &lt;code&gt;render(request, 'template_name.html')&lt;/code&gt;. Django then searches for &lt;code&gt;template_name.html&lt;/code&gt; based on the configured template directories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;my_view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;myapp/index.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Django finds 'myapp/templates/myapp/index.html'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;In Summary:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Django's organized approach to static and template files relies on clear settings and naming conventions. By understanding &lt;code&gt;STATIC_URL&lt;/code&gt;, &lt;code&gt;STATIC_ROOT&lt;/code&gt;, &lt;code&gt;STATICFILES_DIRS&lt;/code&gt;, &lt;code&gt;TEMPLATES['DIRS']&lt;/code&gt;, and &lt;code&gt;APP_DIRS&lt;/code&gt;, you can effectively structure your Django projects and ensure Django can always find the files it needs.&lt;/p&gt;

&lt;p&gt;Still scratching your head about a specific static or template issue? Check out Django's Official Documation on static files and template using the reference link below.&lt;/p&gt;




&lt;p&gt;Ref:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For static files: &lt;a href="https://docs.djangoproject.com/en/stable/howto/static-files/" rel="noopener noreferrer"&gt;https://docs.djangoproject.com/en/stable/howto/static-files/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;For templates: &lt;a href="https://docs.djangoproject.com/en/stable/topics/templates/" rel="noopener noreferrer"&gt;https://docs.djangoproject.com/en/stable/topics/templates/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Neural Network (explained in 1 Byte)</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Wed, 19 Jun 2024 12:11:08 +0000</pubDate>
      <link>https://dev.to/jjokah/neural-network-explained-in-1-byte-2hop</link>
      <guid>https://dev.to/jjokah/neural-network-explained-in-1-byte-2hop</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/cs"&gt;DEV Computer Science Challenge v24.06.12: One Byte Explainer&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Explainer
&lt;/h2&gt;

&lt;p&gt;Just like our brain, a Neural Network is made up of interconnected "neurons". These neurons work together by learning from (&lt;strong&gt;input&lt;/strong&gt;) data and getting better at tasks (in the &lt;strong&gt;hidden layer&lt;/strong&gt;) to give (&lt;strong&gt;output&lt;/strong&gt;) predictions or decisions.&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%2F8h1vgciqhfti62nnz7nk.jpg" 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%2F8h1vgciqhfti62nnz7nk.jpg" alt="Neural Networks" width="698" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Context
&lt;/h2&gt;

&lt;p&gt;A Neural Network is a computational model inspired by the structure and function of the human brain. It consists of a series of interconnected "neurons" or nodes organized in layers. These layers include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input Layer&lt;/strong&gt;: Each node in this layer represents a feature from the input data. For example, if the data is an image, each node might represent a pixel value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hidden Layers&lt;/strong&gt;: This is where the real magic happens. This layer consists of multiple nodes that process and transform the input data through a series of &lt;em&gt;weighted&lt;/em&gt; connections. Each connection has a weight that gets adjusted during training based on the input data and the desired output to minimize errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output Layer&lt;/strong&gt;: This layer takes the outputs of the last hidden layer and transforms them into the final prediction of the network. For example, if it is an image recognition task, each node in the output layer might represent different predictions to identify the image.&lt;/li&gt;
&lt;/ol&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%2Fmoe3vabus5e410yqgvbh.jpg" 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%2Fmoe3vabus5e410yqgvbh.jpg" alt="Neural Network expanded" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In summary, a Neural Network mimics the human brain's ability to learn and make decisions by processing input data through interconnected layers of neurons, adjusting weights, and minimizing errors to improve performance.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>cschallenge</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Basic Terms in Machine Learning (Model Training)</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Thu, 18 Apr 2024 19:54:36 +0000</pubDate>
      <link>https://dev.to/jjokah/basic-terms-in-machine-learning-model-training-454c</link>
      <guid>https://dev.to/jjokah/basic-terms-in-machine-learning-model-training-454c</guid>
      <description>&lt;p&gt;As the AI hype grows, machine learning is making its way into every recent innovative product. Therefore, understanding the basic concepts and terminologies of machine learning becomes increasingly essential for anyone looking to get started with or deepen their knowledge of machine learning.&lt;br&gt;
Machine learning is a powerful technique that enables computers to learn from data and make predictions or decisions without being explicitly programmed.&lt;/p&gt;

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

&lt;p&gt;Below are brief explanations of some fundamental terminologies in machine learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Terms in Machine Learning
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Artificial Intelligence&lt;/strong&gt;: Artificial Intelligence (AI) is a technology that enables computers and machines to simulate human intelligence and problem-solving capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Machine Learning&lt;/strong&gt;: Machine Learning (ML) is a subset of artificial intelligence that involves training algorithms to learn from data and make predictions or decisions without being explicitly programmed to perform a specific task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neural Network&lt;/strong&gt;: A neural network is a type of machine learning model that is inspired by the structure and function of the human brain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Learning&lt;/strong&gt;: Deep learning is a subset of machine learning that uses artificial neural networks with multiple layers to model complex relationships between inputs and outputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt;: A model is a simplified representation of a real-world process or system that is created to make predictions or decisions based on input data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset&lt;/strong&gt;: A dataset is a structured collection of data that is organized and stored for easy access and analysis. They are sets of examples or observations that are used to train, validate or test machine learning models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prediction&lt;/strong&gt;: The prediction is the result/output from the model. It is the estimation based on input data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parameters&lt;/strong&gt;: Parameters are internal variables of a machine learning model that are learned from the training data to capture the relationships and patterns within the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training&lt;/strong&gt;: This is the process of teaching a model to make predictions or decisions by exposing it to input data and adjusting its internal parameters based on the observed outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPU&lt;/strong&gt;: Graphics Processing Unit (GPU) is a specialized hardware components that excel at parallel processing and has become indispensable in accelerating machine learning tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;p&gt;At the core of machine learning is the process of training models - algorithms that can recognize patterns and extract insights from data.&lt;br&gt;
Here is an oversimplified process of machine learning model training: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;first, you &lt;strong&gt;&lt;em&gt;collect and clean relevant data&lt;/em&gt;&lt;/strong&gt;, then &lt;em&gt;&lt;strong&gt;pick an algorithm&lt;/strong&gt;&lt;/em&gt; suited to the task. The algorithm analyzes the data to &lt;em&gt;&lt;strong&gt;learn patterns&lt;/strong&gt;&lt;/em&gt;, and the &lt;em&gt;&lt;strong&gt;model is tested and refined&lt;/strong&gt;&lt;/em&gt; to improve its accuracy. Finally, the trained model can be used to &lt;em&gt;&lt;strong&gt;make predictions&lt;/strong&gt;&lt;/em&gt; on new data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foh71ua5a5hsqwfenhp4y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foh71ua5a5hsqwfenhp4y.jpg" alt="machine learning model training process"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's look at some terms in training a machine learning model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Terms in Model Training
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pre-trained models&lt;/strong&gt;: These are models that have been trained on a large dataset to perform a specific task, such as image classification, natural language processing, etc., before being made available for use by others.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transfer learning&lt;/strong&gt;: This is a machine learning technique that leverages pre-trained model knowledge to be applied to a different but related task (by fine-tuning).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-tuning&lt;/strong&gt;: It is a process in transfer learning where a pre-trained model is further trained on a new, smaller dataset for a specific task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overfitting&lt;/strong&gt;: This occurs when a model learns the training data too well, capturing noise and random fluctuations rather than the underlying patterns. It leads to poor generalization performance on new, unseen data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training set, validation set, and test set&lt;/strong&gt;: These are different portions of the dataset for evaluation. The training set is used to train the model, the validation set is used to fine-tune hyperparameters and evaluate performance during training, and the test set is used to assess the model's final performance on unseen data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hyperparameters&lt;/strong&gt;: These are other parameters that define how the model is trained. For example, defining how long we train for, or what learning rate. They are external configuration settings set by the engineer or researcher.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Epoch&lt;/strong&gt;: An epoch refers to one complete pass through the entire training dataset during the training of a model. Multiple epochs are typically required. On each epoch, the parameters are updated based on the gradient of the loss function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metric&lt;/strong&gt;: A metric is a function that measures the quality of the model's predictions using the validation set. A metric is defined for human consumption, easy for you to understand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loss&lt;/strong&gt;: This is also known as the loss function or cost function. It is a mathematical function that quantifies the difference between the model's predictions and the actual outcomes (labels) in the training data. Loss is used to update weights automatically, easy for stochastic gradient descent to use.&lt;/li&gt;
&lt;li&gt;Architecture&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stochastic Gradient Descent&lt;/strong&gt;: SGD is an optimization algorithm used for training models by updating the parameters iteratively with small batches of data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture&lt;/strong&gt;: This is the overall structure design of a model. The architecture of a neural network defines its overall structure, including the arrangement of layers, the number of neurons, and the connections between neurons.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Having gone through this ML jargon, you should have a solid grasp of the core terminology used in machine learning model training. This knowledge will prepare you to dive deeper into more advanced ML concepts.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>tutorial</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Pattern Program: A Creative Intersection of Logic and Design</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Thu, 25 Jan 2024 17:17:10 +0000</pubDate>
      <link>https://dev.to/jjokah/pattern-program-a-creative-intersection-of-logic-and-design-36b9</link>
      <guid>https://dev.to/jjokah/pattern-program-a-creative-intersection-of-logic-and-design-36b9</guid>
      <description>&lt;p&gt;Pattern programming is like drawing with code, where you can make all sorts of interesting shapes and designs with a set of instructions. It is one of the earliest intersections of art and logic in programming.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Pattern Program?
&lt;/h2&gt;

&lt;p&gt;A pattern program is a piece of code that generates a specific textual pattern in the form of shapes, numerical sequences, or even complex designs. Pattern programs are commonly used to practice problem-solving skills that have to do with logic and control structures. It is an accessible way for beginners to learn programming concepts while also producing visually interesting results.&lt;/p&gt;

&lt;p&gt;In pattern programming, a rule is defined on how each element is arranged to make a recognizable pattern. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;For example&lt;/em&gt;&lt;/strong&gt;, creating rows and columns of a rectangle by printing a pattern element in a nested loop. Usually, the first loop defines the length of the shape (in rows), then a new line (\n),  and the second loop defines the width of the shape (in columns).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Rectangle pattern:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Program pattern for the rectangle:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;# rows
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;# columns
&lt;/span&gt;        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# pattern element *
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# new line
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Types of Pattern Programs
&lt;/h2&gt;

&lt;p&gt;Pattern programs often comes in these three (3) patterns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Shape Pattern: A shape pattern program involves creating visual designs using a character symbol to form various geometric shapes, such as triangles, squares, retangles, and more.&lt;/li&gt;
&lt;li&gt;Number Pattern: A number pattern program involves using numbers to create sequences or arrangements that follow a specific rule or logic. A typical example is the pascal triangle.&lt;/li&gt;
&lt;li&gt;Letter Pattern: A letter pattern program involves using letters of the alphabet to create interesting arrangements or shapes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Examples of Pattern Programs
&lt;/h2&gt;

&lt;p&gt;Here are some examples of pattern program in python:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Diamond Pattern
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_diamond_pattern&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Upper half of the diamond
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;* &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Lower half of the diamond (excluding the center row for odd row numbers)
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;* &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Example: Generate a diamond pattern with 5 rows
&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="nf"&gt;generate_diamond_pattern&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Alphabetic Half Pyramid Pattern
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_alphabetic_half_pyramid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;A&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Example: Generate an alphabetic half pyramid pattern with 5 rows
&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="nf"&gt;generate_alphabetic_half_pyramid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A 
A B 
A B C 
A B C D 
A B C D E 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Pascal Triangle
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_pascals_triangle_pyramid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;triangle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;max_width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])))&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;formatted_row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formatted_row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_width&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="c1"&gt;# Example: Generate Pascal's Triangle with 5 rows in pyramid pattern
&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="nf"&gt;generate_pascals_triangle_pyramid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    1    
   1 1   
  1 2 1  
 1 3 3 1 
1 4 6 4 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Chessboard Pattern
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_chessboard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="c1"&gt;# Check if the sum of row and column indices is even or odd
&lt;/span&gt;            &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;■&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;□&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Example: Generate a chessboard pattern with 8 rows and 8 columns
&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="n"&gt;cols&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;
&lt;span class="nf"&gt;generate_chessboard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cols&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;■ □ ■ □ ■ □ ■ □ 
□ ■ □ ■ □ ■ □ ■ 
■ □ ■ □ ■ □ ■ □ 
□ ■ □ ■ □ ■ □ ■ 
■ □ ■ □ ■ □ ■ □ 
□ ■ □ ■ □ ■ □ ■ 
■ □ ■ □ ■ □ ■ □ 
□ ■ □ ■ □ ■ □ ■ 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Doormat Pattern
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;print_welcome_pattern&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.|.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;welcome_message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;WELCOME&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="c1"&gt;# Print the top part of the pattern
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Print the welcome message
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;welcome_message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="c1"&gt;# Print the bottom part of the pattern
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Example usage for a 11 x 33 pattern
&lt;/span&gt;&lt;span class="nf"&gt;print_welcome_pattern&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---------------.|.---------------
------------.|..|..|.------------
---------.|..|..|..|..|.---------
------.|..|..|..|..|..|..|.------
---.|..|..|..|..|..|..|..|..|.---
-------------WELCOME-------------
---.|..|..|..|..|..|..|..|..|.---
------.|..|..|..|..|..|..|.------
---------.|..|..|..|..|.---------
------------.|..|..|.------------
---------------.|.---------------
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;As we've seen with triangles, diamonds, and more, there's an artistic side to coding that often goes unnoticed. It's about finding beauty in the logical. Both newbies and seasoned coders can hone their creative, artistic, and programming skills while playing with Pattern Programs. The beauty of pattern programming lies in its simplicity and the endless possibilities it offers.&lt;/p&gt;

</description>
      <category>python</category>
      <category>design</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>2024 Goals (ML, 1024km run, Writing)</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Fri, 19 Jan 2024 19:25:58 +0000</pubDate>
      <link>https://dev.to/jjokah/2024-goals-ml-1024km-run-writing-52k7</link>
      <guid>https://dev.to/jjokah/2024-goals-ml-1024km-run-writing-52k7</guid>
      <description>&lt;p&gt;It's that time of the year when everyone is fired up to set bodacious goals. Now the DEV team has invited us to an accountability party with #devresolutions2024, and I hope we all deliver because it's going to be one hell of a ride once we accept the invitation. This kind of post will come to hunt you at the end of the year if you screw up or it could give you the best feeling in the world - fulfilment. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here are my&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Professional Goals:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Python Certification&lt;/strong&gt;&lt;br&gt;
I know Python pretty well, but I feel it would be great to also get a certificate as proof of concept. LinkedIn likes certification, so let's give it more this year ;)&lt;br&gt;
Resource: &lt;a href="https://www.hackerrank.com/skills-verification/python_basic"&gt;HackerRank&lt;/a&gt; and &lt;a href="https://www.freecodecamp.org/learn/scientific-computing-with-python/"&gt;freeCodeCamp&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Django Project&lt;/strong&gt;&lt;br&gt;
Aside being a Pythonista, I am a Djangonaut. And this year I will commit to developing a production-ready application with Django.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Machine Learning Course&lt;/strong&gt;&lt;br&gt;
Given that ML is currently the hottest space, how about we go get some! Okay, not just that; there are other better reasons and I've got plans ;)&lt;br&gt;
Resource: &lt;a href="https://course.fast.ai/"&gt;Fast.ai&lt;/a&gt; and &lt;a href="https://huggingface.co/learn"&gt;HuggingFace&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Personal Aspirations:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conversational Spanish&lt;/strong&gt;&lt;br&gt;
As an English speaker and a lazy student, I chose to learn Spanish because I think it is the easiest language for English speakers to learn.&lt;br&gt;
Resource: &lt;a href="https://www.duolingo.com/"&gt;Duolingo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run 1,024 km&lt;/strong&gt;&lt;br&gt;
Ever heard of David Goggins? That's the man that made me run a marathon twice and several half-marathons last year. This year I will run at least a total distance of 1024km.&lt;br&gt;
Resource: &lt;a href="https://www.mapmyfitness.com/challenges/"&gt;MapMyFitness&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Chess 1500 Elo Rating&lt;/strong&gt;&lt;br&gt;
Let's try to convince whoever will buy the idea that we are smart because we are good at chess. Okay, I just love the game and I want to get better at it. That's it.&lt;br&gt;
Resource: &lt;a href="https://www.chess.com"&gt;Chess.com&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  DEV Community Contributions:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Weekly Post&lt;/strong&gt; &lt;br&gt;
I am wondering why I have not been committed to posting on DEV. Most times I feel everything that I want to talk about has already been said, so why bother writing? However, I have found a good reason to write. Here it is: "Do it for you!". The point here is to focus on understanding a concept by writing about it or simply just telling your story as a developer. Hopefully, someone will find it useful but even if it gets zero views and zero likes, you keep writing for you.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If you can think, and speak, and write, you are absolutely deadly. &lt;strong&gt;Writing is thinking formalized.&lt;/strong&gt; You gain the ability to think by first learning to write very, very carefully.&lt;/em&gt;&lt;br&gt;
— Dr Jordan B. Peterson&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Contribute and Collaborate&lt;/strong&gt; &lt;br&gt;
I will contribute to the community by sharing my story, moderating regularly, and collaborating with others to make &lt;a href="https://dev.to/"&gt;dev.to&lt;/a&gt; great again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;So help me God.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devresolutions2024</category>
    </item>
    <item>
      <title>Getting Started with Mojo ️‍🔥</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Sun, 17 Sep 2023 07:25:40 +0000</pubDate>
      <link>https://dev.to/jjokah/getting-started-with-mojo-4985</link>
      <guid>https://dev.to/jjokah/getting-started-with-mojo-4985</guid>
      <description>&lt;p&gt;Mojo, the new Programming Language for all AI developers is as simple as Python and as fast as C.&lt;/p&gt;




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

&lt;p&gt;Mojo is a programming language developed by the Modular team to simplify AI and machine learning infrastructure. It offers powerful compile-time metaprogramming, support for various accelerators, and full compatibility with Python.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mojo combines the usability of Python with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mojo's goal is to create a unified language that streamlines AI development while retaining compatibility with Python.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why you would love it.
&lt;/h3&gt;

&lt;p&gt;If you are a developer, and you love AI, and you love speed, and you love simplicity, you will love mojo.&lt;/p&gt;

&lt;p&gt;Here are the best parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Usability and Programmability&lt;/strong&gt;: &lt;em&gt;Write everything in one language.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Write Python and scale all the way down to the metal. Program the multitude of low-level AI hardware. No C++ or CUDA required.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;: &lt;em&gt;Unlock Python performance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Utilize the full power of the hardware, including multiple cores, vector units, and exotic accelerator units, with the world's most advanced compiler and heterogenous runtime. Achieve performance on par with C++ and CUDA without the complexity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Interoperability&lt;/strong&gt;: &lt;em&gt;Access the entire Python ecosystem&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Experience true interoperability with the Python ecosystem. Seamlessly intermix arbitrary libraries like Numpy and Matplotlib and your custom code with Mojo.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Why is there always a fire emoji beside the Mojo 🔥?
&lt;/h3&gt;

&lt;p&gt;Because it's freaking hot!&lt;/p&gt;

&lt;p&gt;And, mainly because the emoji is its file extension. You can save your code as &lt;code&gt;hello.🔥&lt;/code&gt; or &lt;code&gt;hello.mojo&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;From the Mojo team:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We paired Mojo with fire emoji 🔥 as a fun visual way to impart onto users that Mojo empowers them to get their Mojo on—to develop faster and more efficiently than ever before. We also believe that the world can handle a unicode extension at this point, but you can also just use the &lt;code&gt;.mojo&lt;/code&gt; extension. :)&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How to Install Mojo on Linux?
&lt;/h2&gt;

&lt;p&gt;Currently, Mojo is available locally only for Ubuntu Linux systems. For now, Windows and Mac users can find their way around using &lt;em&gt;WSL&lt;/em&gt;, &lt;em&gt;containers&lt;/em&gt;, or &lt;em&gt;a remote Linux system.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  System Requirements:
&lt;/h3&gt;

&lt;p&gt;To get started, make sure your system meets these requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ubuntu 20.04 and later&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;x86-64 CPU and minimum 4GiB RAM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python 3.8 - 3.10&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;g++ or clang++ compiler (&lt;em&gt;g++ comes pre-installed on Ubuntu&lt;/em&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install the Modular CLI and Mojo SDK
&lt;/h3&gt;

&lt;p&gt;The Modular CLI works like a package manager to install and update Mojo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install the Modular CLI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://get.modular.com | &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nv"&gt;MODULAR_AUTH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;mut_fe303dc5ca504bc4867a1db20d897fd8 &lt;span class="se"&gt;\&lt;/span&gt;
  sh -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Mojo SDK includes everything you need for local Mojo development, including the Mojo standard library and the Mojo command-line interface (CLI). The Mojo CLI can start a REPL programming environment, compile and run Mojo source files, format source files, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install the Mojo SDK:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;modular &lt;span class="nb"&gt;install &lt;/span&gt;mojo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Time for Hello World
&lt;/h2&gt;

&lt;p&gt;Before you can write your first program in Mojo, you have to set the &lt;code&gt;MODULAR_HOME&lt;/code&gt; and &lt;code&gt;PATH&lt;/code&gt; variables on your shell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export MODULAR_HOME="$HOME/.modular"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="$MODULAR_HOME/pkg/packages.modular.com_mojo/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc

&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run Mojo on REPL
&lt;/h3&gt;

&lt;p&gt;To start a REPL session, type &lt;code&gt;mojo&lt;/code&gt; in your terminal and press Enter.&lt;/p&gt;

&lt;p&gt;Then type &lt;code&gt;print("Hello, world!")&lt;/code&gt; and press Enter twice (a blank line is required to indicate the end of an expression).&lt;/p&gt;

&lt;p&gt;That’s it! For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;mojo
Welcome to Mojo! 🔥
Expressions are delimited by a blank line.
Type &lt;span class="sb"&gt;`&lt;/span&gt;:mojo &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="k"&gt;for &lt;/span&gt;further assistance.
1&amp;gt; print&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
2.
Hello, world!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can write as much code as you want in the REPL. You can press Enter to start a new line and continue writing code, and when you want Mojo to evaluate the code, press Enter twice. If there’s something to print, Mojo prints it and then returns the prompt to you.&lt;/p&gt;

&lt;p&gt;The REPL is primarily useful for short experiments because the code isn’t saved. So when you want to write a real program, you need to put the code in a &lt;code&gt;.mojo&lt;/code&gt; source file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run a Mojo file
&lt;/h3&gt;

&lt;p&gt;To write the Mojo code and execute it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a file named &lt;code&gt;hello.mojo&lt;/code&gt; (or &lt;code&gt;hello.🔥&lt;/code&gt;) and add the following code:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fn main&lt;span class="o"&gt;()&lt;/span&gt;:
   print&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;That’s all you need. Save the file and return to your terminal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now run it with the &lt;code&gt;mojo&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mojo hello.mojo
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;It should immediately print the message:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Hello, world!
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Mojo Language Basics
&lt;/h2&gt;

&lt;p&gt;Here are some things to note about the language:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Syntax and Semantics:
&lt;/h3&gt;

&lt;p&gt;Mojo supports Python's syntax and semantics, using line breaks and indentation for code blocks. It has most Python control-flow features.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Functions&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Functions in Mojo can be declared using either &lt;code&gt;fn&lt;/code&gt; (strongly-typed, memory-safe) or &lt;code&gt;def&lt;/code&gt; (Python-style dynamic). &lt;code&gt;fn&lt;/code&gt; functions enforce type safety.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Variables:
&lt;/h3&gt;

&lt;p&gt;Variables in Mojo can be declared with &lt;code&gt;var&lt;/code&gt; (mutable) or &lt;code&gt;let&lt;/code&gt; (immutable). Declaring types for variables is optional.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;do_math&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;do_math&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Structures:
&lt;/h3&gt;

&lt;p&gt;Mojo allows the creation of structs for high-level abstractions. A &lt;code&gt;struct&lt;/code&gt; in Mojo is similar to a &lt;code&gt;class&lt;/code&gt; in Python. But structs are static and don't allow dynamic dispatch.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;MyPair&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;
    &lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;

    &lt;span class="n"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;inout&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;second&lt;/span&gt;

    &lt;span class="n"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;second&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;mine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MyPair&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;mine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Python Integration:
&lt;/h3&gt;

&lt;p&gt;Mojo provides a mechanism to import Python modules as-is, leveraging existing Python code.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Python&lt;/span&gt;

&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Python&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;import_module&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;numpy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;ar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;arange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ar&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ar&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&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;[[ 0  1  2  3  4]
 [ 5  6  7  8  9]
 [10 11 12 13 14]]
(3, 5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Mojo aims to combine the best of systems programming with the ease and flexibility of Python.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For those using VS Code, you can install the &lt;a href="https://marketplace.visualstudio.com/items?itemName=modular-mojotools.vscode-mojo"&gt;Mojo extension&lt;/a&gt;, so you get syntax highlighting, code completion, diagnostics, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also experiment with Mojo using the web-based &lt;a href="https://docs.modular.com/mojo/manual/get-started/#develop-in-the-mojo-playground"&gt;Mojo Playground&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To learn more about Mojo, &lt;a href="https://docs.modular.com/mojo/"&gt;Read the Docs&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And you can always chat with the Mojo community on &lt;a href="https://discord.gg/modular"&gt;Discord&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mojo🔥 is the future programming language for all AI developers.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>mojo</category>
      <category>c</category>
      <category>ai</category>
    </item>
    <item>
      <title>Getting started with VIM: the Lightning Text Editor ⚡</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Mon, 24 Jul 2023 08:36:11 +0000</pubDate>
      <link>https://dev.to/jjokah/getting-started-with-vim-the-lightning-text-editor-3eid</link>
      <guid>https://dev.to/jjokah/getting-started-with-vim-the-lightning-text-editor-3eid</guid>
      <description>&lt;p&gt;Whatever sins this text editor may have, being slow is not one of them. &lt;br&gt;
Vim is a light and powerful text editor widely used among programmers and other technical professionals who work with text regularly.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Vim
&lt;/h2&gt;

&lt;p&gt;Vim is known for its speed and low resource consumption, making it suitable for use on older systems or in remote environments. It's often preferred by developers who work on servers or in terminal-only environments. It gives them seamless integration with the command line.&lt;br&gt;
&lt;em&gt;It also makes you feel like a tech-savvy.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing Vim
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;On Linux&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On macOS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;On Windows&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the Vim website: &lt;a href="https://www.vim.org/download.php"&gt;https://www.vim.org/download.php&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Under "PC: MS-DOS and MS-Windows," click on the "gvim82.exe" link (the version number may vary).&lt;/li&gt;
&lt;li&gt;Run the downloaded installer, and follow the on-screen instructions to install Vim.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;On Android&lt;/strong&gt; - &lt;a href="https://dev.to/jjokah/getting-started-with-termux-307f"&gt;Termux&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pkg &lt;span class="nb"&gt;install &lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Opening Vim
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;After installing Vim, type
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on the terminal or PowerShell, to open the text editor.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Also use the command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vim &amp;lt;FILENMAE&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to open an existing file or create a new one if it doesn't exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modes in Vim
&lt;/h2&gt;

&lt;p&gt;There are three essential modes in Vim, they are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Normal:&lt;/strong&gt;    Default; for navigation and simple editing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command Line:&lt;/strong&gt; For operations like saving, exiting, searching etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insert:&lt;/strong&gt; For explicitly inserting and modifying text&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Normal mode
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;Esc&lt;/code&gt; key to return to the normal mode, even if you are already in the normal mode. The mode is mainly for navigation; you can use the arrow buttons to move the cursor up ↑, down ↓, left ← and right → of your file.&lt;br&gt;
It is from the &lt;em&gt;Normal Mode&lt;/em&gt;, you can enter the &lt;em&gt;Insert Mode&lt;/em&gt; and the &lt;em&gt;Command Line Mode&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Command Line Mode
&lt;/h3&gt;

&lt;p&gt;To enter the Command Line Mode, press the column character &lt;code&gt;:&lt;/code&gt; and the Vim editor will be ready to accept your command.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now let's have a drum roll 🥁 because we are about to finally &lt;strong&gt;exit Vim&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HOW TO EXIT VIM&lt;/p&gt;

&lt;p&gt;Press the keys &lt;code&gt;:q!&lt;/code&gt; and hit &lt;code&gt;&amp;lt;ENTER&amp;gt;&lt;/code&gt; to exit.&lt;/p&gt;

&lt;p&gt;Yeah that's all. We made it out, FAST. You can now exit Vim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z44JNopz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmbmsby0yfoh1o3hlk8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z44JNopz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmbmsby0yfoh1o3hlk8e.png" alt="When you finally exit Vim" width="688" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's proceed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Insert Mode
&lt;/h3&gt;

&lt;p&gt;To enter the Insert Mode, just hit the letter &lt;code&gt;i&lt;/code&gt; on your keyboard. And voila, you're in. You will always see &lt;strong&gt;-- INSERT --&lt;/strong&gt; at the bottom left of your screen whenever you are in insert mode.&lt;br&gt;
This means you can now edit the file, by typing in your text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Commands
&lt;/h2&gt;

&lt;p&gt;Here are some basic commands to get you rolling with Vim:&lt;/p&gt;

&lt;h3&gt;
  
  
  Saving and Quitting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;:w&lt;/code&gt; (write) - to save file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:q&lt;/code&gt; (quit) - to exit and confirm if not saved&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:wq&lt;/code&gt; (write and quit) - to save file and exit vim&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:q!&lt;/code&gt; (quite forcefully) - to exit Vim whether the file is saved or not&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Search and Replace Text
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/text&lt;/code&gt; - to search for &lt;code&gt;text&lt;/code&gt; in the document, going forward.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;n&lt;/code&gt; - to move the cursor to the next instance of the text from the last search. This will wrap to the beginning of the document.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;N&lt;/code&gt; - to move the cursor to the previous instance of the text from the last search.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;:%s/text/replacement text/g&lt;/code&gt; - to search through the entire document for &lt;code&gt;text&lt;/code&gt; and replace it with &lt;code&gt;replacement text&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Copy, Paste, Undo, Redo
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;v&lt;/code&gt; (visual mode) -  to highlight one character at a time. Use the arrow keys to move the cursor and select text.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;y&lt;/code&gt; (yank) - to copy text into Vim's copy buffer.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;p&lt;/code&gt; (paste) - to paste copied text after the cursor.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;u&lt;/code&gt; (undo) - to undo the last operation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl+r&lt;/code&gt; (redo) - to redo the last undo.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Moving the cursor
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;use &lt;code&gt;↑↓←→&lt;/code&gt; up, down, left, and right arrow keys &lt;em&gt;to move around&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;HOME&lt;/code&gt; key &lt;em&gt;to go to the beginning of a line&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;Ctrl+HOME&lt;/code&gt; &lt;em&gt;to go to the beginning of the file&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;END&lt;/code&gt; key &lt;em&gt;to go to the end of a line&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;use &lt;code&gt;Ctrl+END&lt;/code&gt; &lt;em&gt;to go to the end of a file&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next Step
&lt;/h2&gt;

&lt;p&gt;This is how far I can go with you on this journey. At least, you now know how to exit (with &lt;code&gt;:q!&lt;/code&gt; or &lt;code&gt;:wq&lt;/code&gt;), whenever you get into trouble. Let &lt;em&gt;Documentation&lt;/em&gt;, &lt;em&gt;Trials-and-Errors&lt;/em&gt;, &lt;em&gt;Google&lt;/em&gt;, and &lt;em&gt;ChatGPT&lt;/em&gt; be your guide. You have to continue the remaining part of the journey on your own. &lt;/p&gt;

&lt;p&gt;I wish you the best of luck 🍀&lt;/p&gt;

</description>
      <category>terminal</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Getting Started with TERMUX 📲</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Thu, 20 Jul 2023 07:48:11 +0000</pubDate>
      <link>https://dev.to/jjokah/getting-started-with-termux-307f</link>
      <guid>https://dev.to/jjokah/getting-started-with-termux-307f</guid>
      <description>&lt;p&gt;Have you ever been stuck with just your phone on a bus or in a boring environment and all you could think of is getting right back to your Dev environment? 🧑‍💻&lt;/p&gt;

&lt;p&gt;If you've got an Android device, we've got good news. ⤵ &lt;br&gt;
&lt;strong&gt;Termux&lt;/strong&gt; essentially turns an Android device into a lightweight and portable development environment, enabling users to perform various tasks, such as coding, scripting, system administration, and network testing, directly on their smartphones or tablets.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Introduction 📖
&lt;/h2&gt;

&lt;p&gt;Termux is an Android terminal emulator and Linux environment app that allows users to run a full-fledged Linux distribution on their Android devices. It provides a powerful command-line interface (CLI) that enables users to execute various Unix commands, run shell scripts, and access a wide range of Linux tools and utilities directly on their Android smartphones or tablets.&lt;/p&gt;

&lt;p&gt;Termux provides a convenient and flexible environment for developers, system administrators, and enthusiasts who want to perform tasks such as programming, scripting, development, testing, and system management on their Android devices. It offers access to a package manager (&lt;code&gt;pkg&lt;/code&gt;) that allows users to install various software packages, including programming languages, text editors, version control systems, networking tools, and more.&lt;/p&gt;

&lt;p&gt;With Termux, users can perform tasks similar to what they would do on a traditional Linux distribution, making it a popular choice for those who need a Linux-like environment on their mobile devices. It's worth noting that while Termux provides a Linux-like environment, it operates within the confines of Android's security mechanisms, so it might not have access to certain system-level functions or require root permissions for some operations.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Setup ⚙️
&lt;/h2&gt;

&lt;p&gt;Setting up Termux on an Android device is a straightforward process. Here's a step-by-step guide to help you get started:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Download and Install Termux&lt;/strong&gt; &lt;br&gt;
&lt;strong&gt;from Play Store&lt;/strong&gt;&lt;br&gt;
→ Go to Google &lt;a href="https://play.google.com/store/apps/details?id=com.termux" rel="noopener noreferrer"&gt;Play Store&lt;/a&gt;&lt;br&gt;
→ And install the Termux app&lt;br&gt;
OR&lt;br&gt;
&lt;strong&gt;from F-Droid&lt;/strong&gt;:&lt;br&gt;
→ Go to &lt;a href="https://f-droid.org/en/packages/com.termux/" rel="noopener noreferrer"&gt;F-Droid App Store&lt;/a&gt;.&lt;br&gt;
→ Search for the Termux APK file and click Download&lt;br&gt;
→ Open the APK file and install it on your device&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Open Termux&lt;/strong&gt;:&lt;br&gt;
→ After the installation is complete, tap on the "Open" button to launch Termux.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Update and Upgrade Termux Packages&lt;/strong&gt;:&lt;br&gt;
→ Once Termux is open,  update and upgrade the packages to ensure you have the latest versions. &lt;br&gt;
Run this command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pkg update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;to update the package lists&lt;/em&gt; and Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pkg upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;to upgrade all the installed packages to their latest versions.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Grant Access to Storage&lt;/strong&gt;&lt;br&gt;
→ Finally, permit Termux to access files in your device's internal storage that includes directories like DCIM, Downloads, and Documents.&lt;br&gt;
→ Run this command to grant access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;termux-setup-storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Accept the pop-up notification on your device requesting file access from Termux.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Features 🛠️
&lt;/h2&gt;

&lt;p&gt;Termux comes with a range of powerful features that allow users to leverage a full-fledged Linux environment on their Android devices. Some of its key features include:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Terminal Emulator&lt;/strong&gt;: Termux provides a fully functional terminal emulator that enables users to run various Unix commands, execute shell scripts, and interact with the Linux command-line interface (CLI) directly on their Android devices. Commands such as &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, &lt;code&gt;touch&lt;/code&gt; are available in Termux.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Package Management&lt;/strong&gt;: Termux includes a package manager (pkg) that allows users to install, update, and remove software packages from a vast repository of Linux tools and utilities. This makes it easy to extend the functionality of Termux with various programming languages, text editors, development tools, networking utilities, and more.&lt;/p&gt;

&lt;p&gt;Install a package with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pkg install &amp;lt;package-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;where &lt;code&gt;&amp;lt;package-name&amp;gt;&lt;/code&gt; can be &lt;code&gt;ffmpeg&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, ...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Programming and Development Environment&lt;/strong&gt;: Termux provides a platform for developers to write, compile, and run code directly on their Android devices. Users can work on coding projects using languages like Python, Ruby, Node.js, and C/C++&lt;/p&gt;

&lt;p&gt;Run this command to install Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pkg install python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can install Python packages with pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install &amp;lt;package-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;where &lt;code&gt;&amp;lt;package-name&amp;gt;&lt;/code&gt; can be &lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;yt-dlp&lt;/code&gt;, &lt;code&gt;flask&lt;/code&gt;, ...&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. OpenSSH and OpenSSL&lt;/strong&gt;: Termux includes OpenSSH and OpenSSL, which provide secure encrypted communications and cryptographic functions, respectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. File Access&lt;/strong&gt;: Users can access and manipulate files on their devices, making it easy to work with all kinds of files from the terminal. In Termux, files on your device storage are located at &lt;code&gt;/data/data/com.termux/files/shared/storage/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Text Processing Tools&lt;/strong&gt;: Termux offers a variety of text processing tools like grep, sed, awk, and regular expressions, which are valuable for text manipulation and analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Scripting and Task Automation&lt;/strong&gt;: Users can create and run shell scripts on their Android devices, enabling automation of repetitive tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Customization&lt;/strong&gt;: Users can customize their Termux environment with themes, fonts, and various configurations to suit their preferences and workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Conclusion 📕
&lt;/h2&gt;

&lt;p&gt;Overall, Termux stands as a reliable and user-friendly solution, allowing individuals to embrace the power of a Linux environment on their Android devices, making it an invaluable tool for learning, productivity, and creativity, all in the palm of their hands.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;PS&lt;/strong&gt;:&lt;br&gt;
&lt;em&gt;- The F-droid Termux app can't install updates from Play Store.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;- Do not install suspicious packages and do not run random scripts from the internet on Termux.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;- For more Info visit &lt;a href="https://wiki.termux.com/wiki/Main_Page" rel="noopener noreferrer"&gt;Termux ℹ️ Wiki&lt;/a&gt;, for Discussions visit &lt;a href="https://www.reddit.com/r/termux/" rel="noopener noreferrer"&gt;Termux 💬 Reddit&lt;/a&gt;, and to Report Bugs visit &lt;a href="https://github.com/termux/termux-app" rel="noopener noreferrer"&gt;Termux 🐞 Github&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Good luck and have fun exploring&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>android</category>
      <category>opensource</category>
      <category>mobile</category>
    </item>
    <item>
      <title>AI Code Buddy</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Sat, 15 Jul 2023 17:01:42 +0000</pubDate>
      <link>https://dev.to/jjokah/ai-code-buddy-eoa</link>
      <guid>https://dev.to/jjokah/ai-code-buddy-eoa</guid>
      <description>&lt;p&gt;In the world of coding, having the right tools can greatly enhance productivity and code quality. Two popular AI coding assistants, Cody 🤖 and CodiumAI 🧪, are here to lend a helping hand (FOR FREE!)&lt;/p&gt;

&lt;h2&gt;
  
  
  CODY
&lt;/h2&gt;

&lt;p&gt;Cody is an AI coding assistant that can answer questions about your code, explain what the code is doing, and help you debug and improve your code. Cody can also translate between programming languages, navigate your codebase, and generate new code. Cody is available for free in the Cody app and IDE extensions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here are some of the specific features of Cody:
&lt;/h3&gt;

&lt;p&gt;🧠 Codebase-aware intelligence: Cody can answer questions about both general programming topics and your specific codebase.&lt;br&gt;
📚 Code explanation: Cody can explain what code is doing, both at a high level and in detail.&lt;br&gt;
👃 Code smells: Cody can identify code smells, potential bugs, and unhandled errors.&lt;br&gt;
📋 Summarize recent code changes: Cody can summarize the recent changes to your code.&lt;br&gt;
🔍 Debugging assistance: Cody can help you debug and improve your code.&lt;br&gt;
🐍 Translate language: Cody can translate between programming languages.&lt;br&gt;
🗺️ Code navigation: Cody can help you find functions &amp;amp; components from around your codebase.&lt;br&gt;
📌 Reference tracking: Cody knows where all your functions are referenced throughout your code.&lt;br&gt;
🤖 AI-generated code: Cody can generate new code on request.&lt;br&gt;
✅ Unit tests: Cody can write unit tests for you.&lt;br&gt;
💡 Code completions: Cody can suggest code while you code.&lt;br&gt;
✏️ Inline code fixes: Cody can edit and improve code directly using inline instructions.&lt;br&gt;
📖 Documentation generation: Cody can generate documentation for your code.&lt;/p&gt;

&lt;p&gt;Cody is a powerful tool that can help you improve your coding skills and productivity. If you are looking for an AI coding assistant, Cody is a great option.&lt;/p&gt;

&lt;p&gt;To get started with Cody, visit &lt;a href="https://about.sourcegraph.com/cody"&gt;https://about.sourcegraph.com/cody&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CODIUM AI
&lt;/h2&gt;

&lt;p&gt;CodiumAI is an AI-powered tool that helps developers write meaningful tests for their code. It is available as an extension for Visual Studio Code and JetBrains IDEs.&lt;/p&gt;

&lt;p&gt;CodiumAI works by analyzing your code and generating tests that cover a variety of edge cases. It can also suggest improvements to your code, such as making it more readable or efficient. &lt;/p&gt;

&lt;h3&gt;
  
  
  Here are some of the key features of CodiumAI:
&lt;/h3&gt;

&lt;p&gt;🧪 Generates meaningful tests that cover a variety of edge cases&lt;br&gt;
🛠️ Suggests improvements to your code&lt;br&gt;
📜 Works with a variety of programming languages, including Python, JavaScript, TypeScript, and Java&lt;br&gt;
💻 Is available as an extension for Visual Studio Code and JetBrains IDEs&lt;/p&gt;

&lt;h3&gt;
  
  
  Here are some of the benefits of using CodiumAI:
&lt;/h3&gt;

&lt;p&gt;🔧 Improves the quality of your code&lt;br&gt;
🐞 Reduces the risk of bugs&lt;br&gt;
⏰ Saves you time and effort&lt;br&gt;
🚀 Makes you more productive&lt;/p&gt;

&lt;p&gt;If you are a developer who wants to improve the quality of your code, then CodiumAI is a valuable tool that you should consider using.&lt;/p&gt;

&lt;p&gt;To get started with Codium, visit &lt;a href="https://www.codium.ai/"&gt;https://www.codium.ai/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>vscode</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>PASSWORD SAFETY 101: Hack-proof Your Digital World With These Invaluable Tips</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Sat, 17 Jun 2023 12:45:09 +0000</pubDate>
      <link>https://dev.to/jjokah/password-safety-101-43gf</link>
      <guid>https://dev.to/jjokah/password-safety-101-43gf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The longer the password, the stronger...&lt;/p&gt;

&lt;p&gt;but here's when long isn't strong &lt;br&gt;
&lt;code&gt;1qaz2wsx3edc4rfv5tgb6yhn7ujm8ik,9ol.0p;/&lt;/code&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;This password will take a hacker minutes to crack, despite it being 34 characters long. Take a look at your keyboard and you will know why.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;In today's interconnected world, where much of our personal and sensitive information resides in the digital realm, safeguarding our online accounts has become paramount. One of the most fundamental and essential aspects of digital security is password safety. By creating strong and secure passwords, we can fortify our virtual fortresses and protect ourselves from malicious actors. In this article, we will explore the importance of password safety and provide tips on how to enhance your online security.&lt;/p&gt;



&lt;h2&gt;
  
  
  Why Password Safety Matters
&lt;/h2&gt;

&lt;p&gt;Passwords serve as the first line of defense against unauthorized access to our personal information, financial accounts, and digital identities. Weak or compromised passwords can leave us vulnerable to identity theft, data breaches, and other cybercrimes. Therefore, it is crucial to understand the significance of password safety and adopt good practices to mitigate the risks.&lt;/p&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Strong Passwords
&lt;/h2&gt;

&lt;p&gt;A strong password is a critical component of your digital security strategy. Here are some guidelines to help you create robust passwords:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1a3t3Ug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45gzcwrxowhp5canlhnb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z1a3t3Ug--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45gzcwrxowhp5canlhnb.jpg" alt="password strength test chart" width="800" height="860"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Length&lt;/strong&gt;: Opt for passwords that are at least 12 characters long. The longer the password, the harder it is to crack through brute force or automated methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complexity&lt;/strong&gt;: Include a mix of uppercase and lowercase letters, numbers, and special characters in your password. Avoid using predictable sequences like "123456".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Uniqueness&lt;/strong&gt;: Use a unique password for each of your online accounts. Reusing passwords across multiple platforms increases the risk of a single breach compromising multiple accounts - "One goes down, the others follow".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid Personal Information&lt;/strong&gt;: Avoid incorporating personal details such as your name, birthdate, or address in your passwords. This information can be easily obtained or guessed by attackers. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid Commonly Used Password&lt;/strong&gt;: A hacker can easily gain access to your account by simply trying every word in a dictionary, or a list of common passwords, until they find a match. Don't use dictionary words (like &lt;code&gt;diamond&lt;/code&gt;) and common combinations (like &lt;code&gt;1q2w3e&lt;/code&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Passphrase Approach&lt;/strong&gt;: Consider using passphrases instead of passwords. These are longer combinations of words or phrases that are easier to remember but harder to crack. For example, "PurpleElephantInSunshine" is a strong passphrase.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Password Safety Measures
&lt;/h2&gt;

&lt;p&gt;Creating strong passwords is just the first step. Here are some additional measures to enhance your password safety:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Two-Factor Authentication (2FA)&lt;/strong&gt;: Enable 2FA whenever possible. This adds an extra layer of security by requiring a second verification step, such as a unique code sent to your mobile device, in addition to your password.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Password Managers&lt;/strong&gt;: Consider using a reputable password manager. These tools generate and store complex passwords for you, eliminating the need to remember them all. You can try &lt;a href="https://bitwarden.com/"&gt;Bitwarden&lt;/a&gt;, an open source password manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Beware of Phishing&lt;/strong&gt;: Be cautious of phishing attempts, where attackers try to trick you into revealing your passwords or other sensitive information. Avoid clicking on suspicious links in emails or sharing personal information on untrusted websites.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;



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

&lt;p&gt;As our lives become increasingly intertwined with the digital landscape, safeguarding our online presence is of utmost importance. Implementing strong and unique passwords, enabling two-factor authentication, and staying vigilant against phishing attempts are essential steps in securing yourself with passwords. Remember, your password is like a key to your digital life, and by prioritizing password safety, you can build a robust defense against cyber threats and enjoy peace of mind in the virtual world.&lt;/p&gt;

</description>
      <category>password</category>
      <category>security</category>
      <category>privacy</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Solving the "It Works on My Machine" Problem with Docker</title>
      <dc:creator>John Johnson Okah</dc:creator>
      <pubDate>Fri, 16 Jun 2023 02:07:19 +0000</pubDate>
      <link>https://dev.to/jjokah/docker-solving-the-it-works-on-my-machine-problem-33k7</link>
      <guid>https://dev.to/jjokah/docker-solving-the-it-works-on-my-machine-problem-33k7</guid>
      <description>&lt;p&gt;One of the most frustrating issues in software development is the "It works on my machine" problem. This occurs when a developer creates an application that runs perfectly on their local machine but fails to work properly when deployed to other environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docker.com"&gt;Docker&lt;/a&gt; has emerged as a solution to this problem. Docker allows developers to package an application and its dependencies into a container that can be run on any system that supports Docker. This ensures that the application runs consistently across different environments, eliminating the "&lt;em&gt;It works on my machine&lt;/em&gt;" problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MvPwxphe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/392m3govsca3l3gd3jo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MvPwxphe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/392m3govsca3l3gd3jo3.png" alt="Docker, we will ship your machine - meme" width="800" height="1081"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So if your image runs correctly on your development machine, it's highly likely it will also run correctly somewhere else. Docker essentially provides a "it works on my machine" environment that you can ship.&lt;/p&gt;

&lt;p&gt;With Docker, developers can easily create a container that includes all the necessary dependencies and configurations for their application. This container can then be shared with other developers or deployed to different environments without worrying about compatibility issues.&lt;/p&gt;

&lt;p&gt;In addition to solving the "It works on my machine" problem, Docker also offers other benefits such as improved scalability, easier deployment, and faster development cycles. By using Docker, developers can focus on building and improving their applications rather than worrying about the underlying infrastructure.&lt;/p&gt;

&lt;p&gt;In conclusion, Docker is a powerful tool that can help developers solve the "It works on my machine" problem and streamline their development processes. Its ease of use and compatibility with different environments make it an essential tool for modern software development.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Start shipping your machine with &lt;a href="https://docker.com"&gt;docker🚢&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
    </item>
  </channel>
</rss>
