Out of Hanwell

October 5, 2007

Python: A Gateway to Understanding JavaScript

Filed under: JavaScript — Matthias Miller @ 3:46 pm

The past day or two I’ve been exploring Python. Although I’ve enjoyed tinkering with the language, I’ve never done any serious development with it. As I explored it more, I was surprised to find that Python’s approach to object-oriented programming provides a great foundation for understanding JavaScript’s objects and prototype chains. The two languages are conceptually similar, but Python provides object-orientation in a much cleaner, straightforward way.*

In my opinion, someone should write a tutorial that first introduces the concepts of object-oriented Python, then illustrates how the same concepts apply to JavaScript.

* To defend myself against JavaScript purists, the point is to better understand JavaScript as a language. It’s not that I’m trying to coerce JavaScript into the mold of another language.

Advertisements

September 20, 2007

Switching to WordPress

Filed under: Blogosphere — Matthias Miller @ 11:19 pm

I’m switching from b2evolution to WordPress for one reason: WordPress can host my installation on my domain for $10 a year. My installation of b2evolution has been becoming obsolete, and you’d have to pay me more than $10 to go to the work of upgrading it!

In less than three hours of hacking, I’ve set up a WordPress blog on my domain, transferred my b2evolution posts and media, and changed all links to my old blog to redirect to my new one.

I’m impressed.

December 22, 2006

VMware on the Mac

Filed under: Uncategorized — Matthias Miller @ 10:54 am

The Fusion beta is out! And now I’m off to download it and a Kubuntu image.

October 28, 2006

Mac OS X Essentials

Filed under: Macintosh — Matthias Miller @ 7:42 am

Yesterday I decided to reclaim the 20 GB of hard drive space I had allocated to Kubuntu. (I plan to install it on a virtual machine eventually, perhaps when VMware becomes available on the Mac.) Rather than jumping through hoops to fix up my partitions, I simply reinstalled OS X.

What does it take for me to set up my Mac so that I’m productive?

First, I must configure OS X so that it’s even usable. This includes enabling active screen corners for exposé (lower-left for all windows, lower-right for desktop), enabling trackpad gestures, and tweaking the dock (small, right side of screen, automatically hidden).

Second, I need to set up .vimrc to get use useful features such as syntax coloring in vim.

Third, I need to install the software I can’t live without:

Finally, I need to install utilities that I use infrequently but am going to need eventually (for example, BitTorrent and Skype).

What’s on your list of Mac OS X essentials?

September 26, 2006

Verboten, but…

Filed under: Uncategorized — Matthias Miller @ 11:36 am

After reading Douglas Crockford’s for in Intrigue, I could help but write this function:

Object.prototype.hasOwnProperty = Object.prototype.hasOwnProperty || function(prop) {
return this[prop] !== arguments.callee;
};

It’s useless in its own recursive way.

Oh yeah, and it’s also still verboten.

Quickly Sorting Mail in Thunderbird

Filed under: Uncategorized — Matthias Miller @ 11:14 am

Today I was looking for a faster way to quickly sort my e-mail in Thunderbird. Up to now, I’ve been selecting and dragging all messages to an archive folder after I’ve read them and taken appropriate action. However, that’s cumbersome. Today I found the QuickMove Extension, which allows you to move messages into specific folders using the Ctrl+1 through Ctrl+9 hot keys.

Unfortunately, this extension doesn’t work in Thunderbird 1.5. To install, you need to:

  1. Download the extension.
  2. Rename it to a .zip file.
  3. Change maxVersion to 1.5+ (or your current Thunderbird version).
  4. Rename it back to a .xpi file.
  5. In Thunderbird click Tools, Extensions, Install and locate the .xpi file to install it.
  6. Restart Thunderbird.

You can now set up your shortcut keys by choosing Message, Set QM Options.

September 20, 2006

Automated Tests for JavaScript Lint

Filed under: Development — Matthias Miller @ 8:41 pm

