The Art Of Selling A Tiny IT Project

Building tiny projects in your free time is something that you have to do as a programmer.

The main goal is to test out ideas that sometimes work and you can make a lot of money.

The process of selling a website or application had always been an art. 

Therefore, in this post I’ll tell you what it is like to sell a tiny project, and how I think anyone can.

1. Building a Project

According to many successful small-business founders and serial entrepreneurs.

 Your very best idea may not be quite what your customers want, for whatever reason. 

If you’ve spent all your capital on this one product that doesn’t quite get customers to buy, your business may run out of money before it recovers from the misstep. 

That’s a big risk to take, especially if you’re funding your new home-based business out of your own savings.

A more prudent plan is to start by offering a basic version of what you’ve heard your customers ask for and then ask for feedbacks.

One of the best books that I have read about how to make a successful startup is The Lean Startup for the author Eric Ries.

The Lean Startup: How Today’s Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses

2. Meeting the Buyer

It can be a good idea to make your introductions in a relatively informal setting like a business lunch, where both parties can get to know each other a bit. 

This will help break the ice and can help you feel more at ease.

It’s important to not let your emotions get in the way, as this could influence the buyer’s position.

Clearly state why you want to sell your business, and try to remain as objective as possible. 

It’s possible that the buyer might say something that upsets you or makes you angry, but if this happens, do your best not to show it.

During the meeting, allow plenty of room for questions. If you don’t have the answer to a specific question, say that you’ll look into the matter and let hi, know by email.

Don’t shy away from speaking about challenges your business might be encountering. A buyer who’s really interested will find out anyway during due diligence, so you’re best advised to get everything out in the open.

I highly recommend the book : Get the Meeting!: An Illustrative Contact Marketing Playbook, it has a set of tools you need to get the meetings.

Get the Meeting!: An Illustrative Contact Marketing Playbook

3. Negotiating a Price

When negotiating, seek advantages that allow you to exploit your strength, but don’t disparage the other negotiator in your enthusiasm to obtain victory.

When a negotiation outcome is less than expected, learn from the experience. Commit to getting better. Increase your knowledge of how to use the right tactic, with the right strategy(s), aligned with the right situation.

Make sure you observe and control your biases when assessing the person with whom you’ll be negotiating.

I recommend the book: Never Split the Difference: Negotiating as if Your Life Depended on It, it shows how to be effective when negotiating.

Never Split the Difference: Negotiating as if Your Life Depended on It
Hostinger

4. Receive the payment

How do you securely exchange code for cash?

I think it would be better to use an escrow service.

Their are many platforms providing this service like: escrow.com

It works like this:

  • Buyer transfers to the escrow service.
  • you transfer the domain name, users, and Github repository to the buyer.
  • Brief video call explaining the code.
  • Buyer has some days to try everything out.
  • Escrow service transfers the money to you.

That’s it, the deal is done.

Conclusion:

I understand that to sell a projects you should at least having a small audience.

So, as a programmer, you have to be good technically and a good marketer in order to make money on the internet.

A good strategy could be :

  • Build things you enjoy
  • Write about the process
  • Attract a small audience
  • Attract opportunities (buyers, customers, job offers)

It’s that simple. Code something for a few weeks, maybe publish it on your own blog.

1 people will probably read it, and that’s awesome. Next time it might be ten!

Keep building lots of little things that pique your interest, talk about it, and great things will start happening.

Bonus:

The working environment of an average programmer entails sitting around a desk for long hours surrounded by gadgets.

The reality here is that, there is a huge possibility of programmers developing certain health conditions and computer related injuries.

From my personal experience, I am suffering sometimes from back pain, caused by long hours sitting in front of my computer, sometime with a wrong position.

I recommend a Posture Corrector to regain proper posture which can help to prevent the onset of back, neck and shoulder pain. The Posture Corrector helps provide alignment while sitting, standing, lying down or during your other daily activities.

I write one article per week about programming, thanks for supporting me on patreon, by being my contributor 🙂

Some related articles you might interest in :

1-Make The Code Better Than You Found It

2– 4 Practical Books for Software Architecture

3-The Design Cannot Be Taught

4– 6 Best Programmers of All Time

5-How To Make Your Code Reviewer Like You

6-Most Graduates Unable to Pass Coding Interviews

Most Graduates Unable to Pass Coding Interviews

The number one reason that most graduates that have a BS in Computer Science are not able to pass technical coding interviews might surprise you.

