Archive | February 2012

Android Project: Grade Tracker

I finally found something that I would want to write for myself.  It is hard to think of useful apps sometimes and I want to make something that I would want to use as well.

I noticed that the Professors at my University really do not like to keep our grades updated on our portal, and I hate that feeling of being in the dark.  Sure I have a rough guess of what I have, but the grades I receive are usually strewn all about my room throughout the semester (I am willing to admit that I am not the most organized when it comes to desk space.)

So how to fix this problem?

Easy!  I create an application that is simple, and keeps track of my grade as I progress through the semester.  This would require 3 components: Class separation, Grade Entry, and Weight setup.


Class Separation: This lets you set up each class individually, and there will be a nice menu set up to choose which class you would like to view.

Weight Setup: When you create a new class, you will be prompted to enter the weighing of the class (ie 40% quizzes, 10% hw, etc.)

Grade Entry: Within each class will be the option to enter a new grade, and to place it in which category (Such as Homework, Test, Attendance…)


Using this as a framework, I will be able to set up a light application for an Android phone that a student can keep track of their grades as the semester progresses.  Rather than thinking I have an A, I will know the exact percentage that I have!  I think that will be really useful in the long run and I will know what classes I am falling behind in so I can up that GPA


Weekly Update: Interviews, Udacity and More

Interview at Rackspace

Yet another week has passed, and it feels like a lot longer.  School is still keeping me busy with homework assignments, but this weekend wasn’t focused on that.  This last Friday I was informed that I was to have an onsite interview with Rackspace for a summer internship.  I was amazed that I was even considered!  To be honest I just sent it in being very hopeful seeing that most people don’t get internships until the summer between their Junior and Senior year.

Wow that place is huge, and it is everything I want in a company.  It was laid back and had a super positive and fun feel to the whole place.  Yet they get down to serious software development when the time calls for it.  I think I was most surprised that I was not asked a single technical question throughout the entire process.  I assume they just want to find people with the right attitude and then fill in the gaps throughout the summer.  At the end, I was told that in about 3 weeks I will know if I made it in or not.  So I am crossing my fingers.  I really hope I get it, but if I don’t I have a summer research job lined up to work with AJAX at school.  So either way this summer is going to be a lot of fun!


I have a lighter schedule than I have had the past couple of semesters, so I wanted to do something to keep my coding sharp and to always practice.  About a month ago I came across Udacity and wanted to give it a shot!  The idea is that with a 7 week course in CSCI we can learn something new.  To give it a shot, I signed up for CS 101: building a search engine.  Unit 2 just started this week, but I was pretty impressed with the first unit and I think I will actually learn a little bit more about python (the language of choice).


I just got a smart phone for the first time ever!  So this is making me more excited about learning how to develop Android applications.  I have come to realize that my teachers are not the best at keeping their online grade books updated, so I decided that I would write an application that can take my grades and give me the current grade in the class throughout the semester.  I realize there might be an app like this on the market already, but I was to use it as a learning experience for developing!  I am excited to get to the point that I can develop this, and I believe it shouldn’t take too long.


That is all for now,


Weekly Update: School, Android and Web Dev

I want to blog regularly so I will probably drop in at least once a week just to chat about what I have been up to!

Between the last two weeks it has been quite busy for me.  I had my first round of test spanning these last two weeks, and I have started to learn how to develop an Android app. While I have been working on ScratchPad and some new features (I have a basic calculator!)  I decided that what I really want to do before I graduate is to get my own app on the market.  While I don’t expect to make any money off of it, just the idea of telling a friend to check out something that I made really excites me.  So I decided to find some online tutorials for android programming until I have a little cash to spare so I can get a book as well.

If you have not yet, I would check out The New Boston for tech tutorials.  He has created some Java, Python and other tutorials.  But most noted, in relation to this post he had someone do 200 Android tutorials.  Yeah, 200!  I am currently on 21 right now, and hope to get another chunk done this weekend.  So far it has been a blast just running something on an emulator, and I can’t wait to have all the tools to create my first app (which is still in its planning stages!)

