<?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: Nahid Hasan</title>
    <description>The latest articles on DEV Community by Nahid Hasan (@nahidmbstu).</description>
    <link>https://dev.to/nahidmbstu</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%2F157435%2Fc291132a-9739-44d4-972c-a2037af8a1be.jpeg</url>
      <title>DEV Community: Nahid Hasan</title>
      <link>https://dev.to/nahidmbstu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nahidmbstu"/>
    <language>en</language>
    <item>
      <title>Extra facebook bloatware that stays even after uninstall.</title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Thu, 01 Sep 2022 08:51:42 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/extra-facebook-bloatware-that-stays-even-after-uninstall-dpk</link>
      <guid>https://dev.to/nahidmbstu/extra-facebook-bloatware-that-stays-even-after-uninstall-dpk</guid>
      <description>&lt;p&gt;I installed facebook to watch some live event. after that, i uninstalled the app.few days after i was watching youtube ads related the that event.   &lt;/p&gt;

&lt;p&gt;after little searching i found there are hidden java packages still install in my phone. &lt;/p&gt;

&lt;p&gt;There extra bloatware exits even after uninstall &lt;/p&gt;

&lt;p&gt;&lt;code&gt;package:com.facebook.system&lt;br&gt;
 package:com.facebook.services&lt;br&gt;
 package:com.facebook.appmanager&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;you can uninstall them by these commands&lt;/p&gt;

&lt;p&gt;&lt;code&gt;adb shell pm list packages&lt;br&gt;
 adb uninstall --user 0 &amp;lt;pkg_name&amp;gt;&lt;/code&gt;&lt;/p&gt;

</description>
      <category>bloatware</category>
    </item>
    <item>
      <title>Real Story : Developers are blaming each other for a fault . </title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Tue, 16 Mar 2021 09:52:07 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/real-story-developers-are-blaming-each-other-for-a-fault-l2m</link>
      <guid>https://dev.to/nahidmbstu/real-story-developers-are-blaming-each-other-for-a-fault-l2m</guid>
      <description>&lt;p&gt;Recently I experienced such incident , in my work place , one Android app developer is being blamed for app crush by backend developer to the HR/Managers . &lt;/p&gt;

&lt;p&gt;The Real real reason was like this from neutral point , the app developer handled the api like the doc given to him earlier. in the mean time , the backend changed.  but app developer didn't know any of that changes. he did not handle every thing properly.&lt;br&gt;
Backend developer didn't keep track with the app dev. &lt;/p&gt;

&lt;p&gt;When the judgement app was tested , it crushed in front of managers and suddenly everyone was angry. &lt;/p&gt;

&lt;p&gt;Backend developer started to blame the app developer , so does the app developer. Many things happened afterwards. Manager joined other ventures. The two dev can't see each other , but working in same company because of partially covid reasons.&lt;/p&gt;

&lt;p&gt;The Project eventually failed after working for about 1 year.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JS : Do we need Library for simple date formatting? What can you Do ...</title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Tue, 16 Mar 2021 03:20:59 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/js-do-we-need-library-for-simple-date-formatting-what-can-you-do-2fd3</link>
      <guid>https://dev.to/nahidmbstu/js-do-we-need-library-for-simple-date-formatting-what-can-you-do-2fd3</guid>
      <description>&lt;p&gt;We regularly use a date formatting library like moment.js  date-fns in our project. I often i see that , i &lt;br&gt;
use it for simple date formatting. &lt;/p&gt;

&lt;p&gt;But there is no need to use any library to format date in JavaScript. &lt;/p&gt;

&lt;p&gt;Like , for  this, 15 - 2 - 2021  you can use &lt;/p&gt;

