Archive for January, 2006

Ruby and web applications: surfing the nerd’s waves

Monday, January 30th, 2006

My life is stop and go. My latest: reading all about household employee’s tax. Took me two days, but I think I got it. The forms to send, the amount owed… First there is social security and medicare, kicks in at 1400$/year, then federal and state tax, kicks in at 1000$ per quarter, then there is worker’s comp, kicks in at 16 hours/week. As I am getting more help for my mother, there is more and more to do… beyond paying the person.

I got the agile rails book, so I finaly had a chance to look at it. Luckily, I had tried to install a wiki before, so I had php and mysql installed. All I had to do was reinstall mysql because I could not find the passwords. Then I found a Rails installation incantation which worked for my computer, and I was able to follow the examples — more or less. This is when I found out that unlike Ruby which folks who know a computer language can understand immediately, Rails is for web based computer experts only. Like RubyCocoa it is a giant pre-written code which is way beyond my means to fathom.

OK, so I can’t run a big powerboat, but I found Ruby, and it can still lead somewhere. After all the reason I got started with Ruby was Rails, and the reason I wanted Rails was because I wanted to know how to run our experiments off the web, without learning Java, Perl, pithon… Ruby it turns out is enough to write web applications with something called cgi.
There is even a book written on how to write experiments with cgi, “How to Conduct Behavioral Research over the Internet: A Beginner’s Guide to HTML and CGI/Perl”.

Of course learning ruby cgi may not be easy: “A lot of the focus on Ruby Web development these days is on the Rails platform (http://www.rubyonrails.com/), so it can be hard to find much for plain old CGI. There’s a very simple article (http://coolnamehere.com/geekery/ruby/web/cgi.php), the Ruby/Web chapter from “Programming Ruby 1st Edition” (http://ruby-doc.org/docs/ProgrammingRuby/html/web.html). I had trouble finding anything else when I dug around on Google.”

And then, there is the matter of the web server. Apparently, Tiger runs on Apache. But that is not the only choices: “lightTPD is the BEST webserver out there, much faster than apache and much much much more flexible/configurable/secure than tux, and its fcgi php support is simply unbeatable”. Well, but remember I am surfing the waves of the pros, and Apache is installed on my tiger, while lighttpd isn’t. But already it is suggesting that while apache ruby cgi is probably the way to go, I may get better result with lighttpd, ruby and fcgi… another install delight at the horizon.

And then there are other webservers, mongrel, webrick, which is compared to cherrypy for python and Lua!!! and also apache and lighttpd. again, I am getting too far into the wave “Zed and I worked over the weekend on smoothing out the divide between Camping (the 4k web framework) and Mongrel (the slim new Ruby web server mentioned last week.) In just a few days, Mongrel has caught the scent and is totally Campnivorous. Development gems await you.” This web server was written this week-end! On the internet, you can get lost because you are off the beaten path and there is not enough information to get going, or because you are too close to the beta crest and even the installation instructions are greek.

How strange to immerse myself in this noisy world of nerds. There is a physical web, with emails going from computer to computer in search of their destination. And there is the verbal web, with advice and information thrown into the air and connections established between folks who understand each other, while the rest falls back into nothingness. Folks like me get sucked in by mirages that shimmer out of reach, but our personal disappointments and setbacks are but a day on the beach surfing the waves, while the water carves out our future landscape!?

Digital sculpting, is there a bridge between computers and sculpture?

Tuesday, January 17th, 2006

I started with a well defined project which is on a back burner, until I master the many skills required: rubycocoa for the window interface, multithreading for the real time processing of data, HID interface.

This led me to object oriented programming, and Ruby, the onlyl sane programming language – Objective #C and Java are too formal, too in your face in their requirement
of voodoo incantations. — I like Ruby. I have written a program to read data at least 3 different ways, and gained some confidence, and I am eager for more.

And then my nephew showed me some 3D head rendering he made in lightwave. He claims that working with 3D and interacting with the shape/aspect has helped his drawing ability. It occured to me that digital sculpting might be a way for me to work on modeling, that is on seeing a simplified structure underlying the figure or the head.

Here is an example of what can be done.
http://3dny.org/?p=11

As far as the figure is concerned, 3D realistic programs like poser is not for me. What folks do is model a bone, and then model a muscle on top of the bone. The animation gives no information on how a real human being’s butt difforms as they walk. It is moving bones, the muscle information on top goes along as cosmetics. Even if they corrected every so many frames, what you get is one person’s understanding of anatomy, not the physical reality.

Bone animation can still be interesting. “Introducing Maya for beginners” has a skeleton with joints, and I thought this would do as well or perhaps better than the skeleton dangling in the studio. At least it would be possible to set it in all kinds of impossible gravity situation.

The next question is whether to move the skeleton manually with a mouse, or whether to animate it with a script. The advantage of the script is that you can reproduce everything exactly, the disadvantage is that the script required to go from one position to another may not be obvious. With some experience, moving the body manually in Maya may not take long, but Maya is not cheap!

This lead me to OpenGL which seems the base of computer graphics anyways. If I could transfer the skeleton from maya or elsewhere to OpenGL and find how to move the joints in code or with real time mouse interaction, I could have a nice dedicated tool to teach sculpting. I think that is a great idea for an inexpensive software, but I have not seen it out there.

Luckily I found that one can program OpenGL with Ruby, so now I have ruby, ruby-openGL and rubycocoa to learn, along with rubyonrails of course — which requires MySqL — which I installed to try to set up a wiki. And maya or zbrush to see what I can figure out about modeling the head.

Why do I suddenly have so much to learn, when for years, it was routine. Why the explosion of technology I want to master? Sure, the prospect of looking for work is a great incentive, but it just seems to me that things are finally moving and coming to a sync. For years it was C++, and then C++ and Java, and that was all I knew of.

I think things are moving because of the internet and the many folks who help others in dedicated discussion sites. Without them, I could never have found the instructions or the help to install the various things I have tried to install. In each case it took me days, but I succeeded. I think this means the internet is helping many moderately techie “newbies” like me to get on the wagon and acquire skills which before where unreachable except through a structured class.

Wouldn’t it be amazing, if my knowledge of computers and my love of clay and sculpting the figure could come together in one activity, and all that mostly at home, where I can watch my mother, and make sure she is ok! Who knows, maybe in a year or two!