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)


Comments
  1. By Chad Loder (69.111.72.203) 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.

    Comments
    1. By Nate (65.95.229.183) on

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

      Comments
      1. Comments
        1. By Jess Charbneau (66.195.52.3) jess@nospam.thecharbneaus.com on

          > Hey, whats wrong with slacking ?

          That link is great!

    2. By Ben (208.27.203.127) mouring@nospam.eviladmin.org on http://eviladmin.org

      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

      Comments
      1. By Nate (65.95.229.183) on

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

        Comments
        1. By Ben (209.98.211.114) mouring@nospam.eviladmin.org on http://eviladmin.org

          >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

          Comments
          1. By Nate (65.95.241.86) on

            Well? Go on! Start rueing.

  2. By tedu (69.12.168.114) on

    everybody knows real men use printf to debug. :)

    Comments
    1. By SH (82.182.103.172) on

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

      Comments
      1. By Anonymous Coward (70.27.15.123) on

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

  3. By David (82.61.29.125) on

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

    Comments
    1. By Anonymous Coward (89.50.1.205) on

      100% ack.

      He's can be a lucky guy...

  4. By Anonymous Coward (87.74.100.111) on

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

  5. By Jasper (80.60.145.215) jasper@nedbsd.nl on http://nedbsd.nl

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

  6. By Anonymous Coward (80.171.114.40) on

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

  7. By Anonymous Coward (165.72.200.10) 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 (209.174.146.131) on

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

Latest Articles

Credits

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 deadly.org 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.]