www.BrettDaniel.com

Postponed Project? Free Friday!

Yesterday night was an evening of games. Having the OS project postponed gave me a chance to go to a pool hall on the Levee with Michael, Jason, Michael's apartmentmate Josh, and Michael's classmate and future apartmentmate Joe.

The dark hall had 18 tables with three smaller ones on a raised platform at one end of the building. Stools and drink tables ringed the playing area. Unlike the trendy dance bar from two weeks ago, there was no clear demographic at the pool hall. A young married couple played at the table to our left. To our right, two middle-aged contractors.

poolhall1.jpg poolhall2.jpg poolhall3.jpg

We played various forms of pool for about two hours. Jason, Josh, and I started with a game of cutthroat while Michael waited outside for Joe. Joe is underage, and Michael was worried that he would be unable to come in to join us. We played teams of two once Michael came back in. Joe came after two games of that. I think he was allowed in as long as he stayed outside the bar area which took up almost a third of the building. By then the place had filled considerably, so all five of us had to pack around our one table.

It is hard to organize five-person pool. We first tried two games of team cutthroat: two pairs and one lone player. I was the first lone player. I paired with Jason on the second game, but we lost before I got a chance to play. We all agreed that five-person cutthroat was not very much fun, so we switched back to teams with one person sitting out. I was the first to warm the bench. That game seemed to take glacial eons. Lazy tortoises could have finished faster. Jason, Josh, and Michael decided to quit after the second game. Joe and I were the dominant players that night. We played an evenly-matched game of stripes and solids before following the three back to Michael's apartment.

There, we played the second game of the evening: Super Smash Brothers. I am terrible at it. I usually lose within two minutes. Jason, Michael, and Josh, meanwhile, are nigh professionals. Watching them play is like watching fencers or Grecian wrestlers. Circle, wait for an opening, strike, parry attacks. Neither Joe nor I played.

Joe and I jumped in once we switched to Mario Kart 64. Battle mode with no clear winner for a few rounds, then racing. I annihilated everyone on the racetrack: I got first in every game but one when I missed the shortcut on Wario Raceway. Most of my readers probably know what shortcut I am talking about. One can use the third hill after the starting line to launch over the wall, cutting off about half of the course. I succeeded twice on an earlier race.

The evening would not be complete without a movie. Jason stuck in Shaun of the Dead, a high-lair-ee-us horror comedy.

Do I even need to say I found the evening much more fun than programming?

Coming Out of the Woods

I am finally emerging from a dark forest of schoolwork and the strangest cold I have ever had. My todo list seemed to triple in size over the course of one day last week. I have slowly cut through that forest, leaving the largest tree, my operating systems project. I have to program a Unix shell complete with piping, file redirection, subshells, variable expansion— a total of 15 separate goals. It was interesting to finally learn how forking processes and redirecting file descriptors work in Unix. I am about two thirds complete. It came as a welcome surprise when the professor casually announced in lecture today that he would extend the deadline a week. A week!

It did not help my work that I had a subtle cold nagging my throat and sinuses. It hung around like the smell of a skunk and refused to turn into anything that would cause me to say, "Now I am definitely sick". A few days of that, then I woke up yesterday and felt perfectly healthy. Not even a runny nose or residual headache. My immune system must have finally decided to go on the offensive.

List O’ Links

My "Save For Later" bookmarks folder has filled up unusually fast since my previous list o' links so long ago. Here are some of the gems I have collected:

  • MOSS: A System for Plaigarism Detection – Purdue's computer science program and I both agree that cheaters are scum. Freshman year, the TAs told us about a shadoy system called MOSS that checked our computer programs against a huge database of other students' projects to make sure our work was original. They never told us how it worked nor that it was based out of Berkely. I was amazed to find this paper explaining the theory behind the system as well as various types of submission scripts. Thanks to Eric and Jason C. for sending me the link.
  • Java and MySQL – I knew it was possible to access a MySQL database from Java, but I was not sure how. All it requires is MySQL's JDBC driver.
  • Wikipedia and the Heavy Metal Umlaut – I love, love, love Wikipedia and this great video explains some of the reasons why.
  • Band Logo Fonts – Speaking of heavy metal umlauts...
  • Javascript: The World's Most Misunderstood Language – I cannot count how many times I have had to explain the "Java" in Javascript.
  • The Emerging Economic Paradigm of Open Source – A great analysis from Bruce Perens, one of the originators of Open Source.

    "It's not immediately obvious how Open Source[1] works economically. Probably the worst consequence of this lack of understanding is that many people don't understand how Open Source could be economically sustainable, and some may even feel that its potential negative effect upon the proprietary software industry is an overall economic detriment. Fortunately, if you look more deeply into the economic function of software in general, it's easy to establish that Open Source is both sustainable and of tremendous benefit to the overall economy."

  • Super Mario Sheet Music – I want to transcribe these onto guitar tablature.
  • Parking Garages

