Geekery

Apple Does Backup and Restore Right

I had the misfortune to suffer a hard-drive failure on the iMac I use as my primary work machine last week. It had to be brought up to Denver to get fixed at the apple store. Apparently they had to have a new hard-drive shipped in, I guess that’s not something they keep spares of lying around in their service department. Go figure. So, I have had a nice 500gig external drive with a partition for Time Machine backups since I’ve been using this work computer. I complained about Time Machine sometimes because it would freeze up Finder operations, especially while using Photoshop. I would usually have to pull the power plug out of this external firewire drive while the activity light was flashing in order to get the system to do anything again. So I wasn’t the happiest with Time Machine in general and sometimes had big gaps of a week with no backups on the drive. Luckily I had let it run for a couple days right before the massive harddrive failure put me out of business. (I worked at home while it was getting repaired)

My experience with getting my work computer back up and running after coming back from the Apple Store was actually very painless. It was a clean install or Leopard with no patches, it brought me through the welcome movie when I turned it on for the first time, the second setup screen asked me if I wanted to restore from a Time-Machine backup. Of course I want to! I then select all four options of what data to restore (Applications, User Files, Networking, and the Drive Root) because there’s plenty of room on this new clean hard-drive. 40 minutes later my computer is back! All of my settings and programs just like I left them. My last Firefox session was even restored! The one exception is of course Entourage, because if you don’t exclude your Entourage database file from the backups it takes up many gigabytes of extra space with incremental backups from every day. Luckily all my email, etc is on the company exchange server. So, I put in the right config info and everything was back. Apple did the right thing by making Time Machine work so easily and brainlessly, and making restoration a breeze. This system is a lifesaver.

Posted by sirtimbly on 06/16/2008 at 12:52 PM
Geekery • (2) Comments • (0) TrackbacksPermalink

Preventing Real Player .flv download

OK, I just recently ran into this problem and had a real tough time tracking down the right information online. We use lighttp or (lighty) and mod_flv_streaming to do Flash Video Streaming for clients. One client had the latest version of Real Player installed on their system and when they viewed their videos in the browser Real Player gave them a little button to download the video for watching offline from their hard-drive. Of course the client didn’t want their website visitors to be able to download the videos - just watch them in the browser. Rather than splitting hairs and explaining the intricacies of how the internet works, what encryption is and the pro’s and con’s of DRM, I just started looking for a simple solution to answer their specific problem. It turns out that RealPlayer is not particularly tricky or deceitful when it comes to leeching .flv video files. Their downloader actually identifies itself in the UserAgent field of the request it sends to the server! So, it’s easy enough to write a simple rule in the HTTP server that checks for the useragent and doesn’t serve .flv files to the RealPlayer client.

In the lighty config file it looks like this:


$HTTP["url"] =~ “^/videodirectoryname/” {
$HTTP["useragent"] =~ “/.*RealMedia.*” {
url.access-deny = ( “.flv” )
}
}

So that’s it, we didn’t have to encrypt the video files and decrypt them in a custom flash player, and we didn’t have to buy Adobe Flash Media Server or mess with getting Red 5 to work. Just check for the useragent, and all of a sudden RealPlayer doesn’t prompt the visitor to download the file anymore. And if they right click on the video and try to download it, it just gives the user an error. A smart leecher could still easily spoof the UA, but Real Player doesn’t, so… brilliant!

Posted by sirtimbly on 05/29/2008 at 10:39 AM
Geekery • (0) Comments • (2) TrackbacksPermalink

Gathering All my Online Activity Into One Place

It’s called FriendFeed. And it lets you track and publish all of the information about what I’ve been up to on the various social enabled web service I’m a member of. Most of what you’ll see on here is links to things I’ve rated on StumbleUpon, bookmarked on del.cio.us, and song’s I’ve “loved” on last.fm. But occasionally there will be new photos from Picasa(google) web albums, or books on goodreads or movies added to our Flickr queue. You never know what might be there. It’s kind of like this running social log of what I’ve been reading and what I’m interested in. It doesn’t really sound that interesting to me. But I could see some sort of interesting infovis document being created from this. Perhaps something along the lines of a personal “annual report” ala Feltron. I hope no-one really cares that much about the details of what I do online, but it’s interesting to see it all in one place.

