what I learned over the years

Menu

Month: November 2007

Hope you had a good thanksgiving. Lately, I’ve been watching math and tech lectures, and dipping into various physics stuff. This nerdtime is more hardcore than the usual news clippings. Next time, I think it’s going to be more about geospatial stuff. I’ve been looking into that too. I’m going to start stating why I think something’s significant, so you can figure out whether you should look at it or not. As usual, the easy stuff is up top.

Secret strategies behind many viral videosAs usual, when there’s a new medium of expression, it’s lawlessness and wild fun for a while, but where there are people, there are advertisers and marketers right on their heels to try to grab their attention. I don’t know how I feel about this, but I am a bit disgusted for some reason I can’t yet put my finger on. Perhaps it’s big corporations posing as ‘homegrown’. In any case, if anything positive has come out of this whole thing it’s that advertising has become funnier over the years. Props to Geico.http://www.techcrunch.com/2007/11/22/the-secret-strategies-behind-many-viral-videos

Verizon opens its network to any deviceTraditionally, telecos have seen themselves trying to be both line and content providers. So in 50 years, we’ve only had call waiting, *69, and three way calling. So for a teleco to open up its wireless network to any device is pretty big. Of course, it’s in response to Google’s open phone platform Android, and their bid for the 700MHz spectrum. I’m cautiously optimistic about the open-ness of the mobile web.http://bits.blogs.nytimes.com/2007/11/27/verizon-wireless-says-bring-your-own-device/

How to destroy the web 2.0 lookI think none of us here are designers, but I check in on this once in a while, since I have to do front-end design. The so-called web 2.0 has a look…the gradients, the beveled edges, and the rounded corners. But I’m also seeing more designers move away from that, and trying to break out of an obvious grid layout, so you might see that bleed over the web apps.http://www.snap2objects.com/2007/11/20/how-to-destroy-the-web-20-look/ Metalayer over web pagesThe web was always meant to be a read/write medium. In the beginning, it was a predominately read medium until wikis and whatnot came along. Some people are still trying to push the envelope by putting a metalayer over web pages that you can write on and communicate to others visiting the same space. So far, nothing in this space has made huge waves, but I expect there to be more developments on this front.http://www.shiftspace.org/screencasts/intro/index.html

Running in Shoes in RubyRuby is a nice language, but there are some problems with its Std lib. One of which is a poor GUI toolkit. It uses the old Tk toolkit which is super ugly. Shoes is a GUI toolkit by _why_the_lucky_stiff for native apps that is meant to write like web pages. That makes it pretty easy to figure out. Check out some of the screenshots with the accompanying source. It makes Java GUIs seem terribly verbose.http://code.whytheluckystiff.net/shoes/wiki/Tutorials

MIT’s Open CoursewareFor those of you that would like to brush up on various undergraduate and graduate topics. It’s probably less relevant to those of you at the lab, due to the free master’s program. They have courses on other topics besides math too.http://ocw.mit.edu/OcwWeb/Mathematics/

Future of Javascript 2Javascript, as I’ve said before, has surprised me. My previous impression of Javascript was a dinky little language on browsers that you use to to do some form validation. It’s evolved into the most used language on the widest platform on the planet. It supports references, OOP, and closures. This slide details more of what’s to come. Beyond Ajax, I think you’ll start to see more and more flexible interfaces in javascript, starting with SVG. Various browsers are making their javascript interpreters faster and meaner, so you’ll see more web sites pushing this envelope by making their websites more expressive. http://ejohn.org/blog/easy-pdf-sharing/

Quantum Mechanics from a computational point of view I never really got the wave equation when I was an undergrad. And quantum mechanics had seemed odd and spooky to me. However, this article on the math behind it is fairly clear. It explains how you get negative probabilities, clearly, but gets kinda murky when it starts talking about mixed states. Currently, in machine learning and search, statistical methods dominate the field over ontological methods. I wonder how long it might be before probabilistic methods in quantum mechanics will find a use in machine learning?http://www.scottaaronson.com/democritus/lec9.html

I owe you a beerI’m not sure how many of you heard of Twittering by now, but Twitter is like…microblogging. You say what you’re doing or just quips over your cell phone in 144 char or less, and your friends can get updates from you on what you’re doing on their phone. If any of you use facebook, it’s much like the status update feature. Most people find Twittering useless and inane on one hand, but lots of people seem to use it the world over. They also released an API, which someone took advantage of with Foamee, which is why this is even on here. Foamee records who you owe beers to, and keeps track of that. So even on a seemingly inane platform, I thought the use of foamee for that end is actually pretty creative.http://twitter.com/ http://foamee.com/

