<?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>Forem: Sendil Kumar</title>
    <description>The latest articles on Forem by Sendil Kumar (@sendilkumarn).</description>
    <link>https://forem.com/sendilkumarn</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%2F181774%2Fe2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg</url>
      <title>Forem: Sendil Kumar</title>
      <link>https://forem.com/sendilkumarn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sendilkumarn"/>
    <language>en</language>
    <item>
      <title>Java turns 28</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Thu, 25 May 2023 14:30:57 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/java-turns-28-enm</link>
      <guid>https://forem.com/sendilkumarn/java-turns-28-enm</guid>
      <description>&lt;p&gt;Java turned 28 this week! &lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/sendilkumarn" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JABzu4Dg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--0N0H5Tr9--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/181774/e2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/sendilkumarn/my-favourite-28-features-in-java-22fi" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;My favourite 28 features in Java as it turns 28&lt;/h2&gt;
      &lt;h3&gt;Sendil Kumar ・ May 25 ・ 5 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#java&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;What are your most (or least) favourite thing about #java?&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>My favourite 28 features in Java as it turns 28</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Thu, 25 May 2023 11:29:52 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/my-favourite-28-features-in-java-22fi</link>
      <guid>https://forem.com/sendilkumarn/my-favourite-28-features-in-java-22fi</guid>
      <description>&lt;p&gt;Java turned 28 this week! Here are my 28 favourite features/APIs in it. &lt;/p&gt;

&lt;p&gt;What are your favourite features/APIs comment below?&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CCoIVqQR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/Fw0thjTakAAf6Qc.jpg" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--2OhfhAK0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/profile_images/1648907047608655872/Td0tRScn_normal.jpg" alt="Sharat Chander 🟧 profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Sharat Chander 🟧
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @sharat_chander
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kDgU_xDI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      ☕️☕️🎂🎂🥳🥳🎂🎂☕️☕️&lt;br&gt;Happy Birthday, &lt;a href="https://twitter.com/hashtag/Java"&gt;#Java&lt;/a&gt;! 28 amazing years! &lt;br&gt;&lt;br&gt;What's your favorite Java memory or photo? Post now and use the &lt;a href="https://twitter.com/hashtag/28YearsOfJava"&gt;#28YearsOfJava&lt;/a&gt; hashtag!&lt;br&gt;&lt;br&gt;Stay connected: &lt;a href="https://t.co/7WRXM7EvX8"&gt;dev.java&lt;/a&gt;&lt;br&gt;☕️☕️🎂🎂🥳🥳🎂🎂☕️☕️ 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      15:38 PM - 23 May 2023
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1661033899567509504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OXOJJiQT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1661033899567509504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--foTp-unf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1661033899567509504" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SFHqU4bF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  1. Collections
&lt;/h2&gt;

&lt;p&gt;Java 2 introduced the collections framework.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The collections framework is a unified architecture for representing and manipulating collections... It reduces programming effort while increasing performance"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/doc-files/coll-index.html"&gt;Link to Collections&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--buqxPCAp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi43hf8l3usv1z1rmu9k.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--buqxPCAp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi43hf8l3usv1z1rmu9k.jpeg" alt="code showing collections" width="800" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;P.S. Oh yeah! I used generics \o/ &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Non-Blocking Input Output (NIO)
&lt;/h2&gt;

&lt;p&gt;Java 4 introduced NIO (New Input/Output) API. They were high level abstraction APIs designed to provide efficient operations on the low-level I/O operations. Later on Java 7 extended these non-blocking I/O for filesystem access. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/javase/8/docs/api/java/nio/package-summary.html"&gt;Link to NIO API&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5SLO7Bsh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc1k7y7f4bg8zhqojcqe.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5SLO7Bsh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc1k7y7f4bg8zhqojcqe.jpeg" alt="code showing usage of NIO" width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Generics
&lt;/h2&gt;

&lt;p&gt;Java 5 came with Generics. Hate it or love it. IMHO this is one of the key features to be released at that time. It reduced bugs and added an extra layer of abstraction over types. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/javase/tutorial/java/generics/types.html"&gt;Generics&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--buqxPCAp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi43hf8l3usv1z1rmu9k.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--buqxPCAp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi43hf8l3usv1z1rmu9k.jpeg" alt="code showing generics" width="800" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Annotations
&lt;/h2&gt;

&lt;p&gt;Annotation was another feature Java 5 came with.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/javase/tutorial/java/annotations/index.html"&gt;Annotations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GJYphbQu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvc7a2g7rpom6ytpjn49.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GJYphbQu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvc7a2g7rpom6ytpjn49.jpeg" alt="Code showing annotations" width="800" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Varargs...
&lt;/h2&gt;

&lt;p&gt;Java 5 also introduced Varargs. They provided a short-hand for methods that support an arbitrary number of parameters of one type.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="https://sendilkumarn.medium.com/safevarargs-variable-arguments-in-java-b9fdd5d996bb" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---BYFmZ6O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fill:88:88/1%2ANT6888EumfZyP-fEvTeFow.jpeg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://sendilkumarn.medium.com/safevarargs-variable-arguments-in-java-b9fdd5d996bb" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;SafeVarargs &amp;amp; Variable arguments in Java | by sendilkumarn | Medium&lt;/h2&gt;
      &lt;h3&gt;sendilkumarn ・ &lt;time&gt;Dec 21, 2018&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YjpYcCMa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        sendilkumarn.Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  6. Concurrency
&lt;/h2&gt;

&lt;p&gt;Java 5 also improved concurrency.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"APIs under java.util.concurrency, these APIs have been designed to support &lt;a href="https://en.wikipedia.org/wiki/Concurrent_computing"&gt;concurrent programming&lt;/a&gt;, and all execution takes place in the &lt;a href="https://en.wikipedia.org/wiki/Thread_(computing)"&gt;context of threads&lt;/a&gt;"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B-qmk0oh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mntgze1p3zdo0p29sbmd.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B-qmk0oh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mntgze1p3zdo0p29sbmd.jpeg" alt="code showing concurrency API" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Enhanced For-Each Loop
&lt;/h2&gt;

&lt;p&gt;I loved this enhanced for-each loop when it was released. It was easy and who cares about the index when all you need is the value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8IcpEKzo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddl2qwpxybxud3il73u7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8IcpEKzo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddl2qwpxybxud3il73u7.jpeg" alt="Code showing enhanced for loop usage" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Garbage Collection Improvements
&lt;/h2&gt;

&lt;p&gt;Java 6 is all about performance there were huge performance improvements for the core platform and even on Swing. It is in Java 6 we saw a few new GC algorithms too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html"&gt;Java GC Basics&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. TimSort
&lt;/h2&gt;

&lt;p&gt;Java 7 replaced MergeSort[1] to TimSort[2] for the Collections and Arrays sorting 🚀 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Merge_sort"&gt;MergeSort&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Timsort"&gt;TimSort&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  10. Lambda
&lt;/h2&gt;

&lt;p&gt;Java 8 is an amazing release. &lt;a href="https://openjdk.org/projects/lambda/"&gt;Project Lambda&lt;/a&gt; is the pinnacle of this release.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=%201OpAgZvYXLQ"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EEUpEaYF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://img.youtube.com/vi/1OpAgZvYXLQ/0.jpg" alt="Venkat talking about Lambda" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  11. &amp;lt;Optional&amp;gt;
&lt;/h2&gt;

&lt;p&gt;Java 8 introduced Optional to prevent us from NPE. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A container object which may or may not contain a non-null value.  If a value is present, isPresent() will return true and  get() will return the value." &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html"&gt;Optional&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PK_O1uoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqk32dumsdcwcufpx9nn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PK_O1uoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqk32dumsdcwcufpx9nn.jpeg" alt="Code showing optional usage" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  12. Functional Interface
&lt;/h2&gt;

&lt;p&gt;Lambda's are amazing and they organically lead to Functional interfaces. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A functional interface in Java is an interface that contains only a single abstract (unimplemented) method."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S26sEnBq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0n9qvl2pgaf2yeglywq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S26sEnBq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0n9qvl2pgaf2yeglywq.jpeg" alt="Code showing Functional Interface usage" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  13. JShell
&lt;/h2&gt;

&lt;p&gt;Java 9 brought in JShell. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"JShell is a REPL tool, which evaluates  declarations, statements, and expressions as they are entered and  immediately shows the results. The tool is run from the command line."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/222"&gt;JEP-222&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bqR45JJu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekuqk0fhqctb6v7uewgh.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bqR45JJu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekuqk0fhqctb6v7uewgh.jpeg" alt="JShell in action" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  14. Modules
&lt;/h2&gt;

&lt;p&gt;Remember Zigsaw from Java 9. &lt;/p&gt;

&lt;p&gt;"The &lt;a href="https://en.wikipedia.org/wiki/Java_Platform_Module_System"&gt;Java Platform Module System&lt;/a&gt; specifies a distribution format for collections of Java code and associated resources" &lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/projects/jigsaw/"&gt;Jigsaw&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  15. Vars
&lt;/h2&gt;

&lt;p&gt;Java 10 released with much awaited Local Variable Type inference a.k.a "var". The verbose Java becomes inferred Java.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/286"&gt;JEP-286&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Sd0D4ypo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3cnqicytg3kts2n6zmk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Sd0D4ypo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3cnqicytg3kts2n6zmk.jpeg" alt="Code showing Var usage" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  16. Faster Release cycles
&lt;/h2&gt;

&lt;p&gt;Major release every 6 months. Reduced the release cycle duration. No long wait for newer version and features. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/322"&gt;JEP-322&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  17. Flight Recorder
&lt;/h2&gt;

&lt;p&gt;Java 11 came with Flight Recorder, which provided a low-overhead data collection framework for troubleshooting Java applications and the HotSpot JVM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/328"&gt;JEP-328&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  18. Single File Source
&lt;/h2&gt;

&lt;p&gt;Java 11 allowed us to launch single file Java programs via Java command. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Java HelloWorld.java&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/330"&gt;JEP-330&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  19. RIP Applets
&lt;/h2&gt;

&lt;p&gt;Java 11 bid farewell to Java Applets / Java Web Start / JavaFX and others.&lt;/p&gt;
&lt;h2&gt;
  
  
  20. Switch Expressions
&lt;/h2&gt;

&lt;p&gt;Java 12 came with switch expressions &lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/325"&gt;JEP-325&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GyUyadxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utytbhhgl2dm9lbobmil.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GyUyadxc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utytbhhgl2dm9lbobmil.jpeg" alt="Code showing Switch Expressions" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  21. GC - Shenandoah
&lt;/h2&gt;

&lt;p&gt;Java 12 also introduced a new GC algorithm named Shenandoah. This amazing algorithm provided consistent pause time irrespective of your heap size.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/189"&gt;JEP-189&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  22. Text Blocks
&lt;/h2&gt;

&lt;p&gt;Java 13 came with Text Blocks. Multi-line texts made easy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/355"&gt;JEP-355&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sAV2jItm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9smo2y5l883kca6qjd1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sAV2jItm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9smo2y5l883kca6qjd1.jpeg" alt="Code showing Text Blocks in action" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  23. Pattern Matching
&lt;/h2&gt;

