<?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: Yasien Dwieb</title>
    <description>The latest articles on DEV Community by Yasien Dwieb (@yasiendwieb).</description>
    <link>https://dev.to/yasiendwieb</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%2F729302%2F47e22913-6452-4f46-b48d-0315df2f525d.jpg</url>
      <title>DEV Community: Yasien Dwieb</title>
      <link>https://dev.to/yasiendwieb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasiendwieb"/>
    <language>en</language>
    <item>
      <title>How to learn a web framework (time-efficiently)</title>
      <dc:creator>Yasien Dwieb</dc:creator>
      <pubDate>Sat, 07 Jan 2023 23:07:38 +0000</pubDate>
      <link>https://dev.to/yasiendwieb/how-to-learn-a-web-framework-time-efficiently-4o01</link>
      <guid>https://dev.to/yasiendwieb/how-to-learn-a-web-framework-time-efficiently-4o01</guid>
      <description>&lt;p&gt;Nowadays, learning has become a continuous activity that you should keep doing all the time (You really die once you stop)&lt;/p&gt;

&lt;p&gt;However it's important to keep learning, doing that in the wrong way could be very disappointing as, because we are human-beings, we tend quickly lose the enthusiasm if no quick profits are gained.&lt;/p&gt;

&lt;p&gt;And like any other subject, learning is a technique which when done correctly, quick gains are guaranteed.&lt;/p&gt;

&lt;p&gt;The following topic will list 10 points which will help to do the learning process quickly and in a controllable and time and effort efficient manner. &lt;/p&gt;

