The 2021 Java Developer RoadMap [UPDATED]

Hello guys, first of all, I wish you a very Happy New Year 2021. I have been sharing a lot of roadmaps to become a Web developer, DevOps engineer, and recently React.js developer. One of the requests I received from many of my readers was for creating a Java Developer Roadmap. Since Java is my expertise, It wasn't a problem to create a Java Developer Roadmap, but it took slightly longer for me to create one because of the limited time I get. Anyway, I am finally ready to share my Java developer RoadMap with you. This Roadmap contains my years of experience and the unobstructed path of how to become a Java expert. It answers many burning questions like which technologies a Java developer should learn? What tools make you a better Java developer? And, which framework a Java developer must absolutely learn.

10 Tips to Become a Better Java Developer in 2021 [UPDATED]

I often receive emails from my readers about how they can become a better Java developer, what things they should learn, and which area they can work on to become a Rockstar Java developer. After answering them individually over the last few years, I thought to jot down a couple of points, which I think will make you a better Java Programmer and Application developer. But, before going into that, I would like to stress that a better programmer is always a better Java developer, and that's why all the tips I have shared before to improve your programming skill and become a better programmer still holds true.

Top 10 Computer Programming, Artificial Intelligence, and Sci-Fi Movies for Programmers and Tech geeks

Hello guys, being a computer programmer, I love movies that are based on programmers' life, work, and concept. Thankfully Hollywood is no short of films based on computers, programming, and geeky technical stuff. Another day, I was pretty bored, and when I look back to my DVD collection, I found Inception, Matrix Reloaded, and The Social Network, this all movies are in some way related to computers and technology, which strike me the idea to publish my list of Top 10 Computer programming movies.

Top 10 Technology Jobs Programmers and Software Engineers Can Aim in 2021 for Better Salary

If you are a Computer Science Graduate or someone who is thinking of making a career in the Software development world or an experienced programmer who is thinking about his next career move in 2021 but not so sure which field you should go then you have come to the right place. In this article, I will tell you the top 10 highest paying technical jobs you can aim for. All you need is some Programming and Coding experience and a passion for learning. Particularly the Machine learning and Data science field looking very promising for fresh Computer Science graduates, beginners, and experienced programmers.

10 Reasons to Learn Python Programming Language in 2021

If you are a regular reader of this blog, then you may be wondering why am I writing a blog post to tell people to learn Python in a Java blog? Didn't I ask you to prefer Java over Python a couple of years ago? Well, things have changed a lot since then. In 2016, Python replaced Java as the most popular language in colleges and universities, and since then, it has never looked back. Python is growing and growing big time. If you read programming and technology news or blog post, then you might have noticed the rise of Python as many popular developer communities, including StackOverflow and CodeAcademy has mentioned the growth of Python as a dominant programming language.

Top 3 Programming Languages Java Developers Can Learn in 2021

If you are a Java programmer and thinking to learn some news programming languages to expand your knowledge and skill, but not sure which programming language is better for you then you have come to the right place. In this article, I'll share 3 programming languages Java developers should learn in 2021 and why they should learn them. There is no surprise that all of these programming languages are JVM-based programming languages but they all have different qualities that make them unique and useful for a certain task. Also, being a Polyglot developer is good quality and often valued high on interviews. It also expands your thinking because different programming languages have different features that make certain things really easy.

Top 10 Gift Ideas for Programmers, Software Engineers, and Tech Geeks

Hello guys, it's that time of the year again when we buy gifts for our loved ones, friends, and colleagues. If you are looking for gift ideas for your programmer friends and colleagues then you have come to the right place. My friend circle has a lot of programmers and non-programmers. When it comes to buying gifts for birthdays, anniversaries, or holidays, I receive a lot of queries from my non-programmer family and friends about what to buy for a programmer? Well, buying a gift is easy but choosing or finding the right gift for someone is really really tough. I have had this experience when it comes to buying gifts for kids. 

10 Things Java Programmers Should Learn in 2021 [UPDATED]

It's 24th December now, and only a few days have left in the year 2020, one of the year which no one will forget the rest of their life. Now, it's time to look back and retrospect what you have achieved in 2020 and what you could have done better, despite all the challenges 2020 has thrown to all of us. This will help you to create your goals for 2020. As a programmer, our biggest challenge is to keep ourselves up-to-date. Technology changes very fast, and you will see a new version of programming language and framework coming to every couple of years. This year has plentiful changes with keeping up-to-date with a new Java version every 6 months, Spring 5, Spring Security 5, and Spring Boot 2; it's probably the busiest year in terms of changes for Java developers.

Where and How to download Spring Framework JAR file (Spring 5.0 or Spring 4.0) without Maven, Gradle

One of the easiest and oldest ways to run a Java program which depends on an external library or framework is to download dependency JAR files, put them on the classpath and then run the program by creating a Main class with the main() method. This is simple but not as easy as you think, there are many challenges down the road e.g. you need to find the right version of JAR files and their dependencies e.g. Spring might have a dependency on other third-party libraries like Log4j. So, when the build tool like Maven and Gradle comes, everybody stopped downloading the JAR file manually.

Udemy vs DataCamp Review? Which is better to Learn Python, SQL, and Data Science?

Hello guys, if you want to learn Python, SQL, DataScience, and Data Analysis and wondering whether you should go for Udemy or DataCamp then you have come to the right place. Earlier, I have published a review of Udemy vs Coursera and Udemy vs Pluralsight and in this article, we will review Udemy vs DataCamp. When it comes to learning Data skills like SQL, Data Science, Data Visualization, Tableau, Microsoft Power BI, Datacamp has some of the best resources and that's the unique selling point for them but what about price? Well, these are the questions which I have tried to answer in this article. 

Udemy's The Data Science Course 2021: Complete Data Science Bootcamp Review - Is it worth it?

