<?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: Bilal Ahmad</title>
    <description>The latest articles on DEV Community by Bilal Ahmad (@billypentester).</description>
    <link>https://dev.to/billypentester</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%2F529524%2F902c1deb-10fc-437f-b0d6-327415d24899.jpg</url>
      <title>DEV Community: Bilal Ahmad</title>
      <link>https://dev.to/billypentester</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/billypentester"/>
    <language>en</language>
    <item>
      <title>Ultimate 10 Stages to Master Backend Development</title>
      <dc:creator>Bilal Ahmad</dc:creator>
      <pubDate>Wed, 07 Sep 2022 12:38:21 +0000</pubDate>
      <link>https://dev.to/billypentester/ultimate-10-stages-to-master-backend-development-o83</link>
      <guid>https://dev.to/billypentester/ultimate-10-stages-to-master-backend-development-o83</guid>
      <description>&lt;h2&gt;
  
  
  Background:
&lt;/h2&gt;

&lt;p&gt;Backend development refers to server-side programming in which a developer creates application architecture and business logic to process and store the data and output useful information.&lt;/p&gt;

&lt;p&gt;There are multiple backend programming languages, frameworks, and stacks like JavaScript, Python, PHP, Java, Ruby, etc but in this article, I’ll only discuss the complete backend JS stack here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fajrp6h59zu7dqkgku4oh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fajrp6h59zu7dqkgku4oh.png" alt="coding meme" width="300" height="240"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Stage 1: Web Basics
&lt;/h2&gt;

&lt;p&gt;Learning some web basics is the initial stage for every developer. Having networking concepts can help you to better understand how the internet works, what protocols are used, how messages are delivered etc.&lt;/p&gt;

&lt;p&gt;Some basics concepts are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What’s HTTP and how is communication done?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;How many types of HTTP requests are and what are their roles?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What is the client/server model?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What is the OSI model?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;How does DNS work?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add a little more and learn about basic HTML tags, CSS styling, and DOM manipulation:&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a simple web page using HTML tags&lt;/li&gt;
&lt;li&gt;Add different styles,
Use DOM to change the styles of HTML elements&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 2: OS knowledge
&lt;/h2&gt;

&lt;p&gt;Operating System manages all of the software and hardware on the computer. It performs memory and process management, handling input and output, etc.&lt;/p&gt;

&lt;p&gt;An operating system runs a server that further runs a complete web app. So, it is necessary to learn about OS operations to maximize performance and optimize memory.&lt;/p&gt;

&lt;p&gt;In this stage, you need to learn about OS architecture, file system, basic CLI commands, memory and process management, OS threads, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open window / Linux terminal&lt;/li&gt;
&lt;li&gt;Try file/folder commands (rm, md, ren, del, copy, move)&lt;/li&gt;
&lt;li&gt;Try path traversal commands (dir, ls, cd)&lt;/li&gt;
&lt;li&gt;Try some networking commands (ipconfig, tracert, arp, netstat, ping)&lt;/li&gt;
&lt;li&gt;Try some system and process commands also.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 3: Runtimes
&lt;/h2&gt;

&lt;p&gt;The next stage is to learn a backend framework/language to work with. As I mentioned earlier that I’m discussing JS stack here, so the first step is to learn JavaScript. Learn basics about JS like data types, loops, selection, functions, objects, classes, arrays, strings, regular expression, etc.&lt;/p&gt;

&lt;p&gt;JavaScript consist of three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;ECMAScript — Core javascript&lt;/li&gt;
&lt;li&gt;DOM — Interact with the document using JS&lt;/li&gt;
&lt;li&gt;BOM — Interact with browser using JS&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ECMAScript is a scripting language specification on which JavaScript is based. It introduced new javascript features like arrow function, async-await, template literals, etc. It is also called advanced javascript. Learn some important JS features which can be helpful in efficient coding.&lt;/p&gt;

