Skip to main content

Posts

Showing posts from 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

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 hav

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" />'+ '&

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 thumbn

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

Ducks In A Row

I'm trying to "get all my ducks in a row" as the saying goes. I've got a lot of standing projects, some personal and some professional and many straddling a line between those two. As part of the process of figuring out what I need to do, I need to figure out what I want to do. I've got a broad range of things demanding my time and a broader range of things I'm wishing I could put my time to. There simply isn't enough of me to go around. I see so many others around and they seem so much more productive than me. Where do you find the time? How do you do it? I've obviously got some missing element I need to find. The plan at hand is a simple set of actions. Track my time 24 hours a day. This keeps me focused, especially for non-billable hours. Decide on each standing project if I can do anything. If not now, archive it. If never, delete it. Write every morning. Write more whenever I have something on my mind. There are things I wish

Amazon Review: Triple Town

Triple Town is the first released game on the Amazon Kindle. I was really excited to try this out, and I'm happy to be one of the first to write a review. Now, I know there are going to be a lot of nay sayers about the obviously lacking computing power of a device like the Kindle, which was designed to be lower power and function to read books, not run games. However, we should all be very familiar with the rules about limits in design: they can push us into greater heights. Is Triple Town the end all of gaming? Of course not. Is it a damn fine game that I'm happy to spend some time with? Absolutely. Triple Town is what you get if you strip an RTS to its core and make into something of a puzzle game. Danc has a great write up on the design limits that needed to be worked around and where a game like this fits into a map of what works and what simply isn't fun, and finds a snug little place for itself. Honestly, I'm loving the game. Not just as a neat novelty to hav

jQuery Plugin: ClipExpand

This is my son standing under the Flying Speghetti Monster. This is a nice photo, but maybe I want to zoom in on just my son. Further, maybe I want to do this on the client-side, not on the server-side. There are a number of reasons I might want to do this. The most obvious is displaying a thumbnail that expands into the full photo. Rather than load two images, we can load a single one, crop the image to get the thumbnail, and expand it into the full image when the user wants to see it. We might start by looking into the CSS clip property, but we'd run into an immediate problem: the result is just floating in dead-space! The image will be clipped as we specify, but this only hides the clipped areas and leaves the image otherwise in-place. A better solution is to take the original layout of the image and reposition and resize it and adjust the clip, so that the region we specify by the clip property is expanded to fit the full size of the space we gave for the image.

Paper Rock Scissors: Day 3

Now we're demonstrating how fun interfaces can be built without the use of Flash. This is a growing importance, as open web technologies like HTML5 and CSS3 become more supported and capable, and as devices like Android phones and Apple iPads are more widespread, where Flash is un- or under-supported and web technologies are increasingly useful for performance. The prototype of Paper Rock Scissors worked, but we need something that actually looks nice. This is what I came up with a couple hours of messy around. It doesn't take much to clean up a web game, though it can take a lot more to make it really polish and appear shiny. That is true of any design. The theme has a few threads that tie it together. Your are represented by a blue glow, on your score and on your selections. The enemy is represented by a red glow, so the progress of the game is clear without overloading it with any textual messages or any heavy graphics. I've notched the selections, like

Blink

EDIT: Please don't do this. The <blink> is back. Thankfully, for you Firefox users, this won't work. All of my webkit using readers see a blink tag, doing its blinking, which webkit does not implement. This is all thanks to an evil snippet of CSS: @-webkit-keyframes blinkit { from { opacity: 1.0; } 50% { opacity: 0.0; } to { opacity: 1.0; } } blink { -webkit-animation: blinkit 500 linear 0 infinite normal; } We can use our powers for good or for evil. Sometimes, evil is just fun! EDIT: This might not work for everyone, even in webkit browsers. It works less reliably when I actually post it, but it is still fun!

Paper Rock Scissors: Day 2

