<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vivi on Medium]]></title>
        <description><![CDATA[Stories by Vivi on Medium]]></description>
        <link>https://medium.com/@vivi_?source=rss-35171bf4ff9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Vivi on Medium</title>
            <link>https://medium.com/@vivi_?source=rss-35171bf4ff9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:55:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vivi_/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How we did our MERN stack project]]></title>
            <link>https://medium.com/@vivi_/mern-stack-3f5b14f11610?source=rss-35171bf4ff9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f5b14f11610</guid>
            <category><![CDATA[mern-stack-development]]></category>
            <category><![CDATA[academic-project]]></category>
            <category><![CDATA[group-projects]]></category>
            <dc:creator><![CDATA[Vivi]]></dc:creator>
            <pubDate>Sat, 21 May 2022 08:18:30 GMT</pubDate>
            <atom:updated>2022-05-21T14:33:35.072Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vdYmMgSAZgKDOc7SYi5DLg.png" /></figure><p>MERN stack is a familiar phrase for web developers. MongoDB, Express.js, React.js, and Node.js are the technologies that made the stack. Let’s look at what are these technologies.</p><h4>M — MongoDB</h4><p>MongoDB is a cross-platform document-oriented NoSQL database. Reasons for using MongoDB can be stated as follows;</p><ul><li>Use of JavaScript</li><li>Data stored in the JSON format (uses a binary version of JSON)</li><li>Scalability</li><li>Schema-free</li><li>Flexible Document model</li></ul><h4>E — Express</h4><p>Express is a backend Node.js Framework. It wraps HTTP requests and responses(mapping URLs to server-side functions is easier). It is easier and simpler to implement the backend with express because it supports lots of middleware. Reasons for using Express are as follows;</p><ul><li>Efficient and scalable</li><li>Code reusability</li><li>Robust API</li><li>Asynchronous and single-threaded</li><li>Having the biggest community for Node.js</li></ul><p>To install express, use <strong><em>npm install express </em></strong>after initializing the package.json file.</p><h4>R — React</h4><p>React is the frontend library used to build interactive user interfaces. It can handle rapidly changing data. Reasons for using React are:</p><ul><li>High performance</li><li>Use of components</li><li>Virtual DOM</li></ul><p>To create a react application, use <strong><em>npx create-react-app application_name. </em></strong>It will create react applications with needed dependencies. But to create a react app from scratch, you can use either “parcel” or “babel and webpack”.</p><h4>N — Node</h4><p>Node.js is the JavaScript runtime environment that allows users to run their code on the server. The main advantage is it provides users with a large number of free packages to download through Node Package Manager(npm). The reasons for using Node.js can be stated as follows;</p><ul><li>Open-source</li><li>Single threaded</li><li>Fast (since it is built on Google Chrome’s V8 JavaScript engine)</li><li>Scalable</li></ul><p>To initialize a Node.js application, use <strong><em>npm init</em></strong>.</p><p>MERN stack is ideal for JSON-heavy, cloud-native applications, and applications with dynamic web interfaces. You can use the MERN stack for web application development. It is popular among today’s web developers.</p><h4>Important facts about doing a group project using MERN</h4><p>This section is based on my personal experience…</p><p>Doing a MERN stack project takes considerable time. Planning the project is important. After you identified the functionalities expected from the system, the next step is to divide the work among members equally.</p><p>Before starting the implementation, you have to find a source control system like GitHub. It is easier for collaborations and integration. GitHub makes our work easier.</p><p>The first thing you have to do is create the project folder with the initial files and put it on GitHub. Inside the project folder, it is easier when there are two separate folders for frontend and backend. When you have the project folder in the GitHub repository with the main dependencies, you can start developing. But there is one thing to be considered. That is to create branches. Working on the main branch is not recommended because it will push the changes directly to the main branch and can cause errors. It is better if you use branches for each functionality you implement.</p><p>It is easy to start the implementations of the backend. Even without developing the frontend, you can check the APIs using “Postman”. When it comes to the database, proper communication among members and understanding of the whole system are important. Once you completed the backend implementation, start the frontend implementations. It is important to use the same version when using dependencies. Since initial files are created with the main dependencies as the first step it will not be an issue. But when installing new dependencies, try to use the same version as a group. It will minimize the conflicts that can occur.</p><p>Since GitHub is used from the beginning, all the development files are in the repository. But you have to be careful with the integration. It needs a proper discussion with members. If you can successfully integrate and complete the project, it will make you satisfied with your work :)</p><h4>Conclusion</h4><p>In this article, a small introduction to the MERN stack and the important facts to follow during doing a project are mentioned. Everything mentioned in the second part is based on a recent academic project. If you think there is something that needs to correct, let me know :)</p><p>This is not a complete guide for doing a MERN stack project. What I wanted to explain are some facts that I found important during this project based on my experience.</p><p>You need to have a good understanding of JavaScript and the technologies used. But most importantly for a group project, you need to communicate and discuss with other members. So, the technical knowledge is not enough, there should be a proper understanding among all the members to make the project a success :)</p><p><em>Learn MERN(MongoDB, Express, React, Node) and be MERN(Mindful, Exquisite</em><strong><em>, </em></strong><em>Reliable, Noble)!</em></p><p><em>Thank you!<br>See you again :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f5b14f11610" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Learn REST to Develop your Application Restfully]]></title>
            <link>https://medium.com/@vivi_/lets-learn-rest-to-develop-your-application-restfully-86e44bd7cece?source=rss-35171bf4ff9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/86e44bd7cece</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[restful-web-service]]></category>
            <dc:creator><![CDATA[Vivi]]></dc:creator>
            <pubDate>Thu, 12 May 2022 13:09:00 GMT</pubDate>
            <atom:updated>2024-06-14T05:22:30.449Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*wy167SaTAcmFdEYbQwul8w.jpeg" /></figure><p>Web services are essential in web development. Web services are defined as software packages that are used for communicating between two devices or web entities via the internet. The main two types of web services are SOAP (Simple Object Access Protocol) web services and REST(REpresentational State Transfer) web services.</p><p>SOAP is an XML-based protocol and the advantage of using is its security. It was used in the early days.</p><p>But the objective of this article is to give an introduction to REST which is more popular among developers because of its simplicity and scalability.</p><h4><strong>RESTful services</strong></h4><p>REST was first introduced in 2000 by Roy Fielding. REST is not a protocol or a standard. But it is an architectural style. REST uses JSON or XML to pass data. It provides data based on requests regardless of the device.</p><p>REST deals with the resources(resource-based) rather than actions. REST client access and modify the resources using the HTTP protocol. HTTP verbs are used to perform different operations on the same resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zY4tRXIY0OeStOTZOrdzzg.png" /><figcaption>HTTP verbs</figcaption></figure><p>Resources are identified by a URI(Uniform Resource Identifier). Multiple URIs may refer to the same resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJG8Oj2ao2zkXaPAaKsi3g.png" /></figure><p><strong><em>Why REST?</em></strong></p><ul><li>Lightweight</li><li>Scalable</li><li>Maintainable</li></ul><p><strong><em>6 constraints of REST Architecture</em></strong></p><ul><li>Uniform interface: <br>It suggests that anyone should be able to use APIs, irrespective of device or type of application. It uses Hypermedia as the Engine of Application State(HATEOAS). It needs to include links for retrieval of related resources.</li><li>Stateless: <br>There is no need of relying on previous requests. Requests are self-sufficient and session state will be kept on the client side.</li><li>Cacheable:<br>Resources returned from the server should be cashable. The client can cache resources and it is called Implicit caching. The server determines what to cache and how should be cached and it is called explicit caching.</li><li>Client-Server:<br>The server stands independent from the different user interfaces. To make the connection between the client and the server, URI is used. HTTP stack is the communication platform.</li><li>Layered System:<br>The client only knows the URI and does not see any underlying layers of complexity. The client deals with the abstraction of resource URI and verbs. It makes it highly scalable.</li><li>Code On Demand:<br>This is an optional constraint and not in use at the present. Simply the meaning is JavaScript is passed to the client to execute.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Z1i7e7qS8UkN5vhHeVQEuQ.png" /><figcaption>HTTP<a href="https://bytenbit.com/best-guidelines-design-restful-api/"> status codes</a></figcaption></figure><h4>Conclusion</h4><p>This article covers only the basics of REST services. Since it is easy to learn and implement, flexible, portable, and the points discussed under the constraints, it is popular among developers. Since it reduces the complexity, as a developer you can manage the resources easily. So it is worth learning RESTful services. Maybe you have already used it…</p><p><em>Learn REST and rest without stress…</em></p><p><em>Thank you!<br>See you again :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86e44bd7cece" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node.js is Everywhere]]></title>
            <link>https://medium.com/@vivi_/node-js-is-everywhere-6a15bbdfae2d?source=rss-35171bf4ff9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a15bbdfae2d</guid>
            <category><![CDATA[node-js-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Vivi]]></dc:creator>
            <pubDate>Wed, 11 May 2022 18:55:42 GMT</pubDate>
            <atom:updated>2024-06-14T05:23:26.905Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BustxVjWHixQLObQasftTA.png" /></figure><p>Node.js is an open-source, cross-platform, server-side runtime environment that is built on Chrome’s JavaScript engine (V8). It was written initially by Ryan Dahl in 2009. Node.js uses JavaScript and it can be run on various platforms.</p><h4>Features…</h4><ul><li>Node JS is lightweight and efficient because of the use of an event-driven, non-blocking I/O model. In other words, it is asynchronous. It’s not waiting for an API to return data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*C9CTAenmyfnIXTp0.jpg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdev.to%2F_staticvoid%2Fnode-js-under-the-hood-3-deep-dive-into-the-event-loop-135d&amp;psig=AOvVaw22k2lz4maZ6_Jvxz6SxA1D&amp;ust=1652337097808000&amp;source=images&amp;cd=vfe&amp;ved=0CAwQjRxqFwoTCOiStMnp1vcCFQAAAAAdAAAAABAT">Non-blocking event loop</a></figcaption></figure><ul><li>Even though Node.js is single-threaded, because of its non-blocking nature, it is scalable and can provide services to a larger number of requests.</li><li>Since it is built on Google Chrome’s V8 JavaScript engine, code execution is very fast.</li><li>Node.js is released under the MIT license.</li></ul><h4>Use Cases…</h4><ul><li>I/O bound applications</li><li>Data Streaming applications</li><li>Data-intensive real-time applications</li><li>JSON APIs based applications</li><li>Single page applications</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5wlhCO5DLs-Xhv57uVFPQ.png" /><figcaption><a href="https://trio.dev/blog/companies-use-node-js">Companies that use Node.js</a></figcaption></figure><p><strong>But Node.js is not the best platform for CPU-intensive heavy computational applications because of its single-threaded implementation</strong>. It may block the event loop from moving forward for a longer period.</p><h4>Advantages…</h4><ul><li>Faster processing (V8 engine compiles the JavaScript code into machine code directly and the use of Event based and non-blocking model)</li><li>Easy scalability (Both horizontally and vertically)</li><li>Supports common tools (such as unit testing tools)</li><li>Rich echo system — npm (larger number of reusable modules)</li><li>Single programming language for both server and client side</li><li>Increased performance via caching modules into memory after first use</li><li>Highly extensible (can customize and further extend as per requirements)</li></ul><h4>Disadvantages…</h4><ul><li>Not suitable for computationally intensive tasks</li><li>The actual number of robust libraries is comparatively low (users are forced to take the support of common libraries)</li><li>The complexity of the asynchronous programming model (compare to the synchronous model)</li></ul><h4>Node Package Manager (npm)</h4><p>Npm is a software Package manager and an installer. It is also the world’s largest open source library. Packages can be installed globally which will be available throughout the system or locally which will be available only for that particular application.</p><p>All the dependencies can be found in the ‘node_modules’ directory. ‘package.json’ contains all information related to the Node.js application (placed in the root directory of the application). It contains the name, version, author, repository, required node versions, scripts, dependencies, etc.</p><p>(There are two types of dependencies. They are Dev dependencies and dependencies. Dev dependencies are the packages a developer needs during development and are ignored during execution. Dependencies are required at runtime)</p><p>Node.js follows the CommomJS pattern when loading modules (<em>require</em> function). Every JavaScript file is considered a module. Required modules get loaded synchronously and will be cached after the first use. Because of that after the first call, <em>require()</em> invokes only the module cache instead of reading the file again.</p><p>There is a way that “<em>require” </em>finds the file. If the file does not start with “../”, “./” or “/”, then NodeJS will look at the dependency in the <em>node_modules </em>folder.</p><h4>Let’s create a simple Node application…</h4><ul><li>Download and install Node.js</li></ul><p>If you haven’t installed node.js yet, the first thing you have to do is download and install Node.js (You can download it from their official website <a href="https://nodejs.org/">https://nodejs.org/</a>).</p><ul><li>Create a directory where you wish to create the Node.js application and open it using any IDE you prefer(Visual Studio Code, WebStorm, etc)</li><li>Generate a package.json file by entering <strong><em>npm init </em></strong>or<strong><em> npm init -y </em></strong>in the terminal</li></ul><p>The second command will generate a package.json file without asking any questions. But keep in mind this step is not mandatory to run a simple Node.js application. But it will be needed in future developments. So it is better to get used to it :)</p><ul><li>Create a JavaScript file named first.js (you can use any name) and add the following code to the created file</li></ul><blockquote>const http = require(‘http’);</blockquote><blockquote>const port = 8000;</blockquote><blockquote>const server = http.createServer((req, res) =&gt; {<br> res.statusCode = 200;<br> res.setHeader(‘Content-Type’, ‘text/html’);<br> res.end(‘Hello World’);<br>});</blockquote><blockquote>server.listen(port, () =&gt; {<br> console.log(`Server running on port ${port}`);<br>});</blockquote><p>In the above code,<br><strong><em>HTTP</em></strong><em> </em>is a built-in module in Node.js. The reason for using it here is to transfer data over the Hyper Text Transfer Protocol (HTTP). <br><strong><em>createServer()</em></strong><em> </em>method is used to create the HTTP server.<br><strong>listen<em>()</em></strong> method is used to create a listener on the specified port or path.</p><ul><li>Save the first.js and file and enter <strong><em>node first.js</em></strong> in the terminal.</li><li>Open a browser and enter <a href="http://localhost:8000/">http://localhost:8000</a></li></ul><p>If you can see “<em>Hello World”</em> in the browser window, then yes, you have successfully created your first Node.js application.</p><p>But it is not the end…</p><p>Just change the hello world to your name and save the file. Then go to your browser and refresh the page. As you can see it is not updated. That’s because we have to stop and run the server again when we made a change. But there is a solution…</p><ul><li>Install nodemon</li></ul><p>Stop the running server and enter <strong><em>npm i nodemon. </em></strong>After the installation, go to the package.json file and under the scripts, add a start script as follows.</p><blockquote>“start”: “nodemon first.js”</blockquote><p>Then go back to the terminal and enter <strong><em>npm start </em></strong>instead of the previous command <em>node first.js.</em> Now you only need to refresh the browser after a change.</p><h4>Conclusion</h4><p>Even though Node.js created more than 10 years ago, still it’s popularity is being increased and it is widely used in developments. The aim of this article was to give an introduction to Node.js.</p><p>Since Node.js is still evolving, there is no ending for learning it.<br><em>Keep learning.. <br>Keep coding..</em></p><p><em>Thank you!<br>See you again :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a15bbdfae2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript, I’ll call back later]]></title>
            <link>https://medium.com/@vivi_/javascript-ill-callback-later-6e0de6c55311?source=rss-35171bf4ff9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e0de6c55311</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[version-control]]></category>
            <dc:creator><![CDATA[Vivi]]></dc:creator>
            <pubDate>Tue, 15 Mar 2022 11:25:12 GMT</pubDate>
            <atom:updated>2024-06-14T05:24:42.591Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVoUlMe20mRtdO5Ec5-44g.png" /></figure><h3>What is JavaScript? 🤔</h3><p>Simply, JavaScript (JS) is one of the most popular programming languages. Most importantly it is one of the core technologies of the World Wide Web (WWW). When it comes to web development, in addition to HTML and CSS, JavaScript is the 3rd language that a web developer must learn. While HTML defines the content and CSS specifies the layout, JavaScript is about programming the behavior.</p><p>JavaScript is an <strong>interpreted</strong>,<strong> single-threaded</strong>, <strong>dynamically typed</strong>, and <strong>multiparadigm</strong> programming language.</p><ul><li>Interpreted -&gt; If you are familiar with Java or C/C++, you know they are compiled-languages. Source code should be compiled and translated into bytecode to make it understandable for machines. But there is no need to compile JavaScript code. The browser will take care of running it by reading and interpreting each line.</li><li>Single-threaded -&gt; You may wonder why JavaScript is claimed as single-threaded. There is a main thread that executes the program. But it can hand over a part of the program to another thread and get the work done. But it does not mean that multiple threads work together.</li><li>Dynamically typed -&gt; There is no need for us to define the type of variables. It will be handled at the runtime.</li><li>Multi-paradigm -&gt; JavaScript not only supports Object-Oriented Programming (OOP) but also supports functional programming. Since it offers an OOP paradigm and functional programming paradigm, it is called a multi-paradigm programming language. (paradigms are a way to classify programming languages based on their features)</li></ul><p>But this article is not focused on everything about JavaScript. But we are going to look at JavaScript <strong>classes, objects, prototype, ‘this’ keyword, strict notation, function closure</strong>, and <strong>callbacks</strong> and <strong>promises</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NffFiG0r4inlo7BcTN2Fbg.png" /></figure><h4>Classes and Objects</h4><p>Class is a blueprint for creating objects. ECMAScript 2015, introduced JavaScript Classes (ECMAScript is the scripting language that forms the basis of JavaScript). There are several ways to create classes in JavaScript.</p><p><strong><em>I. Using constructor functions</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*ET0oYkjhDZNZsH477PIcCg.png" /><figcaption>Figure 1</figcaption></figure><p>JavaScript treats functions as objects. We can simply create a class as a function like in the above code. Since we are using the ‘new’ keyword when creating an object, this function acts as a class.</p><p><strong><em>II. Using object literals ( ‘{}’ )</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*sXEHnCvSuDf85OtBh5jkzA.png" /><figcaption>Figure 2</figcaption></figure><p>When we use object literal to create class in JavaScript we are creating objects out of another object. As in the above example, We first create an object called ‘employee’. Then we are creating another object called ‘manager’ using the previously created object ‘employee’.</p><p><strong><em>III. Using the ‘class’ keyword</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*lFEgUZIebokOMj3DN4SLsQ.png" /><figcaption>Figure 3</figcaption></figure><p>When we use the ‘class’ keyword for defining classes, we always add a constructor method. This way of creating classes in JavaScript is much similar to creating classes in Java. When we name a class, according to the naming conventions in JavaScript, it should always start with an uppercase letter.</p><h4>Prototype</h4><p>Each object in JavaScript contains a prototype. A prototype is also an object. Prototype object is used when creating objects, using inheritance, and adding methods to a JavaScript class. Prototype object is automatically added when a function is created. The function prototype is used to inherit properties to object instances. Object instances also have a prototype from which the object is being created. Object ‘__proto__’ is where an object gets its properties inherited from.</p><p><strong><em>Why do we need a prototype object? </em></strong><em><br></em>When we create an object in JavaScript, a new copy of the function is created. But using the prototype, all the objects can share the same function instead of creating a new copy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qETXLXfJTo6hl3TjKsKlNw.png" /><figcaption>Figure 4</figcaption></figure><p>In the above example, we see when we create objects, each method refers to a separate prototype object.</p><p>But with the usage of prototype, we can minimize this to a method in a prototype object as below. Instead of referring to separate new prototype objects, all the objects refers to the method in the prototype object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3YQcfvHvc7cJ8MwANbUew.png" /><figcaption>Figure 5</figcaption></figure><h4>Strict mode (<strong><em>“use strict”;</em></strong>)</h4><p>This is a literal expression. The purpose of using this is to make it easier to write secure codes. Simply it helps to write cleaner code and leads to errors when there are bad practices. As an example, variables must be declared. If not it causes errors. It also prevents referring to the window object as ‘this’ from outside object instances.</p><p>We can use this at the beginning of a script or a function. If we declare it at the beginning of a script, it has a global scope.</p><h4>‘this’ Keyword</h4><p>‘this’ Keyword refers to an Object. In JavaScript, ‘this’ acts differently according to where it is being used.</p><ul><li>In global context -&gt; global object (Normally in a browser it is the window object. But as we have mentioned previously, this behavior will get changed in strict mode)</li><li>In an object method -&gt; object (not the original object where the function was declared at first)</li><li>In a function -&gt; global object</li><li>In a function (in strict mode) -&gt; undefined</li></ul><h4>Function Closure</h4><p>This is a function that returns another function. The inner function has the access to the outer function variables, even after the outer function is closed. In other words, when we create an inner function, JavaScript creates an environment with all the local variables in the outer function. The combination of this environment and the inner function is called closure. It is like allowing a function to have private variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mv9f1bIl5I8KLdvluO1pjQ.png" /><figcaption>Figure 6</figcaption></figure><h4>Callbacks and Promises</h4><p>A callback is a function passed into another function as a parameter. The callback function runs after the completion of the outer function. Since JavaScript is asynchronous by nature, it is not always working according to the order we want. But using callback functions we can make sure that our tasks are completed in order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*TiKsHN_kiYxWZLVjy6b0dg.png" /><figcaption>Figure 7</figcaption></figure><p>In the above example, we get the sum as 30. That means it first executes the getSum method and then calls the printDetails method to give the desired output.</p><p>A promise is an object that is used to handle asynchronous operations. It encapsulates the result of an asynchronous operation. A promise is a pre-defined object in JavaScript. To create a promise object we have to use the Promise() constructor.</p><p>When we use callbacks, each callback takes an argument that is a result of the previous callbacks. So when we have to use nested callbacks, code becomes more complex (<em>‘callback hell’</em>). Promises solve this problem. It can handle complex asynchronous tasks easily and neatly.</p><p>Version Controlling and NoSQL are important for developers. So let’s quickly look at what are they :)</p><h3>Version Controlling</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*OSwu1SbwgC3ueaqakeQTGQ.png" /><figcaption>Figure 8</figcaption></figure><p>When we develop software or else when we doing some group projects it is really difficult to manage the project. Several members have to contribute and it is not easier to track the changes and merge all the source codes of members. On the other hand, when we are doing a project we have lots of files that contain different versions of our work. It is really hard to maintain.</p><p>So the solution is Version Controlling. Using a version control system, we can keep track of our projects. We can manage the changes to a source. Every change is identified by a revision number. Revisions can be restored, compared, and merged. It has the records of timestamp and the contributor. As you can see version controlling solves lots of problems in a life of a developer as well as in organizations. Other advantages are having the centralized source code repository, access control, overview of changes, and resolving conflict.</p><p>The most famous version controlling system is Git. There is GitHub and GitLab as version controlling software tools.</p><h3>NoSQL</h3><p>Some people call them ‘not only SQL’. These are non-relational, schema-free databases. They are horizontally scalable and most of the time open source. The main types of NoSQL databases are document, key-value, wide-column, and graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*QOb196VZv8BcrjbBmkf9mg.jpeg" /><figcaption>Figure 9</figcaption></figure><p><strong><em>What is the CAP theorem?</em></strong></p><p>CAP theorem is important to understand the limitations of NoSQL databases. It states that we can achieve at most two guarantees for a database. (The guarantees are Consistency, Availability, and Partition Tolerance)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bWIArDoEetu50L58SJrtyg.png" /><figcaption>Figure 10</figcaption></figure><h3>Conclusion</h3><p>It can be said that as a developer it is a must to know JavaScript. Because it plays an important role in web development. But it is difficult to cover everything about JavaScript here. This article is only focused on the topics that I have recently gone through.</p><p>Version controlling and NoSQL databases are also important for a developer. So here I just gave an introduction about them even though most of you surely know about these things.</p><p>Like JavaScript, don’t be afraid to become a newer version of yourself…<br>Like MongoDB, don’t be restricted to schemas…<br>But, Like GitHub, make sure to keep track of everything…</p><p><em>Thank you!<br>See you again :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e0de6c55311" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software engineering principles and best practices you should follow as a good developer]]></title>
            <link>https://medium.com/@vivi_/software-engineering-principles-and-best-practices-you-should-follow-as-a-good-developer-9f54d5ff00ce?source=rss-35171bf4ff9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f54d5ff00ce</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[principles]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Vivi]]></dc:creator>
            <pubDate>Fri, 25 Feb 2022 12:12:26 GMT</pubDate>
            <atom:updated>2022-02-25T17:58:49.509Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Software engineering principles" src="https://cdn-images-1.medium.com/max/1024/1*EdOSHHFrF54TFkXporAU8w.png" /></figure><h4>1. S.O.L.I.D.</h4><p>SOLID principles are five key object-oriented design concepts relevant to software development. They were developed by Robert C. Martin, but the acronym was introduced later by Michael Feathers.</p><figure><img alt="SOLID principles" src="https://cdn-images-1.medium.com/max/1024/1*Gyg0J7Neb0IaqOR9fgQsZA.png" /><figcaption>Image 1</figcaption></figure><p><strong>Single responsibility:</strong></p><figure><img alt="Single Responsibility" src="https://cdn-images-1.medium.com/max/750/1*n3B809vtRzXVetxA4Ur2Lw.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fthedavidmasters.com%2F2018%2F10%2F27%2Fsolid-design-principles%2F&amp;psig=AOvVaw3WeUb6iMYIMxn6v7ybr28W&amp;ust=1645862044248000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCOC49tawmvYCFQAAAAAdAAAAABAK">Image 2</a></figcaption></figure><blockquote>“A class should have one and only one reason to change, meaning that a class should have only one job”</blockquote><p>This means a class should have only one responsibility. You may ask what can we do when there are several responsibilities. The answer is we can use separate classes for each responsibility.</p><p><strong>Open-closed:</strong></p><figure><img alt="Open-closed" src="https://cdn-images-1.medium.com/max/880/1*sZt3CvVVYLfsuIXIX1yOBA.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fres.cloudinary.com%2Fpracticaldev%2Fimage%2Ffetch%2Fs--XI1FFTvi--%2Fc_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_880%2Fhttp%3A%2F%2Fd33wubrfki0l68.cloudfront.net%2Fd1820d6c153e116bb211cc3e4499de8a8a40cf8e%2Fb43f4%2Fassets%2Fimages%2Fopen_closed_1.png&amp;imgrefurl=https%3A%2F%2Fdev.to%2Fsatansdeer%2Fopenclosed-principle-86a&amp;tbnid=Z8cVqt21-KtWcM&amp;vet=12ahUKEwjr-uTQsZr2AhUqRmwGHRoGDYUQMygEegUIARDKAQ..i&amp;docid=YcZS7mcgZ1wyVM&amp;w=880&amp;h=252&amp;q=open%20closed%20principle&amp;ved=2ahUKEwjr-uTQsZr2AhUqRmwGHRoGDYUQMygEegUIARDKAQ">Image 3</a></figcaption></figure><blockquote>“Objects or entities should be open for extension, but closed for modification”</blockquote><p>We need to modify the existing classes when something needs to be added. But we cannot change the existing classes as we want, because it can lead to problems. So, objects or entities should be able to add additional features without changing the existing classes. For that, we can use abstraction.</p><p><strong>Liskov substitution:</strong></p><figure><img alt="Liskov substitution" src="https://cdn-images-1.medium.com/max/1000/1*qXqzbTs4WGvKK-HQiePUxQ.jpeg" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fexternal-preview.redd.it%2F7Sv5n11cvgzlSt1nYOyzrm7jKFCfY93ALcb_xOLgqR4.jpg%3Fauto%3Dwebp%26s%3D1b39998d06f99ddb2893fb5689ac1f63a75e67ff&amp;imgrefurl=https%3A%2F%2Fwww.reddit.com%2Fr%2Fcsharp%2Fcomments%2Fcgpmj0%2Fsolid_design_the_liskov_substitution_principle_lsp%2F&amp;tbnid=qM8UEU3Blvdm6M&amp;vet=12ahUKEwjbhq7osZr2AhWNNLcAHWYqDxEQMygCegUIARCZAQ..i&amp;docid=w2uu9u0DCDCJrM&amp;w=1000&amp;h=616&amp;q=Liskov%20substitution%20principle%20meme&amp;ved=2ahUKEwjbhq7osZr2AhWNNLcAHWYqDxEQMygCegUIARCZAQ">Image 4</a></figcaption></figure><blockquote>“Every subclass/derived class should be able to substitute their parent/base class”</blockquote><p>This means a child class should not give any different meaning to the methods existing in the base class after overriding them. So we have to ensure that derived classes extend the base class without changing the behavior.</p><p><strong>Interface segregation:</strong></p><figure><img alt="Interface segregation" src="https://cdn-images-1.medium.com/max/750/1*tmOn70Zx5C4DexYr5Pldyw.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.topjavatutorial.com%2Fdesign-pattern%2Finterface-segregation-principle%2F&amp;psig=AOvVaw3aNAzyI6ATwBUqgxdkrW-i&amp;ust=1645862606450000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCKjV-JKymvYCFQAAAAAdAAAAABAD">Image 5</a></figcaption></figure><blockquote>“Clients should not be forced to implement methods they do not use”</blockquote><p>This means that no code should be forced to depend on methods it does not use. To achieve that, we can have several small interfaces as needed, rather than using one large interface. So, when we need it, we can let our class implement several interfaces according to the need.</p><p><strong>Dependency inversion:</strong></p><figure><img alt="Dependency inversion" src="https://cdn-images-1.medium.com/max/750/1*w80qzPVbTdXCNGAUnWeEtA.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fmedium.com%2F%40budiprad%2Fa-short-brief-on-the-dependency-inversion-principle-9e07e0db8d9b&amp;psig=AOvVaw00_AFr25zx2zsegNBqOwat&amp;ust=1645862580271000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCNDlq4iymvYCFQAAAAAdAAAAABAD">Image 6</a></figcaption></figure><blockquote>“Higher-level modules should not depend on lower-level modules, but they should depend on abstractions”</blockquote><p>This is about the coupling between different classes or modules. That means developers have to depend on abstract classes and interfaces instead of concrete classes. The abstractions should not depend on details. Details should depend on abstractions.</p><p>We are always trying to find a technical solution for a real-life business problem. The following principles are for <strong>Approaching the solution</strong>.</p><h4>2. Think throughout the problem:</h4><figure><img alt="Think throughout the problem" src="https://cdn-images-1.medium.com/max/1024/1*RE1oVobQCj8Eqkn0Of0WYQ.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fresultslab.com%2Fasking-better-questions%2F&amp;psig=AOvVaw1Mhfh5LLej9Fw0You9wxyo&amp;ust=1645862776032000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCJCr5uOymvYCFQAAAAAdAAAAABAD">Image 7</a></figcaption></figure><p>Understanding the problem clearly and completely is important. It is better to ask questions when you cannot understand something, rather than keep quiet. This is a key point to find the most suitable solution.</p><h4>3. Divide and conquer:</h4><figure><img alt="Divide &amp; Conquer" src="https://cdn-images-1.medium.com/max/855/1*IlQTQI9awJ86uPB-YflEnw.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fdivide-and-conquer-approach-to-quality-assurance%2F&amp;psig=AOvVaw2P_qAJBljsuXjDjf4xr3WB&amp;ust=1645862806853000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCPjagvKymvYCFQAAAAAdAAAAABAD">Image 8</a></figcaption></figure><p>Rather than solving a large problem, we have to understand the sub-problems. Approaching the solution by solving sub-problems makes the work more manageable, efficient, and understandable.</p><h4>4. KISS (Keep It Simple and Stupid):</h4><figure><img alt="KISS" src="https://cdn-images-1.medium.com/max/800/1*8MphHIGe8kRxLijU1UTzJw.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fblog.planview.com%2Fimportance-kiss-principle-project-management%2F&amp;psig=AOvVaw0Ej1BTT7n6wM8kxUdIOw-g&amp;ust=1645862838773000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCNDvh4KzmvYCFQAAAAAdAAAAABAK">Image 9</a></figcaption></figure><p>Sometimes we overthink the problem and come up with a complex solution. But we should avoid over-thinking as well as over-engineering. It will only make it unclear and difficult to manage.</p><h4>5. Learn from mistakes:</h4><figure><img alt="Learn from mistakes" src="https://cdn-images-1.medium.com/max/1024/1*g3R-6mlOBfhvd5M7n_3kGg.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fsexandrelationshiphealing.com%2Fblog%2Fwounded-healers-learning-from-our-mistakes%2F&amp;psig=AOvVaw3aL3gR4BYDXEPZvTfrOBjO&amp;ust=1645862915502000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCIDg7rOzmvYCFQAAAAAdAAAAABAO">Image 10</a></figcaption></figure><p>Anticipate the changes as much as possible. Learn from mistakes and prevent from doing the same mistake again. When you are trying, we can make mistakes. But, making mistakes is the best way to learn.</p><h4>6. Always remember why software exists:</h4><figure><img alt="Always remember why software exists" src="https://cdn-images-1.medium.com/max/880/1*HHvAmmiKnN1EKLJYTF20WQ.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fblog.capterra.com%2Fwp-content%2Fuploads%2F2015%2F08%2FCAP_Header_The-Wrong-Software-Is-Worse-Than-No-Software-Tips-for-Choosing-Well-withouttext-880-440.png&amp;imgrefurl=https%3A%2F%2Fblog.capterra.com%2Fthe-wrong-software-is-worse-than-no-software-tips-for-choosing-well%2F&amp;tbnid=6RfB9QBC3wD2oM&amp;vet=12ahUKEwjsoMWDtJr2AhVXHbcAHRXuBaYQMygFegQIARAk..i&amp;docid=9dLFY0yuXXcgaM&amp;w=880&amp;h=440&amp;q=Always%20remember%20why%20software%C2%A0exists&amp;ved=2ahUKEwjsoMWDtJr2AhVXHbcAHRXuBaYQMygFegQIARAk">Image 11</a></figcaption></figure><p>Always keep in mind the actual reason for the developing software to exist. It will prevent you from following the wrong path.</p><h4>7. Remember that you are not the user:</h4><figure><img alt="Remember that you are not the user" src="https://cdn-images-1.medium.com/max/490/1*0D4lY0q2Y42BVZssSlIyMQ.png" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fwww.wikibit.it%2Fwp-content%2Fuploads%2F2017%2F04%2Fcosa-significa-user-friendly.jpg&amp;imgrefurl=https%3A%2F%2Fwww.wikibit.it%2Fu%2Fcosa-significa-user-friendly-1844%2F&amp;tbnid=GyL23qLYAaFPhM&amp;vet=10CAUQxiAoA2oXChMIqM-mqLSa9gIVAAAAAB0AAAAAEAg..i&amp;docid=Xiqb9uYxFDI23M&amp;w=445&amp;h=310&amp;itg=1&amp;q=user%20friendliness&amp;ved=0CAUQxiAoA2oXChMIqM-mqLSa9gIVAAAAAB0AAAAAEAg">Image 12</a></figcaption></figure><p>Developers are not the real users of the product. We have to remember it always. The end-users may not be capable as the developer. So the user-friendliness and user experience are important.</p><p><strong>Software implementation</strong> is the process of integrating an application into an organization’s workflow. When we implement the designed solution we have to keep in mind the following guidelines.</p><h4>8. YAGNI (You Ain’t Gonna Need It):</h4><figure><img alt="YAGNI" src="https://cdn-images-1.medium.com/max/1000/0*-xBoMbQj-B5JQ70H.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fbetterprogramming.pub%2Fyagni-you-aint-gonna-need-it-f9a178cd8e1&amp;psig=AOvVaw1zQ2rD7WLwqshmPTlwrXbp&amp;ust=1645863359860000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCPiqvoe1mvYCFQAAAAAdAAAAABAU">Image 13</a></figcaption></figure><p>It is not a good practice to write complex codes when we can approach the solution by writing a simple code. There’s no need for adding additional codes just because we think that it will be useful in the future. It may be useful or not. But since we cannot predict the future it is better not to waste time. So, it is better to write codes that are needed for the moment, not for the future.</p><h4>9. DRY (Don’t Repeat Yourself):</h4><figure><img alt="DRY" src="https://cdn-images-1.medium.com/max/657/1*72QaKZUP9cmJlr6pejVuYQ.gif" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fhackernoon.com%2Fimages%2F1*ltRksgd76i9FGLlMNMvmMw.gif&amp;imgrefurl=https%3A%2F%2Fhackernoon.com%2Fthis-is-not-the-dry-you-are-looking-for-a316ed3f445f&amp;tbnid=nDpbPQYLzxcPGM&amp;vet=12ahUKEwjvzPfBtZr2AhWNX2wGHVcZBScQMygCegUIARC7AQ..i&amp;docid=KMs7utjh_5E1AM&amp;w=657&amp;h=352&amp;q=dry%20principle&amp;ved=2ahUKEwjvzPfBtZr2AhWNX2wGHVcZBScQMygCegUIARC7AQ">Image 14</a></figcaption></figure><p>Reuse codes when it is possible rather than repeating the same code again and again. It will make your work more efficient.</p><h4>10. Embrace abstraction:</h4><figure><img alt="Embrace abstraction" src="https://cdn-images-1.medium.com/max/780/1*sUXRk7Feed7Qpu2u8cBqQg.jpeg" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fthevaluable.dev%2Fimages%2F2019%2Fabstraction%2Fimperfect-abstraction.jpg&amp;imgrefurl=https%3A%2F%2Fthevaluable.dev%2Fabstraction-type-software-example%2F&amp;tbnid=MxTgBFSOWxfdiM&amp;vet=12ahUKEwjw7fzPtZr2AhX5gGMGHUhhBQ4QMyg9egQIARBf..i&amp;docid=j0V26GYq4wV9gM&amp;w=780&amp;h=520&amp;q=abstraction%20in%20software%20engineering&amp;ved=2ahUKEwjw7fzPtZr2AhX5gGMGHUhhBQ4QMyg9egQIARBf">Image 15</a></figcaption></figure><p>System functions should work without knowing the implementation details of every part. There’s no need for users to know how the system works. But the system should be able to provide the service they expected without any problem.</p><h4>12. DRITW (Don’t Re-Invent The Wheel):</h4><figure><img alt="DRITW" src="https://cdn-images-1.medium.com/max/1024/1*FPtL25g6XXpQLY3Zf_LjPg.jpeg" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fmiro.medium.com%2Fmax%2F1200%2F1*lpxKjH6iJtqrYZgNE5oXIw.jpeg&amp;imgrefurl=https%3A%2F%2Flevelup.gitconnected.com%2Fsoftware-engineering-best-practices-for-reusing-in-software-development-6006f9d8d364&amp;tbnid=flhmpAWWQ5Jf-M&amp;vet=12ahUKEwiot9Crtpr2AhUxitgFHZwwAoEQMyhJegQIARBm..i&amp;docid=-KT9hZXbpQo08M&amp;w=1200&amp;h=600&amp;q=Don%27t%20Re-Invent%20The%C2%A0Wheel&amp;hl=en&amp;ved=2ahUKEwiot9Crtpr2AhUxitgFHZwwAoEQMyhJegQIARBm">Image 16</a></figcaption></figure><p>Maybe the problem you are currently solving has already been solved by another person. When there is a solution for the same problem exists, use it. Because those are tested solutions and there’s no need for doing it again. But we can make the already existing ones better.</p><h4>13. Write code that does one thing well:</h4><figure><img alt="Write code that does one thing well" src="https://cdn-images-1.medium.com/max/1024/1*2keiFK3TiHryE0ekJn-6ew.jpeg" /><figcaption><a href="https://www.google.com/imgres?imgurl=https%3A%2F%2Fquotefancy.com%2Fmedia%2Fwallpaper%2F3840x2160%2F491354-Steve-Jobs-Quote-Do-not-try-to-do-everything-Do-one-thing-well.jpg&amp;imgrefurl=https%3A%2F%2Fquotefancy.com%2Fquote%2F911448%2FSteve-Jobs-Do-not-try-to-do-everything-Do-one-thing-well&amp;tbnid=_1vzWnEKc4gPgM&amp;vet=12ahUKEwivvou6tpr2AhWD_zgGHXlXDeYQMygBegUIARCqAQ..i&amp;docid=ObkeJVW1RI03pM&amp;w=3840&amp;h=2160&amp;q=do%20one%20thing%C2%A0well&amp;hl=en&amp;ved=2ahUKEwivvou6tpr2AhWD_zgGHXlXDeYQMygBegUIARCqAQ">Image 17</a></figcaption></figure><p>Do not try to write codes do a lot of work at once. Write codes that can do one work well.</p><h4>14. Debugging is harder than writing code:</h4><figure><img alt="Debugging is harder than writing code" src="https://cdn-images-1.medium.com/max/1024/1*wWh2RkexL4pJKdeWAIlGkw.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fstackoverflow.blog%2F2021%2F12%2F23%2Fbest-practices-for-writing-code-comments%2F&amp;psig=AOvVaw3aiTH3wZLnT1I2IXVajcFT&amp;ust=1645863886553000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCOjwivS2mvYCFQAAAAAdAAAAABAD">Image 18</a></figcaption></figure><p>Make the code readable as much as possible. It will help you to handle the errors easily. It should be understandable for others. It will be important for maintenance as well.</p><h4>15. Kaizen (Leave it better than when you found it):</h4><figure><img alt="Kaizen" src="https://cdn-images-1.medium.com/max/1024/1*bkeM0y7OtXwyJB6OYE6KvA.jpeg" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fleansmarts.com%2Flean-101%2Fkaizen%2F&amp;psig=AOvVaw1nnzBJoDhjpoSAePogc6oO&amp;ust=1645863909023000&amp;source=images&amp;cd=vfe&amp;ved=0CAsQjRxqFwoTCJiL3P62mvYCFQAAAAAdAAAAABAJ">Image 19</a></figcaption></figure><p>When we found a bug we want it to be fixed as soon as possible. But we should not fix a bug just to make the code runnable. We have to leave the code better by fixing the bug correctly and completely. It will help to avoid extra problems.</p><p><strong>Practices</strong> are norms or a set of guidelines that we should follow when developing software. Followings are being considered as best practices for software engineering.</p><h4>Unit testing:</h4><p>By doing unit testing we can identify issues early. This is a verification mechanism for developers.</p><h4>Code Quality:</h4><p>The code you write should be readable and understandable. It should adhere to engineering best practices, and language and domain practices.</p><h4>Code review:</h4><p>Reviewing the code to improve the code. There are several methods for doing the code review. Peer review, lead review, and pair programming can be considered as examples.</p><h4>Version controlling:</h4><p>This allows the developers to change and improve the code freely without being afraid of breaking the code. It allows multiple developers to collaborate on the same code base as well.</p><h4>Continuous integration:</h4><p>Developers need to check-in the code to a shared repository several times a day. This allows the developers to detect issues early and fix them without a delay.</p><h3>Conclusion</h3><p>There are many principles and best practices when it comes to software engineering. They will ensure the reliability and quality of a software product. We have discussed some of them.</p><p>What we have to keep in mind is these are not to rule the developer, but to make better developers as well as better developments. As developers, following these will make everything efficient, manageable, clear, and understandable. They will reduce the problems that can occur in the future.</p><p>Embrace the principles…<br>Embrace the best practices…<br>Follow them and be a good developer…</p><p><em>Thank you! <br>See you again :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f54d5ff00ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>