Skip to Content

Posts Tagged ‘osl’

The Story So Far

Permalink

This is assignment zero, a brief biography, written for Dr. Budd’s CS419 and CS480. Enjoy!

Part of my decision for coming to Oregon State was that my Debian install had automatically chosen ftp.oregonstate.edu as the fastest mirror available. The message this sent me as a high school student was that OSU, our at least a few people on campus, cared about Free Open Source Software. It didn’t hurt that OSU had an engineering program that is well known for creating quality graduates either.

During the fall term of my freshman year I meet up with the ftp.oregonstate.edu admin, Scott Kveton. At the time he was forming the Open Source Lab and was looking to hire students to write open source software. I had been using Linux for a couple of years and could hardly contain my excitement; I was going to be paid to write open source software as a freshman! And at the time I had no idea that this job was going to open up crazy amazing opportunities for me and all of the other students at the Open Source Lab.

Every successful project I have ever worked on has had a few components: an interesting problem, an experienced mentor and hands off management. At the Open Source Lab I had all of these components for three years and I grew a lot as a developer and person. The OSL and FOSS are great opportunities for students to work on interesting and large projects even as they are still developing their skills in the classroom.

The software I find the most interesting is behind the scenes: the system software. Kernels, device drivers and networking protocols are all things that most users don’t have to think about but are nonetheless very important. There are a few interesting properties about this level of software. First, it must be extremely well thought out and written; if this software goes bad then the user is going to have a very bad day. Second, the code is usually rich with interesting data structures and programming tricks to squeeze out as much performance from the hardware as possible. And finally a lot of smart and interesting people work in system software and I like working with those types of people.

I decided I wanted to be a computer scientist after working for two high school robotics project. The patience and guidance of my mentor, Ron Jackson, helped improve my programming abilities a great deal. Despite the tight deadlines involved in creating full scale humanoid robots in under 6 months during both years the software was written and working before the competition. It was a huge confidence boost to have that responsibility and trust invested in me and in the end come through with a working solution. I had found something I was good at and had a really fun time doing. Perfect.

After college I would like to work as a Linux Kernel developer. This decision is partly influenced by the great experience I had working on a genetic algorithm for the CPU scheduler while working at IBM in Austin. It is also a result of the number of great interactions I have had with members of Kernel community including: Val Henson, Greg KH, Jake Moilanen, the entire OzLabs crew and many others that I have probably forgotten. Plus, I like penguins- that helps.

/me runs off to Australia for a bit.

CS 411 - Best CS Class Yet?

Permalink

My first lecture of the term was today at 9am: Operating Systems II. Paul Paulson, OSU instructor, detailed what I have known for a few months: this class will now use the Linux Kernel and simulate a class size open source community. The required text is “Linux Kernel Development” by Robert Love (a book I recently read and enjoyed) and halfway through the term a special lecture by Greg KH is scheduled! It should be a great course.

Java Without the IDE?

Permalink

Duke the Java Mascot
Today I stayed home but wanted to do some work on the Registry. However, I don’t have a workstation at home with the specs to run IntelliJ with any reasonable speed. Furthermore, I was hoping that dumping the ultra slick IDE will help me learn a bit more about the Java environment.

Eclipse Integration in Vim (Eclim) was the first promising lead I found. However, I had a tough time getting the Registry to run properly under Eclipse and Eclipse is as resource hungry to run as IntelliJ.

I couldn’t turn up any other good Vim tools so I started searching for Emacs tools. Although I am not a huge fan of Emacs I was very impressed with the SLIME environment when I did my towers of hanoi assignment in LISP. And it turned out a very slick Java environment for Emacs is available tool

A quick search for emacs java lead me to the Java Development Environment for Emacs (JDE) which offered a reasonable level of integration including:

  • Debugger Integration
  • Syntax Higlighting
  • Ant Integration
  • Code Templates

JDE Emacs with the Registry

However, it was a beast to configure. My primary problem was that the Debian jde packages in unstable are broken. After uninstalling this package and doing a manual install I had JDE running like a champ.

JDE Emacs with the Registry

The next task was to write a prj.el that would contain all of the information for JDE including: source location, classpath, default file headers, and build configuration. With some help from an example prj.el I wrote one for use with the Registry (here). Although, this file looks daunting the IntelliJ project files are unreadable by comparison.