Google’s Android PlatformSubmitted: MetlisAs most of you probably heard, Google released its mobile OS platform, not an actual phone, as rumored. I took a moderately deep look into it. It’s a full stack that runs on linux. It compiles Java (rather, a flavor of Java) into their own Java Virtual Machine, named Dalvik. I think with JRuby and Jython around it should be a matter of time to get Ruby and Python on there. The way they’ve decided to organize the application lifecycle is simple to understand and organized. The UI uses xml to declare the view, rather than to connect it together in code, like in Swing. Outside of standard UI components like text fields, they also have mapviews. You can do interprocess communication by broadcasting an “intent”, and it’ll pick the application best suited to fulfill that intent. So if your app need to pick a photo, it sends out an intent to pick a photo, and the photo gallery will respond. The user picks a photo, and that’s what gets returned to your app. The API isn’t done in full. Some of it isn’t completely implemented yet, and an actual android phone isn’t due out til mid to late 2008, I think. So we’ll see if this all pans out, but it’d be exciting if it does.http://www.reuters.com/articlePrint?articleId=USN0262823920071106http://code.google.com/android/what-is-android.html http://www.youtube.com/watch?v=fL6gSd4ugSI&feature=PlayList&p=D7C64411AF40DEA5&index=1 http://code.google.com/android/ http://www.betaversion.org/~stefano/linotype/news/110/

Facebook’s new Ad platformLast week, on the 5th, Facebook released its new ad platform. The new ad platform uses what people do when interacting with their friends to advertise. Most of us don’t make buying decisions independently. We ask our friends about what to buy, especially if we don’t know much about the domain. Facebook will allow companies to sell their wares on it, and if you buy say…Nike shoes on it, it’ll show your friends on their news feeds that you brought shoes. IBM did a paper on advertising, as we know it, will start to fade out. Advertising isn’t “advertising” when it’s targeted and relevant. http://www.facebook.com/business/?socialads http://www-03.ibm.com/press/us/en/pressrelease/22570.wss http://www.scripting.com/2006/08/03.html

Nokia comes out with a tacile touchscreenThis should be of interest to hardware nerds like Mike. Nokia came out with a touch screen that feels like you’re typing at a keyboard. What they do is put an array of pizoelectrics behind the screen to move it, and then time it correctly to fool your senses. That way, it feels like you’re actually clickity-clacking away on the keyboard on a touchscreen.http://www.redferret.net/?p=9533

Amazon comes out with an eBook readerI totally didn’t see this coming, but it makes sense in hindsight. The coolest thing about it is the device can download directly off wireless cellular internet, and the subscription to the IP service is included with the price of the device.http://www.newsweek.com/id/70983

Where am I? Firefox extensionThings have been brewing in the mobile world, with iPhone and Android making waves. One thing is for sure: people will want web browsers on their mobile phones. I think I remember firefox wanting to move to mobile platforms. Anyway, we’ll probably eventually see geo-location aware browsers. Here’s a neat firefox extension that helps patch that need for now.https://fosswiki.liip.ch/display/WHE/Home

A New way to look at NetworkingI imagine most of you don’t ever watch the lectures. But I only list the good ones! This is a pretty good lecture taking you through the history of networking from telephony all the way to the present day TCP/IP and its problems. The proposal Van Jacobson makes is to request data by name to the network rather than by source. So instead of asking for http://nytimes.com, which you assume the content is the nytimes, you’d ask the network “give me the new york times”, and you don’t care where on the network it comes from. Think bittorrent for smaller files without the existence of a tracker. “Change your point of view to focus on the data, not where the data lives, because it doesn’t have to live anywhere” That means that nodes will cache content it receives and gives it to anyone that asks for it. Of course, updating that distributed content will be tougher, as well as how to implement security for content provider. If you want to skip to the meat, start at 40:00. http://video.google.com/videoplay?docid=-6972678839686672840&q=engedu

Pattern matching method dispatch and DSLIan asks me, “Have you heard of Lua?”, to which I said, “It was in nerdtime a couple issues back!” Lua apparently makes it easy to embed custom languages in your applications–what people call DSLs. Ruby has been pretty good at doing it too. This is ruby envying functional programming languages and their weird features like pattern matching method dispatch and lisp’s s-expressions. A guy uses pattern matching to write a DSL to parse Logo, the turtle drawing program. This wouldn’t have been a way I’d ever think to solve this problem, so it opened up my eyes a bit. http://www.artima.com/rubycs/articles/patterns_sexp_dslsP.html

