Skip to main content

Posts

Showing posts from December, 2010

How To Give Twisted a Friendly Zero-Step: Part 1

Zero-Step: n. The first impression and actions of a user's exposure to a new tool, before actual research and use of the details.

I'm not as involved with or using Twisted as much I'd like, but I still pay attention and I care about the project. I understand its strengths and its weaknesses and I want to see it used in more cases where it is the best tool for the job. There is a obvious and recently publicized problem with Twisted and the Zero-Step.

Why do people go to twistedmatrix.com for the first time?

Usually, it probably isn't to read the documentation or start investigating open bug reports. First time visitors are looking to solve a problem and the first thing that has to be impressed on them is if Twisted actually solves that problem. This is actually a really big problem in this case, because there are so many problems it can solve. How do you present that image without boring lists of functionality and supported protocols?

The most obvious use-case for Twisted…

How To Limit Application Trust

Why is it when I see an application in the Chome Web Store I see a little notice about what permissions the app will have, and I'll see a similar list of permissions before installing an Android application?


Why is it that I don't see something more like this?

How To Push Your Habit Building Onto Technology

I use desktop alerts to keep myself organized through the day, in various ways. There are things i want to do repeatedly and I don't have a good track record with keeping good habits, so I have found some ways to make tools fill in the gaps for me. There are some specific examples i can give. I have been using the great site 750words.com for almost a year, and I love it. I write nearly every day, and I'm getting better at that habit all nthe time. usaully I only miss it when something interrupts me. I remember with something better than an email reminder or a note on my calendar each day, which both i can build a habit to ignore. I use an alert program, which is KAlert in my case, but any alert program should work the same. Every morning at 5AM, it spawns a google chrome window opening the 750words.com write page, and so I wake up and sit down to my computer every morning to find the page already open with a blank page and a blinking cursor, and I start writing. I don't ha…

How To Tease Everyone On Christmas

This project may never become a serious thing, but it is fun. I intend to write an introductory post on the project, but for now I just want to post two code examples that should peek some interest.

# counter.py from trapdoor.extension import Extension, Factory
class Counter(Extension):
    value = 0
    @Extension.method()     @Extension.returns(int)     def get(self):         self._result = self.value
    @Extension.method()     def incr(self):         self.value += 1
counter = Factory(Counter)
and,
// counterdemo.js WindowManager.createWindow();
document.write('<input id="a" />' + '<br />'+ '<input onclick="window.t = window.t - 100;" name="faster" value="faster" type="button" />'+ '<input onclick="window.t = window.t + 100;" name="slower" value="slower" type="button" />'+ '<input id="t" />');
var t = 500; var globalcounter = counter.c…

How To Influence Twisted With Django

This is probably taken as the concept for a horror novel by many, but bare with me as I am going somewhere productive with this line of thought. There are a number of valuable ideas in Django, even if they aren’t original. I think some of the concepts could be interesting if applied to Twisted. We can’t start over, but maybe we could bridge the gap.

The Project

A “Project” is a very vague concept that we all start when we’re doing something new, but in a system like Django it is a codified piece of the framework. What a project is, how it is structured, and where its boundaries lie are all documented carefully. This provides an obvious starting point and creates a wonderful sense of consistency from one project to the next.

The Application

Within a Django project one or more Django applications are combined, and each application provides a unit of reusable functionality. This might consist of DB models and views to aid in tagging objects, providing search indexes, or generating thumbnails…

How To Avoid the Fear of Overkill

Something I read today in a Javascript forum gave me pause to think about broader attitudes in developer tools and libraries. I love jQuery, but if this is all you want to do, jQuery is overkill. 
Javascript libraries are great if you want to do a lot of things, or one really complicated thing, but if you're just doing something small and simple, just write the javascript code. arandomgeek I respectfully disagree.
Of course, people say this about a lot of other libraries and I defend against this stance in, more or less, all of these cases. I have heard it about Python and things in the standard library, about jQuery, about Django and Twisted, and about any language that isn't C. The common thread here is someone feeling that, as they are not using every or many parts of a tool, they should not use it for the one or two things it could be useful for. These people suffer from the Fear of Overkill.

I can summarize the argument against this very simply.

It would be overkill for…