Hello guys, if you want to learn Data Science and looking for the best courses or want to join The Data Science Course 2021: Complete Data Science Bootcamp course on Udemy but not sure whether this course is right for you then you have come to the right place. Earlier, I have shared the best Data Science courses and in this article, I am going to review this popular Udemy course to learn Data Science in 2021. This is one of the most popular Udemy courses when it comes to learning Data Science and with more than 360K students it's right there with the Data Science A-Z course by Kirill Eremenko, my favorite Udemy instructor for Data Science and Machine Learning. 

How HTTP Basic Authentication works in Spring Security?

In the last article, you have learned how to enable Http basic authentication in Spring security-based Java application, and now we'll go one step further to understand how exactly http basic authentication works in Spring security. If you remember, when you use HTTP Basic for authentication purposes, the client, like a browser or a rest client sends login credentials in the http request header. The header is aptly named "Authorization," and it contains a Base64 encoded string, which is created by concatenating username and password using a colon. For example, if the username is "johnsmith" and the password is "JOHN3214" then they will be concatenated as "johnsmith:JOHN3214" before encoded using base 64 encoding algorithms.

How to enable Spring Security in Java Web application?

Spring Security is one of the most popular open-source frameworks to implement security in Java web applications in a declarative way. It provides several essential security features like LDAP authentication, authorization, role-based access control,  remembers the password, URL protection, concurrent active sessions management, etc. To enable Spring security in Java Web application, you need to configure three things -  declare a delegating proxy filter in web.xml, add the ContextLoaderListener in web.xml and provide actual security constraints on applicationContext-Security.xml file. Since Spring security uses a chain of filters to implement various security constraints, also known as Spring's "security chain filter", it relies on web container for the initialization of delegating filter proxy.

How to limit number of concurrent session in a Java web application using Spring Security?

If you don't know, Spring security can limit the number of sessions a user can have in a Java web application. If you are developing a web application especially a secure web application in Java JEE then you must have come up with the requirement similar to many online banking portals have like only one session per user at a time or no concurrent session per user. If the user tries to open a new session then either an alert is shown or his previous session is closed. Even though you can also implement this functionality without using spring security but with Spring security, it's just a piece of cake with coffee :). 

2 Ways to setup LDAP Active Directory Authentication in Java - Spring Security Example Tutorial

The LDAP authentication is one of the most popular authentication mechanism around the world for enterprise application and Active directory (an LDAP implementation by Microsoft for Windows) is another widely used LDAP server. In many projects, we need to authenticate against active directory using LDAP by credentials provided in the login screen. Sometimes this simple task gets tricky because of various issues faced during implementation and integration and no standard way of doing LDAP authentication in a Java web application. Even though Java provides LDAP support but in this article, I will mostly talk about spring security because of it's my preferred Java framework for authentication, authorization, and security-related stuff.

How to enable HTTP Basic Authentication in Spring Security using Java and XML Configuration

In the last article, I have shown you how to enable Spring security in Java application and today we'll talk about how to enable Basic HTTP authentication in your Java web application using Spring Security. I'll show you how to do that using both the Java configuration and XML configuration if you are using Spring Security 3.1 or lower version, but before that let's understand what is Http basic authentication and why do you need that? One of the most common ways to authenticate a user in a web application is by using a form login like you provide a login page and the user will enter his username and password for authentication. This works great for human users but sometimes there are situations where you can't use a login form for authentication.

What is SecurityContext and SecurityContextHolder in Spring Security?

The SecurityContext and SecurityContextHolder are two fundamental classes of Spring Security. The SecurityContext is used to store the details of the currently authenticated user, also known as a principle. So, if you have to get the username or any other user details, you need to get this SecurityContext first. The SecurityContextHolder is a helper class, which provides access to the security context. By default, it uses a ThreadLocal object to store security context, which means that the security context is always available to methods in the same thread of execution, even if you don't pass the SecurityContext object around. Don't worry about the ThreadLocal memory leak in web application though, Spring Security takes care of cleaning ThreadLocal.

Role based Access control using Spring Security and MVC, Mapping LDAP Groups to Authorities for Authorization

Authentication and Authorization is an integral part of any Java enterprise or web application. Since most of the company uses LDAP Active directory for authentication, authorization, and Role-based access control (RBAC), it's good to know How to implement Role-based access control using Spring MVC and Spring Security. This is the second part of my articles on using Spring Security for authentication and authorization in Spring MVC based Java application. In the last part, we have learned about doing LDAP authentication against Windows active directory, and in this Spring Security tutorial, we will learn How to map LDAP groups to authorities for implementing Role-based access control or authorization.

JDBC Database Connection Pool in Spring Framework – How to Setup Example

Setting up JDBC Database Connection Pool in Spring framework is easy for any Java application, just matter of changing a few configurations in the spring configuration file. If you are writing core java application and not running on any web or application server like Tomcat or  Weblogic,  Managing Database connection pool using Apache Commons DBCP and Commons Pool along-with Spring framework is a nice choice but if you have the luxury of having web server and managed J2EE Container, consider using Connection pool managed by J2EE server those are a better option in terms of maintenance, flexibility and also help to prevent java.lang.OutofMemroyError: PermGen Space in tomcat by avoiding loading of JDBC driver in web-app class-loader.

How to call Stored Procedures from Java using IN and OUT parameter - Spring Framework Example Tutorial

Spring Framework provides excellent support to call stored procedures from Java application. In fact, there are multiple ways to call stored procedures in Spring Framework, e.g. you can use one of the query() method from JdbcTemplate to call stored procedures, or you can extend abstract class StoredProcedure to call stored procedures from Java. In this Java Spring tutorial, we will see the second approach to call a stored procedure. It's more object-oriented, but at the same time requires more coding. StoredProcedure class allows you to declare IN and OUT parameters and call stored procedure using it's various execute() method, which has protected access and can only be called from a subclass.

Difference between Setter vs Constructor Injection in Spring

