Saturday, June 30, 2018

Top 8 Free Java Programming Books, EBooks and PDF for Beginners and Experienced Programmers

Who doesn't like free stuff? Well, I do like and many Java programmers like me simply love free Java books, eBooks, and PDFs. Fortunately, the Internet is full of free books and eBooks but unfortunately, many of them are of not good quality. Most of the eBooks which are freely available either are sample chapters of popular Java programming books or they are simply old and out-of-date. In my last article, I have shared a lot of such books and the feedback was that most of them, even though they are good in the past, have simply not up to the mark. The search goes on and while browsing the net a couple of days back I hit the Jackpot when I found these free Java books from OReilly.

Friday, June 29, 2018

Google Dart Hello World Example - A Java Like Programming Language to Create Web, Android, and iOS Applications

Google Datt is a general-purpose programming language from Google and used to build web applications, mobile applications, and the Internet of Things (IOT).  It's most popular application is in Flutter framework, which is Google's mobile app SDK for crafting high-quality native interfaces on iOS and Android in record time. If you haven't tried it yet then it's a good time to try it and see how much it offers to a programmer and whether it is suitable language to replace JavaScript or not. As a Java Programmer, my first impression of Google dart is great. It looks quite familiar with Java my favorite programming language and this motivates me to write this hello-world example in Google Dart and execute it, run it and see how it works.

Thursday, June 28, 2018

How to Map a Network Drive to Windows Machine - net use Command Example

Mapping network drive in Windows 10 or other versions of Windows operating system e.g. Windows 7  or Windows 8 is much easier and faster by using the command line than by doing it on Windows Explorer. If you have been working in Windows environment with a bunch of Windows Server 2016 or 2012  servers and your job requires frequent access, copy or paste from the local machine to those remote machines than mapping them as a network drive is the best option. You can use mapped network drive as any other folder which makes the job of copy paste very simple. Though windows provide multiple ways to map a network drive, I prefer to use command line i.e. "net use" command to map my windows network drives.

Java vs Python - Which Programming Language Should You Learn First?

Java and Python are two of most popular and powerful programming language of the present time. Beginner programmer often get confused, one of the most frequently asked questions is should I learn Java or Python? Is Python is good programming language to start with? Which programming language would you recommend for beginners to learn first etc? Since I am a Java developer, my opinion is biased, I will always suggest you start with Java and then learn Python, but if you ask this question to a Python developer, you might get just opposite answer. I have well documented my reasons as for Why Java is the best Programming language and Why a programmer should learn Java. One of the most important reasons you would see in that blog post is strong Java community, which will help you though out your Java career.

Monday, June 25, 2018

How to parse JSON with date field in Java - Jackson @JsonDeserialize Annotation Example

I have read many articles on parsing JSON in Java and most of them give examples where properties are either String or int, there are very few examples, where you will see the JSON string contains a date field and that's one important thing to learn. It's easy to parse JSON in Java using Jackson or Gson with just integer and string field but you need to do a little more work if your JSON contains a date field because everything in JSON is String but Java is a type based programming language, where Date is a type.

Friday, June 22, 2018

What is a Functional interface in Java 8? @Functional Annotation and Examples

The functional interface is one of the most important concepts of Java 8 which actually powers lambda expression but many developers don't put enough effort to understand it and spend time learning lambda expression and Stream API without first understanding the role of functional interface in Java 8. Unless you know what is a functional interface and how lambda is related to it, you can't use powerful features of Java 8 e.g. lambda expression and stream API. Without knowledge of functional interface, you won't be able to understand where you can use a lambda in the code but also you will struggle to write lambda expression the method is expecting, hence, it's important to have a good understanding of functional interface in Java 8.

Wednesday, June 20, 2018

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 task is to write a method in Java, which can behave like sizeOf() operator/function of C and returns size in bytes for each numeric primitive types i.e. all primitive types except boolean.

Top 5 Spring Boot Courses to Learn Online for Java Developers in 2018

Hello guys, if you are interested in learning Spring Boot and looking for some awesome resources e.g. books, tutorials, and online courses to start with then you have come to the right place. Earlier I have shared some great books to learn Spring Framework, including Spring Boot (see) and today I'll share some of the best online Spring Boot courses you can join to learn Spring Boot by yourself. In the past, I was a big fan of learning from a book, but online courses have changed that completely. Now I prefer to start with an online course e.g. Spring Boot Essentials and then move on to a book like Spring Boot in Action for more comprehensive learning. Anyway, before going through those Spring Boot courses, let's first revise what is Spring Boot and it's benefits and why you should learn it.

Monday, June 18, 2018

3 Best Practices Java Programmers Can Learn From Spring Framework

There is no doubt that Spring Framework is one of the most popular Java frameworks and makes it really easy to create real-world, enterprise-grade Java applications easy by providing features like dependency injection and inversion of control. But, to be honest, Spring is much more than just another DI and IOC framework. It goes one more level to simplify many of Java APIs e.g. JDBC, JMS, Java Mail etc by providing a useful layer of abstraction. It's much more easy to work with JDBC with Spring's JdbcTempalte and other utility class. They remove most of the friction Java developer faces with respect to executing SQL statement and processing ResultSet to get the Java object they want.

