Monday, December 10, 2012 0 comments

THANK YOU!!! THANK YOU!!! THANK YOU!!!




Last night I was searching the net for Android resources as I normally do and came across this article Guides & Tools to Help Get Started with Android Programming and to my suprise noticed that one of my blog posts had been mentioned in their article! So just for shits and giggles I decided to login to my deserted blog and was AMAZED at the response from the android community. It made my night , I wanted to respond to all of you're comments individually in a way that everyone who has left me comments would get their personalized response, unfortunately blogger doesn't have multilevel threaded comments :(  Im working on a solution to this now, but in the meantime if you have questions or need help in Android/Java feel free to contact me via  Facebook or Twitter

The good news is after reading so many kind words and seeing my posts are appreciated and needed in the community I am pleased to announce im back and blogging for the forseable future on a regular basis!! You can look forward to many resources to come friends!


Saturday, November 5, 2011 1 comments

9 Amazing Examples of Parsing XML in Android w. Tuts [Source Code] [Video]

Ive found the best way of learning something in Android is to look at about 5 to 10 different varriations of code that accomplish the same thing. Doing this gives you a sense of  whats consistant in all the examples and how you can and can and cant manipulate the code.




1. TheNewBoston/MyBringBack via Youtube:
http://youtu.be/Z1rtldBTzCE


2.Programmer-XR:
http://p-xr.com/android-tutorial-how-to-parseread-xml-data-into-android-listview/


3.AndroidPeople SAX Parsing:
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser


4.AndroidPeople DOM Parsing:
http://www.androidpeople.com/android-xml-parsing-tutorial-–-using-domparser


5.WarriorPoint:
http://www.warriorpoint.com/blog/2009/07/19/android-simplified-source-code-for-parsing-and-working-with-xml-data-and-web-services-in-android/


6.ctctlabs:
http://www.ctctlabs.com/index.php/blog/detail/parsing_xml_on_android/




7.AndDev User Submitted Tuts by XCaffeinated:
http://www.anddev.org/using_xmlresourceparser_to_parse_custom_compiled_xml-t9313.html


8.AndDev  User Submitted Tuts by PlusMinus:
http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html


9.IBM Android Tuts: 
If your new to Android this example and explaination might be a little confusing, its loaded with complicated java jargon experienced developers love to throw around casually as if they were born with such a vocabulary and you should of to, but in reality the reason why programming is complicated isnt because it actually is complicated, its because the people who useually become programmers are complicated. Its there way of scaring away the avg person from ever trying to learn their god like skills.
http://www.ibm.com/developerworks/opensource/library/x-android/index.html?ca=dgr-lnxw82Android-XML&S_TACT=105AGX59&S_CMP=grlnxw82
Friday, October 28, 2011 0 comments

WALKTHROUGH:TNB Java Tut 50 -"Graphical User Interface GUI" [VIDEO] [SOURCE CODE]

In this walk-through you will create a simple GUI that will use 2 shoInputDialogs and a showMessageDialog to find the sum of two numbers input from the user. 
 
Whats New In This Walk-Through:
  • showInputDialog's- A graphical box that users can input data from
  • Integer.parseInt - A method used to convert a string number to a int var
  • Using showMessageDialog's-A graphical box that can display a message




    Step 1. Import javax.swing.JOptionPane:

    Photobucket

    Step 2. Declare a class and a main method:


    Step 3.Create 2 String variable and set them equal to a showInputDialog:



    Step 4. Create two int variable and set them equal to the Strings we collected from the user via the showInputDialog (you will need to parse the strings before you can set them equal to a int variable):



    Step 5.Create a third int var and set it equal to the sum of int var1 and int var2:



    Step 6. Create a showMessageDialog that will display the sum of the two numbers in sentence form:

    TNB Java Tut 50 Source Code:

     import javax.swing.JOptionPane;  
     class apples {  
       public static void main(String[] args){  
        String fn = JOptionPane.showInputDialog("Enter first number");  
        String sn = JOptionPane.showInputDialog("Enter second number");  
        int num1 = Integer.parseInt(fn);  
        int num2 = Integer.parseInt(sn);  
        int sum = num1 + num2;  
        JOptionPane.showMessageDialog(null, "The answer is " + sum, "the title", JOptionPane.PLAIN_MESSAGE);  
       }  
     }  
    


    End of Tutorial
    Wednesday, October 26, 2011 1 comments

    I Need YOUR Help!!! ( Java Quiz's)



    Tonight I had another idea for another resource to make the series more "compete". Quiz's , yes I mean Quiz's just like you would get in a actual college course and I need the community's help!! If you are currently going through the TNB Java tutorials (1-100) after you watch a video try to come up with a quiz question, make it tough, make it tricky , but make sure its a useful question thats important to know. Im gonna try to start compiling quiz questions and making quizs for every 10 tutorials in the series.


    If you submit a question please also tell me which tutorial the answer is in or at least a range of 2 or 3 tutorials of where the answer is around.
    0 comments

    WALKTHROUGH:TNB Java Tut 49 -"Inheritance" [VIDEO] [SOURCE CODE]

    This is a full walk-through of Java Tutorial 49-"Inheritance" by TheNewBoston.This walk-through includes:
    • Embedded Video Tutorial
    • Alternative explanation & source code
    • Visual Breakdown of the code
    In this walk-through you will learn about using the "toString" method, a very useful method used to give any object a default string representation.





    Super Classes:Super classes are alot like super stars(celebrity's)that influence us.You might never be Kanye west, but from listening/watching  to him you can inherit some of his talents and beliefs(methods). Think of "super classes" as "super stars" that you're regular classes look up to.
     public class superStarKanyeWest{  
       public void rap(){  
       System.out.println("yo yo yo");  
     }  
       public void makeBeats(){  
       System.out.println("BOOM BOOM shimmy BOOM BOOM");  
     }  
       public void personalPhilosophy(){  
       System.out.println("Shoot for the stars so if you fall you land on a cloud.");  
     } 
       public void politicalBeliefs(){  
       System.out.println("George Bush does not care about black people.");  
     }  
     }  
    
    (Example of a "Super Class")




    Joe Nobody is just a normal teenager, he himself has no super powers, but hes a fan of Kanye's and aspires to one day become a world famous rapper.Because Kanye inspires Joe we could say Joe is a extension of what Kanye represents because we are all extensions of the people who inspire us.    
    OVERIDE:In the java world because Joe looks up to (extends) Kanye by default he inherits all of Kanyes public methods, but Joe can also overwrite individual methods he disagrees with Kanye about, such as political beliefs.
     
    Even thought Joe inherited alot of his talents and qualitys(methods) from studying Kanye, Joe is still unique and can have talents(methods) of his own Kanye doesn't such as knowing how to play the guitar.
     public class joeNobody extends superStarKanyeWest{  
      int age=18;  
         public void playGuitar(){  
        System.out.println("I can play guitar");  
      }  
         public void politicalBeliefs(){  
       System.out.println("All politicians are evil crooks and talking politics just gets people pissed off so I just stay out of that stuff.");  
         }   
     }  
    
    (joeNobody Class)


    Bobby is Joes little brother, bobby looks up to Joe.Bobby doesn't even know who Kanye is yet,but Because some of Joes quality's are inherited from Kanye,Bobby inherits the the quality's Joe picked up from Kanye as well as all of Joes unique quality's. 
    Because Joe overode Kanyes political beliefs Bobby will share Joes politicalBeliefs.
    playBasketball() is a method unique to bobby
     public class bobbyNobody extends joeNobody{  
      int age=15;  
          public void playBasketballGood(){  
        System.out.println("I can shoot 10 for 10 from the free throw line.");  
      }  
     }  
    
    (bobbyNobody Class)

    End of Tutorial
    Monday, October 24, 2011 0 comments

    WALKTHROUGH:TNB Java Tut 42 -"toString" [VIDEO] [SOURCE CODE]

    This is a full walk-through of Java Tutorial 42 by TheNewBoston. Each walk-through includes:
    • Embedded Video Tutorial
    • Text Transcript of the tutorial broken down into steps.
    • Source code
    • Visual Breakdown of the code
    In this walk-through you will learn about using the "toString" method, a very useful method used to give any object a default string representation.


    Step 1.Create a class and name it "stringDinger"
     public class stringDinger {  
     }  
    
    inside of the "stringDinger" class:

    Step 2.Create 3 int vars(month, day, year)
      private int month;  
      private int day;  
      private int year;  
    

    Step 3.Create a constructor for the "stringDinger" class that accepts 3 parameters.
     public stringDinger(int m,int d,int y){  
    
    inside of the stringDinger constructor:

    Step 4.Set each of the incoming parameters to their corresponding variables:
      month=m;  
       day=d;  
       year=y;  
    

    Step 5.create a print function statement that prints the sentence "the constructor for this is %s\n , this"(note: "using "this" in this case will equal whatever you're "toString" method returns )
      System.out.printf("the constructor for this is %s\n",this);  
    
    end of stringDinger constructor.

    Step 6.Create a "toString" method that returns the variables formated like this : "month/day/year":
      public String toString(){  
       return String.format("%d/%d/%d",month,day,year);  
      }  
    
    end of "stringDinger" class

    Step 7.Create a new class with a main method, name the class "useTheDinger"
     class useTheDinger{  
      public static void main(String[] args){  
     }  
     }  
    
    inside the  main method of the "useTheDinger" class:

    Step 8.Create a stringDinger object with the parameters 4,5,2011
      stringDinger theDingerSpeaks = new stringDinger(4,5,6);  
    

    End of Tutorial
     TNB Java Tut 46 Complete Source Code 


    "stringDinger" Class

     public class stringDinger {  
      private int month;  
      private int day;  
      private int year;  
      public stringDinger(int m,int d,int y){  
       month=m;  
       day=d;  
       year=y;  
       System.out.printf("the constructor for this is %s\n",this);  
     }  
      public String toString(){  
       return String.format("%d/%d/%d",month,day,year);  
      }  
     }  
    

    "useTheDinger" Class

     class useTheDinger{  
      public static void main(String[] args){  
       stringDinger theDingerSpeaks = new stringDinger(4,5,6);  
       System.out.println(theDingerSpeaks.toString());  
      }  
     }  
    

    Tuesday, October 18, 2011 0 comments

    CHALLENGE:Java Tut 36-37-Display Reg Time

    The following is a challenge for new developers that have completed:
     Java Tutorial - 36-37 Displaying Regular Time by theNewBoston
     To get the most out of these challenges try them a few hours or the day after watching/following along with the actual video.
     

    CHALLENGE!!
    (Before starting any of the challenges always declare a class and a main method unless told otherwise)
     Difficulty:
     
    1.Create a class and name it "Time".Unlike classes we've created in the past you dont need to declare a main method.

    2.Create 3 int vars. name them hour, minute, second.

    3.Create a method,name it setTime, it should accept 3 parameters(int h, int m , int s)
    Inside the setTime method:
    • if h is greater than 0 and less than 24 then set h to hour, else set the hour to 0 by default.This should be accomplished in one line of code( Hint:use the "ternary operator" instead of a if statement)
    • if m is greater than 0 and less than 60 then set m to minute, else set the minute to 0 by default.(Hint: "ternary operator")
    • if s is greater than 0 and less than 60 then set s to second, else set the second to 0 by default.(Hint: "ternary operator")
    End "setTime" method 

    4.Create another method.Name it toMilitary.
    Inside the to Military method:
    • Create a return statement that will format the "hour" , "minute" and "second" vars to display in military format.
      Example of console output:18:30:00
      End "toMilitary" method
    5.Create a method,name it toRegTime
    Inside the "toRegTime" method:
    • Create a return statement that will format the "hour" , "minute" and "second" vars to display in standard time format. (hint:Ull need to use the Modulus (%) operator
      Example of console output:6:30:00 PM
    End "toRegTime" method

    End of "Time" class

    6.Create another class and name it testTime .Create a main method.

    Inside the main method of testTime class:
    • Declare a new Time object and name it tickTock.
    • Print tickTock.toMilitary
    • Print tickTock.toRegTime
    • Call the setTime method with the parameters (13,27,6)
    • Print tickTock.toMilitary
    • Print tickTock.toRegTime
    End of "testTime" class
    COMPILE & PRAY TO DUKE!!!
    View the video tutorial: http://bit.ly/qkxfja 

     
    ;