Slope Finder for the Missus

Published on Nov. 2, 2008

Since I do sysadminy stuff all day, I don't really get a chance to do much coding (or not as much of a chance as I would like). You can imagine my joy when my girlfriend expressed a problem she needed solved: "I'm going to need to solve 100s of slope equations, i.e. where two lines intersect. Can you write a program to do it?" Sure!

I asked if she wanted to do a batch input or just a one-off type of deal, she decided on the latter. Although I've done a fair bit of PyGTK stuff, I had never actually needed to convert it to Windows. I debated using IronPython -- but needed to use a special library to help solve the equations (I'm lazy).

So, where is the power in Python? After about 15-20m I had a console based app that could solve the slopes. I added the Linux GUI part in maybe 45m, and then the Windows part in, well, not 45m!

Either way, screenshot is below. Thanks girlfriend, I had fun!





Tagged as: glade | python | sysadmin | yan-shih
blog comments powered by Disqus

About this page

This entry is from my tech blog and was written on Nov. 2, 2008. It's been tagged with glade and python and sysadmin and yan-shih.

Via Twitter

Just saw a large white parrot try to steal the clothing from someone's drying rack. (about 2 weeks, 5 days ago)

Related Readings