June 12th, 2009 chris
This quarter Brian Drawert, Matthew Norman, and I have been working on seeing how viable the MapReduce programming paradigm is for scientific computing applications. We’ve been porting over many common scientific algorithms to run over MapReduce and see how well they work. We’ve implemented a subset of the NAS Parallel Benchmarks and have found a number of interesting results (but for many of you these results will be fairly intuitive).
Original resources: Class webpage, slides, paper
Read the rest of this entry »
Posted in Java, Perl, Programming, Python, Ruby, UCSB Projects | No Comments »
November 29th, 2008 chris
So as you’ve noticed I’ve fallen off the blog posting bandwagon. Much apologies! But with Black Friday behind us I’ve picked up two new books at awesome prices:
- Programming Ruby 1.9: I already have the older version covering 1.8 and although a decent chunk of this is a re-hash, it’s nice to look over it again and see a much more comprehensive treatment of old material. It adds in a much greater reference on the Ruby standard library and a light discussion on Ruby metaprogramming and security features, which I’m looking forward to reading and writing about later.
- Stripes: I’ve had my eye on this book since it came out but never really got around to getting it. The subtitle of the book is really what sold me on it: “and Java web development is fun again”. Wow. That’s pretty much all I needed after a year with Spring and Spring Web Flow. Don’t get me wrong, they were great at what they did, but they were a bit of a drag. I’ve already gone through the first chapter and done the “Hello World” example and am very pleased with what I’m seeing. Stay tuned for a review of this as well.
Finals are out next week, so it may be a little light on the posting until then. I’ll try to keep up though, but we shall see. Until then!
Posted in Java, Programming, Ruby | No Comments »
October 15th, 2008 chris
I’m an avid fan of the Pragmatic Programmer series of books, which is incredibly obvious to anyone who regularly reads this blog (which at this point is really just me). So they happen to have a ton of books that involve getting done what you need to get done in the least amount of time while keeping good maintainability and such. This has been the main motivation for me to get a lot of books they put out. But I stumbled across a new book entering beta soon that looks positively intriguing: Programming Clojure.
Read the rest of this entry »
Posted in Clojure, Java, Programming | 2 Comments »
September 9th, 2008 chris
I originally intended these random ‘Simplicity’ updates to be about things I like in Ruby that are a pain to do in Java. And while that’s certainly the case this time around, this comes from a library perspective rather than the languge itself. Specifically, I’m talking about processing command-line arguments. It’s something you have to do all the time when you write these little scripts that come up but for some reason results in the same boilerplate code being constructed. This is why I’m exceptionally glad that Ruby has many solutions to this problem.
Read the rest of this entry »
Posted in Java, Ranting, Ruby | No Comments »
September 2nd, 2008 chris
For the lion’s share of my undergraduate education (80%-90%) we got to program in Java. We did half a semester in C# (close enough), a semester in C, a semester in assembly, and everything else was Java. Although I picked up other languages before I got to undergrad life, Java was the first language that I really learned well, and a lot of how Java does things seeped into my head about how to do things in every other language. It’s not a bad thing, but it made my head spin when I ended up seeing Ruby for sure.
Read the rest of this entry »
Posted in Computer Science, Java, Ranting, School | 1 Comment »
August 20th, 2008 chris
A huge amount of buzz in the internets and especially cloud-computing land is about Amazon EC2. With EC2 you can go pay Amazon some money and get a nice little virtual computer with its own IP and all that fun stuff and throw up your web site on it. Other cloud computing vendors offer software that runs on it to make sure the apps you put on EC2 stay up no matter what (e.g., put a web site on it and make sure that no matter how much traffic it gets, it’s still able to stay functional).
But what if you wanted an open-source alternative? Enter Eucalyptus.
Disclaimer: Since Eucalyptus is a UCSB product and I’m at UCSB, I’m not entirely unbiased. But presumably you realize I’m biased and to some extent, you are too.
Read the rest of this entry »
Posted in C++, Cloud Computing, Java, UCSB Projects | No Comments »
August 15th, 2008 chris
Just a random little mumbling for today: I was on the StackOverflow message forum and saw a question asking how to find your gateway’s IP in Java. The easy way is to do it via a shell command, but in Java this got brutally complicated, and while I was doing this, all I could think was “geez, how much simpler is this in Ruby?”
Read the rest of this entry »
Posted in Java, Programming, Ranting, Ruby | 1 Comment »
July 14th, 2008 chris
As promised, today we’re going to look at SWIG. The basic idea of SWIG can be summarized as follows:
Got code in C or C++ that you want to use with your favorite language? Well then look no further! SWIG is the thing for you!
This is essentially the Wrapper Facade from POSA 2 in three sentences instead of many pages (although much less convincing than POSA 2 did it). We’ve been rambling about how they could only use C++ to make C code object-oriented, but that it’s not entirely their fault since they wrote the book in the year 2000. Last time we mentioned the ctypes library as an easy way for Python programmers to use C code, but the downside was you could only do this in Python.
Read the rest of this entry »
Posted in C++, Java, Programming | No Comments »
October 25th, 2007 chris
I don’t always want to code in Java. In fact, I’ve recently wanted to not program in Java and get a feel for everything else that’s neat and nifty and blah blah blah. But Java spoiled me. I got used to having my libraries distributed with my package, and having it work on other systems pretty easily. So imagine the fun times I had trying to get MySQL and SMTP support working in other languages…
Read the rest of this entry »
Posted in Java, Perl, Programming, Ranting, Ruby | No Comments »
July 12th, 2007 chris
Looking over some of the reports on my blog reveal that pretty much everyone to this point looking at this blog look at the Java / Matlab post and not much else. Therefore, here’s everything I’ve learned concretely on how to call Matlab from Java and what NOT to do to save you some grief:
What I did:
Make a file that contains all the commands you want to run when MATLAB starts. My script file looks like this (named scriptName):
cd /directoryWithMATLABScript/
myMATLABScript
quit
The Java code I have used is a modified version of the code here. Now, use the following Java code to call MATLAB with the commands from your script:
Read the rest of this entry »
Posted in HowTo, Java, Matlab, Programming | 11 Comments »