SlideShare a Scribd company logo
1 of 2
Download to read offline
Tech Mistakes Every Java Developer Would Regret
Everyone makes mistakes, programmers are also no exceptions in this regards. Even the best
programmer will have errors in their code every now and then, and no matter whether you are a beginner
or a master there will be always be some frustrating errors or mistakes that you make that will come back
to haunt you days, weeks, or months at the later in the production cycle. Some of the java errors
developer would regret to face.
Capitalization Errors:
The most common mistake that most Java Programmers make and it’s also the mistake that seems the
most unlikely to make and the easiest to spot. Most experienced Java programmers always check up and
down that whether they have mistakenly capitalize something or forget to capitalize something, but
maximum of them will agree to the fact that they’ve done this a time or two. It’s sometimes extremely
difficult to discover when you’ve done this mistake as our minds tend to read over capitalization errors,
especially in long programs with long function names.
Mistyped Override Function Name:
This is by far one of the most common and most frustrating errors that happen now and again. If you are
having problems with overrides, the first thing you should do is check and double-checks your function
names – chances are there is a missing or added letter somewhere that shouldn’t be!
Passing By Value vs. Passing By Reference:
It’s often that it’s not entirely clear as to when exactly you’re passing by value and when you’re passing by
reference.
Passing by value is when you use a primitive data and pass it to a function. When this happens, a copy of
that data type is sent to the function instead of the actual data itself. When the function performs any
modification to the value, only the copy is being touched, nothing will have happened to the original data.
When you pass an object like a vector, string, or array, however, you are passing by reference- that
means you are actually passing the data type to the function, and any modifications made to the object
are permanent even without the use of a return statement since the function is using the original data.
Quite often these two differences cause strange problems when you think you’re dealing with one and
you are in fact dealing with the other. If you are seeing strange value changing errors, take a look at your
functions, chances are something’s passing differently than you’d expect it to.
Not Writing Exception Handlers:
This isn’t technically an error, but it’s most certainly a very bad Software Programming practice that can
lead to mistakes that can be harder to spot. Even if it’s just a short, unique string that you can match
against the specific handler, make sure you have some sort of error message string for your exception
handlers so you can more easily and quickly find and catch bugs later. A second or two of work writing
exception handlers can save minutes or hours later trying to find out a mistake later!
Null Pointers:
Null pointers are one of the most common errors that Java programmers make. Compilers can't check
this one for you - it will only surface at run-time, and if you don't discover it, your users certainly will.
When an attempt to access an object is made, and the reference to that object is null, a Null Pointer
Exception will be thrown. The cause of null pointers can be varied, but generally it means that either you
haven't initialized an object, or you haven't checked the return value of a function. Since the cause is an
error condition, normal testing may not pick it up - which means that your users will end up discovering
the problem for you.
Conclusion:
Everyone makes mistakes, and every programmer will likely make all of these mistakes more than once
as it is impossible to completely eliminate errors from the coding process, with care and practice you can
avoid repeating the same ones.

More Related Content

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Tech mistakes every java developer would regret

  • 1. Tech Mistakes Every Java Developer Would Regret Everyone makes mistakes, programmers are also no exceptions in this regards. Even the best programmer will have errors in their code every now and then, and no matter whether you are a beginner or a master there will be always be some frustrating errors or mistakes that you make that will come back to haunt you days, weeks, or months at the later in the production cycle. Some of the java errors developer would regret to face. Capitalization Errors: The most common mistake that most Java Programmers make and it’s also the mistake that seems the most unlikely to make and the easiest to spot. Most experienced Java programmers always check up and down that whether they have mistakenly capitalize something or forget to capitalize something, but maximum of them will agree to the fact that they’ve done this a time or two. It’s sometimes extremely difficult to discover when you’ve done this mistake as our minds tend to read over capitalization errors, especially in long programs with long function names. Mistyped Override Function Name: This is by far one of the most common and most frustrating errors that happen now and again. If you are having problems with overrides, the first thing you should do is check and double-checks your function names – chances are there is a missing or added letter somewhere that shouldn’t be! Passing By Value vs. Passing By Reference: It’s often that it’s not entirely clear as to when exactly you’re passing by value and when you’re passing by reference. Passing by value is when you use a primitive data and pass it to a function. When this happens, a copy of that data type is sent to the function instead of the actual data itself. When the function performs any modification to the value, only the copy is being touched, nothing will have happened to the original data. When you pass an object like a vector, string, or array, however, you are passing by reference- that means you are actually passing the data type to the function, and any modifications made to the object are permanent even without the use of a return statement since the function is using the original data. Quite often these two differences cause strange problems when you think you’re dealing with one and you are in fact dealing with the other. If you are seeing strange value changing errors, take a look at your functions, chances are something’s passing differently than you’d expect it to. Not Writing Exception Handlers: This isn’t technically an error, but it’s most certainly a very bad Software Programming practice that can lead to mistakes that can be harder to spot. Even if it’s just a short, unique string that you can match against the specific handler, make sure you have some sort of error message string for your exception
  • 2. handlers so you can more easily and quickly find and catch bugs later. A second or two of work writing exception handlers can save minutes or hours later trying to find out a mistake later! Null Pointers: Null pointers are one of the most common errors that Java programmers make. Compilers can't check this one for you - it will only surface at run-time, and if you don't discover it, your users certainly will. When an attempt to access an object is made, and the reference to that object is null, a Null Pointer Exception will be thrown. The cause of null pointers can be varied, but generally it means that either you haven't initialized an object, or you haven't checked the return value of a function. Since the cause is an error condition, normal testing may not pick it up - which means that your users will end up discovering the problem for you. Conclusion: Everyone makes mistakes, and every programmer will likely make all of these mistakes more than once as it is impossible to completely eliminate errors from the coding process, with care and practice you can avoid repeating the same ones.