Life & Times of a Female Software Engineer
Ruby & Rails
Postgres 8.4
Aug 20th
Last year, you may remember me fussing with a new installation of Snow Leopard and trying to get Postgres to behave properly.
At my most current job I’m still stuck on Leopard and just began a project maintaining our installation of Redmine that requires PostgreSQL. We’re behind an iron-clad proxy server (which is a pain in itself) due to the nature of the company, but I was working from home that day and had the luxury of just disconnecting from the VPN and was able to use the one-click installer provided by EnterpriseDB which was a relatively painless procedure. I don’t remember it being so pleasant last year. I’m not sure if the one-click installer is new, I probably installed everything by source last time. In the hopes that within the next few months (I can only dream) I’ll get one of the new snazzy MacBook Pros they’re rolling out to the Online team, I can do it “properly” then and can afford to be lazy now.
I was quite impressed at the tools available in the installer that placed themselves in my /Applications directory by default such as pgAdmin III and a cute SQL Shell that automatically launches the psql command line tool. My only gripe with the one-click installer was that by default it installed postgres to the /Library/PostgreSQL/8.4 directory instead of /usr/local so previous postgres configurations in my extensive dotfiles were a little mucked up until I realized what I had done. Nothing a little bit of symlinking couldn’t fix, but it did drive me insane wondering why psql wasn’t in my $PATH.
ActiveResource, Cucumber and Dupe
Mar 3rd
At my job at American Express Publishing in New York City, I’m doing Ruby on Rails development and I was hired to help with the redesign of FoodAndWine.com. The production site is currently running Cold Fusion and MS SQL and the team is employed with the task of creating a Service Oriented Architecture (SOA) Ruby on Rails web site to replace the legacy code. How this works is that the legacy Cold Fusion site will serve up services for our site, we’ll make requests to get that information and then display that on our Ruby on Rails front end.
This is all nice and dandy because of Ruby on Rail’s ActiveResource that’s built right in. The tricky part comes in with testing. At American Express Publishing in our web development department, we’re really big into Test Driven Development (TDD) and Behavioral Driven Development (BDD). There are tools out there already made to do TDD and BDD for Ruby on Rails, Rspec and Cucumber, respectively. These tools work great when using ActiveRecord but since we don’t utilize a database, Rspec and Cucumber have a hard time working with ActiveResource and mocking service data.
This is where Dupe comes in. My co-worker Matt Parker came up with a ruby gem to mock service calls for use within Cucumber and Rspec so that we can write the appropriate tests for our code. With Dupe, you can write expected service returns and run tests against them. For the initial pages we’ve written we’ve only needed GET requests. When I started cuking and spec’ing some of the flat pages on Food and Wine we found that there was a (probably underused) polls section of the site that we needed to pull over. Because it needs user input to add to the poll, we would need to add a way for Dupe to mock POST requests.
This is the first time I’ve really programmed a gem let alone worked on someone else’s. I’ve spent a lot of time today researching HTTP requests and GETs, POSTs, PUTs and DELETEs. I also looked up the difference between blocks, lambdas and procs and found this neat, well-written blog post about them that helped straighten me out.
I’m still figuring out the appropriate way to set all this up but hopefully I can update the blog with a success story by tomorrow!
Squadron Scramble Redux
Oct 2nd
I’ll apologize to Brandon first for writing this because I am sure when he reads this blog post he will roll his eyes or puke at the thought of me brining this up.
My junior CSU670 “Software Development” class with Matthias Felleisen at Northeastern will forever be one of the most tortuous ordeals I will have ever lived though – but also probably the most rewarding. To this day, I still wake up from nightmares of me sitting at one of the Solaris boxes in the CCIS computer labs talking with other classmates and they ask me what other classes I am taking that semester; lo and behold I can’t even remember one of the 3 or 4 other classes I am supposed to be taking that semester, all I can think about is Software Dev and that I LIVE in this computer lab!
After passing the class from hell, a few of my friends and I made a pact of sorts that we would (one day) continue on with our code from the class and improve on it, because it really was probably one of the largest projects we had ever worked on.
If you have never heard of Squadron Scramble, no worries, I don’t think anyone in the class had ever heard of the game either. It’s a rummy style game but you use aircraft cards with aircrafts from World War II (oh, so appropriate since our professor is German.) Our class rules were modified from the original game, but the basic premise is that you collect three of an aircraft type and can use that to “shoot down” other aircraft trios with a few other wild cards thrown in for good measure.
We were required to pick a programming language and work in pairs and practice paired programming. I had mixed results in past course with paired programming but in this course it was absolutely critical that you have a well functioning team to carry out each week’s assignments, otherwise you would be behind for next week’s tasks because every week built on the weeks before it.
The tasks finally built up to us creating our own game server and administration as well as clients to connect to our server and other student team’s servers. We also had to create dumb artificial intelligence and come up with “player” strategies to try and beat each other with our “players.” And this was all using ugly XML syntax and we were only allowed to use the aging and severely out-dated Solaris machines. We also had to come up with a GUI interface, and did I mention that yes, it all had to work on the grossly out-dated Solaris machines?! That means using Tcl/Tk instead of all the new flashy goodness of anything else developed within the last decade.
With that said and done, my buddy, Ventz, asked me earlier this week if I had time to develop a Ruby client and server and bring the project back to life. My one request was that instead of XML we use JSON instead to make our lives easier. He was going to take a stab at re-writing a Perl version of the code and hopefully get a few other ex-CSU670ers to chip in a Java version and whatever other version they’d want to contribute. My first task is probably to write out a proper spec and improve upon on some of the universally despised guidelines in Matthias’ original spec.
If you’re interested in seeing the final code I wrote in the class, hop on over to my Subversion repository: http://svn.rachelober.com/csu670/ I think this is pretty much the final version of the code that I submitted in the class. I’m almost certain this will not run on anything unless you can get your hands on one of CCIS’ old Solaris servers (which have since been “taken out back” and summarily assassinated,) but I’ll add a disclaimer anyway that the code is provided “as-is” and under no warranty. If it screws up something on your system when you try to run it, sucks for you!
Maybe one day we’ll get some kind of game server to run and we can all play some crappy aircraft card game over the internet.
Making the Blogenning Easier (Maybe?)
Aug 14th
I’ve been promising this for a while but with regular life and headaches taking over my free time… I have been less than productive. But fear not! I DO have an update. I think I basically have the first version of the “Blogenning” software I’ve been talking so much about right now.
For the time being it will be hosted at http://blogenning.rachelober.com/. Not to be self-serving, but it is easiest for me to update it. I spoke with Brandon and we both thought that if it worked well enough we could each chip in a buck and buy ourselves a proper domain to house the insanity.
Features:
- User login and administration
- Add “rounds”, “entries” for rounds, and “users” for entries
- Main page lists the rounds starting from most recent to oldest entries
On the to do list:
- Registering and password retrieval
- “Special” statuses for “trend setters” and “bastards” (these are inside-jokes for people NOT in the Blogenning)
- API stuff so that a plugin for WordPress and Drupal can add rounds and entries
- User account stuff so you guys can change your password
Also, if you know ruby on rails or want to get in on designing the beast (I refuse to do any complicated CSS for this at this point *looks at Jaco and hopes his artistic sense may help with this one*)… you can join our GitHub site and ask to be put on the development team so you can have some input. Yay!
For the time being only my entries are entered into the database so you’re going to have to add your own damn entries because I’m much too lazy to do everyone’s.
Once I get password retrieval working on the site, I have all of your user accounts made, so then you can just do a password retrieval and your password will be emailed to you.