Writing software is all about managing constraints. If you’re the only developer on a project, you need a development process that can thrive despite limited developer resources. Users will inevitably scream out and you won’t always be able to answer immediately. Can you respond in such a way that they feel heard, even though you cannot immediately solve their problem? When you do respond, how do you ensure that you’ve got a solution that works, while spending as little time as necessary?

Fortunately, small projects can be incredibly agile. In the early days of JavaScript Lint, I would release a new version for every bug fix reported by a user, sometimes with an hour or two of the report. However, these releases also sometimes introduced regressions that should have been caught by testing, requiring more busywork to release another version.

About a month ago I started looking for inexpensive and unobtrusive ways to test JavaScript Lint. Originally, I anticipated adding complicated control comments to supress warnings. These control comments would themselves raise warnings if the expected warning wasn’t encountered. However, I finally decided that I’d be better off writing a simple Perl script (not an oxymoron!). This script easily lets me tweak configuration settings and check for specific warnings and errors in test scripts.

I’ve built up a collection of test cases for all the warnings implemented in JavaScript Lint, as well as for some warnings implemented in SpiderMonkey. When a user reports a bug, I can simply create a new test case and develop against it until it passes. I’ve been surprised how much this has increased my productivity in the little time I’ve devoted to JavaScript Lint in the last several weeks. The time spent writing automated tests has undoubtedly paid off already.

Now, if I only have a chance to clean up those release scripts, perhaps I can roll out a new version of JavaScript Lint!

September 12, 2006

“Can You Hear Me?”

Filed under: Uncategorized — Matthias Miller @ 9:18 pm

Silence is a difficult answer.

The Internet Explorer team is clearing house on the bug reports. Tonight I received a noticed that I should revalidate several bug reports on RC1 and re-open if necessary. I responded with a comment saying that these bugs still exist in RC1, but to no avail. About half an hour later, they closed the job.

I certainly can’t blame them for wanting to close out old bugs, but what do they expect me to do? Am I really supposed to file a new feedback item for this problem? If so, can’t they provide some way of retrieving the attachments from the original item to expedite the process? After all, Microsoft Connect was designed to allow Microsoft to interact with its user base.

“Can you hear me?”

It’s not just the IE team. E-mails to which I would previously have promptly responded now languish in my inbox. Feature requests that I would have coded within several days now rest in the issue tracker or remain partially implemented on my computer. Crashes remain unfixed for a week after test cases have been created. My blog sits dormant.

“Can you hear me?”

Alas, the problem is not silence but clamor! A million things yell for attention, and only that which yells most loudly receives it. That’s how Microsoft can seem so silent, and (unfortunately) how I can seem so silent.

Fixing bugs. Creating tests. Writing new features. Discussing software design. Submitting patches. Compiling libraries.

“I found a bug!”

“CAN YOU HEAR ME NOW?”

September 7, 2006

MobWrite

Filed under: Uncategorized — Matthias Miller @ 6:37 am

I’ve often thought about and wished for an editor that’s browser-based, multi-user, real-time. It looks like Neil Fraser beat me to it with MobWrite (with demo). This would be a great tool for remote design discussions, code reviews, or training. Neil also has written a number of articles on Diff Strategies, Fuzzy Patch, and Differential Synchronization.

I can’t wait to see where this goes. Here’s what I’d want:

  • syntax coloring
  • attribution of changes (who did what?)
  • visual timeline (what did it look like 10 minutes ago?)

I’m off to install this on one of my computers.

Update: I did have a chance to try this out today, but it started producing mysterious “ghost” edits. I’m still sold on the idea, though.

September 4, 2006

Save Over 99.9% off Half.com’s Seriously Overpriced Items

Filed under: Humor/Mental Leisure — Matthias Miller @ 7:47 am

It seems Half.com offers steep discounts on some of its products. Here’s an example search result:

half-com-99999-search.png

You pay $85.14 and you still save 99%? Here’s the product listing:

half-com-99999-item.png

Oh, sure it’s worth $99,999.00!

« Newer PostsOlder Posts »

Create a free website or blog at WordPress.com.