tadhg.com
tadhg.com
 

Posts concerning JavaScript

jQuery Project

23:36 21 Jan 2010

I’ve been a big fan of jQuery more or less since it came out, and I’m happy to see the launch of The jQuery Project. I’ve used jQueryUI a couple of times and find it fairly useful; I haven’t tried Sizzle yet but it looks great for situations where you’re really concerned about keeping file sizes low but need decent CSS selector support; and I wish QUnit had been around when I was writing a lot of client-side code.

Permalink     Comment     [, , ]    

Some JavaScript Programming Patterns

15:09 11 Oct 2009

“JavaScript Programming Patterns”, by Klaus Komenda, is an excellent walkthrough of several JS patterns. If you code JavaScript regularly you probably know at least some of these but will likely still find something useful in it—I particularly like the lazy function definition, a pattern originated by Peter Michaux:

var foo = function() {
    var t = new Date();
    foo = function() {
        return t;
    };
    return foo();
};

Simple, elegant, solves the problem of making sure that the heavy lifting only gets done once.

Permalink     2 Comments     [, , ]    

Python Syntax Highlighting for star-light

23:37 26 Jun 2009

A couple of years ago I plugged star-light, a syntax highlighter that’s entirely client-side. I’ve been happy with it, but wanted a Python mode for it. I was going to post some other code this evening, and then decided that I should just make the Python mode myself.

This led to fun with regular expressions.
[more...]

Permalink     Comment     [, , , , ]    

jQuery Sparklines

19:40 22 Jan 2009. Updated: 16:47 28 Jan 2009

I really like this jQuery sparklines plugin. I’m not sure what uses I can find for it right now, but my books/week or books/month reading rate, something like lines of code written or changed per day, the page counts of recent books, or recent MTG results would all work with it. Some of those things would be better expressed with full-size graphs using Flot, though. But while I don’t have a use case right now, this seems like a tool worth having in the toolbox (especially since it’s free).

Permalink     Comment     [, , ]    

jQuery Improvements

23:59 13 Jun 2008. Updated: 07:40 14 Jun 2008

Recently I’ve been noticing once again how useful jQuery is, and wondering how I ever did DOM manipulation without it. It’s been a while since I’ve really looked at the release notes, but the latest version (1.2.6) has some significant improvements in it.
[more...]

Permalink     Comment     [, , ]    

Coding and Concepts: Tiebreakers

23:56 04 Feb 2008. Updated: 08:56 05 Feb 2008

While working on the tournament runner application that’s part of the ongoing rewrite of sfmagic.org, I encountered a problem which I think is indicative of how important ways of viewing problems are for coming up with solutions, especially in programming.
[more...]

Permalink     6 Comments     [, , ]    

Datejs

23:57 29 Jan 2008. Updated: 23:05 25 Mar 2008

Date handling in JavaScript sucks. It’s quite astonishingly bad, in fact, and I always think that I’m forgetting to do something when I try to use it—but no, it appears that the major JavaScript developers have never pushed a robust date object. I’m not sure why, as the Web’s international nature seems to make that more important, not less. On top of which the browser should really tell the server what time zone it thinks it’s in, but that’s another story. Anyway, there’s a library I’ve been looking at, and which we’re apparently going to use at work, Datejs (available at datejs.com).
[more...]

Permalink     3 Comments     [, , ]    

Some Minor Software Projects

14:37 27 Jan 2008. Updated: 23:14 28 Jul 2009

I already have a buch of plans for larger projects, including finishing the sfmagic.org rewrite, but I think it makes sense to have some smaller projects to work on as well, things that I can switch to and make significant progress on in a relatively short amount of time.
[more...]

Permalink     1 Comment     [, , , , , ]    

sfmagic.org Rewrite: Pod Division

23:45 21 Jan 2008

Individual draft groups in MTG are called “pods”. The sfmagic group runs drafts every Wednesday (19:30, Milano’s Pizzeria), and it’s these drafts that I’m rewriting a site to track the results of. At the moment I’m writing the data entry side, and took a slight detour to write a utility to help in the weekly organization.
[more...]

Permalink     Comment     [, , ]    

sfmagic.org Rewrite: Planning Data Entry

23:52 15 Jan 2008. Updated: 01:33 16 Jan 2008

