Normal view

There are new articles available, click to refresh the page.
Today — 1 July 2025Main stream

VS Code vs VSCodium

30 June 2025 at 17:08

Hi everyone! Welcome to my another blog.
Today we are going to see about difference between VS Code and VSCodium.
We all know about VS Code. If you’re a developer, then you’ve probably used Visual Studio Code (VS Code) — a popular and powerful code editor. It is very useful for beginners because of User Interface. But have you heard of VSCodium? They look almost the same, but there are some important differences behind the scenes.

What is VS Code?

VS Code is a free code editor made by Microsoft. It’s used by millions of developers for writing code in JavaScript, Python, C++, HTML, CSS, and many other languages. And there are some things also there which is making VS Code very special. There are,

  • A nice user interface
  • Built-in terminal and debugger
  • Extension marketplace
  • Git integration
  • And more!

What is VSCodium?

VSCodium is almost the same as VS Code — it looks the same, works the same, and is also free.
But there’s one main difference:
VSCodium is 100% open source and doesn’t send any data to Microsoft.

What does that mean?
When you use VS Code, it may collect some basic data (like what extensions you use or how the app performs) and send it to Microsoft. This is called telemetry. VSCodium removes all that.
So if you’re someone who really cares about privacy or using only open-source software, VSCodium is the better choice.

Summary in one line:

  • VS Code is great for beginners and everyday use.
  • VSCodium is the same thing, but without Microsoft and tracking.

Some common doubts about these platforms:

1. Can I use the same extensions in both?
Yes, most extensions work in both VS Code and VSCodium.
But in VSCodium, you may need to manually connect to the VS Code Marketplace, or some Microsoft-only extensions might not work properly.
note*: So if you're using popular extensions like Prettier, ESLint, or Live Server, they will likely work in both.

2. Do they look the same?
Yes! When you open VSCodium, it looks and feels almost exactly like VS Code.
The only small difference is the logo and name — VSCodium has a blue icon, and it doesn’t say “Microsoft”.

3. Why do people care about telemetry (data collection)?
Some developers are very serious about privacy or using only free and open-source software.
VS Code sends some data back to Microsoft to improve the product. It’s not personal data, but some people prefer zero tracking, which is why they choose VSCodium.

4. Who maintains VSCodium?
VSCodium is not made by a company. It is maintained by open-source developers who want to give people a version of VS Code that doesn’t include Microsoft’s parts.

So that's it, guys. These are all the information which I want to share with you. I hope it will be useful for everyone. Will see you in next blog.

Tech meetup - Headless CMS Intro

29 June 2025 at 17:56

Hi all! Welcome to my next blog. Today I am going to share about a tech meetup which was I attend recently. The meetup was organized by Code On JVM at Contentstack.
That was a great experience for me. The environment(Contentstack) was truly inspiring, such a great place to work and learn. We had three insightful presentations that deepened my understanding of Java and its ecosystem.
One of the highlights for me was getting introduced to the CMS world, especially the concept of Headless CMS, which was completely new to me.
Let's see about Headless CMS.