&lt;p&gt;Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on a JavaScript Engine and executes JavaScript code. Learn some basic node js modules like fs, path, os, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use the fs module to create, delete, and update file /folder&lt;/li&gt;
&lt;li&gt;Use the path module to set the path for static files/ folders.&lt;/li&gt;
&lt;li&gt;Use the OS module to get the statistics of the operating system.&lt;/li&gt;
&lt;li&gt;try async-await and arrow function&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 4(a): Server Framework
&lt;/h2&gt;

&lt;p&gt;The main role in backend development is a server framework. It’s a communication gateway between the frontend and backend (node app) with the integration of the database.&lt;/p&gt;

&lt;p&gt;Server framework provides you full control over incoming and outgoing requests/responses, provides endpoints, executes middleware functions, etc.&lt;/p&gt;

&lt;p&gt;Some famous server frameworks are Express JS(recommended), Nest JS, and Koa JS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Setup a basic server&lt;/li&gt;
&lt;li&gt;Interact with req &amp;amp; res callbacks&lt;/li&gt;
&lt;li&gt;create middleware functions&lt;/li&gt;
&lt;li&gt;Use different HTTP requests (GET, POST, DELETE, PUT/PATCH)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stage 4(b): API development
&lt;/h2&gt;

&lt;p&gt;This is a type of practical stage in which you learn how to create a simple REST API using Express JS and node JS and perform CRUD operations. Use express middleware for validating incoming requests, routers for handling endpoints, etc.&lt;/p&gt;

&lt;p&gt;Here’s the practical implementation of API development:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/fgTGADljAeg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Postman is helpful in testing API endpoints. Add more and learn about swagger and Open API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;create a folder structure for API&lt;/li&gt;
&lt;li&gt;Manage routes and data in separate folders.&lt;/li&gt;
&lt;li&gt;Use middleware to filter and validate the input data.&lt;/li&gt;
&lt;li&gt;Use proper status code and error message for results.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 5: Template Engine
&lt;/h2&gt;

&lt;p&gt;Usually, communication between the frontend (React app) and backend (express app) is done using API calls in the MERN stack. Client requests the data from the server and the server sends the requested data back to the client.&lt;/p&gt;

&lt;p&gt;But if your project is small and you don’t have good knowledge of React or another frontend framework, use a template engine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Template engine&lt;/strong&gt; helps you to create the static HTML template files and replaces variables in a template file with actual values at runtime which makes it a dynamic website. Template Engine works with the integration of Express JS. It gets data values from the database and renders these in an HTML template file.&lt;/p&gt;

&lt;p&gt;Some template engines are hbs(recommended), ejs, pug, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Integrate template engine with node js.&lt;/li&gt;
&lt;li&gt;create a static template in the template engine.&lt;/li&gt;
&lt;li&gt;Output express values in the template engine.&lt;/li&gt;
&lt;li&gt;Use if/else and loops in the template engine.&lt;/li&gt;
&lt;li&gt;Use partial to create reusable components like navbar, header, footer, etc.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 6: Database
&lt;/h2&gt;

&lt;p&gt;Database has the biggest role in backend development. It is used for storing the data in a structured way and accessing and maintaining the data.&lt;/p&gt;

&lt;p&gt;Some famous databases to learn about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQL database: MYSQL, SQLSERVER, POSTGRESQL&lt;/li&gt;
&lt;li&gt;NoSQL database: MongoDB, Cassandra&lt;/li&gt;
&lt;li&gt;Cached database: Redis&lt;/li&gt;
&lt;li&gt;Real-time database: Firebase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Backend apps directly interact with the database by querying the database using third-party npm packages like MongoDB, MySQL, etc&lt;/p&gt;

&lt;p&gt;if you don’t know SQL or database language, you need to learn any ORM / ODM as a middleware that translates object methods to complex database queries. It provides you with a complete structure called model to validate data before entering data into the database. Moreover, it provides an extra security layer on top of the object model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sequelize&lt;/strong&gt; is a famous ORM used for SQL databases like MySQL, SQL Server, SQLite, PostgresSQL, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;mongoose&lt;/strong&gt; is also a good ODM used for NoSQL databases like MongoDB etc.&lt;/p&gt;