Spring Setter vs. Constructor Injection
Spring supports two types of dependency Injection, using a setter method, e.g. setXXX(), where XXX is a dependency or via a constructor argument. The first way of dependency injection is known as setter injection while later is known as constructor injection. Both approaches of Injecting dependency on Spring bean has there pros and cons, which we will see in this Spring framework article. The difference between Setter Injection and Constructor Injection in Spring is also a popular Spring framework interview question

How to delete from a table using JOIN in SQL Server

It's a little bit tricky to delete from a table while using any type of JOIN in SQL like Inner Join, Left Outer Join, or Right Outer Join. The obvious syntax doesn't work as shown below:
delete from #Expired e INNER JOIN 
Deals d ON e.DealId = d.DealId
Where d.Brand = 'Sony'

here I have a table with a list of expired deals that I want to delete from the Deals tables, but only for Sony.

Top 10 Coursera Guided Projects to Learn Essential Programming Skills in 2021 - Best of Lot

Learning new skills and programming languages is essential for anyone to have a professional carer but most of the people think that reading books and watching some tutorials make them professional and expert at what they are doing but that totally wrong and they need to create projects to put their skills under the test. For that reason, you have to practice more and more and gain skills that you need to call yourself a professional programmer or developer and here come the benefits of an online learning platform known as Coursera that offers you courses to learn skills then you can also enroll in a program called a guided project to test your skills.

Top 5 Career Options for Experienced Java Developers

If you are an experienced Java programmer who has done a good amount of coding and development, like someone with more than 5 to 8 years of experience, working as a senior Java developer or a technical lead and wondering how to grow to the next level, then you have come to the right place. In this article, I'll share five career options and Jobs experienced developers like you can choose to take your career to the next level. Apart from becoming a project manager, which is what many programmers wanted, there are other more technical and better career opportunities are available now. It's especially great for Programmers with less or no people management skills or who love coding and development and always want to remain hands-on.

Grokking The Java Interview - My First Book After 10 Years as Java Blogger

Hello guys, I am very excited to announce the release of my first book after 10 years of writing Java articles and Java interview questions While I have been blogging for the last 10 years, I have never really sold anything, didn’t have any book, course, or any digital product. Finally, now I have my first book and it's going to help Java developer cracking interview — Grokking the Java interview. This was my long desire to have my content in a structured and organized way to provide more value and this book does that. It provides a structured way to prepare for Java interviews and learn essential core Java concepts.

How to write Thread-Safe Code in Java

thread-safety or thread-safe code in Java refers to code which can safely be used or shared in concurrent or multi-threading environment and they will behave as expected. any code, class, or object which can behave differently from its contract on the concurrent environment is not thread-safe. thread-safety is one of the risks introduced by using threads in Java and I have seen java programmers and developers struggling to write thread-safe code or just understanding what is thread-safe code and what is not?

Difference between a Thread and an Executor in Java

Even though both Thread and Executor, both are used to execute some code in parallel, there are some key differences between them. The main difference between a Thread and an Executor in Java is that it later provides a thread pool in Java. Along with several concurrency utilities like CountDownLatch, CyclicBarrier, Semaphore, FutureTask, Callable interface, and Conditions, JDK 5 also introduced a built-in thread pool, which provides a set of working threads to run your code in parallel. Since creating, starting, and running a thread is a time-consuming and expensive operation, many Java applications create a spool of thread at start-up and leverage that for executing the task in parallel until Java introduced the built-in thread pool.

Can You Make an Array or ArrayList Volatile in Java?

This is one of the many interesting multi-threading questions I have shared in my post 50 multi-threading interview questions. Yes, you can make an array volatile in Java, there is no problem with that, neither compiler will flag any error not JVM will throw any exception but the tricky part is why you want to make an array volatile and what is the effect of making an array volatile in Java? In order to answer this question, you must be familiar with both volatile modifier and Java memory model, otherwise, it would be difficult to answer, and that's why it's also one of the trick questions from Java interviews.

Difference between Executor Framework and Fork Join Pool in Java?

Java 5 added Executor Framework to provide an out-of-box thread pool to Java programmers and Java 7 added ForkJoinPool an implementation of ExecutorService which specifically designed to execute ForkJoinTask. The Executor Framework provides several classes e.g. Executor, ExecutorService, and Executors for execution and creating thread pools. It also provides several built-in, ready to use thread pools like a pool of fixed threads, cached thread pool which can expand itself, spawn new threads if required due to heavy load.

Difference between ExecutorService.submit() and Executor.execute() methods in Java?

What is the difference between Executor.submit() and Executor.execute() method in Java? This is one of the good multi-threading questions for experienced Java programmers, mostly asked in Investment Banks like Barclays, Deutsche Bank, or Citibank. A main difference between the submit() and execute() method is that ExecuterService.submit()can return the result of computation because it has a return type of Future, but the execute() method cannot return anything because's return type is void. The core interface in Java 1.5's Executor framework is the Executor interface which defines the execute(Runnable task) method, whose primary purpose is to separate the task from its execution.

How to Join Multiple Threads in Java? [Thread.join() Example]

Join method from the Thread class is an important method and used to impose order on the execution of multiple Threads. The concept of joining multiple threads is very popular in a multithreading interview question. Here is one such question, “You have three threads T1, T2, and T3, How do you ensure that they finish in order T1, T2, T3 ?. This question illustrates the power of the join method on multithreaded programming. Unlike classical thread questions like the difference between the wait and sleep method or solving the producer-consumer problem in Java, This one is a bit tricky.

Top 5 Difference Between Callable and Runnable Interface in Java