Why it's called “Headless”?

  • The “head” is the front-end (like a website or app).
  • “Headless” means the CMS doesn’t have a built-in front-end. It just provides content via APIs (usually REST or #GraphQL), and developers build the front-end separately.

Example:

This example will give you a clear understanding. It’s Like a Box of Content.

  • You fill the box (headless CMS) with your articles, images, etc.
  • Then your developer takes the content out and shows it however they want.

Usage difference between Traditional CMS and Headless CMS:

Use Traditional CMS when:

  • You only need a website
  • You want less coding
  • You want to get started quickly

Use Headless CMS when:

  • You want to build multiple platforms (app, website, etc.)
  • You want more flexibility in design and code
  • You have developers to build the front-end

Image description

How it Works:

  • Content creators write/manage content in the CMS (text, images, etc.).
  • The CMS exposes this content via an API.
  • Front-end developers fetch the content and display it using any framework (React, Vue, Angular, mobile app, etc.).

Examples of Headless CMS:

  • Contentful
  • Strapi
  • Sanity
  • DatoCMS
  • Prismic
  • Hygraph (formerly GraphCMS)

That's it, guys. I hope I gave a basic clear explanation about Headless CMS. Thank you for reading my blog. Will see you in my next Blog.

Important topics in CSS

25 June 2025 at 17:36

Hello everyone! Welcome to my blog. Today we are going to explore some most important topics in CSS.

1. Box model:
In CSS all the HTML elements are considered as box model. The Box Model in CSS is a fundamental concept that explains how HTML elements are rendered on a web page. Every element in a webpage is treated as a rectangular box, and the box model defines the structure of that box.

Image description

2. CSS selectors:
CSS selectors are patterns used to select and style the HTML elements you want to apply styles to. They are the most basic part of CSS—you use them to target specific elements on a page.

  • Class selector
  • ID selector
  • Element selector
  • Combination selector, etc.

3. CSS position:
The position property in CSS is used to control how an HTML element is placed on a webpage.By default, elements appear one after the other in the normal document flow. But when you use position, you can move elements anywhere on the screen — relative to the page, their parent, or even the screen itself.

Types of Position:

  • Static
  • Relative
  • Absolute
  • Fixed
  • Sticky

Image description

4. Flex and Grid:
Flexbox: Flexbox(Flexible Box) is a one-dimensional layout system — it helps you align items in a row or a column, especially when the size of items is dynamic or unknown.

When to use?

  • When you're laying out items in a single direction (row or column).
  • Ideal for navbars, menus, buttons, and simple alignment tasks.

Grid: CSS Grid is a two-dimensional layout system — it lets you layout items in rows and columns at the same time.

When to use?

  • When your layout is complex (like a website layout with header, sidebar, main, footer).
  • You want to control both rows and columns precisely.

Image description

5. Media query and Animation:
Media query: Media queries are a way to apply CSS only when a certain condition is true — like screen size, resolution, or orientation.
They’re essential for responsive design — so your site works well on all devices.
Parts:

  • @media – This tells the browser “Start a media query.”
  • Media Type – Like screen, print, all. Most common is screen.
  • Media Feature – Conditions like width, height, orientation, etc.
  • Logical Operators – Use and, or, not to combine conditions.

Animation: Animations let you change CSS properties over time — making your webpage look more dynamic or interactive.
Required:

  • animation-name – Refers to the @keyframes block.
  • animation-duration – How long the animation takes (e.g. 2s, 1.5s).
  • animation-timing-function – The speed curve (ease, linear, etc.).
  • animation-delay – How long to wait before starting.
  • animation-iteration-count – How many times to repeat (1, infinite).
  • animation-direction – normal, reverse, alternate.

That's it. When I am prepare for my interviews I found that these are the important topics in CSS. Moreover In my past two interviews they ask question in these topics as well. So I thought It would be great to share these with you.Thank you for reading this. I hope you like this. Will see you in my next blog

Prepare for these questions before you go to an interview!

20 June 2025 at 14:53

Hello everyone!
Welcome to my another blog...
Today, I planned to share with you 10 questions and their answers, which are very helpful for our interview preparation!

1. Tell me about yourself?
This question is depends on your personal information, like about schooling and college background, and skill sets. So you can draft your self-intro according to your preference.

2. Why are you interested in our company?
I am interested in your company because of its strong commitment to innovation and quality. Your focus on delivering excellent products and services aligns with my xxxxx & xxxxx skills.
Note*: Here is also I given you a basic template for this question. You can also add some specific details about that which company you are going to attend an interview for.

3. What is your salary expectation?
As a fresher, my focus is on gaining hands-on experience and contributing effectively to the team. Based on industry standards, the team. Based on industry standards, the average salary for this role ranges from ₹xxx to ₹xxx LPA. I am open to a competitive offer that reflects my skills, potential & the value I bring to the company.
Note*: This is for freshers.

4. What are your strengths?
My key strengths include being a quick learner and a keen observer, which allows me to adapt efficiently and grasp new concepts quickly. I have strong leadership qualities, enabling me to take initiative and guide teams effectively, while also being a collaborative team player who values cooperation and shared success.
Note*: This is for quick learning, Great observing, Leadership quality, and Teamwork ability skills. You can add some other technical skills also.

5. Why did you choose your career in IT?
I chose a career in IT because I’m deeply passionate about technology and how it transforms everyday life. I enjoy building intuitive digital experiences, which led me to specialize in xxxx and xxxx development. IT offers endless opportunities to learn, innovate, and solve real-world problems, which keeps me motivated. My curiosity and adaptability make this a natural and exciting path for me.

6. How do you stay updated with technology trends?
I stay updated with technology trends by actively participating in developer communities like xxxx and attending tech meetups such as xxxx. I also follow industry blogs, watch online tutorials, and explore new tools related to xxxx and xxxx development. This consistent learning habit helps me stay current, improve my skills, and stay inspired by innovations.

7. What are your weaknesses?
One area I’m actively working on is delegating tasks. Since I tend to take full ownership of a project, I sometimes try to handle everything myself. However, I've realized the importance of trusting teammates and distributing work efficiently. I’ve been improving this by practicing collaboration in group projects and tech meetups, which has helped me grow.
Note*: It’s always great to show self-awareness and a willingness to improve.

8. How do you prioritize your work?
I prioritize my work by first identifying tasks based on urgency and impact. I like to break larger goals into smaller, manageable steps, and I often use to-do lists or digital tools to stay organized. Time-sensitive tasks always come first, followed by tasks that align with long-term goals. I also review my progress regularly to adjust plans if needed. This helps me stay focused and deliver quality results efficiently.

9. Describe how you deal with conflicts in the workplace?
When conflicts arise in the workplace, I approach them calmly and with an open mind. I try to understand the other person's perspective first, then communicate my thoughts respectfully to find common ground. I believe in addressing issues early before they escalate, and I always prioritize the team’s goals over personal opinions.

10. Why should we hire you over other qualified candidates?
You should hire me because I bring a strong blend of technical skills and a deep passion for xxxx development. I'm a quick learner, a keen observer, and actively involved in tech communities, which keeps me updated and inspired. I balance leadership with teamwork, allowing me to adapt in dynamic environments. While I may be a fresher, my drive to grow and contribute meaningfully sets me apart. I'm fully committed to making a positive impact from day one.

So, these are the popular questions repeatedly asked by corporations. And also, these are basic templates, you can add whatever you want.
If I missed any important questions, let me know in the comments. It will help me too. I hope you like it. Will see you on my next blog.
*Reference: https://copilot.microsoft.com/chats/5PcmbYgrY1SNaZx9SHFDe

A intro for Ente Photos!

18 June 2025 at 15:56

Hi! everyone...
Welcome to my next blog.
Today is the first day i heard the word "Ente photos". So today's blog we will explore about that platform.

The meaning of the name:
"Ente" means "mine" in Malayalam.(Many of you already knew that) - It's your own secure gallery.

Key features:

End-to-End Encryption(E2EE)

  • The main feature of this platform is security. Our photos will encrypted.
  • Even their company server can't to see our data.
  • If the server is hacked ,our photos will remain unreadable.

Cross-Platform Access

  • It's available on Android,iOS,Web,Windows,Linux,macOS.
  • We can access our photos anywhere securely.

Family sharing

  • We can share our storage plan with up to 5 family members.
  • We can create shared albums with customized icon settings with full privacy.

On-Device AI Search

  • If we want search a photos in large set of photo collections we can search by objects,faces,places just like Google Photos.
  • But all AI runs on your device(no cloud processing = better privacy.)

Original Quality Uploads

  • Ente doesn't compress our images or videos for satisfying their servers.

Who made this?

  • This is built by a team based in Kerala, including ex-Google engineer Vishnu Mohandas.

  • By creating platform they gained international recognition for privacy and simplicity.

So this all about I prepared to tell you today's blog. For many details you can use this platform additional of Google Photos.
Download the app from https://ente.io

Thank you for read my blog guys! I hope you like it. We Will see in my next Blog.

Open source in my vision! Before and after knowing these things

14 June 2025 at 04:01

Welcome to my blog! I'm really happy to see you on my another blog also.

Before

In my college, my final semester also included a paper called 'Open-Source System'. I actually had good marks on that paper as well. But the knowledge about open-source is very basic, no! not basic also, it's like I really don't understand what open source is. The things I get into wrong or misunderstand about open-source are,

  • "Open source is a free resource." This means "we can use open-source without paying any amount". Actually, this is also a correct meaning, but that sentence is not meant to say this. So, what is the real meaning of this is I will let you know in the 'After' part.

  • "Open source is Linux only." I really believe that open-source is only about Linux. The only example I gave in my exams was Linux for open-source.

  • "Open source is a big corporation. Behind of that, there will be a big company environment." Now also, I can't believe that my understanding is wrong, there is nothing like that.

After

After knowing some of the things about open-source is mind-blowing. The things I gain some clear meaning of the things and the real truths are,

  • The real meaning of the "Open is a free resource" is that the source code of the resource is free, like anyone can access that code. We can
    edit, update, and share. The reason behind the free resource is, we want to learn something about that code and grow ourselves with the open-source community. An interesting fact is that we can also contribute to them. For contributing open-source community, we can build a strong foundation for our career.

  • Open source is not only about Linux, there are so many open sources are there. Example: Android, VS Code, Firefox, etc. Linux is a popular OS in open source. I will let you know about Linux briefly in my next blog.

  • There is no one behind the open source. there is a community called the open-source community is a group of people managing some things in a remote mode. Interesting is that there is no office for open-source. Can you believe this? actually, I can't. How just a community can manage also these things without a physical location? That is the community power. That community has people who do not expect a profit or income. They are passionate about building open-source software.

So these are the thing I really want to share with you guys! You may know these things. But this is new to me to know the different side of the tech world. So thank you for read my blog. I hope you like it!

What are the things I am facing as a new bee in Chennai?!

13 June 2025 at 03:13

Erode to Chennai!

There are many things that I face struggles for survival in Chennai.
In the beginning, I have to manage the feeling that I miss my hometown, and at the same time, accept the highly populated city. I am going to share a few problems that I am currently facing.

Home food
Till now, I did not value my home food or my hometown's style of food.
Here I am staying in a PG. They are Telugu people, so their food is also Telugu style. Literally, I can't eat the food they provide. Every day, I am searching for a new hostel or home food makers. Currently, I am convincing my mind that this situation is temporary, "it will change after u get a job and move into a new area."

Transportation
I didn't go anywhere till now in Chennai because of the traffic and lack of public transport. In my area metro is also not available nearby. If I plan to go by bus, I will be there half an hour late. So, I am simply sitting on my Hostel bed and scrolling the YouTube shorts.

Weather
Here, I can't feel the freshness of the bathing. Because after the shower, I immediately start sweating. Every day I am going to my class with my sweaty face, my mentor also asked about that yesterday. Actually, I have done my bachelor's degree in Coimbatore. Now, think about my situation. I enjoyed the breezy climate days in Coimbatore. Why am I saying this? There are only two months (March and May) when the weather is hot in Coimbatore.

So, these are my struggles in Chennai currently. Thank you for reading my blog. I'll let you know my upcoming blogs if I overcome these struggles or not and how I overcome them.

My First Week Learning Front-End Development: A Beginner's Experience

12 June 2025 at 02:33

Hi! everyone!
I'm just one week into my front-end development journey, and I wanted to share what I've learned, how it's going so far, and what I plan to do next. I hope this blog inspires and helps other beginners like me!

Why I choose Front-End Development

I've always been curious about how websites and apps are built, especially the designs and interactive parts. That's what led me to Front-end development. I love the idea of creating things people can actually see and use. My goal is to become a UI/UX developer, so front-end is my first step towards that dream.

What I Learned This Week

In the First week of course, I got introduced to the core building blocks of the web:

*HTML (HyperText Markup Language): *
I learned how to create the structure of a webpage using tags like <h1>, <p>, <a>, <div>, etc.

*CSS (Cascading Style Sheet): *
I explored how to add colors, fonts, spacing, and layout to a webpage using selectors, properties, and values.

*Basic layout techniques: *
I got a basic idea of to position elements using properties like padding and flex.

Resources and methods I used

These really helped me understand better:

  • Practice the code by using pen and paper.
  • Reading my running notes often.
  • Write blogs what I actually leaned each day.

What's next?

Next week, I'll be diving deeper into:

  • Creating a small project.
  • Use Linux OS often for better understanding about Open-source.

Final Thoughts

Start something new can feel overwhelming, especially in tech. But this first week showed me that ''Consistency is the key to Success''. Each day i learn something new, I'm one step closer to my goal.
If you're also learning front-end development or thinking about it, just start you don't need to know everything. Just be consistency.

Thanks for reading!
Feel free to connect with me or drop your tips for beginners in the comments.

Yesterday — 30 June 2025Main stream

spring Boot Introduction -II

By: Prasanth
30 June 2025 at 13:36

Step:1 Open Eclipse
If you Don not install ,install
https://www.eclipse.org/downloads/

Step:2 Install Spring Tools (Spring Tool Suite 4) Plugin
1.Go to menu:
Help-> Eclipse marketplace
2.Type Spring tool In search bar
Spring Tools 4 (aka Spring Tool Suite 4)
then install. Restart Eclipse.

Step:3 create spring boot project
File->New-> Spring starter Project.

Demo1 obj1 = new Demo(); // tightly couple
Demo1 obj1; // loosely couple

Now not need any dependencies , now I skip dependencies.

Image description

Jar,War,Dependencies,Pom.xml,Maven,Gradel,Spring,Spring Boot,yml,Application properties,Tomcat..etc to read this Blog:
https://dev.to/prasanth362k/spring-boot-1-2-class-14h0

Group:Package name
Artifact: Project Name

Image description

Project Structure:-

Image description

Demo1 is project name

src/main/java:

This folder contains your java source code:

  • @SpringBootApplication main class
  • Controllers (@RestController)
  • Services (@Service)
  • Repositories (@Repository)
  • Model classes (@Entity)

src/main/resources

This folder stores all configuration and static files like:

  • application.properties or application.yml
  • static/ (HTML, CSS, JS)
  • templates/ (Thymeleaf or JSP)
  • .sql or .xml files (if needed)

this location configure Database url,Db username/password,server port number.

src/test/java

This used for writing Junit test cases to check if controller/Api is working?,Service logic is correct?, function returns should give correct output.it helps tester and developer find bugs early.

In real time first we done testing the project then deployment.

JRE System Library [JavaSE-17]

This Library provide all the core java classes (like String,List,System.out.println) you project needs.without library won't understand basic java code

For Example-

System.out.println("Hello World");  // Needs java.lang classes from JRE

why it's need?
java compiler version ( project built in using java 17),Runtime version ( you app will run run on java 17), this both need java 17 or higher version for spring boot .that need to your project.

Image description

Image description

Maven Dependencies

This file contain .jar file(libraries) downloaded form maven(internet) based on you what you add dependency from pom.xml .

why and what Maven dependencies and JRE System Library [JavaSE-17] both contain jar file inside package and inside .class file.

Maven Dependencies:

Image description

JRE System Library [JavaSE-17]:

Image description

.jar -> is a compressed file format or Zip folder for .class file,.jar contain .class, .properties,xml related. it user for java application not for web application(war) , can be executable to run with java -var app.jar(main class) , inside .jar you see .compile files.

.class , created after compiling .java,platform indepenedent(can run any osusing jvm),it is not human readable(byte code(plain text)),it is single file not a zip folder

target/

maven stores all compiled code and build files here.After mvn install, .class and .jar files go here.his is auto-generated – don't modify manually.

pom.xml

The main configuration file for Maven:
Add dependencies (Spring Web, JPA, Lombok)

In this blog i demonstrate how to call method without object new keyword only class reference not create object like.Before 2 thing definitely to know one for what is tightly coupling and loose coupling why to use then what is spring container please read my previews blog

By Default Main program start this file

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import com.example.demo.service.SMSNotificationService;



@SpringBootApplication
public class DemoApplication {

    private NotificationService notificationService;

    public static void main(String[] args) {
        // before SpringApplication.run(DemoApplication.class, args);
        ConfigurableApplicationContext context  = SpringApplication.run(DemoApplication.class, args);// after 
        //it is tigtely couple relation to avoid like without new key word
        SMSNotificationService sms =context.getBean(SMSNotificationService.class);
        //SMSNotificationService sms ; // = new  SMSNotificationService();
        //SMSNotificationService sms;
        sms.send_message("abcd ","1234");
    }

}

Step:2
I created SMSNotificationService class

package com.example.demo.service;


import org.springframework.stereotype.Component;

import com.example.demo.NotificationService;

@Component
public class SMSNotificationService implements NotificationService{

    @Override
    public void send_message(String to ,String message)
    {
        System.out.println("Sending SMS "+to +" : "+message);

    }
}


Step:3 created Interface

package com.example.demo;

public interface NotificationService {

    //abstract method 
    void send_message(String to ,String message);

}

Program Explanation:

SpringApplication is a Built in spring boot class ,it is helps to create environment for your project .
it does 3 thing: start your spring boot application , create the spring container when run this method SpringApplication.run(DemoApplication.class, args), DemoApplication.class, args why to use you are tell to the spring boot where to begin otherwise spring boot do not know where to start you said start from main.then why args , to pass to arguments in command line like: java -jar app.jar --server.port=9090
,args will contain --server.port=9090, so spring boot can read setting from command line. that all , then i already told SpringApplication.run(DemoApplication.class, args); it give Spring container just like environment(சூழல்)(to create object inside the environment), we create environment like spring container where will be stored that place is ConfigurableApplicationContext (in Built interface)context (reference variable)

SMSNotificationService sms = context.getBean(SMSNotificationService.class);

we Already marked SMSNotificationService @Component annotation ,which tell spring please create object of this class and manages,SpringApplication.run(....) when run this method , start this app and return ConfigurableApplicationContext, this is the spring Container(environment) that manage the all object(beans) ,we already know that ,already created object , now just get the bean(object) of class SMSNotificationService.class from spring container ,then store the variable sms , then call method sms.send_message("abcd ","1234");

context is a reference to the Spring container,getBean(inbuild function)

**
Inversion of control(IoC) and Spring Container and Dependency Injection(DI) lets connect with together?**

  • IoC is a design principle/idea that says:
  • you should not create objects manually using new,instead spring will manage them ,Spring fallow the principle using technique is called DI.Spring container is the environment the create ,store, and manages all thes beans(objects),these object created and stored heap memory,DI achived using Constructor Injection ,Field Injection,Setter Injection.To inject dependencies spring use the @Autowired annotation
    .

  • If you Do not mention @componet on top of class , spring can not create and store object in the spring container.

  • @Component creates one object inside Spring container (by default singleton). by default singleton mean, by default, Spring creates only one object per class → this is called singleton scope.

  • spring by default create only one object per class , can we create multiple? yes

We learned 2 annotation in this blog:-

@springBootApplicaion
point your mouse arrow int this annotation the press f3 you will some info.
Inside you see lot of annotations combines , in this annotation 3 is important:

1.@Configuration: spring tells this class provide object(bean) , spring should register them spring container.@bean tells spring please call method,take return value and store it spring container.(Do not need to call method manually , automatically call)

Example:-

@Configuration
public class AppConfig {

    @Bean
    public MyService myService() {
        return new MyService();
    }
}

2.@EnableAutoConfiguration

Tells Spring boot will automatically configure beans based on what is in the classpath For example , you add spring web in pom.xml configure Tomcat server , web settings(DispatcherServlet ), set port automatically you do not do manually ,this automatically configure.
"DispatcherServlet is the front controller in Spring MVC.
It handles all incoming web requests and routes them to the correct @Controller or @RestController methods."

  1. @ComponentScan

Spring scan the current package and sub package @Component,@Service,@Controller,
@Repository automatically create objects(beans) and store them container.Before i said if you mention top of the class @Component object created and store in spring container , @Service,@Controller,
@Repository internally @Component you can point you mouse cursor in annotation and press f3 .
it will create objects only for classes :

  • @Component
  • @Service
  • @Controller
  • @Repository

mvt vs mvc

spring & Spring Boot

By: Prasanth
29 June 2025 at 08:32

What is framework?

  • A framework is like ready made toolset or structure ,it helps you build application easily , without starting from scratch.

what is spring?

  • Spring Framework is a java-based opens-source framework , it is used to build enterprise level, scalable, maintainable application.
  • spring provide infrastructure support for building java apps by managing dependencies injection , configuration, connecting to databases, handle web request and so on.
  • Need External Server (Tomcat)
  • Developed by Rod Johnson in 2002.

  • Spring Follows principle Dependency injection(like without new keyword create the object, spring container(object memory location) ,to use @Autowired) and Aspect-Oriented programming(AOP),MVC(Model-view-Controller)

  • AOP: is a programming concept to used to separate common function like logging ,security,transactions from main logic of you application. simple, write common code(logging, security, transactions) and automatically apply you app or application , without rewrite it everywhere

  • Deployment : Build WAR, needs external server

  • Configuration: Manual xml based configuration it is older style ,you define everything in xmf flie.spring 2.5 version you can use also annotation so spring support both XML and annotation , but need more setup. in Spring boot no need xml Configuration you just add dependencies in pom.xml,it will auto configure everything ,start the application , scan your classes with annotation like @Restcontroller ,@Service ..etc.

spring Example:-

applicationContext.xml or beans.xml

<bean id="studentService" class="com.example.StudentService"/>
<context:component-scan base-package="com.example"/>


spring boot dependency injection Example:-

pom.xml 

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>


before you added dependency in pom.xml ,now Spring boot code now you can use annotations @ annotation:-

@RestController
public class MyController {
    @GetMapping("/hello")
    public String hello() {
        return "Hello!";
    }
}

<bean id="myBean" class="com.example.MyBean"/>

Annotation-based:-
you use java annotation instead of xml
Common annotations:

@Component, @Service, @Repository, @Controller ...etc

What is annotation:-

Annotation is meta data that mean data about data, data about data mean provide info about to the spring framework,These annotation used to configure,customize, reduce xmL configuration and boilerplate code ( repeated code not a main logic), annotation make developer develop application or app simplify development and maintain and efficient ,time reduce..etc.

How to avoid boilerplate code:-

  1. manual creating beans:-
<bean id="studentService" class="com.example.StudentService"/>

how to avoid : use annotation like @service and @ auto wired ,automatically crate and inject bean(object).

  1. Auto Configuration Automatically set up Db ,server..etc.it make consuming more time and managnet difficulty so, how to avoid:
  • spring boot add automatically configure you application based on dependencies what you added in the pom.xml and some more setting in application.properties or application.yml. like you want project server tomcat , you can inject dependencies your pom.xml(maven) spring automatically download internet you dependencies.

  • In a project you can see src/main/properties under you can see application.properties it used to .

  • Configure application setting like port number changing ,Db config..etc.

3.Getter/setters
How to avoid Getter/setters : Lombok , remove getter/setters , use @data and @Getter ,.etc.

application.yml:-
YAML format for settings

What is Dependencies and Dependencies injection and types:-

Dependency:-
Dependency is a class/object that another need to work.
Example:-

class Engine
{
public void start()
{
sytem.out.println("engine started Let to drive");
}
}
class Car {
    Engine engine = new Engine();  // tightly coup
    engine.start();
 // Engine is a dependency
// Engine class change constructor , you must chage  every place that  uses it.  
}

// car depends on Engine , so Engine dependency of car

What is Dependency Injection (DI)?

  • Dependency Injection is a is a design pattern, do not create the object yourself with new key word(tightly couple) ,spring or spring boot create and inject required object with help of @Component(you can tell spring ,pleas create objects of this class,spring will manage and create bean(object) ),spring container(memory location hold all object (@Componet in top of class use )),@Autowired (connector like tell spring inject(connect) this object here) ,spring container is one of the part of heap memory. Why Heap? Because:
  • All Java objects are stored in the heap memory
  • Spring beans are also Java objects.

Example:

Normal java or spring boot or spring you can create object with new keyword it is manual ,it make depend upon other like called tightly coupled when depender class anything change(parent)like constructor like parameter constructor/overload ,you can change all so depending class(child class) constructor or object values.



class Engine
{
public void start()
{
sytem.out.println("engine started Let to drive");
}
}
class Car {
//Engine engine = new Engine(); // Manual
@Autowired
Engine engine; // Spring injects it

    engine.start();
 // Engine is a dependency
// @Autowired if you want you first  inject dependency  to pom.xml , maven will manage

}

Why to use DI:-

  • Reduce manual object creation
  • Loose Coupling - easy to change

Types of Dependency Injection in Spring?

1. Constructor Injection

Spring passes dependency to the constructor

@Component
class Car {
    private final Engine engine;

    public Car(Engine engine) {
        this.engine = engine;
    }
}


2️2.Setter Injection:-

Spring sets dependency using setter method

@Component
class Car {
    private Engine engine;

    @Autowired
    public void setEngine(Engine engine) {
        this.engine = engine;
    }
}


3. Field Injection

Spring injects directly into the field

@Component
class Car {
    @Autowired
    private Engine engine;
}

Aop example:

without AOP( repeating code every where)

public class BankService {

    public void withdraw() {
        System.out.println("Checking permission...");
        System.out.println("Logging: withdraw started");
        System.out.println("Withdrawing money...");
        System.out.println("Logging: withdraw completed");
    }

    public void deposit() {
        System.out.println("Checking permission...");
        System.out.println("Logging: deposit started");
        System.out.println("Depositing money...");
        System.out.println("Logging: deposit completed");


    }

    public void checkBalance() {
        System.out.println("Checking permission...");
        System.out.println("Logging: check balance started");
        System.out.println("Showing balance...");
        System.out.println("Logging: check balance completed");
    }
}

// main logic with extra logic , hard to mange,messy..etc

With AOP (clean and separate)

public class BankService {

    public void withdraw() {
        System.out.println("Withdrawing money...");
    }

    public void deposit() {
        System.out.println("Depositing money...");
    }

    public void checkBalance() {
        System.out.println("Showing balance...");
    }
}
Step 2: Write AOP for Logging and Permission
@Aspect
@Component
public class LoggingAspect {

    // Log before any method in BankService
    @Before("execution(* com.example.BankService.*(..))")
    public void logBefore(JoinPoint jp) {
        System.out.println("Logging: " + jp.getSignature().getName() + " started");
    }

    @After("execution(* com.example.BankService.*(..))")
    public void logAfter(JoinPoint jp) {
        System.out.println("Logging: " + jp.getSignature().getName() + " completed");
    }

    @Before("execution(* com.example.BankService.*(..))")
    public void checkPermission() {
        System.out.println("Checking permission...");
    }
}
// But you didn’t write this logging or permission code inside the withdraw() method — Spring AOP handled it for you.

Is Spring only for Java?

yes, Spring is only for Java and JVM-based languages (like Kotlin, Groovy).
It is not for Python, C++, etc.

Why use Spring?

  • To build robust(Strong,stable,handle errors well,)loosely coupled(classes are independent not tightly coupled , Java applications. Can integrate with JPA/Hibernate, JDBC, Security, etc.

JPA (Java Persistence API)

  • JPA is just a specification (like a set of rules).
  • It defines how Java objects should be saved into a database (ORM – Object Relational Mapping).
  • JPA doesn’t do anything by itself – it needs a real tool to work.

Hibernate

  • Hibernate is a real tool (framework) that follows JPA rules.
  • So, Hibernate is a popular implementation of JPA.
  • It does the actual work of connecting your Java classes to the database. Example:-

Think of:-

JPA = Rulebook

Hibernate = Worker who follows the rulebook

  • sql maually, JDBC, Security, etc.

What is JDBC?

  • JDBC = Java Database Connectivity (manual SQL writing and executing)
    

    When to use:

  • When you want manual control over SQL.
    

    How Spring Integrates:

  • Spring provides Jdbc Template to reduce boilerplate code.

Spring Security:-
What is it?

  • A module in Spring for:
  • Login/Logout
  • User Roles (admin, user, etc.)
  • Password Encryption
  • Authorization (what a user can access)

How Spring Integrates:

  • Add spring-boot-starter-security
  • Configure user roles, login form, URL access rules Example

Tightly coupling:-

class Car {
    Engine engine = new Engine(); // direct object
}

loose coupling

class Car {
    @Autowired
    Engine engine; // Spring will inject it
// you can change the engine ,test the calss , or reuse iit 
}

  • IT save time ,Make code clean and reusable
  • It give tools for web apps ,security ,database,JPA/Hibernate, JDBC.
  • Supports DI, AOP, and MVC, simplifying development.

what is Spring Boot?

  • Spring boot is a simplified version of the Spring Framework. It helps to create spring applications quickly and with less configuration.

  • Spring Boot = spring + Ready made setup(like auto configuration ..etc) +Less code + fast to development like you can create java web apps to fast.

  • Developed by Pivotal (now VMware) in 2014.

  • Deployment : Build JAR with embedded Tomcat/Jetty(server)

Use Case:-

spring : Full control, more configuration setup ,suitable for custom projects
Spring Boot: Fast startup the projects,Rest APIS, Micro-service, ..etc.

Example:

  • without spring: you write 100 lines for setup code.
  • with spring : you write 20 lines.
  • With spring Boot : you write 10 lines

why to use Spring Boot?

  • Reduce boilerplate code( boilerplate code- repeated code , you write agin and again) ,to avoid writing unnecessary code.
  • Easy to start project with pre-configured setups.it useful for beginners.
  • To avoid complex XML configurations.
  • Ideal for micro services architecture

*we will learn some concept or tool or other terminology used in the spring boot project *

What is Maven?

(A Java tool to manage dependencies and build project)

  • Maven is a build and dependency management tool for Java projects.
  • Configuration format : XML (pom.xml)
  • Speed: Slower
  • Used in Spring Boot, standard Java app s
  • Dependency Management: Downloads libraries (JAR files) only from Maven Central repository

- It helps:

  • Download and manage external libraries (like Spring Boot..etc)
  • Build your project (compile, test, package into .jar or .war)
  • Run your project with the required libraries

What is Gradle?

  • Gradle Build & Dependency Management Tool like maven.
  • Configuration format : Groovy or Kotlin DSL (build.gradle)
  • synax: Concise like script based
  • speed: Faster
  • Dependency Management: Can download from Maven Central, JCenter, or custom/private sources.
  • used in : Andriod apps, spring Boot Apps ,large java projects.

What is jar ?

jar = Java ARchive

  • Jar File is a packaged java application(all java files are combined into one file .jar so it easy to run ,share,or deploy ) used to run standalone programs.JAR file is a zip file that contains your Java program

standalone mean:

  • work independently.
  • no need to deploy on separate server tomcat manually.that mean just run the jar file directly using java no need to put in separate server like tomcat.
  • Easy to run,test and move.

Example:

  1. you build you spring boot app like myapp.jar
  2. run using java -jar myapp.jar 3.spring start its own server on port of 8080 by default 4.you open browser ->http://localhost:8080 app is running this is called deployment for JAR
  • Jar file contains all compiled .class files, libraries, and metadata(info about how to run).

  • Runs directly using: java -jar app.jar

  • used in Spring Boot, microservices, and CLI apps.Running desktop or back end apps.Standalone Java applications

  • jar not need install server separately , include tomcat server run app directly
    Tools -> Maven/Gradle to build .jar

what is WAR?

WAR = Web Application Archive

  • A WAR file is a packaged Java web application(means java web project with contain HtmL,CSS,Java code,etc) that zipped into one .war file to be run on a webserver) used to deploy on web servers like Tomcat in deploy. Deploy mean putting your application on a sever so users can access it.

  • WAR Contains: .class files + HTML, CSS, JS, JSP, WEB-INF folder, etc.

Example:-

1.you build you app -> myapp.war ( create you web app)

2.you copy to C:\tomcat\webapps\myapp.war (after placed your web app in the server tomcat)
3.Start tomcat
4.open browser and paste => http://localhost:8080/myapp (server run your app and it make available in the browser)
now deployed and running

Deploy -> Putting your app on a server to run
WAR file -> The package you give to the server
Tomcat -> The server that runs your web app.

  • used for Deploying java apps to web server(Apache Tomcat) .Web-based applications (Servlet, JSP, deployed to server)

  • Tools -> Maven/Gradle to build .war

What is pom.xml in Spring Boot ?

(XML file used by Maven to define project setup)
POM = Project Object Model

  • pom.xml it is a XML file(your required dependency placed or add into pom.xml) used by maven tool ,that to tool manage the dependencies in you project. pom.xml tells maven what is project name(artifactId),package name (groupId),what version,What dependencies (JARs) to download,What plugins or settings to use.

What is XML in pom.xml?

XML = Extensible Markup Language
It is used to store structured data.
it use tags likevalue
XML is platform-independent and readable by humans and machines. that mean do not depend on any operating system ,can be used or support on every platform like Windows, linux,mac,android,server...etc

What is a Dependency in pom.xml?

  • I want to use some external java library or tool like spring boot ,jpa,hibernate, please download and include my project. like simply say maven is a tool it mange dependencies in the project,that dependencies placed in pom.xml for example you add dependencies in pom.xml spring tell maven tool download dependencies form internet file like jar file , that jar file combination package and class available.

Example:-

pom.xml

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
</dependency>
// this dependency say  i want to use spring boot for build web application, maven download required library the you add project  @RestController, @GetMapping, etc.

What Happens When You Use Maven?

When you run:
mvn clean install

Maven will:

  1. Read pom.xml
  2. Download all dependencies (JAR files) from the internet (Maven Central)
  3. Compile the code
  4. Run tests
  5. Create a .jar or .war file to run your app

Where Are the JAR Files Stored?

Maven downloads all .jar files into:

C:\Users\YourName\.m2\repository   (Windows)
or
~/.m2/repository                   (Linux/macOS)
  • JAR in Maven Downloaded from the internet and stored in .m2

java is WORA feature write once anywhere ,platform independence , windows, linux.
500 .class to files to :Zip : in java caller jar

.yaml/.yml

YAML Ain’t Markup Language:Easy to read and write.

  • Used in : Configuration files (application.yml)in Spring Boot, Docker (docker-compose.yml), Kubernetes (deployment.yml), Ansible, etc.
  • Feature : Human-readable data serialization language , indentation-based.

  • Structure: Based on indentation (like Python)

  • Supports: Key-value pairs, lists, nested structures.

  • No tags, no brackets

  • Real-time use: Configure properties like ports, DB, paths.

data serialization language mean:
IT means it help store data in structured ,readable format.
IT can represent data like string,number,list,object..etc.
That data can be converted programming object/variable into a file format like YAML,JSON,XML,binary file so it can be stored or send.

Example:-

Your Java Serialization Code:

import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import java.io.File;

public class SimpleSerialize {
    public static void main(String[] args) throws Exception {
        User user = new User();
        user.name = "Prasanth";
        user.age = 24;

        YAMLMapper mapper = new YAMLMapper();
        mapper.writeValue(new File("user.yml"), user); // Serialization
    }
}

Output in user.yml (YAML format):

name: "Prasanth"
age: 25

reverse code YAML yo JAVA object = deserilation

What is Deserialization?

  • Mean stored convert data format like YAML or JSON or XML(human readable format) back into java/python object or variable.

Example of YAML configuration:

server:
  port: 8080
spring:
  application:
    name: MySpringBootApp
  datasource:
    url: jdbc:mysql://localhost:3306/mydb
    username: user
    password: password
logging:
  level:
    org.springframework: INFO
    com.example.myapp: DEBUG
  • YAML is a language to store and share data in a clean and readable format,used for configuration.

JSON
JSON-JavaScript Object Notation

  • A lightweight, human-readable data format
  • Commonly used for data exchange between client & server. for example spring Boot can automatically convert java object to Json responsce)(Serialization) and JSON to Java object(post)request input (Deserialization) using a library called Jackson by default.
  1. Spring Boot uses Jackson
  • Spring Boot has built-in support for JSON vice versa the Jackson library.
  • Converts (serializes) Java objects → JSON
  • Converts (deserializes) JSON → Java objects
    
  • Happens automatically using annotations like @RequestBody and @ResponseBody (or @RestController)

  • Key Annotations