&lt;p&gt;Java 14 launched with Pattern Matching for instanceof &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JEP 305, Pattern Matching for instanceof simplifies the common case of an instanceof test being immediately followed by cast (see the code snippet)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/305"&gt;JEP-305&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lHNT2g2e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/up0da0hq41fr0ltcp0q4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lHNT2g2e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/up0da0hq41fr0ltcp0q4.jpeg" alt="Code showing Pattern Matching" width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  24. Records
&lt;/h2&gt;

&lt;p&gt;Java 14 also launched with Records. &lt;/p&gt;

&lt;p&gt;Records allows easy creation of simple immutable Tuple-like classes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/359"&gt;JEP-359&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GdC0dsey--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqm7v6f353rtb8ws311o.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GdC0dsey--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqm7v6f353rtb8ws311o.jpeg" alt="Code showing Records in action" width="800" height="260"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  25. Sealed Classes
&lt;/h2&gt;

&lt;p&gt;Java 15 introduced sealed classes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/360"&gt;JEP-360&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My blog post that talks about sealed classes and interfaces - &lt;a href="https://sendilkumarn.com/blog/java-17"&gt;https://sendilkumarn.com/blog/java-17&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FdwvGI4f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0h4k7fxurjuicbf8cmuu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FdwvGI4f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0h4k7fxurjuicbf8cmuu.jpeg" alt="Code showing Sealed classes" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  26. Vector API/SIMD
&lt;/h2&gt;

&lt;p&gt;Java 16 came with Vector API.&lt;/p&gt;

&lt;p&gt;"Single instruction, multiple data (SIMD)"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/338"&gt;JEP-338&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  27. Virtual Threads
&lt;/h2&gt;

&lt;p&gt;Jumping to Java21, it finalized and introduced virtual threads to the java platform. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://openjdk.org/jeps/444"&gt;JEP-444&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=y-SXxp1Kx_Y&amp;lt;br&amp;gt;%0A"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q2aJPVuX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://img.youtube.com/vi/y-SXxp1Kx_Y/0.jpg" alt="Venkat talking about Project Loom" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  28. Community
&lt;/h2&gt;

&lt;p&gt;Last but not least! The amazing community of #java ❤️&lt;/p&gt;

&lt;p&gt;What are your favorite features of #java comment below?&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--iLeP244r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/profile_images/1655244586468384769/K-bF7Sp2_normal.jpg" alt="sendilkumarn profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        sendilkumarn
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="mentioned-user" href="https://dev.to/sendilkumarn"&gt;@sendilkumarn&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kDgU_xDI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      &lt;a href="https://twitter.com/java"&gt;@java&lt;/a&gt;  turns 28 today!&lt;br&gt;&lt;br&gt;&lt;a href="https://t.co/CjYyRCvdgr"&gt;twitter.com/Sharat_Chander…&lt;/a&gt;&lt;br&gt;&lt;br&gt;Here is a thread on my favorite Java features/APIs/releases   🧵
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      21:44 PM - 23 May 2023
    &lt;/div&gt;

      &lt;div class="ltag__twitter-tweet__quote"&gt;
        &lt;div class="ltag__twitter-tweet__quote__header"&gt;
          &lt;span class="ltag__twitter-tweet__quote__header__name"&gt;
            Sharat Chander 🟧
          &lt;/span&gt;
          @Sharat_Chander
        &lt;/div&gt;
        ☕️☕️🎂🎂🥳🥳🎂🎂☕️☕️
Happy Birthday, #Java! 28 amazing years! 

What's your favorite Java memory or photo? Post now and use the #28YearsOfJava hashtag!

Stay connected: https://t.co/7WRXM7EvX8
☕️☕️🎂🎂🥳🥳🎂🎂☕️☕️ https://t.co/jj3AM0yKbT
      &lt;/div&gt;

    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1661125882013011968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OXOJJiQT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1661125882013011968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--foTp-unf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1661125882013011968" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SFHqU4bF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  My Other Posts on Java
&lt;/h2&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/sendilkumarn" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JABzu4Dg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--0N0H5Tr9--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/181774/e2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/sendilkumarn/interesting-features-in-java-17-1fbc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Interesting features in Java 17&lt;/h2&gt;
      &lt;h3&gt;Sendil Kumar ・ Feb 5 '22 ・ 7 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#java&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#features&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 


&lt;div class="ltag__link"&gt;
  &lt;a href="/sendilkumarn" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JABzu4Dg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--0N0H5Tr9--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/181774/e2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/sendilkumarn/java-enters-its-teen-age-4626" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Java enters its teenage 🎉 🎂&lt;/h2&gt;
      &lt;h3&gt;Sendil Kumar ・ Sep 22 '19 ・ 4 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#java&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#jvm&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#features&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 


&lt;div class="ltag__link"&gt;
  &lt;a href="/sendilkumarn" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JABzu4Dg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--0N0H5Tr9--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/181774/e2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/sendilkumarn/9-tips-to-increase-your-java-performance-1l4d" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;9 tips to Increase your Java performance ☕️ 🚀 🚶‍♂️&lt;/h2&gt;
      &lt;h3&gt;Sendil Kumar ・ Jul 20 '19 ・ 4 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#java&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#performance&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#codequality&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#codenewbie&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
 

</description>
      <category>java</category>
    </item>
    <item>
      <title>My top 5 book recommendations for EMs</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Mon, 15 May 2023 22:17:25 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/my-top-5-book-recommendations-for-anyone-starting-as-an-engineering-manager-5bk1</link>
      <guid>https://forem.com/sendilkumarn/my-top-5-book-recommendations-for-anyone-starting-as-an-engineering-manager-5bk1</guid>
      <description>&lt;p&gt;Transitioning from an engineer to an engineering manager is an exciting career move that requires developing new skills and knowledge. There are several great books that can help you navigate this transition and excel in your new role. Here are some recommendations based on what I loved/enjoyed when I started as an Engineering Manager:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Making of a Manager: What to Do When Everyone Looks to You&lt;/strong&gt; by &lt;a href="https://www.juliezhuo.com/"&gt;Julie Zhuo&lt;/a&gt;: The book is written in a simple style and is very practical and relatable. Julie Zhuo shares her personal experiences and challenges in a high-growth environment. I have spent a lot of time reflecting on this book and constantly return to it. Definitely recommend it for anyone starting as an Engineering Manager.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.juliezhuo.com/book/manager.html"&gt;Link to the making of a manager&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change&lt;/strong&gt; by &lt;a href="https://www.linkedin.com/in/camille-fournier-9011812/"&gt;Camille Fournier&lt;/a&gt;: If you are looking for a book that offers practical advice and insights for managers in the tech industry, focusing on the various stages of a manager's career and the challenges they may face along the way. The writing style of this book is candid and relatable. From being an IC to leading large teams, this book provides insights into different stages of a technical manager's career. It covers topics like mentoring, communication, and organizational dynamics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.amazon.com/Managers-Path-Leaders-Navigating-Growth/dp/1491973897"&gt;Link to the manager path&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Lean Startup: How Today’s Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses&lt;/strong&gt; by &lt;a href="https://en.wikipedia.org/wiki/Eric_Ries"&gt;Eric Ries&lt;/a&gt;: While this book isn't specifically geared towards engineering managers, it offers valuable insights into how to build and scale successful products and teams using a lean methodology. It emphasizes experimentation, rapid iteration, and customer feedback. No waste!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://theleanstartup.com/"&gt;Link to the lean startup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;High Output Management&lt;/strong&gt; by &lt;a href="https://en.wikipedia.org/wiki/Andrew_Grove"&gt;Andrew S. Grove&lt;/a&gt;: Written by the former CEO of Intel, this classic management book offers valuable guidance on managing and optimizing team productivity. It covers topics such as goal setting, performance evaluation, and effective meetings. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.amazon.com/High-Output-Management-Andrew-Grove/dp/0679762884"&gt;Link to the high output management&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crucial Conversations: Tools for Talking When Stakes Are High&lt;/strong&gt; by &lt;a href="https://www.goodreads.com/author/show/9373.Kerry_Patterson"&gt;Kerry Patterson&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/joseph-grenny-a89081b/"&gt;Joseph Grenny&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Ron_McMillan"&gt;Ron McMillan&lt;/a&gt;, and &lt;a href="https://cruciallearning.com/blog/author/al-switzler/#:~:text=Al%20Switzler%20is%20a%20New,Xerox%2C%20IBM%2C%20and%20Sprint."&gt;Al Switzler&lt;/a&gt;: As an engineering manager, you'll inevitably encounter challenging conversations. This book provides strategies for navigating difficult discussions and resolving conflicts effectively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.amazon.com/Crucial-Conversations-Talking-Stakes-Second/dp/1469266822"&gt;Link to the crucial conversations&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Honorary Mentions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Radical Candor: Be a Kick-Ass Boss Without Losing Your Humanity&lt;/strong&gt; by &lt;a href="https://kimmalonescott.com/"&gt;Kim Scott&lt;/a&gt;: This book explores the concept of radical candor, which emphasizes the importance of direct communication and caring personally while providing feedback and managing teams. (&lt;a href="https://kimmalonescott.com/radical-candor"&gt;book&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers&lt;/strong&gt; by &lt;a href="https://en.wikipedia.org/wiki/Ben_Horowitz"&gt;Ben Horowitz&lt;/a&gt;: This book offers insights into the challenges of leading a company, including making tough decisions, managing crises, and dealing with failure. (&lt;a href="https://www.amazon.com/Hard-Thing-About-Things-Building/dp/0062273205"&gt;book&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;You can follow me on &lt;a href="https://twitter.com/sendilkumarn"&gt;Twitter&lt;/a&gt; too!&lt;/p&gt;

&lt;p&gt;I hope you find these recommendations useful! Feel free to share other books that have helped you and/or how they did it.&lt;/p&gt;

</description>
      <category>management</category>
      <category>books</category>
      <category>list</category>
      <category>career</category>
    </item>
    <item>
      <title>Diversity &amp; Inclusion in hiring</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Mon, 15 May 2023 16:19:32 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/diversity-inclusion-in-hiring-4o2h</link>
      <guid>https://forem.com/sendilkumarn/diversity-inclusion-in-hiring-4o2h</guid>
      <description>&lt;p&gt;Creating a diverse and inclusive workplace is crucial for any organization that wants to succeed in today's global economy. Not only does it promote collaboration and innovation, but it also helps attract and retain top talent. In this post, we will discuss practical tips and guidelines for building a more diverse and inclusive organization by focusing on the hiring process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a Clear Job Description
&lt;/h2&gt;

&lt;p&gt;One of the first steps in building a diverse and inclusive organization is to have a clear job description that reflects the company's values and culture. In addition to standard text that claims to value diversity and equality, hiring managers should specify what they are looking for in a candidate. This will help attract candidates who share the company's values and are more likely to contribute to a diverse and inclusive workplace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source Candidates from Diverse Channels
&lt;/h2&gt;

&lt;p&gt;To ensure that the pool of applicants is not limited to a particular group, it's important to source candidates from diverse channels. This can include job boards that specifically target underrepresented groups, attending job fairs or events hosted by organizations that promote diversity, and reaching out to professional associations that focus on diversity and inclusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use a Diverse Panel of Interviewers
&lt;/h2&gt;

