<?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: Hassan El-seoudy</title>
    <description>The latest articles on DEV Community by Hassan El-seoudy (@hassanelseoudy).</description>
    <link>https://dev.to/hassanelseoudy</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%2F511624%2Fbb8ba2a8-308e-4acc-a16c-6b49e8b3720f.png</url>
      <title>DEV Community: Hassan El-seoudy</title>
      <link>https://dev.to/hassanelseoudy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hassanelseoudy"/>
    <language>en</language>
    <item>
      <title>Defensive Programming</title>
      <dc:creator>Hassan El-seoudy</dc:creator>
      <pubDate>Tue, 04 May 2021 16:25:51 +0000</pubDate>
      <link>https://dev.to/hassanelseoudy/defensive-programming-43c9</link>
      <guid>https://dev.to/hassanelseoudy/defensive-programming-43c9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Defensive programming&lt;/strong&gt; is the practice of anticipating problems that may arise in a software system and writing code to keep the system in a good state when such problems occur. A common way to apply defensive programming (also called defensive coding) is by &lt;strong&gt;verifying inputs to individual functions or methods&lt;/strong&gt;. The guard clause pattern is a common way to perform validation of inputs while also minimizing complexity in the function.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Defensive programming is when a programmer anticipates problems and writes code to deal with them.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Defensive programming's techniques&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check all data from external sources&lt;/strong&gt;: when obtaining data from files, networks, or external sources, check the value of the data obtained to ensure that it is within the date range. &lt;strong&gt;Example&lt;/strong&gt;: When we request user's age, It should be a positive number, and maybe not larger then 150?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check the parameters values for the methods&lt;/strong&gt;: &lt;strong&gt;Example&lt;/strong&gt;: Train Arrival time should be a Datetime type, not null or random integer numbers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decide how to deal with incorrect data&lt;/strong&gt;: discovering an incorrect parameter, how do you deal with it? Depending on the situation, you can choose the mode that suits you, either by asserting or maybe throwing exceptions?&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Real life scenarios?
&lt;/h3&gt;

&lt;p&gt;1- If you are developing an API as a software engineer, you should check for all the values provided through the REST verbs in the controller side.&lt;/p&gt;

&lt;p&gt;2- More coding examples:&lt;/p&gt;

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

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

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;The beauty of this defensive programming technique is that it costs almost no time to add exhaustive type checking to your code. Also it is a build up technique, It makes your application more solid against different types of invalid inputs.&lt;/p&gt;

</description>
      <category>defensiveprogramming</category>
      <category>software</category>
      <category>programming</category>
      <category>coding</category>
    </item>
    <item>
      <title>YAGNI &amp; KISS Principles</title>
      <dc:creator>Hassan El-seoudy</dc:creator>
      <pubDate>Mon, 03 May 2021 13:27:21 +0000</pubDate>
      <link>https://dev.to/hassanelseoudy/yagni-kiss-principles-gl2</link>
      <guid>https://dev.to/hassanelseoudy/yagni-kiss-principles-gl2</guid>
      <description>&lt;h2&gt;
  
  
  YAGNI
&lt;/h2&gt;

&lt;p&gt;YAGNI stands for &lt;strong&gt;You Ain’t Gonna Need It&lt;/strong&gt;. It’s a principle from software development methodology of Extreme Programming (XP). This principle says that you should not create features that it’s not really necessary.&lt;/p&gt;

&lt;p&gt;Ron Jeffries, one of the co-founders of the XP, once said:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Always implement things when you actually need them, never when you just foresee that you need them.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;It means that you should not implement functionality just because you think that you may need it someday, but implement it just when you really need it. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Benefits of YAGNI principle&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;1- Avoid spending time with implementations that were not even necessary, and maybe will never be used.&lt;/p&gt;

&lt;p&gt;2- With more unnecessary code you write, you may discard write unit tests for them! and then you will start having more issues regarding code quality tools.&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%2Fgo4gab84r59zjsg4lwna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgo4gab84r59zjsg4lwna.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  KISS Principle
&lt;/h2&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%2Fi5gs9d0j108aso07th9j.gif" 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%2Fi5gs9d0j108aso07th9j.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KISS&lt;/strong&gt; is an acronym for Keep It Simple, Stupid. This principle says about to make your code simple. You should avoid unnecessary complexity. A simple code it’s easier to maintain and easier to understand.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How to apply KISS principle in code?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You should eliminate duplicated code, remove unnecessary features, also don’t use unnecessary variables and methods, follow know standards of code development, also you should separate the responsibilities of your classes and the responsibilities from the layers of the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As you can see, The difference between them as you may expect from the header photo, it’s that YAGNI focus on removing unnecessary functionality and logic, and KISS focus on the complexity.&lt;/p&gt;

&lt;p&gt;References&lt;/p&gt;

&lt;p&gt;The Pragmatic Programmer — David Thomas and Andrew Hunt&lt;/p&gt;

&lt;p&gt;Software Architect’s Handbook — Joseph Ingeno&lt;/p&gt;

&lt;p&gt;Extreme Programming Installed — Ron Jeffries, Ann Anderson, Chet Hendrickson&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>programming</category>
      <category>software</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Code With Me (Plugin)</title>
      <dc:creator>Hassan El-seoudy</dc:creator>
      <pubDate>Thu, 12 Nov 2020 17:02:58 +0000</pubDate>
      <link>https://dev.to/hassanelseoudy/code-with-me-plugin-5a6a</link>
      <guid>https://dev.to/hassanelseoudy/code-with-me-plugin-5a6a</guid>
      <description>&lt;p&gt;For those who need to pair-programming or debugging some code with others!&lt;/p&gt;