Annotation Purpose
@RequestBody JSON → Java object (deserialization)
@ResponseBody Java object → JSON (serialization)
@RestController Combines @Controller + @ResponseBody

  • Jackson default Json Processor it is auto configured.

Q1. How does Spring Boot handle JSON?

Using Jackson library (automatically)
Q2. How do you send/receive JSON in REST API? @RequestBody, @ResponseBody, or @RestController
Q3. How do you customize JSON fields? Use @JsonProperty, @JsonIgnore, etc.
Q4. What if the JSON format is wrong?

Spring throws HttpMessageNotReadableException

Important Points

  • Jackson is auto-configured in Spring Boot → no setup needed.
  • JSON input should match Java class field names (case-sensitive).
  • Use validation annotations like @NotNull, @Size with @valid.
  • You can control JSON output with @JsonInclude, @JsonIgnore, etc.
    
  • Real-time use REST APIs, mobile/web apps
    (frontend-backend data exchange)

Tomcat:-
Tomcat is server that run you java web application(WAR) also embedded(include) inside spring Boot Jar apps not java application((JAR)not need install server manually).

  • Spring helps developer connect their web application to number data base.
  • It support relational databases and non relational database
  1. What is a Relational Database (RDBMS)?

RDBS is a Structured data - it mean Data
mean:

  • Data is Stored fixed format in tables(Column and rows) like Excel sheet.Every row must follow the same pattern. like Columns define the pattern(schema) so row must follow it and fill same columns with valid data. or you can not skip columns unless NULL is allowed or it has default value.Note you can not suddenly add 4 the value in the table ,that why structured .
  • Uses Sql (structure Query language) to query and manage data Example:-