I had prepared for a technical interview for a web developer on our team. I have two questions ready, questions that I had asked candidates multiple times before.

The candidate came in and sat down. He had a degree in Computer Science, and a long list of credentials that would prepare him for a mid-level job, and I was prepared to interview a entry-level developer job.

I have explained the first question, and let him to answer.

The candidate struggled to write simple code on the white paper.

So, from this experience I have get this lesson:

As an interviewer, it is your job to identify candidates that are both smart and get things done. It turns out there are very few people who are both of these things that are interviewing for programming positions.

Software development is something that is difficult and that is why good programmers are in demand. Getting the skills to become an in-demand programmer actually isn’t that difficult at all.

There are only three takeaways that you need to be an in-demand developer, regardless of if you have a degree in Computer Science or not!

The developers who focus on mastering these three skills have huge advantages in their programming career. Here’s what actually matters.

Hostinger

1-Code writing principles come from the 70’s

General principles of software development come a long way and have not changed much since. 

Sure the languages have evolved and we have built on these simple principles to create great things. BUT, the same principles do still apply, so make sure to become very well accustomed to them.

CHECK THIS BOOK: Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

2-Group code by responsibility

Code has a very specific reason of existence.

 It solves a problem. 

If you follow this problem backwards then you will end up on a specific role or even a specific person. 

Group code with similar responsibilities together.

CHECK THIS BOOK: The Pragmatic Programmer by David Thomas and Andrew Hunt

3-Do not stop learning

One of the worst things that can happen to a software developer is to become obsolete. 

Getting ahead of your time is a key skill to have in these days of change. Getting yourself accustomed with new languages and frameworks. 

Follow or even contribute to the software community. 

Talk with other professionals and keep yourself relevant.

CHECK THIS BOOK: The Clean Coder by Robert C. Martin

Conclusion:

Once you understand these concepts and work improve yourself, you’ll find that you’re the type of in-demand developer who is able to pass coding interviews with ease.

Bonus:

The working environment of an average programmer entails sitting around a desk for long hours surrounded by gadgets.

The reality here is that, there is a huge possibility of programmers developing certain health conditions and computer related injuries.

From my personal experience, I am suffering sometimes from back pain, caused by long hours sitting in front of my computer, sometime with a wrong position.

I recommend a Posture Corrector to regain proper posture which can help to prevent the onset of back, neck and shoulder pain. The Posture Corrector helps provide alignment while sitting, standing, lying down or during your other daily activities.


I write one article per week about programming, thanks for supporting me on patreon, by being my contributor 🙂

Some related articles you might interest in :

1-Make The Code Better Than You Found It

2– 4 Practical Books for Software Architecture

3-The Design Cannot Be Taught

4– 6 Best Programmers of All Time

5-How To Make Your Code Reviewer Like You

How To Make Your Code Reviewer Like You

When we talk about code reviews, we focus on the reviewer.

But the developer who writes the code is just as important to the review as the person who reads it.

This article talks about the best books, which show the best practices for participating in a code review when you’re the author. 

You’re going to be so good at sending out your code for review that your reviewer will like you.

1- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

The Clean Code

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees.

Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.

This book’s biggest strength is that it includes tons of code examples, including some long and in-depth ones.

Instead of just listing rules or principles of clean code, many of the chapters go through these code examples and iteratively improve them.

This book is a must-read for every professional software developer, how wants to pass the code review easily.

Strongly recommended!

2-Best Kept Secrets of Peer Code Review: Modern Approach. Practical Advice. (Modern Approach. Practical Advice.) by Smart Bear Inc.

Best Kept Secrets of Peer Code Review

Ten practical Essays from industry experts giving specific techniques for effective peer code review.

This book is nice and short; it provides actionable and useful tips for code review.

Highly recommended !

3- Learning Gerrit Code Review by Packt Publishing

Learning Gerrit Code Review

Learning Gerrit Code Review is a practical guide that provides you with step-by-step instructions for the installation, configuration, and use of Gerrit code review. 

Learning Gerrit Code Review is a practical guide that provides you with step-by-step instructions for the installation, configuration, and use of Gerrit code review. 

Using this book speeds up your adoption of Gerrit through the use of a unique, consolidated set of recipes ready to be used for LDAP authentication and to integrate Gerrit with Jenkins and GitHub.

Very practical and concise book that guides you through the basic principles of code review and set up of Gerrit.

4- The Pragmatic Programmer by David Thomas and Andrew Hunt

The pragmatic Programmer

