A little update

So, if you haven’t noticed, I made my Github repos private. Specifically, I made the repos containing code for class projects private because my code was being, ahem, reused in ways that could have made me party to honor code violations. As a result, I won’t be making code written for class projects public except the executable files (maybe). In hiding my repos, I upgraded my Github account but I instantly hit the 5-private-repo limit. So, I’ve been making extensive use of bitbucket.org which is actually not bad at all. Bitbucket.org uses Git so I don’t have too much relearning to do. and it’s great for keeping track of my projects. I’ve tried to get my pair programming partners interested in using Git as a way of collaborating but so far, no luck.


I’m taking two programming classes this semester (Java and C++/C). In both classes, I’m now learning about creating GUIs. For Java, we’re starting with the Swing toolkit; For C++, we’re using the FLTK (pronounced “fulltick”) toolkit. Being new to GUIs, I don’t have anything to say just yet. I’m still trying to wrap my head about the hierarchies, etc. I just wanted to post an update about the repo situation and talk about one|some of my projects!

My most recent project for the Java class involves creating a menu of functions that need to be implemented recursively e.g. factorial, fibonacci, sum up to n and 2 to the n. When using integers for the recursive factorial, I could only compute the factorials of numbers up to 12. When I switched to long, I could only go up to n = 20. So, I decided to use BigInteger which is not a primitive data type so I couldn’t do things like n * n as I would to a regular integer. Here, my favorite sites came in handy: the Java API (for learning how to create a BigInteger and methods available for use) and leepoint.net for an example of how to use BigInteger. Overall, it was pretty painless to use BigInteger for my factorial function. To make use of the BigInteger class, make sure you import java.math.BigInteger. Also, if you’re using an IDE like Eclipse, type a dot after your BigInteger variable name to bring up all methods available to your object.

Lastly, I leave you with an Emacs tip that I’ve warmed up to: Meta-D deletes the word to the right of the cursor and Meta-delete deletes the word to the left of the cursor.


Happy December break! :)

I’m thankful for family and thankful that my faculties are still sharp. 🙂 Long way of saying my semester ended on a very strong note.

Taking a break from stuffing myself, I thought of a crude solution to Problem 5 from ProjectEuler.net. Caution: With the way I solved the problem, I’ll run into an integer oveflow situation for N > 23. Without further ado, here’s the gist of my rough solution:


I’ve started using Github (@janoulle) and I know the basics of creating/cloning a repo, adding, committing and pushing. I may have to pony up for a private repo for placing my class assignments but the cheapskate in me thinks it might be better to move to Bitbucket which has free & unlimited private repos. 

Edit: Problem 6 was relatively straightforward and I solved that quickly. It requires summation formula which, if you’ve taken Calculus I or Discrete Math, should be easy to do. I’ve pushed it to the Github repo which contains  all my solutions. 


Edit: Problem 7 is done.