This screenshot shows Emacs and JDE after an unsuccesful compile of the Registry. Clicking on the ant error loaded the proper file making it quite clear that I had an unfinished line.

Another standard IDE feature that JDE supports is method completion using the compact keystroke [sic] C-c C-v C-.. This brings up a dialog that lists all methods that can be called on this object.

After some digging it turns out debugging the application while it is running in Tomcat is a straightforward affair also. After deploying the application into the $TOMCAT_HOME/webapps directory running $TOMCAT_HOME/bin/catalina.sh jpda start starts Tomcat with remote debugging via JPDA on port 8000. Because the prj.el I wrote has this port set in jde-db-option-connect-socket using the menu Jdb->External Process->Attach via socket enables the debugger. Using this mode common debugging tools such as breakpoints and variable inspection are available.

Overall I am very impressed and excited to start using JDE. Only one thing is holding me up: JSP debugging. Anyone have a solution?

Open Source and Defense

Permalink

Phlak linux logo, http://phlak.org/Recently I recieved an email from Jay Lyman of NewsForge.net who wanted my input on an article he is working on:

I heard you talk a little about your work developing software at NASA when I got a tour of the OSU Open Source Lab earlier this year. As I recall, you mentioned that some of your work had the potential to end up in weapons systems, and a discussion of the matter then followed. I’m working on an article now on the appropriateness of open source for weapons, military and national defense and would like to include your input.

This is a very creative and timely topic given our current political climate and I was happy to help by answering the questions that followed.

Do you believe that military, weapons or defense applications are contrary to the ideals of the open source software community? Please explain.

Freedom is the number one ideal of open source and I believe it would be contrary to these ideals to restrict what the software is being used for. The FOSS community is providing a general purpose foundation for a computing system that requires a great amount of customization for a military application and because of the dedication to the ideals of freedom I think it is a valid however possibly unfortunate use of the software.

As a developer, are you concerned about the use of your creations and development for military/defense purposes?

The project I worked on this summer while in the NASA Goddard Robotics Internship Program was general purpose hand recognition software that had as much application on a Mars rover and physical rehabilitation as it does on a military platform.

This is the only software that I have ever developed that has any military applications.

Although I am concerned that the software could be used in a weapon I am hopeful that more productive application may be found. And by using a FOSS license a developer may be inspired by this software and create an entirely new application.

Do you believe open source is appropriate for these types of applications and national defense?

Ensuring that FOSS is protected by licenses that offer liberal and wide freedom to everyone is key. It would be dangerous to start trying to put any restrictions on how FOSS is used as many good things can come out partnership with governments such as the NSAs SELinux.

Furthermore creating additional barriers of use may confuse consumers and scare off vendors from distributing FOSS.

For example would using Linux on desktops in the Senate be considered defense use? Senate does handle defense funding and decide on military actions.

From your perspective, how significant is open source software in this area?

The group that I worked used Linux for prototypes. However this is primarily R&D and proof of concept work. Deployed military applications more than likely are then converted to a specialized CPU like an FPGA.

I think FOSS is used for rapidly prototyping and feeling out a concept but deployed hardware is futher ruggedized and made more compact and manufacturable by special hardware.

Anything else you would like to add?

Freedom is a central value of the community and I think restricting that freedom to protect from unwanted users, such as the military, would be subverting this value.

The next day after emailing my response I started reading The Debian System and read the following passage:

The additional ability to use Debian for whatever purpose a user thinks fit is equally important. Debian does not allow any discrimination of persons, groups, or fields of endeavour. Debian may be put to use by anyone for anything, even in morally debateable domains, such as genetic research and warfare. Debian does not attempt to define what is acceptable and what is not because it would put a limit on the freedom of its users

So it seems that the community has already given some thought to this topic; however I am still anxious to see what Jay has found from the research of his article.

Note: Tux logo borrowed from Phlak linux, a modular live security Linux distribution, see http://phlak.org

Kernel and Mozilla Builds

Permalink

tuxIn the last few weeks I have had the opportunity to watch releases of both Mozilla (1.0.3) and the Linux Kernel (2.6.11.8 aka Woozy Beaver). These are two of the largest open source projects in existence today and watching the release, build, bug tracking, and communication systems used by these projects was an eye opening experience. Why was it so interesting? Because these projects have strinkingly different ways to develop software.

