<?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: Ejikeme Blaise</title>
    <description>The latest articles on DEV Community by Ejikeme Blaise (@blaise93).</description>
    <link>https://dev.to/blaise93</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%2F1084025%2F1c5d60e0-5b8c-448f-aea0-da2fdaa72738.jpeg</url>
      <title>DEV Community: Ejikeme Blaise</title>
      <link>https://dev.to/blaise93</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blaise93"/>
    <language>en</language>
    <item>
      <title>*The Power of Linux Commands in Development: Don't Miss Out*</title>
      <dc:creator>Ejikeme Blaise</dc:creator>
      <pubDate>Fri, 25 Apr 2025 16:18:24 +0000</pubDate>
      <link>https://dev.to/blaise93/the-power-of-linux-commands-in-development-dont-miss-out-1maf</link>
      <guid>https://dev.to/blaise93/the-power-of-linux-commands-in-development-dont-miss-out-1maf</guid>
      <description>&lt;p&gt;As developers, we have all been there - a single line of code can make or break our entire project. Double-checking our work is crucial, especially in production environments where strictness is the norm and penalties come with every mistake. This is where Linux commands come in - a lifesaver for developers working on complex projects.&lt;/p&gt;

&lt;p&gt;Using Ubuntu Linux commands has made my life much easier when collaborating with my team, especially in production. Commands like &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;nano&lt;/code&gt;, and &lt;code&gt;vim&lt;/code&gt; have saved me from a lot of stress and debugging headaches. Here are a couple of examples that illustrate the power of Linux commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With &lt;code&gt;grep&lt;/code&gt;, for example, I can quickly search for a specific line of code in a file, such as &lt;code&gt;sudo grep auth_file /etc/pgbouncer/pgbouncer.ini&lt;/code&gt;. This command returns the exact line of code I'm looking for, helping me identify whether what I am working on exists or not, and if I have made a mistake.&lt;/li&gt;
&lt;li&gt;Another useful example is searching for a particular variable across an entire project. I can easily do this with &lt;code&gt;sudo grep -r 'DEFAULT_FROM_EMAIL' /your/file/path&lt;/code&gt;. This command recursively searches for the variable &lt;code&gt;DEFAULT_FROM_EMAIL&lt;/code&gt; in the specified directory and returns a bunch of information regarding the variable, including whether it exists or not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's surprising how some code works perfectly in development environments but fails in production. The reason is simple: production environments are strict, and every mistake has consequences. As developers, we must be meticulous and get everything right before deploying our products.&lt;/p&gt;

&lt;p&gt;If you haven't already, I encourage you to start using Linux commands today. It may seem stressful at first, but the benefits are overwhelming in the long run. Mastering Linux commands will not only improve your productivity but also help you catch bugs and errors early on. So, take the leap and start exploring Linux commands, and there are a bunch of tutorials out there, including YouTube, that can catapult you into mastering Linux commands. If you're using Windows, you have a way of leveraging Linux too via downloading WSL/Ubuntu and installing it on your system. You can check it out on the official Microsoft website. Your future self and your team will thank you. :-)&lt;/p&gt;

&lt;p&gt;I would suggest that you join the community of developers who have already discovered the power of Linux. For example, the Stack Overflow Linux community. Share your favorite commands and tips here; we'd love to learn from you too. If you like my article, don't forget to hit the like button, share it, and follow me to see some of my works or educative articles.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Does Project Documentation Really Matters?</title>
      <dc:creator>Ejikeme Blaise</dc:creator>
      <pubDate>Wed, 01 May 2024 08:26:47 +0000</pubDate>
      <link>https://dev.to/blaise93/does-project-documentation-really-matters-5gep</link>
      <guid>https://dev.to/blaise93/does-project-documentation-really-matters-5gep</guid>
      <description>&lt;p&gt;Creating software to solve problems is indeed a beautiful thing, and it involves patience and determination. &lt;/p&gt;

&lt;p&gt;However, documenting the project, and writing unit tests as well as penetration tests to assert the workflow of the said project are stressful/difficult paths. Without those paths, you are an island to your project especially the &lt;em&gt;docs&lt;/em&gt; because no one can easily be attracted to your work.&lt;/p&gt;