This book will teach not about codes, sometimes you can read but the main idea is to be a better programmer and think better, crack the problems, think about algorithm by yourself.

Its divided in some topics inside some subjects. You can read by look or follow cover to the end.

This book does not have a specific language or a ‘recipe’ to follow, actually it will open your mind to think better.

I think this book is a must for every programmer.

Conclusion:

 As you participate in code reviews, look for patterns that stall progress or waste effort.

The more you value your reviewer’s time, the more reviewer generates high-quality feedbacks.

If you require them to untangle your code or police simple mistakes, you both suffer.

Emotions run hot when critiquing someone else’s work, But be conscious of pitfalls that could make your reviewer feel attacked or disrespected.

Bonus:

The working environment of an average programmer entails sitting around a desk for long hours surrounded by gadgets.

The reality here is that, there is a huge possibility of programmers developing certain health conditions and computer related injuries.

From my personal experience, I am suffering sometimes from back pain, caused by long hours sitting in front of my computer, sometime with a wrong position.

I recommend a Posture Corrector to regain proper posture which can help to prevent the onset of back, neck and shoulder pain. The Posture Corrector helps provide alignment while sitting, standing, lying down or during your other daily activities.


I write one article per week about programming, thanks for supporting me on patreon, by being my contributor 🙂

Some related articles you might interest in :

1-Make The Code Better Than You Found It

2– 4 Practical Books for Software Architecture

3-The Design Cannot Be Taught

4– 6 Best Programmers of All Time

Make The Code Better Than You Found It

As a developer you will have a lot of time maintaining working code.

There are definitely times where you are writing more new code than maintaining, upgrading, bug fixing and improving old code, but in general code is expensive and folks want to run it for a long time.

Often you’ll jump into code to fix a bug, investigate an issue or answer a question.

When you do so, improve it. 

This doesn’t mean you rewrite it, or upgrade all the libraries it depends on, or rename all the variables.

You don’t need to transform it.

Hostinger

But you should make it better. Just clean it up a bit. 

So, in this article I will share with you some books that will help you to be a clean coder.

1- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

The Clean Code

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees.

Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.

This book’s biggest strength is that it includes tons of code examples, including some long and in-depth ones.

Instead of just listing rules or principles of clean code, many of the chapters go through these code examples and iteratively improve them.

This book is a must-read for every professional software developer.

Strongly recommended!

2-The Clean Coder by Robert C. Martin

The Clean Coder

This book contains practical advice about everything from estimating and coding to refactoring and testing.

You will learn how to communicate, estimate and deal with difficult situations at work.

The Clean Coder will help you become one of the best professional.

3-Head First Design Pattern by Eric Freeman, Kathy Sierra

Head First Design Patterns

This book is a fast-track to design patterns, battle-proven solutions to commonly occurring problems in software design.

The book presents a complicated topic in a fun, readable and practical way.

Head First Design Patterns uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Must-read for every developer doing OO design.

4-GROWING OBJECT-ORIENTED SOFTWARE GUIDED BY TESTS By Steve Freeman and Nat Pryce

Growing Object-Oriented Software

Test-Driven Development (TDD) is now an established technique for delivering better software faster. 

TDD is based on a simple idea: Write tests for your code before you write the code itself. 

However, this “simple” idea takes skill and judgment to do well.

This book shows how to create a realistic project using TDD and is full of code examples. 

Strongly recommended for TDD Developer !

5-Release It!: Design and Deploy Production-Ready Software by Michael Nygard 

Release it !

If you’re a software developer, and you don’t want to get alerts every night for the rest of your life, help is here. 

With a combination of case studies about huge losses, lost revenue, lost reputation, lost time, lost opportunity and practical, down-to-earth advice that was all gained through painful experience.

 This book helps you avoid the pitfalls that cost companies millions of dollars in downtime and reputation. 

Get this book to skip the pain and get the experience

Conclusion:

Code isn’t everything, but it is an important work output.

 Whenever you touch it, you should strive to leave it in a better place that it was before.

So, these books will help you to be an excellent craftmanship programmer.

Bonus:

The working environment of an average programmer entails sitting around a desk for long hours surrounded by gadgets.

The reality here is that, there is a huge possibility of programmers developing certain health conditions and computer related injuries.

From my personal experience, I am suffering sometimes from back pain, caused by long hours sitting in front of my computer, sometime with a wrong position.

I recommend a Posture Corrector to regain proper posture which can help to prevent the onset of back, neck and shoulder pain. The Posture Corrector helps provide alignment while sitting, standing, lying down or during your other daily activities.


