• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Compiling a list of gotcha's

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks, wondering if I can pick your brains

I'm sitting down to a compile a list of most likely catchouts, especially for procedural programmers moving to java. I'd love to hear what type of thing has been your worst bugbear.

I'm thinking about everything, from the utter basic don't get the right class because of includes (ie you want one from one package, but you've included another package with a class of the same name, so you get that by default), to underlying issues with object orientation, such as code with side effects being run twice because a subclass makes calls to super within methods it's overriding (hope that made sense, sorry, haven't finished my first coffee of the day yet!)

Would be really grateful if anyone else would care to confess their learning sins past and present

Thanks for your time

Jax
(ps couldn't decide whether to put this in intermediate or advanced - hope ppl think I've got it right!)
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read the JavaRanch FAQs? There is a lot in there that covers the common questions/most frequently seen mistakes.
 
Jax Blunt
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've just had a quick wander through, and I find it rather difficult to find anything much in there tbh. I've picked up some stuff about dates and arithmetic that was useful that I didn't have on my list yet, but I'd really love to hear ppl's opinions on the most common bugs they've seen/caused/heard about

Jax
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest not recognizing that a particular reference can be null under certain circumstances as a major gotcha. It may become obvious right away or it may hide for an extended period.
Bill
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic