May 2nd, 2006 at 9:58 pm
Tags: Kids, Movies, Projects
OK, after we get the boffers done, we can get into more child-friendly swordsmanship with these instructions for how to build a lightsabre with common plumbing parts for about US$33. It looks pretty cool, too. Then we can use these rotoscoping instructions and the Crimson application (designed just for rotoscoping lightsaber effects) to film the kids having a nice healthy duel.
Crimson is OS X only, and has trouble running under Tiger, but it’s open source, so I’ll try to get in and fix it. Some of the Windows lightsabre rotoscoping tools (yes, it’s a whole category of applications now) also add neato features like sound effects and flashes (from the blades touching), which would be fun to add as well.
Comments
May 2nd, 2006 at 9:52 pm
Tags: Community, Convenience, Vancouver, Wireles
The BC Wireless project is a project to bring free community networks to communities throughout British Columbia.
BC Wireless
There’s a great resource for finding network connectivity in Vancouver, by cafe, neighborhood, or main street. There’s even a map. Coffee and Wireless in Vancouver
Comments
March 10th, 2006 at 7:58 pm
Tags: Cocoa, OS X, Python
I noticed that jwz is trying to take a screenshot in Cocoa and having trouble. I’m happy to see that he’s porting his awesome collection of screensavers to OS X, that’s great news. As for taking screen shots, I’m amazed it is as hard as it seems to be–heck even the new Nokia Series 60 give you the ability to take screeenshots from Python now. In any case, here is a method that works for me under PyObjC. It assumes it is part of a Cocoa object and that you’ve done a from AppKit import * already. Since I can’t comment on jwz’s blog (whether it’s because I don’t use LiveJournal or because I do use Safari, I don’t know), I’ll post it here instead.
def screenShot(self):
rect = NSScreen.mainScreen().frame()
image = NSImage.alloc().initWithSize_((rect.size.width, rect.size.height))
window = NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(
rect,
NSBorderlessWindowMask,
NSBackingStoreNonretained,
False)
view = NSView.alloc().initWithFrame_(rect)
window.setLevel_(NSScreenSaverWindowLevel + 100)
window.setHasShadow_(False)
window.setAlphaValue_(0.0)
window.setContentView_(view)
window.orderFront_(self)
view.lockFocus()
screenRep= NSBitmapImageRep.alloc().initWithFocusedViewRect_(rect)
image.addRepresentation_(screenRep)
view.unlockFocus()
window.orderOut_(self)
window.close()
return image
I cribbed this several months ago from some example Cocoa code, but forgot to make a note of where I got it. If anyone recognizes this pattern, please let me know so I can attribute it.
[Update 2006-03-10]
Nils Soffer pointed out:
A simpler solution:
try:
screenshot = 'screenshort.pdf'
os.system('screencapture -i %s' % screenshot)
image = NSImage.alloc().initWithContentsOfFile_(screenshot)
finally:
os.remove(screenshot)
:-)
Which reminds me, you can also use the command-line screencapture -c to go to the clipboard instead of a file. This might be faster, but I haven’t tested it yet. I still think there should be a Cocoa method to grab the underlying framebuffer of the screen. Besides the -c flag to send the image to the clipboard there is also a -C flag to capture the cursor as well.
[Update 2008-01-22]
Digging through old mail as I move this entry from my custom blog setup to Wordpress, I found where I got this code from originally. It’s from the Irate Scotsman’s Screen Sharing code. Thanks, Matt!
Comments
March 3rd, 2006 at 10:31 pm
Tags: Cocoa, OS X, Python
Yes, I’ve been quiet for awhile. No, I’m not going to apologize, and I wish more bloggers would stop apologizing when they take time off. One of the great things about Atom/RSS feeds is that I can keep up with blogs that are posted to infrequently, which includes some of my favorites. Don’t feel like you need to post all the time–we’ve all got plenty of other things to read!
My quiet time is going to continue for a bit longer, but while I won’t apologize, I will at least explain. Here’s what I’m doing instead with the couple of hours I have between putting the kids to bed and going to bed myself.
- Writing the OS X version of the file uploader for The Conversation Network. At some point this will be made public, and the idea is to open source it. I’ll be sure to point that out when it happens. It’s been really great to have this opportunity to work with Doug Kaye and the rest of the gang from ITConversations, after being an admirer (and consumer) of their work for some time.
- Attended the Northern Voice and Moose Camp conference, where I was fortunate enough to co-moderate a session on community and blogs with Nancy White
- Writing my own weblog software. Blogger has a better interface than manilasites, but that’s not saying much. I’m also trying to port my old content from manilasites, plus my pre-blog-era work, plus my paper journal. All of this will be hosted at livingcode.org in the near future.
- Writing more articles for IBM developerWorks, I hope to have more to say about that Real Soon Now
- Generally organizing the livingcode site better, getting projects their own pages, putting code into SVN. Trying to use Sourceforge was a huge failure, their interface is just too crufty and they still don’t support Subversion. But Dreamhost (where livingcode.org is hosted) does support Subversion now, so I’m going to be moving all my public code over there.
- I wrote a screensaver using PyObjC which I’m hoping to get included in their distribution as an example, but I need to do some refactoring first (in the time leftover from other projects). I want to write that up too, it was pretty interesting to work on.
- I periodically take a stab at porting VPython to the Aqua environment. I have some ideas for this (some of them probably heretical to the VPython folks), but need time to work on them. Notice a pattern emerging?
- Porting Apple’s Sketch demo application from ObjectiveC to PyObjC.
- Several of these things are just precursors to DrawingBoard, my animation program for kids. I really, really want to be working on that, but need to get some of the smaller projects finished and out of my head so I can concentrate.
- Exploring programming environments for my kids. My nine-year-old daughter and I will try competing in the PyWeek game challenge later this month.
- I’m sure I’ve forgotten several significant things.
More news as it happens.
Comments
January 1st, 2006 at 10:33 pm
Tags: Living Network, Philosophizing, Programming
Programming is the art of telling stories to the computer in such a way that the computer can tell us interesting stories back. At its best, these stories help us to write even better stories, and to share them with each other.
I see computers as not ready yet. People buy them, they’re interesting toys. They help in some ways, make things more difficult in others. But we have bought into the mythology of computers. Meanwhile, the state of the art in computing has moved backwards in important ways[1], even though computers are getting cheaper and faster. Innovation crawl during the dotcom boom[2]. Tools get more complicated[3], resulting in less freedom of expression, wasting the time of the people who use them.
The idea behind Living Code is that software is not a thing that is finished, it is more like a conversation. Like telling a story that someone will make better. We are trying to take steps to move to a new model of software, one in which we don’t “write programs,” but instead play the computer like a musician plays jazz. This model should be accessible to children, and yes, even to adults.
Empowering.
A rather large goal.
But just as software is never finished, the goal isn’t there to be achieved. We have a goal in order to make focused, achievable steps while learning from history and aware of our limitations. In this conversation our goals become prototypes, experiments which are contantly evolving as they are tested in use.
Happy New Year!
[1] For examples of the promise that computers have thus far failed to live up to, see the wikipedia articles for Sketchpad, Dynabook, OpenDoc, Seymour Papert or Douglas Englebart.
[2] For examples of how computer innovation has stalled, check out one of many patents holding the field back, or check out this summary of Microsoft’s innovations.
[3] For an example of how tools are getting too complicated, see Charles Petzold’s article, Does Visual Studio Rot the Mind?
Comments