Yesterday I wrote about the little tech-demo Paper Rock Scissors game I prototyped in the morning. Today, I've replaced its crude AJAX polling with a comet solution, cleaned up the UI, and added a real-time chat for the players, in about two hours this afternoon. You can try it out with the other readers of the blog right now. Give it a try, if anyone else is around. Very simple. Nothing flashy. The point was to show off how comet can improve a project that needs it. The prototype yesterday had a 500ms interval updating the game state, so twice a second it would ask the server if the score changed, if the other player made a move yet, etc. This is a terrible way to make multi-user interactions! The server would quickly get bogged down by all that polling and anything other than Paper Rock Scissors would take a lot more fine-grained polling than 500ms, increasing the load a lot. The solution, in HTTP land, is that we replace several polls per second with a single poll th

Paper Rock Scissors: Day 1

I’m building a Facebook game. Now, don’t worry, you haven’t lost me to the giant beast, my friends. No, I’m just doing a little project, for fun, to both test and demonstrate a number of technologies. I figured something really simple, like Paper Rock Scissors, would be the perfect target. I have the game playable in about three hours this morning. I have more work to do. The point of this is to demonstrate a number of technologies I am trying to push as an expertise, because they are all things we know well and which I think are ready to have their day in the sun, so I can see a lot of need for this coming in. Even such a simple game is demonstrating all of these things. A comet server to push events to the game client in the browser HTML5 to build a game UI that is flashy, but without Flash Housing a web app as a Facebook app, for promotion and integration purposes Utilizing HTML5 for mobile gaming platforms Today, I have a playable prototype that matches up players, updat

A Conversation About The Tedious Details of Creative Work

I just thought this conversion should be preserved for posterity. ldleworker: indeed I just need to fucking press through the general CSS refactor, then I can go back I really can't stand this for much longer also thanks for helping me figure that out ironfroggy: when i am stuck doing something i dont like that is a required part of the job which I do because of the parts I do like, I think about old school painters as in, pre-photography portraits a painter did so much more than paint, back then. They carved and stained the wooden frames, and they crafted their brushes they mixed paints from powders they ground up from various sources to produce the pigment they stretched cloths over the skeleton to make the canvas from hand they build their own easels, even. the point is, we look at "they painted" and we forget how much support work that required, and we're in the same boat. ldleworker: Yeah but at least when they are making their own brushes or carving their

Bad UX or Bad Advertising?

Have you ever had the situation where you can't tell if an annoyance on the part of some software is caused by bad user experience design or bad marketing decisions? Of course, we could make a case that all marketing decisions are, by definition, user experience decisions. Still, I am left to wonder today when I made the usual move to click on a webpage background to focus my browser and inadvertently clicked on an advertisement I was not interested in. I clicked on the margin of the page, which is my usual habit: What I didn't realize was that a simple scroll upward would have revealed this about the margin: Oh, you sneaky sneaky Visual Studio 2010 ad! So, which was it?

Someone Do This So I Don't Keep Wanting To

I'd like to say it is for lack of time, but the blame is equally (at least) on the shoulders of a lack of motivation. This is the blame for why all these little ideas never get made. Here are a few things I would love to do/make, but would even more so love for someone else to have already done. There are things I really want to build, because I am excited about building them. There are other things I really want to build, because I am excited about using them. For the second group, I'd just as soon find that someone else will, is, or already has built it. Del.icio.us Bookmark Post Generator I'd like to collect and blog the links I find throughout the day, but I can't find a good non-manual way to do it. The method I blogged previously didn't really pan out, unfortunately. I want a web app that I can give my del.icou.us account and have link posts generated for me, with options. Minimum and maximum links to include in a post Minimum and maximum time to pass b

Using Exploits To Improve User Experience: A Test Case

Many of us know about the neat trick you can do with the common blue/purple colors (without styling) of links, depending on which have been visited or not by the user. Obviously a UX plus to know what you've already seen, but we eventually realized this information could be exploited to learn all sorts of personal information about a user, simply by visiting one site that flooded the page with links to different places and inspected the colors. Recently, Mozilla announced the start of finally solving this problem . This kind of makes me sad, and I'll tell you why. My first thought when reading the news was to come up with an idea to use this exploit for good. This is only "good" if you like wasting free time, which it has the potential to do. Announcing, from PanTechnoCo, Always Always New : the link sharing service that only shows you new links. Keep in mind, this isn't a product, but a toy. I just wanted to play around with the idea. You can post links and you c

An Introduction To Vagrant

