Skip to main content
added 50 characters in body
Source Link
motoku
  • 2.5k
  • 1
  • 22
  • 44
  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or... it behooves you to name this more descriptively.

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded all over. It's much easier to maintain code when you put all of those type of things in one place.

  • You are eating your errors. This is very bad. Errors tell you what is going wrong. When you eat errors you summon the wrath of the Gods; and you will never know when your code isn't working.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded all over. It's much easier to maintain code when you put all of those type of things in one place.

  • You are eating your errors. This is very bad. Errors tell you what is going wrong. When you eat errors you summon the wrath of the Gods; and you will never know when your code isn't working.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    ... it behooves you to name this more descriptively.

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded all over. It's much easier to maintain code when you put all of those type of things in one place.

  • You are eating your errors. This is very bad. Errors tell you what is going wrong. When you eat errors you summon the wrath of the Gods; and you will never know when your code isn't working.

more review
Source Link
motoku
  • 2.5k
  • 1
  • 22
  • 44
  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative. You may want to look into its replacement:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded all over. It's much easier to maintain code when you put all of those type of things in one place.

  • You are eating your errors. This is very bad. Errors tell you what is going wrong. When you eat errors you summon the wrath of the Gods; and you will never know when your code isn't working.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative. You may want to look into its replacement:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded. It's much easier to maintain code when you put all of those type of things in one place.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded all over. It's much easier to maintain code when you put all of those type of things in one place.

  • You are eating your errors. This is very bad. Errors tell you what is going wrong. When you eat errors you summon the wrath of the Gods; and you will never know when your code isn't working.

gramar
Source Link
motoku
  • 2.5k
  • 1
  • 22
  • 44
  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative. You may want to look into its replacement:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded. It's much easier to maintain code when you put all of those type of things in one place.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative.

  • Strings are hardcoded. It's much easier to maintain code when you put all of those type of things in one place.

  • Off the bat, your code contains no comments. Comments are useful to know what the code does.

  • Your code is very ambiguous. What is

     String thing; // a username?
    

    or

     setLocation()
    

    I notice it sets the subdirectory. You can make this more specific.

  • URLEncoder.encode is marked as deprecated in Netbeans 8. You'll probably want to look into a more forward-compatible alternative. You may want to look into its replacement:

     public static String encode(String s, String enc);
    
  • Strings are hardcoded. It's much easier to maintain code when you put all of those type of things in one place.

Source Link
motoku
  • 2.5k
  • 1
  • 22
  • 44
Loading