CREATE TABLE student (
  id INT,
  name VARCHAR(50),
  age INT DEFAULT 18
);

INSERT INTO student (id, name) VALUES (1, 'Prasanth');

if you try this ,it will fail
INSERT INTO students (id, name) VALUES (2, 'Rahul');

// because RDBMS is Structured data must fallow this rules(column(schema(rule)))the rows.

Image description

above the table:

  • Every row must have 3 values: id, name, and age
  • You can’t suddenly add a 4th value in one row
  • You can’t skip columns unless NULL is allowed. This is called structured data.

Examples of RDBMS:

  • MySQL
  • PostgreSQL
  • Oracle
  • SQL Server

Real-World Use:

  • Banking systems
  • Employee or customer records
  • E-commerce product databases

What is a Non-Relational Database (NoSQL)?

  • Stores data in a flexible format — not in rows and columns.
    No fixed schema — you don’t need to define table structure first.

  • Good for handling unstructured or changing data

Stores data as:

  • JSON-like documents (MongoDB)
  • Key-value pairs (Redis)
  • Graphs (Neo4j)
  • Wide-columns (Cassandra)

Currently using Tools and version:-
Eclipse IDE - 2025-06
Java - Java 21 (LTS)
Springboot -3.5.3
Firefox -v140.0.2
Ubuntu -Ubuntu 22.04 LTS
Tomcat 10.1.42
Database -PostgreSQL 15+