&lt;p&gt;Code with me, A new plugin from &lt;strong&gt;JetBrains&lt;/strong&gt; You can use it for real time collaboration, editing code, sharing a server, and running a debugging session.&lt;/p&gt;

&lt;p&gt;For more info: &lt;a href="https://www.jetbrains.com/help/idea/code-with-me.html"&gt;https://www.jetbrains.com/help/idea/code-with-me.html&lt;/a&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>jetbrains</category>
      <category>pairprogramming</category>
      <category>plugins</category>
    </item>
    <item>
      <title>Who Am I?</title>
      <dc:creator>Hassan El-seoudy</dc:creator>
      <pubDate>Tue, 10 Nov 2020 12:50:38 +0000</pubDate>
      <link>https://dev.to/hassanelseoudy/who-am-i-mfc</link>
      <guid>https://dev.to/hassanelseoudy/who-am-i-mfc</guid>
      <description>&lt;p&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n9slUHbA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Zd5R33H/53fe04f9-8115-446a-8173-0831c55330ee-removebg-preview.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n9slUHbA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Zd5R33H/53fe04f9-8115-446a-8173-0831c55330ee-removebg-preview.png"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Hi, I'm Hassan ✨👋
&lt;/h3&gt;

&lt;p&gt;I'm a &lt;strong&gt;Software Engineer&lt;/strong&gt;, graduated from Alexandria University, &lt;strong&gt;Computer and Communication Engineering&lt;/strong&gt; department.&lt;br&gt;
I do coding for life as I enjoy it, not only during work, Adaptive with different technologies and Interested in exploring new tools.&lt;/p&gt;

&lt;p&gt;🌱 I’m currently working with &lt;a href="https://github.com/sia-world"&gt;Sia&lt;/a&gt; as a (Full-time) &lt;strong&gt;Back-End Engineer&lt;/strong&gt;, I'm involved to create services as Gamification, Posts and Education Materials using &lt;strong&gt;Micro-services&lt;/strong&gt; architecture.&lt;/p&gt;

&lt;p&gt;I can &lt;code&gt;code&lt;/code&gt; 💻 in:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Over 10000 lines&lt;/code&gt;: Java, C/C++ and Python&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Over 1000 lines&lt;/code&gt;: C#, SQL, MATLAB, HTML, CSS, Javascript, Dart, Kotlin&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Familiar&lt;/code&gt;: Assembly, Arduino&lt;/p&gt;

&lt;p&gt;I also can work with many &lt;code&gt;tools&lt;/code&gt; and &lt;code&gt;frameworks&lt;/code&gt; as: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring boot (Back End &lt;code&gt;Java&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Node.JS (Back End &lt;code&gt;JavaScript&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Angular , React.JS (Front End &lt;code&gt;JavaScript&lt;/code&gt;) &lt;/li&gt;
&lt;li&gt;AWS (&lt;code&gt;Cloud Services&lt;/code&gt;) &lt;/li&gt;
&lt;li&gt;Swagger (&lt;code&gt;Api&lt;/code&gt; Documentation)&lt;/li&gt;
&lt;li&gt;Mockito, Karma (&lt;code&gt;Testing&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;MongoDB &amp;amp; MySQL (&lt;code&gt;Databases&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Hadoop (&lt;code&gt;Big Data&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Git (&lt;code&gt;Version Control&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Jira (&lt;code&gt;Agile Methodology&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Flutter (&lt;code&gt;Cross Platform&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devjournal</category>
    </item>
    <item>
      <title>Hacktoberfest V2.0.2.Hassan</title>
      <dc:creator>Hassan El-seoudy</dc:creator>
      <pubDate>Tue, 10 Nov 2020 12:43:32 +0000</pubDate>
      <link>https://dev.to/hassanelseoudy/hacktoberfest-v2-0-2-hassan-3fh9</link>
      <guid>https://dev.to/hassanelseoudy/hacktoberfest-v2-0-2-hassan-3fh9</guid>
      <description>&lt;p&gt;Thanks to God, I completed my participation in #hacktoberfest2020 by DigitalOcean, where I successfully contributed in 4 open source projects! on different scales. (I have 3 more contributions in review process as well).&lt;/p&gt;

&lt;p&gt;In FasterXML, LLC, (Jackson-databind).&lt;br&gt;
My contribution was to Adding docs on using Builder pattern (&lt;a href="https://github.com/FasterXML/jackson-databind/pull/2889"&gt;https://github.com/FasterXML/jackson-databind/pull/2889&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;In yWorks (yGuard)&lt;br&gt;
My contribution was to fix +200 Warnings and Java-doc Errors, I solved the problem using power of regex. (&lt;a href="https://github.com/yWorks/yGuard/pull/92"&gt;https://github.com/yWorks/yGuard/pull/92&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;With &lt;a class="mentioned-user" href="https://dev.to/misterveiga"&gt;@misterveiga&lt;/a&gt;
 (cds Discord Bot) Enhancing API Messages using Environment Variables and generic roles.&lt;br&gt;
&lt;a href="https://github.com/misterveiga/cds/pull/29"&gt;https://github.com/misterveiga/cds/pull/29&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With 🇧🇬 Preslav Mihaylov (Clean Architecture notes)&lt;br&gt;
&lt;a href="https://github.com/preslavmihaylov/booknotes/pull/4"&gt;https://github.com/preslavmihaylov/booknotes/pull/4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also You can find my all contributions on my humble github account: &lt;a href="https://github.com/Hassan-Elseoudy"&gt;https://github.com/Hassan-Elseoudy&lt;/a&gt;&lt;/p&gt;

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