Showing posts with label tuts. Show all posts
Showing posts with label tuts. Show all posts
Saturday, November 5, 2011 6 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
Tuesday, October 18, 2011 7 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 

Tuesday, October 11, 2011 0 comments

CHALLENGE:Java Tut 32-34-Arrays in Methods & Multidimensional Arrays

The following is a challenge for new developers that have completed:
 Java Tutorial's 32-34 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.
 


B.A.M.F Challenge:
B.A.M.F Challenges & why you want to always at leas try them explained Here:http://bit.ly/ogivqe
Difficulty: 1/2
 Create a java console program with a method that accepts a multidimensional array in its parameters.When the method is called it should print the array out to the console as a table.If you've done everything right you're results should look like this:


This is the the Multi Array
8        9        5          12
55      12        32         22
15       4        39         83




CHALLENGE!!
(Before starting any of the challenges always declare a class and a main method unless told otherwise)
 Difficulty:★2/3
1.Create a multidimensional array. It should have at least 3 arrays inside of it and each array should have several values.

2.Create a method that accepts a multidimensional array in its parameters, name the array in the parameters "x" and name the method "display"[

3.Inside the display method create a for loop, name you're counter "row; loop  through until x.length is less than "row" ; increment by 1

Inside of the "row" for loop insert: [

  • Another for loop. name you're counter "column"; loop  through until x.length is less than "x[row].length;increment by 1. Inside the "column" for loop insert:


  •    1.A print line statement that prints  x[row][column] + "\t"]

  • Print line statement that prints: a blank line] ]


    • 4.In the main method write a print line statement that reads "This is the array table"

      5.In the main method call the display method and place you're array in the parameters

      Note: I am trying to experiment to find the best way to explain loops in words. Everything that is Orange is inside of the "Row" for loop and everything that is red is inside the "column" for loop. If this made it easier for you to understand or you have some suggestions to improve these challenges leave it in a comment below!!


      COMPILE & PRAY TO DUKE!!!
      View the video tutorial: http://bit.ly/r9jFZN
      Monday, October 10, 2011 1 comments

      WALKTHROUGH:TNB Java Tut 26-Random Number Generator[VIDEO & SOURCE CODE]]

      This is a full walkthrough of Java Tutorial 26 by TheNewBoston. Each walkthrough includes:
      • Embedded Video Tutorial
      • Text Transcript of the tutorial broken down into steps.
      • Source code
      If you found this walkthrough helpful and want to see more of them please leave a comment and let me know.Im trying alot of new things and still trying to get a feel for what people want more of.You're feedback counts around here!!!



      Step 1.Import the Random package
       import java.util.Random;  
      

      Step 2. Declare a new Random variable and name it "dice"
       Random dice=new Random();  
      

      Step 3. Declare a int variable and name it "number"
       int number;  
      

      Step 4. Create a "for" loop that will loop through 10 times before stopping.

       for(int counter =0;counter<10;counter++){  
       }  
      

      Step 5. Inside the for loop:
      • Set the number var to equal a random number between 1-6
      •   number=1+dice.nextInt(6);  
        
      •  Print the random number variable + a space (" ")
      •   System.out.println(number +" ");  
        
      End of Tutorial

       TNB Java Tut 26 Complete Source Code 

       import java.util.Random;  
       class TNBjtut26{  
        public static void main(String[] args){  
       Random dice=new Random();  
       int number;  
       for(int counter =0;counter<10;counter++){  
        number=1+dice.nextInt(6);  
        System.out.println(number +" ");  
       }  
          }  
       }  
      
      0 comments

      CHALLENGE:Java Tut 29-Summing Elements of Arrays by theNewBoston

      The following is a challenge for new developers that have completed:
       Java Tutorial - 29 Summing Elements of Arrays by theNewBoston
       


      B.A.M.F Challenge:
      B.A.M.F Challenges & why you want to always at leas try them explained Here:http://bit.ly/ogivqe
      Difficulty: 1/2
       Create a java console program that stores 8 numbers between 1-100 in a array and then find the sum of all the numbers combined using a for loop.


      CHALLENGE!!
      (Before starting any of the challenges always declare a class and a main method unless told otherwise)
      Difficulty:
      1.Create a int array that stores 8 int's and name it values
      2.Create a int var and name it sum
      3.Create a for loop , set the counter to 0 to start, continue looping as long as the counter is less than the length of you're int array, increment the counter by 1 each time it loops.Each time it loops it should:
                    * sum+= values[counter]  (sorry guys , couldn't think of a way to explain that part in words)

      4.Print the sum.

      COMPILE & PRAY TO DUKE The Java God!!!!

      View the video tutorial: http://bit.ly/o7iT9P 

      0 comments

      CHALLENGE:Java Tut's 27&28-Intro to Arrays

      The following is a challenge and or walk-through for new developers that have completed:
      Java Tutorial - 27&28 -Introduction to Arrays 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.
       


      B.A.M.F Challenge:
      B.A.M.F Challenges & why you want to always at leas try them explained Here:http://bit.ly/ogivqe
      Difficulty: ★ 1/2
       Create a int array and loop through each entry in a 2 column list .You're results should look like this:

      Index     Value
      0              18
      1               24
      2                 8
      ect....
      _________________________________________________________________________________

      CHALLENGE!!
      (Before starting any of the challenges always declare a class and a main method unless told otherwise)
       Difficulty:
      1.Create a int array with 5 values of you're choosing.
      2.Create a print line statement with the words Index , a few spaces and Values ( like the example in the BAMF challenge above.
      3.Create a for loop that will continue to loop until you're counter is greater than the length of the array you created , increment by one. Each time it loops:
                          * Print the Index & Value (hint: use the counter from you're for loop)

      View the video tutorial: http://bit.ly/omhcMV 



      If this tutorial was helpful for you or you have suggestions as to how I can improve this series please leave a comment below, You're voice will be heard and I will make what ever improvements I can.

      Friday, October 7, 2011 0 comments

      CHALLENGE:Java Tut 26-Random Number Generator

      The following is a challenge for new developers that have completed:
      Intermediate Java Tutorial - 26 -Random Number Generator by theNewBoston
       


      B.A.M.F Challenge:
      B.A.M.F Challenges & why you want to always at leas try them explained Here:http://bit.ly/ogivqe
      Difficulty: ★ 1/2
       Create a java console program that simulates rolling  a standard 6 sided die(the single form of dice)  10 times and print out the results in the console with a space. The results should look something like this:  
      3 7 2 2 1 ect... up  to 10


      CHALLENGE!!
      (Before starting any of the challenges always declare a class and a main method unless told otherwise)
       Difficulty:
      1. Declare a new Random variable and name it "dice"
      2. Declare a int variable and name it "number"
      3. Create a "for" loop that will loop through 10 times before stopping.
                (hint: initialization; termination; increment
      4. Inside the for loop set the number var to equal a random number between 1-6(hint: "dice.")
      5.Print the random number variable + a space (" ")
      ( If you dont add the space when you run it all youre numbers will be in one jumbled line.)

      View the video tutorial: http://bit.ly/pLAzeg
      0 comments

      Introducing B.A.M.F Challenges

       (B.A.M.F's Make Money Like George Jung From Blow and you will to once you master the art of I2J Translation)

      B.A.M.F Challenges are for those of you feeling a little cocky, Instead of giving you step by step directions I will only give you a abstract goal of the challenge and its up to you to figure out how to make it happen.Even if you cant always complete the B.A.M.F challenge, you should always at least try and then move down to the reg challenge if youre struggling.B.A.M.F Challenges help youre brain become what I call a Java "translator" , as in you can listen to a client explain something they want done in simple English and convert it in you're mind to rough Java.Almost every new programmer gets to a point where they can read source code and understand what its doing, but struggle with creating a program from a idea alone without help or alot of research.The end results should still be the same as the regular challenge.
      0 comments

      IM BACK!!!


      (The best image I could find to represent ADHD)

      I started this blog and being the ADHD developer I am I got distracted and kinda abandoned it for a while but, I checked my blog views for the first time today and realized that this blog is still getting daily views, comments and followers a month after I abandoned it. That tells me that there is a serious demand for a blog like this so ive decided to get back at it!!! If you stumble across this blog and you want me to keep going leave me a comment, follow it , link to it...anything to show me that im not doing all this work for nothing.


      New Java challenges coming soon!!!
      Sunday, July 10, 2011 606 comments

      Top 5 Resources for Learning Java for Android



      Learning to make Android apps is alot like saying " I wanna learn how to write novels in Spanish"  You cant just start writing novels in Spanish if Spanish  isn't your primary language. First you learn the language(java) then after alot of practice you start to catch on to the grammar(syntax) and start to make connections and form sentences. Finally you start to see the big picture of the language and with time your able to write with some sense of style so you can finally write that Spanish novel.(your Android app)

      We dont ask for donations but, if you found this post helpful and want to see more please give +k in Java or Android Via: http://klout.com/Fresh83

      Learning java for Android can seem overwhelming . You have to learn this completely foreign language before you can even start to get to the good stuff(working on apps) not only that but, the java language is HUGE!!! Where do you start? What do you need to know? whats irrelevant to you as a android developer?Below are 5 of my favorite resources for building a strong foundation in java.

      I.Programming Methodology- Stanford



      If your new to Java or development in general this is a priceless web gem.I would dare to say that Mehran Sahami is the best professor ive ever learned from. You can tell the man puts real work into his lessons and does all he can to make java more interesting than it really is. The course is great because it requires no prerequisite programming skills but, does require some level of patience(there is around 30 hours of content from start to finish separated into hour long lectures.It may not be the quickest way to learn java overnight but, your getting something more than someone telling you to cut this and paste this. Its called programming methodology because its aimed to teach you the top down mindset of a developer from the start.The entire course is online via youtube and also comes complete with full class documentation and homework assignments(dont skip them , they may be challenging, but you will thank me after you complete them.




      II.MobileTutsPlus-Learning Java for Android



      If you have development experience in another language and just need a crash course in the java for android this is the tutorial series for you. This series gets right to the meat and potato's with little to no filler.Another thing I really like about this tut series is it mixes in what they call "challenges" where they ask you to do something based on what youve learned in the previous tutorials without just giving you the answer. This is great because it makes what your reading stick to you.





      Ahh the good ol' java trails . Java trails aim to be the master resource for learning java by oracle(the company that owns java) Thinking back what really stuck to me from these tutorials was a overall understanding of OOP. There is literally 1000s of pages on literally everything you could ever want to know about java around here but, in my personal opinion they can be a little dry. Its a good tutorial series to have bookmarked if you want to learn about something specific but, I wouldn't spend weeks trying to read over them from start to finish. There is not enough actual tutorials and things will start to blend together in your mind if your not actually practicing what your learning about.




      IV.Head First Java-Java for the right brained ADHD Developer 



      Head first is a unique book series that accounts for the way the human brain learns best. The books are easy to read and packed with humor, pictures and analogy's that make sense to those of us who don't think in 1's and 0's naturally.The downside is this is not a free series unless your lucky enough to know a pirate....and did i mention torrents are illegal ( I hope someone got that)







      If youve typed in "Java Tutorials" on youtube you've probably heard my boy Bucky keeping it real and spitting knowledge to all you java newbs out there.This guy is Java Juggernaut. His beginner series alone has 87 videos and there all quality. If that wasn't enough he also did a intermediate series that probably has another 80(I haven't finished them all yet myself) This guy has the learning java via youtube market under lock and key and hes one guy doing this stuff from home!!! His tutorials are short(very few exceeding 10 minutes), sweet and casual which makes them easy on the ears.I give big props to this guy and you should to.If you watch 10 or more of these tutorials I would highly recommend donating a few buck's to encourage people to do stuff like this out of the kindness of there hearts.


       
      ;