&lt;p&gt;There are some other concepts to learn about databases like ACID properties, backup/migration techniques, applying normalization and indexing, data replication and sharding, etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try some basic SQL queries&lt;/li&gt;
&lt;li&gt;Understand the difference between SQL and NoSQL database&lt;/li&gt;
&lt;li&gt;Check how ORM/ODM works with the database&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 7: Security
&lt;/h2&gt;

&lt;p&gt;Security is a big concern for enterprise-level web applications. A single vulnerability causes the leakage of data or failure of the application. There should be proper validation, authentication, and authorization in a web app.&lt;/p&gt;

&lt;p&gt;Some techniques to make your app secure better:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JWT: Use a token to prevent unwanted access to a protected resource.&lt;/li&gt;
&lt;li&gt;Cookie: Use to store information about visits to the webpage.&lt;/li&gt;
&lt;li&gt;Session: Use to maintain a secure connection with the server.&lt;/li&gt;
&lt;li&gt;CORS: Use cors to make requests from one website to another website&lt;/li&gt;
&lt;li&gt;hashing: Use middleware to hash the password using salt.&lt;/li&gt;
&lt;li&gt;encrypt/decrypt: Use middleware to encrypt and decrypt important data.&lt;/li&gt;
&lt;li&gt;SSL: Use SSL certification to secure the transaction.&lt;/li&gt;
&lt;li&gt;Limiting: Use middleware to apply request limits to prevent DDOS attacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;try injecting some malicious js scripts in input tags.&lt;/li&gt;
&lt;li&gt;try sending multiple requests at a time.&lt;/li&gt;
&lt;li&gt;check how JWT token, cookies, encryption, and hashing work&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 8: Message Brokers
&lt;/h2&gt;

&lt;p&gt;Modern applications are complex. Due to large time-complexity, CPU-intensive operations, large amounts of data processing, and API communication between multiple services are some time-consuming issues that leave a bad user experience. Message Broker is one of the solutions that can help to overcome some of these difficulties.&lt;/p&gt;

&lt;p&gt;Message Broker is a type of middleware software that allows services and applications to communicate with one another through the use of messages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Point-to-point messaging&lt;/strong&gt; and &lt;strong&gt;Publish/subscribe messaging&lt;/strong&gt; are famous models of message brokers.&lt;/p&gt;

&lt;p&gt;Message broker consist of 3 components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Producer: Producers send messages on a topic. One or many publishers can publish on the same topic.&lt;/li&gt;
&lt;li&gt;Consumer: Subscribers subscribe to topics, and all messages published to the topic are received by all subscribers on the topic.&lt;/li&gt;
&lt;li&gt;Queue/topic: Queue holds the message published by the producer and accessed by the consumer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;RabbitMQ&lt;/strong&gt; and &lt;strong&gt;Kafka&lt;/strong&gt; provide the implementation of a message broker.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;create a newsletter subscription using Kafka message broker.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 9: Testing
&lt;/h2&gt;

&lt;p&gt;Testing is important before deploying a web application on a live server. A single wrong input or missing data can cause the failure of a running server.&lt;/p&gt;

&lt;p&gt;Testing can be done on multiple levels based on multiple criteria. For example, you can check if the web app returns a proper status code, error message, data, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jest&lt;/strong&gt; is a famous unit testing framework to test both web apps and APIs. It provides multiple methods to automate the testing process, check responses on wrong or missing data, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supertest&lt;/strong&gt; is used for APIs testing with the integration of other testing libraries and is easy to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use jest to test a complete API&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stage 10: Server / Cloud deployment
&lt;/h2&gt;

&lt;p&gt;Final stage of application development is deploying the web app on a live server/ cloud.&lt;/p&gt;

&lt;p&gt;Before deploying a web app, it’s necessary to learn version control like git, Github, and Github actions to make your deployment flexible and scalable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git&lt;/strong&gt; is used for version control to create multiple branches, track changes in the source code, and enable multiple developers to work together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt; is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt; help you automate your software development workflows. Individual actions are reusable pieces of code that let you build, test, package, or deploy projects on GitHub. It can also be used to automate any step of your workflow.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Deploying a complete web app is more complex. You’ll need a dedicated server to respond to the HTTP requests that it will be receiving and work with an online database.&lt;/p&gt;