When I started writing some code recently, I noticed that my controllers were getting fat. There was much to do, but there was a bunch of stuff in there that didn’t have anything to do with actually carrying out the action–things like sending notifications. ActiveRecord already has observers to take action on certain callbacks. However, what I needed was to take actions on certain state transitions. Not seeing any immediate solutions in the Rails API, I decided to test myself and try writing one. I was bored too. So while I’m not sure if it was worth the time writing it, it certainly was kinda interesting. Here’s what I came up with:

Just as a contrived example, let’s say we are modeling the transmission of a car. It has three modes: “park”, “reverse”, “drive”. We want to send a notification when a user tries to change it from “reverse” to “drive”, but not when he tries to change it from “park” to “drive”. If it didn’t matter, and we just wanted to send notifications when the state changed to drive, we’d just use the observers that came with ActiveRecord. But since we do care where the state transition came from, here’s what I came up with:

So where’s the magic? It took a bit of digging around. There were two major things I had to do. I had to insert observers during initialization and I had to override setting of attributes to include an update to notify observers.

ActiveRecord doesn’t exactly allow you to override the constructor. I don’t think I tried too hard to mess around with it. Looking on the web, I happened upon has_many :through again, where he has some good tips that helped me through Rail’s rough edges. While I didn’t exactly follow his advice, I did find out about the call back, :after_initialize. It must be something new, because I don’t see it in the 2nd edition of the Rails book, and the current official API doesn’t list it. Other Rails API manuals seem to be more comprehensive, like RailsBrain and Rails Manual.

Then overridding attributes has always been a bit of a mystery. I found a listing of the attribute update semantics, which was helpful to figure out what I was looking for, but it was false, in that you can’t use the first one (article.attributes[:attr_name]=value) to set an attribute. Looking in the Rails code for 1.2.3, it shows that attributes is a read_only hash. But it’s right that you should override the second one (article.attr_name=value), since update_attribute() and update_attributes() depends on it.

I had a difficult time figuring out how to define methods for an instance of a class. The only thing I came up with was to use define_method, or to include a module with instance methods in them. instance_eval() didn’t work. The meta programming for ruby gets rather confusing when you’re doing it inside a method–it seems hard to keep track of which context you’re in.

So if you can make a use of this, great. If you think it’s worth moving it into a plugin, let me know that too. If you know of a better way, by all means, let me know. tip!

I guess IT managers (or whomever makes buying decisions at big companies), have a lot on the line, and they’d be willing to spend the money on this sort of thing. I just wouldn’t have thought that it’d be available on Amazon.

A couple weeks ago, I happened upon this strange internet rabbit. Nowadays, there are lots of electronic pets that react to people, so that wasn’t anything new. But there were some aspects of Nabaztag that were intriguing and was worth some musing. Nabaztag is a kind of appliance/toy that’s connected to the web. It’s a little hard to describe at first, but this how it works does a good job of giving examples.

Generally, I see it as a simplified interface for the web embodied in a pet avatar. If you’ve ever watched any anime, you’ll be familiar with pet sidekicks, usually for comic relief or raising the cuteness factor. If you imagine a sidekick through whom you can channel to communicate/interact with others, or to receive news, that’d probably be on the spot to what a Nabaztag does.

But why do I think it’s worth posting?

When the internet was conceived, there were many users on a few computers. This has changed significantly. There are now a few users on many computers. Computers are not only mainframes, but first desktop, then laptops, and now budding, mobile devices. Eventually, there will be many more devices retrofitted for the web, such as refrigerators, stoves, and clocks. But that doesn’t mean that there won’t be communications appliances made specifically for the web.

Nabaztag seems to be, one of the early steps in making communications appliances in a form that people bond with. This can work one of two ways.

I can see something QURIO-like that will do just enough to fool us in the right ways for us to bond with it, like the toddlers have, and make it part of the family–like a home robot. Not really a robot to do heavy labor, but more like a companion/pet that can give you the weather and channels your friends to you.

2) Alternatively, we can have electronic pets that don’t fool us, but rather, they are representatives and reflections of ourselves and we use them to interact with our friends’ pets (also representatives of themselves). We already do this to some extend through MMORPGs as well as the many Sim Games. However, the difference is that we play those avatars. Here, the pets are recognized to be separate from ourselves, but they are our delegate. Just as people socialize through their dogs at dog parks, I think people will start to socialized based on their physical electronic pets.

If the pets learn its owner’s habits, when it meets other people’s pets, one might be able to trade information/gossip, or judge how well they’d get along with each other based on how well their pets got along with each other.

So why check the weather through a robot rabbit than through the browser on your computer? Sometimes, it’s a lot faster through the rabbit, since it has lights and indicators you can check at a glance. Presumably, that’s why the Ambient Orbs have been making money. Information becomes a part of a person’s environment, rather than something that’s queried.