&lt;p&gt;Documentation plays a pivotal role in ensuring that your project thrives and remains accessible to others. Do not underestimate the documentation of your project, and always update it if there are code changes, the same rule also applies to writing test cases.&lt;/p&gt;

&lt;p&gt;We have different documentation language tools you can learn, and one good thing is that they are easy to master if you take an interest in mastering any of them. Examples are &lt;strong&gt;Markdown (md), reStructuredText (rst)&lt;/strong&gt;, etc. For me, I used either of the two. However, if I am writing complex documentation of a project, then Sphinx which uses &lt;code&gt;rst&lt;/code&gt; is my best shot. Try and pick one and learn if you haven't. Most recruiters and employees do add documentation to their job description as a skill you should possess before they can hire you. So, why don't you start today?&lt;/p&gt;

&lt;p&gt;As software engineers, we don't just design, create infrastructure, and write a bunch of codes, we should also cultivate the habit of writing. It matters a lot because through writing you can express the man's innermost heart.&lt;/p&gt;

&lt;p&gt;Please free to ask me questions regarding the documentation of your project. &lt;/p&gt;

&lt;p&gt;You can get me on any of these links:&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/ejikeme-blaise-2504111b1/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/Blaise-93"&gt;GitHub&lt;/a&gt;, &lt;a href="https://twitter.com/Blaisemat6"&gt;Twitter&lt;/a&gt; or &lt;a href="https://stackoverflow.com/users/17365694/blaisemart"&gt;Stackoverflow&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Software #Engineering #softwareengineers #python #pythonsoftwareengineers #fullstack #frontend #Django
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>The Power of Data Cleaning: A Dev's Guide</title>
      <dc:creator>Ejikeme Blaise</dc:creator>
      <pubDate>Sat, 06 Apr 2024 15:09:39 +0000</pubDate>
      <link>https://dev.to/blaise93/the-power-of-data-cleaning-a-devs-guide-2hfc</link>
      <guid>https://dev.to/blaise93/the-power-of-data-cleaning-a-devs-guide-2hfc</guid>
      <description>&lt;p&gt;Ever struggled with messy WhatsApp data? What if I told you there’s a one-click solution?&lt;/p&gt;

&lt;p&gt;Have you ever grappled with unruly WhatsApp data? Imagine a one-click solution that transforms chaos into clarity. Data Cleaning is a fundamental concept in data processing that cannot be overemphasized. Whether you’re a data analyst, data scientist, or Python software engineer, I’ve got something for you — a Python package, devoid of dependency, designed to effortlessly cleanse your imported WhatsApp data. With a single execution of your code, you can achieve data-purging nirvana.&lt;/p&gt;

&lt;p&gt;What Does It Look Like?&lt;/p&gt;

&lt;p&gt;Behold your chat corpus, neatly formatted in your terminal. But wait, there’s more! If any unwanted data lingers, fear not. Simply copy the offending words or phrases and configure them in your settings.py file. Voilà! Your data emerges pristine and ready for analysis.&lt;/p&gt;

&lt;p&gt;🚀 Project GitHub Repo: &lt;a href="https://lnkd.in/dNeA3-ER"&gt;Chat Cleaner&lt;/a&gt; and fork my work on &lt;a href="https://lnkd.in/dGYM3fcS"&gt;Chat-Cleaner Repo Fork&lt;/a&gt; and contribute if you want.&lt;br&gt;
It has a well-documented Readme file too.&lt;/p&gt;

&lt;p&gt;Ready to revolutionize your data cleaning process? Dive into my article on LinkedIn and discover how to comprehensively analyze generated conversation chats:&lt;/p&gt;

&lt;p&gt;📖 Read the Article: How to Analyze Comprehensively Generated Conversation Chats — &lt;a href="https://lnkd.in/dJVZAE45"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember, quality data fuels insightful decisions. Let’s clean up and level up ASAP! 🌟&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A Deep Dive into Django Foreign Keys</title>
      <dc:creator>Ejikeme Blaise</dc:creator>
      <pubDate>Wed, 08 Nov 2023 10:31:20 +0000</pubDate>
      <link>https://dev.to/blaise93/a-deep-dive-into-django-foreign-keys-19kc</link>
      <guid>https://dev.to/blaise93/a-deep-dive-into-django-foreign-keys-19kc</guid>
      <description>&lt;p&gt;The effect of Foreign keys cannot be overemphasized. In Django-ORM, use the Foreign keys if you want to map Many to One relationship, for example, an agent to handle many projects in a table. Foreign keys are also used as referenced keys with an integer used to map a specific task a user performs in the database.&lt;/p&gt;

