• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Dirty Code  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ALL,

Sorry to post here,

I write java code since 3 years (at work), (Most of the time copy paste from internet/forum...)
Sometimes it works but I don't know why / sometime it doesn't work and don't know why either .....

I really want to understand the core of java...
After 3 years I figure out that I write dirty code 


How can you advice me to solve this problem...

Regards,
Mike
 
author
Sheriff
Posts: 23586
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Tango wrote:
I write java code since 3 years (at work), (Most of the time copy paste from internet/forum...)
Sometimes it works but I don't know why / sometime it doesn't work and don't know why either .....



I am a believer of never ever writing, even a single line of code, that you do not understand. Without an understanding of the code, you can't confirm, if what you did works for all cases, and/or if you introduced another bug.

Don't have a strong recommendation on what to do, except, you have three years of code, that some you don't understand. Perhaps it would be a good idea to go back and understand it?

Henry
 
Bartender
Posts: 1871
46
Eclipse IDE Google Web Toolkit Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Tango wrote: ... Most of the time copy paste from internet/forum... How can you advice me to solve this problem...


Isn't it obvious ? Don't copy-paste. Write your own code, design your own structure. You can ask help here at coderanch any time, we will help you out.
 
author & internet detective
Sheriff
Posts: 38555
653
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
You'll have to go back to the beginning. Get a book on Java and start going through it. Write lots of code. Ask questions here when you don't understand something.

There's no magic; it takes hard work. And it isn't going to get easier if you go on cobbling stuff together by copy/paste. I was just talking to someone the other day about "experienced Java developers" who can't write simple code. We don't hire them. You don't want to be that guy.
 
Marshal
Posts: 60060
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch

Another thing: show some of your code to experienced people, for example here.
 
Mike Tango
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your support.

regards
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!