The difference between Callable and Runnable is one of the most frequently asked multi-threading and concurrency interview questions in the Java world. I remember it was 2007 when I first heard about the Callable interface and that too on a telephonic interview. Till then, I was happy using Runnable to implement threads and just started paying attention to Java 1.5, as most of the applications by then using Java 1.4. That one interview question encouraged me to learn more about several other useful features introduced in Java 5 concurrency library like CountDownLatch, CyclicBarrier, Semaphore, Atomic variables, and Thread pool. This is one of the reasons I always encourage Java developers to give/take regular interviews, just to update your knowledge.

Difference between Executor, ExecutorService and Executers class in Java

All three classes Executor, ExecutorService, and Executors are part of Java's Executor framework which provides thread pool facilities to Java applications. Since the creation and management of Threads are expensive and the operating system also imposes restrictions on how many Threads an application can spawn, it's a good idea is to use a pool of threads to execute tasks in parallel, instead of creating a new thread every time a request comes in. This not only improves the response time of the application but also prevent resource exhaustion errors like "java.lang.OutOfMemoryError: unable to create new native thread".

What is CyclicBarrier Example in Java 5 – Concurrency Tutorial

What is CyclicBarrier in Java
CyclicBarrier in Java is a synchronizer introduced in JDK 5 on java.util.Concurrent package along with other concurrent utility like Counting Semaphore, BlockingQueue, ConcurrentHashMap, etc. CyclicBarrier is similar to CountDownLatch which we have seen in the last article  What is CountDownLatch in Java and allows multiple threads to wait for each other (barrier) before proceeding. The difference between CountDownLatch and CyclicBarrier is also a very popular multi-threading interview question in Java. CyclicBarrier is a natural requirement for a concurrent program because it can be used to perform the final part of the task once individual tasks are completed.

How to use Exchanger for sharing Object between Threads in Java [Example]

Hello guys, if you are working in a concurrent Java application then you might have heard about the Exchanger class of java.util.concurrent package. The Exchanger in Java is another concurrency or synchronization utility introduced in Java 1.5 along with CountDownLatch, CyclicBarrier, and Semaphores. As the name suggests, the Exchanger allows two Threads to meet and exchange data at the rendezvous or meeting point. This means you can use Exchanger to share objects between threads and for inter-thread communication. The java.util.Exchanger is a parametric class, which defines and holds the type of object to be exchanged. It has an overloaded method called the exchange(), which is used to exchange objects between threads.

Difference between atomic, volatile and synchronized in Java?

Hello guys, a lot of people are asking me about the volatile, synchronized, and volatile variables in Java concurrency. After answering them individually on Facebook and LinkedIn, I thought to write this article. In this Java multi-threading tutorial, we will learn about the difference between atomic, volatile, and synchronized variables in Java. Though there are a lot of articles, posts, books, courses, and tutorials already exist on Java concurrency and synchronization, where different people have tried to explain concurrency concepts, but unfortunately, multi-threading and concurrency concepts are still hard to grasp, especially the volatile variables.

Maven Eclipse plugin M2Eclipse issues after updating passwords

Most Java programmers use Maven in Eclipse via the M2EClipse plug-in, which gives one capability to build, run, and test Java application using Maven. I also use the M2Eclipse plugin for integrating Maven with Eclipse, but more often there are issues dealing with them like Maven not able to find certain archetypes, or maven not able to download Jar files from remote maven repository. Since I need to change the password often for security reasons like every 3 months, I do see a lot of maven issues in Eclipse related to building projects. Most of the time these are compilation errors that are caused because maven is not able to connect to remote maven central repository, even though you have updated password in settings.xml in the maven installation folder like C:\apache-maven-2.2.1\conf\settings.xml

Difference between notify and notifyAll in Java - When and How to use

notify vs notifyAll in Java
What is the difference between notify and notifyAll method is one of the tricky Java questions, which is easy to answer but once the Interviewer asks follow-up questions, you either got confused or not able to provide clear-cut and to the point answers? The main difference between notify and notifyAll is that the notify method will only notify one Thread and the notifyAll method will notify all Threads which are waiting on that monitor or lock. By the way, this is something you have been reading all over places and to be frank,  this statement despite being correct is not complete, and it's very difficult to understand the difference between notify vs notifyAll by just reading this statement.

Coursera's Google IT Automation with Python Professional Certification Review - Is it worth it?

Hello guys, if you are joining Google IT Automation with Python Professional Certification on Coursera and want to find out whether it's worth your time and money or not then you have come to the right place. Earlier, I have shared the best Cousrea Certifications and review of other popular Google courses on IT support and in this article, we'll review Google's most popular Python certification course in Coursera. Google's IT automation with Python is a professional certificate and more than 175,000 people have already joined this course and it's from Google which is a great sign but you will find out more about this course in this review. 

Maven vs Gradle for Beginner Java Developers

Hello guys, if you are looking for a quick introduction to Maven and Gradle then you have come to the right place. Earlier, I have shared the best Maven course and best courses to learn Gradle, if you haven't checked them, I suggest you can also look at them if you want to learn these tools in depth. Maven and Gradle are the two most popular build tools for Java applications. They manage dependencies and create artifacts.  How do they do that? They have a repository like a maven has Maven repository where the store every single Java library and depending upon which library you add to your project, they download that library + all the transitive dependency for those libraries automatically. 

Top 10 Microsoft Azure Cloud Certifications You can Aim in 2021 - Best of Lot

Hello guys, if you are aiming to become an Azure certified professional and looking for top 10 Azure certification then you have come to the right place. Earlier, I have shared many best AWS certifications and many free courses to learn AWS, GCP, and today I am going to share the top 10 Azure certification you can aim for in 2021. Cloud computing technology is growing almost faster than any other industry and in fact, the growth has increased by 17% in 2021 compared to the last year, and that because of many facts like the tremendous increase in Saas companies as well as the power you get compared to what you paid for made a lot of people thinking to use the cloud to store their websites and running their businesses.

ThreadLocal in Java - Example Program and Tutorial

ThreadLocal in Java is another way to achieve thread-safety apart from writing immutable classes. If you have been writing multi-threaded or concurrent code in Java then you must be familiar with the cost of synchronization or locking which can greatly affect the Scalability of application, but there is no choice other than synchronizing if you are sharing objects between multiple threads. ThreadLocal in Java is a different way to achieve thread-safety, it doesn't address synchronization requirement, instead, it eliminates sharing by providing an explicit copy of Object to each thread. Since Object is no more shared there is no requirement of Synchronization which can improve scalability and performance of the application.

Inter Thread Communication in Java using Wait Notify Example

Wait and notify methods in Java are used for inter-thread communication i.e. if one thread wants to tell something to another thread, it uses notify() and notifyAll() method of java.lang.Object. A classical example of the wait and notify method is a Producer-Consumer design pattern, where One thread produces and put something on the shared bucket, and then tell the other thread that there is an item for your interest in a shared object, consumer thread than pick than item and do his job, without the wait() and notify(), consumer thread needs to be busy checking, even if there is no change in the state of the shared object.

How to create PDF File in Java - iText Example

Hello guys, generating PDF files in today’s enterprise applications is quite common. Doing this with Java is not an easy task as Java does not gives default api’s to handle PDF files. No worries, iText jar is for you. Earlier, I have shared about iText vs Apache FOP, two of the most popular libraries to create PDF files and today, I will show you an example of how to create a PDF files using the iText library in Java. If you are not familiar,  iText is a free Java-PDF library that allows you to generate PDF files on the fly (dynamically). iText is an ideal library for developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation.

10 Tips Improve Your Speed in Bash, and Linux Command Line

Hello guys, Have you ever amazed to see someone working very fast in UNIX, firing commands, and doing things quickly? Yes, I have noticed that a couple of times, and I have always inspired to learn from those superstar developers. In this article or tutorial or whatever you call it, I have dedicated to sharing some UNIX command practices I follow to work fast, quick, or efficiently in Linux. I work for the Financial services industry, and my work involves the development and support of online stock and futures trading applications in Electronic trading, Derivatives, etc. All our services run on Linux servers, so I need to work efficiently and quickly on the Linux machine, and that's how I have learned these productivity tips in Linux.

10 Tips to Improve Programming Skill and become a better Programmer

Many Java developers ask me how to become a better programmer? How do I improve my programming skills? Or I am good at Java but not so good on problem-solving ability etc. This is a reality, today's era is full of language expert than real programmers. It's easy to understand keywords, methods, and API of the Java programming language. Still, at the same time, it's challenging to solve practical problems, design reusable, and robust software and get the best of data structure and algorithm. I have often seen Java programmers are not doing so well when asked to design and code a solution in limited time, but at the same time, they are really good with Java concepts and all theory.

Top 10 IT Certifications for Java Developers in 2021

Hello guys, constant learning is part and parcel of being a programmer, and IT certification has a very important role in your career as an IT professional. There are many tangible and intangible benefits of certifications, first, they encourage you to learn more and become an expert in your fields, and second they provide recognition for your skill and knowledge. If you are a Java developer and wondering which IT certification you can do to take your career to the next level then you have come to the right place. In this article, I am going to share the best IT certifications for Java developers which include different areas like Java, Spring, Cloud, Linux, Project management, and others. You can choose the certification which aligns with your career goal.

5 Projects You can do to learn iOS App Development

Hello guys, if you are learning iOS App development and looking for some project ideas to better learn the concepts and apply your existing knowledge then you have come to the right place. Earlier, I have shared the best iOS and Swift courses, and today, I am going to talk about 5 cool projects you can do to learn iOS app development and master several key concepts like UI, Core ML, Speech to ext, and other APIs. Since it's very common for people to get stuck while doing projects, I have also included guide courses, both free and paid which you can join to learn how to do these projects step by step. 

10 examples of grep command in UNIX and Linux

Hello guys, if you want to learn the grep command in Linux and looking for some awesome, hands-on, easy to use tutorial then you have come to the right place. Earlier, I have shared many examples based tutorials to learn essential Linux commands like find, lsof, curl, sed, and chmod command and in this article, I am going to share 10 examples of grep command in Linux. The grep command is one of the most frequently used UNIX command stands for "Global Regular Expression Print" along with find, chmod, and tar command in UNIX. grep command in Unix operating systems like Linux, Solaris, BSD, Ubuntu, or IBM AIX is used to search files for matching patterns.

10 Examples of cURL command in UNIX and Linux

Hello guys, if you want to learn about the cURL command and looking for an awesome, hands-on tutorial then you have come to the right place. Earlier, I have shared many examples based tutorials to learn many essential Linux commands find, grep, lsof, and chmod command and in this article, I am going to share 10 examples of curl command in Linux. The curl is one of the essential commands to send HTTP requests from UNIX and Linux operating systems. curl command is part of the cURL package and it's not just useful to send HTTP requests but also allows you to transfer files using FTP and send mail using SMTP.

How to add new columns to an existing table in SQL Server database

Hello guys, adding a new column to an existing table with data is always tricky and if you don't pay enough due diligence then you risk of corrupting or deleting existing data. You need to know what data is there, how much data is there, to gauge how long your query is gonna take to complete in production. Also, you cannot add NOT NULL columns into an existing table if they are not empty and you don't have a default value specified. If you know SQL then you probably know that you can add columns to an existing table in SQL Server using the ALTER command. It not only allows you to add a column but to drop columns as well.

Database LEFT JOIN Example - How to Join Two Tables in a SQL query - LeetCode Solution

Hello guys, when it comes to combining two tables in SQL many programmers don't know that they can use the JOIN clause. In fact, JOIN is there to fetch data from multiple tables together. There are mainly two types of joins, INNER Join, and OUTER join. On Inner join, only those records are selected which has matching values in both tables, while in Outer join all records from one table are selected in addition to matching records from other tables. There are two kinds of Outer join in SQL, LEFT OUTER JOIN and RIGHT OUTER JOIN. Both are actually the same thing, which means you can get the same result by using either of the outer joins by just changing the position of a table from left to right.

Top 15 Java Multithreading, Concurrency Interview Questions Answers asked in Investment banks

Multi-threading and concurrency questions are an essential part of any Java interview. If you are going for any Java interview on any Investment bank like Barclays, Citibank, Morgan Stanley, etc for the Cash Equities Front Office Java Developer position, you can expect a lot of multi-threading interview questions on your way. Multi-threading and concurrency are favorite topics on Investment banking interviews,  especially on electronic trading development jobs and they grill candidate on many tricky java thread interview questions. They just want to ensure that the guy has a solid knowledge of multi-threading and concurrent programming in Java because most of them are in the business of performance which provides them a competitive advantage and it's hard to write correct and robust concurrent code.

Top 5 Reasons to Learn Firebase in 2021

While Firebase is around for quite some time, it really got traction in the last couple of years after the popularity of Google Cloud Platform increased, and several other Firebase services were introduced. If you are really React.js, Angular, Vue.js, or any other front-end development framework, you will benefit from Firebase. It provides an online, free database and several other useful services like FireStore, FireAuth, and Firebase Cloud function. Firebase is equally useful for Mobile developers as well as people using Swift, iOS, and Android to create mobile apps. They can also use Firebase services to create the backend for their application.

Top 5 Web Scrapping Tools to Learn in 2021 - Best of Lot

Hello guys, if you are looking for the best web scraping tools then you have come to the right place.  Earlier, I have shared the best web scrapping courses, and the best course to learn Scrappy, one of the powerful web scraping APIs for python developers, and in this article, I am going to share the top 5 web scrapping tools which you can use online. Web scraping or web harvesting or extracting web data are the same terms, and it refers to scrapping or extracting specific data from the web like emails of the employees or users that registered or sometimes secret files on that website and anything that you can imagine.

How to find the 3rd (kth) Node from end or tail in a linked list in Java

Hello guys, the problem to find the 3rd element from the end in a singly linked list or Kth node from the tail is one of the tricky but frequently asked linked list problems in Programming job interviews. I know you can easily solve this problem by moving from tail to head or in the reverse direction but the main challenge here is to solve the problem in just one pass. That means, you can not traverse the linked list again and you cannot traverse backward because it's a singly linked list. So what do you think? Isn't this problem challenging? Well, I did struggle when I saw this problem very first time but once you understand the logic and some tricks to solve a linked list based problem like Recursion then it would be easy for you, and that's what you will learn in this article.

How to declare and initialize a List with values in Java (ArrayList/LinkedList) - Arrays.asList() Example

Hello guys, today, I am going to share with you a useful tip to initialize a List like ArrayList or LinkedList with values, which will help you a lot while writing unit tests and prototypes. Initializing a list while declaring is very convenient for quick use, but unfortunately, Java doesn't provide any programming constructs like the collection literals of Scala, but there is a trick which you can use to declare and initialize a List at the same time. This trick is also known as initializing a List with values. I have used this trick a lot while declaring list for unit testing and writing demo programs to understand an API etc and today I'll you'll also learn that.

Top 5 Books to Learn Core Java for Beginners - Best of Lot

Hello guys, I have shared a lot of books related to Java and related technologies in the past, like books and online courses to learn Spring, Hibernate, JVM internals Java Performance tuning, Multi-threading, and Concurrency, Design patterns, Data structure, and Algorithms, etc., but I haven't shared books for core Java books for beginners yet. Even though I have mentioned a couple of popular titles every now and then, I really didn't have a complete compilation of essential core Java books for beginners. Since Java is one of the most popular programming languages and very useful for getting a job as a Software developer, it has become a choice of programming language to start learning coding and application development, it makes sense to start well with core Java.

Top 5 Hibernate Books for Java Developers - Best, Must read

Hibernate is one of the most popular, open-source ORM (Object Relational Mapping) framework, which has now become a standard for developing persistence layer on Java enterprise application, along with JPA (Java Persistence API). I often receive requests to suggest which book is best to learn to hibernate or recommendation about some good books and training courses on Spring and Hibernate. This motivates me to write this article about some of the best books on Hibernate currently available on the market.

Top 5 Python Books to Learn Data Science and Machine Learning in 2021 - Best of Lot

While there are many online courses to learn Python for Machine learning and Data science, books are still the best way to for in-depth learning and significantly improving your knowledge. Python is a universal language that is used by both data engineers and data scientists and probably the most popular programming language, as well. All the Data Scientists I have spoken to, and many in my friend circle just love Python, mainly because it can automate all the tedious operational work that data engineers need to do. To make the deal even sweeter, Python also has algorithms, analytics, and data visualization libraries like Metaplotlib, which is an essential data scientist.

10 Examples of ConcurrentHashMap in Java

Hello guys, if you are new to Java programming and want to learn ConcurrentHashMap class in Java then you have come to the right place. Earlier, I have shared the best books and best courses to learn Java, and today, I am going to share 10 examples of using ConcurrentHashMap in Java. As a Java programmer, you might have heard about the ConcurrentHashMap class of java.util.concurrent package. If you don't let me tell you that ConcurrentHashMap is an important class in Java and you will often find yourself dealing with this class in a multithreaded and concurrent Java application. If you are wondering where to start and how to master this essential Java class then you have come to the right place.

How to setup JNDI Database Connection pool in Tomcat - Spring Tutorial Example

Setting the JNDI Database Connection pool in Spring and Tomcat is pretty easy. Tomcat server documentation gives enough information on how to set up a connection pool in Tomcat 5, 6, 7, 8, or 9. Here we will use Tomcat 7 along with the spring framework for creating a connection pool in the Tomcat server and accessing them in Spring using JNDI code. In our last article, we have seen how to set up a database connection pool in Spring for a core Java application that doesn't run on a web server or application server and doesn't have a managed Java EE container.

Why use Cloud Computing? Advantages and Disadvantages

Hello guys, If you are curious about what is Cloud computing and why every company both big and small are going to cloud native then you have come to the right place. In the past, I have shared best Cloud Computing courses and both free and paid courses to learn popular cloud platforms like AWS, GCP, and Azure. In this article, I am going back to basics and tell you about what is cloud computing and what benefits it offer. Cloud Computing has been a buzz word in the IT world from the last few years. When it first appeared, like many things, a lot of people has dismissed it as being the next big thing, but cloud computing has certainly lived up to expectation and truly shift how the Information technology arm of business function today.

SQL Self Join Example - SQL Query to Find Employees Earning More Than Managers - LeetCode Solution

Hello guys, are you looking for a simple example to understand how to use SELF JOIN in SQL? If yes, then you have come to the right place. In this article, I'll show you how you can use Self join to solve interesting SQL problems from LeetCode. Along the way, you will also learn this useful SQL concept. So, what are you waiting for, let's first check the problem, and then we'll write an SQL query using SELF Join to solve this problem.

Write an SQL Query to Find Employees Earning More Than Managers
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id as shown below:

+----+-------+--------+-----------+
| Id | Name  | Salary | ManagerId |
+----+-------+--------+-----------+
| 1  | Joe   | 70000  | 3         |
| 2  | Henry | 80000  | 4         |
| 3  | Sam   | 60000  | NULL      |
| 4  | Max   | 90000  | NULL      |
+----+-------+--------+-----------+

Given the Employee table, write a SQL query that finds out employees who earn more than their managers. For the above table, Joe is the only employee who earns more than his manager because Henry's Manager is Max who earns 90000 which is more than Henry's salary of 80000.

Difference between row_number(), rank() and dense_rank() window functions in SQL

Though all three are ranking functions in SQL, also known as a window function in Microsoft SQL Server, the difference between rank(), dense_rank(), and row_number() comes when you have ties on ranking i.e. duplicate records. For example, if you are ranking employees by their salaries then what would be the rank of two employees of the same salaries? It depends on which ranking function you are using like row_number, rank, or dense_rank.

Top 6 Books to Learn and Master Programming and Coding - Must Read, Best of Lot

Coding is an integral part of Programming, and we all somehow learned to code by following examples here and there. Yes, I am talking about both self-taught programmer and Computer Science Graduates. You can learn Coding easily if you are dedicated, but what is more difficult is to write good code. You can easily find programmers in Java, C++, Ruby, or Python, but finding programmers, who are also a good coder is very difficult. Some universities have a good curriculum and practical classes to teach coding better than others, but most of these great coders are self-taught Programmers, who learned by reading books, joining online courses, and doing things on their own.

Top 5 Books to Learn Docker for Beginners - Best of Lot

Hello guys, if you are a developer or software engineer then you might have heard about Docker and containers. Being an author of a Java and Programming blog, I daily receive a lot of questions about Docker like what is Docker? what is Docker compose, which Docker commands should I learn, what is Docker Hub, How can I migrate my application to Docker and how can I deploy Docker container on AWS, Azure, and GCP. These are also some of the common doubts of programmers across the world. Let's start with What is Docker and why a Programmer should learn Docker in 2020? Simply speaking, Docker programming language makes project management and deployment seem easy.

Top 5 Courses to Crack Tableau Desktop Specialist Certification  in 2021 - Best of Lot

Hello folks, if you are in Data Science or Data Visualization then you may have heard about Tableau, one of the popular tools for creating intelligent visualization and insight. Tableau is software that lets you convert your data into graphs and interactive dashboards that drive decisions into your organization and get insights from your data. Using this software requires some knowledge since it is huge and complex and that's why Tableau company has launched a certification called Tableau desktop specialist to encourage people to learn and certify them for their Tableau skills. The exam tests your knowledge on how to use the tableau desktop and doesn’t have any prerequisites to go through and pass the exam.

How to reverse an ArrayList in place in Java - Coding Interview Questions

You can reverse an ArrayList in place in Java by using the same algorithm we have used to reverse an array in place in Java. If you have already solved that problem then It's a no-brainer because ArrayList is nothing but a dynamic array, which can resize itself. All elements of an array are stored in the internal array itself. By the way, if you need to reverse an ArrayList then you should be using the Collections.reverse() method provided by the Java Collection framework. It's a generic method, so you can not only reverse an ArrayList but also Vector, LinkedList, CopyOnWriteArrayList, or any other List implementation.

How to Print Fibonacci Series in Java without Recursion - Coding Problem for Beginners

Fibonacci series is a great example of Dynamic Programming, Recursion, and how the use of Recursion can result in a clear and concise solution. That's why whenever asked about writing a Java program to get Fibonacci numbers or print the Fibonacci series of certain numbers, it's quite natural for programmers to resort to recursion. The interviewer often challenged this practice by asking candidates to implement the Fibonacci series without using recursion. Yes, you read it right, you can't use recursion and this is what you will learn in this article. If you have attended your programming classes regularly then you may know that many recursive algorithms also have their iterative counterpart which uses loops instead of recursion or calling itself. We will take advantage of that concept to devise a solution to this problem.

How to write a C like Sizeof function in Java?

If you have just started learning Java and came from C background then you might have noticed some difference between Java and C programming language, e.g., String is an object in Java and not a NULL-terminated character array. Similarly, there is is no sizeof() operator in Java. All primitive values have predefined size, e.g., int is 4 bytes, char is 2 byte, short is 2 byte, long and float is 8 byte, and so on. But if you are missing sizeOf operator then why not let's make it a coding task? If you are Ok, then your next job is to write a method in Java, which can behave like sizeOf() operator/function of C and returns the size in bytes for each primitive numeric type, i.e. all primitive types except boolean.

