OpenBSD Journal

Developer blog: Ray

Contributed by Ray Lai on from the my-very-first-time dept.

Hi, I'm Ray. I am a new OpenBSD developer. I wanted to be an OpenBSD developer not for the glory or riches, but for the self-validation. Four months ago I was writing my first large (1000+ lines) C program; today I am a committer. Here is my journey...

I wanted to get code commits; but didn't know where to start, so I cheated. I turned up the warnings on a bunch of utilities and started doing -Wall and lint(1) sweeps. I read style(9) and started cleaning them. Easy! Cleaning the code also helped me to understand the code, and I started finding ways to improve upon them.

After a while, I had enough of being a lint(1) brush. I wanted to prove that I could code - to myself and to the rest of the community. I needed to develop something that could be committed to OpenBSD. I then thought of sdiff(1).

sdiff(1) was simple but lacking in OpenBSD. It parses diff(1) output and splits it into two columns on the screen. I thought it was simple, but I was still a C neophyte and didn't grasp the intricacies. One bug only appeared when I compiled with -O0. I showed the code to my girlfriend, who was appalled by my debugging printf(3)s. She insisted that I use GDB and threatened to delete my code if she catches me using printf(3)s again.

That was how I learned to use GDB.

I was sick of nitpicking at sdiff(1), so I sent the code to misc@. A couple of days later deraadt@ yelled at me for invading the system space with my variable names, using realloc(3) poorly, and just having scary code in general. I was so happy my code wasn't just ignored and left to rot on the mailing list archives. I fixed what I could and rereleased the code. A few days later tedu@ committed my code.

marco@ and otto@ invited me to different chat rooms so they could get to know me better. The tree was locked, so I hung out at the channels and watched marco@ rant.

marco@ has been reverse engineering EST (Enhanced SpeedStep) code via ACPI and needed a good command-line calculator that accepted numbers in different bases. He didn't want to have to deal with specifying input bases and output bases, he just wanted to type numbers in C syntax.

marco@ joked he was going to stop ACPI development and write the calculator instead. I was procrastinating on more important matters, I dropped everything, whipped up a rough calculator in an hour, and sent it to him.

marco@ was sedated temporarily, but wanted more features and bloat. yacc(1) was pointed out to me. I didn't know yacc(1) at the time, but a rant seemed imminent so I Googled yacc(1) tutorials and skimmed bc(1) source code. I managed to create a simple yacc(1) calculator and the rant was held back once more. (My blood, sweat, and tears are in the ports tree under math/moo. If anyone wants to help extend it to different integer sizes or clean up the yacc mess, please contact me!)

The tree unlocked and a few days later I was offered an account. My mentor is otto@; every commit I make has to be okayed by him first. I am expected to commit, and commit often. The pressure is on.

(Comments are closed)

  1. By Chad Loder ( on

    Welcome to OpenBSD. It's funny, my process of becoming an OpenBSD developer was fairly similar, as I'm sure was the case for other developers. I started sending in small, careful bugfix patches, got yelled at until I grokked the OpenBSD way of doing things, and then eventually became responsible for a couple different pieces in the tree.

    Then I became a slacker. But that is a story for another time.

    1. By Nate ( on

      You just said the s word and Theo didn't even post first, is he like standing right behind you or something?

        1. By Jess Charbneau ( on

          > Hey, whats wrong with slacking ?

          That link is great!

    2. By Ben ( on

      We all become slackers.. Some of us willingly, and some of us due to heavy coding work elsewere. =( I do miss working on OpenSSH.

      My experience was different than above in some respects... The yelling and screaming parts by Theo are the same, but I ended up coming in via OpenSSH Portable group.

      I should have kepted the email exchange the invite came out of left field and slammed into me like a brick wall. I'm sure Theo realized how much of a dolt I was when I answered the first message with basicly a "Uh? What?"

      Oh well, I never really did expand beyond OpenBSD code, and I ended up dropped out due to time and energy restrictions. Which reminds me I promised sftp code over a year ago.. *SIGH*

      Wish you good coding Ray, and I hope you make up for losers like me that dropped out. =-)

      - Ben

      1. By Nate ( on

        Did any of that sftp code include tab completion, if so, you'll rue the day you stopped working on it.

        1. By Ben ( on

          >Did any of that sftp code include tab completion,
          >if so, you'll rue the day you stopped working on it.

          I had a complete tab completion over a year ago (local, remote and command completion)... It was based on GNU Readline with the hope that libedit could be fixed in two spots... Just the project went with pure libedit and my code was lost in the sands of time.

          And yes I started working on a libedit version recently. Just libedit isn't as clean for implementing these features, and the reference code I'm using makes me ill looking at.

          - Ben

          1. By Nate ( on

            Well? Go on! Start rueing.

  2. By tedu ( on

    everybody knows real men use printf to debug. :)

    1. By SH ( on

      What's wrong with std::cout ;-)

      1. By Anonymous Coward ( on

        That huge pile of shit called C++ that goes with it?

  3. By David ( on

    A girlfriend who can code! You're a lucky man :)

    1. By Anonymous Coward ( on

      100% ack.

      He's can be a lucky guy...

  4. By Anonymous Coward ( on

    congratz Ray.... keep up the good work ;)

  5. By Jasper ( on

    Ray, it's great to read all of this here! Keep up the good work! Cheers, Jasper

  6. By Anonymous Coward ( on

    Nothing wrong with good coding by itself. But do you know about ITS4 ?

  7. By Anonymous Coward ( on

    people who start using gdb because of yelling girlfriends get commit?

    god help us all....

    just joking. me ducks and runs :)))

    keep up the good job ray.

  8. By Anonymous Coward ( on

    hmm, i should probably learn how to use GDB better, the printf's are getting old...


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]