<?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: Hasan Elsherbiny</title>
    <description>The latest articles on DEV Community by Hasan Elsherbiny (@hasanelsherbiny).</description>
    <link>https://dev.to/hasanelsherbiny</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%2F651835%2F7fe48060-44f5-4fbe-ad87-4c57a9326ccc.jpg</url>
      <title>DEV Community: Hasan Elsherbiny</title>
      <link>https://dev.to/hasanelsherbiny</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hasanelsherbiny"/>
    <language>en</language>
    <item>
      <title>ADO OR Entity framework?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 01 Mar 2024 21:53:01 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/ado-or-entity-framework-3gn</link>
      <guid>https://dev.to/hasanelsherbiny/ado-or-entity-framework-3gn</guid>
      <description>&lt;p&gt;a lot of people are arguing about is it better to use ADO or Entity framework?&lt;/p&gt;

&lt;p&gt;for me ,i preferer using Entity framework?&lt;br&gt;
because of these reasons &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Productivity&lt;br&gt;
EF abstracts away much of the boilerplate code involved in data access, allowing developers to work with higher-level concepts like entities, relationships, and LINQ queries. This can lead to increased developer productivity and faster development cycles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ORM Features&lt;br&gt;
EF is an Object-Relational Mapping (ORM) framework, which means it maps database tables to .NET objects and provides features like change tracking, lazy loading, and automatic schema generation. This abstraction simplifies data access and makes it easier to work with database entities in object-oriented code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LINQ Support (this is my favorite part)&lt;br&gt;
EF integrates seamlessly with Language Integrated Query (LINQ), allowing me to write type-safe queries directly in C# or VB.NET code&lt;br&gt;
This improves code readability and maintainability compared to writing raw SQL queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code-First Approach&lt;br&gt;
a code-first approach to database development, where i can define the database schema using C# or VB.NET classes and conventions This can streamline database development and eliminate the need for manual database creation and maintenance also it adds database schema history tracking and developer sharing changes on git.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;but why some people preferer ADO?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Control and Flexibility&lt;br&gt;
ADO.NET offers more fine-grained control over database interactions compared to EF. Developers can write raw SQL queries, use stored procedures, and directly manipulate data readers for optimized performance and flexibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance&lt;br&gt;
Since ADO.NET allows developers to write optimized SQL queries, it can often lead to better performance, especially for complex database operations or when dealing with large datasets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Legacy Systems&lt;br&gt;
ADO.NET has been around longer than EF and is deeply integrated with the .NET Framework. For legacy systems or projects where backward compatibility is crucial, ADO.NET may be a preferred choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Low-level Access&lt;br&gt;
ADO.NET provides low-level access to database connections, transactions, and command objects making it suitable for scenarios requiring fine-tuned control over database interactions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>database</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>CI/CD</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 23 Feb 2024 17:27:21 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/cicd-45ej</link>
      <guid>https://dev.to/hasanelsherbiny/cicd-45ej</guid>
      <description>&lt;p&gt;as a developer or a person in IT field in general you probably have heard the term CI/CD many times but&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CI/CD?
&lt;/h2&gt;

&lt;p&gt;The Term CI Stand For Continuous integration and CD stands for continuous delivery/continuous deployment.&lt;/p&gt;

&lt;p&gt;Continuous Integration (CI) is the practice of frequntly integrating code changes into a shared repository, where automated tests are run to validate the changes it ensures that each code commit is tested and integrated into the main codebase, thereby detecting and fixing integration errors early in the development cycle which means the outcome of CI process should be a ready to deploy package which is also known as "Assets".&lt;/p&gt;

&lt;p&gt;Continuous Deployment (CD): on the other hand extends the CI process by automatically deploying the package produced from the previous step (CI) to production or staging environments after they pass all tests, it enables teams to release software updates quickly and efficiently, leading to shorter release cycles and faster time-to-market. &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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A963%2F1%2A1mYyliE8xO9v1xoAqmfHtA.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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A963%2F1%2A1mYyliE8xO9v1xoAqmfHtA.gif" alt="CICD"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of CI/CD
&lt;/h2&gt;