Last but not least we put in our Web Development project idea yesterday.  Since one of our group members is in a Fraternity, we are creating a website to help him and his brothers out.  We really wanted to make something that would end up going live at the end of the process, and not just sit and die in a folder so we decided to make something people would actually use.  I am going to write about some of the design and decision process we go through, as well as the actual coding and execution of the site.  So if you are interested in Web Development, be sure to subscribe to keep updated on that!

That is pretty much all for this week, and I will pop in this weekend to talk a little bit more about Android if I feel like there is something worthy of talking about.  If you have any experience developing for Android and have any tips, I would love to hear them!  Until next time.

Humble Bundle Mojang

In December I talked about the Humble Bundle and how I thought it was an awesome charity to give to!  Well this time there is a cool twist, and they folks over at Mojang (of Minecraft fame) are live streaming the creation of their game, and if you buy it all the proceeds go to charity.

Here is the link to the site where you can donate, and watch them work all weekend:

So drop by and check it out if you have ever been interested in game design.

Java Tutorial: Math Class

Every Tuesday I take some time to put together a Java tutorial.  You will notice at the top there is a page indexing them all.  Enjoy!

So turns out, I forgot yesterday was Tuesday so this Java tutorial is a day late!  Since I don’t have to many readers yet, that’s okay I guess.  So today I am going to go over the math class, and also some additional resources.  I wont be touching on all of the methods of the Math class in this tutorial, but some that might be useful, and at the bottom I am going to link off to the documentation of the Math class on Oracles website.

Because Math is in the java.lang package, it does not need to be explicitly imported.  This means there is no need for an import statement, so we will start off our program the same way we have been.  Here is a generic way of showing how to utilize the Math class.


Pretty simple right?  Just make sure that Math has a capital M and there is a . between Math and whichever method of Math you are using.  Since we have not gone over methods in detail I will go over that once I show some of the useful methods of Math, and go from there.

Math.abs(some numeric value);   <----returns the absolute value of a number.

Math.exp(double);               <-----returns the constant e raised to the double.

Math.log(double);               <-----returns the natural log of the double.

Math.max(value, value);         <------returns the max of two numbers (type int, float or double).

Math.min(value, value);         <------returns the min of two numbers (type int, float or double).

Math.pow(double, double);       <-------returns the value of the first argument raised to the second argument.

Now this is just a sample of the different methods the Math class has.  To see the full list go here.  Now onto methods.  What is a method?  I like to describe it as an action a class can perform.  Math being the class, each of these things after the . are the actions that Math can perform.  So you want to find the absolute value of a number?  Pass the number as an  argument to the method.  This is easier to show than tell:




The first example shows that the argument is passed inside the parenthesis to the method, and the second example shows you how that might look.  You can also pass variables, and not just literals.  Just check the documentation to make sure the data type of the variable you are trying to pass matches the data type the method is expecting.  In the case of the Math class, it is usually just a number of some type (float, double, int) and usually not a String.

If you have any questions or need clarification, please leave a comment and I can get that sorted out for you!

Edit: Another way to use the Math class is as follows, to save time!

import static java.lang.Math.*;

public class MathTest
    public static void main(String[] args)

As you can see, there is a different way of importing.  While you don’t need to import the Math class for it to work, this will keep you from having to keep using Math.method() every time.  All you need to put in your file is the following:

import static java.lang.Math.*;

Once you have that, you can call the methods as if they were functions.  In the example above, you see that I am using the abs method of the Math class to find the absolute value of -12.  This works for all of the methods.

Thanks Phoxis for pointing this edit out!


Practice Problem

Make a program that asks the user for 5 numbers, and it will determine which is the maximum number, and which is the minimum number.

Also try using all of the different Math methods, and try passing it arguments through literals AND variables.  Have fun!