Pool Tournament

I played in the dorm's nine-ball tournament this evening. I beat my first opponent, the organizer, with almost the best pool of my life. If I had a highlight reel, it would contain two amazing bank shots and a lucky cut of almost 90°. Unfortunately, my luck turned when I took on my second opponent. He was the most inexperienced player in the tournament. The organizer had recruited him to fill the place of one of the players who had cancelled at the last moment.

The first of the three games in the set went well, but I did not know it at the time. I accidentally knocked the nine-ball in after knicking ball I was aiming for. Still thinking in stripes-and-solids terms in which one cannot sink the 8-ball until the end, I thought I had lost. No one else was paying attention, and my opponent did not know the rules, so the mistake flew by all of us. We racked for a second game. I played well, sinking all but two balls. One of the two was the nine which I set up perfectly for my opponent.

Disappointed, I returned to the dorm and told Eric what had happened.

"You sunk the nine?! That means you won!" he said.

That was when it dawned on me. I returned to the lounge and talked to my opponent to make sure that I had not missed anything. He and the organizer agreed that we should play the last of our three games. It was as if we were reenacting the second game: I played just as well and lost in the exact same way.

Alas.

“Professional” Means I Get Paid for Doing Something, Right?

I have often said that if I were not in a technological field, I would be in graphic design or something similarly art-related. One of the benefits of the internet is that it allows people to realize these what-ifs in a very small way. You want to be a cartoonist? Start a webcomic. Musician? Release some MP3s for download.

A week ago I printed posters of my two favorite drawings. I wanted hang them in the dorm, so I burned some TIFFs onto a CD and made a trip to the print shop on the other side of town. It was strange to hold tangible copies of pictures that were only ones and zeroes up to that point.

I printed the posters for my own use, but they turned out so well that I thought, "Maybe someone else would like one, too." I put a note on the front page offering both posters for sale. It surpassed my expectations: I have two orders in the pipe. An old high school friend ordered the centurion, and Elise wants a copy of my favorite panorama. Today I expanded the note into a buy stuff page. (Update 8/06: I took down the page when I rebuilt the website. It may come back eventually.) I do not expect to make much, if any, money off of it, but who knows? Maybe someone out there wants to paper his or her walls with signed Brett Daniel originals.

I have a portfolio, customers, and a means of distribution. Does that make me a professional artist? On the internet, I think it does.

Notebook Doodle #12

For every notebook doodle that I post here, four more remain on paper. Both my bulletin board at home and my desk here on campus are covered in drawings cut from my class notebooks. Mel laughed at my tattered math notebook when I showed it to her a while back; I have cut a drawing out of every page I have used so far this semester.

Does drawing in class harm my learning? Not a bit. In fact, it keeps me alert for when something truly important comes up.

The following goose comes from my Operating Systems notes. She was next to a drawing of a dancing mouse and a description of the dup() system call. I colored her in Photoshop.

Imagine how much better she felt after laying that egg.

A white goose looking at a football-size golden egg

“DUDE! You need to get plastered!” Part Deux

I turned 21 a month ago, yet I had not gone to a bar until last night. I went with Jason C., one of Eric's ChemE classmates whom I do not believe I have mentioned here before, and Elise.

Mugs

Before we went, Elise told me, "You need to bring a mug. I'll lend you one of mine if you need it."

"Um... I may have a cup I can use," I said.

"No, that won't work. It has to be a special plastic mug that you can only buy there."

"Okay. Why do I need one?"

"To hold your drink!"

"So drinks don't come in their own glasses?"

"They can, but you still need a mug."

"Oh."

I never quite understood the mugs.

The Piano Man

The place was a mix between a trendy dance club and wood-paneled saloon. At the front of the building there was an enclosed room bursting with people. Almost a bar within a bar. The bouncers would open the door to admit only four or five people at a time, causing deafening piano or guitar to flood out into entryway. Elise, Jason, and I waited in line, mugs in hand, for our turn to enter.

The room had tables and stools, but they appeared to be there just for decoration. Everyone was standing, singing along with a balding piano player and his sleepy-eyed bass accompanist. They played all sorts of 80s pop music sprinkled with classic rock. The piano man would switch to guitar from time to time. He belted out a great version of "Sweet Child O' Mine". I sang along just like everyone else.

Interlude

We left the music room at around the midpoint of the evening. Elise eagerly threw herself onto the seething dance floor. I wandered, a little bored without music to hold my attention. I was 21 years and one month old, at a bar for the first time in my life. I did not know what to do with myself, which prompted that familiar feeling I get at social gatherings: I felt out of place and uncomfortable. It was the same way at the open mic night, New Orleans, and numerous other events. Why is it so hard for me to relax without food, a book, a video game, or a computer in front of me?