Bug Tracking
Bugzilla is used pretty much exclusively by Mozilla to track issues, patches and the versions of software that they effect. Chase Phillips of Mozilla seemed very happy and comfortable working with the interface and understanding how and what all of the flags meant. It is a system that seems to work very well for the Mozilla crew.

Alternatively Greg KH said that the bugzilla.kernel.org rarely gets the attention that it needs and ofter goes ignored by kernel developers; although Andrew Morton does notify the proper subsystem maintainer if a bug has been sitting in the database too long. Instead the LKML is used as the primary place for tracking bugs and patches.

The kernel seems to have alot more “buy in” from its community of developers than Firefox does. And from my limited experience in working with open source communities, I think that the use of a mailing list over a BTS could make this difference. When filling a bug report people generally file and forget never having to get involved further. But with a mailing list you post your own problem and in response get to see everyone elses bugs and get introduced to the development process as patches poor into your mail box.
firefox
I realize that there are many other differences between the projects but I think that the dynamics of a mailing list are superior in getting people involved in a software project. But it has its draw backs- the LKML is historically a very harsh environment to get introduced to as the existence of Kernel Newbies and Kernel Mentors suggests. Furthermore some people do not feel comfortable working with mailing lists and smaller projects may miss out on bug reports from users if that is there only form of contact.

Source Code Management
Mozilla uses CVS and have some cool tools setup and integrated with it. Chase gave us a brief tour of Tinderbox (see below), LXR and Bonsai. If there is something that you want to know about the sourcecode these services would be a real help.

The Kernel deals in patches sent through email in particular Greg showed off some cool scripts that allow mbox files containing patches to be automatically parsed applying the patch after a dry-run and adding the patch writers information to the commits and changelog. It all seemed to be a very regulated and standardized process that was inspiriing to watch.

Recently the kernel developers have been working on git and from Gregs recommendation I have been following its development and all I can say is WOW the system is already usable after a month of work and it is looks to be one of those software products that is so practical, simple and pragmatic that in a few years it will become the standard. At the very least I have been having fun reading the source and watching it being developed.

Automated Builds
Mozilla’s Tinderbox system was impressive. The system was polished and well used by the developers. Particularly the integration with CVS and the ability to comment on who was taking charge and fixing the issue was neat.

The Kernel doesn’t have such a system although I have emailed the IA64 team which runs this service and I have been following the git mailing lists and playing with cogito. Maybe I will write one before someone points me to one that exists already :-).

Thanks Guys

Greg KH PCI, USB, I2C, Driver Core and 2.6.x.y maintainer.

Chase Phillips - release engineer for Mozilla

Dave Miller - system administrator for Mozilla

Maintain Talk at Panug

Permalink

PANUGAt InnoTech I met Ed Sawicki of the Portland Area Network Users Group. Ed is working on a new book about DNS outside of the world of BIND and was very interested in Maintain since it uses Tinydns as a backend. In any case he convinced me to give a presentation.

On April 21st Danny and I gave the talk (OO.org Impress File) in a conference room on the Novell campus in Tigard. Unfortunatly the 21st happened to be one of the first sunny and warm days in several weeks so only about 10 of the expected 25-30 showed up to the meeting (I keep telling myself that is the reason for the low turnout :-)).

Also a good friend of mine, Ryan Miglavs, stopped by to watch the presentation. Ryan and I go way back, waaayyyy waaayyyyy back, to a time when squirrels roamed the country side and anti-pirates walked the streets. Phew, I am glad I got those inside jokes out of the way (you better be reading Ryan).

In any case it went well and I hope a few people went away wanting to try out the software. And I would like to thank PANUG for inviting me.

One interesting thing I learned from Ed during the presentation is that DJBDNS supports handing out different records depending on what IP they come from. This coupled with IP to country mappings would make for an interesting way to distribute the load accross a mirror network.

Ajax and Ruby on Rails (Until 5am)

Permalink

UPDATE: Demo offline permanently

UPDATE: I moved my development site to a workstation here at home. It is a slow old box so be gentle, it is serving a little under 10req/s, but it works.

LiveSearch

Over the last few weeks I have been seeing what I can do with Ruby on Rails. My conclusion? In the future I want to use RoR for web applications: PHP just isn’t as fun after you have worked with RoR.

