Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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

could someone can take a look at my code and leave feedback?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i also have another one_____________________

 
Marshal
Posts: 60076
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I added code tags to your post; you should always use them as the make the code look better Unfortunately, they also highlight some formatting problems:-
  • 1: The use of tabs for indenting.
  • 2: Inconsistent indenting. Get a decent text editor, eg jEdit, kate, gedit, NotePad2, NotePad++ and set its “automatic indentation” option. Then lines 11 and 12 would look better. Or use the formatting options in your IDE.
  • 3: Inappropriate documentation comments, and //TODO empty method comments, presumably inserted by an IDE, not deleted.
  • 4: Multiple declarations on one line (eg 12), made even worse by being interspersed with initialisations.
  • 5: No {} after if on line 23.
  • 6: Some lines too long, and too many blank lines; both those things make the code harder to read.
  • 7: Some of the variables’ names do not make their meaning obvious, eg orate.
  • 8: No spaces around some binary operators, eg <
  • 9: Use of the newline character; you should use printf and %n instead.
  • And some design things.
  • 1: Far too much code in the main method.
  • 2: No sign of object‑oriented design anywhere.
  • 3: The meaning of the two loops is not obvious. The first while has a condition which includes redundant parts.
  • Does your code do what you want it to? I think it needs a lot of tidying up, I am afraid.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!