&lt;p&gt;Having a diverse panel of interviewers can help prevent unconscious biases from affecting the hiring decision. It's important to ensure that the interviewers come from different backgrounds and have different perspectives. This will help ensure that the hiring decision is based on the candidate's qualifications and skills rather than their personal characteristics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Periodically Monitor Progress
&lt;/h2&gt;

&lt;p&gt;It's important to periodically monitor the progress of diversity and inclusion efforts. This can be done by analyzing data and metrics related to hiring, retention, and promotion of employees from different backgrounds. Making the process public can also help hold the company accountable for its efforts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identify and Correct Biases
&lt;/h2&gt;

&lt;p&gt;Identifying and correcting biases that may exist in the hiring process is crucial for building a more diverse and inclusive workplace. By learning from mistakes and re-applying these measures, companies can create a more inclusive and equitable workplace that benefits everyone involved.&lt;/p&gt;

&lt;p&gt;In conclusion, building a diverse and inclusive workplace starts with the hiring process. Companies should create a workplace that values and respects everyone, regardless of their background.&lt;/p&gt;




&lt;p&gt;If you like this article, please leave likes/comments. Want more subscribe to my newsletter on &lt;a href="https://sendilkumarn.substack.com"&gt;Substack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can follow me on &lt;a href="https://twitter.com/sendilkumarn"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/sendilkumarn/"&gt;LinkedIN&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>diversity</category>
      <category>hiring</category>
      <category>inclusion</category>
      <category>diversityintech</category>
    </item>
    <item>
      <title>State of the WebAssembly 2022</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Mon, 20 Jun 2022 19:37:57 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/state-of-the-webassembly-2022-2h1i</link>
      <guid>https://forem.com/sendilkumarn/state-of-the-webassembly-2022-2h1i</guid>
      <description>&lt;p&gt;&lt;a href="https://blog.scottlogic.com/2022/06/20/state-of-wasm-2022.html"&gt;The State of the WebAssembly 2022 is out 🎉&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Languages in the WASM world
&lt;/h1&gt;

&lt;p&gt;Unsurprisingly Rust Language dominates the most used and most wanted to use language. I am also super excited to see Blazor adoption is increasing!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zis-Ltpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/94ffw0gtqmae4fu7zvwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zis-Ltpr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/94ffw0gtqmae4fu7zvwx.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JavaScript surprisingly is the second highly used language. As the report mentions "there is an increasing usecase where they compile the JavaScript engine itself into WASM and execute on it". &lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
    &lt;div class="ltag__twitter-tweet__media ltag__twitter-tweet__media__two-pics"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eesHEjYl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/FU5_OmDXwAIhstr.jpg" alt="unknown tweet media content"&gt;
    &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--QJ2-MRCb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/profile_images/603270050556956672/T0mfRsil_normal.png" alt="BrendanEich profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        BrendanEich
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @brendaneich
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kDgU_xDI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      &lt;a href="https://twitter.com/ilblackdragon"&gt;@ilblackdragon&lt;/a&gt; at &lt;a href="https://twitter.com/hashtag/consensus2022"&gt;#consensus2022&lt;/a&gt; announcing Near’s JS SDK based on QuickJS (&lt;a href="https://t.co/CtDNUfOW0r"&gt;bellard.org/quickjs/&lt;/a&gt;), the tiny JS VM written by the famous superhacker Fabrice Bellard, which runs hosted as a guest VM in the WebAssembly host in the &lt;a href="https://twitter.com/NEARProtocol"&gt;@NEARProtocol&lt;/a&gt; blockchain nodes. Big news! 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      16:54 PM - 10 Jun 2022
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1535304420426141696" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OXOJJiQT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1535304420426141696" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--foTp-unf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1535304420426141696" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SFHqU4bF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  Usage
&lt;/h1&gt;

&lt;p&gt;Web Applications is still the number 1 use case for WebAssembly but it is on the decline. I believe it is because, folks started to realise that WebAssembly is not a silver bullet for performance. It supports only some use cases&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fy_rKTlL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sk3879h4ge6jodqfpnlx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fy_rKTlL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sk3879h4ge6jodqfpnlx.png" alt="Image description" width="800" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Super fascinated to see WASM dominating serverless  + Cloud world! Docker replacement coming soon... &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b5CNiP5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgvvupjinjwx9mk7xkqt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b5CNiP5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgvvupjinjwx9mk7xkqt.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Runtime &amp;amp; Features
&lt;/h1&gt;

&lt;p&gt;As expected wasmerio wasmtime dominates the runtime. If you haven't tried them, then give them a shot :) &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My getting started post on &lt;a href="https://sendilkumarn.com/blog/wasi-with-wasmtime"&gt;wasmtime&lt;/a&gt;. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8zTOd-j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlrcqsyq6ikrtyz58x4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8zTOd-j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xlrcqsyq6ikrtyz58x4.png" alt="Image description" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What next to SIMD? The threads proposal is the top feature requested by the community in the web world. On the server side I/O operations lead the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5sTlZ8b6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z502zl3uk3pm3viujnhx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5sTlZ8b6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z502zl3uk3pm3viujnhx.png" alt="Image description" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B41w85Yi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovrqh8gn6h17hysskj74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B41w85Yi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovrqh8gn6h17hysskj74.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebAssembly needs proper debugging &amp;amp; building support and enable non-browser APIs in the future. This is interesting as the first two will give enormous Developer Experience while the latter focus on the server side Wasm&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GsboxpB6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78bueg1d1ywq20npilox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GsboxpB6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78bueg1d1ywq20npilox.png" alt="Image description" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you want to get started on the WASM with Rust - checkout my Dev.to series &lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/sendilkumarn" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JABzu4Dg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--0N0H5Tr9--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/181774/e2b2cf59-8ff3-44f5-ae1d-c6ba29b633cb.jpg" alt="sendilkumarn"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/sendilkumarn/rust-and-webassembly-for-masses-introduction-1034" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Rust and WebAssembly for masses - Introduction&lt;/h2&gt;
      &lt;h3&gt;Sendil Kumar ・ Jan 1 '20 ・ 8 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#rust&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webassembly&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webassembly</category>
      <category>webdev</category>
      <category>serverless</category>
      <category>javascript</category>
    </item>
    <item>
      <title>My views on Ziglang</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Sun, 20 Mar 2022 19:21:36 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/my-views-on-ziglang-159n</link>
      <guid>https://forem.com/sendilkumarn/my-views-on-ziglang-159n</guid>
      <description>&lt;p&gt;&lt;a href="https://sendilkumarn.com/blog/my-views-on-zig-2022"&gt;Originally posted on&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Zig is a general-purpose programming language. It is simple and does not have any hidden control flow or allocations.&lt;/p&gt;

&lt;p&gt;The language is clear, straight-forward, and readable.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Zig directly competes with C and will be a better alternative for C in the future.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Things that I love about ziglang:&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple language
&lt;/h2&gt;

&lt;p&gt;Building a simple language is easier said than done. Programmers need rich features in a programming language, but when the programming language supports more features, it becomes sluggish and bloated.&lt;/p&gt;

&lt;p&gt;For example, A simple hello-world program in zig will look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="c"&gt;// hello.zig&lt;/span&gt;
&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;@import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"std"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;stdout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getStdOut&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
 &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello!, {s}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"world"&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the first line, we are importing the &lt;code&gt;std&lt;/code&gt; library (curious why we have &lt;code&gt;@&lt;/code&gt; before &lt;code&gt;import&lt;/code&gt; check &lt;a href="https://ziglang.org/documentation/0.8.1/#Builtin-Functions"&gt;here&lt;/a&gt;). We import the &lt;code&gt;std&lt;/code&gt; library and assign it to &lt;code&gt;std&lt;/code&gt; using the &lt;code&gt;const&lt;/code&gt; keyword.&lt;/p&gt;

&lt;p&gt;Next, we define the &lt;code&gt;main&lt;/code&gt; function. As in other languages, the main specifies the zig compiler where to start the program execution. The function definition commences with the &lt;code&gt;pub fn&lt;/code&gt; keyword. As you might have guessed, &lt;code&gt;pub fn&lt;/code&gt; means public function.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: The &lt;code&gt;pub&lt;/code&gt; specifier exports the function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then we have the function name &lt;code&gt;main&lt;/code&gt;. After the function name and args (we do not have any in this case), we specify the &lt;code&gt;return&lt;/code&gt; type. The return type here is &lt;code&gt;!void&lt;/code&gt;. The &lt;code&gt;!&lt;/code&gt; specifies that the function might return &lt;code&gt;error&lt;/code&gt;. We can expand the &lt;code&gt;!void&lt;/code&gt; something like &lt;code&gt;&amp;lt;error-type&amp;gt; or &amp;lt;void&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next, we take the &lt;code&gt;writer&lt;/code&gt; function from the imported &lt;code&gt;std&lt;/code&gt; library.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: It is too long!!! But it clearly says what the programmer is trying to do and what the compiler will do.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Finally, we use &lt;code&gt;print&lt;/code&gt; from the method from the &lt;code&gt;stdout&lt;/code&gt; to print the actual strings out. The print statement is similar to how we will do in other low-level languages like C / Rust.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: &lt;code&gt;.{}&lt;/code&gt;. in the second argument to the &lt;code&gt;print&lt;/code&gt; function. It is an anonymous struct literal. Zig compiler infers the type of &lt;code&gt;anonymous&lt;/code&gt; struct literal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is it. We can run this zig code using &lt;code&gt;zig run hello.zig&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As you can see, the function is simple and easier to understand. The language neither has macros nor magically print the result.&lt;/p&gt;

&lt;p&gt;No magic here!&lt;/p&gt;

&lt;h2&gt;
  
  
  No Null pointers
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Oh yeah! Everyone agrees Null Pointer is a billion-dollar mistake.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Zig does not have &lt;code&gt;null&lt;/code&gt;, but they provide &lt;code&gt;optional&lt;/code&gt;. Optional type provides safety and better readability.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;optional_world_answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="kt"&gt;i32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;?&lt;/code&gt; specifies the type is &lt;code&gt;optional&lt;/code&gt;. It can either accept &lt;code&gt;null&lt;/code&gt; or any &lt;code&gt;i32&lt;/code&gt; integer. &lt;code&gt;null&lt;/code&gt; is an allowed type in ziglang.&lt;/p&gt;

&lt;p&gt;We can safely access the &lt;code&gt;optional&lt;/code&gt; using the &lt;code&gt;if-let&lt;/code&gt; syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;optional_world_answer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;world_answer&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="c"&gt;// here `world_answer` is i32 and not null.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Optional makes your language verbose, the benefits of them in safety, readability stands out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Error handling
&lt;/h2&gt;

&lt;p&gt;Zig is inclusive of errors too. It handles errors as values. The zig compiler ensures errors are handled and complains when they are not.&lt;/p&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;get_i64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="kt"&gt;i64&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="py"&gt;notImplemented&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="c"&gt;// we are basically discarding the result&lt;/span&gt;
 &lt;span class="mi"&gt;_&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_i64&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code will throw a compiler error that we are not handling error and the error gets discarded. Always remember errors are values. We can fix it by using &lt;code&gt;catch&lt;/code&gt; or &lt;code&gt;try&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="c"&gt;// error handling with `catch`&lt;/span&gt;