&lt;p&gt;The use case here is about learning Nest.js but the steps should apply on any other topic. The steps themselves are mentioned in details in the book (Soft Skills: The software developer's life manual, By John Sonmez) so you can go for more depth&lt;/p&gt;

&lt;p&gt;The format for each point will be like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Point title&lt;/li&gt;
&lt;li&gt;Brief about it&lt;/li&gt;
&lt;li&gt;Sample answer for it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's start ...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. What and how big is it?&lt;/strong&gt;&lt;br&gt;
This is the first step, to know about what are you going to learn and how big is it. So you can know that it matches your hearings or not and also to be aware of the time and cost to be dedicated for this learning process&lt;/p&gt;

&lt;p&gt;It’s just another web framework, built over Node.js, also it provides a good structure compared to other frameworks like Express.js. Currently, it's considered one of the most famous Back-end framework for Node.js out there.&lt;/p&gt;

&lt;p&gt;How big: &lt;br&gt;
Nest.js can be used to build various types of APIs like REST and Graphql. Also with database connections to SQL and NoSQL databases&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2- Specific domain to focus on&lt;/strong&gt;&lt;br&gt;
Here you will be trying to set limits of the topic you are learning about, just the important parts for your case&lt;/p&gt;

&lt;p&gt;How to build a REST API and persist data into Postgresql database&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3- Define success&lt;/strong&gt;&lt;br&gt;
Here you are setting the success criteria, this should keep you focused and also helps with measuring your progress&lt;/p&gt;

&lt;p&gt;I would consider that I have been successful at learning Nest.js when I have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built a REST API&lt;/li&gt;
&lt;li&gt; While following the convention and best practices around

&lt;ul&gt;
&lt;li&gt;Project structure&lt;/li&gt;
&lt;li&gt;Code cleanliness&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Connected to database for data persistence&lt;/li&gt;

&lt;li&gt;Secured the API&lt;/li&gt;

&lt;li&gt;Used caching layer&lt;/li&gt;

&lt;li&gt;Wrote some test cases&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4- The plan&lt;/strong&gt;&lt;br&gt;
Here I should be adding something like book index for steps and how I should go to reach the success criteria as defined above&lt;/p&gt;

&lt;p&gt;I think it should be like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get started with example project&lt;/li&gt;
&lt;li&gt;Use services &lt;/li&gt;
&lt;li&gt;Connect postgresql&lt;/li&gt;
&lt;li&gt;Set up Migrations&lt;/li&gt;
&lt;li&gt;Understand Requests&lt;/li&gt;
&lt;li&gt;Understand Dependency injection&lt;/li&gt;
&lt;li&gt;Validate request data&lt;/li&gt;
&lt;li&gt;Paginate response data&lt;/li&gt;
&lt;li&gt;Protect routes using Guards&lt;/li&gt;
&lt;li&gt;(Optional): Do request Logging&lt;/li&gt;
&lt;li&gt;Understand Binding Techniques&lt;/li&gt;
&lt;li&gt;Catch Exceptions with Filters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5- Resources&lt;/strong&gt;&lt;br&gt;
Here should come most of the resources that you think could be helpful at some points or having a specific advantage like good organization or the publisher is known to be creating good content&lt;/p&gt;

&lt;p&gt;Resources list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For the syllabus above: 

&lt;ul&gt;
&lt;li&gt;Topics are from: &lt;a href="https://courses.nestjs.com/" rel="noopener noreferrer"&gt;https://courses.nestjs.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;
&lt;a href="https://www.freecodecamp.org/news/learn-nestjs-by-building-a-crud-api/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://www.freecodecamp.org/news/learn-nestjs-by-building-a-crud-api/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/learn-nestjs-by-building-a-crud-api/&lt;/a&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;a href="https://blog.logrocket.com/full-stack-app-tutorial-nestjs-react/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://blog.logrocket.com/full-stack-app-tutorial-nestjs-react/" rel="noopener noreferrer"&gt;https://blog.logrocket.com/full-stack-app-tutorial-nestjs-react/&lt;/a&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;a href="https://hashdork.com/nest-js-tutorial/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://hashdork.com/nest-js-tutorial/" rel="noopener noreferrer"&gt;https://hashdork.com/nest-js-tutorial/&lt;/a&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;a href="https://devm.io/nodejs/tutorial-nestjs-for-nodejs-app-158076" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://devm.io/nodejs/tutorial-nestjs-for-nodejs-app-158076" rel="noopener noreferrer"&gt;https://devm.io/nodejs/tutorial-nestjs-for-nodejs-app-158076&lt;/a&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;a href="https://javascript.plainenglish.io/nest-js-part-1-creating-your-first-api-71471ac39d3e" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://javascript.plainenglish.io/nest-js-part-1-creating-your-first-api-71471ac39d3e" rel="noopener noreferrer"&gt;https://javascript.plainenglish.io/nest-js-part-1-creating-your-first-api-71471ac39d3e&lt;/a&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6- Filter resources&lt;/strong&gt;&lt;br&gt;
Here you should keep only the ones that you think should be sufficient as they should achieve your target&lt;/p&gt;

&lt;p&gt;Filtered resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/learn-nestjs-by-building-a-crud-api/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/learn-nestjs-by-building-a-crud-api/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.logrocket.com/full-stack-app-tutorial-nestjs-react/" rel="noopener noreferrer"&gt;https://blog.logrocket.com/full-stack-app-tutorial-nestjs-react/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hashdork.com/nest-js-tutorial/" rel="noopener noreferrer"&gt;https://hashdork.com/nest-js-tutorial/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7-10 steps are known as LDLT (Learn - DO - Learn - Teach)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;7- Start learning&lt;/strong&gt;&lt;br&gt;
Up to this point, no learning action has been done yet, just planning for the learning. The &lt;strong&gt;Learn&lt;/strong&gt; step is where you start to learn about the topics from the resources you have collected&lt;/p&gt;

&lt;p&gt;For me, I would go with some reading before diving into the freecodecamp video (it’s a 4 hours 😀 one) but looks like a good one&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8- Do (Like learning by playing, try it yourself)&lt;/strong&gt;&lt;br&gt;
Here, you are attempting to try various scenarios which are not very related to the tutorials that you have read, and honestly, you will learn much much from this step.&lt;br&gt;
Also mostly you would come with unanswered questions, write them down for the next step &lt;/p&gt;

&lt;p&gt;I will start to prepare the environment and check the example project structure to check if all good and understandable&lt;br&gt;
Then, I will try to add a new controller with some other routes which have dynamic parameters and try to validate them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9- Learn (Fill the gaps)&lt;/strong&gt;&lt;br&gt;
To answer the questions for the parts that are found to be not very clear, I should be doing more learning and checking further resources&lt;/p&gt;

&lt;p&gt;Example, What should be the best way to validate data &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10- Teach&lt;/strong&gt;&lt;br&gt;
Once a single section has been grasped, I should be trying to make a good explanation of what I have learned in the form of a tutorial, video or explain it to a colleague. This highly helps to keep the information organized in your head and it deeply shows you some gaps in your knowledge&lt;/p&gt;

&lt;p&gt;This is like what I have done into this Post about the learning 10 steps process 😀&lt;/p&gt;

&lt;p&gt;Steps from 7 - 10 should be repeated for each section or topic in your learning plan, so let's assume you have many sections to learn, then each section should have its own 7 - 10 process.&lt;/p&gt;

&lt;p&gt;I hope that was helpful&lt;br&gt;
Thanks and Happy Learning&lt;/p&gt;

</description>
      <category>github</category>
      <category>softwaredevelopment</category>
      <category>discuss</category>
    </item>
    <item>
      <title>[TIL] Cloudflare origin certificate limitation</title>
      <dc:creator>Yasien Dwieb</dc:creator>
      <pubDate>Sun, 27 Mar 2022 21:30:18 +0000</pubDate>
      <link>https://dev.to/yasiendwieb/til-cloudflare-origin-certificate-limitation-2ko5</link>
      <guid>https://dev.to/yasiendwieb/til-cloudflare-origin-certificate-limitation-2ko5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This will be a series of issues that I faced and found a solution for, which could help someone or my future self&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cloudflare provides SSL out of the box and also you can generate origin certificate that you can use to add HTTPS to your website and its subdomains via the usage of wildcards&lt;/p&gt;

&lt;p&gt;But unfortunately, this had some limitation so it only applies for first level subdomains.&lt;/p&gt;

&lt;p&gt;Issues Related:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ERR_SSL_VERSION_OR_CIPHER_MISMATCH&lt;/li&gt;
&lt;li&gt;ssl3_read_bytes:sslv3 alert handshake failure&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://support.cloudflare.com/hc/en-us/articles/200170566-Troubleshooting-SSL-errors#h_55e4d315-c60d-4798-9c4c-c75d9baed1b7"&gt;https://support.cloudflare.com/hc/en-us/articles/200170566-Troubleshooting-SSL-errors#h_55e4d315-c60d-4798-9c4c-c75d9baed1b7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://stackoverflow.com/questions/70546503/cloudflare-ssl-for-staging-subdomain-sslv3-alert-handshake-failure"&gt;https://stackoverflow.com/questions/70546503/cloudflare-ssl-for-staging-subdomain-sslv3-alert-handshake-failure&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ssl</category>
      <category>domains</category>
      <category>cpanel</category>
    </item>
    <item>
      <title>[TIL] Fix: TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block</title>
      <dc:creator>Yasien Dwieb</dc:creator>
      <pubDate>Tue, 22 Mar 2022 21:20:20 +0000</pubDate>
      <link>https://dev.to/yasiendwieb/fix-docker-elasticsearch-1o0e</link>
      <guid>https://dev.to/yasiendwieb/fix-docker-elasticsearch-1o0e</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This will be a series of issues that I faced and found a solution for, which could help someone or my future self&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have been facing this issue when I was trying to index data on ElasticSearch 7.* on Docker&lt;/p&gt;

&lt;p&gt;Env:&lt;br&gt;
Laravel + laravel scout + El&lt;/p&gt;

&lt;p&gt;The error was:&lt;br&gt;
&lt;code&gt;{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"index [{tableName}] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"}],"type":"cluster_block_exception","reason":"index [{tableName}] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"},"status":429}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Solution that worked for me:&lt;br&gt;
&lt;code&gt;curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'&lt;br&gt;
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Reference:&lt;br&gt;
&lt;a href="https://discuss.elastic.co/t/elasticsearch-docker-flood-stage-disk-watermark-95-exceeded/248479"&gt;https://discuss.elastic.co/t/elasticsearch-docker-flood-stage-disk-watermark-95-exceeded/248479&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>docker</category>
      <category>laravel</category>
      <category>mysql</category>
    </item>
  </channel>
</rss>