I write one article per week about programming, thanks for supporting me on patreon, by being my contributor 🙂

Some related articles you might interest in :

1-Invest Your Golden Time in Transferable Skills

2– 4 Practical Books for Software Architecture

3-The Design Cannot Be Taught

4– 6 Best Programmers of All Time

Invest Your Golden Time in Transferable Skills

As the world of technologies goes very fast. We need to stay up to date with technology. 

Every day, we learn programming languages, frameworks, and libraries.

The more modern tools we know “the better”.

Time is limited, nonrenewable and you cannot buy more of it.

Technology is moving faster than ever before.

To catch up, we need to run very fast. This race has no winners because it has no end.

So, Invest your golden time in transferable skills. Skills that will always be relevant.

Instead, reading a lot of books about frameworks, libraries, etc. Focus on books that teach you the fundamentals.

Example:

  • Instead of new programming language focus on Clean Code, Design Patterns, DDD
  • Instead of Docker learn more about Continuous Delivery
  • Instead of Angular learn more about Web, HTTP and REST
  • Instead of Microservices frameworks focus on Evolutionary Architecture

In this article I will share with you five excellent books, that changed my life, which teach the fundamentals:

1- The Pragmatic Programmer by David Thomas and Andrew Hunt 

The Pragmatic Programmer Book

The Pragmatic Programmer is one of those rare tech books you’ll read, re-read, and read again over the years. 

Whether you’re new to the field or an experienced practitioner, you’ll come away with fresh insights each and every time.

This book will teach not about codes, sometimes you can read but the main idea is to be a better programmer and think better, crack the problems, think about algorithm by yourself. 

There is not much to say, see the first edition was written 20 years ago and when you start reading you see the quality of the book.

Its divided in some topics inside some subjects. You can read by look or follow cover to the end.

This book does not have a specific language or a ‘recipe’ to follow, actually it will open your mind to think better.

I think this book is a must for every programmer.

2- Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

Clean Code: A Handbook of Agile Software Craftsmanship

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. 

Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.

This book’s biggest strength is that it includes tons of code examples, including some long and in-depth ones. 

Instead of just listing rules or principles of clean code, many of the chapters go through these code examples and iteratively improve them. 

This book is a must-read for every professional software developer.

Strongly recommended!

3-Head First Design Pattern by Eric Freeman, Kathy Sierra

Head First Design Pattern

This book is a fast-track to design patterns, battle-proven solutions to commonly occurring problems in software design. 

The book presents a complicated topic in a fun, readable and practical way. 

Head First Design Patterns uses a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Must-read for every developer doing OO design.

4-The Clean Coder by Robert C. Martin

The Clean Coder

This book contains practical advice about everything from estimating and coding to refactoring and testing. 

You will learn how to communicate, estimate and deal with difficult situations at work.

The Clean Coder will help you become one of the best professional and earn the pride and fulfillment that they alone possess.

5-Continuous Delivery By Jez Humble and David Farley

Continuous Delivery

This book sets out principles and technical practices that enable rapid delivery of software to users. 

Through automation of the build, deployment, and testing process.

Jez Humble and David Farley begin by presenting the foundations of a rapid, reliable, low-risk delivery process. Next, they introduce the “deployment pipeline,” an automated process for managing all changes, from check-in to release. 

Finally, they discuss the “ecosystem” needed to support continuous delivery, from infrastructure, data and configuration management to governance.

This book will help you to deliver fast and effectively.

Conclusion:

The longer a technology is on the market, the safer investment it is.

Don’t harry to learn new technology, it has a high probability of dying.

Time is your best advisor. Learn to wait.

Frameworks, libraries and tools come and go. Time is precious.

So, Invest 70% percent of your time on fundamentals and 30% on frameworks, libraries and tools.

Bonus:

The working environment of an average programmer entails sitting around a desk for long hours surrounded by gadgets. 

The reality here is that, there is a huge possibility of programmers developing certain health conditions and computer related injuries.

From my personal experience, I am suffering sometimes from back pain, caused by long hours sitting in front of my computer, sometime with a wrong position.

I recommend a Posture Corrector to regain proper posture which can help to prevent the onset of back, neck and shoulder pain. The Posture Corrector helps provide alignment while sitting, standing, lying down or during your other daily activities.


I write one article per week about programming, thanks for supporting me on patreon, by being my contributor 🙂

Some related articles you might interest in :

1– 4 Practical Books for Software Architecture