&lt;p&gt;-Faster Time-to-Market: CI/CD automates repetitive tasks, reducing manual effort and accelerating the software delivery process&lt;br&gt;
-Improved Code Quality: automated testing catches bugs and regressions early, ensuring that only high-quality code is deployed&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increased Collaboration: CI/CD encourages collaboration among team members by providing a shared codebase and transparent feedback on code changes&lt;/li&gt;
&lt;li&gt;Enhanced Stability: Continuous testing and deployment pipelines help identify and resolve issues before they reach production, leading to more stable applications&lt;/li&gt;
&lt;li&gt;Better Visibility: CI/CD pipelines provide visibility into the status of code changes, test results, and deployment processes, enabling teams to track progress and identify bottlenecks&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>newbie</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>What Is Middleware?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Thu, 15 Feb 2024 22:57:12 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/what-is-middleware-26mk</link>
      <guid>https://dev.to/hasanelsherbiny/what-is-middleware-26mk</guid>
      <description>&lt;p&gt;The Middleware as a definition can be considered like a broker which exist between two things to facilitate communication and data processing.&lt;/p&gt;

&lt;p&gt;The Web Architecture is Mainly Based On Request Response Model, which mean the communication is happening in the shape of request and response, but what if i want to execute something between the request and response?&lt;/p&gt;

&lt;p&gt;here comes the Middleware, Middleware is a piece of code that is being executed during/before or after the request execution.&lt;/p&gt;

&lt;p&gt;it also can be registered to be fired for every request, so we don't need to handle every single request separately&lt;/p&gt;

&lt;p&gt;Middleware can be used in both frontend and backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Middleware In Frontend
&lt;/h2&gt;

&lt;p&gt;mostly it's called interceptors as it intercepts outgoing requests to append some useful headers such as auth headers and selected language.&lt;br&gt;
it can also be registered to execute action in case of some types of responses like logging failed requests&lt;/p&gt;

&lt;h2&gt;
  
  
  Middleware In Backend
&lt;/h2&gt;

&lt;p&gt;in most cases we need to authorize some requests and as frontend is sending auth headers with requests we need to capture these headers and check if they are valid or we need to deny the request&lt;br&gt;
we don't need to handle this cases for each request (remember DRY Concept), so we can make a good use of Middleware.&lt;br&gt;
in backend ,Middleware is also known as requests filters.&lt;/p&gt;

&lt;p&gt;we can have as many as middlewares as we need in our application, but make sure they are necessary, they don't overlap with each other and they don't affect the app performance&lt;br&gt;
in conclusion&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do we need to use Middleware ?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Request Processing&lt;/li&gt;
&lt;li&gt;Response Processing&lt;/li&gt;
&lt;li&gt;Cross-Cutting Concerns&lt;/li&gt;
&lt;li&gt;Flexibility and Extensibility&lt;/li&gt;
&lt;li&gt;Separation of Concerns&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Most Common Uses of Middleware
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Authentication and Authorization&lt;/li&gt;
&lt;li&gt;Error Handling&lt;/li&gt;
&lt;li&gt;Logging and Monitoring&lt;/li&gt;
&lt;li&gt;Request Parsing and Validation&lt;/li&gt;
&lt;li&gt;Compression and Caching&lt;/li&gt;
&lt;li&gt;Routing and URL Rewriting&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Docker With ASP.net</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 09 Feb 2024 21:36:54 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/docker-with-aspnet-4c0i</link>
      <guid>https://dev.to/hasanelsherbiny/docker-with-aspnet-4c0i</guid>
      <description>&lt;p&gt;in this article we are going step by step to create docker image from asp.net project&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker Installed&lt;/li&gt;
&lt;li&gt;ASP.NET Core SDK&lt;/li&gt;
&lt;li&gt;Visual Studio (or VS Code)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Create an ASP.NET Core Project
&lt;/h2&gt;

