May 25, 2007

Feedback

Ok, so in many ways I like the idea of programming so much more than the actual coding itself.

One of the major problems I've found I have is one of feedback. It doesn't even necessarily mean feedback from others, but merely feed back that something is happening other than typing characters on a screen.

Last week, I was modifying a tool I had made at work. The tool basically tests our I/O boards that we use on our game. The board controls the inputs we use: buttons, lights, trackball. So, I wrote a GTK app that will show when you press buttons.

The first pass just had reflection of the state of the buttons and a button to reset the states...kinda like the old keyboard tests. But, it had a few flaws. First, you had to restart the app every time you plugged in a new board to test. Second, there was no way to know looking at the app if the system could talk to the board (you have to power the board on with a button sequence to put it in this test mode).

So, I was adding those features. It was pleasurable for me because I had feedback. I added a text box for status, and there it was on screen. I changed the color of the status text, and it worked. I added a button to reset the board, and I was able to have the app remain running. There's still a shortcoming due to the fact that the app doesn't know when you've removed a board, but that's besides the point.

The point was that while I was coding it...I was in the zone. Time was losing meaning. I love being in that state, because it's when I'm the most productive. I forget that there's a browser, I forget that there's a meal I need to eat, I forget that I need to stretch. I'm focused.

I don't get to that state much anymore, and I've been trying to figure out why. I think it's because much of the coding I do doesn't bear fruit. At work now, I do a lot of behind the scenes work, and much of it requires a lot of function coding before I can actually run anything. I also twiddle our system a lot, and I don't get the satisfaction of creating, it's merely, "Yup, the network works."

So, my latest theory is that I need more feedback to keep me going. I just have to figure out how to get it without sidetracking a goal.

Posted by flynn at 6:43 PM | Comments (0)

The Frustration of Open Source

I love Open Source, don't get me wrong. Since I've migrated to Linux, I've been able to do WAY more for cheaper. I've also been able to do things I wouldn't have ordinarily been able to do.

But...the community has an achilles heel: who do you go to to track down a problem?

Right now, on my work box, I'm getting sporadic crashes in both Firefox and SciTE. I really like SciTE. It's a great editor for code. It's not a full IDE or anything, but you can compile, find errors, grep, etc. It's customizable and fairly quick.

Anyway, these crashes occur with the following message to a console (after having run it from there):


[flynn@mir ioTester]$ The program 'SciTE' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
(Details: serial 8701290 error_code 1 request_code 0 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line

option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

So, it's an X thing. Apparently. The thing is, the app didn't change, the X code must have during a yum update. And also, I haven't really seen this bug at home, which is running almost exactly the same setup. So, I posted to the FedoraForums about it. I found a thread where someone was getting crashes with Firefox, so I piggybacked on that thread. Problem is, it was just me and this other guy chatting about it.

Where do I go to find the answer? Fedora? The repo lists? Xorg? SciTE? GTK people? I have a hard time narrowing the problem. I've jumped on the SciTE list because I think they'll have the best chance of finding it, but to do that I have to run the app in a debugger, and it's kinda hard to do that when you're trying to work.

Years ago, I had an argument with a good friend of mine about why I didn't like reusable code. The problem I had was that you counted on a myriad of layers that you flat out didn't understand. If something went wrong, you were in the dark. In principle, Open Source solves that problem, but I'm not good enough to dig into X window code, nor do I have the time to learn about it. So, I'm forced to hope that whatever problem is there will fix itself with FC7 -- sorry -- Fedora 7.

Posted by flynn at 1:58 PM | Comments (0)