But an even more compelling reason is that it becomes another dimension in interacting with other humans, and in self-expression. The pet becomes an extension of self that one uses to interact with others. And with the web, the interaction doesn’t have to be physical. One of the interesting demonstrations on Nabaztag is that two rabbits can get married, and thus would imitate each other’s ears. If a user on one end can control the ears of your friend’s pet, you can communicate tactile touch, and your pets would be channeling you to your friend. Extended to a gel-like tactile substance that changes shape like a piezo-electric, it would make it even more real.

And while I don’t know for sure whether any of this will happen, it seems like an exciting area to explore.

As we all have heard, with the advent of high definition digital TV, old analog TVs aren’t going to work anymore. This is because HD digital TV will be broadcast on a different frequency, thus freeing up the old TV frequencies for other uses. The FCC is going to auction this spectrum off to the highest bidder. The likes of Google are bidding on parts of the famed 700MHz spectrum with the intent of providing free wireless internet to the masses. It’s considered ‘beachfront’ property on the wireless spectrum because of its propagation properties. Apparently, 700MHz has a wider coverage area.

But my question is: what to do with all the analog TVs? While more than half of America watches TV through satellite or cable now, there is still a significant portion of people receiving TV signals the old school way. Sure, after the conversion, our old analog TVs can still receive signals, but it won’t be able to correctly interpret them. Most people have assumed that if you want to use your old TVs, you’d want to use them to watch TV. Thus, the solution is to buy converter boxes that receive digital TV signals and convert it to the old analog signals.

If we’re going to have converter boxes, why not have different types of converter boxes–not only ones to watch TV? As of now, the auction for those bands hasn’t happened yet, so we don’t know what type of signals are going to be on those channels. But if there’s signals that provide free wireless internet, I don’t think it’s too far fetched to make converter boxes that are thin clients that use the old TV as a monitor. That way, it can not only be a telephone through VOIP, but it can still be television, but an internet television.

Going one step further, the converter box could have a software radio in it, so you can tune to a wide range in the spectrum of radio frequencies, and make use of that signal and the data on that signal if you had the software to interpret it. However, that’s not exactly happening soon as today’s computational prowess isn’t fast enough to digitally process signals at high frequencies. You need to sample the incoming signal at least two times the highest frequency in the signal in order to recover it, and we’re just not there yet digitally (at least that’s what I read about a year ago).

I hope that people see opportunities here, and take advantage of it, so we can see some innovation in reusing what was once old for the new.

I use to work at a research lab, and most of them are playing around with other toys outside the web. I send this out as a mailing list just to keep them updated. —Google GphoneRumor mill’s on full churn with speculation about google’s gPhone, so even if you read a bit of tech news, you’ll probably have heard something about it. I personally don’t think that they’re looking to compete with apple’s iPhone. To me, it makes more sense for them to license an open phone to other phone manufacturers to make it a platform they can do mobile and location-based advertising. We’ll see what actually happens.http://www.techcrunch.com/tag/gphone/

Eye-fiThis is something I’ve been waiting for for about 2 years now. It’s an SD card that’s also a wifi card. It enables any camera to be wifi-enabled. So you can take pictures and have it be uploaded to the web at the same time. This sort of a thing is a boon to Mobtropolis, as it lowers the barrier between taking a picture and sharing the photo. Hopefully, people will stop taking pictures of the same group pose with all different cameras soon.http://www.eye.fi/

Mozilla PrismPrism is still experimental, but both mozilla and adobe are thinking of taking the web experience and putting it back onto the desktop. Prism is mozilla’s Thus, every web application will seem like a native application, regardless of whether you’re actually connected or not. Thus, you can browse your mail or feed reader even if you’re not connected. In addition, desktop apps can take advantage of local hardware acceleration for graphics. This seems similar in concept to Java’s Web Start, except it’s built on top of web technologies. While nothing’s for sure, all the stars seem pointed in this direction. Thus, web developers might start moving on desktop developer’s territory in the near future.http://labs.mozilla.com/2007/10/prism/

Evidence Based SchedulingJoel came out with this article a couple days ago. I thought it was pretty neat and obvious (in hindsight). He comes up with a way to estimate shipping dates of software with a specific probability. He adapts a version of Monte Carlo in order to do it, and while I don’t know if it works as well as it claims in practice, I assume that Joel eats his own dog food, and it seems to make sense. If you’re interested in software scheduling, defn give it a read. http://www.joelonsoftware.com/items/2007/10/26.html