2-The Design Cannot Be Taught

3– 6 Best Programmers of All Time

Most Commonly Asked Java/JEE Interview Questions (Part-2)

In this article I will talk about next part of commonly asked Java/JEE interview questions.

Before, jumping to the list, I want to mention that It is great to be good technically, but you have to be also great on communication to succeed.

Being a good communicator will help you get the interview easier.

One of the tools will help you to write a good cover letter and email message is Grammarly’s AI-powered writing assistant

So, let’s go back to our list. 

25) What is a thin client?

A J2EE application client runs on a client machine and can provide a richer user interface than can be provided by a markup language.

An application client is typically downloaded from the server, but can be installed on a client machine.

26) Differentiate between .ear, .jar and .war files

a) .jar files

These files are with the .jar extension.

The .jar files contains the libraries, resources and accessories files like property files.

b).war files

These files are with the .war extension. 

The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.

c).ear files

EAR is a file format used by Java EE for packaging one or more modules into a single archive so that the deployment of the various modules onto an application server happens simultaneously and coherently.

27) What are the JSP tag?

In JSP tags can be divided into 4 different types.
Directives, Declarations, Scriplets and Expressions

28) What are JSP Directives?

a) page Directives
b) include Directives
c) taglib Directives

29) What is Struts?

Struts framework is a Model-View-Controller(MVC) architecture for designing large scale applications. 

Which is combines of Java Servlets, JSP, Custom tags, and message.

Struts helps create an extensible development environment for the application, based on published standards and proven design patterns.

Model in many applications represent the internal state of the system as a set of one or more JavaBeans.

The View is most often constructed using JavaServer Pages (JSP) technology.

The Controller is focused on receiving requests from the client and producing the next phase of the user interface to an appropriate View component.

The primary component of the Controller in the framework is a servlet of class ActionServlet.

This servlet is configured by defining a set of ActionMappings.

30) What is ActionErrors?

ActionErrors object that encapsulates any validation errors that have been found. 

If no errors are found, return null or an ActionErrors object with no recorded error messages.

The default implementation attempts to forward to the HTTP version of this method. 

Holding request parameters mapping and request and returns set of validation errors, if validation failed; an empty set or null

31) What is ActionForm?

ActionForm is a Java bean that associates one or more ActionMappings.

A java bean become FormBean when extend org.apache.struts.action.ActionForm class. 

ActionForm object is automatically populated on the server side which data has been entered by the client from UI.

ActionForm maintains the session state for web application.

32) What is action mapping ?

The ActionMapping represents the information that the ActionServlet knows about the mapping of a particular request to an instance of a particular
Action class.

The mapping is passed to the execute() method of the Action class, enabling access to this information directly.

33) What is the MVC on struts.

MVC stands Model-View-Controller.

Model : Model in many applications represent the internal state of the system as a set of one or more JavaBeans.

View : The View is most often constructed using JavaServer Pages (JSP) technology.

Controller : The Controller is focused on receiving requests from the client and producing the next phase of the user interface to an appropriate View component. 

The primary component of the Controller in the framework is a servlet of class ActionServlet. 

This servlet is configured by defining a set of ActionMappings.

34) What are different modules in spring?

There are seven core modules in spring: 

1- The Core container module
2- O/R mapping module (Object/Relational)
3- DAO module
4- Application context module
5- Aspect Oriented Programming
6- Web module
7- MVC module

35) What is Spring?

Spring is a light weight open source framework for the development of enterprise application that resolves the complexity of enterprise application development also providing a cohesive framework for J2EE application development. 

Which is primarily based on IOC (inversion of control) or DI (dependency injection) design pattern.

36) Functionality of ActionServlet and RequestProcessor?

Receiving the HttpServletRequest

Populating JavaBean from the request parameters

Displaying response on the web page Issues

Content type issues handling

Provide extension points

37) ActionServlet, RequestProcessor and Action classes are the components of

Controller

38) What is default scope in Spring?

Singleton.

39) What are advantages of Spring usage?

Pojo based programming enables reuse component.
Improve productivity and subsequently reduce development cost.
Dependency Injection can be used to improve testability.
Spring required enterprise services without a need of expensive application server.
It reduces coupling in code and improves maintainability.

40)What are the Benefits Spring Framework ?

Light weight container.

No need to read from properties file application code.

It is much easier to unit test Objects are created Lazily. 

Spring’s configuration management services can be used in any architectural layer, in whatever runtime environment

