<?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: Abdullah Di'bas</title>
    <description>The latest articles on DEV Community by Abdullah Di'bas (@abdullahdibas).</description>
    <link>https://dev.to/abdullahdibas</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%2F278267%2F316434c4-31f0-43c5-aadf-2fe411ad1bba.jpg</url>
      <title>DEV Community: Abdullah Di'bas</title>
      <link>https://dev.to/abdullahdibas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullahdibas"/>
    <language>en</language>
    <item>
      <title>I built a Logs Analyzer 📜📊</title>
      <dc:creator>Abdullah Di'bas</dc:creator>
      <pubDate>Fri, 09 Apr 2021 14:06:38 +0000</pubDate>
      <link>https://dev.to/abdullahdibas/i-built-a-logs-analyzer-3ef5</link>
      <guid>https://dev.to/abdullahdibas/i-built-a-logs-analyzer-3ef5</guid>
      <description>&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AbdullahDibas" rel="noopener noreferrer"&gt;
        AbdullahDibas
      &lt;/a&gt; / &lt;a href="https://github.com/AbdullahDibas/LogsAnalyzer" rel="noopener noreferrer"&gt;
        LogsAnalyzer
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I've just completed building &lt;strong&gt;Logs Analyzer&lt;/strong&gt; library that provides functionalities to filter and analyze logs and in a way that doesn't affect the source application nor the original logs. The analyzer can be run either in the same application domain for simplicity or in a separate process so that it doesn't affect the original application from which the logs are being generated. &lt;br&gt;
The idea behind the library is to facilitate troubleshooting applications issues and to monitor users' behaviors in dealing with the application. It also gives the ability to report the analyzed logs in more readable ways.&lt;/p&gt;

&lt;p&gt;The library introduces the following three main functionalities:&lt;/p&gt;
&lt;h3&gt;
  
  
  Logs Filtering:
&lt;/h3&gt;

&lt;p&gt;When the logs are huge or crowded with traces from different processes or application's areas they become hard to read which makes it helpful in some cases to report only part of the logs that are related to a specific feature or service. The user of the library can specify what logs they need to include in an output by specifying values for the components of each log. &lt;br&gt;
The log's components that the filters can be applied on are:  message, level, tags, extra parameters.&lt;br&gt;
The following is part of the analyzer's configuration file that identifies two logs messages:&lt;br&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%2Fy5yqkbn1grsyy669m2w1.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%2Fy5yqkbn1grsyy669m2w1.PNG" alt="LogsMessagesConfig"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Logs Analyzing:
&lt;/h3&gt;

&lt;p&gt;The library also supports applying analysis methods on the incoming logs that match defined filters (using Logs Filtering). The following are some of the supported methods:&lt;br&gt;
      1. &lt;em&gt;Time Difference&lt;/em&gt;: this method expects to have two different logs as input, and the output will be the time difference between them whenever the second one is received.&lt;br&gt;
      2. &lt;em&gt;Logs Frequency&lt;/em&gt;: it calculates the frequency at which a defined log message is being received.&lt;br&gt;
      3. &lt;em&gt;Duplicate Log Detection&lt;/em&gt;: the analyzer will detect receiving a specific log message more than once.&lt;br&gt;
      4. &lt;em&gt;Log Absence Detection&lt;/em&gt;: triggers an output if a specific log is not received within a configured interval in seconds.&lt;br&gt;
      5. &lt;em&gt;Aggregate Function&lt;/em&gt;: triggers an output when a specific log is received along with an aggregated value calculated from a specific log parameter. The aggregate function used should be also specified in the configuration file.&lt;/p&gt;

&lt;p&gt;The following is part of the library's configuration file for the supported analysis methods:&lt;br&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%2Fm0lbyvxel32jpq4cn2pq.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%2Fm0lbyvxel32jpq4cn2pq.PNG" alt="LogsMessagesRulesConfig"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Logs Outputs:
&lt;/h3&gt;