&lt;p&gt;&lt;code&gt;{ new Date(time).getDate() + ' / ' + parseInt(new &lt;br&gt;
   Date(time).getMonth() + 1) + ' / ' +&lt;br&gt;
   new Date(time).getFullYear()&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For Am, Pm , like 9 am,  You can use this ,&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{ new Date().toLocaleString('en-US', { hour: 'numeric', hour12: true }) } &lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Also what more you can do is, you can make a tiny npm package and share it in your team. &lt;/p&gt;

&lt;p&gt;Thank for reading, have a nice day.&lt;/p&gt;

</description>
      <category>date</category>
      <category>javascript</category>
      <category>formating</category>
    </item>
    <item>
      <title>ডকার বিগেইনার্স গাইড।  Docker Beginners Guide In Bengla. Run an API Service with Database and Redis. Youtube series - </title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Wed, 27 Jan 2021 07:21:43 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/docker-beginners-guide-in-bengla-run-an-api-service-with-database-and-redis-youtube-series-18a5</link>
      <guid>https://dev.to/nahidmbstu/docker-beginners-guide-in-bengla-run-an-api-service-with-database-and-redis-youtube-series-18a5</guid>
      <description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=P-BwzLXUIVA"&gt;https://www.youtube.com/watch?v=P-BwzLXUIVA&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=k3p4dDeAEks&amp;amp;ab_channel=NahidHasan"&gt;https://www.youtube.com/watch?v=k3p4dDeAEks&amp;amp;ab_channel=NahidHasan&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Linux Command line utilities i use almost everyday, why they are useful</title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Sun, 18 Oct 2020 16:01:20 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/linux-command-line-utilities-i-use-almost-everyday-why-they-are-useful-phl</link>
      <guid>https://dev.to/nahidmbstu/linux-command-line-utilities-i-use-almost-everyday-why-they-are-useful-phl</guid>
      <description>&lt;p&gt;pwd – current working directory .&lt;/p&gt;

&lt;p&gt;ls – list all the folders in current working directory .&lt;/p&gt;

&lt;p&gt;cd /dir_path – Go to certain directory .&lt;/p&gt;

&lt;p&gt;cp rm mv – copy , remove and move files&lt;/p&gt;

&lt;p&gt;mkdir dir_name – make a folder in current working directory .&lt;/p&gt;

&lt;p&gt;chmod -options read_write_execute dir_path – set the mode (permissions) for current directory.&lt;/p&gt;

&lt;p&gt;sudo username – select certain user configuration.&lt;/p&gt;

&lt;p&gt;df – disk uses .&lt;/p&gt;

&lt;p&gt;top – CPU and memory uses .&lt;/p&gt;

&lt;p&gt;curl or wget url – http request in terminal&lt;/p&gt;

&lt;p&gt;nano – terminal code editor&lt;/p&gt;

&lt;p&gt;tar or unzip – unzip compressed file&lt;/p&gt;

&lt;p&gt;ssh – remote login to computer&lt;/p&gt;

&lt;p&gt;export – set up environment variables .&lt;/p&gt;

&lt;p&gt;ufw – firewall for server&lt;/p&gt;

&lt;p&gt;kill – kill a running process.&lt;/p&gt;

&lt;p&gt;ifconfig – network utility .&lt;/p&gt;

&lt;p&gt;So far that’s it , i will try to add more .&lt;/p&gt;

</description>
      <category>linux</category>
      <category>commandline</category>
    </item>
    <item>
      <title>Five Cool Ways to Iterate over JavaScript String </title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Wed, 23 Sep 2020 11:18:31 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/five-cool-ways-to-iterate-over-javascript-string-3kdl</link>
      <guid>https://dev.to/nahidmbstu/five-cool-ways-to-iterate-over-javascript-string-3kdl</guid>
      <description>&lt;p&gt;First &lt;/p&gt;

&lt;p&gt;Using Array.from() method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let hello =  "World"

// first

Array.from(hello).map(i =&amp;gt; console.log(i))

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



&lt;p&gt;second&lt;/p&gt;

&lt;p&gt;using for ...of loop&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// second

for (let char of hello){
  console.log(char)
} 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;third&lt;/p&gt;

&lt;p&gt;using built in split() method in String()&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// third

hello.split("").forEach(i =&amp;gt; console.log(i))

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



&lt;p&gt;fourth &lt;/p&gt;

&lt;p&gt;ancient for loop&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// fourth

for (let i = 0; i &amp;lt; hello.length ; i++) {
  console.log(hello[i])
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;//  five &lt;/p&gt;

&lt;p&gt;using fancy generator function and for ... loop&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//  five advance 

function* iter(str) {
    let i = 0
    while(i &amp;lt; str.length) {
       yield str[i];
       i++
    }
}

for (let char of iter(hello)){
  console.log(char)
} 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let Me Know Others . Thanks&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>string</category>
    </item>
    <item>
      <title>How do you keep up With fellow developers who are always bragging about themselves ?</title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Sun, 01 Mar 2020 07:33:53 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/how-do-you-keep-up-with-fellow-developer-who-are-always-bragging-about-themselves-33fe</link>
      <guid>https://dev.to/nahidmbstu/how-do-you-keep-up-with-fellow-developer-who-are-always-bragging-about-themselves-33fe</guid>
      <description>&lt;p&gt;There are people who are always bragging about they know everything in software development in workplace. they try to picture themselves as perfect in front of everyone.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Practical example of JavaScript class and Object By making a todo list app </title>
      <dc:creator>Nahid Hasan</dc:creator>
      <pubDate>Tue, 25 Feb 2020 08:31:20 +0000</pubDate>
      <link>https://dev.to/nahidmbstu/practical-use-example-javascript-class-and-object-to-make-a-todo-list-app-3bi7</link>
      <guid>https://dev.to/nahidmbstu/practical-use-example-javascript-class-and-object-to-make-a-todo-list-app-3bi7</guid>
      <description>&lt;h1&gt;
  
  
  First we need to know the basics of class in Javascript
&lt;/h1&gt;

&lt;p&gt;From MDN ,&lt;/p&gt;

&lt;p&gt;Javascript class are primarily syntactical sugar over JavaScript's existing prototype-based inheritance.&lt;/p&gt;

&lt;p&gt;Class declarations&lt;/p&gt;

&lt;p&gt;To declare a class, you use the class keyword with the name of the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Rectangle {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Class Expression is another way&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let Rectangle = class {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  important thing to remember
&lt;/h1&gt;

&lt;p&gt;The body of a class is executed in strict mode.&lt;/p&gt;

&lt;p&gt;two types of methods&lt;/p&gt;

&lt;p&gt;1 . Prototype methods&lt;/p&gt;

&lt;p&gt;class methods&lt;/p&gt;

&lt;p&gt;2 . Static methods&lt;/p&gt;

&lt;p&gt;static method has no this . this used for creating utility functions&lt;/p&gt;

&lt;p&gt;Private field declarations&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Rectangle {
  #height = 0;
  #width;
  constructor(height, width) {
    this.#height = height;
    this.#width = width;
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The extends keyword&lt;/p&gt;

&lt;p&gt;The extends keyword is used in class declarations or class expressions to create a class as a child of another class.&lt;/p&gt;

&lt;p&gt;The super Keyword is used to access parents properties&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Animal {
  constructor(name) {
    this.name = name;
  }

  speak() {
    console.log(`${this.name} makes a noise.`);
  }
}

class Dog extends Animal {
  constructor(name) {
    super(name); // call the super class constructor and pass in the name parameter
  }

  speak() {
    console.log(`${this.name} barks.`);
  }
}

let d = new Dog('Mitzie');
d.speak(); // Mitzie barks.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Setter and Getter Methods&lt;/p&gt;

&lt;p&gt;get and set keywords before function actually binds an object property to a function that will be called when that property is looked up.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Rectangle {
  constructor(height, width) {
    this.height = height;
    this.width = width;
  }

  get Area() {
      return  this.height * this.width
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Now the Practical example . We create a MakeTodoList Class
&lt;/h1&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MakeTodoList {
  constructor(list) {
    this.todoList = list;
    this.todos = [];
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we also add some utility fuction as static method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  static addtoList(text) {
    let list = document.getElementById("todo-list");
    var li = document.createElement("li");
    li.textContent = text;
    list.appendChild(li);
    return li;
  }

  static removeFromList(text) {
    let list = document.getElementById("todo-list");
    let childs = Array.from(list.childNodes);
    let item = childs.find(i =&amp;gt; i.innerText === text);
    return item;
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we add two property methods to add and delete todo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  addTodo(text) {
    this.todos.push(text);
    this.todoList.appendChild(MakeTodoList.addtoList(text));
  }

  removeTodo(text) {
    let filter = this.todos.filter(i =&amp;gt; i !== text);
    this.todoList.removeChild(MakeTodoList.removeFromList(text));
    this.todos = filter;
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we set some dummy data to list using the setter method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  set DummyData(value) {
    this.todos = value;
    this.todos.map(i =&amp;gt; MakeTodoList.addtoList(i));
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we can observe the current items by getter method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  get getList() {
    return this.todos;
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we have created our class but how to use this class ? Ok . First we need a object of this class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    let listEle = new MakeTodoList(list);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;we set the dummy data using setter method and set the data using getter method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    listEle.DummyData = ["Play FootBall", "Do Homework"]; // setter method for Dummy Data
    console.log("current  ...........", listEle.getList); //   getter method
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  now the main part
&lt;/h1&gt;

&lt;p&gt;add todo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; listEle.addTodo(input); //  calling method from class
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;remove todo&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; listEle.removeTodo(target.innerText);

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



&lt;p&gt;You can find the full code in GitHub&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nahidmbstu/todolist_js_class_and_object"&gt;full code&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