41) What is servlet?
Servlet is a server side components that provide a powerful mechanism for developing server side programs. 

Servlet is a server as well as platform-independent and Servlets are designed for a various protocols. 

Most commonly used HTTP protocols. 

Servlet uses the classes in the java packages javax.servlet, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.http.HttpSession.

All servlets must implement the Servlet interface, which defines life-cycle methods.

42) Servlet is pure java object or not?

Yes, pure java object.

43) What are the phases of the servlet life cycle?

The life cycle of a servlet consists of the following phases:
Servlet class loading
Servlet instantiation
the init method
Request handling (call the service method)
Removal from service (call the destroy method)

44) What must be implemented by all Servlets?

The Servlet Interface must be implemented by all servlets

Conclusion:

I hope that this article will give you a great insight into JAVA/JEE interview questions and answers.

The responses given above will really enrich your knowledge and increase your understanding of JAVA/JEE programming.

Don’t forget the communication plays a big role in the recruiting process.

Make sure to use Grammarly’s AI-powered writing assistant for correcting your texts before sending them to your future employers.

Bonus:

By applying universal rules of software architecture, you can dramatically improve developer productivity throughout the life of any software system.

Now, building upon the success of his best-selling books Clean Code and The Clean Coder, legendary software craftsman Robert C. Martin (“Uncle Bob”) reveals those rules and helps you apply them.

Clean Architecture: A Craftsman’s Guide to Software Structure and Design (Robert C. Martin Series)

Some related articles you might interest in :

1-Most Commonly Asked Java/JEE Interview Questions (Part-1)

2-OOP is Now The Basis of Computer Science

3- 6 Best Programmers of All Time

4-The Most Promising Fields for Programming in the Future

5-The 5 Most Used Languages for Web Development

6- The Best Way To Improve Your Programming Skill Level

7- Recommended Programming Language for Beginner To LEARN First

Connect with me on :Blog, Youtube, Facebook, Twitter

Most Commonly Asked Java/JEE Interview Questions (Part-1)

In this article I will talk about some most commonly asked Java/JEE interview questions.

1- What is J2EE ?

J2EE means Java 2 Enterprise Edition. 

The functionality of J2EE is developing multitier web based applications .

The J2EE platform is consists of a set of services, application programming
interfaces (APIs), and protocols.

2) What are the four components of J2EE application?

Application clients components.

Servlet and JSP technology are web components.

Business components (JavaBeans).

Resource adapter components

3) What are types of J2EE clients?

Applets

Application clients

Java Web Start-enabled clients, by Java Web Start technology.

Wireless clients, based on MIDP technology.

4) What are considered as a web component?

Java Servlet and Java Server Pages technology components are web components. 

Servlet is a Java software component that dynamically receive requests and make responses.

 JSP pages execute as servlets but allow a more natural approach to creating static content.

5) What is JSF?

JavaServer Faces (JSF) is a user interface (UI) designing framework for Java web applications.

JSF provide a set of reusable UI components, standard for web applications.

JSF is based on MVC design pattern. 

6) Define Hash table

HashTable is just like Hash Map, but synchronised.

Hashtable stores key/value pair.

7) What is Hibernate?

Hibernate is a open source object-relational mapping and query service. 

In hibernate we can write HQL instead of SQL, which save developers to spend more time on writing the native SQL.

Hibernate has more powerful association, inheritance, polymorphism, composition, and collections. 

8 ) What is the limitation of hibernate?

Slower in executing the queries than queries are used directly.

Only query language support for composite keys.

No shared references to value types.

9) What are the advantage of hibernate.

Hibernate is database independent. It can be used to connect with any database like Oracle, MySQL, Sybase and DB2 to name a few.

Hibernate supports a powerful query language called HQL (Hibernate Query Language).

Hibernate’s transparent persistence ensures the automatic connection between the application’s objects with the database tables.

10) What is ORM?

ORM stands for Object-Relational mapping. 

The objects in a Java class which is mapped in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. 

It works by transforming the data from one representation to another.

11) Difference between save and saveorupdate

a) save()

 This method in hibernate is used to store an object into the database. 

It insert an entry if the record doesn’t exist, otherwise not.

b) saveorupdate ()

This method in the hibernate is used for updating the object using identifier.

 If the identifier is missing this method calls save().

 If the identifier exists, it will call update method.

Hibernate generates lot of SQL statements in runtime based on our mapping, so it is bit slower than JDBC.

12) Difference between load and get method?

get()method returns null if the object can’t be found. 

