Posts

Showing posts with the label java

Linked List Implementation : In Simple Terms

Image
Java Starter Kit #1 Overview In Java POV, the collection framework gives us a wide range of data structures to choose from. Among them, one of the legacies yet widely used data structure is Linked List . The major Pros of Linked List come into play when the data structures need to store a huge amount of values or when the length is not definite. This is the time when this implementation of collection shines. The insertion and deletion of elements from LL are faster than other data structures.  Unlike array which again is a popular implementation of List interface in Java, LL doesn't store data in a continuous manner. Some other pros include: - Zero Memory Wastage: when an element is inserted or deleted, the allocation of memory is dynamic. When removed the previously-stored node reference is removed as hence GC clears it. And when inserted it allocates a new node when it is inserted and doesn't pre-occupy any space in the heap at the initialization of LL. Linked Lis

Documentation Approach : Enterprise Management

Image
Well, I am a big fan of documentation and the reason for the same is not because I know a lot, the reason for the same is that I don't know a lot! Fact ! There are a lot of misconceptions that Agile Methodology is against Documentation. Working software over comprehensive documentation The above statement in Agile Manifesto states the importance of documentation in a project, but the real interception of the statement is often described incorrectly. It means you should create documentation that provides value and at the same time does not hinder the team’s progress. Agile document requirements are user stories, which are sufficient for a software developer to begin the task of building a new function. Major advanatages of documentations are: A single source of truth saves time and energy. Determine what others need to know about the product/services provided by us. The hiring and onboarding process can be easier. Enables Revision Control and provides a proper process for updates. S

OPEN JDK or ORACLE JDK

Early this week Oracle announced the next version of Java Java  16 .(March 2021) While people (mainly developers) have not been a huge fan of java's version number recently and obviously the reason for the same is the rise of OpenJDK. Now the million dollar question! Should I use OpenJDK or Oracle JDK?? As everything else in this earth, this too has 2 sides while choosing which JDK will benefit you. And there is no correct or best answer for this choice !! Oracle has been releasing a newer version of JDK every 6 months ( previously it was every 2 years till JDK 10 ) and LTS (Long Term Support) version is not as frequently as this release cycle (3 years release cycle). As defined by Oracle the last "free" version is still JDK 8 , that too will no more be updated ( officially stopped by December 2020). While there is no doubt why OPENJDK is rising! It's FREE & OPEN . OpenJDK too have a release of 6 months.  One major reason for this rise is after the announcement of

Helpful Tools to Explore The Unknown

Image
This article is all about the tools that can help you to get more insight into your project when you are trying to explore the project on your own. These tools can help you to find the code flows even in times when the source code is not available, particularly focusing on Java Based applications. Wireshark Struggling to find the protocol used behind your application, then Wireshark will be the perfect tool to use, it's so useful that you can find the communication protocol on every single request your application sends even with the packet details. Ref: Wire Shark Offical Site . Java Decompiler Don't have the source but still want to explore the code behind the java application, Java Decompiler is there for your help. Say your code is deployed as war or jar, the compiled code can be viewed as readable code using this tool. Ref: JAD Offical Site . VisualVM Threads! A nightmare for Java Developers, VisualVM provides you a simpler view of your application and the details of each

Coffee with Snake

Image
Well, the title is not just clickbait! it's related to the article below. Can the rivals (Java and Python) work together! Why Combing two languages in the same program is not a strange manifestation, yet not common. Both Java and Python are object-oriented languages, where the former is a system programming language and the latter is a scripting language which makes them quite a good pair. My initial thoughts on the integration of two languages in the same program were when I considered rewriting those components where performance is critical for the application or when quick development was required. One of the key reasons for using Python together with Java is its ease to use and learn feature, which is an added value for experimental works. For instance, while dealing with text parsing and manipulation, Python would be a great choice once we have development time as a factor of consideration, or considering the upcoming of AI, both these languages are offering tons of libraries

Write your own code or do a copy paste !

Image
Writing your own code or copying others' code? It's always the mix and match of these two methods Developers use! Well, it's not a crime to copy the code from StackOverflow or other forums and trying to implement an idea in your project. To get the best out of it, it's always best to understand the code that you see and try to implement it by understanding your requirements rather than blindly following it. Not always you will have the time and resources to start the code from scratch, and obviously, your first attempt to code logic will be the most effective. Accepting these facts, copying code is not such a bad idea, or at least getting inspiration from code. Cheatsheets are often helping hands for developers, and as the name says it's not "for cheating" but a one-stop for the commonly used commands and methodologies. One such cheatsheet repo that I found in GitHub is Cheatsheets  which is an awesome collection of tons for sheets.

Be a Java Debugger

Image
"Debugger" Java Developer logger.info( " inside json parser " + json.toString()); System . out .println( "response " +gson.toJson(reponse)); . . . . Printing tons of sysout onto your console and checking the values of various attributes to resolve certain bugs ?! Sounds familiar!  Debugging is the perfect choice in those situations. Not always we can fix the issues and fixes by just checking the logs or by going through the conventional ways. That's where debugging can give you an extra hand. Choosing the right IDE which helps you to easily enable debugging and connect to your application is key. Different IDEs have different ways to enable debuggers.  For example: enabling debugging in Eclipse to debug an application that runs on Tomcat is quite different from an in-house application. Reference: here JPDA : Java Platform Debugger Architecture  Even when your target application is not hosted in your local or if the target application hosted system doe