How to add Third party jar add in you project ?

your project right click ,choose bulid path configure build path libraries class-path add-external Jar

How to inject dependency in pom.xml different way ?
https://mvnrepository.com/ you can search your required dependencies(version) paste you in pom.xml.
(Or)
install spring tool for Eclipse https://spring.io/tools( we will see later how to install and use)
(Or)
In Eclipse ->Help-> market place -> search spring latest version.

apachi poi => https://poi.apache.org/

  • Apachi poi is a Java library used to read, write, and modify data microsft office files and generate reports ,Automatic document like:

  • Excel (XLS/XLSX)

  • Word (DOC/DOCX)

  • PowerPoint (PPT/PPTX)

if you want your project you can add this dependencies based on project purpose or need.

Spring boot other some important point:

Spring boot
opinionated view of the Spring platform and third-party libraries so you can get started with minum fuses:- That mean

Spring Boot is opinionated framework , spring boot give default setup like (server(Tomcat),db,JSON..etc) setting,libraries,configurations..etc you can start with basic setup,so you don’t have to decide everything yourself create application faster with less configuration, best for beginners ,if you want decide everything yourself go to spring.

Features

  • Create stand-alone Spring applications
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • Provide opinionated 'starter' dependencies to simplify your build configuration
  • Automatically configure Spring and 3rd party libraries whenever possible
  • Provide production-ready features such as metrics, health checks, and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration

Image description

Finally we came conclusion part of this spring boot blog we will upcoming blog
spring boot projects to Travel...

W

My Journey with API Testing using Keploy Chrome Extension (API Fellowship Task)

Keploy

As part of the Keploy API Fellowship, I was given a task to explore API testing using the Keploy Chrome Extension. Honestly, I wasn’t sure what to expect at first. My past experience with API testing was mostly through manual methods — using Postman, writing curl commands, and trying to figure out headers and request bodies. It always felt time-consuming and repetitive. But when I actually tried the Keploy extension, I was genuinely shocked by how smooth and intelligent the entire experience was.

📋 Fellowship Task Overview

This was Task 2 of the Keploy API Fellowship. The requirement was to test APIs from at least two different websites that use real API calls. I also had to use the Keploy Chrome Extension to capture and test those APIs and finally write a blog post about the experience. It sounded simple, but I had no idea how game-changing this tool would be.

🌐 Websites I Chose for Testing

To complete the task, I used two web applications hosted by Keploy. The first one was the Pet Clinic App — a Spring Boot application where you can view and manage pet owners, pets, and their visits. The second was a Todo App — a lightweight task manager where you can add, view, and delete tasks. Both applications are API-driven and built specifically for practicing API testing. This made it really easy to see the results of my testing almost instantly.