Hell Freezes Over, Pigs Fly, and the Cubs Win the World Series

I was standing to the side of the dance floor a while later. Jason had just told me our ride was coming soon, so I was waiting while he tried to find Elise. I had my mug in my right hand while my left rested behind the small of my back. An elbow linked with mine.

"Hi! Would you like to dance with us?"

I turned to see four smiling girls, all attractive. The most attractive one had a hold of my elbow. "Sure," I managed to say.

I cannot dance. Seriously. Between my knee and my stereotypical computer geek awkwardness (mostly the latter), I can barely move to a beat. I spasmed for a minute or two while the girls giggled at my ineptitude. I tried to apologize, but that made them giggle even more. Jason either saved me or ruined it for me when he pulled me off the dance floor to tell me our ride had arrived.

Meta-Research

I took some time last week to research prior art relating to the undergraduate research project. A few minutes of searches on Google Scholar (which I love O so much) led me to several papers that appeared promising. I was dismayed but not surprised to find a handful of very smart people had already explored many of the ideas Chris, Lee, and I had brainstormed. In a way it is reassuring that our ideas were useful and practical enough to warrant study.

The first paper almost exactly echoes the basic idea of a programmatic vector language. Van Wyk's language, called IDEAL, is certainly far more elegant than three undergrads could have devised in a semester.

A High-Level Language for Specifying Pictures by Christopher J. Van Wyk

A programming language that includes special constructs for drawing pictures is discussed. The language has been designed so that programs to draw pictures can reflect the structure of those pictures.

...

A variety of graphics languages is available. Some are simply standard notations for basic graphical operations like point placement and line and circle drawing. Others include operations like translation, rotation, and scaling, which can be applied to sets of primitive objects. All of these systems rely heavily on the use of explicitly computed coordinates. They also lack a procedure mechanism, that is, there is no way to group several graphical operations together and refer to the whole by a single name. Another approach to graphics languages has been to allow access to graphics commands from a high-level language such as FORTRAN...

This second article defines both a constraint-based (i.e. programmatic) graphics language as well as a WYSIWYG editor that one can download and use. I wish Adobe Illustrator had some of this type of functionality.

Juno, a constraint-based graphics system by Greg Nelson

Juno is a system that harmoniously integrates a language for describing pictures with a what-you-see-is-what-you-get image editor. Two of Juno's novelties are that geometric constraints are used to specify locations, and that the text of a Juno program is modified in response to the interactive editing of the displayed image that the program produces.

...

Several years ago I used METAFONT and Draw to produce figures for my thesis.... The contrasting virtues of these two programs inspired me to design Juno, a system that integrates a programming language like METAFONT with a WYSIWYG image editor like Draw.

Chris had the idea to design our language as a functional language based on Scheme. We had not gotten beyond just the idea, but Finne and Jones did in the context of Haskell, another functional language.

Pictures: A simple structured graphics model by Sigbjorn Finne and Simon Peyton Jones

We present in this paper a simple, device-independent model for describing two-dimensional graphics using a functional language. Graphical scenes, or pictures, are represented as values that functions can manipulate and inspect to create new values. Complete pictures are constructed by repeatedly composing such picture values together using picture combinators. A novel aspect of the model presented is its use of structured translation to abstractly express the geometric composition of arbitrary pictures.

The structured graphics model presented has been implemented in Haskell, and we also give an overview of a general rendering framework for traversing a picture value. Applications of this renderer include both output to various graphical systems, testing for picking or selection of a picture and the computation of the bounding box of an arbitrary picture. The graphics model forms the basis for all graphical output in a user interface framework being developed in Haskell.

My teammates, Professor J., and I met on Monday to discuss these papers and what direction we wanted to pursue in light of the ideas they contained. Did we want to extend the work already done or did we want to brainstorm some more and try to come up with something completely different?

We chose the former. We still plan to work on a programmatic graphics language, but that will not be the focus of the project. Instead, we will use our language to explore some of the aspects involved in "compiling" such a language. We see our compiler having several possible forms of output: a simple raster image, a normal vector language, a programmatic vector language such as those detailed in the papers, or even a general-purpose language utilizing a graphics library. Other programmatic graphics languages can only output a simple raster or vector image that discards any of the logic or constraints present in the original language. What if our "compiler" retained as much of that as it could? It would be interesting to, say, design a picture programmatically, then output a .gif, a Postscript diagram, and even Java code that one could stick in an interactive applet.

A programmatic graphics language compiler with multiple output formats seems like an ideal computer science research project. It lends itself well to questions like: "What kind of programmatic functionality does it make sense to have the output contain?" "How does one convert one form of programmatic flow to another, possibly completely different, form?" "What possible optimizations can one make to a picture based on the target format?" "What problems does a graphical focus present?"

I am excited to see where the project goes from here.