What is Bean scope in Spring MVC framework with Example

Bean scope in Spring framework or Spring MVC is scope for a bean managed by Spring IOC container. You may know that Spring is a framework that is based on Dependency Injection and Inversion of Control and provides bean management facilities to Java application. In Spring-managed environment bean (Java Classes) are created and wired by the Spring framework. Spring allows you to define how those beans will be created and the scope of the bean is one of those details. 

Top 20 Spring Boot Interview Questions with Answers for Java Developers

Hello Java developers, there is no doubt that the Spring Boot is now the standard way to develop Java application using Spring Framework, and that's why Spring Boot Questions are increasingly becoming popular on Java interviews. In the past, I have shared many Spring MVC interview questions in this blog like the @RestController vs. @Controller, but I haven't got a chance to share any questions on Spring Boot, Spring Cloud, and Microservices. After a couple of personal requests from my readers, I thought to write about, and here comes my list of top 20 Spring Boot interview questions for Java developers.

What is the Use of DispatcherServlet in Spring MVC Framework?

If you have worked with Spring MVC then you should know what is a DispatcherServlet? It's actually the heart of Spring MVC, precisely the C of MVC design pattern or Controller. Every single web request which is supposed to be processed by Spring MVC goes through DispatcherServlet. In general, its an implementation of Front Controller Pattern which provides a single point of entry in your application. It handles all incoming requests. It is also the bridge between Java and Spring. Btw, the DispatcherServlet is like any other Servlet is declared in the web.xml with a URL pattern but the only special thing is that the URL pattern for dispatcher servlet is enough to map every single web request to DispathcherServlert.

How to Crack Spring Core Professional v5.0 Certification (VMware EDU-1202) - Latest Spring Certification for Java Programmers

Ever since Pivotal, the company behind the Spring framework made the mandatory Spring training optional (see here), I have received many queries from experienced Java developers who are interested in doing Spring certifications. This move from Pivotal has suddenly made the Spring certification affordable for many experienced Java and Spring developers who were interested in Spring certification earlier but couldn't progress further due to expensive mandatory training. Since many of them are now preparing for Spring certifications like Spring Core 5 or Spring Professional 5 (VMware EDU-1202) via self-study they are increasingly looking for good resources to prepare for the exam. I have received a lot of questions on preparation, books, mock exams, exam structure, passing marks, and useful resources.

How to dynamically create a div in jQuery? Example

Many times you need to create an HTML element and dynamically add that into DOM without reloading the page. The traditional way of doing this is by using JavaScript's innerHtml() function but jQuery provides better ways to achieve the same effect. You can use jQuery DOM manipulation methods like append(), appendTo() or html() to add new HTML elements like div, paragraph, headings, image into DOM without reloading the page again. In this tutorial, I will show you how to dynamically create a div and add that into a page by using pure jQuery.

How to Find Middle Element of Linked List in Java in Single Pass

ow do you find the middle element of LinkedList in one pass is a programming question often asked Java and non-Java programmers in telephonic Interview. This question is similar to checking palindrome or calculating the factorial, where the Interviewer sometimes also asks to write code. In order to answer this question candidate must be familiar with the LinkedList data structure i.e. In the case of the singly LinkedList, each node of Linked List contains data and pointer, which is the address of the next Linked List and the last element of Singly Linked List points towards the null. Since in order to find the middle element of the Linked List you need to find the length of the linked list, which is counting elements till the end i.e. until you find the last element of the Linked List.

How to implement Command Design Pattern in Java with Example

Hello guys, it's been a long since I have shared a Java design pattern tutorial. I did share some courses to learn design patterns but haven't really talked about a particular design pattern in depth. So, today, we'll learn one of the important design pattern, which is often overlooked by Java developers. Yes, I am talking about the Command Pattern which can help you write flexible, loosely coupled code for implementing actions and events in your application. In simple words, the command design pattern is used to separate a request for action from the object which actually performs the action. This decoupling between Invoker and Receiver objects provides a uniform way to perform different types of actions. This decoupling is achieved using a Command object, which is usually an interface with methods like execute()

How to find the largest and smallest number in given Array in Java

Hello guys, today I am going to discuss one of the frequently asked programming interview questions to find the largest and smallest number from an integer array. This question is commonly asked on telephonic interviews and the first round for screening candidates. This coding problem is in the same league of other frequently asked algorithmic questions like Fibonacci, Palindrome, Prime, and Power of two checks. They are easy but you will find them difficult during the interview because of the pressure, particularly if you have not solved them before. Sometimes even if you have solved the problem one time, you tend to do mistakes because you haven't understood them properly. So, always take your time to understand the question.

How to Sort an HashMap by values in Java 8 - Example Tutorial

In the last article, I have shown you how to sort a Map in Java 8 by keys, and today, I'll teach you how to sort a Map by values using Java 8 features e.g. lambda expression, method reference, streams, and new methods added into the java.util.Comparator and Map.Entry classes. In order to sort any Map, like HashMap, Hashtable, LinkedHashMap, TreemMap, or even ConcurrentHashMap, you can first get a set of entries by using the entrySet() method and then you can get the stream by calling the stream() method. The entrySet()  method returns a Set which inherit the stream() method from the java.util.Collection class. Once you got the stream, you can just call the sorted() method which can sort all Map.Entry objects available in Stream using a Comparator.

StringJoiner.join() + String.join() Example in Java 8

Hello guys, joining multiple String literals or objects into one is a common programming requirement and you will often find situations where you need to convert a list of String or a Collection of String into a CSV String for your application. For a long time, JDK API has no way to join multiple String literals or objects together, which forces programmers to write hacks like looping through all String objects and manually joining them using String concatenation to create the final, joined String. Even though this approach worked, it was filled with errors and hacks like you need to be careful not to add delimiter before the first element and after the last element, which often caused issues, particularly in the case of beginners and junior Java developers.