After working with Yanick Champoux on a few little Perl projects here and there, we finally met face-to-face at YAPC::NA last summer. A few months later, when I was looking for a co-op position, I immediately thought of Pythian.
They’re a mid-sized company in Ottawa that does database services. They’re the expert DBAs you hire if you don’t have your own (or enough of your own). Their in-house development team works on 2 major pieces of software: Support Track, a ticket tracking web application, and Avail, a server monitoring tool. I was hired to do quality assurance on these two systems over the winter semester.
A lot of the testing was manual, and I learned a bunch of new techniques for testing and debugging web applications. Because I did a bunch of little things while I was there, I wanted to share a bunch of little tips & tricks you might find useful if you don’t already know about them.
Testing/debugging tips & tricks
s_clientare a simple server and client included with the standard OpenSSL installation. If you need to see what your SSL server or client is doing, these provide the instrumentation you’re looking for. I used this extensively in my testing for a project adding SSL support to an HTTP client library – see also SSL Security in HTTP::Tiny.
netcatmake a nice server/client pair for plaintext protocols like HTTP or memcached.
mtris the best of ping and traceroute rolled into a single package.
perldoc -lwill tell you which module is being loaded.
Module::Versions::Reportis also very helpful.
- Symlinks are often used to provide a kind of versioning for a directory. To switch the symlink to the new target atomically, do:
ln -s new-thing link-tmp && mv -Tf link-tmp link– the
mvmakes is atomic. If you try to give the symlink a new target with
lndirectly, it isn’t atomic. Use
straceif you don’t believe me.
-sflag that makes symbolic links with a less confusing syntax than
- To follow a file being appended to while also being able to scroll back and forth, use
Fto follow just like
- To make columnar data from various commands actually readable, pipe into
- perltidy is your friend.
- Just do
echo 'alias fail="tail -f"' >> ~/.bash_alisesalready and be done with it!
Posted: May 19, 2012