🧪 How I Used the Keploy Chrome Extension

I began by installing the Keploy API Testing Chrome Extension from the Web Store. Once that was set up, I opened the developer tools in Chrome, navigated to the Network tab, and clicked “Start Capture” in the Keploy extension. Then I interacted with the applications — clicking buttons, adding and deleting data, and navigating through different pages. Keploy silently recorded all the API calls in the background. It captured the full request and response cycle, including the URL, method, headers, body, and response. After I stopped the capture, I reviewed the list of recorded calls, and I was surprised to see how complete and structured they were — ready to be turned into test cases without me having to write a single line of code.

😲 What Shocked Me

The most surprising part of the experience was how little effort it took to generate test cases. I didn’t need to write any test logic or commands. Everything I did in the browser — from clicking to submitting forms — was turned into a testable API flow. Keploy used AI to understand and organize the calls, and I could clearly see how it handled different endpoints. This was a huge change from the manual method where you have to note down each API detail yourself and structure it for testing later. With Keploy, everything was real-time and automated.

📸 A Peek at the Test Report

One of the most satisfying parts of this task was looking at the test report generated by Keploy. It visualized the API interactions clearly, showing which endpoints were called, what inputs were sent, and what the expected responses were. I took a screenshot of one of these reports and added it to my project README because it genuinely represented the power of AI-driven testing. It felt like the tool understood my intentions and did the work for me.

📈 What I Learned

This task helped me understand that testing doesn’t have to be difficult or time-consuming. Keploy’s Chrome Extension brings a level of simplicity and automation that makes testing not just accessible but also enjoyable. I learned how to turn simple browser interactions into solid test cases without worrying about missing headers or writing scripts from scratch. It gave me a fresh perspective on how powerful and beginner-friendly modern testing tools can be.

🧠 From Manual to Magical

Before doing this task, I always saw API testing as a technical chore — something necessary but tiring. Now, after using the Keploy Chrome Extension, I actually look forward to testing. It saves time, removes confusion, and gives quick confidence that your APIs are working correctly. This task really shifted my thinking. It made me realize that with the right tools, testing can be an exciting part of the development process.

✍️ Final Note

This Keploy API Fellowship task turned out to be one of the most fun and insightful things I’ve done recently. Big thanks to the Keploy team for building such a useful extension and for encouraging developers like me to explore modern testing practices. I’m excited to use Keploy in my future projects and to continue learning how AI can make software testing smarter and simpler.

Convert List into Paging results using java 8

26 June 2025 at 06:09

In this tutorial, we show the list of result in paging concepts. Like page 1 and no. of results 10.

Page 1 has 1-10 results, page 2 has 11-20 results, page 3 has 21-30 results.

Like page 2 and no. of results 20.

Page 2 has 31-40 results, page 3 has 3-30 results.

	List<Owner> ownerList = ownerRepo.findAll();
    int pageNumber =1, pageSize=5;
	List<Owner> pagingResult =ownerList.stream() 
			.skip((long) (pageNumber -1) * pageSize) 
			.limit(pageSize) 
			.toList(); 	

Explaination:

In above code, ownerList have list of Owner Objects.

  • Convert the list into steam by steam().
  • Skip the first results .
    • like page 2 and results 5 means skip the 1-5 then start from 6 – 10.
    • so we multiple (2-1) * 5 to result is 5 => we get result start from 6.
  • limt the pages .
    • we got the result so we limit the result to pageSize.
    • limit(pageSize).
  • Convert the result into list.

Reference

https://www.digitalocean.com/community/tutorials/java-stream-collect-method-examples

https://www.youtube.com/watch?v=J2pxQFmQsN0

Convert List into Paging results using java 8

In this tutorial, we show the list of result in paging concepts. Like page 1 and no. of results 10.

Page 1 has 1-10 results, page 2 has 11-20 results, page 3 has 21-30 results.

Like page 2 and no. of results 20.

Page 2 has 31-40 results, page 3 has 3-30 results.

	List<Owner> ownerList = ownerRepo.findAll();
    int pageNumber =1, pageSize=5;
	List<Owner> pagingResult =ownerList.stream() 
			.skip((long) (pageNumber -1) * pageSize) 
			.limit(pageSize) 
			.toList(); 	

Explaination:

In above code, ownerList have list of Owner Objects.

  • Convert the list into steam by steam().
  • Skip the first results .
    • like page 2 and results 5 means skip the 1-5 then start from 6 – 10.
    • so we multiple (2-1) * 5 to result is 5 => we get result start from 6.
  • limt the pages .
    • we got the result so we limit the result to pageSize.
    • limit(pageSize).
  • Convert the result into list.

Reference

https://www.digitalocean.com/community/tutorials/java-stream-collect-method-examples

https://www.youtube.com/watch?v=J2pxQFmQsN0

When thinking atrophies

By: ashish
24 June 2025 at 12:29

The end of 2022 was marked by the public release of chatGPT, the chatbot that changed everything. It could answer all questions about everything. It almost felt like someone was sitting at the back and answering everything. Before chatGPT the height of conversations chats was this below

this and other simple statistical based chatbots powered by the likes of API.ai and IBM’s Watson.

It didn’t take long for chatGPT to grow from word of mouth. It was free, easy to use, could seem to answer everything under the sun. It was a frenzy out there. It could write essay’s, come up with plans for your next trip, answer deep philosophical and Biblical questions.

It wasn’t very good at thinking but amazing when it came to generating content and rewriting existing content in a particular tone. This was the time when people and companies started to use this technology for customer support and also to churn out more content than ever before. I still remember my content writing friends who used to work for multiple companies, freelancing and finishing multiple posts within an hour by just using chatGPT.

Within no time (2-6 months), the adoption of GPT in everyday life grew exponentially 

And with this unprecedented rise in adoption, the cracks started to show. Students started using this to pass exams and generate assignments. Most emails started going through GPT. Tools started showing up to integrate GPT into every facet of your life. If it could be done using a computer – guess what, we have a GPT to “assist you”. 

Life couldn’t be any better. Convenience was at its peak. But was it ?

The reliance on GPT was growing to an alarmingly close parallel to what we saw in the movie – Wall -e

The machines tell us what to think, eat, say and do. The humans had given the AI complete control over what would be the best course of action, instead of thinking about it themselves. The same started happening everywhere. Everywhere you look, decisions are being made using chatGPT or its equivalent. Look at this reel that is meant to be funny, however I don’t think we are far from this reality – https://www.instagram.com/reel/DGgcrlcNcsF/

I started to notice the first signs of trouble at work, where interns or freshers who came to interview couldn’t solve simple problems like “Tell me if this number is a fibo number”. We even caught people using GPT during the interview. All the senior devs could see what this reliance on GPT was doing. The problem solving ability, or the critical thinking ability of these students and freshers was slowly being chipped away. Every time they faced a bug, an error, no matter how small it was – it went directly to GPT. 

So what’s happening? 

Well, according to this paper – Your Brain on ChatGPT: Accumulation of Cognitive Debt

Over four months, LLM users consistently underperformed at neural, linguistic, and behavioral levels compared to other groups.

To put it simply, the brain is like a muscle. The more you use it for something, the better you will be at doing said something. And if you let it be for long periods of time, it will waste away and you will no longer be able to do that something as effectively as possible. It’s like being able to do 30 push ups but after 3 months of not doing any push ups, you can only do 5 or 10 now.

In the past, humans would think and machines would do the task. Now machines are thinking and humans are doing the task. Are we gladly giving away a part of what makes us human for a little bit of convenience or time saved?

What we wear, say, greet and post on social media is already governed by GPT. We are being dulled by our over reliance on GPT. I suspect a new type of consultancy will shine in the future – thought consultants, whose sole job would be to come up with new ideas that break the mold of whatever GPT is doing elsewhere in the world.

Are you using GPT to think for you? 

It’s time to stop. Take back the crown of thought. Be uncomfortable for a while. Don’t know the answer to everything. Be slow and intentional. 

Beyond the Competition: How Claude Sonnet 4, GPT-4o, and Gemini 2.5 Can Work Together in Agent Harmony

By: angu10
22 June 2025 at 17:51

The AI landscape is often portrayed as a zero-sum game where models compete for dominance. But what if we shifted our perspective? Instead of choosing one model to rule them all, what if we leveraged the unique strengths of each model to create a more powerful, complementary system?

In this article, we'll explore how Claude Sonnet-4, OpenAI's GPT-4o, and Google's Gemini 2.5 can work together in an agentic architecture, creating a symphony of AI capabilities that's greater than the sum of its parts.

Understanding Each Model's Unique Strengths

Claude Sonnet 4: The Thoughtful Analyst

Strengths:

  • Exceptional reasoning and analysis capabilities
  • Strong ethical reasoning and safety considerations
  • Excellent at breaking down complex problems methodically
  • Superior performance in structured thinking and logical reasoning
  • Excellent at handling nuanced conversations and context

Ideal Use Cases:

  • Code review and analysis
  • Complex problem decomposition
  • Ethical decision-making processes
  • Research and analysis tasks
  • Long-form content creation

GPT-4o: The Versatile Performer

Strengths:

  • Excellent multimodal capabilities (text, vision, audio)
  • Strong creative writing and content generation
  • Robust API ecosystem and integration options
  • Consistent performance across diverse tasks
  • Great at following specific formatting instructions

Ideal Use Cases:

  • Content generation and creative writing
  • Multimodal processing tasks
  • API integrations and automation
  • Quick prototyping and ideation
  • Image analysis and description

Gemini 2.5: The Technical Powerhouse

Strengths:

  • Exceptional mathematical and scientific reasoning
  • Strong coding capabilities and technical documentation
  • Excellent at handling large contexts and complex data
  • Superior performance in research and technical analysis
  • Great integration with Google's ecosystem

Ideal Use Cases:

  • Scientific research and analysis
  • Complex mathematical computations
  • Technical documentation
  • Data analysis and processing
  • Integration with Google services

The Complementary Architecture: Building a Multi-Agent System

Instead of choosing one model, let's design a system where each model handles what they do best. Here's how we can create a complementary agentic architecture:

Implementation: Python-Based Multi-Agent System

Let's build a practical example that demonstrates how these models can work together. We'll create a research assistant that leverages all three models.

import asyncio
import json
from typing import Dict, List, Any
from dataclasses import dataclass
from enum import Enum

# Mock API clients - Here we're going to have only Mock API 
# but reader can replace with actual API implementations
class ModelType(Enum):
    CLAUDE = "claude-sonnet-4"
    GPT4O = "gpt-4o"
    GEMINI = "gemini-2.5"

@dataclass
class TaskResult:
    model: ModelType
    task_type: str
    result: str
    confidence: float
    metadata: Dict[str, Any]

class MultiAgentResearchAssistant:
    def __init__(self):
        self.models = {
            ModelType.CLAUDE: self._init_claude_client(),
            ModelType.GPT4O: self._init_gpt4o_client(),
            ModelType.GEMINI: self._init_gemini_client()
        }

    def _init_claude_client(self):
        # Initialize Claude client
        return {"name": "Claude Sonnet 4", "role": "analyst"}

    def _init_gpt4o_client(self):
        # Initialize GPT-4o client
        return {"name": "GPT-4o", "role": "creator"}

    def _init_gemini_client(self):
        # Initialize Gemini client
        return {"name": "Gemini 2.5", "role": "technical_expert"}

    async def research_topic(self, topic: str) -> Dict[str, Any]:
        """
        Orchestrates a comprehensive research process using all three models
        """
        print(f"🔍 Starting research on: {topic}")

        # Phase 1: Claude analyzes and breaks down the topic
        analysis_task = await self._claude_analyze_topic(topic)

        # Phase 2: Gemini conducts technical research
        technical_research = await self._gemini_technical_research(
            topic, analysis_task.result
        )

        # Phase 3: GPT-4o creates comprehensive content
        final_content = await self._gpt4o_synthesize_content(
            topic, analysis_task.result, technical_research.result
        )

        # Phase 4: Claude reviews and provides final insights
        final_review = await self._claude_review_content(final_content.result)

        return {
            "topic": topic,
            "analysis": analysis_task,
            "technical_research": technical_research,
            "content": final_content,
            "review": final_review,
            "summary": self._create_summary([
                analysis_task, technical_research, final_content, final_review
            ])
        }

    async def _claude_analyze_topic(self, topic: str) -> TaskResult:
        """Claude's role: Thoughtful analysis and problem decomposition"""
        # Simulate Claude's analytical approach
        analysis = f"""
        Analysis of "{topic}":

        1. Core Components:
           - Primary research areas to explore
           - Key stakeholders and perspectives
           - Potential challenges and considerations

        2. Research Strategy:
           - Technical aspects requiring deep expertise
           - Creative elements for engaging presentation
           - Ethical considerations and implications

        3. Success Metrics:
           - Accuracy and depth of information
           - Clarity of presentation
           - Practical applicability
        """

        return TaskResult(
            model=ModelType.CLAUDE,
            task_type="analysis",
            result=analysis,
            confidence=0.92,
            metadata={"reasoning_steps": 3, "considerations": 8}
        )

    async def _gemini_technical_research(self, topic: str, analysis: str) -> TaskResult:
        """Gemini's role: Deep technical research and data analysis"""
        # Simulate Gemini's technical research capabilities
        research = f"""
        Technical Research for "{topic}":

        📊 Data Analysis:
        - Latest statistical trends and patterns
        - Mathematical models and algorithms
        - Scientific papers and research findings

        🔬 Technical Implementation:
        - Code examples and technical specifications
        - Performance benchmarks and comparisons
        - Integration possibilities and frameworks

        📈 Quantitative Insights:
        - Market data and growth projections
        - Technical performance metrics
        - Scalability considerations
        """

        return TaskResult(
            model=ModelType.GEMINI,
            task_type="technical_research",
            result=research,
            confidence=0.95,
            metadata={"data_points": 15, "sources": 12}
        )

    async def _gpt4o_synthesize_content(self, topic: str, analysis: str, 
                                       research: str) -> TaskResult:
        """GPT-4o's role: Creative synthesis and content generation"""
        # Simulate GPT-4o's content creation capabilities
        content = f"""
        # Comprehensive Guide to {topic}

        ## Executive Summary
        Based on our multi-faceted analysis, {topic} represents a significant 
        opportunity with both technical and strategic implications.

        ## Key Findings
        - Strategic insights from analytical review
        - Technical breakthroughs from research data
        - Implementation roadmap for practical application

        ## Creative Applications
        - Innovative use cases and scenarios
        - Engaging examples and case studies
        - Visual concepts and presentation ideas

        ## Actionable Recommendations
        1. Immediate next steps
        2. Long-term strategic planning
        3. Risk mitigation strategies
        """

        return TaskResult(
            model=ModelType.GPT4O,
            task_type="content_synthesis",
            result=content,
            confidence=0.89,
            metadata={"sections": 4, "recommendations": 3}
        )

    async def _claude_review_content(self, content: str) -> TaskResult:
        """Claude's role: Final review and quality assurance"""
        review = f"""
        Quality Review:

        ✅ Strengths:
        - Comprehensive coverage of key topics
        - Well-structured and logical flow
        - Balanced technical and strategic perspectives

        🔧 Recommendations:
        - Consider adding more specific examples
        - Strengthen the conclusion with actionable insights
        - Ensure accessibility for diverse audiences

        📋 Final Assessment:
        Content meets high standards for accuracy, clarity, and usefulness.
        Ready for publication with minor enhancements.
        """

        return TaskResult(
            model=ModelType.CLAUDE,
            task_type="quality_review",
            result=review,
            confidence=0.94,
            metadata={"review_criteria": 8, "passed": True}
        )

    def _create_summary(self, results: List[TaskResult]) -> str:
        """Create a summary of the collaborative process"""
        return f"""
        🤝 Collaborative Research Summary:

        Models Involved: {len(set(r.model for r in results))}
        Total Tasks: {len(results)}
        Average Confidence: {sum(r.confidence for r in results) / len(results):.2f}

        Process Flow:
        1. Claude provided analytical framework and strategic thinking
        2. Gemini delivered technical depth and data-driven insights
        3. GPT-4o synthesized information into engaging, actionable content
        4. Claude conducted final quality review and validation

        This complementary approach leveraged each model's unique strengths
        to produce a more comprehensive and valuable outcome.
        """

# Advanced Use Case: Code Review Pipeline
class CodeReviewPipeline:
    def __init__(self):
        self.assistant = MultiAgentResearchAssistant()

    async def review_code(self, code: str, language: str) -> Dict[str, Any]:
        """
        Multi-model code review process
        """
        # Claude: Logical analysis and architecture review
        claude_review = await self._claude_code_analysis(code, language)

        # Gemini: Technical optimization and performance analysis
        gemini_review = await self._gemini_performance_analysis(code, language)

        # GPT-4o: Documentation and improvement suggestions
        gpt4o_review = await self._gpt4o_documentation_review(code, language)

        return {
            "logical_analysis": claude_review,
            "performance_analysis": gemini_review,
            "documentation_review": gpt4o_review,
            "combined_score": self._calculate_combined_score([
                claude_review, gemini_review, gpt4o_review
            ])
        }

    async def _claude_code_analysis(self, code: str, language: str) -> TaskResult:
        """Claude analyzes code logic and architecture"""
        return TaskResult(
            model=ModelType.CLAUDE,
            task_type="code_logic_analysis",
            result="Logical structure is sound with clear separation of concerns...",
            confidence=0.91,
            metadata={"issues_found": 2, "suggestions": 5}
        )

    async def _gemini_performance_analysis(self, code: str, language: str) -> TaskResult:
        """Gemini analyzes performance and optimization opportunities"""
        return TaskResult(
            model=ModelType.GEMINI,
            task_type="performance_analysis",
            result="Performance bottlenecks identified in data processing loops...",
            confidence=0.88,
            metadata={"optimizations": 3, "complexity_score": 7.2}
        )

    async def _gpt4o_documentation_review(self, code: str, language: str) -> TaskResult:
        """GPT-4o reviews documentation and suggests improvements"""
        return TaskResult(
            model=ModelType.GPT4O,
            task_type="documentation_review",
            result="Documentation coverage is 73% with opportunities for improvement...",
            confidence=0.85,
            metadata={"doc_coverage": 0.73, "improvement_areas": 4}
        )

    def _calculate_combined_score(self, results: List[TaskResult]) -> float:
        """Calculate a weighted combined score"""
        weights = {"code_logic_analysis": 0.4, "performance_analysis": 0.35, 
                  "documentation_review": 0.25}

        total_score = 0
        for result in results:
            weight = weights.get(result.task_type, 0.33)
            total_score += result.confidence * weight

        return total_score

