Maintaining Sanity Through Insanity

Last month was a spirit crusher due to an increased workload. Every once in a while I decide to run into the woods and get lost in something that I've never done. It's been a while since I've had the chance to develop something selfishly. Last year I wrote an intranet site using ruby on rails for what I call "personal enrichment." Rails went OK, but whenever I wanted to achieve something that wasn't textbook I found myself writing code that was like a trick/hack... needless to say it didn't give me a good feeling. About 6 months ago i started to force myself to use Python for all shell script tasks that were thrown my way. I love python. If you are used to scripting or actually enjoy scripting python is great. Now one of my pet peeves is when people say things like "lightweight, efficient, clean, easy to read." Now all of those things are great.. but what does it really mean? Visual Basic is almost like writing english and developers think its the fisher-price of languages (including me). I have no answer to why I like python except a few little things:

  • whitespace is used to terminate directives, which forces everyone to use similar formatting
  • smtplib is the best email library I've ever worked with
  • django doesn't assume as much as rails does, you still have some tedious work but I find it the perfect balance.

So I built my first site in django it's currently running in my dev enviornment. What does the app do? It's an app that uses the power of expect (one of my favorites), diff (another favorite), and a repository model. Simply put, the app connects to a device (via ssh/telnet) logs in and issues a command, stores the output in a database, does a diff between the last retrieved output and does a diff, if there is a diff it emails the system owner. What does this achieve? Automatic change control and a configuration repository. I've used RANCID to do this before and I love the concept. RANCID doesn't have a front end, but it also uses cvs/svn so you can install cvs/svn frontends. I re-invented the wheel, but I like this wheel... it's dead simple... and it helps out those admins that suck at cli. Like I said, I haven't deployed it yet... but I think I may want to release it. So my next problem I'm thinking about is how to package up and release a distribution. I've never used/installed a django driven web app... how do people usually release their django projects to the public? VMs? tratto-screenshot

Tagged as pexpect , tratto
Written by Andrew Konkol on August 8th, 2009

0 Comments

Log in with Twitter, Google, Facebook, LinkedIn to leave a comment.