&lt;p&gt;The library also supports multiple ways of reporting the output of both Logs filters and analytics. The following are the supported output methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CSV files&lt;/strong&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%2Ffd7gvwhetxyx1qyouooe.PNG" alt="CSV_Output"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;HTML files&lt;/strong&gt;: the library has a simple HTML template page for logs but it can be replaced.&lt;br&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%2Ftexjlw6pxcjumpug0tge.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%2Ftexjlw6pxcjumpug0tge.PNG" alt="HTML_Output"&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text files&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Emails&lt;/strong&gt; (this is still being validated).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Windows Popup messages&lt;/strong&gt;:&lt;br&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%2F5pmuzoc3celhpkpfc4bn.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%2F5pmuzoc3celhpkpfc4bn.PNG" alt="Capture"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  General Notes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The logs analyzer can be enabled\ disabled from the associated configuration file without the need to restart the original application.&lt;/li&gt;
&lt;li&gt;While the analyzer library can be hosted within the domain of the source application, it can be also hosted by a standalone application for better isolation. To achieve that purpose it supports receiving logs using &lt;a href="https://docs.microsoft.com/en-us/windows/win32/ipc/pipes" rel="noopener noreferrer"&gt;Named Pipes or Anonymous Pipes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Each analysis method can be associated with different output. &lt;/li&gt;
&lt;li&gt;Each analysis or filtering method can be configured to be run during a specific time.&lt;/li&gt;
&lt;li&gt;Emails and windows popups are used to quickly report a specific analysis output or issue, therefore they should be used when the expected results are not frequent or for exceptional cases.&lt;/li&gt;
&lt;li&gt;The analyzer also accepts having optional arguments with each log like tags and Key-Value parameters, and then they can be used in some of the supported analysis methods.&lt;/li&gt;
&lt;li&gt;While the analyzer can introduce useful reports and outputs, I don't recommend to fully depend on these reports as a complete substitution for building actual reports that depend on an official data source not the logs.
&lt;/li&gt;
&lt;li&gt;It's also worth to mention that the analyzer methods are useful depending on the scenario you are monitoring and so not all methods will introduce helpful results for every log.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;I've just published the library on github but I'm still continuously testing and validating it.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AbdullahDibas" rel="noopener noreferrer"&gt;
        AbdullahDibas
      &lt;/a&gt; / &lt;a href="https://github.com/AbdullahDibas/LogsAnalyzer" rel="noopener noreferrer"&gt;
        LogsAnalyzer
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>csharp</category>
      <category>opensource</category>
      <category>dotnet</category>
      <category>testing</category>
    </item>
    <item>
      <title>Should I write about a topic that's been already explained many times over the internet ?</title>
      <dc:creator>Abdullah Di'bas</dc:creator>
      <pubDate>Wed, 22 Apr 2020 11:55:50 +0000</pubDate>
      <link>https://dev.to/abdullahdibas/should-i-write-about-a-topic-that-s-been-already-explained-many-times-over-the-internet-2i6n</link>
      <guid>https://dev.to/abdullahdibas/should-i-write-about-a-topic-that-s-been-already-explained-many-times-over-the-internet-2i6n</guid>
      <description>&lt;p&gt;My answer is &lt;strong&gt;YES&lt;/strong&gt; for most of the times, especially if you are going to present it differently in a way that helps others understand it better. &lt;br&gt;
I believe that you can achieve this if you come with at least one of the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;If you have experienced a specific situation or a problem you solved that is related to that topic and you want to talk about it in a way that reinforces your explanation or discussion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you make or collect demonstration examples about that topic in a way that explains it differently and in a more clear way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you prepare drawings, graphs, GIFs, or any kind of presentation that will help in your explanation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you have a different explanation or point of view about that topic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you are going to make your writing on a specific internet platform or community that is accessible to a larger number of people. &lt;strong&gt;For instance&lt;/strong&gt;, one of the things that I like about &lt;strong&gt;Dev.to&lt;/strong&gt; community is that a post can pop up in your feed talking about a specific subject or highlighting on a specific idea or technique that may help you while you never knew it existed to even be able to find the words to search about on the internet &lt;em&gt;(the idea here is with the posts feed)&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, it's preferable that your writings will add value to others' or present something different, but, in my opinion, you can always write about any topic you want as long as your information is correct, and I don't find any harm with writing about something that's been already explained many times even if you are going to just write a few lines. If that didn't help anyone directly it might help you practice becoming a good writer in the future and you may then be able to help many others.&lt;/p&gt;

</description>
      <category>writing</category>
    </item>
    <item>
      <title>Another COVID-19 Tracker</title>
      <dc:creator>Abdullah Di'bas</dc:creator>
      <pubDate>Sat, 18 Apr 2020 13:32:12 +0000</pubDate>
      <link>https://dev.to/abdullahdibas/another-covid-19-tracker-3a5f</link>
      <guid>https://dev.to/abdullahdibas/another-covid-19-tracker-3a5f</guid>
      <description>&lt;p&gt;There are many web pages over internet to track COVID-19 growth and latest news with rich content and beautiful design, which inspires me to make another one but with simpler content to fill my free time and to get into some new stuff.&lt;br&gt;