&lt;p&gt;Some famous &lt;strong&gt;PaaS&lt;/strong&gt; are:&lt;/p&gt;

&lt;p&gt;Heroku: If you’re a beginner, your project is small and you want to deploy, Heroku is good to start with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I personally don’t recommend Heroku&lt;/strong&gt; as there are multiple problems with this cloud platform like issues with environmental variables, slow bandwidth, etc.&lt;/p&gt;

&lt;p&gt;Instead, use &lt;strong&gt;Vercel&lt;/strong&gt; or &lt;strong&gt;netlify&lt;/strong&gt; which provides more control and flexibility over the deployed app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS, Docker, and Kubernetes&lt;/strong&gt;: If you’re seeking a career in full-stack web development or DevOps, now’s a good time to familiarize yourself with Amazon Web Services and/or container platforms like Docker and Kubernetes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Azure&lt;/strong&gt;: If you’re a C# or .NET developer, Azure appears to be a seamless way to deploy your apps without having to leave the safety of the Microsoft ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;deploy a complete API on Vercel cloud&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F42waao2jfp3hioiosx0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F42waao2jfp3hioiosx0y.png" alt="programming meme" width="500" height="268"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;The learning process will never end. It continues until you’re alive. These stages are just the initial step to start as a beginner/intermediate level backend development and there are a lot of other things to learn and it depends on your project requirement and problem-solving techniques.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;KEEP LEARNING, STAY PASSIONATE ALWAYS AND EXPLORE THE THINGS&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;




</description>
      <category>javascript</category>
      <category>node</category>
      <category>database</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Web3 js in practical (Part-I)</title>
      <dc:creator>Bilal Ahmad</dc:creator>
      <pubDate>Wed, 03 Aug 2022 10:34:50 +0000</pubDate>
      <link>https://dev.to/billypentester/web3-js-in-practical-part-i-5b8h</link>
      <guid>https://dev.to/billypentester/web3-js-in-practical-part-i-5b8h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.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%2Flzx2rp09axyb1z0nynso.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Flzx2rp09axyb1z0nynso.png" alt=" " width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Background:
&lt;/h3&gt;

&lt;p&gt;Web3 js is an &lt;strong&gt;Ethereum JavaScript API&lt;/strong&gt; that is used to interact with the Ethereum blockchain. It provides multiple methods that allow you to perform actions like sending Ethers from one account to another, creating smart contracts, interacting with smart contracts, and so much more.&lt;/p&gt;

&lt;p&gt;This blog consist of 3 parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; basics of web3 js&lt;/li&gt;
&lt;li&gt; interact with a smart contract using web3 js&lt;/li&gt;
&lt;li&gt; compile and deploy smart contract using web3 js&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this blog, we’ll discuss &lt;strong&gt;web3 js basics&lt;/strong&gt;, so let’s do something practical :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Pre-requisite:
&lt;/h3&gt;

&lt;p&gt;Some prior knowledge is required related to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Advance Javascript (async-await, arrow function)&lt;/li&gt;
&lt;li&gt; Node JS (install and import libraries)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Node JS should be installed. To verify, type the command in CMD:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup environment:
&lt;/h3&gt;

&lt;p&gt;There are multiple tools and options to create and set up blockchain but here are some easy steps to set up everything quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;em&gt;Initialize npm&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;create a folder, and open it with vs code or your editor. Type command in terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;em&gt;Install web3 js library&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install web3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;em&gt;setup blockchain&lt;/em&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ganache is a personal Ethereum blockchain that you can use to run tests, execute commands, and monitor transactions.&lt;/p&gt;

&lt;p&gt;Download from here: &lt;a href="https://trufflesuite.com/ganache/" rel="noopener noreferrer"&gt;https://trufflesuite.com/ganache/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installation, open Ganache (quick start):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F4kf1phifrhv8ckr45ey7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F4kf1phifrhv8ckr45ey7.png" alt="ganache" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Coding:
&lt;/h3&gt;