The load() method may return a proxy instead of a real persistent instance get() never returns a proxy.

13) How to invoke stored procedure in hibernate?
{ ? = call thisISTheProcedure() }

14) What are the benefits of ORM?

Productivity

Maintainability

Performance

Vendor independence

15) What the Core interfaces of hibernate framework?
Session Interface

SessionFactory Interface

Configuration Interface

Transaction Interface

Query and Criteria Interface

16) What is the file extension used for hibernate mapping file?

The name of the file should be like this : filename.hbm.xml

17) What is the file name of hibernate configuration file?

The name of the file should be like this : hibernate.cfg.xml

18) How hibernate or JPA is database independent ?

Database independency means writing no code dependent to the database vendor.

 Hibernate, or in general JPA, prevents you from writing code according to the Oracle specifications or MySQL specifications.

You use JPA classes and interfaces and make JPA implementation(like Hibernate) do the rest.

19) Define connection pooling?

Connection pooling is a mechanism reuse the connection.

which contains the number of already created object connection. 

So, whenever there is a necessary for object, this mechanism is used to directly get objects without creating it.

20) What is the hibernate proxy?
An object proxy is just a way to avoid retrieving an object until you need it. Hibernate 2 does not proxy objects by default.

21) What is HQL?

HQL stands for Hibernate Query Language. 

Hibernate allows to the user to express queries in its own portable SQL extension and this is called as HQL. 

It also allows the user to express in native SQL.

22) What are the Collection types in Hibernate ?

Set, List, Array, Map, Bag

Conclusion:

So this brings us to the end of the first part of Java interview questions.

These set of Java Interview Questions will definitely help you succeed in your job interview.

Thanks for checking the next part.

Good luck 🙂

Bonus:

It is great to be good technically, but you have to be also great on communication to succeed. 

Communication skills, play big role when writing documentation for frameworks and libraries, or when sending emails or slack messages to coworkers. 

They’re an important factor in how two or more people convey complex ideas and concepts to each other, which is core to collaborating as a software developer.

 And, more recently, communication skills have become an important part of software developer interviews, where most companies will check for a level of aptitude in a candidate’s communication skills.

So, it is very good to have a tool that will help you compose bold, clear, mistake-free writing.

I recommend Grammarly’s AI-powered writing assistant.

Some related articles you might interest in :

1-5 Principles Will Make your Code Robust

2-OOP is Now The Basis of Computer Science

3- 6 Best Programmers of All Time

4-The Most Promising Fields for Programming in the Future

5-The 5 Most Used Languages for Web Development

Connect with me on :Blog, Youtube, Facebook, Twitter

5 Principles Will Make your Code Robust

The 5 principles I will talk about, remain as relevant to day as they were in before.

According Uncle Bob, The software hasn’t change all that much since 1945 when Turing wrote the first lines of code for an electronic computer. 

Software is still if statements, while loops, and assignment statements: Sequence, Selection, and Iteration.

So let’s walk through the principles, one by one.

1- The Single Responsibility Principle(SRP)

Gather together the things that change for the same reasons. Separate things that change for different reasons.

We do not mix business rules with GUI code. 

We do not mix SQL queries with communications protocols.

We keep code that is changed for different reasons separate so that changes to one part to not break other parts.

We make sure that modules that change for different reasons do not have dependencies that tangle them.

2- The Open-Closed Principle(OCP)

A Module should be open for extension but closed for modification.

It about creating modules that can be extended without modifying them. 

Can you imagine working in a system that did not have device independence, where writing to a disk file was fundamentally different than writing to a printer, or a screen, or a pipe ? 

Do we want to see if statement disperse our code to deal with all the little details ?

Or Do we want to separate abstract concepts from detailed concepts ?

We want to keep business rules isolated from the nasty little details of the GUI, and the micro-service communications protocols, and the arbitrary behaviors of the database.

3- The Liskov Substitution Principle(LSP)

A program that uses an interface must not be confused by an implementation of that interface.

We have made the mistake that this is about inheritance.

It is not. It is about sub-typing. All implementations of interfaces are subtypes of an interface.

This principle is about keeping abstractions crisp and well-defined. It is impossible to believe that this is an outmoded concept.

4- The Interface Segregation Principle(ISP)

Keep interfaces small so that users don’t end up depending on things they don’t need.

We still work with compiled languages. 

We still depend upon modification dates to determine which modules should be recompiled and redeployed.

So long as this is true we will have to face the problem that when module A depends on module B at compile time, but not at run time, then changes to module B will force recompilation and redeployment of module A.

