Saturday, January 10, 2015

Java Programming Camp - By Nicholas

Over the course of the winter break, I attended yet another programming camp at UTD, this time for Java, a much more advanced computer language than that I learned at the previous camp for Alice. I had only had this brief experience with computer programming, so I planned to learn as much as possible. 

However, at the start of the first day, things had already started to roughen up. I had slept in, got to UTD a full 5 minutes late, and had problems downloading software. My computer blue-screened as a result of low power, due to the fact that none of the chargers on my row were functioning. Despite this, I quickly started to get a hang of things. 

The instructor didn’t teach much syntax, and the basic theory was the same as that of Alice. Taking knowledge I had already acquired, such as functions like loops, Boolean, and recursion, I was able to solve many of the problems he set up. I got along well with the instructors, and they even borrowed some Rubik’s cubes from me. Even with limited computer programming experience, I established myself as “ok”. In fact, most if not all of the rest of the class had also had little or no experience. The few 1 or 2 select students who had previously worked with Java finished all their work quickly, moving on to other, more challenging problems. The next day, I was able to join them and struck up relationships with them. Once again, the Rubik’s cube provided a link to which we could relate to. 

Over the 3 day camp, I learned many things about Java. But this was only the tip of the iceberg, and I had barely scratched the surface. The instructor passed me, and said that if I was interested, I could move on to more advanced Java programming. It definitely was much more exciting than Alice, and I plan to continue to code, at and away from home.


An example of a code I wrote to find prime numbers:
          
System.out.println(2.0);  
// This prints out 2, the only even prime
              double a=0;
              int divis=0;
       // defines 2 variables
           for (a=3; a<=100; a++,a++) {
              //for odd numbers from 3-100
              int b = (int) Math.sqrt(a);
              //all where b is the sqrt of a, rounded down
//(only need to check that many)
              int counter=0;        
              for(divis=b; divis>=3; divis--) {
                     /all divides number and counts factors
                     if(a%divis==0){
                     counter = counter + 1;}}
           if (counter == 0)
/all if there are no factors in between the sqrt and 1, then it is prime, print it

              System.out.println(a);}


Notes by Allan: 

1) We were pleasantly surprised by Nicholas' interests in Java. The reason we sent him to the camp was just to let him have something to do outside home during the winter break
2) For the programming part, I emphasized to Nicholas to do the debugging the right way. We will try to sustain his interests in Java via some manageable and interesting programming exercises between now and next camp. 
3) This was Nicholas' orignal journal from last week

Saturday, January 3, 2015

The enchantment of Rubik’s cube – by Lily

My dad gave me a Rubik’s cube when I was about 10 years old. It has kept me spellbound ever since. I remember being dazzled by the movement of the colorful cubes, trying out combinations of algorithms, and duking it out with neighborhood boys and winning the competition at the end.


After a while, the Rubik fever faded away and it became a memory. My second encounter with Rubik’s cube didn’t happen until more than a decade later. When I was in graduate school, a classmate brought one into the lab. Not sure if I could still solve it, I picked it up tentatively. After some turning and trying, old memories kicked in. It took me a few hours to solve it, but I was glad that I could still do it.

When Justin turned 10, I gave him a Rubik’s cube and awed him with the flashing colors and the magic of the algorithms. He was hooked. He learned how to solve it from me first, then picked up other tricks from his friends. It was fun to see him carrying the cube around all the time and spinning the cubes and solving the puzzle while talking to other people. I was happy to pass the cube down to him, especially he could do it much faster than I J

However, when I saw a customized Rubik’s cube in one of my colleague’s office the other day, My mind was itching again. Rubik’s cube has advanced to many variations, different numbers of layers or different shapes. It’s about time for me to try out the new versions. I ordered a set of 4 Rubik’s cubes, 2x2x2, 3x3x3, 4x4x4, and 5x5x5. They came during the Christmas holiday, and the whole family got our hands busy.

Nicholas had never showed interest in solving the Rubik’s cube before. But he thought the 2x2x2 cube was really cute and started working on it. He learned how to solve the 2s and is working on the 3s now. I was super excited about the solutions that came with the cubes, the algorithms are different than what I learned and are so much better! My old record was easily broken. The 4s is super fun to play with, but the 5s is a beast. I was at a lost first, it took me a few hours to solve it following the instructions. It’ll take more playing time to really understand what is going on J