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.