Sunday, February 24, 2019

Linux Command to Find how Long a process is Running in UNIX

Hello guys, today, I am going to share one of the useful tips to find out how long a particular process is running in Linux. This is very useful while you are troubleshooting an issue and want to know whether your process or service is restarted fine on a daily or weekly basis. So you checked your process is running in Linux operating system and it's running fine, by using ps command. But now you want to know, from how long process is running, what is the start date of that process etc. Unfortunately, PS command in Linux or any UNIX based operating system doesn't provide that information.

Friday, February 22, 2019

Top 5 MySQL Courses for Programmers and DBAs to Learn Online - Best Of Lost

Hello guys, if you are interested in learning SQL with MySQL database and looking for some awesome resources e.g. books, tutorials, and online courses then you have come to the right place. In past, I have shared some useful books and tutorials and in this article, I am going to talk about some of the best MySQL online courses from Udemy and Pluarlsight which you can join to learn SQL and MySQL from the comfort of your office or home. In last a couple of years, you might have heard the statement that everybody should learn to code, which is great. Coding is now like reading, writing and speaking skill and in today's Information technology-centric world it is must have and there is no better way to start coding than learning SQL, the most popular programming language.

Monday, February 18, 2019

How to implement Binary Search in Java without Recursion - Iterative algorithm

This week’s task is to implement a 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.

Monday, February 11, 2019

Is "Java Concurrency in Practice" Still Valid in the Era of Java 8 and 11?

One of my reader Shobhit asked this question on my blog post about 12 must-reads advanced Java books for intermediate programmers - part1. I really like the question and thought that many Java programmers might have the same doubt whenever someone recommends them to read Java Concurrency in Practice. When this book came first in 2006, Java world was still not sure of about new concurrency changes made in Java 1.5, I think the first big attempt to improve Java's built-in support for multi-threading and concurrency. Many Java programmers were even not aware of new tools introduced in the API e.g. CountDownLatch, CyclicBarrier, ConcurrentHashMap and much more. The book offered them the seamless introduction of those tools and how they can use them to write high-performance concurrent Java applications.