The 4 boneheaded biases of votersAs some of you know, I’m pretty interested in decentralized systems–especially since Mobtropolis will have social problems at larger scales if I don’t pay attention to them. Capitalist economies and voting systems being two examples. This is an article I found detailing the biases that people have about large-scale decentralized systems–specifically the economy. It’s an interesting read.http://reason.com/news/show/122019.html State Machine CompilerRagel generates state machines for you. I found this to be interesting because I was wondering about how to do minimal aspect orientated programming without a full-fledges AOP system in place. http://www.cs.queensu.ca/home/thurston/ragel/

Nerd time is just a short mailing list I put out to my ex-coworkers at APL. They’re in the applied engineering research fields, so what’s going on in the web world isn’t well known to them in their daily work, so I fill them in from time to time. If you regularly read techcrunch, proggit, or slashdot, I’m sure you’ve seen these before.

—Hey all,

I was going to make this one about new services I use that might not be well known, since there’s nothing terribly interesting going on lately. But after a month of haphazardly collecting interesting things, no particular pattern appeared. Just a hodgepodge of things I found interesting. There’s nothing terribly hard this time. All easy reading, except for the one on APL at the end.

Take screenshots to measure your productivity.This is something Ian’s been asking for, and I thought he’d like to check it out. No Linux client yet though.http://www.rescuetime.com

Prof. Randy Pausch’s Last LectureThis is a CMU prof that is dying of cancer, and he gives a last lecture. You can skip all the intros and extros, as the actual lecture is about an hour. It’s pretty good, and entertaining. I found his lecture of time management to be pretty helpful.http://video.google.com/videoplay?docid=-5700431505846055184

Voice tracking cameraThis is one of those “simple” things that you wish you did. Theoretically, it’s pretty easy. You use microphones to do triangulation, to figure out where the voice is coming from. But when you see his setup, he uses seven all around the room–so it might be a bit complicated. It’s a long way from our own two ears.http://www.youtube.com/watch?v=rrOy6LpL940

Commenting enginesCommenting is one of those fundamental aspects of web interaction that gets implemented over and over again, in wikis, in forums, in social apps, in blogs. But with commenting comes a host of problems. Some technical such as spam bots, cross referencing them, keeping the most relevant ones. Some social, such as trolls, scaling a conversation, etc. These two implement that for you, and commenting becomes just a widget. Not a bad idea, especially if they can thread conversationsacross different blogs.http://cocomment.comhttp://www.disqus.com/

Build your own carI’ve always wanted a hackable Linux based car. Everything from the onboard entertainment system to the safety system. While this isn’t it, it’s a step closer. I think they’ll ship you all the parts you need to build your own car.http://www.grabercars.com/content/view/80/2/

Dopplr is a service way to tell your friends, “hey, I’m going to [town], who’s already there, let’s hang out, or I need a place to crash” sort of thing. It’s a social network focused on travelers. I’ve often was somewhere, and found out a friend was there at the same time too, but we didn’t know. It’s still in private beta.http://www.dopplr.com

Mozilla Lab’s social network in a browser.This is an experimental add-on from mozilla that tells you want your friends are doing online. It’s like the news feed in facebook. So any time anyone posts a link, updates their status, etc. you’ll see it. And sending links to people is easy. You just drag it to their photo in the side bar. So instead of me sending nerd time over email,I might as well blog it or use something like “The Coop”http://wiki.mozilla.org/Labs/The_Coop

OAuth is Open Authentication.I think I posted something about OpenID way back. OpenID is an open way of having uses verify to you they are who they say they are. That way, you don’t have to have a separate login/pass everytime you want to use a new service. OAuth is a way for users to grant permission to a new service for their API. So if you signed up for mobtropolis, and your social network is elsewhere, you’d use OAuth to authorizeMobtropolis to look up your friends.http://oauth.net/about/

Forth is a stack based programming language. I don’t know as much as I should about it, but it’s mind-expanding. The language lacked conditional branching and loops. But apparently, that’s because you can write your own, not to mention any other weird control structures you can think of. In fact, you can write your own Forth based-PC, its environment, OS, and language in about 2000 lines of code (it is said)http://weblog.raganwald.com/2007/10/until-you-understand-how-forth-is.html

APL — the languageI heard of this language, but never managed to see any code. I can see why. You need a whole other keyboard to program in it. But it is pretty neat. You can write Conway’s Game of Life in one line. I expect this is because it maps well to functions. Neat idea.http://catpad.net/michael/apl/

About me

I'm a entrepreneur and programmer currently working on Cubehero, collaboration software for 3D printable projects. I'm available for freelancing or consulting about the growing 3D printing market.