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.

Bitbucket

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.

 

Advertisements

4 thoughts on “A little update”

  1. Oh man, I can’t believe they are dissing git. What a disservice they are doing to themselves.I moved my few private repos to bitbucket too. How awesomely easy was that switch? Another +1 for git IMHO.

  2. It’s quite strange but in fairness, I understand now wanting to add something else to the plate when trying to complete a graded project. Hopefully, my next pair programming partner will want to use Git so I can explore how to use Git to collaborate with other coders.Bitbucket def. deserves kudos for making the import of my Github projects as easy as 1,2,3.

  3. I started using Git last year (mid-2011) and my use of git (this semester) has been largely confined to committing my projects as I write them.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s