# Usage Example
async def main():
    # Initialize the multi-agent system
    research_assistant = MultiAgentResearchAssistant()
    code_reviewer = CodeReviewPipeline()

    # Example 1: Research a complex topic
    print("=== Research Assistant Example ===")
    research_result = await research_assistant.research_topic(
        "Implementing Microservices Architecture with Event-Driven Design"
    )

    print(f"Research completed with {len(research_result)} phases")
    print(research_result["summary"])

    # Example 2: Code review process
    print("\n=== Code Review Example ===")
    sample_code = """
    def process_data(data_list):
        result = []
        for item in data_list:
            if item > 0:
                result.append(item * 2)
        return result
    """

    review_result = await code_reviewer.review_code(sample_code, "python")
    print(f"Code review completed with combined score: {review_result['combined_score']:.2f}")

if __name__ == "__main__":
    asyncio.run(main())

Real-World Applications and Benefits

1. Content Creation Pipeline

  • Claude: Analyzes the audience and creates a content strategy
  • Gemini: Researches technical accuracy and data validation
  • GPT-4o: Generates engaging, well-formatted content

2. Software Development

  • Claude: Architectural decisions and code logic review
  • Gemini: Performance optimization and technical implementation
  • GPT-4o: Documentation, testing strategies, and user interface design

3. Research and Analysis

  • Claude: Problem decomposition and critical thinking
  • Gemini: Data analysis and scientific methodology
  • GPT-4o: Report writing and presentation creation

Implementation Best Practices

1. Task Orchestration

class TaskOrchestrator:
    def __init__(self):
        self.task_queue = []
        self.model_capabilities = {
            ModelType.CLAUDE: ["analysis", "reasoning", "review"],
            ModelType.GEMINI: ["technical", "mathematical", "research"],
            ModelType.GPT4O: ["creative", "synthesis", "formatting"]
        }

    def assign_task(self, task_type: str, content: str) -> ModelType:
        """Intelligently assign tasks based on model strengths"""
        for model, capabilities in self.model_capabilities.items():
            if task_type in capabilities:
                return model
        return ModelType.GPT4O  # Default fallback

2. Quality Assurance

class QualityAssurance:
    @staticmethod
    def validate_results(results: List[TaskResult]) -> bool:
        """Validate results across multiple models"""
        avg_confidence = sum(r.confidence for r in results) / len(results)
        return avg_confidence > 0.8 and len(results) >= 2

    @staticmethod
    def consensus_check(results: List[TaskResult], threshold: float = 0.7) -> bool:
        """Check if models agree on key points"""
        # Implementation would compare semantic similarity
        return True  # Simplified for example

3. Cost Optimization

class CostOptimizer:
    def __init__(self):
        self.model_costs = {
            ModelType.CLAUDE: 0.015,  # per 1k tokens
            ModelType.GEMINI: 0.012,
            ModelType.GPT4O: 0.018
        }

    def optimize_task_assignment(self, tasks: List[str]) -> Dict[str, ModelType]:
        """Assign tasks to minimize cost while maximizing quality"""
        assignments = {}
        for task in tasks:
            # Logic to assign based on cost-effectiveness
            assignments[task] = self._best_model_for_task(task)
        return assignments

The Future of Complementary AI

As AI models continue to evolve, the concept of complementary architectures becomes even more powerful. We're moving toward a future where:

  • Specialized Models: Each model excels in specific domains
  • Intelligent Orchestration: Systems automatically choose the best model for each task
  • Continuous Learning: Models learn from each other's outputs
  • Seamless Integration: Users don't need to know which model is handling their request

Conclusion

The future of AI isn't about one model dominating all others — it's about creating intelligent systems that leverage the unique strengths of each model. By building complementary architectures with Claude Sonnet 4, GPT-4o, and Gemini 2.5, we can create more robust, accurate, and efficient AI solutions.

The examples and code provided in this article demonstrate practical approaches to implementing these complementary systems. As you build your own multi-agent architectures, remember that the goal isn't to replace human intelligence but to augment it with the best that each AI model has to offer.

Start small, experiment with different task assignments, and gradually build more sophisticated orchestration systems. The complementary approach not only provides better results but also creates more resilient and adaptable AI solutions for the future.

How to change spring boot banner and set to the spring profile

By: Prasanth
20 June 2025 at 09:54

How to change spring boot banner in Eclipse IDE?

Step 1: Open your spring Boot Project in Eclipse
Step 2: Open src/main/resources Folder in eclipse

  • In the project Explorer (left side)

expand:

Image description

step 3: Right click resource folder -> New -> file -> Give name LOWER Case Letter only.

Example: banner.txt
then click Finish.

like

src/main/resources/banner.txt

step 4: Add custom banner content

open your created file paste your custom test or ASCLL art.

Example:-

Image description

IF you want your own ASCLL text:

https://patorjk.com/software/taag

Step 5: Right click main class(@SpringBootApplication)

Runs As -> Java Application

IF you Do not Want Banner:-

Step 1: Open application.properties in your project.

Location src/main/resource in Double click application.properties add below line.

spring.main.banner-mode=off

What is a Spring Profile?

In Spring Boot , a profile is a to define different configuration for different environment

For example:

dev (development)
test (testing)
prod (production)

Above mention each profile separate beans(objects) or you configuration setting tells that where you app is running.

Why use Profile?

just think like:

in development ,you want to connect to local database.
int production , you want to connect to live database.

Spring Profile help you switch easily between configuration without changing main code.

How to Set a spring Profile:-

1. create separate Property Files:-

go to:

src/main/resources/

Right click resources folder -> new -> file

create files like:-

application-dev.properties

application-prod.properties

inside file type your configuration details

2. In application.properties

=> application.properties

spring.profiles.active=dev

3.Run the Application :

Right-click main class → Run As → Java Application

weekly notes 24 2025

19 June 2025 at 03:14

As summer is here, the days are long. We are going to nearby park in most of the evenings.
Viyan started to play basket ball. I am also learning it along with him.
Got a kids guitar for him. He started to practise it daily.

On Last saturday saturday, Tamil classes concluded for kids, for this academic year. In this month end, we will get 2 months holidays for kids. There will be more outdoor, park, library visits.

TossConf25 ( Tamil Open Source Conference) is happening next month. July 18,19 2025 at St. Joseph’s Institute of Technology, Chennai. Dont miss it if you are in or around chennai.
Interesting talks and workshops are planned. Book your ticket now here – https://TossConf25.kaniyam.com Thanks for the organizing team for the awesome efforts.

I am collecting huge tamil corpus from around 200+ websites daily. Getting content from RSS feeds are easier than scrapping. But need patience to build the huge text content daily. From 200+ websites, getting around 10 MB text content daily. Colelcting the new words and frequently used words, to build the base
of tamil spellchecker.

I am thinking of hosting one more FreshRSS instance with all these RSS news feeds.
We can read adfree news with RSS Feeds.

On exploring the news websites, found the below things

  • Too many advertisements. Signal to Noise ratio is too high. We will lose interesting reading with this high amount of advertisements.
  • Many websites dont provide RSS feeds. The custom platforms they use dont have RSS feed feature.
  • For few of the wordpress websites, the admin disabled RSS feeds.
  • Few site feeds provide only headings on the feeds.
  • Cloudflare prevents feeds to be read by any feed reader, except the browser.
  • Many writers have their websites, but not writing there frequently. But so active on social media.
    They should atleast keep a copy on their websites,blogs.

    Used the below plugin to get the RSS feed link from the websites. – Rsshub Radar – https://chromewebstore.google.com/detail/rsshub-radar/kefjpfngnndepjbopdmoebkipbgkggaa

Sad to see that Google is showing only 7-8 pages of text content websites. After that, for all queries, we are getting only youtube video links. Whatever we write, google will show only form the mainstream websites.

I am reading more about the copyrights and Rss feeds.
Is it fine to get the full text rss feed and open them all to the public for free reading?

It will be super good to read text without any advertisements, banners, popups, and distractions.
But, the copyright is tricky here. Writers will agree to send their content via email for subscribers, via RSS feed for any personal feed readers. But, may not agree for public feed aggregators.

is it okey to give login credentials for users, to read the content?

I will check with few friends and mentors on what they think.
Reply here on what you are thinking on this.

Here is a screenshot of freshrss shows content from various websites.

Work is going super busy with many new activities. Lot of new learnings on AWS and networking.

Published a video by Nithya on “Basics of IT” in tamil. Watch it here – https://www.youtube.com/watch?v=a7sMgZZw0CY

Slowly building local tech community. There are many neighbours interested in learnig tech things.
Will do a python workshop for adults.
Will plan for few tech trainings for kids in the upcoming summer break.

Achutha, nithya’s friend is going to give a demo on azure pipeline this saturday evening.

How are you learning new things? If you have any tech people around you, how are you creating a community of learning together? Share your thoughts.

Before yesterdayMain stream
❌
❌