Tag Archives: Website

Dice Roller Updates

Since I’ve been working on unifying my website, I decided that I would take some time to update some of the other sections of my site while I was at it. The first thing that I wanted to work on was my dice roller – this is probably some of the oldest working perl code that I have, and it shows. It has some fairly obvious security flaws, an inflexible persistence model, and is lacking some options I’ve wanted for a while.

So, I’ve decided to update the code. Since it’s less than 150 lines of code, it should be easy to rewrite from scratch, so that’s my initial plan. Here is my feature list, in priority order:

  1. Rewrite the rolling engine:
    1. Strip the CGI parameter for id – I don’t have a use case for multiple dice rollers anymore.
    2. Sanitize input.
    3. Update storage model for rolls.  (Used Storable)
  2. Rewrite the display engine:
    1. Strip the template parameter – This is a security hole and I don’t have a use case for it anymore.
    2. Sanitize output.
    3. Find a better way to import templates.  (used HTML::Template)
  3. Do better session management
    1. Keep the user’s options so they don’t have to retype them every time.
    2. Explore cookies or CGI sessions for this.  (Used CGI::Session and cookies)
  4. Unify my Gaussian dice roller via options rather than a separate script.
  5. Provide options for counting dice over a threshold (like World of Darkness “successes”).
  6. Provide options for getting the total value of the dice (lots of games do this).
  7. Explore output filters
    1. Name
    2. Game name?
  8. Provide options for glyph dice (Star Wars).
  9. Provide options for exploding dice.

And, as it turns out, it took me longer to write this post than it did to update.  Here it is!

Website Unification

It’s been a while since I’ve had a unified look-and-feel to my website. The last time I went through unifying all of my pages, the web was a different place – CSS was the go to technology to make the look and feel of your website work and javascript was used really only if you had something more complicated. At the time, web design was more focused on delivering content than it was in delivering design, so you could get away with something simple that also happened to look decent.

Now, I won’t claim that my old site design was good for its time, but it was a simple implementation that achieved my goal of being able to deliver multiple different types of content: a blog (PivotX), a wiki (Dokuwiki), my web apps, and my static pages. As a comparison, my old design had less than a hundred lines of CSS and a handful of layout elements. My new wordpress theme has over a thousand lines of CSS, and the relevant layout hierarchies are over four layers deep. Continue reading Website Unification