Top 5 Hibernate and JPA Courses for Java Developers to Learn Online

Hibernate is one of the essential frameworks for Java and Java EE or JEE programmers, especially if you are working on the server side of a Java web development project. It's an ORM tool or a framework which allows you to deal with only objects while Hibernate takes care of your data on your behalf. For example, instead of writing classes with SQL to load, save, and update data using DAO design pattern, you can simply use Hibernate framework in your project. It will allow you to deal with just objects while it will load, save, and update data in the background. Instead of you loading and saving data to/from the database and then populating objects, Hibernate just give you a readymade object and also takes care of updating data when the state of object changes. Btw, this is just one benefit of using Hibernate, another one is that it provides inbuilt caching.

Saturday, June 16, 2018

10 Tools Every Software Developer/Programmer should know

Every trade has their tools and software development is no different. A good programmer or software developer generally know their tools better than others and also have access to more powerful and advanced tools than a average programmer, but there are certain tools which you expect every software developer should know and this list is all about such tools. In this list, I am going to share 10 essential tools, which I believe every programmer or software developer should know and know well.

Tuesday, June 12, 2018

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 purpose the client e.g. browser or a rest client sends login credentials in http request header. The header is aptly named as "Authorization" and it contains based 64 encoded string which is created by concatenating username and password using a colon. For example, if the username is "johnsmith" and password is "JOHN3214" then they will be concatenated as "johnsmith:JOHN3214" before encoded using base 64 encoding algorithms.

Saturday, June 9, 2018

10 All-Time Great Books for Java Programmers - Best of Lot, Must Read

If you are a Java programmer and wondering what to read to improve your knowledge of Java and become a better Java developer then you have come to the right place. In this article, I am going to share some of the best Java books ever written. In fact, this is my list of all time great Java books. They have withstood the test of time and emerges as more and more popular years after years. It doesn't matter if you read them in 2018 or reading them in 2019, you are always going to learn a lot and that's why I call them all time great books.

Friday, June 8, 2018

10 Tools Used by Java Programming Developer in Day to day life

Every trade has their tools, and Java programming is no exception. In fact, good knowledge of tools and mastery of using them, saves a lot of time in design, development, testing, debugging, and troubleshooting any production issue. In order to become a good developer, you must know right tools for right jobs. A developer without tools and tricks are like a toothless lion, hence it's very important that you devote some time to learning tools required for your day to day job. Many developers think that learning an IDE like Eclipse, NetBeans or IntelliJ is enough, but that's just the start of the process. No doubt that IDEs are the most important tool ever created for programmers but they are not the solution for everything.

A Better way to write SQL queries for Programmers

There is no doubt that writing code is more art than science, every coder cannot write beautiful code which is both readable and maintainable, even with experience. In general, coding improves with experience when you learn the art of coding e.g. favoring composition over inheritance or coding for interface than implementation, but only a few developers able to master these techniques.  Same applies to SQL queries. The way you structure your query, the way you write it goes a long way to communicate your intent to the fellow developer. When I see SQL queries on emails from multiple developers, I can see the stark difference in their writing style.

Wednesday, June 6, 2018

Top 5 Data Science and Machine Courses to Learn Online - Best of Lot

Many programmers are moving towards Data Science and Machine learning hoping for better pay and career opportunity and there is a reason for it. Data Scientist has been ranked the number one job on Glassdoor for last a couple of years and the average salary of a data scientist is over $120,000 in the United States according to Indeed. Data Science is not only a rewarding career in terms of money but also it provides the opportunity you to solve some of the world's most interesting problems.  IMHO, that's the main motivation many good programmers are moving towards Data Science, Machine Learning, and Artificial Intelligence.

Saturday, June 2, 2018

Does Standard Column Width of 80 On Coding Make Sense in 2018?

One of the oldest coding practice is to keep line width 80, and many of us follow it blindly but have you ever thought why we have this practice in first place? I believe it was to make your code more readable in the age of small monitors so that whole content can fit in the screen, or it might have originated from the age of punch card, which was used to be 80 column wide. This sounds reasonable when we think about those old days but do you think this rule makes sense in 2018? We are now living in the age where most of the developers have got large monitors, which can show up-to 180 characters, doesn't this is wastage of precious monitor space? It also makes your code unnecessary long, then it actually is.

Binary Search in Java without Recursion - Iterative algorithm

This week’s task is to implement binary search in Java, you need to write both iterative and recursive binary search algorithm. In computer science, a binary search or half-interval search is a divide and conquer algorithm which locates the position of an item in a sorted array. Binary search works by comparing an input value to the middle element of the array. The comparison determines whether the element equals the input, less than the input or greater. When the element being compared to equals the input the search stops and typically returns the position of the element. If the element is not equal to the input then a comparison is made to determine whether the input is less than or greater than the element. Depending on which it is the algorithm then starts over but only searching the top or a bottom subset of the array's elements. If the input is not located within the array the algorithm will usually output a unique value indicating this.