Sadly, I’m not quite going to finish a drop-in replacement for the current sfmagic.org codebase by my deadline of tomorrow. I’m close, and I think I have everything except the data entry portion, which I’ll lay out in this post.
[more...]

Permalink     1 Comment     [, , , ]    

sfmagic.org Rewrite: Stalled/Graphs

23:46 08 Jan 2008. Updated: 01:54 09 Jan 2008

I didn’t have much time to work on the rewrite today, and spent what time I did have messing around with graphs.
[more...]

Permalink     Comment     [, , , ]    

Leaving Nimblefish

23:45 23 Apr 2007. Updated: 18:54 24 Apr 2007

Today I told Nimblefish I was leaving. My last day is 4 May, Friday after next.

It’s rather weird to be leaving. I’ve been there for almost five years.
[more...]

Permalink     Comment     [, , , ]    

AJAX Cross-Site Scripting with Apache RewriteRule

23:48 16 Apr 2007. Updated: 10:22 17 Apr 2007

AJAX has a significant limitation: for security reasons, it can’t fetch data from sites other than the one the user is on. This makes a number of cool things much harder to do.

One way around this is the script tag hack. But that requires a third party that outputs JavaScript files, whereas what I want is to be able to process XML and/or HTML from that third party.
[more...]

Permalink     Comment     [, , , , ]    

Checking for position:fixed Support

23:57 29 Mar 2007. Updated: 07:13 30 Mar 2007

The CSS fixed value for the position property is extremely useful, particularly in allowing for persistent navigation on long pages. Naturally, versions of IE before 7 don’t support it. I’ve been getting around that using JavaScript.
[more...]

Permalink     Comment     [, , ]    

DOM ‘Live’ Iteration Gotchas

23:17 24 Mar 2007. Updated: 23:45 25 Mar 2007

When you’re manipulating the DOM and are working with elements through list or array iterators, it’s important to remember that the arrays/lists are “live”—otherwise you’ll end up spending a lot of time trying to figure out why your code is, for example, skipping nodes.
[more...]

Permalink     Comment     [, , ]    

Web Development Tools

23:37 21 Mar 2007. Updated: 00:39 22 Mar 2007

These are the tools I use when doing web development.
[more...]

Permalink     Comment     [, , , , , ]    

Some JavaScript Thoughts

23:47 20 Mar 2007

I’ve had a heavy JavaScript workload for a while, and these are some thoughts/observations.
[more...]

Permalink     2 Comments     [, , ]    

jEdit and Document Structure

22:33 08 Mar 2007

I’ve recently been writing documentation at work, and have been writing it in HTML, which is more or less my native format for that kind of writing. In doing so, I’ve been focusing more on document structure and how it aids usability for the reader. Over the last couple of weeks I’ve also started to focus on how it might improve usability for the author.
[more...]

Permalink     Comment     [, , , , ]    

Animating Circles with JavaScript

23:53 19 Feb 2007

Years back I wrote some online tutorials on how to animate circular movement in Lingo and JavaScript. While moving my older articles to this site, I realized that I could not in good conscience move this one without updating it. So, a tutorial on circular animation in JavaScript follows.
[more...]

Permalink     Comment     [, , , ]    

Introductory AJAX Topics

23:57 16 Feb 2007. Updated: 09:23 17 Feb 2007

After collaborating with me on an AJAX enhancement to our web application, my co-worker Ryan today asked me to give our engineering group an introduction to AJAX techniques. That seems like an interesting idea, so I’m going to sketch out the kind of thing such an introduction might cover.
[more...]

Permalink     Comment     [, , ]    

Zipcar Greasemonkey Script

23:32 10 Feb 2007. Updated: 23:21 11 Feb 2007

I made a Greasemonkey script that shows you more cars per reservation page than the measly 5 that Zipcar gives you.
[more...]

Permalink     Comment     [, , ]    

Improving Zipcar’s User Interface

23:45 05 Feb 2007. Updated: 00:20 11 Feb 2007

I’m on a big Greasemonkey kick at the moment, and have decided that I’m going to make a small project of improving Zipcar’s user interface.
[more...]

Permalink     Comment     [, , , ]    

Code Mode

23:45 02 Feb 2007. Updated: 00:47 03 Feb 2007

My mind is very much focused on coding at the moment. Especially JavaScript/HTML/CSS.
[more...]

Permalink     1 Comment     [, , , ]