At the Open Source Lab I work on a project written in PHP/MySQL called Maintain (demo), it is a DHCP/DNS management tool that is used by Oregon State, the Open Source Lab, math.ku.edu, and several others. It is a really great package, and one that many people are getting joy out of using. And given its size and complexity and my familiarity with its code, it made a great canidate for me testing out RoR.

Last night I decided to add LiveSearch support into my little pet project that is exploring how I would implement some of Maintains features in RoR. The first thing that needed to be done was add search methods to my models. Browsing around Tobias’ typo source tree I figured out how I wanted to implement searching for one of my domain class and came up with this:


# This search defaults to searching for all strings that match with no
# restriction on beginning or end. Also it will OR together statements in
# the query with a space in them.
def self.search(query)
if query
tokens = query.split.collect {|c| "%#{c.downcase}%"}
r = find_by_sql(["SELECT * from domains WHERE #{ (["LOWER(name) like ?"] * tokens.size).join(” OR “) }”, *tokens])
s = Array.new
r.each {|domain| domain.children.each{|child| r.push child}}
return r.uniq # No need for duplicate entries
end
end

The line with r = find_by_sql( is something that is just amazing to me, and would have required a whole looping structure and some if statements to implement in PHP, but in Ruby I was able to use prepared statements, Array#join, and the * operator on the array to quickly build a restraint on the domains; all in one line.

After implementing the search methods, and looking at the Typo code the rest was a breeze, I created a couple of partials for live search results, and now with two lines of code I can add new objects to the LiveSearch sidebar. Very cool.

If you want to take a look at it in action click here (site down permanently, code available here). The handshake starts with a testguy and ends with a testt. Oh, and this is a limited time offer, the site is running on my laptop.

And speaking of the OSL Scott Kveton has made a great post about OSU’s College of EECS strategy to take on the big research schools and focus less on undergraduate education. Its pretty clear that they should be focusing on open source software and education especially given the current climate around the state but I guess they would rather Go Big than think smart.

Bugs, Curriculum, and Communities

Permalink
GentooBugDay

The last few days have been alot of fun and required the help of a few friends. There have definitely been some challenges, but in the end it has been rewarding.

The GentooBugDay was a great experience, I got two bug fixes submitted 77328 and 68277. It is a start, and I plan on doing more in the future.

Alex Polvi invited Michael Marineau and I to a meeting he had set up with Professor Quinn and Dean Adams. Hearing the questions and concerns of Professor Quinn helped to focus what we can do to move our idea of having Oregon State use more Open Source Software in the classroom.

The next few baby steps are creating a document, a StateOfTheLug, something that we can place down on a table and show people what we have done, show them we have students excited about this, and that we need to bring that into the classroom. What we need to show is the benefits of having software developed by communities that reach outside the bounds of any one company, school, or even person. And how exposure to this process is valuable to students. It is an experience that Dan Frye, Randy Kalmeta, and many other universities recognize, but that we, OSU, are not taking the opportunity to engage in.

But, I think that we are approaching it the right way, the students should be able to demand the skills that the college teaches them, and I want to see open source development taught.

Today Dan and Randy came down today from the Linux Technology Center at IBM. Both of these men understand Linux the business very well, and listening to them helped me to realize how important Linux is becoming to the technology sector, and how it is making customers, engineers, and business people happy. I talked to Randy about where their employees are coming from, and they are not from Oregon. In fact one of their goals in coming down was to meet with the computer science department to see how they are going to help train students to work with open source communities; it is the community stupid! Dan said that it is not the “technology that is revolutionary but the community, and how this software is developed.” This isn’t a new idea, Eric S. Raymond, Linus, and Richard Stallman have recognized the power that a community of dedicated people have when they are able to work together without the frictions and bounds of traditional organizations.

On Alex’s blog he quotes Professor Quinn, “There are only finite resources, however there are infinite things to do.” I think the ultimate goal is to show the department that this is not another check box to add to the list of things that are being done, but a new way of teaching and learning about the things we are already doing. I don’t want to see an “Open Source Class” I want to see Open Source In Class. I think Dean Adams understands it, and loves the idea and we need to work on concentrating what it is we want to see done.

In other news I have been doing alot of work with Ruby On Rails. This framework is beautiful, Ruby is a great language, and the community is very fun and excited about the project. I plan on doing some weekend hacking on my side project of getting Maintain re-implemented in RoR. So far I have been impressed, and think with a week or two of work I could get a system rolling with alot of momentum. But I will wait and see how this weekend goes.