Edge Rails Goody: Distributed Asset Hosts
Posted by Daniel Fri, 02 Mar 2007 12:38:00 GMT
Source: ChadFowler.com
Posted by Daniel Fri, 02 Mar 2007 12:38:00 GMT
Posted by Daniel Fri, 02 Mar 2007 12:25:00 GMT
Posted by Daniel Thu, 01 Mar 2007 02:46:00 GMT
As promised a Busy Developer's Guide to Seth's Custom Javascript Event mixins. It's a truly simple example, but it should display the simplicity of getting this going, and to some degree how it separates concerns.
Seth: There's a typo I believe on line 29 of event_broker.js. And line 161 of event_mixins.js. Should they not refer to "listenForEvent"?
Posted by Daniel Wed, 28 Feb 2007 02:34:31 GMT
Posted by Daniel Tue, 27 Feb 2007 19:15:00 GMT
For now, if you haven’t already, read this. Seth, I found a documentation bug (I think). I’ll post the full story later today… for now it’s back to work.
OK. I’m back. Did you read the article? That’s OK. I’ll wait…
So I’m working on a website and the design has iterated. It started out with… er, um, a page that displays a list of things that are “on” and a list that is “off”… both displayed on the same page. Time goes on and navigation is added and other widgets as well. It’s wired up with Javascript etc. It’s fairly clean, but basic, since we knew a revision was in the works.
The revision shows up, and we have to get the new design working but it’s radically different. Now the on and off lists are toggled—only one list showing at a time, and the navigation changes depending on which one is showing. Some new code is added (almost always a bad sign) to get things wired up and we resign ourselves to cleaning it up in steps as we go. We feel this is best because we don’t know that more changes aren’t coming, we have other higher priority tasks to spend time on, and since the changes weren’t hard, we have little reason to clean everything up now.
Time goes on and we continue to refactor every time we have to touch something. A little bit here, a bit there, and soon the code has far more distinct responsibilities and encapsulation. Our understanding of the app is better as time goes on, and the code reflects this. But we haven’t touched the toggling yet…
So toggling is screaming to be refactored since the wiring is painful to behold. It’s far too interwingled with the other stuff on the page and we know it. I had looked at Seth’s work a while back, and shoved it into my back pocket… and today it worked out perfectly. We did a little spike, got the basic code working, and then applied our new found knowledge to the problem. Now we have excellent separation of concerns. The toggle dispatches a custom event, and various things listen for it via a broker. Nice. Any other widgets or tools can tie in just as easily. Since we were already using Prototype.js and our own classes, it took only about 15 minutes to mixin the Event classes and set up a broker. Most excellent Seth!
I have a “Busy Developers Guide” one page sample of one publish class, one listener class, and one broker. It’s an extremely simple example, but it is all you’ll need to get started using Seth’s stuff and should help answer the basic question “How do I use this?” from a code perspective. I left it at work so I’ll post it tomorrow, and point out what appears to be a documentation bug (or some misunderstanding on my part).
Posted by Daniel Thu, 22 Feb 2007 14:00:00 GMT
Disclosure: I own a tiny amount of Sirius stock.
Doc writes: "There are a number of problems with this merger; but they're also problems with satellite radio in general..." and lists a number of problems. Two of them can be addressed.
The monoculture issue can be addressed by making space for "public satellite radio" similar to local cable access. No I admit that I never watch what seems to be an endless stream of worthless shows, in almost direct opposition to the podcast phenomena where I listen to many different 'casts... but it could mitigate the homogeneity of radio programming to some degree, if it were truly embraced (and it should be from what I've heard on XM).
I agree that files seem to have advantages, so I wonder why neither XM nor Sirius to my knowledge release their shows via iTunes. They already deal wih the rights issues, so it shouldn't be a big leap, and it would probably improvve their programming, since they competition is stiffer. I also think they should store the programming locally (say in my car's radio) so that it could be loaded on my iPod if I wish. There are shows that are on when I'm not in the car that I'd love to listen to...
I should add that I've only listened to XM during the free trial period, it's not in the budget at the moment. I do enjoy the quality of the sound, and the seemingly endless streams of music I don't own or haven't heard.
In short, I think that open up some space for the public, and realizing that their competition is the public at the same time is the salvation. Mel, send me check when you implement these ideas please? Thanks.
Posted by Daniel Wed, 21 Feb 2007 03:17:00 GMT
In my continuing quest to learn Cocoa and it’s frameworks, I wrote the “hello world” of browsers utilizing WebKit. Mostly it was interface builder, with a couple lines of code. I loaded my own blog and Apple’s home page in celebration. Onward!
Posted by Daniel Tue, 20 Feb 2007 11:21:57 GMT
So it’s been a long while since I wrote anything on Objective-C. It was decidedly not like riding a bike for me. However,I did get the basis of an app I’m thinking about going, wrote a couple of tests, and got some CoreData stuff going.
I’m was excited by some of the up coming additions to the Frameworks. CoreAnimation and Garbage collection are high on my list… and so is the Ruby bridge. And it’s been a while since I wrote a Mac app, and I felt like it was time. Since it has been a while I felt that I should go roots (or Core) rather than work in some of the other environments I’ve used in the past.
I also wrote a tiny Ruby on Rails app to celebrate version 1.2. While I work daily these days in MonoRail (The Castle Project)in .Net it was refreshing to drop in on the framework that has got so many people thinking about web dev.
Anyway, a very interesting weekend from a programming perspective, with plenty of time for playing with Noah (it was cold out for him).
The only thing I didn’t manage was to ride my bike. I feel old, slow, and out of shape. However my spring time workouts begin today with stretching exercises and I’ll be on my bike this weekend one way or the other (Murphy willing).
Posted by Daniel Tue, 20 Feb 2007 11:08:00 GMT
Posted by Daniel Fri, 16 Feb 2007 14:53:00 GMT
Posted by Daniel Tue, 13 Feb 2007 02:40:00 GMT

I carefully selected bits and pieces. I dreamed of putting this together one day. And then, through the wonder of EBay and the sale of stuff from my former life, I have a new bike. It’ll never be this clean again!
Glenn, Bill, Wendy and others at Piermont Bike Connection really did a great job on the build. Yeah, it took a long time because no one followed up on a missing bit or two, but other than torturing me, there’s no harm done. It’s a BMC FS01 (2006). Let me know if you want nitty gritty build details.
Posted by Daniel Tue, 13 Feb 2007 01:54:00 GMT
Posted by Daniel Wed, 07 Feb 2007 11:41:00 GMT
One of the other members of the Prototype Core team just asked me to be his only English-speaking “Live Reviewer” for a forthcoming book on Prototype / Scriptaculous.
[What Seth doesn’t say is that he’s apparently a part of the core team… with a bio coming soon! That’s way cool. Go Seth!]