Printing Boolean Input Combinations in Scala

Someone at school recently asked me to help him write some code in Scala to print out the [latex]2^n[/latex] Boolean input combinations that are possible with [latex]n[/latex] variables. I decided to start off with [latex]n=4[/latex] variables to keep things simple and verifiable. After a couple of minutes of hacking around, I came up with the following code:The cool part is the shifting modulus check. I'm actually kind of proud of it. It enabled me to write the code using only two loops! Here is the result: -a -b -c -d +a -b -c -d -a +b -c -d +a +b -c -d -a -b +c -d +a -b +c -d -a +b +c -d +a +b +c -d -a -b -c +d +a -b -c +d -a +b -c +d +a +b -c +d -a -b +c +d +a -b +c +d -a +b +c +d +a +b +c +d Also, please note that this is probably, by no means, the most functional way to do this. It was merely an attempt at hacking together some code that just gets the job done. If I have time, I will write up some posts on functional ways to produce both combinations and permutations in Scala.

Spring Research Assistantship Accepted!

I got an offer for a 1/6th time Research Assistantship in the Spring, working with Dr. Miller in the Computer Science Department and Dr. Kissinger in the Institute of Bioinformatics. According to the letter, recipients are selected through a competitive process, and assistantships are awarded only to the University's most qualified individuals to aid them in their pursuit of study or research. Anyway, I accepted the offer. So, I'll be on both a Teaching Assistantship and Research Assistantship in the Spring!

Software Engineering Class - Requirements Document Submitted

In my Software Engineering class, we're already working on the various phases of the development process for the term project. Today, my team and I submitted the initial version of our Requirements Document. It weighed in at around 75 pages, with over 20 use case descriptions and about a dozen user-interface mockups. Congratulations team!

Three more classes, and some suspense.

Since my last post, I've encountered three more classes: Software Engineering, Simulation and Modeling, and Directed Study. Okay, so Directed Study is pretty much an extension of the research I was doing over the summer. The other two classes will definitely be interesting. I took the undergraduate level of Software Engineering about two years ago. For all intents and purposes, it's the same class. The only exception is that Graduate Students have to answer an additional question on tests. I already know the core material. The only interesting challenge will be forming a group for the group project. With respect to Simulation and Modeling, this class will definitely benefit my contributions to the ScalaTion Research Group. The only thing that's suspenseful is the fact that the assignment for my Teaching Assistantship hasn't been assigned yet. I'm hoping that the Graduate Coordinator has the assignments in the next couple of days because I'm having to delay scheduling some of my research meetings until I know my full schedule. I'm sure it will all work out in the end.