&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get_i64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="c"&gt;// do something with error&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c"&gt;// error handling with `try`&lt;/span&gt;
&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;get_i64&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c"&gt;// well when you are sure that it won't error&lt;/span&gt;
&lt;span class="n"&gt;let&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="n"&gt;get_i64&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="k"&gt;unreachable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zig provides refreshing error handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comptime
&lt;/h2&gt;

&lt;p&gt;Zig provides a &lt;code&gt;comptime&lt;/code&gt; keyword to specify that a particular value and type are available during the compile-time. You can use &lt;code&gt;comptime&lt;/code&gt; in three different places.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;parameters&lt;/li&gt;
&lt;li&gt;variables&lt;/li&gt;
&lt;li&gt;expressions&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  comptime in parameters
&lt;/h3&gt;

&lt;p&gt;Zig uses the comptime in parameters to duck type and implements generics.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="n"&gt;generic_fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;comptime&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can call &lt;code&gt;generic_fn&lt;/code&gt; like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight zig"&gt;&lt;code&gt;&lt;span class="n"&gt;generic_fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function call-site expects type as a comptime parameter.&lt;/p&gt;

&lt;h3&gt;
  
  
  comptime in variables
&lt;/h3&gt;

&lt;p&gt;Comptime in variables is another good feature in zig. It guarantees that the compiler will perform all the load and store operations during the compile time itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  comptime in expressions
&lt;/h3&gt;

&lt;p&gt;Similarly, we can mark an expression as &lt;code&gt;comptime&lt;/code&gt; such that it will evaluate at the compile time.&lt;/p&gt;

&lt;p&gt;Other features that stand out are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier integration with C and other C-like languages.&lt;/li&gt;
&lt;li&gt;Std library code is readable.&lt;/li&gt;
&lt;li&gt;Simple grammar for the language.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The things that need to improve in zig are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Although error handling is refreshing, there is no way to pass a context with errors.&lt;/li&gt;
&lt;li&gt;Extreme importance on readability leads you to write low-level code.&lt;/li&gt;
&lt;li&gt;The language is in its very early days, and it will be interesting to see how it evolves (with more features).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Overall, Zig has an excellent future. It will be a replacement for C, and I hope it will succeed.&lt;/p&gt;

&lt;h2&gt;
  
  
  To explore further
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ziglang.org/learn/why_zig_rust_d_cpp/"&gt;Why Zig?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ziglang.org/documentation/master/"&gt;Zig documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ratfactor/ziglings"&gt;Ziglings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sendilkumarn/aoc2021InZig"&gt;My AOC experiments in Zig&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>zig</category>
      <category>languages</category>
      <category>beginners</category>
      <category>views</category>
    </item>
    <item>
      <title>Interesting features in Java 17</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Sat, 05 Feb 2022 08:40:05 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/interesting-features-in-java-17-1fbc</link>
      <guid>https://forem.com/sendilkumarn/interesting-features-in-java-17-1fbc</guid>
      <description>&lt;p&gt;Originally published in &lt;a href="https://sendilkumarn.com/blog/java-17"&gt;sendilkumarn.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Few months ago, Java 17 was released. The new LTS version comes with a lot of performance improvements, new features, and API enhancements. Here are my top features in this release.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sealed Classes or Interfaces&lt;/li&gt;
&lt;li&gt;Pattern Matching in switch &lt;/li&gt;
&lt;li&gt;Vector API &lt;/li&gt;
&lt;li&gt;Foreign Function and Memory API&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Sealed Classes or Interfaces
&lt;/h1&gt;

&lt;p&gt;With Java 17, Sealed classes or interfaces are finally out of preview. They allow classes or interfaces to specify which other classes or interfaces can extend or implement them. This feature enables the superclasses to be accessible but restricts extending superclasses.&lt;/p&gt;

&lt;p&gt;You can define a sealed class as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;abstract&lt;/span&gt; &lt;span class="n"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CollectionAdapter&lt;/span&gt; 
    &lt;span class="n"&gt;permits&lt;/span&gt; &lt;span class="nc"&gt;ListAdapter&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SetAdapter&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;MapAdapter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sealed classes have a &lt;code&gt;sealed&lt;/code&gt; modifier followed by the class definition. We have to explicitly define the allowed subclasses for the sealed class. We can do it either by defining the sub classes directly in the same source file (as inner or auxiliary classes) or using &lt;code&gt;permits&lt;/code&gt; modifier followed by a list of allowed subclasses. Only these classes can extend the &lt;code&gt;sealed&lt;/code&gt; classes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Sealed and its permitted subclasses should live on the same package or module (who uses a module ;) ).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The subclass can extend the sealed class just like any other class. But the subclass should either be &lt;code&gt;final&lt;/code&gt;, &lt;code&gt;sealed&lt;/code&gt;, or &lt;code&gt;non-sealed&lt;/code&gt; (yeah! hyphenated modifier ;)).  &lt;/p&gt;

&lt;h2&gt;
  
  
  final
&lt;/h2&gt;

&lt;p&gt;The final completely prevents further extension of the sealed class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ListAdapter&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;CollectionAdapter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  sealed
&lt;/h2&gt;

&lt;p&gt;The sealed classes allow its subclasses to extend the sealed superclasses via themselves.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SetAdapter&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;CollectionAdapter&lt;/span&gt; 
    &lt;span class="n"&gt;permits&lt;/span&gt; &lt;span class="nc"&gt;SortedSetAdapter&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;HashSetAdapter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now both SortedSetAdapter and HashSetAdapter can (indirectly) extend the CollectionAdapter via SetAdapter. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: If SorterSetAdapter and HashSetAdapter directly extend CollectionAdapter then it will error during compilation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  non-sealed
&lt;/h2&gt;

&lt;p&gt;The non-sealed makes unrestricted extension of a superclass possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MapAdapter&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;CollectionAdapter&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Record classes &amp;amp; Sealed Interfaces Best Friends Forever
&lt;/h2&gt;

&lt;p&gt;Record classes landed on Java 16. They provide a concise way to represent immutable DTOs in Java. Sealed classes or interfaces work great with records.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;abstract&lt;/span&gt; &lt;span class="n"&gt;sealed&lt;/span&gt; &lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;Geometry&lt;/span&gt; 
    &lt;span class="n"&gt;permits&lt;/span&gt; &lt;span class="nc"&gt;Point&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Line&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="nf"&gt;Point&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;Geometry&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="nf"&gt;Line&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Point&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Point&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;Geometry&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: Record classes do not support declaring a superclass type as they are implicitly &lt;code&gt;final&lt;/code&gt;. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both Record and Sealed classes are algebraic data types (ADT). ADTs are a fancy way of saying composite types (the type formed by combining other types). Record classes are product types. Sealed classes are sum types.&lt;/p&gt;

&lt;p&gt;Being &lt;code&gt;sum&lt;/code&gt; type, the Sealed classes make it easy for the compiler to understand its various type forms. Our next feature &lt;code&gt;pattern matching&lt;/code&gt; rides on this exhaustive type checking.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pattern Matching in switch
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a preview feature in Java 17&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pattern matching is a great feature. It is one of the many features I enjoyed while learning &lt;a href="https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html"&gt;Rust&lt;/a&gt;. The pattern matching makes the programs concise and readable. It also empowers the compiler to do exhaustive type checks. The pattern matching &lt;code&gt;instanceof&lt;/code&gt; was released on Java 16. It reduced the boilerplate code when using &lt;code&gt;instanceof&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Instead of two separate statements to check the type and create a variable with casting, the pattern matching &lt;code&gt;instanceof&lt;/code&gt; introduced a syntactic sugar that combines them into one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// before Java 16&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;snow&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nc"&gt;Water&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;Water&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Water&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="n"&gt;snow&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// do whatever with w&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// from Java 16&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;snow&lt;/span&gt; &lt;span class="n"&gt;instance&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="nc"&gt;Water&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// do the same thing with w&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Java 17 extends these features further and introduces pattern matching for &lt;code&gt;switch&lt;/code&gt; expressions. Together with exhaustive type check (introduced in Java 14) and pattern matching &lt;code&gt;switch&lt;/code&gt; expressions are delightful to work with.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;snow&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// well it is a null value&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt;  &lt;span class="nc"&gt;Water&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;  &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// Do something with Water&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nc"&gt;Fire&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// Do something with Fire&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="c1"&gt;// Do something with something&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before Java 17, switch cases were not exhaustive. It introduced runtime exceptions. This exhaustive type checking in switch statement removes the runtime exceptions. When the switch cases are not exhaustive the compiler throws an error. The &lt;code&gt;case&lt;/code&gt; labels should cover all the possible variations of the type. Also, the case expressions support the &lt;code&gt;null&lt;/code&gt; case. &lt;/p&gt;

&lt;p&gt;The pattern matching in &lt;code&gt;instanceof&lt;/code&gt; and &lt;code&gt;switch&lt;/code&gt; provides a building block for allowing destructuring of the classes in the future. Let's jump on to two new cool features that are still in incubation but have potential.&lt;/p&gt;

&lt;h1&gt;
  
  
  Vector API
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;This feature is in incubation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the Machine Learning ecosystem, Java is not the primary language. The main reason is that the language lacks a few essential constructs. Vector APIs addresses a few problems in the Machine Learning area.&lt;/p&gt;

&lt;p&gt;Vector is a primitive data structure. In the initial release, vectors support &lt;code&gt;Byte&lt;/code&gt;, &lt;code&gt;Short&lt;/code&gt;, &lt;code&gt;Integer&lt;/code&gt;, &lt;code&gt;Long&lt;/code&gt; types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// var vectorized = new Vector&amp;lt;E&amp;gt;();&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;vectorInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Integer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;();&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;vectorLong&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Long&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;();&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;vectorShort&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Short&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;();&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;vectorShort&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Vector&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Byte&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;If you are thinking, What is a big deal it is another data structure?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Vector API uses Single Instruction Multiple Data (SIMD). Modern CPU architectures allow you to perform multiple tasks in a single CPU cycle. That is the machine (CPU) allows simultaneous computation of a single instruction. For example, you have 1Million pixels image and you want to increase the contrast for each pixel in that image. In a normal instruction, the CPU has to fetch the pixel from a particular location and increase its RGB (Red Green Blue) value and continue doing that one million times. If the CPU supports SIMD, then the CPU can load a bunch of pixels (say n) and apply the single instruction (in our case increasing RGB values) on them. They do this in parallel for multiple bunches. Thus significantly increasing the performance of the overall operation. &lt;/p&gt;