I spent my Sunday afternoon familiarizing myself with a tool who's Getting Started page has been sitting in my Evernote tickle file for a couple weeks. This is one of those many projects that fall under the ever widening category of "Stuff I Wanted To Do, But Am Glad Someone Else Did It So I Can Just Use It And Get On To The Next Thing." If you use virtual machines as part of your development process, or want to, and especially if you already use the excellent VirtualBoxVirtualBox , then Vagrant  is certainly worth looking at. The Setup (for Vagrant 0.2) Now, the docs might need some updating and they seem to assume you're already a Ruby user, so they're missing a few dependancies that such a person would just happen to alread have. This is what I did, as an Ubuntu user who didn't even have Ruby installed. I'm also adding Virtualbox's Karmic repository to provide VBox 3.1, which Vagrant requires. sudo apt-get install rubygems libxslt-dev openssl-

Ways Django Can Import Things

How many ways can django import a module? Grep is hard for this. In .py files "import (.*)\..*" "from (.*)\..* import .*" "patterns\(['"](.*)['"]" "url(r?['"].*, ['"](.*)" In INSTALLED_APPS and other settings. Am I missing any? Better question: Why do I have to wonder if I'm missing any?

Bookmarks for March 26, 2010

How I Create those Del.icio.us link posts - TechLifeBlogged I am doing this now, but I stopped at the email so I can review and edit, rather than let it post automatically. Particletree » Visualizing Fitts’s Law Great visual examples of how Fitt's Law works and why. Fitt's Law tells us that the difficulty of hitting a UI target is reliably predictable based on the distance and size of the target. Every designer or developer working with UIs should know this. Checklists Exactly what I was looking for. Upgrades a select widget into a series of checkboxes, where we want toggle selection to be the default, not single selection. jquery-asmselect - Project Hosting on Google Code Will likely use this, instead, because it seems to preserve the actual select, which toChecklist didn't do

Good design is... - 52 Weeks of UX

Good design is innovative. Good design makes a product useful. Good design is aesthetic. Good design makes a product understandable. Good design is unobtrusive. Good design is honest. Good design is long-lasting. Good design is thorough down to the last detail. Good design is environmentally friendly. Good design is as little design as possible. —Dieter Rams via 52weeksofux.com Posted via web from See Calvin Develop

How To Understand Wavelets

I got acquainted with developing against the Google Wave Preview last week, and I'll be doing more of it this week. There are still many gaps in the documentation and in the public understanding of what exactly is going on in a lot of cases. This post is halfway between an introduction to Wave development and a story of my personal hurdles in my first experiments working with it. One of the first things you'll find in the Wave documentation is a diagram I have reproduced here.  This diagram is wrong. You're going to notice something when you look at this diagram and play around with Wave itself, the web client. You're going to realize you have no idea what the difference between a Wave and a Wavelet is. You don't seem to be able to even see the term "Wavelet" appear  anywhere  in the application! What's more, everything the API docs describe a Wavelet as is what the UI seems to call a Wave. This was really confusing to me and I know I'm not the

How To Count Your Day

I have been making an attempt to record my day. I'm doing this for a number of reasons. I want to know how my moods change through the day, when I'm happy or not, when I'm feeling motivated, and when I'm being productive. To facilitate this, I have a spreadsheet on Google Docs called "Daily Me" and I've built two sheets. One tracks daily and one tracks hourly. This is what I'm tracking. Daily: When I wake up Weight How many of my morning exercises did I do? How many of the things I want to do every day did I do? This includes morning pages, sketching, picking up my guitar, reading, and writing. When I go to sleep Hourly: Mood What am I doing right now? 1-10 scales on how happy, depressed, energetic, and motivated I feel at the moment "Productive" which I mark yes or no. I consider being "productive" doing whatever it is I feel I should be doing right then. This is the thing I try to keep in the green and use everything el

DeferArgs on GitHub

A time ago I wrote a library called DeferArgs and I used it when I was still in Twisted code every day. I no longer have that fun, but I was reminded of the code and decided to throw it onto GitHub for anyone who cares for it. http://github.com/ironfroggy/DeferArgs An example usage, where foo could take any deferreds and would be called when they all fire. @deferargs def foo():     assert False @catch(AssertionError) def onAssert(error):      print "OOPS"      @catch()              def onOthers(error):      print "I WOULD BE REACHED FOR ANYTHING NOT CAUGHT ABOVE." @cleanup                                                     def _(r):                                                        print "The result was: ", r  