This issue is especially acute in statically typed languages like Java, C#, C++ etc.

5- The Dependency Inversion Principle (DIP)

Depend in the direction of abstraction. High level modules should not depend upon low level details.

It is hard to imagine an architecture that does not make significant use of this principle. 

We do not want our high level business rules depending upon low level details. 

We want isolation of the high level abstractions from the low level details. 

That separation is achieved by carefully managing the dependencies within the system so that all source code dependencies, especially those that cross architectural boundaries, point towards high level abstractions, not low level details.

Conclusion:

The Code that follows S.O.L.I.D. principles can more easily be shared with collaborators, extended, modified, tested, and refactored without any problems.

Bonus:

By applying universal rules of software architecture, you can dramatically improve developer productivity throughout the life of any software system. 

Now, building upon the success of his best-selling books Clean Code and The Clean Coder, legendary software craftsman Robert C. Martin (“Uncle Bob”) reveals those rules and helps you apply them.

Get your copy using the link below:

Clean Architecture: A Craftsman’s Guide to Software Structure and Design (Robert C. Martin Series)

Some related articles you might interest in :

1-OOP is Now The Basis of Computer Science

2- 6 Best Programmers of All Time

3-The Most Promising Fields for Programming in the Future

4-The 5 Most Used Languages for Web Development

5- The Best Way To Improve Your Programming Skill Level

6- Recommended Programming Language for Beginner To LEARN First

Connect with me on :Blog, Youtube, Facebook, Twitter

OOP is Now The Basis of Computer Science

Object- oriented programming today is the basis of computer science.

In simple terms I would like to explain it with an example.

First of all think that why are we all doing programming ? and answer to this question is to solve real life problems, to save human efforts and time. 

So, imagine you are the one who have the responsibility to add cash in the ATM machine as a worker.

 So, you need to apply some logic that how many notes of 500 , 2000 or 100 you need to keep there, so the demands of the person taking out money is full filled.

Here come the approach to object- oriented programming.

Imagine yourself as an object in this real world. So you have some characteristics like height, weight etc. And you take part in solving real world problems.

On OOP the object is represented by its data, its behavior, and functions associated with it .

Simple and common example is apple is an object of class fruits and have features like red color, sweet taste etc.

OOP concept includes the 2 basic terms CLASS AND OBJECT.

For example C language uses procedural approach, the program will be executed in the flow written by the programmer.

But, using C++ or java language you can divide the problem into class and object approach and solve using functions and other features of object- oriented programming.

Now to solve the real life complex problems, object-oriented programming it provides the following features to the users:


OOP

1- DATA ABSTRACTION

Showing only the essential details hiding other details, like when you turn a switch on you just press the button but you are unaware of the wiring and connections inside.

2- INHERITANCE 

When one class can inherit the features of base class or parent class.

3- POLYMORPHISM

It is the ability of an object to take on many forms.

The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object. 

4-DATA ENCAPSULATION

Wrapping up data and functions into one unit.

5- MODULARITY

We divide the program into small units to reduce the degree of complexity, and use these modules again and again according to the need of the programmer.

Conclusion:

A lot of developers criticize the object-oriented programming model for multiple reasons. 

The largest concern is that OOP overemphasizes the data component of software development and does not focus enough on computation or algorithms. 

Additionally, OOP code may be more complicated to write and take longer to compile.

Alternative methods to OOP include:

  • functional programming
  • structured programming
  • imperative programming

Most advanced programming languages give developers the option to combine these models.

Bonus:

Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees.

Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.

Noted software expert Robert C. Martin presents a revolutionary paradigm with Clean Code: A Handbook of Agile Software Craftsmanship.

Martin has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code on the fly into a book that will instill within you the values of a software craftsman and make you a better programmer, but only if you work at it.

Get your copy using the link below:

Clean Code: A Handbook of Agile Software Craftsmanship

Some related articles you might interest in :

1- 6 Best Programmers of All Time

2-The Most Promising Fields for Programming in the Future

3-The 5 Most Used Languages for Web Development

4- The Best Way To Improve Your Programming Skill Level

5- Recommended Programming Language for Beginner To LEARN First

6- Don’t Panic This is The Best way to Learn Programming

7- 4 Great YouTube Channels, that Will Improve Your Programming Skill

8-It is Never too Late to Learn How to Program

9-The Best Advice I Wish I know When I Start Programming

Connect with me on :Youtube, Facebook, Twitter