&lt;p&gt;Thus Vector APIs provide an enormous performance boost and thus makes Java easier to use for &lt;a href="https://www.tensorflow.org/guide/tensor"&gt;tensor&lt;/a&gt; calculations in the future. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Although most of the modern CPU architectures support SIMD computation, there are still some CPU architectures out there that do not support SIMD. Vector APIs allows graceful degradation for them too. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Foreign Function &amp;amp; Memory API
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;This feature is in incubation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Foreign Function and Memory API is another feature on incubation in Java 17. They provide necessary APIs for Java programs to access foreign functions and memory outside of the JVM. Java introduced Java Native Interface(JNI) long back. JNI is complex, slow, and dangerously unsafe to use. The new Foreign Function and Memory API were built from the ground up to provide simple, fast, and safer APIs when going out of the JVM.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why is it a big deal?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Java runtime keeps its object in the heap. This heap is called &lt;code&gt;on-heap data&lt;/code&gt; and is fast to access. That is the main reason why Java is super fast. But when Java wants to call outside of its runtime for example C/C++ code, it becomes too slow to access the data. This is primarily because the data is outside the JVM's heap (on-heap), this heap is called &lt;code&gt;off-heap data&lt;/code&gt;. JVM has to translate the value from &lt;code&gt;off-heap&lt;/code&gt; to &lt;code&gt;on-heap&lt;/code&gt; and vice versa. This makes accessing the &lt;code&gt;off-heap&lt;/code&gt; data slower than accessing &lt;code&gt;on-heap&lt;/code&gt; data.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Garbage Collection happens only on the "on-heap" data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Java provides a couple of ways to call foreign functions or memory, like &lt;code&gt;ByteBuffer&lt;/code&gt;, &lt;code&gt;Unsafe API&lt;/code&gt;, or &lt;code&gt;JNI&lt;/code&gt;. The &lt;code&gt;ByteBuffer API&lt;/code&gt; allows accessing "off-heap" data, but they are not built for this use-case and they lack a few key features (like customised byte alignment). The &lt;code&gt;sun.misc.Unsafe API&lt;/code&gt;, this exposes "on-heap" memory access. While it addresses the performance but as the name implicates it is "unsafe". &lt;code&gt;JNI&lt;/code&gt; allows accessing "off-heap" data, but it provides significantly low performance. &lt;/p&gt;

&lt;p&gt;JNI has a ton of performance issues, platform-dependency (because of the foreign language), restrictions on the language to use. The translation of object representation between Java and the foreign language is too costly and uses the "Unsafe" API. &lt;/p&gt;

&lt;p&gt;With the new API we can allocate a memory segment using the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Alloactes 100bytes on the native memory using malloc&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;nativeSegment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;MemorySegment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;allocateNative&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newImplicitScope&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Memory Segment is a contiguous region on memory (i.e., they are allocated together). The &lt;code&gt;implicitScope&lt;/code&gt; on the above code specifies that the memory can be cleaned up once the &lt;code&gt;nativeSegment&lt;/code&gt; goes out of scope. Additionally, the API also provides &lt;code&gt;MemoryLayout&lt;/code&gt; to specify how the data is laid out on the memory. &lt;/p&gt;

&lt;p&gt;To load the function from &lt;code&gt;C&lt;/code&gt;, we can use the &lt;code&gt;CLinker&lt;/code&gt;. The &lt;code&gt;CLinker&lt;/code&gt; implements the C Application Binary Interface (ABI) and helps us to load the &lt;code&gt;C&lt;/code&gt; file and look up the functions defined in the C file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The below line loads the `cFunction` method from the C code. &lt;/span&gt;
&lt;span class="nc"&gt;MethodHandle&lt;/span&gt; &lt;span class="n"&gt;cFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CLinker&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getInstance&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;downcallHandle&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
                            &lt;span class="nc"&gt;CLinker&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;systemLookup&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;lookup&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"cFunction"&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="o"&gt;...);&lt;/span&gt;
&lt;span class="c1"&gt;// Create the required memory segment and provide the layout here.&lt;/span&gt;
&lt;span class="c1"&gt;// ...code is elided...&lt;/span&gt;
&lt;span class="c1"&gt;// The below line invokes the Foreign function from the Java code.&lt;/span&gt;
&lt;span class="n"&gt;cFunction&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
    &lt;span class="c1"&gt;// address where the memory lives &lt;/span&gt;
    &lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
    &lt;span class="c1"&gt;// length of the memory &lt;/span&gt;
    &lt;span class="n"&gt;usedAddressLength&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; 
    &lt;span class="c1"&gt;// ... other args&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Foreign Function API makes the invocation of native code as simple as method handles inside Java. Foreign function and Memory API together will open a lot of new scopes in Java.&lt;/p&gt;




&lt;p&gt;The Sealed classes and Record classes provide sum and product types for Java. These algebraic data types are great and they provide a cleaner way to pattern match. The pattern matching provides concise, readable code, and exhaustive type checks by the compiler. These three features make the Java language more modern and alleviate a few of the pain points. &lt;/p&gt;

&lt;p&gt;I am particularly excited about the Vector APIs and Foreign Function and Memory APIs changes. This lays a foundation for a much bigger and exciting future for Java. Both these features provide a big boost on performance and will introduce Java into the Machine Learning world (&lt;a href="https://www.tensorflow.org/guide/tensor"&gt;Tensors&lt;/a&gt; here we come!). They are focused on performance, efficiency, and safety while not giving up on the readability of Java.&lt;/p&gt;

&lt;p&gt;If you are looking for a full feature update on Java 17 then check the following links:&lt;br&gt;
&lt;a href="https://www.oracle.com/news/announcement/oracle-releases-java-17-2021-09-14/"&gt;Oracle official release announcement&lt;/a&gt; / &lt;a href="https://openjdk.java.net/projects/jdk/17/jeps-since-jdk-11"&gt;JEPs since Java 11&lt;/a&gt; / &lt;a href="https://advancedweb.hu/a-categorized-list-of-all-java-and-jvm-features-since-jdk-8-to-17/"&gt;Updates from Java 8 to Java 17&lt;/a&gt; / &lt;a href="https://dev.to/sendilkumarn/java-enters-its-teen-age-4626"&gt;Java 13 features&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Special thanks to &lt;a href="https://twitter.com/BillyKorando"&gt;Billy Korando&lt;/a&gt; for the review.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>features</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Microservices with Kotlin, Kubernetes, and Linkerd</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Sat, 28 Nov 2020 17:17:58 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/microservices-with-kotlin-kubernetes-and-linkerd-4i4p</link>
      <guid>https://forem.com/sendilkumarn/microservices-with-kotlin-kubernetes-and-linkerd-4i4p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;KHipster is a development platform to generate, develop and deploy Spring Boot + Angular/React/Vue Fullstack Web applications and Spring microservices. KHipster is built on top of JHipster.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this post, we will do the following: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate microservices with KHipster using JHipster Description Language (JDL)&lt;/li&gt;
&lt;li&gt;Generate Kubernetes configuration using JDL&lt;/li&gt;
&lt;li&gt;Generate code using KHipster&lt;/li&gt;
&lt;li&gt;Create a Kubernetes cluster in GCP&lt;/li&gt;
&lt;li&gt;Install Linkerd CLI and deploy Linkerd in Kubernetes cluster&lt;/li&gt;
&lt;li&gt;Deploy ingress controller in Kubernetes&lt;/li&gt;
&lt;li&gt;Deploy applications in Kubernetes cluster&lt;/li&gt;
&lt;li&gt;Configure traffic to application&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let us get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate Microservices with KHipster
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install KHipster
&lt;/h3&gt;

&lt;p&gt;KHipster is available as an NPM package. To install it run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ npm i -g generator-jhipster-kotlin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Do not have Node installed? Check out &lt;code&gt;nvm&lt;/code&gt; (Node Version Manager) that makes it easy to setup Node - &lt;a href="https://github.com/nvm-sh/nvm/blob/master/README.md"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, verify the installation by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ khipster 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create JDL file
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;The JDL is a JHipster-specific domain language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;JDL provides a DSL to describe the applications, deployments, entities and their relationships. &lt;code&gt;Applications&lt;/code&gt; refer to the service as a whole, the application can be a monolith or microservice. The &lt;code&gt;deployments&lt;/code&gt; refer to the way to deploy the application it can be &lt;code&gt;kubernetes&lt;/code&gt;. The &lt;code&gt;entities&lt;/code&gt; straightaway maps to the database table in your application. The &lt;code&gt;relationships&lt;/code&gt; refers to the entity relationship &lt;code&gt;one-to-one&lt;/code&gt;, &lt;code&gt;one-to-many&lt;/code&gt;, etc.,. JDL simplifies the process of creating the microservices applications and entities.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Gateway application
application {
    config {
        applicationType         gateway
        authenticationType      jwt
        baseName                gateway
        buildTool               gradle
        clientFramework         react
        databaseType            sql
        devDatabaseType         h2Disk
        prodDatabaseType        mysql
        packageName             com.sendilkumarn
        serverPort              8080
        serviceDiscoveryType    no
    }
    entities *
} 

// Microservice application
application {
    config {
        applicationType         microservice
        authenticationType      jwt
        baseName                service
        buildTool               gradle
        databaseType            sql
        devDatabaseType         h2Disk
        prodDatabaseType        mysql
        packageName             com.sendilkumarn
        serverPort              8081
        serviceDiscoveryType    no
    }
    entities product
}