How To Write Your First Jetpack Extension

I've been meaning to this for months, and I just kept putting it off. So many other things going on, so I didn't think I had the time. I decided to take a look this morning, finally, and put in the energy required to try this cool looking stuff out. Took me ten minutes. If you don't care about writing a Jetpack extension, but you have Jetpack installed , you might want to try out what I wrote. "Twitter, Who Am I?" is the name and making your currently-logged-in user at twitter.com obvious is the game. You'll get a nice label above all the pages, so you don't accidentally follow Ashton Kutcher with your business account. The tutorial is fantastic, so I'm not going to try and rewrite or replace it, but I do want to make some comments about the process of getting into this. Firstly, the tutorial on the website is the same as that in the about page, but crippled. Same text, no interactive features. The tutorial built into Jetpack lets you edit and try out

Top Ten Science and Technology Predictions for the 2010's

Looking at Science and Technology over the next year is one thing, but its far more fun and far easier to make wild guesses that cover the next decade! There will be at least one machine capable of carrying out a phone conversation that passes the Turing test. This is bigger than it sounds, because you can fail the Turing test and still be smarter than a lot of people, these days. The end of the decade will likely see annoyingly friendly automated phone services and websites, first as terribly novelties and slowly as useful, subtle additions to our user interfaces. When you click the wrong thing in Firefox and mutter, "Ugh, not that!" and it corrects it for you, you'll finally stop finding it annoying. Automated photo and video manipulation is going to get weirdly good. I mean, this stuff is going to creep you out. People will delete their ex from entire collections of videos and photos without a trace, like they never existed (not a bad thing). Weird, is inserting peopl

Top Ten Science and Technology Predictions for 2010

I made a few long-term predictions in conversations over the past week about science in the next century. Focusing on only the next year is much more challenging. Also, I'll be proven wrong much more quickly. Mass market CPU/GPU hybrids are going to make netbooks and tablets very viable machines. HDMI outputs will make them powerful docked machined, capable of replacing a laptop realistically. Intel might have dropped the ball, but Nvidia's Tegra chips are going to prove this in the early half of 2010. Cheap DNA tests are going to be a noticeable social problem. We're going to see numerous news items this year about disgruntled parents trying to prove some fear with a few stolen strands of hair and a self-addressed envelop from a shady testing company. The legal and social implications aren't going to be pretty. At least one eBook reader will be released with color support in the US market. TMOS displays will appear in netbooks and phones. Our display technologies will

My Top Ten Goals for 2010

Call them New Year's Resolutions or whatever else you want, but we all should have some goals and we should lay them down. Of course, I'm not sure if its better or worse to make these goals public. I'm just doing what feels natural. I'm going to move this blog away from Blogger and Blogspot and self host. I've spent the last couple days building a new server, for personal and future business use. I really like the setup I've built to launch and manage a bunch of domains easily. It should be a piece of cake to set up, but migration I'll have to look into the details on. I will launch up to ten websites in 2010. Some of them will be very small and nifty. Some of them will be undertakings and hopefully profitable. I'll put more focus to my "Personal Brand" and to my business as an actual business, rather than a dude who does stuff for cash. I won't let that business face become cold, however. I will read 50 books. This one is tougher, because

2010: A New Hope

I couldn't have chosen a cheesier headline. I'm breaking my "How To ..." pattern of titles, but I figure this is probably for the best, and when better to make a refreshing change? I still want to post more How To articles, but I don't need to stick with the pattern for everything. It gets difficult to twist some titles into the right shape, anyway. Prediction posts are always a big thing the week before and after January 1 and years ending with 0 always have even more of them. Why should I miss out on a great meme that only comes around once a decade? I'm going to mix it up a bit and give you more than a top ten predictions on some random topic: Developing Upwards presents, My Top Five Lists of Top Ten Predictions for 2010 This originally was written "My Top Ten Lists ...," but damn if I don't wanna do that! I apologize for anyone who just let out a huge groan. You can skip them, if you want. The plan is to post one Top Ten Predictions list a da