The jQuery project uses Trac for bug tracking, and a request from several team members (including myself) was to have a page that showed overview of ticket activity over time. There are a couple different Trac plugins that exist to perform this task, but they don’t work very well. TracTicketStatsPlugin requires YUI (even though Trac uses jQuery), it loads a bunch of debug crap, it has SQL injection issues, it’s ugly, and it requires Flash. TracMetrixPlugin requires matplotlib, which in turn requires a bunch of X11 libraries, screws up Trac permissions in 0.12, has worthless documentation, and is very slow. So, I dove into the world of Python and Trac and came up with something that should be much better.
TracTicketGraph has no external dependencies and uses the awesome flot library to generate graphs. It is released under an MIT license. There are a few caveats, mostly due to time constraints, but anyone with some Python and JS skill should be able to take care of these issues quickly and easily:
- You can use a “days” query parameter to change the number of previous days viewed, but there is not currently any UI for making this change.
- The end date is always fixed to the current date.
- The size of the graph is fixed in JS, instead of being configurable by CSS.
- It is not internationalized.
- There are no tooltips.
Download TracTicketGraph · View a screenshot
Mozilla have a pretty nice universal character set detector built into their products. It’s modular, it’s quick, and it has a great deal of real-world research and testing behind it. I wanted to be able to use it as part of a project I am working on, but couldn’t find a nice standalone command-line version. There is a Java port, but the overhead of loading up a JVM just to detect the character set of a document was unappealing, and porting the entire codebase to another language would take too long (plus it would run a lot slower). So, I spent an evening learning some C/C++ and came up with just what I needed. I thought it might be useful to someone else, too, so I am releasing it here.
The README.txt contains compilation and usage instructions. I have no more words now. Get it below!
Download universalchardet
IE9 will support border-radius natively (yay!), but that still leaves all those users with an earlier version of IE in a world filled with dangerous sharp corners and no relief in sight. There are a ludicrous number of different scripts that have been created to try to solve this problem, but each and every one has one (or often several) of these fatal flaws:
- Requires style information to be resupplied in JavaScript
- Generates a huge number of DOM elements
- Creates corners that are not anti-aliased
- Unmaintainable, unreadable, or just plain bad code
- Inadequate documentation
- Requires additional plugins or images
- Breaks support for background-image/background-repeat
- Breaks direct descendant selectors
- Breaks in IE8
- Causes severe memory leaks due to circular references
So, I decided to come up with something better. RoundRect is a new, MIT licensed library (based loosely on the DD_roundies 0.0.2a source) that uses VML to provide a zero-configuration, nearly-fully-featured implementation of border-radius in IE. It still has some rough edges and comes with its own list of caveats (check the link for more info), but it does more, works better, and is better written than any other library that I’ve come across for creating round rectangles in IE. Check it out!
Update 2011-03-01: Use CSS3 PIE unless you have very specific requirements.
A major issue with large web applications is the difficulty in generating meaningful error reports for problems that occur on end-users’ machines. While debugging web apps during development has become exceedingly easy thanks to the great developer tools that Web browser manufacturers provide (and Firebug ;)), the task of automatically retrieving a stack trace from a remote machine is still painfully elusive.
Today, I’ve finished initial work on a small project that I am already using on an upcoming application to help alleviate this problem; I hope that it can help you too. Based on the hard work of Andrey Tarantsov, TraceKit is a JavaScript library that automatically normalizes and exposes stack traces for unhandled exceptions across the 5 major browsers: IE, Firefox, Chrome, Safari, and Opera.
TraceKit leverages native browser support for retrieving stack traces from Error objects where available, and squeezes out as much useful information as possible from browsers that don’t. It integrates neatly with jQuery, automatically wrapping all of your event handlers and AJAX callbacks so that you get the most useful stack information possible across the widest range of browsers without needing to tediously wrap everything yourself.
Finally, it attempts to extend support for column-level granularity of the top-most frame to all browsers, in order to allow you to debug even minified JavaScript. This does not work perfectly, and won’t until all browser manufacturers are exposing good stack trace information, but it ought to be more useful than nothing.
At under 8kB minified, and 3kB minified + gzipped, TraceKit should be suitable for any project that needs to be able to send back stack traces for error reporting and analysis. The best software is software that doesn’t generate any unhandled exceptions; I hope TraceKit helps you achieve that goal.
Get TraceKit on GitHub