// Product entity 
entity product  {
    name    String  required
    price   Long    required
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have defined 2 applications: &lt;code&gt;gateway&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt;, and an entity: &lt;code&gt;product&lt;/code&gt;. The major difference between &lt;code&gt;gateway&lt;/code&gt; and &lt;code&gt;service&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gateway&lt;/code&gt; uses &lt;code&gt;clientFramework&lt;/code&gt; as &lt;code&gt;react&lt;/code&gt;, &lt;code&gt;applicationType&lt;/code&gt; as &lt;code&gt;gateway&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;service&lt;/code&gt; uses &lt;code&gt;applicationType&lt;/code&gt; as &lt;code&gt;microservice&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Refer we have used &lt;code&gt;serviceDiscoveryType no&lt;/code&gt;, this implies that we are not using serviceDiscovery in the microservices. We will use Linkerd for servicediscovery.&lt;/p&gt;

&lt;p&gt;Did you know? JHipster supports &lt;code&gt;sql&lt;/code&gt; and &lt;code&gt;noSql&lt;/code&gt; database and it has many configuration options for generating the applications. Check the entire list of application configuration options &lt;a href="https://www.jhipster.tech/jdl/applications#available-application-configuration-options"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Generate Kubernetes configuration
&lt;/h2&gt;

&lt;p&gt;KHipster provides &lt;code&gt;kubernetes&lt;/code&gt; option to generate the Kubernetes configuration file for the &lt;code&gt;JHipster&lt;/code&gt; generated applications. Interested to explore more about Kubernetes check out &lt;a href="https://sendilkumarn.com/blog/kubernetes-for-everyone"&gt;here&lt;/a&gt;. The &lt;code&gt;jdl&lt;/code&gt; accepts &lt;code&gt;deployment&lt;/code&gt; block to define the Kubernetes deployment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deployment {
  deploymentType         kubernetes
  appsFolders            [gateway, service]
  dockerRepositoryName   "sendilkumarn"
  serviceDiscoveryType   no
  istio                  false
  kubernetesNamespace    khipster
  kubernetesServiceType  Ingress
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: It checks whether you have installed Docker since we need Docker for creating and pushing the images and use them later. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Kubernetes definition is made inside the &lt;code&gt;deployment&lt;/code&gt; block with &lt;code&gt;deploymentType&lt;/code&gt; as &lt;code&gt;kubernetes&lt;/code&gt;. The &lt;code&gt;appsFolders&lt;/code&gt; points to the folders of the generated applications. We define the &lt;code&gt;dockerRepositoryName&lt;/code&gt;, this refers to docker user name here. Similar to applications, we define the &lt;code&gt;serviceDiscoveryType&lt;/code&gt; as &lt;code&gt;no&lt;/code&gt; (since we are going to use &lt;code&gt;Linkerd&lt;/code&gt; for service discovery). KHipster provides &lt;code&gt;istio&lt;/code&gt; out of the box, since we are going to use &lt;code&gt;Linkerd&lt;/code&gt; for that. We define the Kubernetes namespace using &lt;code&gt;kubernetesNamespace&lt;/code&gt; property. All the deployments &amp;amp; services use &lt;code&gt;khipster&lt;/code&gt; namespace to deploy the application. &lt;/p&gt;

&lt;p&gt;Finally, We use &lt;code&gt;Ingress&lt;/code&gt; as the &lt;code&gt;KubernetesServiceType&lt;/code&gt; configuration. The smallest deployment unit of Kubernetes is a &lt;code&gt;pod&lt;/code&gt;. A pod is a group of Docker containers. Refer here for more information about the &lt;a href="https://sendilkumarn.com/blog/kubernetes-pods"&gt;pods&lt;/a&gt;. Each pod gets IP address during its creation. If we have to access the application we have to connect to the pod's IP address (with port if applicable). In the Kubernetes cluster, pods are created and destroyed automatically based on various factors. So when a pod spawns newly, IP address referring them might change.In order to connect to running applications in the pods, we use services. Services define a set of pods and a way to access them. The services is like a loadbalancer or service discoverer that helps to identify the pods with a name to it. &lt;/p&gt;

&lt;p&gt;Kubernetes provide three types of service type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cluster IP  - This exposes service to an cluster internal IP &lt;/li&gt;
&lt;li&gt;Nodeport  - This exposes the service to an port &lt;/li&gt;
&lt;li&gt;Load Balancer - This exposes the service to an external IP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/"&gt;Kube-DNS&lt;/a&gt;, Kubernetes also maps the service to an external name. Refer &lt;a href="https://kubernetes.io/docs/concepts/services-networking/service/"&gt;here&lt;/a&gt; for more infomration.&lt;/p&gt;

&lt;p&gt;Ingress is not a service type, but with Ingress you can expose the service. The ingress acts as an entry point for your cluster. It is ideal for exposing multiple services under the same IP address.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We need &lt;code&gt;ingress-controller&lt;/code&gt; to expose services via ingress IP, we will set up ingress-controller below.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Generate code using KHipster
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;khipster import-jdl&lt;/code&gt; imports the &lt;code&gt;JDL&lt;/code&gt; file and generates the application and the deployment configuration files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ khipster import-jdl app.jdl

Gateway application generated successfully.
Service application generated successfully.
Kubernetes configuration generated successfully.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login the docker using &lt;code&gt;docker login&lt;/code&gt;. Now go and build each services in their respective folders:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ ./gradlew bootJar -Pprod jib -Djib.to.image=&amp;lt;docker-username&amp;gt;:&amp;lt;app-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a Kubernetes cluster in GCP
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Install gcloud &lt;a href="https://cloud.google.com/sdk/docs/install"&gt;here&lt;/a&gt;.&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;λ gcloud beta container --project &amp;lt;project-name&amp;gt; clusters create "khipster-cluster" --machine-type "c2-standard-4" --num-nodes "2" --zone "us-central1-c"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We create a cluster named &lt;code&gt;khipster-cluster&lt;/code&gt; in the given project. We define the &lt;code&gt;machine-type&lt;/code&gt; with &lt;code&gt;c2-standard-4&lt;/code&gt; with 2 nodes in the &lt;code&gt;us-central1-c&lt;/code&gt; zone. This will take a while to complete, since it has to create a cluster from the scratch.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Explore more about K8s installation in the GCP &lt;a href="https://cloud.google.com/kubernetes-engine/docs/quickstart"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Install Linkerd CLI and deploy Linkerd in Kubernetes cluster
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Linkerd is a &lt;code&gt;service mesh&lt;/code&gt; for Kubernetes. Linkerd makes running services easier and safer by giving you runtime debugging, observability, reliability, and security—all without requiring any changes to your code. - &lt;a href="https://linkerd.io/2/overview/"&gt;Linkerd website&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Install the CLI manually in your system and set up the path, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ curl -sL https://run.linkerd.io/install | sh
Linkerd stable-2.9.0 was successfully installed 🎉

λ export PATH=$PATH:$HOME/.linkerd2/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the installation by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ linkerd version
Client version: stable-2.9.0
Server version: unavailable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation is completed. Before installing the Linkerd in the Kubernetes cluster, we wil check whether the Kubernetes cluster is configured correctly. We run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ linkerd check --pre
....
Status check results are √
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The above command checks whether the kubernetes cluster is configured correctly and ready to install the Linkerd control plane.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Note: The bare Kubernetes configuration might not have the required cluster admin role. To create the &lt;code&gt;clusterrolebinding&lt;/code&gt; with &lt;code&gt;cluster-admin&lt;/code&gt; role for the selected account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ kubectl create clusterrolebinding cluster-admin-binding \
  --clusterrole=cluster-admin \
  --user="$(gcloud config get-value core/account)"

clusterrolebinding.rbac.authorization.k8s.io/cluster-admin-binding created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install the Linkerd on the Kubernetes cluster, run the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ linkerd install | kubectl apply -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;linkerd install&lt;/code&gt; command creates the kubernetes configuration files. We pipe the configuration files using &lt;code&gt;kubectl apply -f&lt;/code&gt; command on those generated files. This will create the complete &lt;code&gt;linkerd&lt;/code&gt; in the kubernetes cluster. Once the installation is complete refer the installation is complete using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ linkerd check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploy ingress controller in Kubernetes
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Ingress exposes &lt;code&gt;HTTP&lt;/code&gt; and &lt;code&gt;HTTPS&lt;/code&gt; routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ingress provides an external IP with which we connect to the services running inside the Kubernetes cluster. The Ingress also provides load balancing, SSL / TLS, and others. We will install a vanilla version Nginx ingress controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.2/deploy/static/provider/cloud/deploy.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the ingress-controller is installed in the Kubernetes cluster. Get the IP address by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ kubectl get svc ingress-nginx-controller -n ingress-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
xxx.xxx.xxx.xxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our application will be accessible via the above IP address.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy applications in Kubernetes cluster
&lt;/h2&gt;

&lt;p&gt;To deploy applications in to the Kubernetes cluster, go into the Kubernetes folder and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ ./kubectl-apply.sh apply -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All the deployments and services will be installed in the K8s cluster. Now we need to auto inject Linkerd into the &lt;code&gt;khipster&lt;/code&gt; namespace for all the services in that particular namespace. &lt;/p&gt;

&lt;p&gt;Next, let's add Linkerd to &lt;code&gt;khipster&lt;/code&gt; namespace by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;λ kubectl get -n khipster deploy -o yaml \
  | linkerd inject - \
  | kubectl apply -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You can also inject proxy automatically. Refer &lt;a href="https://linkerd.io/2/features/proxy-injection/"&gt;here&lt;/a&gt; for more information.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now the Kubernetes cluster is ready with all the necessary configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure traffic to application
&lt;/h2&gt;

&lt;p&gt;Now the final step is to map the ingress service to the services. Note the &lt;code&gt;annotation&lt;/code&gt; in the &lt;code&gt;metadata&lt;/code&gt; section, the Nginx uses the proxy header to proxy the HTTP traffic. Refer &lt;a href="https://linkerd.io/2/tasks/using-ingress/"&gt;here&lt;/a&gt; for more information.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: web-ingress
  namespace: khipster
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;

spec:
  rules:
  - host: &amp;lt;ip-address&amp;gt;.nip.io
    http:
      paths:
      - path: /
        backend:
          serviceName: gateway
          servicePort: 80
      - path: /service
        backend:
          serviceName: service
          servicePort: 8081
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;.nip.io refer the nip.io at the end. nip.io helps to redirect check &lt;a href="https://nip.io/"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have also defined the &lt;code&gt;spec&lt;/code&gt; section. The spec section provides the rules for redirection. We provide the host and map the path to the service with their name. Viola! Now the application is ready! Go to &lt;code&gt;&amp;lt;ip-address&amp;gt;.nip.io&lt;/code&gt; to check your microservices running. &lt;/p&gt;

&lt;p&gt;Linkerd comes with &lt;code&gt;dashboard&lt;/code&gt; &amp;amp; &lt;code&gt;grafana&lt;/code&gt; to monitor the services, traffic, and everything. You can check them out using &lt;code&gt;linkerd dashboard&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://twitter.com/sendilkumarn"&gt;🐦 Twitter&lt;/a&gt; // &lt;a href="https://github.com/sendilkumarn"&gt;💻 GitHub&lt;/a&gt; // &lt;a href="https://sendilkumarn.com/blog"&gt;✍️ Blog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cloud</category>
      <category>kotlin</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Open Source</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Sun, 05 Jul 2020 21:26:30 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/upgrade-pen-s-urce-experience-1fok</link>
      <guid>https://forem.com/sendilkumarn/upgrade-pen-s-urce-experience-1fok</guid>
      <description>&lt;p&gt;Open-source is everywhere. There is an extremely high chance that you used more than one open-source library in your last project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The power of the open-source is the power of the people. The people rule - Philippe Kahn&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The open-source has a lot of benefits, they include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;learning&lt;/li&gt;
&lt;li&gt;hands-on experience&lt;/li&gt;
&lt;li&gt;exposure (you to the community and vice versa)&lt;/li&gt;
&lt;li&gt;collaboration &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are not contributing to open source, then it is a good time to start. Some links that might help are -&amp;gt; &lt;a href="https://github.com/explore" rel="noopener noreferrer"&gt;GitHub explore&lt;/a&gt;, &lt;a href="https://github.com/topics/good-first-issue" rel="noopener noreferrer"&gt;Good First Issues&lt;/a&gt;, &lt;a href="https://dev.to/listings/collabs"&gt;Collaborators needed&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While projects from big companies are attractive and give you more exposure. There are plenty of ideas/projects out there looking for contributors. &lt;em&gt;Be a part of the next big thing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please do consider contributing to the idea that you love.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The open-source community is growing exponentially, as maintainers, we must ensure certain standards.&lt;/p&gt;




&lt;h1&gt;
  
  
  Appreciate / Recognize / Reward
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Maintainers 👏 -&amp;gt; 🤝 -&amp;gt; 💰
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer: I know we (maintainers) juggle between many roles. But we should understand that we are shaping the community.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Appreciate&lt;/strong&gt; the contributor. The project might have gazillion stars and thousands of contributors. No matter what appreciate the contributor. They spent their invaluable time to build your dream. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Irrespective of whatever the quality/quantity of the contribution, appreciate. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If it is a &lt;code&gt;first-time contributor&lt;/code&gt; then congratulate them, make them feel welcomed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the contributor is consistent and looking for ways to contribute more, then &lt;strong&gt;Recognize&lt;/strong&gt; them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a team, and ask them to join the team. &lt;a href="https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; provides granular control for the teams, create a team, and add every contributor to that team. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reward&lt;/strong&gt; them if you have the funds. Projects like &lt;a href="https://webpack.js.org" rel="noopener noreferrer"&gt;Webpack&lt;/a&gt; / &lt;a href="https://jhipster.tech" rel="noopener noreferrer"&gt;JHipster&lt;/a&gt; reward the contributors for their contribution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If your project is funded, then share it with the community. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Users 👏 -&amp;gt; ✨ -&amp;gt; 💰
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Appreciate&lt;/strong&gt; the project and the maintainers.&lt;/p&gt;

&lt;p&gt;The product/software is not created in a single day. The maintainers put in hours and hours of dedicated work to make it work. So always respect and appreciate them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Even if there are some mistakes, please fix them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Recognize&lt;/strong&gt; the project. Give &lt;code&gt;stars 💫&lt;/code&gt; if you like it. Share it on social media. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reward&lt;/strong&gt; them if you have funds or time. Fix that long-standing bug or donate a coffee to the maintainer. &lt;/p&gt;




&lt;h1&gt;
  
  
  Give constructive feedback 💬 💬 💬
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Maintainers
&lt;/h3&gt;

&lt;p&gt;The quality of the Pull Request may not be perfect always. Remember the person contributing may be new or have a different understanding. &lt;/p&gt;

&lt;p&gt;Give constructive feedback. Instead of pointing the mistake, show them how to correct them. &lt;/p&gt;

&lt;p&gt;If you have to close the work (Pull Request), give enough context why did you close it and at the very least wait for the approval before doing so.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Imagine how frustrated you were, when your last manager dismissed all the efforts that you made. Don't be like that.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Naturally, people like to contribute more if they feel welcomed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Users
&lt;/h3&gt;

&lt;p&gt;Please do respect the decisions made in the project. If you don't like a decision, but the project maintainers insist to go in that way, accept it. The answer is &lt;code&gt;fork&lt;/code&gt; and not public shaming.&lt;/p&gt;

&lt;p&gt;The same &lt;em&gt;constructive feedback&lt;/em&gt; applies to you. If a maintainer makes a mistake, be constructive. At the end of the day, they are people too.&lt;/p&gt;

&lt;p&gt;If you are an expert in the field, then encourage best practices and guide them. Not all project maintainers know everything, it is important to remember "open-source is all about the power of the people". &lt;/p&gt;




&lt;h1&gt;
  
  
  Document 📝
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Maintainers
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Document anything and everything. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Believe it or not! Documentation saves both your and users' time. Features are mandatory but documentation is an absolute necessity. &lt;/p&gt;

&lt;p&gt;When documenting, add the following scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The basic usage (the default way to use your product)&lt;/li&gt;
&lt;li&gt;The tips and tricks (that increases your user's productivity)&lt;/li&gt;
&lt;li&gt;The essentials that your users need to know &lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;Contribution&lt;/code&gt; guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and others.&lt;/p&gt;

&lt;p&gt;Think documentation as a feature, not as an overhead.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1276998490246262787-545" src="https://platform.twitter.com/embed/Tweet.html?id=1276998490246262787"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1276998490246262787-545');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1276998490246262787&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h3&gt;
  
  
  Users
&lt;/h3&gt;

&lt;p&gt;Understand it is not always possible to document everything. If something is missing, please do contribute. &lt;/p&gt;

&lt;p&gt;Create a blog post, add links to the wiki page (if the project has one). Tell it to the maintainers, ask them for a review (if needed). &lt;/p&gt;

&lt;p&gt;When using the product, you hit a roadblock, found a solution, document it, and share it with the community.&lt;/p&gt;

&lt;p&gt;Always remember, in documentation, every single bit matters. &lt;/p&gt;




&lt;h1&gt;
  
  
  Do not enforce complex / stringent rules 👾 👾 👾
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Maintainers
&lt;/h3&gt;

&lt;p&gt;Often, some projects impose an incredible amount of perfection. Like your commit message should be in this tense, the issue should have the GitHub issue number, and others. &lt;/p&gt;

&lt;p&gt;Please do not ever impose them. Have a system that automatically handles this or stop asking for it. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Always remember people are helping you to build your vision, enable them rather than blocking them. Make it easy for them.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Users
&lt;/h3&gt;

&lt;p&gt;Certain projects have stringent rules for many reasons. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are some good practices to follow. &lt;/li&gt;
&lt;li&gt;They make it easier for maintainers, in their process.&lt;/li&gt;
&lt;li&gt;They provide a great name for the project.&lt;/li&gt;
&lt;li&gt;Always green build increases the confidence in the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Please read the contribution guidelines, if you understand and accept everything then contribute. &lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a href="https://twitter.com/sendilkumarn" rel="noopener noreferrer"&gt;🐦 Twitter&lt;/a&gt; | &lt;a href="https://github.com/sendilkumarn" rel="noopener noreferrer"&gt;💻 GitHub&lt;/a&gt; | &lt;a href="https://sendilkumarn.com/blog" rel="noopener noreferrer"&gt;✍️ Blog&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Share your Open-source experience or idea to make it even better :) &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>beginners</category>
    </item>
    <item>
      <title>✨Awesome fonts to code 💻</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Mon, 22 Jun 2020 15:01:07 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/what-the-font-o71</link>
      <guid>https://forem.com/sendilkumarn/what-the-font-o71</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmab5ddwvd4iakf676vt9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmab5ddwvd4iakf676vt9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We spend a lot of time interacting with type. They influence our thinking, alter trust, determine context, and play with our productivity. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In these weird times where our screen times skyrocket. We should do something to ease our contextual burden and increase our productivity. &lt;/p&gt;

&lt;p&gt;This is a list of awesome fonts that will make your code look even more elegant and concise (and makes your more productive 🤞). &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This is a personal favourite list (and almost all of them are mono). Please feel free to comment your favourite.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Fira Code Mono
&lt;/h1&gt;

&lt;p&gt;Any font list is incomplete, without this classic font. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/tonsky/FiraCode" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo1uxtygefqz4qb3001ul.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fo1uxtygefqz4qb3001ul.png" alt="Fira Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Hasklig
&lt;/h1&gt;

&lt;p&gt;This is forked from Source Code Pro and added some nice ligatures in it. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/i-tu/Hasklig" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu0zrdzo3vflulxhs63mw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu0zrdzo3vflulxhs63mw.png" alt="Hasklig"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Source Code Pro
&lt;/h1&gt;

&lt;p&gt;This one from Adobe is awesome. It is clean and crisp. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/adobe-fonts/source-code-pro" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnpkl6u0rx0w276k7coah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnpkl6u0rx0w276k7coah.png" alt="Source Code Pro"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Anonymous Pro
&lt;/h1&gt;

&lt;p&gt;It is fixed width font designed for coding. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://www.marksimonson.com/fonts/view/anonymous-pro" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fazik8fdqe62xt50q82ft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fazik8fdqe62xt50q82ft.png" alt="Anonymous"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Fantasque
&lt;/h1&gt;

&lt;p&gt;A cool and refreshing font. This font has some handwriting like ligatures. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/belluzj/fantasque-sans" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffnq0bn2n5iovsv39yy3q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffnq0bn2n5iovsv39yy3q.png" alt="Fantasque Sans Mono"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Jetbrains Mono
&lt;/h1&gt;

&lt;p&gt;This one is from the Jetbrains. They already have cool abstract images in their IDE startups. The font is bit oversized but once again it is awesome. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/JetBrains/JetBrainsMono" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fubx4ovzw1sg1o7avw3ej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fubx4ovzw1sg1o7avw3ej.png" alt="JetBrains Mono"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Monoid
&lt;/h1&gt;

&lt;p&gt;It is sharp, bit taller. But the font looks great even in low resolution displays. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://larsenwork.com/monoid/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnjug1qqvlreh0s78i5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnjug1qqvlreh0s78i5b.png" alt="Monoid"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Cascadia Code
&lt;/h1&gt;

&lt;p&gt;Windows was the first machine that I ever had. And I used it for a long time at my work (now don't judge me). So this one was my long time favourite. Recently I saw they have open sourced it and it brings back a lot of memories. &lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://github.com/microsoft/cascadia-code" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fucr87e8skdeab5085gzi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fucr87e8skdeab5085gzi.png" alt="Cascadia Code Mono"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Dank (Paid)
&lt;/h1&gt;

&lt;p&gt;This one is pretty cool. But it is paid. I haven't used it personally, but used this in some of my slides (via carbon.now.sh)&lt;/p&gt;

&lt;p&gt;Type: Mono | &lt;a href="https://dank.sh" rel="noopener noreferrer"&gt;Buy it here&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5m8yuombjupwv54v9piv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5m8yuombjupwv54v9piv.png" alt="Dank Mono"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Special Mentions
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.typography.com/fonts/operator/styles" rel="noopener noreferrer"&gt;Operator Mono - Paid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rubjo.github.io/victor-mono/" rel="noopener noreferrer"&gt;Victor Mono&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.apple.com/fonts/" rel="noopener noreferrer"&gt;SF Mono&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/IBM/plex/releases/tag/v5.0.0" rel="noopener noreferrer"&gt;IBM Plex Mono&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.monolisa.dev" rel="noopener noreferrer"&gt;Monolisa&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Menlo&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Voila, meanwhile you have also learnt &lt;code&gt;quickSort&lt;/code&gt; using Haskell 😜&lt;/p&gt;

&lt;p&gt;Did you know? &amp;gt;&amp;gt; You can customise your dev.to font &lt;a href="https://dev.to/settings/ux"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is your favourite font? &lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;What is in the font?&lt;/em&gt; Check out this book -&amp;gt; &lt;a href="https://www.amazon.co.uk/Why-Fonts-Matter-Sarah-Hyndman/dp/0753557231" rel="noopener noreferrer"&gt;Why Fonts Matter - Sarah Hyndman&lt;/a&gt; &lt;/p&gt;




&lt;p&gt;&lt;a href="https://twitter.com/sendilkumarn" rel="noopener noreferrer"&gt;🐦 Twitter&lt;/a&gt; | &lt;a href="https://github.com/sendilkumarn" rel="noopener noreferrer"&gt;💻 GitHub&lt;/a&gt; | &lt;a href="https://sendilkumarn.com/blog" rel="noopener noreferrer"&gt;✍️ Blog&lt;/a&gt;&lt;/p&gt;




</description>
      <category>productivity</category>
      <category>coding</category>
      <category>discuss</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>Speed up JavaScript execution 🚀🚀🚀</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Sun, 03 May 2020 17:25:42 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/boost-your-javascript-performance-2fbl</link>
      <guid>https://forem.com/sendilkumarn/boost-your-javascript-performance-2fbl</guid>
      <description>&lt;p&gt;As a developer, we always look for ways to make our code faster and better. &lt;/p&gt;

&lt;p&gt;But before that, writing high performance code requires three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Know about the language and how it works&lt;/li&gt;
&lt;li&gt;Design based on the use case&lt;/li&gt;
&lt;li&gt;Debug! Fix! Repeat!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember this, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Fowler&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let us see how to make JavaScript code to run even faster. &lt;/p&gt;

&lt;h1&gt;
  
  
  Be lazy
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;A lazy algorithm defers computation until it is necessary to execute and then produces a result.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;someFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;doSomeOperation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
      &lt;span class="nf"&gt;doExpensiveOperation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;someArray&lt;/span&gt;
             &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;checkSomeCondition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
             &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;someFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; 

&lt;span class="c1"&gt;// Now execute the expensive operation only when needed.&lt;/span&gt;
&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;t&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;TL;DR; The fastest code is the code that is not executed. So try to defer execution as much as possible. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Beware of object chaining
&lt;/h1&gt;

&lt;p&gt;The JavaScript uses &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain" rel="noopener noreferrer"&gt;prototype inheritance&lt;/a&gt;. All the objects in the JavaScript world are instances of the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" rel="noopener noreferrer"&gt;Object&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The MDN says, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When trying to access a property of an object, the property will not only be sought on the object but on the prototype of the object, the prototype of the prototype, and so on until either a property with a matching name is found or the end of the prototype chain is reached.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For every property the JavaScript engine will have to go through the entire object chain until it finds a match. This is so resource intensive and hogs on your application performance if not used correctly.&lt;/p&gt;

&lt;p&gt;So don't do this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead do this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;TL;DR; Use temporary variable to hold the chained properties. Rather than repeatedly going through the chain.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Think before using transpilers
&lt;/h1&gt;

&lt;p&gt;In the above case, the &lt;code&gt;userResponse&lt;/code&gt; may or may not have the &lt;code&gt;data&lt;/code&gt; object. That &lt;code&gt;data&lt;/code&gt; object may or may not have the &lt;code&gt;user&lt;/code&gt; property.&lt;/p&gt;

&lt;p&gt;We can check that while getting the value like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
             &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
             &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well that is verbose. More the code, more the surface for bugs. Can we shrink it? of course, JavaScript has &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining" rel="noopener noreferrer"&gt;Optional chaining&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" rel="noopener noreferrer"&gt;destructuring assignment&lt;/a&gt; to make things less verbose.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Isn't it slick? Modern? But beware when using things like this, the Babel transpile them as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;use strict&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;_userResponse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;_userResponse$data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_userResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userResponse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;_userResponse&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_userResponse$data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_userResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;_userResponse$data&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_userResponse$data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;_user$firstname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_user$firstname&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_user$firstname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;_user$lastname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;lastname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_user$lastname&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;_user$lastname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;TL;DR; When using transpiling, make sure you choose the one that is more optimal for your use case. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Know SMI and heap numbers
&lt;/h1&gt;

&lt;p&gt;Numbers are weird. The ECMAScript standardizes numbers as 64-bit floating-point values, also known as &lt;code&gt;double precision floating-point&lt;/code&gt; or &lt;code&gt;Float64&lt;/code&gt; representation. &lt;/p&gt;

&lt;p&gt;If the JavaScript engines store numbers in Float64 representation then it will lead to huge performance inefficiency. JavaScript Engines abstract the numbers such that its behavior matches Float64 exactly. The JavaScript engine executes integer operations much faster than compared to the &lt;code&gt;float64&lt;/code&gt; operations.&lt;/p&gt;

&lt;p&gt;For more details, check &lt;a href="https://v8.dev/blog/react-cliff" rel="noopener noreferrer"&gt;this&lt;/a&gt; out.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR; Use SMI (small integers) wherever possible. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Evaluate Local Variables
&lt;/h1&gt;

&lt;p&gt;Sometimes, folks think that it is readable to supply a value like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;maxWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1000&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;minWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;10&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;getWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;maxWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;maxWidth&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;minWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;minWidth&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What if the &lt;code&gt;getWidth&lt;/code&gt; function is called multiple times, the value is getting computed every time when you call it. The above calculation is not a big deal and you wouldn't notice any performance impact because of that. &lt;/p&gt;

&lt;p&gt;But in general, lesser the evaluation at the runtime better the performance is.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// maxWidth - (margin * 2)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;maxWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;980&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// minWidth - (margin * 2)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;minWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;80&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;10&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;getWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;maxWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;minWidth&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;lesser the evaluation (at runtime) better the performance.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Use Map instead of switch / if-else conditions
&lt;/h1&gt;

&lt;p&gt;Whenever you want to check multiple conditions, use a &lt;code&gt;Map&lt;/code&gt; instead of &lt;code&gt;switch&lt;/code&gt; / &lt;code&gt;if-else&lt;/code&gt; condition. The performance of looking up elements in a &lt;code&gt;map&lt;/code&gt; is much more &lt;strong&gt;faster&lt;/strong&gt; than the evaluation of &lt;code&gt;switch&lt;/code&gt; and &lt;code&gt;if-else&lt;/code&gt; condition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;day&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;monday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tuesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;wednesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;thursday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;friday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;saturday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;funday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sunday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;funday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// or this&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;monday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tuesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;wednesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;thursday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;friday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;funday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of both use this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;monday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tuesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;wednesday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;thursday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;friday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;workday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;saturday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;funday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sunday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;funday&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;day&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;TL; DR; Use Map instead of switch / if-else conditions&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  if-else ordering
&lt;/h1&gt;

&lt;p&gt;For example if you are writing a React component, it is very common to follow this pattern.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;UserList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// some resource intensive operation.&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserList&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;EmptyUserList&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we render &lt;code&gt;&amp;lt;EmptyUserList /&amp;gt;&lt;/code&gt; when there are no users or render &lt;code&gt;&amp;lt;UserList /&amp;gt;&lt;/code&gt;. I have seen people argue that we have to handle all the negative scenarios at first and then handle the positive ones. They often come up with an argument, it is clearer for any one who reads it and also it is much more efficient. That is the following code is more efficient than the previous one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;UserList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;EmptyUserList&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// some resource intensive operation&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;UserList&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But what if the &lt;code&gt;users.length&lt;/code&gt; always evaluate true. Use that first and then the negative condition.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR; While designing &lt;code&gt;if-else&lt;/code&gt; condition, order them in such a way that the number of conditions evaluated is lesser.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1252952154966560768-513" src="https://platform.twitter.com/embed/Tweet.html?id=1252952154966560768"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1252952154966560768-513');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1252952154966560768&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h1&gt;
  
  
  Types are your best friends
&lt;/h1&gt;

&lt;p&gt;JavaScript is both interpreted and compiled language. The compiler in order to produce more efficient binary requires type information. But being a dynamically typed language makes it difficult for the compilers. &lt;/p&gt;

&lt;p&gt;The compilers when compiling the hot code (the code that is executed many times), makes some assumptions and optimise the code. The compiler spends some time to produce this optimised code. When these assumption fails, the compilers has to throw away the optimised code and fallback to the interpreted way to execute. This is time consuming and costly. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR; Use Monomorphic types always.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Others
&lt;/h1&gt;

&lt;p&gt;Avoid recursion, sure they are awesome and more readable. But they also affect the performance. &lt;/p&gt;

&lt;p&gt;Use memoization wherever and whenever possible.&lt;/p&gt;

&lt;p&gt;Sometimes &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators" rel="noopener noreferrer"&gt;bitwise&lt;/a&gt; and unary operators give a slight edge in the performance. But they are really useful when your performance budget is very tight.&lt;/p&gt;




&lt;p&gt;Discussions &lt;a href="https://twitter.com/sendilkumarn" rel="noopener noreferrer"&gt;🐦 Twitter&lt;/a&gt; // &lt;a href="https://github.com/sendilkumarn" rel="noopener noreferrer"&gt;💻 GitHub&lt;/a&gt; // &lt;a href="https://sendilkumarn.com/blog" rel="noopener noreferrer"&gt;✍️ Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like this article, please leave a like or a comment. ❤️&lt;/p&gt;




</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>webperf</category>
      <category>node</category>
    </item>
    <item>
      <title>9 ways to level up your browser devtool skills</title>
      <dc:creator>Sendil Kumar</dc:creator>
      <pubDate>Thu, 09 Apr 2020 23:56:49 +0000</pubDate>
      <link>https://forem.com/sendilkumarn/level-up-your-browser-skills-8gh</link>
      <guid>https://forem.com/sendilkumarn/level-up-your-browser-skills-8gh</guid>
      <description>&lt;p&gt;This is a list of amazing things that browsers can help you with while developing web applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Colors
&lt;/h1&gt;

&lt;p&gt;Wondering 🤔, What is the &lt;code&gt;hex&lt;/code&gt; code for that &lt;code&gt;rgb&lt;/code&gt; value? Chrome provides an easy way to get it. Open &lt;code&gt;DevTools&lt;/code&gt; and &lt;code&gt;shift + click&lt;/code&gt; on the color(swatch) to see their corresponding &lt;code&gt;hex | rgb | hsl&lt;/code&gt; value. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1m465xm6bqfgc1w0keya.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1m465xm6bqfgc1w0keya.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Animation
&lt;/h1&gt;

&lt;p&gt;Wondering how to tweak the animation? Use the animation editor in the devtools. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can choose animation timing from a set of pre-defined functions. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzkrxizf0bopn7a5p6ml2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzkrxizf0bopn7a5p6ml2.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can slow down the animation and play with it to understand/debug how it works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjgpazezn18z20hfpo0rf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjgpazezn18z20hfpo0rf.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  3. Shadow Editor
&lt;/h1&gt;

&lt;p&gt;Shadows are tricky. Master box/text-shadow using the inline editor. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faok2xi4htxb6kufjq4zj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Faok2xi4htxb6kufjq4zj.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  4. Command tool
&lt;/h1&gt;

&lt;p&gt;Chrome provides &lt;code&gt;Command tool&lt;/code&gt; to access files / actions. Use &lt;code&gt;Cmd&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;P&lt;/code&gt; inside the &lt;code&gt;Dev tools&lt;/code&gt; to open the &lt;code&gt;Command tool&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F041ow2ii2l2wsrwdwm4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F041ow2ii2l2wsrwdwm4c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  5. Coverage
&lt;/h1&gt;

&lt;p&gt;Check your CSS coverage. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fimcy2zyufsagf13mpkgk.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fimcy2zyufsagf13mpkgk.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Open Command tool and search for &lt;code&gt;coverage&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  6. Rendering
&lt;/h1&gt;

&lt;p&gt;Wondering about the FPS, Layout / Paint in the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpb2r02hy9m3cdek9cr04.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpb2r02hy9m3cdek9cr04.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Open Command tool and search for &lt;code&gt;rendering&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  7. Emulate dark mode
&lt;/h1&gt;

&lt;p&gt;Use the emulator to switch between dark and light mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3h3cmoqlsbzi1vtiiscl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3h3cmoqlsbzi1vtiiscl.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  8. Sensors
&lt;/h1&gt;

&lt;p&gt;If you are creating an application that requires location based user experience, then you can use the sensors to change the location. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftr4hn1lry3mfizr6gra5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftr4hn1lry3mfizr6gra5.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To open sensors, press &lt;code&gt;cmd&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;p&lt;/code&gt; and then type sensors to open the &lt;code&gt;show sensors&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  9. Short cut keys :)
&lt;/h1&gt;

&lt;p&gt;Go straight to Address/Search bar using &lt;code&gt;cmd&lt;/code&gt; + &lt;code&gt;L&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Navigate through the tabs using &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;tab&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Navigate tabs with the tab numbers &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;num-key&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Go to the last tab using &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;1&lt;/code&gt;.&lt;br&gt;
Go to the last tab using &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;9&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;Discussions &lt;a href="https://twitter.com/sendilkumarn" rel="noopener noreferrer"&gt;🐦 Twitter&lt;/a&gt; // &lt;a href="https://github.com/sendilkumarn" rel="noopener noreferrer"&gt;💻 GitHub&lt;/a&gt; // &lt;a href="https://sendilkumarn.com/blog" rel="noopener noreferrer"&gt;✍️ Blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you like this article, please leave a like or a comment. ❤️&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>css</category>
      <category>javascript</category>
      <category>browsers</category>
    </item>
  </channel>
</rss>