&lt;p&gt;create a file “index.js” in the same folder and write some code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Import library and initialize provider (ganache network)&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Web3 = require('web3');

const web3 =   
new Web3(new Web3.providers.HttpProvider("HTTP://127.0.0.1:7545"));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;use ganache network (RPC server) address in HttpProvider&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;List all ganache accounts:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web3.eth.getAccounts((*err*, *accounts*) =&amp;gt; {

     console.log("Accounts:", *accounts*);

})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Get the balance of the account:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web3.eth.getBalance(web3.eth.accounts\[0\], (*err*, *balance*) =&amp;gt; {

     console.log(web3.fromWei(*balance*, 'ether'));

})

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;web3.eth.accounts[0]:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;It refers to the first account.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;web3.from Wei:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;It converts balance from Wei to Ethers.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Send ethers from one account to another account&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web3.eth.sendTransaction(  
    { from: web3.eth.accounts\[0\],   
      to: web3.eth.accounts\[1\],   
      value: web3.toWei('5', 'ether') },   
      (*err*, *transactionHash*) =&amp;gt; {

          console.log(*transactionHash*);

})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;web3.toWei&lt;/em&gt;&lt;/strong&gt;: &lt;em&gt;It converts balance from Ethers to Wei.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Code:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/billypentester/web3/tree/main/Part-I" rel="noopener noreferrer"&gt;complete code files&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;I discussed some basic and important methods but there are multiple other methods to interact with the blockchain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;web3 js documentation:&lt;/strong&gt; &lt;a href="https://web3js.readthedocs.io/en/v3.0.0-rc.5/" rel="noopener noreferrer"&gt;https://web3js.readthedocs.io/en/v3.0.0-rc.5/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait!!! Where’s the smart contract ?!&lt;/p&gt;

&lt;p&gt;In web3 js (Part-II), I’ll discuss, how to interact with smart contracts.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to hide the source code of an HTML web page?</title>
      <dc:creator>Bilal Ahmad</dc:creator>
      <pubDate>Wed, 03 Aug 2022 10:11:40 +0000</pubDate>
      <link>https://dev.to/billypentester/how-to-hide-the-source-code-of-an-html-web-page-12n5</link>
      <guid>https://dev.to/billypentester/how-to-hide-the-source-code-of-an-html-web-page-12n5</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.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%2Ftlya7jhnaocvpwegxv9n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftlya7jhnaocvpwegxv9n.png" alt="webdev" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Beginner developers used to think that they could hide the HTML code of their web page by restricting visitors, but this is not the case.
&lt;/h4&gt;

&lt;p&gt;Here are some techniques if you want to restrict your visitor to view or scrap your HTML code in inspect element:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can disable Ctrl and F12 keys using javascript&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;F12. Opens &lt;strong&gt;Chrome’s Developer Tools&lt;/strong&gt;. F12 tools provide a set of tools that you can use &lt;strong&gt;to view webpage source code and behavior&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Ctrl key is mostly used in the combination with other keys to view the source code of the web.&lt;/p&gt;

&lt;p&gt;for example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ctrl + S: It is used to save a whole web page.&lt;/p&gt;

&lt;p&gt;Ctrl + U: It is used to open source code of web in new tab.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can use this code in the &lt;strong&gt;script tag&lt;/strong&gt; to apply this change.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; document.addEventListener("keydown", function (event){

  if (event.ctrlKey){

     event.preventDefault();

  }

  if(event.keyCode == 123){

     event.preventDefault();

  }

})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;You can disable mouse right click using javascript&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By clicking right-click on the webpage, it will give you the option to view and inspect the source code of the web.&lt;/p&gt;

&lt;p&gt;You can use this code in the &lt;strong&gt;script tag&lt;/strong&gt; to apply this change.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  document.addEventListener('contextmenu', 

     event =&amp;gt; event.preventDefault() 

  )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Is it enough?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These two techniques are good for non-technical visitors or for some people who have just joined the Computer science field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F1y79bsoy5wt4budgdvkf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1y79bsoy5wt4budgdvkf.jpeg" alt="coding meme" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What about Web developers (technical experts)?&lt;/p&gt;