&lt;p&gt;Foreign keys are not the same as &lt;code&gt;OneToOne&lt;/code&gt; field or &lt;code&gt;ManyToMany&lt;/code&gt; field, querying them or mapping them in ORM is not entirely the same, though they share some similarities. NB: You must create and save an object instance first, say Project table (model) before you can assign a foreign key to it, if not a &lt;code&gt;ValueError&lt;/code&gt; will be returned.&lt;/p&gt;

&lt;p&gt;Attributes of Foreign keys mapping&lt;/p&gt;

&lt;p&gt;ON_DELETE: In Django-ORM, the &lt;code&gt;on_delete&lt;/code&gt; option determines how the deletion of referenced data will be handled by the database to maintain data integrity.&lt;/p&gt;

&lt;p&gt;1) To delete projects in a table assigned to an agent, you need to set &lt;code&gt;on_delete=models.CASCADE&lt;/code&gt; as part of foreign key constraints schema. This attribute makes sure that when the agent is deleted all the projects assigned to them in that table is deleted as well.&lt;/p&gt;

&lt;p&gt;2) To delete an agent without deleting an assigned projects to him/her, you need to set &lt;code&gt;on_delete=models.SET_NULL, null=True&lt;/code&gt;. Null must be set to &lt;code&gt;True&lt;/code&gt; as part of its constraints, if not it won't work. For example: in our case your model == agent&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="nc"&gt;Project&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&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;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ForeignKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YourModel&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on_delete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SET_NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) To put restriction on projects to delete while deleting the agent in the database, you need to set &lt;code&gt;on_delete=models.RESTRICT&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;4) To protect projects from being deleted while deleting the agent instance assigned to the project without any dependency which is used in some rare cases, you need to set &lt;code&gt;on_delete=models.PROTECT&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;So, PROTECT never deletes and raises error. But RESTRICT (introduced from Django 3.1) deletes in some cases, but not all.&lt;/p&gt;

&lt;p&gt;I know you might be wondering, hey, what is the difference between PROTECT and SET_NULL right now? Are they not the same, the answer is no. Think of it this way as stated below.&lt;/p&gt;

&lt;p&gt;SET_NULL lets the parent be deleted but keeps the child.&lt;/p&gt;

&lt;p&gt;PROTECT never lets the deletion of a parent to the deletion of the child.&lt;/p&gt;

&lt;p&gt;Conclusion:&lt;br&gt;
Using different types of on_delete is really related to your design and your constraints on deleting your objects.&lt;/p&gt;

&lt;p&gt;Thank you for reading my article! I hope you now understand their differences and when to use them in your schema design.&lt;/p&gt;

&lt;p&gt;For more information:&lt;br&gt;
&lt;a href="https://lnkd.in/dqmKJpm3"&gt;https://lnkd.in/dqmKJpm3&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  python #django #django_restframework, #database #ORM #SCHEMA ,#python_developers #developerscommunity
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>django</category>
      <category>sql</category>
    </item>
    <item>
      <title>Error Handling in Django/Python</title>
      <dc:creator>Ejikeme Blaise</dc:creator>
      <pubDate>Thu, 18 May 2023 02:24:00 +0000</pubDate>
      <link>https://dev.to/blaise93/error-handling-in-djangopython-4p09</link>
      <guid>https://dev.to/blaise93/error-handling-in-djangopython-4p09</guid>
      <description>&lt;p&gt;Hi Python/Django Developers, which two most popular exceptions.py do you use in your code?&lt;/p&gt;

&lt;p&gt;Me:&lt;code&gt;ObjectDoesNotExist&lt;/code&gt;and &lt;code&gt;IntegrityError&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;The former helps me bypass object instances that don’t exist in the database which clients may have sent requests for while the latter helps me manage multiple entries errors admin/clients may have added in database column/row.&lt;/p&gt;

&lt;p&gt;Kindly state yours and why you use it. Let’s go! :D&lt;/p&gt;

&lt;h1&gt;
  
  
  python #sql #django #RestAPi
&lt;/h1&gt;

</description>
    </item>
  </channel>
</rss>