Web Page: &lt;a href="https://covid19trackerpage.herokuapp.com/"&gt;https://covid19trackerpage.herokuapp.com/&lt;/a&gt;&lt;br&gt;
Source Code: &lt;a href="https://github.com/AbdullahDibas/Covid-19-Tracker"&gt;https://github.com/AbdullahDibas/Covid-19-Tracker&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Frameworks and Libraries Used:
&lt;/h2&gt;

&lt;p&gt;The page is built using &lt;strong&gt;Angular&lt;/strong&gt; framework which is an overkill for one view application but I wanted to have some learning experience with the framework.&lt;/p&gt;

&lt;p&gt;The library used for Charts: &lt;a href="https://apexcharts.com/"&gt;ApexCharts&lt;/a&gt;&lt;br&gt;
The library used for the world map: &lt;a href="https://jvectormap.com/"&gt;jVectorMap&lt;/a&gt;&lt;br&gt;
COVID-19 data and statistics: &lt;a href="https://covid-19-apis.postman.com/"&gt;Postman COVID-19 API Resource Center&lt;/a&gt;&lt;br&gt;
Hosting Platform: &lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>angular</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Examples on the violation of Liskov Substitution Principle (LSP)</title>
      <dc:creator>Abdullah Di'bas</dc:creator>
      <pubDate>Tue, 31 Mar 2020 17:40:56 +0000</pubDate>
      <link>https://dev.to/abdullahdibas/examples-on-the-violation-of-liskov-substitution-principle-lsp-43be</link>
      <guid>https://dev.to/abdullahdibas/examples-on-the-violation-of-liskov-substitution-principle-lsp-43be</guid>
      <description>&lt;p&gt;The following are some examples I've collected that demonstrate how Liskov Substitution Principle could be violated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NOTE: Before continue if you need more details about the definition of Liskov Substitution Principle refer to its Wikipedia page &lt;a href="https://en.wikipedia.org/wiki/Liskov_substitution_principle" rel="noopener noreferrer"&gt;Liskov substitution principle&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NOTE: The below examples don't cover all the possibilities of violating LSP.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Throwing a &lt;code&gt;NotImplementedException&lt;/code&gt; from a derived/implementation class is a sign that the parent-child relation is not following LSP. Here in the code snippet &lt;code&gt;IBird&lt;/code&gt; class cannot represent &lt;code&gt;Duck&lt;/code&gt; as it has no definition for flying.&lt;br&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%2Fi%2F1mlt8o58d6zx8ugw1neo.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%2Fi%2F1mlt8o58d6zx8ugw1neo.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hiding a &lt;code&gt;virtual&lt;/code&gt; parent method in a child class using the &lt;code&gt;new&lt;/code&gt; keyword also violates LSP. In the code below when the declaration type is changed from the base class &lt;code&gt;EmployeeAnnualBonus&lt;/code&gt; to the derived class &lt;code&gt;ManagerAnnualBonus&lt;/code&gt; the value of the annual bonus is changed, which means that they cannot be substitutable without altering the expected result.&lt;br&gt;
(Here &lt;code&gt;override&lt;/code&gt; keyword should be used instead.)&lt;br&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%2Fi%2Ffe1h9jmj66o3ov5y81a4.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%2Fi%2Ffe1h9jmj66o3ov5y81a4.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Returning a value of a type that has restrictions that are unknown from the method's signature. Such as returning a value of type &lt;code&gt;ReadOnlyCollection&lt;/code&gt; from a derived class' method while the return type in its signature is &lt;code&gt;ICollection&lt;/code&gt;. The code below demonstrates how this approach is making unexpected behavior for the code consumer.&lt;br&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%2Fi%2Fuajvq1lw8qdjphslx2v1.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%2Fi%2Fuajvq1lw8qdjphslx2v1.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding an implementation for a derived method in a way that violates the system code's policy or conventions (if there is any); like when a derived method returns a &lt;code&gt;null&lt;/code&gt; value for a list when there is a convention not to return &lt;code&gt;null&lt;/code&gt; for empty collections but instead to return initialized collections with zero items count.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;It's recommended to keep code components (classes or projects) separated and to depend on abstractions instead of concrete implementations, and that makes applying Liskov Substitution principle more important. The implementation of the derived classes may not be known for the code consumer or at design time and implementing a method that returns a value or accepts parameters in a way that is unclear from its interface (or base class) will mislead who calls that code which  in turns may break the code execution or result in unexpected behaviors at run time.&lt;/p&gt;

</description>
      <category>firstpost</category>
      <category>oop</category>
      <category>architecture</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