&lt;p&gt;They can still view the source code of the web using chrome extension, HTML interceptor (BURP), or postman.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffhvm45r7bikltzfa14ji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffhvm45r7bikltzfa14ji.png" alt="postman" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;View source code in postman&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;THEN HOW TO HIDE?&lt;/p&gt;

&lt;p&gt;You can't hide your HTML source code in browser anyway because your browser needs HTML code to run and view the web page.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, here are some other techniques to minimize web scraping or code copy-pasting :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use REACT JS to minimum encapsulate your source code.&lt;/li&gt;
&lt;li&gt;  Use server-side rendering to change code structure from time to time.&lt;/li&gt;
&lt;li&gt;  Apply copyright act for legal actions.&lt;/li&gt;
&lt;li&gt;  enable SSL certification to encrypt data between client and server-side.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Conclusion&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you hide some website code, the Google crawler can still read it, but certain parts, such as No-Follow and No-Index, will tell the crawler whether or not to index the site.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“Hiding text or links in your content to manipulate Google’s search rankings can be seen as deceptive and is a violation of Google’s Webmaster Guidelines.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can hide data from users but not from crawlers, but now bots can read all of your website’s source code.&lt;/p&gt;

&lt;p&gt;I think the hiding of source code is not a good idea. You might be facing some SEO issues in the future.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>design</category>
    </item>
    <item>
      <title>Cyber security essentials</title>
      <dc:creator>Bilal Ahmad</dc:creator>
      <pubDate>Sat, 04 Dec 2021 05:56:14 +0000</pubDate>
      <link>https://dev.to/billypentester/cyber-security-essentials-1dip</link>
      <guid>https://dev.to/billypentester/cyber-security-essentials-1dip</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.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%2Feh2opmgebnbpyebrn33q.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Feh2opmgebnbpyebrn33q.jpeg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cyber security is the practice of defending computers networks, electronic devices and data from malicious attacks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A cybersecurity framework is a collection of best practices that an organization should follow to manage its cybersecurity risk.&lt;br&gt;
The goal of the framework is to reduce the company’s exposure to cyberattacks, and to identify the areas most at risk for data breaches and other compromising activity perpetrated by cyber criminals.&lt;/p&gt;

&lt;p&gt;Cyber security framework works under 5 main functions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fad4aabt3la9fw8xam6fv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fad4aabt3la9fw8xam6fv.png" alt=" " width="676" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify : An understanding and identification of the cyber security risks.&lt;/li&gt;
&lt;li&gt;Protect : Measures to protect and maintain systems, assets and data.&lt;/li&gt;
&lt;li&gt;Detect : Processes to identify the occurrence of a cyber security event.&lt;/li&gt;
&lt;li&gt;Respond : Arrangements of detection of a possible cyber security event.&lt;/li&gt;
&lt;li&gt;Recover : Plans and restoration procedures to reinstate services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How to ensure that your information is secure? Well, Information security is based on CIA triad model. The CIA triad refers to an information security model made up of the three main components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fr4r6octfxs9tjq5o8bch.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fr4r6octfxs9tjq5o8bch.png" alt=" " width="719" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confidentiality :
It’s ability of system to keep your data secret and private only to you.&lt;/li&gt;
&lt;li&gt;Integrity :
A system’s ability to ensure that the information is accurate and correct.&lt;/li&gt;
&lt;li&gt;Availability :
This means that the information is available to authorized users when it is needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A cybersecurity threat refers to any possible malicious act that seeks to damage data, steal data, or disrupt digital life in general.&lt;/p&gt;

