Do Software Developers Normally Code on Weekends? Work-life Balance and Overtime in the Tech Industry

Despite all the perks tech companies offer to employees these days (unlimited PTOs, catered lunches, refreshments, beer on tap, dog friendly offices, gyms, yoga classes), there is often an indirect or hidden pressure on software engineers to put in more hours or to code on weekends. I have heard managers say things like:

  • “You can call me on the weekend or even at night if you have any questions. I will answer your phone because I’ll be working anyways.”
  • “Sam is an amazing engineer. So dedicated and such a hardworker. He couldn’t finish his tasks because he was blocked for two days by the other team so he spent all weekend coding.”
  • “I’m so proud of my team. They regularly stayed late and worked weekends to deliver on our roadmap.”
  • “We’ll be using the new technology XYZ for this project. Why don’t you start learning XYZ in your ‘free time’ (aka the weekend)?”

Subtle hints like these leave many developers wondering whether working on weekends a normal thing that is expected from us as software engineers.

Which brings us to the question: “Is it OK to not code for work on the weekends?”

Read More...

GraphQL - A Practical Overview and Hands-On Tutorial

GraphQL is a modern data query language. It features extremely powerful declarative data fetching syntax which clients use to specify what data they need. Once the query is processed, clients get back the data that they requested. This blog post is a hands-on introduction to GraphQL and its features. It’s not a comprehensive overview that does a deep-dive into internals, rather it is designed to give you an understanding of what GraphQL, important concepts and how to use it using real examples (that you’ll try out in your browser.) It assumes no previous knowledge of GraphQL. Let’s get started.

Read More...

== vs === in Javascript and Which Should be Used When

In Javascript, we have couple of options for checking equality:

  • == (Double equals operator): Known as the equality or abstract comparison operator
  • === (Triple equals operator): Known as the identity or strict comparison operator

In this post, we’ll explore the similarities and differences between these operators.

Read More...

What are -Xms and -Xms parameters in Java/JVM (Updated up to Java 13)

In short,

  • Xmx specifies the maximum heap size available to an application
  • Xms specifies the minimum heap size available to an application

These are Java Virtual Machine (JVM) parameters that are used to specify memory boundaries for Java applications. They are often used when troubleshooting performance issues or OutOfMemoryErrors. They control the amount of memory that is available to a Java application. The Xmx parameter specifies the maximum memory an app can use, where as Xms specifies the minimum or the initial memory pool. If your application exceeds the maximum memory (allocated using the Xmx) and the garbage collector cannot free up memory, the JVM will crash with a OutOfMemoryError. If you’re interested, I wrote an article explaining with examples how garbage collection works and its generations.

Read More...

Spring Boot - Replace Tomcat With Jetty As the Embedded Server

Apache Tomcat and Eclipse Jetty are popular web servers and javax.servlet containers for Java. Many people prefer Tomcat (standalone) in production and its widely used compared to Jetty. On the other hand, Jetty is light-weight and has a smaller CPU and memory footprint. I have used Jetty in production for high-throughput REST API applications and its performance has been fantastic.

Many developers prefer to use Jetty when developing and testing on their local machines. Spring Boot web starter uses Tomcat as the default embedded server. I frequently find myself changing from Tomcat to Jetty on my Spring Boot projects.

In this post, we’ll take a look at steps to replace Tomcat with Jetty in Spring Boot projects.

Read More...