Also, yes since I mentioned photos, there is a new album of photos from our trip to Bishop’s Castle up. It’s absolutely astounding that one man could build all of this.

Posted by sirtimbly on 04/07/2008 at 09:25 AM
GeekeryPersonal • (0) CommentsPermalink

Flex Development Process (getting started)

I am a designer and I love web-design, but I'm lucky enough to get some opportunities to do development also. I've dabbled a little in Javascript, PHP, and ASP web development. I've been exposed to a pretty decent amount of ActionScript programming through various Flash projects over the years. My only programming classes were 2 semesters of 100 level Java my freshman year of college, 4 years ago.

I'm telling you all of this so you know where I'm coming from, and why perhaps my workflow is shaped the way it is. This is simply what seems to be working for me, there are certainly better ways to do anything.

I am only on my 3rd Flex 2 Rich Internet Application (RIA) now, so I'm a newb, but here's my process.

First things first, Design! Yes, get some of the homepage design pinned down, first. Colors, shapes, textures, size of the page, target audience, simplicity of interaction. These are the things to consider before starting a Flex project. Flex is a very visual environment, I think it's important to mock up the entire application in photoshop before starting anything else. The client gets a chance to see their final product first, they can give their approval for the look and feel and give very insightful feedback on the functionality of the application if they get to see the app right off the bat.

So after a couple design revisions (or just one) you should have a PSD that looks like a flex application. I keep Flex open when I'm doing the design comp to check on what controls are available and what they look like.

After design is approved, start working on your data, this time I created an Entity Relationship Diagram to get a good feel for how the database was going to be structured, and ultimately what data objects I'll need to be working with in my Flex app. Bring a developer in on this for their knowledge of normalizing databases, etc if you can. The client got to see this diagram also and again we refined the structure of the application in important ways based on their feedback.

OK, next is to get started in Flex Builder. If the crappy Eclipse IDE will launch and run, good for you! You Win! Seriously though, the next step is to layout the interface in Flex, put all the controls, canvases, accordions, and tile lists you will need in place. Export graphics from the PSD to embed as skins for the various UI controls. Test the interface with no code to make sure the basic functionality of the UI components is all there first. I do as much as possible in an external style sheet for my Flex App now, very handy to keep the MXML file somewhat clean. Also, create any custom component that you know you will need (custom item renderer's etc.).

Next, once the interface in your Flex app looks just like the photoshop mockup minus the data, start setting up your data. I use XML for all the data input, the developers create ASP pages to generate XML files from the database. But first I need to create a flat XML file locally that matches up the Entity Relationship Diagram that I created earlier. Fill in all the data from an imaginary data set, create the images you might need to refer to, make up a full featured XML data structure to keep locally.

Now I create an external .as file to store all of the code for my project, I know theres some stuff you can do with custom classes and true OOP but I just put it all together in one big actionscript document per mxml file. I import any components that I'm pretty sure I'll need, set up a couple local objects to store my current data. Create the HTTPService objects for getting my XML data into the application. And start creating empty functions. Set arguments and return types if you know them, most of mine have one or no arguments and return type :void. Create a function for all of the buttons in your UI, create a function that is reusable if you can. public function deleteItem(itemID:string):void {} is usually better than creating 50 of these: public function deleteMySpecificItem():void {}.

I don't worry about actually writing the code into the functions yet, I just create a bunch of empty functions and put one or two lines of comments into the function to describe what I will do there.

Now it's time to make your data go into the correct places of the interface. Make the data show up where it's supposed to and how it's supposed to.

Then worry about functionality and writing the code that allows you to move the data around inside the application and interact with the UI elements.

Finally creat all the HTTPService request to write the data back out to server side scripts that will update the database.

Those last two steps take the longest and are the most tedious. But seeing it all come together is so awesome. Testing, bug squashing, and more testing is not very fun either, but still very satisfying when done.

So, I just thought I would share how I've been doing my Flex development. I don't know who will read this, but I hope it can help someone who is just getting started.
Posted by sirtimbly on 11/30/2007 at 11:11 AM
GeneralGeekery • (0) CommentsPermalink
Page 1 of 1 pages


Search
Syndicate
Site Statistics
  • Total Entries: 349
  • Most Recent Entry: 06/16/2008