&lt;p&gt;Here are some cyber security threads that will cause cyber attack :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Phishing : An email-borne attack that involves tricking the email recipient into disclosing confidential information or downloading malware by clicking on a hyperlink in the message.&lt;/li&gt;
&lt;li&gt;Social engineering : This technique is used to deceive and manipulate victims to obtain information or gain access to their computer. This is achieved by tricking users into clicking malicious links or by physically gaining access to a computer through deception.&lt;/li&gt;
&lt;li&gt;DDoS attacks : DDoS (distributed denial-of-service) attacks attempt to disrupt normal web traffic and take targeted websites offline by flooding systems, servers or networks with more requests than they can handle, causing them to crash.&lt;/li&gt;
&lt;li&gt;Malware : The term is used to describe malicious software designed to perform an attack on the device or server that downloads or runs it. Malware attacks can cause a corruption of data or even take down an entire system.&lt;/li&gt;
&lt;li&gt;Malware is a broad term used to describe any file or program intended to harm or disrupt a computer. This includes:&lt;/li&gt;
&lt;li&gt;Viruses : these infect applications attaching themselves to the initialization sequence.&lt;/li&gt;
&lt;li&gt;Worms : they don’t attack the host, being self-contained programs that propagate across networks and computers in order to overload an server.&lt;/li&gt;
&lt;li&gt;Trojans : it hiding inside a useful program with malicious purposes&lt;/li&gt;
&lt;li&gt;Spyware : a type of program installed to collect information about users&lt;/li&gt;
&lt;li&gt;Ransomware : An attack that involves encrypting data on the target system and demanding a ransom in exchange for letting the user have access to the data again. These attacks range from low-level nuisances to serious incidents like the locking down of the entire city of Atlanta’s municipal government data in 2018.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Experts estimate that a ransomware attack will occur every 11 seconds in 2021. (Cybercrime Magazine, 2019)&lt;br&gt;
The average cost of a data breach is $3.86 million as of 2020. (IBM)&lt;br&gt;
Data breaches exposed 36 billion records in the first half of 2020. (RiskBased)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are some historical data breaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
In 2020, a Twitter breach targeted 130 accounts, including those of past presidents and Elon Musk, resulted in attackers swindling $121,000 in Bitcoin through nearly 300 transactions. (CNBC)&lt;/li&gt;
&lt;li&gt;
In 2020, Marriott disclosed a security breach impacted data of more than 5.2 million hotel guests. (Marriott)&lt;/li&gt;
&lt;li&gt;
The 2019 MGM data breach resulted in hackers leaking records of 142 million hotel guests. (CPO Magazine)&lt;/li&gt;
&lt;li&gt;
In 2018, Under Armor reported that its “My Fitness Pal” was hacked, affecting 150 million users. (Under Armour)&lt;/li&gt;
&lt;li&gt;
In 2017, 147.9 million consumers were affected by the Equifax Breach. (Equifax)&lt;/li&gt;
&lt;li&gt;
The Equifax breach cost the company over $4 billion in total. (Time Magazine)&lt;/li&gt;
&lt;li&gt;
In 2017, 412 million user accounts were stolen from Friendfinder’s sites. (Wall Street Journal)
8.
100,000 groups in at least 150 countries and more than 400,000 machines were infected by the Wannacry virus in 2017, at a total cost of around $4 billion. (Technology Inquirer)&lt;/li&gt;
&lt;li&gt;
In 2016, Uber reported that hackers stole the information of over 57 million riders and drivers. (Uber)
10.
Uber tried to pay off hackers to delete the stolen data of 57 million users and keep the breach quiet. (Bloomberg)
11.
In one of the biggest breaches of all time, 3 billion Yahoo accounts were hacked in 2013. (New York Times)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Is there a way to protect yourself from a cyber attack?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Update your software and operating system&lt;/li&gt;
&lt;li&gt;Use anti-virus software&lt;/li&gt;
&lt;li&gt;Use strong passwords&lt;/li&gt;
&lt;li&gt;don’t open email from unknown email addresses&lt;/li&gt;
&lt;li&gt;avoid risky clicks&lt;/li&gt;
&lt;li&gt;Avoid using unsecure WiFi networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today due to high rate of cyber attack, cybersecurity is one of the biggest need of the world as cybersecurity threats are very dangerous to the country’s security. Not only the government but also the citizens should spread awareness among the people to always update your system and network security settings and to the use proper anti-virus so that your system and network security settings stay virus and malware-free.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>computerscience</category>
      <category>security</category>
    </item>
  </channel>
</rss>
