My programming language journey
The Ranking
Yesterday, I checked the TIOBE index and found that my most frequently used language, JAVA, has dropped from number 1 to number 4. In this age of AI, Python has become the most popular language for learning how to use AI. The open AI API page only provides versions in Python and JS, making it clear that Python is the first choice in this age.
It's sad to see that the language I use the most seems to be dying. Most old companies still use JDK 1.7 or 1.8, while new startup projects choose Golang as their first choice for building their backend. Why has Java gone from being king to a nobody?
The programming paradigms
Let's talk about programming paradigms, which range from imperative to object-oriented programming. Java is the dominant language in this field and offers 23 design patterns (originally from C++, but mostly used in Java) that can be applied to enterprise projects. In order to benefit the larger project, involving hundreds of developers in its implementation would be helpful. However, due to the introduction of numerous frameworks for fast project delivery, it would currently be a burden. Additionally, applying design patterns as a generic rule for all cases should be restricted and hard to use it.
now, it appears that using the waterfall method for project development was once highly beneficial, but with the rise of mobile technology, agile methodology has become more popular. Currently, the MVP approach is the preferred choice. Programming has become easier to use and allows individuals to build their own products. Furthermore, there are numerous BaaS and PaaS services available for solo programmers to create their own MVPs.
OOP or FP
From OOP to funcational Prgramming and Declarative Programming
Functional programming has been around for many years, but it is now gaining popularity due to the introduction of React for frontend development. every component should be pure, same input with same output, higher-order functions, this means that functions, not objects, are treated as first-class citizens. They can be assigned to variables, passed as arguments, and returned from other functions. It is easy to debug because it is pure. However, Java remained focused on OOP until many years later when JDK 1.8 (2014) introduced lambda expressions to compete with other functional programming languages.
JAVA uses JSP to serve HTML from the backend to frontend users, but its UI is restrictive and difficult to reuse. In contrast, ReactJS is a library that provides easily reusable UI components. NextJS builds on top of ReactJS, helping developers ship full-stack web apps to users. Now, the situation has reversed: Frontend Invasion Backend blurs the line between frontend and backend development, much like how Java did with JSP during the monolithic age. but, The UI could be more elegant and visually appealing, following the concepts of ReactJS and its ecosystem.
Java may not be the top choice given the current situation. In this era of artificial intelligence, Python is highly regarded by Langchain and Llama-Index as a primary language. This is evident from the absence of Java versions for these libraries. To develop AI applications, we can use either Python with Node.js (for web development) or solely rely on Node.js. JAVA's status become lower than before.
My THoughts
Java is my first love, even though I initially used Python 2.7 for a small project. Learning how to build a runnable project was valuable and motivated me to pursue programming further.
p.s
What is the difference between a framework and a library? A framework involves inversion of control (IOC), meaning that you do not need to call it directly as the framework will call your code. On the other hand, with a library, such as a library in the real world, you need to make direct calls. To put it simply, if you want to learn something new, think of a framework as a mentor who guides you from the very beginning steps towards finding solutions. In contrast, using a library is more like going to the physical library where you have to read many books in order to find the solution yourself.