&lt;p&gt;create a new ASP.NET Core project (If you haven't already)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet new mvc -n MyProject
cd MyProject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Dockerize the ASP.NET Core Application
&lt;/h2&gt;

&lt;p&gt;To containerize the ASP.NET Core application, you need to create a Dockerfile in the project directory. &lt;br&gt;
The Docker file contains instructions for building the Docker image.&lt;br&gt;
Create a new file named 'Dockerfile' in the root directory of your ASP.NET Core project and add the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Use the official ASP.NET Core runtime image as a base
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80

# Copy the published output of the ASP.NET Core application into the container
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["MyProject.csproj", "."]
RUN dotnet restore "./MyProject.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "MyProject.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "MyProject.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MyProject.dll"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Dockerfile defines a multi-stage build process:&lt;/p&gt;

&lt;p&gt;-The first stage (base) sets up the base image, exposes port 80, and sets the working directory.&lt;br&gt;
-The second stage (build) restores dependencies, builds the application, and publishes it.&lt;br&gt;
-The third stage (publish) copies the published output into a separate stage.&lt;br&gt;
-The final stage (final) sets up the runtime environment and specifies the entry point for the application.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Build the Docker Image
&lt;/h2&gt;

&lt;p&gt;Once you have created the Dockerfile, you can build the Docker image using the docker build command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t myproject .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command builds a Docker image tagged as myproject using the Dockerfile in the current directory (.).&lt;/p&gt;

&lt;p&gt;now our image is ready to be hosted on docker host and downloaded to any server to be deployed and install it's dependences&lt;br&gt;
but we will test it on our local host first.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Run the Docker Container
&lt;/h2&gt;

&lt;p&gt;After successfully building the Docker image, you can run a Docker container using command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -d -p 8080:80 --name myproject-container myproject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command starts a Docker container named myproject-container based on the myproject image, mapping port 8080 on the host to port 80 inside the container (-p 8080:80). &lt;/p&gt;

&lt;p&gt;The -d flag runs the container in detached mode, allowing it to run in the background.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Access the ASP.NET Core Application
&lt;/h2&gt;

&lt;p&gt;Once the Docker container is running, you can access the ASP.NET Core application by navigating to &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; in your web browser. If you're running Docker on a remote server, replace localhost with the server's IP address.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>docker</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>The Curse of Motivation</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 02 Feb 2024 20:15:22 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/the-curse-of-motivation-ked</link>
      <guid>https://dev.to/hasanelsherbiny/the-curse-of-motivation-ked</guid>
      <description>&lt;p&gt;in today's world you can find tons of motivational speaking podcasts, events or even articles all taking about "Motivation" ,"Self Improvement" ,"Hard Working" and all of these bullshit..&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;So why is it bullshit?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
whenever you try to look deep inside this thing you will find core things they rely on "The Idol (Icon)" ,"Steps" and the "Results"&lt;/p&gt;

&lt;p&gt;1.The Idol or the Icon is selected to be someone have "Succeeded" in something but need to wrap this into a very long tale to be inspiring and interesting for the listener .&lt;br&gt;
but what is the problem here?&lt;br&gt;
the problem is that making icon of someone, showing him/here as a hero for doing something (which can even be a very simple or ordinary thing but the tale is catchy) is stupid this because it urges you to do the same thing without asking "Would i fit here?" but it's not important "YOU MUST BE SUCCESS LIKE THIS IDOL"&lt;br&gt;
or without asking is the tale is real? why wouldn't be a fraud.&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%2Fwloddeozsn6c8tnmk3v5.gif" 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%2Fwloddeozsn6c8tnmk3v5.gif" alt="The Curse of Motivation" width="200" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Steps , giving you fixed steps to follow as it's the manifest for success is quite tricky thing as you must wonder "If it's that simple " why aren't we all successful? yes because obliviously we are not following this exact steps.&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%2F9b8xuan6llhum92kzynv.png" 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%2F9b8xuan6llhum92kzynv.png" alt="Image description" width="800" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.Goals : the most important point set a fake goals you ALL MUST have ,without wondering are these goals are realistic or even fits me?&lt;/p&gt;

&lt;p&gt;besides all what i have mentioned earlier the worst thing about motivation is "High Expectations" &lt;/p&gt;

&lt;p&gt;after reading or listening to motivational speaking it's like you had a shot of ecstasy ,you feel like you are going to be the next Einstein and start to a very high goals, you start with high expectations  then you get tired and QUIT.&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%2Fwa8qmajoq61erwdzsho8.gif" 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%2Fwa8qmajoq61erwdzsho8.gif" alt="Image description" width="498" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for me i didn't care about this subject before, but now i do since it started to leak into it domain.&lt;/p&gt;

&lt;p&gt;Since 2020, tons of youtubers started to talk about the it field as they discovered it's possible to work from home and all other benefits. &lt;/p&gt;

&lt;p&gt;They Started to motivate everybody to become a programmer "even the term is no longer used but they use it anyway", and it's very often you can run into one of your friends who have believed this nonsense and invested a lot of time and money on this path.&lt;br&gt;
but end up with nothing.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>What is overengineering</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 26 Jan 2024 20:10:15 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/what-is-overengineering-6jm</link>
      <guid>https://dev.to/hasanelsherbiny/what-is-overengineering-6jm</guid>
      <description>&lt;p&gt;how many times you have started a side project to address a simple idea, but after few days a lot of things have come to your mind and you wanted to make it perfect, and whenever you think about a small enhancement or a feature you think about why don't we make it more better or increase the scale to include more things.&lt;br&gt;
this is called overengineering, it's not only limited to side projects or ideas that comes to your mind but also it can extend to your daily tasks.&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%2Fj63nyockyr6356bk2ywh.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%2Fj63nyockyr6356bk2ywh.jpg" alt="overengineering" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for example if you want to create a simple login service which has a clear requirements, you start asking why don't we add MFA for example , or external login provider or even integrate with SSO server.&lt;/p&gt;

&lt;p&gt;sometimes this thoughts are good as it widen your vision and can reveal some hidden or forgotten requirements but it's also can be very overwhelming, as this adds complexity to your task, cost, bugs, scalability issues or Unnecessary features.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to avoid overengineering ?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;KISS Principle (Keep It Simple)
don't try to add more things to your solution before making sure that it's really requirements.&lt;/li&gt;
&lt;li&gt;Clear Requirements
to be able to apply KISS principle properly you need to have Clear Requirements&lt;/li&gt;
&lt;li&gt;Refactoring
regularly review and refactor code to eliminate unnecessary complexity as refactoring helps maintain a clean and maintainable codebase without compromising functionality.&lt;/li&gt;
&lt;li&gt;Avoid Premature Optimization
avoid optimizing code or introducing advanced features prematurely. Optimize only when performance issues are identified through profiling or when necessary for scalability.&lt;/li&gt;
&lt;li&gt;Pragmatic Design Patterns
choose patterns that align with the project's needs, as design patterns can be beneficial, applying them excessively or inappropriately can lead to overengineering.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>discuss</category>
      <category>beginners</category>
      <category>programming</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Why to Use Css Animation?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Thu, 18 Jan 2024 19:48:43 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/why-to-use-css-animation-34e7</link>
      <guid>https://dev.to/hasanelsherbiny/why-to-use-css-animation-34e7</guid>
      <description>&lt;p&gt;early in this century ,web became a very popular thing and we were in a need to add more interactivity within our web pages.&lt;/p&gt;

&lt;p&gt;adobe flash player was the #1 developer choice as it was offering a lot of features and making pages more alive, but with the advance of the web technology flash player have become absolute and other tech (html5,css3,javascript) started to be a good placement for it.&lt;/p&gt;

&lt;p&gt;in this article will focus of animation, as mentioned earlier flash player was a good choice that gave you the ability to add animation to your page, but there were some cons of flash player like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security Concerns&lt;/li&gt;
&lt;li&gt;Resource Intensive&lt;/li&gt;
&lt;li&gt;Browser Compatibility&lt;/li&gt;
&lt;li&gt;Dependency on Plugins&lt;/li&gt;
&lt;li&gt;Lack of SEO Friendliness
and other more reasons.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;for all of these reasons, css3 introduced animation features with a lot of pros like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simplicity and Ease of Use&lt;/li&gt;
&lt;li&gt;Browser Compatibility(it's being native supported by most of modern browsers)&lt;/li&gt;
&lt;li&gt;Reduced Page Load Times&lt;/li&gt;
&lt;li&gt;Smooth Performance&lt;/li&gt;
&lt;li&gt;Responsive Design&lt;/li&gt;
&lt;li&gt;SEO-Friendly&lt;/li&gt;
&lt;li&gt;Maintainability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;on the end, use of flash player is not an option today and css3 animation is much better replacement with simple steps you can add an amazing touch to your website and make it more alive.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/hassanelsherbiny/embed/KKEmNYq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>newbie</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Is AI Dangerous For Developers?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 12 Jan 2024 20:51:54 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/is-ai-dangerous-for-developers-1a69</link>
      <guid>https://dev.to/hasanelsherbiny/is-ai-dangerous-for-developers-1a69</guid>
      <description>&lt;p&gt;since Chat GPT was Released a lot of people started to say "AI Will Take Our jobs"&lt;br&gt;
developers laughed and said "Okay We Are Irreplaceable". but also voices have arise saying "AI Now can writes code so you are replaceable too"&lt;br&gt;
So the question here "IS AI Really Dangerous For Developers ?"&lt;br&gt;
in my humble opinion "NO It's not" at least in mean time&lt;/p&gt;

&lt;h2&gt;
  
  
  but why do I think that?
&lt;/h2&gt;

&lt;p&gt;I think the whole problem started when the word "AI" became Mainstream as AI has been there for ages and no one cared about it.&lt;br&gt;
but when Chat GPT released it allowed normal people to use AI and see how far has AI been developed and a lot of rumors were spread even my father's friend who have never used a computer told him "your son is going to loos his job".&lt;br&gt;
but some expertise have also the same opinion , in fact they are influenced by mainstream opinion or they are just saying that so they can go viral and become celebrities (since that what's people want to here)&lt;/p&gt;

&lt;p&gt;most of these people justify their opinion by the fact that AI now can write code, but my question is do a developer only code?&lt;br&gt;
absolutely no, the most powerful skill of a developer is "The Ability to develop a solution" it's not just about writing code for it's actually it's the easiest part.&lt;/p&gt;

&lt;p&gt;and also AI Doesn't Create a code it's more like collecting other humans' code and putting them together &lt;br&gt;
(yes just like what we do 😂)&lt;/p&gt;

&lt;p&gt;so finally, do we really need to panic about losing our jobs for AI?&lt;br&gt;
we already lose it for inflation, so calm down and think about ho to develop your skills in such fast paced domain.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>discuss</category>
      <category>programming</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Implementing Notifications to your system</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Fri, 05 Jan 2024 17:02:11 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/implementing-notifications-to-your-system-50i4</link>
      <guid>https://dev.to/hasanelsherbiny/implementing-notifications-to-your-system-50i4</guid>
      <description>&lt;p&gt;When Creating a web application most of times you come to specific scenarios in which you need to send your users notifications but you start wandering how to do it?&lt;/p&gt;

&lt;h2&gt;
  
  
  Notifications Types/Methods
&lt;/h2&gt;

&lt;p&gt;we can categorize notifications into types based on how notifications are being send to users&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Push Notifications / Realtime Notifications
this is when a specific action occurs a notification is created and sent directly to user (in real-time) &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%2Fp2zs7v5072v0zk6wix36.gif" 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%2Fp2zs7v5072v0zk6wix36.gif" alt="How To Implement Notifications in your system" width="200" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pull Notifications
unlike the first type the notification is not sent to user but it's being saved into a store and wait for user to ask for it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;most systems use a combination of two types ,facebook for example, when someone react or add comment to your post you immediately get a notification (push notification) but also you still able to click on your notifications icon and list all your notifications (pull notifications)&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Implement notifications?
&lt;/h2&gt;

&lt;p&gt;for the pull notification it's straight forward by adding a table into your database where you can store your notification for each user, then user select from it by current user id.&lt;/p&gt;

&lt;p&gt;on the hand ,push notifications are littlie bit tricky as you need to have an open connection with your user so that you can send notification to him directly, to implement this kind of notifications you can make a good use of sockets or long polling , or you can simply use a library specialized in real-time communications like firebase or SignalR if you are using .net stack, but don't forget to also store your notifications in the database as user can currently be offline or can get history of old notifications later.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>newbie</category>
      <category>hasanaelsherbiny</category>
    </item>
    <item>
      <title>Encryption ,Hashing , Encoding,...</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Thu, 28 Dec 2023 15:57:26 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/encryption-hashing-encoding-2lpi</link>
      <guid>https://dev.to/hasanelsherbiny/encryption-hashing-encoding-2lpi</guid>
      <description>&lt;p&gt;In the world of internet no data is save ,this is a fact so we need ways to protect our transferred data over the internet.&lt;/p&gt;

&lt;p&gt;the first approach we use to protect our data is to put on a cover, this cover is to change how data look so if it's being hacked by someone this data is useless. &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%2F417x4k5h6pw3y2v0gbs9.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%2F417x4k5h6pw3y2v0gbs9.gif" alt="Encryption ,Hashing , Encoding,..."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1) Encryption
&lt;/h2&gt;

&lt;p&gt;in this method we lock our data (encrypt) using a key ,send data over and when data is received it's being unlocked (decrypt) and can be safely read.&lt;br&gt;
we call this method two ways encryption (because we encrypt / and decrypt it back).&lt;/p&gt;

&lt;p&gt;so if any one has the encrypted data it's useless and he MUST has the required key to unlock (decrypt) data back into it's original data&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%2F2sqnh9n90zedbl4g2gx2.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%2F2sqnh9n90zedbl4g2gx2.png" alt="Encryption ,Hashing , Encoding,..."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Encryption Has many methods but the most famous ways are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Symmetric Key&lt;br&gt;
this way the same key is used to encrypt and decrypt data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Asymmetric Key&lt;br&gt;
this way we have a pair of keys one is used to encrypt data called (public key) , another one is used to decrypt data called private key.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use cases for Encryption
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TLS/SSL Encryption&lt;/li&gt;
&lt;li&gt;Email Encryption&lt;/li&gt;
&lt;li&gt;Protecting Payment Transactions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2) Hashing
&lt;/h2&gt;

&lt;p&gt;this method is about generating unique value for input data, this generated hash is irreversible (meaning if you have hash and key you cannot get your input data back and this is called also one way encryption), ok this is a little bit confusing  if we cannot get input back how this hash is useful?&lt;/p&gt;

&lt;p&gt;the catch here is how we use hashing, unlike encryption we don't use hashing for transferring data but to ensure that the transferred data is accurate like password, user input the password the password is hashed and saved into the database, so the service provider cannot get user password back, when user enter password again it's hashed again using the same hashing method and hashing key, then we comparing the output and user's stored hashed password, since hashing output is unique for every input so if user inputs different password the hashing is also different.&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%2Fahp8q5jxind5ncsz2h01.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%2Fahp8q5jxind5ncsz2h01.png" alt="Encryption ,Hashing , Encoding,..."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hashing Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Password Storage&lt;/li&gt;
&lt;li&gt;Data Integrity Verification&lt;/li&gt;
&lt;li&gt;Digital Signatures&lt;/li&gt;
&lt;li&gt;Data Deduplication&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3) Encoding
&lt;/h2&gt;

&lt;p&gt;even the word encoding maybe similar to encrypting but in fact encoding doesn't concentrate on hiding data but on unifying the data format for transmission, for example if you are transferring data written in another language (Arabic for example) this data should be encoded to another format so it doesn't get miss saved or lose some important information&lt;br&gt;
that means you don't need to have some keys to encode or decode your data&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%2Fyj9ebgyv26hrb21z2atz.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%2Fyj9ebgyv26hrb21z2atz.png" alt="Encryption ,Hashing , Encoding,..."&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Why you MUST Add Logger To your project?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Thu, 21 Dec 2023 21:51:12 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/why-you-must-add-logger-to-your-project-i31</link>
      <guid>https://dev.to/hasanelsherbiny/why-you-must-add-logger-to-your-project-i31</guid>
      <description>&lt;p&gt;When you start developing you application for sure you start with your ide which mostly has a built in debugger, when an error occurs you the debugger pauses the run of the application and tell you that an unexpected exception occurred, but the question here after fixing all bugs you have found "Is Your App Is Now Bug Free?"&lt;/p&gt;

&lt;p&gt;the simple answer is "NO" there is no bug free application, so it's expected that on production your application can encounter bugs again but on this environment there is no debugger attached to tell you if there is an issue and where is it, so what to do?&lt;/p&gt;

&lt;p&gt;it's really common to make good use of informer inside your app to keep track of it's happening , then when there is an error you can inspect this log and check what is going on.&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%2F38opfqc9a6y842jpep81.gif" 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%2F38opfqc9a6y842jpep81.gif" alt="Why you MUST Add Logger To your project?" width="200" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as mentioned for a start you need your logger to log all un handled exceptions, but do we need to log only errors?&lt;/p&gt;

&lt;h2&gt;
  
  
  Log Levels
&lt;/h2&gt;

&lt;p&gt;we have a lot of levels we can use depending on our situation and how important log is.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;TRACE : for extremely detailed and fine-grained information. Typically used during development and debugging to trace the flow of execution and inspect variable values.&lt;br&gt;
Example: Printing variable values, entering or exiting a method, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DEBUG: for messages that are helpful during development and debugging but are less detailed than trace messages. It provides insights into the application's internal state.&lt;br&gt;
Example: Displaying the state of key variables, logging method entry and exit points, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;INFO: provide high-level information about the application's status and significant events. It is often used to track the flow of the application in production.&lt;br&gt;
Example: Startup messages, configuration details, significant state changes, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;WARN: for messages that highlight potential problems that do not necessarily lead to errors. Warnings are often used to alert developers or administrators about conditions that may require attention.&lt;br&gt;
Example: Deprecated features, suboptimal configurations, non-fatal errors, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ERROR: for messages that represent errors or unexpected conditions that may impact the application's functionality. Errors generally indicate a failure but may not be fatal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;FATAL: for critical errors that are so severe that they lead to the termination of the application. Fatal messages typically indicate a state from which the application cannot recover.&lt;br&gt;
Example: Unhandled exceptions, unrecoverable system failures, etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;so logger is important for finding issues only?&lt;/p&gt;

&lt;p&gt;actually no, you can use logger for other purposes ,such as&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitoring and Performance Optimization&lt;/li&gt;
&lt;li&gt;Auditing and Compliance&lt;/li&gt;
&lt;li&gt;Understanding User Behavior&lt;/li&gt;
&lt;li&gt;Long-Term Maintenance&lt;/li&gt;
&lt;li&gt;Security Insights&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;in the end logger is your snitch inside the app converting it from a black box, having no idea what is happening there into an open book.&lt;/p&gt;

</description>
      <category>newbi</category>
      <category>beginners</category>
      <category>programming</category>
      <category>hasanelsherbiny</category>
    </item>
    <item>
      <title>Is New Tech Always Better?</title>
      <dc:creator>Hasan Elsherbiny</dc:creator>
      <pubDate>Wed, 13 Dec 2023 00:34:47 +0000</pubDate>
      <link>https://dev.to/hasanelsherbiny/is-new-tech-always-better-2hdd</link>
      <guid>https://dev.to/hasanelsherbiny/is-new-tech-always-better-2hdd</guid>
      <description>&lt;p&gt;a few days ago ,I ran into a question asked by a junior developer which was &lt;br&gt;
"Are There Companies Still Using ASP.Net MVC Technology?"&lt;/p&gt;

&lt;p&gt;the question was wondering if there some companies still using old/outdated technology while there is a newer version of this technology and the upgrade is not really hard.&lt;/p&gt;

&lt;p&gt;but that question let me notice that people usually think the "New Tech" is equivalent to "Better Tech" , but is this really true?&lt;/p&gt;

&lt;p&gt;let's walk through some new tech (at it's first release) and see if the new tech is always better or not?&lt;br&gt;
for example "Silverlight" a product introduced by Microsoft as a replacement of adobe flash with a lot of promising features and improvements and a lot of propaganda about why this product will shape the future , but as you may know things didn't go this way&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%2Flevsglbgn9357wz0hjjo.gif" 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%2Flevsglbgn9357wz0hjjo.gif" alt="Is New Tech Always Better?" width="498" height="277"&gt;&lt;/a&gt;&lt;br&gt;
the same criteria applies to tones of frontend frameworks and a lot of products introduced by google, apple Microsoft and many other big tech companies ,not only software products but hardware as well.&lt;br&gt;
with the announcement of these products people start to talk about how amazing these products are and how fast they will jump into using them right after they are released, other may brag about using the latest technology in their projects as if this is the stamp of quality and advance. &lt;/p&gt;

&lt;p&gt;but why does this happen?&lt;br&gt;
as i mentioned before with the announcement of a new product, there are a lot of propaganda and a lot of promises about the feature, for sure some of these promises are real and also some of these products are revolutionary and out of the box , that made people think if it's new for sure it's better.&lt;/p&gt;

&lt;p&gt;in terms of software it's not correct to start using new tech immediately for some reasons&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;new tech = new bugs/issues&lt;/li&gt;
&lt;li&gt;less community (because for sure community comes after popularity and real features not only promises)&lt;/li&gt;
&lt;li&gt;compatibility &lt;/li&gt;
&lt;li&gt;upgrading costs &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and to answer the question I started with "Are There Companies Still Using ASP.Net MVC Technology?" &lt;br&gt;
yes there are for the reason mentioned earlier and also because it's not very outdated.&lt;/p&gt;

</description>
      <category>newbie</category>
      <category>beginners</category>
      <category>hasanelsherbiny</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
