Wednesday, July 12, 2006

Online communities were never meant to supplant real life

At least with this article, it sounds like she really uses these services as opposed to someone that just heard about them and rags on it without ever really trying it out.

Online communities were never meant to supplant ones in your in-person life. It just adds another dimension to it. Sure, you'll get people that go overboard and cut off their in-person relationships, but they're the outliers. For certain types of interaction you'll probably find that most people would prefer face to face interactions. These types of interactions include friends that you already know and for finding mates. It's for that reason that friends still get together when they're in town and that people on match.com still meet first before committing.

For other types of interactions, like Brad Pitt fan club forums, World of warcraft (online game), and scientific google groups, your only interest in the other people is only within the confines of those contexts. And while that's what I imagine rubs people like the author of the NYTimes article the wrong way (having a cafeteria tray attitude to getting to know people). The people we interact with no longer has to fill every aspect of our social needs. It is acceptable now to have friends you only hang out with, friends you only tell secrets to, and friends you only go on naked streaking parties with. The same goes with people you interact with online.

Cars and suburbs have probably done more to keep people apart from each other than the internet has. Think about it. You use to have to walk to the local store, passing people in your neighborhood that you knew along the way. Now, you just drive on the highway. Suburbs rarely have sidewalks, and things are further apart, so people use their cars to drive, and not interact with each other.

And even if there were people around, you wouldn't necessarily want to talk to them. Out of all the times you've ridden the subway, when was the last time you struck up a conversation with a stranger sitting next to you? I'd venture to say, very few. Now if you lived on the West Coast (except LA)...maybe things would be different.

In addition, I've often discovered that some people didn't keep friends in a certain part of their life because, "We just hung out together, and did stuff. We didn't really get to know each other." Just because a relationship is face to face doesn't mean that you will have a deeper connection with each other. No matter what the medium, it takes effort on both sides. Besides, just because there are people around doesn't mean you're not lonely. I had always taken Nighthawks to illustrate that, and Edward Hopper was way before the internet.

Presence doesn't have to be physical anymore. It can be across different spaces, and even asynchronously across different times. While these forms of communications like cell, IM, email, blogs, wikis, forums, VoIP, etc are just facsimilies of face to face interactions, they're good enough for what we need to get done or enjoy just a snippet of each other. Between friends that can't meet face to face all the time, it's better than nothing.

And some forms of communication and interaction, while more limited to face to face, actually are beneficial in other ways. There'd be no way you'd be able to produce an encyclopedia from a room full of hundreds of people, as you do with Wikipedia. Online forums leave a trail of solutions to questions and problems others have encountered. I can't tell you how many times I've gotten help with configuring my linux box or rails when I've hit upon a wall from the dregs of people helping each other.

The current body of social network web applications, however, do have a problem. While novel at first, you quickly realize that they don't actually DO anything. If it helped people connect to not only their friends, but also connected you to like-minded strangers, or MOVED people to action, then that would really be something. But the current incarnation of social networks have much to be desired. Like all revolutions, it always takes a bit of tweaking, yet it's not going away. Developers are experimenting with other types of social networks, such as the recent Twttr and Dodgeball.

Online communications are here to stay, and like all things, it's good in moderation. No matter the medium, it takes effort and attention from both parties. It's the dual act of giving and receiving that makes a relationship between humans worthwhile. Online communications only provide the conduit, even if it's a facsimilie of real life. But it's up to you to do the rest and fill it up with meaningful content.

Introduction to Bindings in Ruby

When it comes to programming languages, software developers really are zealots--everyone has their favorites. Like Paul Graham says about himself, you shouldn't just listen to a person just because they have notoriety. But I think his article about how some programming languages are more powerful than others is convincing (can't find the link right now).

What I liked about Ruby over Java or C++ most are the different types of programming ideas that I've had to wrap my head around. Just yesterday, I was looking at Ruby's ERB (Embedded RuBy) library. It executes ruby embedded in text (plain text or html). Most commonly, Rails uses ERB as a way to translate view templates into html to be displayed to the browser.

I had the problem of trying to render templates outside of controllers, which was why I was looking at ERB. I couldn't get the ERB to read the variables I had defined in the function. I mean...that's the way it worked in the controllers!

@title = "The web and all that jazz"
template = "<html><body><%= @title %></body></html>"
erb = ERB.new(template)
html = erb.result

It didn't take. It ends up that you'd have to pass ERB the current binding as well, because it assumes TOPLEVEL_BINDING. I think ERB uses eval() heavily, which in turn uses binding.

html = erb.result(binding)

binding() is a kernel method that returns the binding--essentially the scope which code is being executed. Not only that, binding() returns the binding as an object, so you can store it for future use, and even pass it around. That means that you can request the scope of a block of code (the variables that are available to it) at that time in execution, and use it at another time, when that scope might have already expired.

So in the erb example, result() was assuming scope at the very top level of the application, rather than the local scope. And that's why it couldn't find @title.

I only found one extensive article on binding. It has great examples on binding.

Being able to pass around bindings seems odd to me. It's like being able to pass scope around, and I wonder if it violates encapsulation...or maybe it's ok to violate it once in a while? But then again, I remembered that closures and blocks in ruby also have bindings. The scope in which a block is define is remembered, and can be passed around; and it's part of their power. So every time you do an array each() and pass it a block, you're passing around bindings as well. It's so much easier than messing around with function pointers.

Saturday, July 08, 2006

BlogShares - Fantasy Blog Share Market

I knew that people trade all sorts of stuff besides stocks. Fantasy Sports is a form of trading...you make educated guesses based on how well you think the players are going to do. And if you think the player's not going to do well in the future, you try to trade it for someone else that another player is willing to part with.

People also trade weather! So it seemed brilliant to me when I saw Blogshares, a place where you do can fantasy trading on blogs.

It seems like any complex system on the edge of chaos are systems that people like to trade. Because if something was completely predictable, it would be trivial. Everyone would know which the best pieces were, and wouldn't want to trade once they had it. If it was a system that was completely random, I argue that people wouldn't trade either, because the only heuristic that would work with minimal effort is to choose and trade randomly. I'm not sure why, but it's my experience that people don't like that, especially if something's at stake.

Wednesday, July 05, 2006

Cellophane as a cheap skin

This article from ZDNet via Smart Mobs talks about how cellophane is a pizoelectric. Pizos are materials that can bend if an electric field is applied to them.

Pizos are important as both sensors and actuators. If you apply an electric field to pizos, they bend, and hence they are actuators. If you bend a pizo, it should generate an electric field.

To make a pizo with cellophane and a thin layer of gold is a pretty shocking development, because they are cheap materials (a thin layer of gold is not too pricey). It opens up the door to lightweight and cheap pizos.

Rollable keyboards are now possible to be cheaper to make, in addition to surface skin tables for user interactive screens. Wouldn't it be possible to use something of the equivalent of Surface Acoustic Waves, to detect where something was touched?

Friday, June 30, 2006

Voting and the tyranny of the masses

College startup askes:

What if the New York Times let users vote on stories on their webpage the way Digg lets users vote? Wouldn’t it be more interesting to visit the website and see what real people found interesting? Wouldn’t that help the editors figure out which authors were most interesting to the public?


The internet has changed a lot in just the last two years. Despite social pundits predictions of saying that the internet separates people, we find that more and more internet applications are social, and brings them together in different ways. There isn't just IRC, homepages, newsgroups, forums, and eBay anymore; but now there are blogs, digg, and del.icio.us.

And where we find ourselves right now are social web applications--things that connect people to each other through some medium. I too am excited by the democratization of mediums, such as keyword tagging in flickr and del.icio.us, and the voting by members of digg. It allows fridges and innovations not normally seen in mainstream to rise meteorically to the attention of the masses.

The concept of decentralized thinking is alluring in that it is the anti-thesis of traditional centralized mediums, such as radio and TV. Also, it allows the individual more power, especially individuals on the outside of established paths.

The current political climate also allows such decentralizations, as opposed to the red-scare in America 40 some odd years ago.

However, despite the good movement towards democratization (used in the sense of giving more power to individuals not in established institutions), I don't believe it's applicable to all mediums.

There's a reason why the American founding fathers did NOT make a democracy; rather they deliberately made a republic. The distinction is that it respects the rights of minorities, and hence the existance of the electoral college.

Currently, Digg is a direct democracy--a dictatorship of the majority. While this is good for any type of fringe news, I don't think it is good for the type of news that the New York Times intends to deliver, which is informative in the public interest.

If the New York Times gave a direct democracy for all its news, then only the "fun" and "quirky" stories will rise to the top. You'd probably see more stories about Hollywood than about police corruption in the city.

There would need to be some type of segmentation for categories, so you can see the most voted for a particular category. Or, there would be a need for some type of electoral college for the New York Times.

Decentralization of new mediums is exciting and enables new things to happen, new innovations, and new ways to communicate. However, it would be a mistake to think that the new transplants everything old. The old is sometimes that way through intent, not by limitations.

Try Ruby in Second Life

Secondlife really amazes me more in the fact that the company had enough foresight to make secondlife a platform more than it is just a playground or game. The fact that you can try out ruby in-game is pretty amazing to me, and should draw more builders (developers) into the game. I should really try it out (been meaning to since college) to see what it's all about.

Oh, here we go. Teach your avatar Ruby and double the population of Rubyists at once. If you want to toy with it, contact Jesse Malthus.


I wish ther were more companies that would provide new platforms for developers to create on. The traditional car and home industries has been really slow on the uptake with this one.

Tuesday, June 27, 2006

Internet pizza ordering should make sense like everything else

My roommates and I ordered pizza over the web yesterday, just to try it out. It was not as easy as calling yet. Besides not being able to find a couple links as to how to pick up instead of deliver, there were two things that struck out at me.

One, when selecting toppings, the interface was a pulldown menu. If this was in beta, I'd forgive it. But I don't think they're going to improve on it any time soon. What they should have used was an ajax "shopping cart" where you can drag and drop. But instead of "items and cart", you'd call it "toppings and dough".

That interface would make much more sense.

Second, there was no time estimate as to when the pizza would be done. Even if it said in hardcoded text, "about 45 minutes", it would be better than nothing. But ideally, it would be able to communicate back and forth to the pizza place's oven, to know approximately how much time is left in making the pizza.

Monday, June 26, 2006

Basic concepts goes a long way with SVN

bash$ svn commit . -m "delete feed_tool tests"
Authentication realm: xxxxxx.com
Password for 'xxx':
Sending .
svn: Commit failed (details follow):
svn: Your file or directory '' is probably out-of-date
svn:
The version resource does not correspond to the resource within the transaction. Either the requested version resource is out of date (needs to be updated), orthe requested version resource is newer than the transaction root (restart the commit).

I was wondering why it wasn't committing, and honestly, it's pretty easy once you figure out what subversion's concept is...and I for one, had never read it.

Simply update your version with

svn update

And it should work. The version that the repository had just wasn't the version you had.

Friday, June 23, 2006

protect?() doesn't work for salted login generator

For rail's salted login generator, the protect?() method didn't work for me. So for those of you that can't get it to work, instead of messing around with it, use the other syntax instead.
before_filter :login_required, :except => ["login", "logout", "signup", "index",
"welcome", "change_password", "forgot_password"]

Friday, June 16, 2006

Medallia Blog: SmackBook Pro Archives

Medallia Blog: SmackBook Pro Archives

This is pretty cool. The guy took the accelerometer in hard drives and used it as a sensor to detect slaps on the laptop. Then, he hooked it up to a desktop manager so that he can change virtual desktops by slapping his laptop on the left or on the right.



This is pretty cool by the sheer fact that he combined things that weren't meant to be used together for something novel. And most of all, the user interface MAKES SENSE.

I too want the capability, but I'd have to build my own accelerometer from the USB drive. Do you think people will want them?

Thursday, June 08, 2006

Wired News: A Sixth Sense for a Wired World

Wired had an article on added a magnetic sense to your touch. It's interesting to see another way to add senses that isn't technologically prohibitive. However, getting surgery done, however small, for it is a little insane. I can't imagine a knife to my finger tips. That's gotta hurt.

It reminds me of the article in BBC that I read about using the tongue as an interface conduit for spatial information. They fed sonar information to a tongue actuator so that people can find their way through a maze with sonar information. It's actually kinda neat, though it's still in its preliminary phases.

I wonder if remote-sensing and remote-controlling augmentations of humans would combine as tools for specialized human workers.

I'm sure the military is interested in something like this, though I can imagine it being a fad or fashion.

Friday, June 02, 2006

Second Life and breaking out of the mold

Second Life - Wikipedia, the free encyclopedia

Second life is a MMORPG that's not so much focused on killing and owning, but creating and interacting with others and the environment created by others.

One of the things that was surprising to me was that people seemingly easily scripted complex behaviors into the objects that existed in the second life world. I had often thought that it would be neat to incorporate that into an MMORPG so that people can be blacksmiths or at least spellcrafters.

However, I would wonder if it was possible for people to use the in-game programming language to invoke computation and behaviors on the machine that's running the virtual world.

In every sense, it is very much like asking how secure is a virtual machine running virtual code on a machine? Is there a branch of computer science that studies this?

Thursday, June 01, 2006

Designing Flash mobs

Joi Ito's Web: Leadership in World of Warcraft

I had talked earlier about a new medium that intermixes reality and the internet.

What concerned me was the level of organization that was needed in order to 'get stuff done'. Even if you did get a bunch of people somewhere, would they be able to accomplish tasks without an inherent hierarchical organization, like most of our governments and companies?

Sure, a bunch of people can point to a rug, or stage pillow fights, but would they be able to fix a house or clean up the neighborhood?

I understand that not all complex behavior of a bunch of people necessarily need a 'leader'. Systems can be emergent in order to accomplish complex tasks. Ants and termites can build complex structures and societies with solely local interactions, rather than top-down hierarchical. But can these systems do everything a hierarchical system can do? And if so, how would you design them so that they evolve themselves?

Has any one done studies on how to design mob systems so that they can do things that companies can do? Are there ways to structure an organization so that people can be thrown together and something comes out of it?

It was that question that lead me to wonder how raids and groups work in the World of Warcraft. It was no coincidence that this article on leaderships in WoW got me thinking about it. According to the description, however, even the raids and groups there are hierarchical, and require quite a bit of planning and leadership.

Perhaps a little mix of both would be effective for flash mob organizations that want to be functional.

Before they can be designed or evolved, there needs to be a measure of how well a organization can accomplish a task, and a way to parameterize different characteristics of the organization. Then you can start exploring that parameter space to see which areas in this parameter space will be best at handling certain types of tasks at the system level.

UK firm to unveil wall-socket PC - ZDNet UK News

UK firm to unveil wall-socket PC - ZDNet UK News

The Jack PC would almost be considered by some to be embedded hardware, though it seems to be a fairly full fledged PC. Unused computation cycles will be more ubiqutous. Now, if only those cycles could be used for something...

A new medium for first adopters.

But back to the point: a long time ago I used to write online to a ton (like 30) of faceless, nameless people who used to laugh and possibly email me about how funny they thought it was. I was just goofing off, I wasn't too concerned about offending anyone if I could make something funny.
I think a lot of first adopters really rallied around blogs. It was like a second home to people. Everyone likes to have communities and places where everyone is respectful, interesting, and "where everyone knows your name." It was kinda like your own secret special place, and a twinge of 'coolness' because it was esoteric.

But inevitably, once a community gets so popular that there becomes an influx of newbies that have no respect for the painstaking community and culture for the medium that had built up over time. The general disrespectfulness of these newbies ends up chasing away the very people that made it special in the first place. Same thing happened on IRC and Usenet that happened in the blogosphere.
Vox is a return to that early time I don't think most people had a chance to experience. The commercialization of blogs has, I think, skewed people's perception of what they can be. To many, if you're not doing 50,000 unique visitors a day you should just throw in the towel, you're a failure. If your funny story about shopping at the Apple store can't be Digg'd or Boingboing'd then what good is it?
I wonder where the next playground of the first adopters will be? Somewhere where they can coalesce, create connections, and encourage each other to dream and to make. Likely, it will be through the introduction of a new media, as demonstrated by historical patterns.

First BBSes, then Usenet, and IRC. Then forums, and then blogs.

What will the new medium be like? I can imagine a couple things (though by no means accurate).

One might be the lowered barrier of making things, something like open source design. People with shared passion of making and creating things will be able to make connections and communicate with each other through making things.

Second might mix the internet and reality, where strangers gather for some cause, whether this cause is deliberate or emergent from the groups' decisions. These decisions might come from people that aren't even there, whose names they don't know.

I'm imagining something like people are able to view the positions of all those that are participating, on a map. Then they're able to vote and come to agree to where to gather, and what the goal is. Then those that are by the site get notified, and can spontaneously partcipate if they wish. Much like flashmobbing, but less deliberate.

Then, the ability for strangers to discuss or exchange what they did might build a community.

However, I can see how something like this could be used for evil, like sending a mob to various sections of streets in guise, where it is meant to block off roads to help a bank robbery or heist.

And yet, it's a neat idea. Emergent cooperation organized by the net that mixes with reality. It's another way for people to interact outside of their defined roles and places in society.

Monday, May 29, 2006

Evolving Design Patterns

I like the idea of cleaning up after yourself as you're coding. I find that I do that more and more, however, I get impatient if I spend most of my time, doing 'cleaning', rather than actual 'cooking'.

There's several tasks that I tend to be doing when I'm coding. Creating, designing, refactoring, debugging, and testing. I probably spend 70% of my time refactoring, debugging, and testing. But this is usually 10% of the fun. Where I find fun is in the creation, but I only get to do that 30% of the time.

Though I feel like refactoring, debugging, and testing (RDT) are necessary for good code, it's like cleaning your room...you have have to develop an OCD pride in having clean code to derive pleasure from it. However, you must always balance it with GETTING STUFF DONE.

It's hard to motivate yourself when nothing's actually being done for too long.

While testing has gotten easier and more automated with unit testing, and dare I say it...fun (to watch it say, you passed!), I feel like there isn't a good handbook yet on evolving design patterns.

Much of the time, I find the design patterns in the GoF book to be overkill. However, you do want to think about the future so you can extend it for flexibility later.

So the language that you're working in should allow the flexibility for you to sketch ideas, and then beef them up with ink later. The problem is, unlike drawing, you don't often know what's the best way to beef things up.

Certain types of solutions to problems have varying degrees of flexibility. For example, if I were to write a lexer/parser, I could just write a big loop line by line with a case statement inside it. But what if there are recursive elements? What about callbacks? There are more flexible architectures of lexers and parsers to handle that. However, no book I've ever seen delves into the topic of how to transform a bare bones lexer/parser into a full fledged lexer/parser.

Therefore, you can take the minimum level of complexity that you need, and be able to refactor it later if you need to.

Andrew Birkett's MethodFinder in Ruby

Found this via RedHanded, but he didn't explain it as well as the original page.

It is a method that lets you find the name of another method given its arguments. Pretty neat what you can do with Ruby.

Sunday, May 28, 2006

Beowulfs @ Home

Lately, I was wondering what to do with the four old computers that are sitting in my parent's basement. I looked online, only found one article from PC mag, and none of them seem very neat or enticing.

It was then that I went back to reading about beowulf clusters, but other than the experience of setting one up, I only have one problem I'd like to solve in parallel, which is the simulation of sexual selection on the genetic algorithm.

But yet, reading about cells yesterday, I'm wondering if it was possible to use parallel computers to take advantage of this dataflow programming paradigm. While I'm doing guesswork here with very little details, at the very least, it seems that one can assign a processor to a number of cells to update within a program. However, it might not be feasible, if the messaging system of cells has a lot of overhead.

This would be something neat to try.

Saturday, May 27, 2006

Rounded corners in CSS

Ahh, yes, the elusive rounded corners in CSS design. A number of people have come up with all sorts of hacks and solutions to rounding corners.

Presented is the 'sliding doors' method, where you segment the window into various divs and put an image in each for a more fluid layout.

However, I feel like ultimately, rendering this is the job of a CSS property and the browser. Isn't there a clipping property in CSS?
div#contents {
clip: rect(10px, 5px, 10px, 5px)
}


Now, I only know of shape being 'rect' in CSS2. Why can't there be other shapes, like, 'round_rect'?

Briefly looking through CSS3 spects on W3C, I didn't see anything at all. Does it make sense or no to implement this in the browser, instead of having CSS designers hack up designs?

PyCells and complex and emergent systems

Through this blog post on "BlueSky" about PyCells, I delved further into this seemingly new (to me) programming paradigm, called Cells, by Kenny Tilton.

It basically takes the concept of a cell in a spreadsheet that get updated automatically to programming where there are a lot of internal data states that are dependent on one another in a chain, or a complex graph of dependencies. Like, the color of a button depends on whether you selected a radio button or not. Or, shut down the motor if the sensor reads above 100 degrees (example given in text).

In only the brief one hour that I've been reading about it, it seems like you make declarative statements about WHAT is chained to what, and the cell system will be able to make deterministic and discrete updates to keeping data internals consistent, so that it eliminates race conditions and deadlocks.

A better explanation of it by a better informed Bill Clementson will help you understand it, in addition to this long explanation of cells by Phillip Eby. While it might sound academic, it's currently under the summer of code 2006 for google, under the python foundation. They're trying to make a port of it from Lisp's CLOS to Python. I wonder if anyone's doing it in Ruby?

However, even if it does really remove deadlocks and race conditions, I imagine other problems will crop up. It seems very analogous to cellular automata, except in this instance, the cells are heterogeneous, and there can be any number of neighbors. I expect that for even simple systems, you can get unintended and complex behavior from them, as most likely, they will be non-linear systems. How can we harness these unintended behaviors to design systems that are more than the sum of its parts? Of all the complex systems literature I've read, they've mostly been descriptive, rather than predictive. I'm not sure how to design emergent systems.

Wednesday, May 24, 2006

How to have multiple Submit Buttons on one form

The Rails Diary | Two Submit Buttons

I was pretty sure that there was someone else out there that might have had the same problems as me when it came to having two submit buttons on one form.

And of course, I found a simple solution.

Tuesday, May 16, 2006

'templates' is a reserved word in Rails

I'm glad I didn't spend too much time stabbing around in the dark on this one. I had a controller/model named 'templates', but there was a weird error that popped up:
undefined method `assign_variables_from_controller' for #
That's because 'templates' is a reserved word in Rails, so you can't use it for your controller name.

Sunday, May 14, 2006

Finite number of pictures

When you think about it, the number of distinguishable photographs is countable. The human vision system has a limited resolution. Nowadays, five megapixels is hardly distinguishable from a four megapixel image. So that means that each picture is about 5 million pixels for a 5 megapixel picture. Human vision is pretty sensitive to color, but it's limited at about 24-bits, or 16,777,216 colors. So there are 5 million * 16.77 million = 8.285x10^13 distinguishable pictures.

That's a lot of pictures, and it's hard to comprehend how big that number is. The vast majority of these pictures would be noisy-like. But when you think about it, every frame that you've ever seen on your TV, every digital photo you've ever seen on flickr, every image you've seen on your monitor have been a subset of these 8.285x10^13 pictures. And yet, you have not seen the vast majority of these pictures. Some of these are pictures of people you know, people you don't know, places that you've never seen, deserts, planets, stars, aliens on their home planets in their vacations, even. Pictures of the imaginary, of dreams, of the impossible.

Monday, May 08, 2006

Mozilla Sunbird bug, fixed in 12 minutes

My roommate submitted a bug into mozilla's calendaring application, sunbird today, and got the bug fixed in 12 minutes. That's pretty amazing. The fixer asked for a bug trace, and it was as my roommate was submitting it, so he got it in three seconds. That's even more amazing. :)

render_component different from link_to options

This one got me stuck for about an hour. I couldn't figure out why this wasn't calling the method of the component, but it was rendering the view of the component.

render_component :controller => "poll", :action => :show, :id => @event.poll

It ends up that this would be all fine and dandy if it was a call to link_to() rather than render_component even though the nature of the parameters is practically the same. So for render_component(), it should be:

render_component :controller => "poll", :action => "show", :id => @event.poll.id

it needs strings instead of symbols for :action, and it doesn't convert an ActiveRecord object to its id--it needs to be explicitly stated.

No mo' asserting flash in rails

Flash messages in Rails 1.1.2 doesn't seem to work in tests anymore.

I use to have some asserts in the test that go:

assert flash.has_key?(:error), "Flash doesn't have an error message"

But now, flash gets erased before returned to the test. I'm guessing they added an extra stage on top of the method being tested, so it gets cleared before execution gets back to the test.

So, no more testing flash in rails!

Sunday, May 07, 2006

The problem with making things

The problem with making things is that:

The dreamer has the creative idea, but doesn't understand the theoretical principles to make it plausible. Nor do they care as much as they should.

The scientists understand the theoretical principles, but don't understand proper software architecture to retain it in the long run. Nor do they care as much as they should.

The programmers design functional and architectually maintainable software, but can't design a usable interface for everyday people. Nor do they care as much as they should.

The designers design an aesthetically pleasing interface, but they are not the ones that are going to be using it everyday. Nor do they care as much as they should.

The users of the product just want to accomplish their task at hand, but can't stop purchasing things that are hard to use. Nor do they care as much as they should.

The making of everyday objects has become specializations of specializations. Each aspect and stage of a product's birth requires specialized knowledges that are quite discreet from another. However, I still think that one should learn a bit about the process before and after:

Physists should learn good programming and creative imagination.
Programmers should learn complex math and usability design.
Designers should learn good programming and actually use their products.

Tuesday, May 02, 2006

Slingfeed 1.0 beta

Announcing Slingfeed(http://www.slingfeed.com) from 3cglabs. It's something we've been working on that allows you to read blogs and news from feeds all in one place, and you can 'sling' interesting articles to your friends. If you sign up and add my gmail address as a friend, I can sling you interesting articles that I read on my feeds.

Sunday, April 30, 2006

Yay for first link!

Deakialli DocuMental: "Por fin me he enterado del porqu�de las 43 cosas, y no 50, 100 o 1000."

Awesome! I got linked to. It's always cool to remember your firsts. This blog had me on a list of links about a post I wrote about the significance of the number 43. I signed up for technorati, and it's kinda cool. I knew about it before as a search engine, but never really as something that promoted your blog. I should have done it earlier.

Tuesday, April 25, 2006

Leaky Databases

In the programming world, programmers use to have to manage memory. When a programmer created an object in memory, he had to remember to destroy it. If the object was never deleted and the programmer lost the reference to the object, the memory location is effectively unusable for the life of the application. This is because the application can never allocate new objects in that location since it thinks it's already allocated, and the programmer cannot free that memory location because he lost the reference to the object.

Nowadays, there are high level languages that have a garbage collector--basically another running process that detects whether the application is using a particular part of memory or not, and deletes it. (Exception is that Lisp has been around since the 60's and had a garbage collector)

In databases, records in tables refer to other records in other tables. However, due to a misbehaving application, I can see a possibility for these references to be lost or overwritten. Also, common practice in databases is to mark something as deleted, but don't actually delete it.
Thus, you're left with records in the database that might not have any use whatsoever, but is still taking up space.

This is like a "database leak", analogous to a "memory leak." But to my knowledge, no one seems particularly concerned about it. This is probably because hard drive space is cheap and plentiful.

However, I expect that we'll eventually see embedded servers, where even small devices like your cell phone or your microwave can serve up web pages. The storage requirements for these platforms might require a more frugal management of database resources.

Anyone know of database garbage collectors?

Wednesday, April 19, 2006

Firefox has much to fear.

What I say might sound like blasphemy, but I've been pretty dissatisfied with Firefox with their last two releases. Ever since version 1.5, I've had to contend with a massive memory leak, and now, Firefox seems to freeze more often. While the memory leak could be solved with some quick hacks, Firefox seems less stable than it use to be.

I think the pundits are premature in saying that Firefox is an IE killer. If the developers of Firefox don't focus on basic stability and memory leaks so that their application is at least RUNNABLE, instead of just adding features, there's no doubt in my mind that Microsoft will pull through with their IE.

Microsoft has survived this long, mostly because they've made less stupid mistakes and never underestimated the competition.

Tuesday, April 18, 2006

Having something to touch

Despite all things that virtual provides, people still like the concrete, something to touch. Kinkos should offer a service that allows users to publish their blogs via dead-tree format.

I think with the advent of new materials that can change their shape and texture with electronic signals, it'll usher in an age of computing where you can make the virtual quite real and disposable.

Imagine a material that you can alter the shape of through electronic signals. Then, you can change the shape to a spoon, and then later change it to a fork--you can even change it to be a back scratcher. Although that's a very contrived and useless example, it illustrates reuse of physical objects in different functions, and even in different contexts.

Sunday, April 09, 2006

The Tube: Revolutionizing material transport

Wished everything just came and went from your house? Well, this post is about using a single real-life physical delivery system using a network of tubes. Think of the "Sucky" tubes in the movie, "Elf" that delivers post, sewage, water, etc.

If it really can be implemented, then it could be a fairly neat system. Especially potentials in online shopping--the warehouse would send your order automagically (not that it doesn't now).

But in order for this to be effective and "real-time", as the guy is imagining, very very difficult problems need to be solved, namely, how to route real things.

His comparison to IP is only half right. In IP, if there is contention at a router, packets are simply dropped. But you can cannot do that with post, water, and sewage. You'd have to develop some type of mechanical router. Not to be a naysayer, but the current delivery systems are 'good enough' and the barrier would be too high for something like this to see the light, unless there was a specialized niche problem that this system solved in the future.

Friday, March 24, 2006

Face tracking

I was really surprised when I saw this video of Logitech's Orbit MP webcam. It's about $100, and it has impressive face tracking algorithm. I knew that people were making headway in face tracking algorithms, but I didn't think it was this good.

There are now open source tool kits for augmented reality. However, they use a template black and white pattern as a reference platform. It is definitely possible to use people's faces as a tracking platform. Then, you can put statuses above people's heads, like their names. Or in a augmented reality game, their "hit points".

Friday, March 17, 2006

Incorrect predictions

One thing that really gets on my nerves is when people are dismissive.
"The wireless music box has no imaginable commercial value. Who would pay for a message sent to no one in particular?" -- Associates of David Sarnoff responding to the latter's call for investment in the radio in 1921.
Hindsight makes these predictions seems ridiculous, especially when taken out of context of the times and what was known as "common sense" or "what any educated person would know." Unfortunately, people have only have their own experiences and expertise to draw upon. The model and framework by which we can evaluate and make sense of something new is by what we know.
"Heavier-than-air flying machines are impossible." -- Lord Kelvin, British mathematician and physicist, president of the British Royal Society, 1895.
"X-rays will prove to be a hoax." -- Lord Kelvin, President of the Royal Society, 1883.
"There is nothing new to be discovered in physics now; All that remains is more and more precise measurement." -- Lord Kelvin, speaking to the British Association for the Advancement of Science, 1900.
"Radio has no future." -- Lord Kelvin, Scottish mathematician and physicist, former president of the Royal Society, 1897.
Lord Kelvin was a major contributor to physics and engineering. I mean, he has a unit of temperature named after him. It's just that he operated on the framework that he knew of. It's very very hard to jump out of what you know and start all over. But some people just don't event try.

"

Tuesday, March 14, 2006

Sketchup redos what's old

It seems like much of the time, when something old is well done already, someone comes along and makes it new. Sketchup, at a preliminary glance is what one would use instead of CAD. It allows you to build and create 3D objects fairly easily and intuitively, as if you were manipulating it in space with your hands.

It recently got aquired by Google. So speculation is amok as to what this means for Google's overall strategy. Personally, I think Google is big enough, like Microsoft, and Sun, to have their hands in everything. However, they seem to have a better track record than Sun so far when it comes to making their products work well as a thematic and cohesive whole.

The previous aquisitions that haven't yet made a showing on Googles' product lists are the things related to real-world computing. Things such as mobile socialization and traffic information haven't yet surfaced. In addition, a friend of mine was approached by Google for a job in haptics (force feedback in robotic surgery). When looking at their job listings briefly, they do also invest in bioengineering and chemical fields.

What will Google use SketchUp for? No one knows. But I know this: that the easier people can create information--whether it's written word, images, sounds, etc--the more that type of information is going to proliferate. If it's really easy to post entries to a blog, many blogs will spring up. If it's really easy to take photos, many photo sharing sites will spring up. If it's really easy to make 3D objects with SketchUp, the more object manufacturing sites will spring up. Thus positioned, Google can continue to offer services which filter and organize that information; and that will contribute to this advertising revenue. But now, it seems to be in the position to also encourage people to create that information.

Monday, March 13, 2006

Phone form factor

I'd been saying for two years now that phones should have its buttons up top and the screen below it, since most people cradle their phones in their palms. In order to type on a phone like the RAZR, you'd need to balance it in with your fingertips.

Finally, Wildseed has the first phone I've seen with this form factor. Admittingly, it looks a little bit odd, since it looks like it was bent quizzingly. But it should fit better from a usability point of view. Form over function!

Sunday, March 12, 2006

T-Mobile Free Wi-Fi Weekends, Awareness

T-Mobile Free Wi-Fi Weekends, Awareness

Free Wi-Fi for tmobile users on the weekends!

Friday, March 10, 2006

Matrix Photos in an Ikea Kitchen

IKEA | DREAM KITCHENS FOR EVERYONE is a flash site that uses Matrix-like action shots to introduce all angles of a kitchen to would-be buyers.

Not that I'm particularly interested in kitchens, but it does get me thinking about 3D photos. I think the way IKEA flash designers did it was that they had a studio with two or three dozen cameras set up in a semi-circle. And then they took an action shot all at once. Then, they use flash to stitch together the pictures so that it would look like you're traversing in space, while time is frozen.

I remember my dad buying a 4 lens camera a long time ago. If I'm not mistaken, it's a crude plenoptic camera. A real plenoptic camera has one lens, and has a microarray of lenses. Anyway, my dad's camera took four photographs at once, so that when you go to develop it, you can get an actual sense of depth in the pictures. Or rather, it looked like people cut 4 layers of photos together, and put it in a hologram of sorts. The film was expensive to develop, and I think we only had a couple developed.

However, with digital technology, I think it is wholly possible with just one lens. Given that a lens can change focus fast enough, you can generate images that have different depth images. I haven't read his paper, but that's what Ren Ng's Light Field Array camera seems to do. It can focus on different planes, AFTER you take the picture. There's also Ramesh Raskar's Line drawing camera. It uses four flashes and uses the shadows in the flashes to create line drawings and videos.

However, unlike matrix photos, there's seems to be no information captured by a CCD array about the backside of an object when you take a picture of it.

And yet, I wonder. The reason why we can see anything at all is because light is reflected off that object. Sometimes, light bounces off multiple objects before it reaches our eyes. And yet, we only have information about the last object that the light bounced off of. I don't know enough about optics (maybe it's time to learn), but could it be possible that the light that reaches our eyes/camera still has information about all objects it has bounced off of? Unless the object is a mirror, light will scatter off of the object, so we will probably get partial information. However, if we were able to collect a bunch of partial information from different sources, it might be possible to piece together the partial information for a cohesive picture of the backside of an object, not unlike how network coding pieces packets together at the sink.

So if light still carried information about an object after the object has scattered it, and if we can detect it, I'm guessing it's possible to take matrix photos from a single vantage point.

Monday, March 06, 2006

Internet Appliances

Interaction Ivrea: Gallery: Fluidtime

I've long thought that Laundry machines should be the first appliances to use the internet. I always forget that I have my clothes in the wash, and that I need to move them into the dryer. This was especially the case with living in the dorms. I wished my laundry machine would text message me when things were done. Now, I hear that there are people doing this (yay!), and that some college dorms have it.

What are some of the other things in the house that would be more useful with an internet connection? A toliet paper dispenser with an RSS feed and a toaster that can toast the weather on your bread are some that come to mind. If it moves in that direction, I imagine that either devices will get far too complicated, or that the design and use of everyday things will reign in the rampant featuritis that afficts those that make consumer electronics.

There are a couple things that have to happen before something like this is a reality. Home network is already cheap, but ethernet wiring in the house is not yet ubiquitous. Thanks to wireless routers, however, this will be a possibility, but will also raise the cost of these appliances.

Personal devices, such as cell phones, will have to have the ability to easily share meta information about its owner to these appliances. This will make it much more appealing for users to use internet appliances...it will be catered towards them.

Between perfection and performance

The psychology of learning:
"The people in the category perfection-oriented have a natural intellectual curiosity. They are constantly searching for better ways of doing things, new methods, new tools. They search for perfection, but they take pleasure in the search itself, knowing perfectly well that perfection can not be accomplished. To the people in this category, failure is a normal part of the strive for perfection. In fact, failure gives a deeper understanding of why a particular path was unsuccessful, making it possible to avoid similar paths in the future.
The people in the category performance-oriented on the contrary, do not at all strive for perfection. Instead they have a need to achieve performance immediately. Such performance leaves no time for intellectual curiosity. Instead, techniques already known to them must be applied to solve problems. To these people, failure is a disaster whose sole feature is to harm instant performance." [emphasis mine]
I have to admit, though I'd like to think that I'm the former, I recognize that, in my work, I am mostly the latter. I like building things because I like to see them work, rather than the procedure that gets me there. So when things aren't working, I'll get frustrated debugging, and just start stabbing randomly in the dark. Then a couple hours later, I'll figure it out, and proclaim that someone should "give me back my youth."

I've been trying to change my programming habits so that it's the former. I once lamented to IXM that I'm taking too much time getting going; to which he quipped, "Well, it's the learning curve. As long as you're learning something, it's ok." Rarely do people say something that make me feel better, but this one made sense.

However, there's another side to this. Sometimes, I will be the perfectionist, and go to degrees that I shouldn't, because the aspect of the work that I'm being a perfectionist at doesn't really matter in the visible short or long term. It only bothered me aesthetically. In this case, I have to remind myself to move on, or else I'll be shaving yaks soon.

Sunday, March 05, 2006

I made a table.


So this past week, I built a table, so I can solder on it. I thought about buying a $80 workbench, which would have been really nice, but I thought I could:
  1. Learn a little bit about furniture making.
  2. Learn the value of tables.
  3. Have the oppurtunity to make something.
  4. Try to save some money.
A table should be simple to build, right? What's the minimal traits of a table? This was was easy: A board with at least three legs. Of course, nothing is ever as simple as it looks, as the devil is always in the details. Since I was limited in my tool set--mostly hand tools, I had to make it as simple as possible. I went to Home Depot, and found out that they have pre-cut panels of wood. I chose a 2' x 4' x 0.75' pine/particle board for $15, built legs out of 2" x 2" x 28" of wood, and some top plates for $2.

The table is a little shaky, since I used my eye to judge the drilling of the hole for the metal dowels. But I think I can remedy that with some reinforcement. All in all, the raw materials only cost me under $30, and I'm pretty satisfied with it--as far as a soldering table goes. I had to spend more money to buy epoxy, a hacksaw, sandpaper, and two clamps, but I tend to think of it as and investment for future tool use. I already had a desk lamp, and a power strip, so you can see that I attached them to my table in the picture above. This is all I need for now, so there's no use to making it until I really need it.

I think it's important to take time to make your workspace comfortable and condusive to how you work. I tend to like everything all around me in a swivel chair, so I've built my office around that premise. I feel like too many people don't spend enough time thinking about how their workspace should be so that it can induce good work efficiency. So now, my workspace is more comfortable, and I have another place to work. Eventually, I'll have to get a real workbench with drawers and shelving. But for now, this will do. :)

Wednesday, March 01, 2006

Quantum-like effects on the Web

The article talks about how search engines affect the type of information that's out.
Google, for example, says its mission is "to organize the world's information and make it universally accessible and useful." The way that's written, one thinks perhaps of a satellite orbiting high above the earth, capturing all its information but interfering with nothing.

In fact, search engines are more like a TV camera crew let loose in the middle of a crowd of rowdy fans after a game. Seeing the camera, everyone acts boorishly and jostles to get in front. The act of observing something changes it.

Joel on Software had written a similar article four years ago about trying to manage software...by measuring it, you'll change it. In both cases, the change comes about if there is feedback, or meta-data available to the subjects. If the subjects know what the observations are, and how the observations will affect them, they will change their behavior. It is much like quantum particles on the surface; their behavior changes when they get observed in the two slit experiment.

I seem to remember a similar effect in psychology experiements, but I don't remember the name. In medicine, it's the well-known, but little understood, placebo effect. However, they seemed to have gotten around it by making the experiments double-blind, effectively cutting off feedback to the subject.

This seems to work if the subject does not need to know the results of the observation. However, if the observations are direct tools in use by the subject, I'm not sure if one would be able to disentangle them from each other.

Though it's by analogy, could the quantum weirdness be explained by a feedback mechanism? Could the underlying nature of physics be based on some type of meta-data that all particles have access to? I don't know enough about physics to know where to begin looking, but it certainly makes me curious if any physicist has looked into it.

Monday, February 27, 2006

Transmitting GUIs: When interfaces become data

While it might be old news to some of you, I just recently heard about XUL(pronounced Zuul), which apparently is what Mozilla's suite of applications, such as Firefox and Thunderbird, built their GUIs on. Most recently, an open source music player, Songbird, also uses XUL.

When I first started using Java's Swing, it seemed pretty simple. However, when working with web applications, I found it much easier to get a GUI up and running in HTML, CSS, and AJAX than it was with Java's Swing (However, some things are still hard in web apps that Swing does well). So I wondered if there could be a similar thing for desktop applications?

I guess that's what the people at Mozilla thought of too. What makes XUL interesting is that it employs an XML schema to define the GUI. And since it's still XML, you can embed other forms of XML in there, such as SVG and MathML. XML is usually used to describe data, but in XUL, it's used to describe a user interface.
There's no Data, only XUL
But on the converse, if it's expressible in XML, isn't the description of the GUI the data being represented?

Currently, we tend to think of the GUI as a cohesive part of the application. But that shouldn't be the case with XUL, since it's data. Then, you can certainly also send the GUI back and forth between applications. What use could this possibly have?

Well, for one, many programmers have long said that HTML was never meant to be used for applications. It was only meant to display hypertext. What we've done so far was use a lot of workarounds, to make it seem like it's an application. It could be entirely possible to have XUL servers, and not just HTTP servers. Upon looking it up, they have Remote XUL for that purpose. I imagine that with smaller and more powerful devices, the client-server model will still exist, but to the user what-is-a-server and what-is-a-client will become vanishingly small. Your mobile phone might be a server to a number of other future devices in the house.

Another idea is one about Walk-away GUIs. Say, you were looking at a map application of a place you're going to survey. With walk-away GUIs, you would be able to send a mobile version of the map application GUI to your mobile device to take with you out on the field.

Already, the web applications have small versions of themselves. Blogger has a "blog it!" mini control that lets you post things quickly. Del.icio.us has firefox extensions that lets you tag quickly. This could be sent to mobile devices, so that you can use it while you're out in the field, without high bandwidth (otherwise, you'd just run the application from the XUL server).

I think that this, coupled with Human Area Networks, you can visually transfer the GUI from a desktop to a mobile device, much like in the future thriller, Minority Report, where Tom Cruise could move a picture onto a plate, which could be removed and transferred. While their application was to move a picture from machine to machine (inefficient), the idea makes far more sense for transfering GUIs between applications on different platforms.

I also see XUL as being an easy way to update and patch software out in the field, as well as being extensible beyond current GUIs. If there are future devices with a different dimension to their GUIs, XUL would be flexible enough to be backwards compatible, as well as being able to support current GUI innovations.

Currently, XUL is only used with the Mozilla applications. Will XUL catch on? I don't know. It might be impractical in cases where bandwidth was low.

Update:
There seems to be other problems with XUL.

Saturday, February 25, 2006

A host of poking will get the brain working

I had a deadline today, but decided to put it off a day, since I had an interest in looking several things up tonight.

I use to have no interest what-so-ever in compilers, but I started reading up on it due to a catalyst. Since I was an Electrical Engineer, I never took compilers in undergrad. And in grad school for Computer Science, I somehow avoided taking compilers. I read alot about what parsers and lexers were. I knew who Noam Chomsky was, but I didn't know that he was the first person to separate syntax and semantics.

So I found a free compiler tools site as well as a long article on compiler basics that I finished halfway. I talked to Ian Martins, in brief, and found out that commonly used tools for compiler creation were Lex & Yacc.
The asteroid to kill this dinosaur is still in orbit.
- Lex Manual Page

Haha. But these two tools generate parsers in C. Are there Ruby equivalents? Of course. It's called Racc. Since Ruby was written in Japan, and has large adoption over there, a number of libraries have documentation written in Japanese. Who would have thought that reading some Japanese would come in handy?

I also made a stop at looking at what Rinda was, though documentation is sparse on the web. Rinda is the Ruby implementation of Linda, which is something used for distributed computing.

Perusing around these topics, I stumbled upon an O'Reilly article on Asterisk & Rails. Asterisk is apparently an open source VoIP implementation. That's pretty interesting, especially since you can tie it into Rails with RAGI. I think the possibilities for this are exciting, though I fear that people will blow it out of proportion and turn it into a bandwagon of sorts.



In the article, they had this picture, and I found it interesting that there is an overlap between IM and VoIP. Related, they are. I wonder how the traditional telephony and cable are going to try to block this? I honestly hope they don't succeed. I had heard of Gizmo before, downloaded their software, but didn't really have anyone to dial, so I removed it. But thinking about it now, and open protocols, I wondered if there was a Jabber implementation in Ruby. There were two, but one was more active, being XMPP4R.

I find that Digg or /. might not always have the news I'm looking for, although it comes through once in a while. The best leads I have are by following topics and often times from blogs, in footnotes.

I'm excited about a couple ideas brewing in my head, but I'll just need to write them down and push them in the back of my head, and come back to them later.

"Facets of Ruby" Brown Bag

I gave a Brown Bag presentation yesterday to the software developers of the Johns Hopkins University Applied Physics Lab. It was good to pour over the lesser known features of Ruby, and though I know more now, I couldn't answer a lot of the basic questions that were asked. A lot of the discussion was on dynamic typing.

Here are some of the answers to questions I couldn't answer right there and then.

Which module is "times" iterator in?

I had the example:

3.times do
print "ho! "
end
# it prints out "ho! ho! ho!"


Since everything in Ruby is an object, the number "3" is also an object, and therefore has methods. "times" is a method in the module Integer. After looking at the source code for "times" (written in C), I stand corrected, it does NOT use "each". Only classes that mixin the module Enumerable will use 'each'. It takes 3 as an argument (hidden to rubyists), and then yields to the block(printing 'ho!' in this case) in a for loop from 1 to 3.

Why would you ever want to add methods at runtime?

I completely forgot that Rails does this as part of it's "magic." Let's say, for example, you have a table called "songs" that has attributes, "id", "title", "artist", and "duration". Normally, you can use a find() method to find all songs by Eric Clapton in the "songs" table:

Song.find(:all, :conditions => ["artist = ?", "Eric Clapton"])

However, rails will also dynamically add methods, based on the attributes of the table:

Song.find_by_title("Bell Bottom Blues")
Song.find_by_artist("Eric Clapton")
Song.find_by_duration(253).


When you query the database for a record, Rails will create a data object with those attributes available as methods on the fly. This way, there is no configuration or mapping between the databse and your data model objects.

How does Ruby go about deciding which method to execute for ambiguous method names?

From the pickaxe book:
"Ruby looks first in the immediate class of an object, then in the mixins included into that class, and then in superclasses and their mixins. If a class has multiple modules mixed in, the last one included is searched first."

In trying it out with test code, you can only use the scope resolution operator to distinguish between two methods with the same name in two different modules if the method in the Modules were declared static.

What is the type of an object when you mix modules into it?

Let's say I have two modules, "Bar" and "Yak", and a class "Foo" that mixes "Bar", but not "Yak". Using the kind_of? method:

f = Foo.new
f.kind_of? Foo # => true
f.kind_of? Bar # => true
f.kind_of? Yak # => false


So yes, an object instanciated will also be a type of modules that you mixed in.

If I really wanted type checking, what could I do?

You can use the reflection methods, such as kind_of?() or instance_of?(). But since what you're really interested in is if the object will fail on a call that you make, it might be better to to call responds_to?(), to see if the object responds to a particular method.

The pickaxe book warns that you should do type checking if you really have a good reason for it. Otherwise, it's more code to maintain, and has less flexibility in future enhancements.

Saturday, February 18, 2006

Rails Collections and Partials

I like convention, mostly because it simplifies what needs to be said, because it can be implied. But likewise, it makes it difficult for newcomers to know what these conventions are, because they're usually not written anywhere.

When rendering a partial, a parital has access to all instance variables generated by the controller method. So if you were rendering a method from show_comments, @my_crazy_comment would be available to the partial. But not only that, if the partial is called with

<%= render :partial => "comment_display", :object => @my_crazy_comment %>

The partial would have available to it, a variable called 'comment_display' that points to @my_crazy_comment.

So inside your partial file, "_comment_display.rhtml"

<blockquote>
<%= comment_display.comment %>
</blockquote>
<%= comment_display.author.name %>


The variable "comment_display" will have the comment in @my_crazy_comment. For a collection of partials, it's just as easy.

<%= render :partial => "comment_display", :collection => @all_crazy_comments %>

Where @all_crazy_comments is an array of comments.

If designs were reusable, would I be for it?

So I've been watching Project Runway II...not religiously, but I watch it with the same reason I watched that modeling reality show with Tyra: to see what others are seeing that I'm not. Certainly, one can say that models don't do much. They dress up, look pretty, and walk. But I always had a suspicion that's like saying basketball is just putting the ball in the hoop. While both true, they're gross over-simplifications.

I often joke, while watching Project Runway, that there should be a reality TV show about engineers and coders. "For this challenge, you have to code on an Amiga!" "For this challenge, write your own Sudoku generation algorithm!"

But thinking about it hard, there is always a trend in technology, where first, it has to be functionally working and innovative, before the designers move in and improve it incrementally and aesthetics. In the case of web applications, with the recent surge of the so-called web 2.0 sites, they all have a similar look and feel. Some of this is constrained by the practicality of a common GUI widget set. Some of this is due to the common fonts and the set of pleasing color schemes. However, on the other end of the specturm, you have flash sites with an unusable UI set and overly animated.

What's the balance between something new, aesthetic, simple, yet functional? I suppose this is the holy grail that most designers strive for. I wonder if it's possible to be both technologically innovative and aesthetically innovative in one step?

Thursday, February 09, 2006

Visual CSS Inspector

After coding in Ruby for a while, and omitting semicolons, it's hard to get back in the habit of doing do when writing CSS. I couldn't figure out how to get a CSS to take effect, and it ends up that I didn't put a semicolon down after "width: 250px".

Problems are always entirely stupid after you figure out what the source is. However, this has led me to wonder about the design of HTML and CSS. HTML is now criticized for being to loose and easy-going with users that use it with errors. However, we forget that without that ease-of-use, and ease-of-forgiveness, HTML wouldn't have had the widespread adoption that it does today. We might still be using GOPHER (maybe).

But when it comes to formatting, the effects of which aren't as readily seen as structure, it might do well to have some warnings or error messages. This should be the case for developers, and not normal users. Well, poking around Firefox, I see that under "Tools", there's a DOM and javascript console. Nice.

But I don't think there are the equivalents of CSS checkers. How do you verify visual aesthetics? Maybe it can check for things like overlap between boxes, in different sizes. If general visual aethetics could be measured, then it might be possible to have a Visual CSS evaluator. One can argue that human creativity has a range of aethetics, and that it would be impossible to capture it algorithmically or mathematically. However, I think basics of aesthetics could be captured, because despite the variability of aethetics, they all share commonalities such as symmetry.

And yet, I hope that if something like this ever comes about, it won't be seen as a standard of aesthetics, but more of a tool to run automagically, so that humans won't have to look at it one by one.

Tuesday, February 07, 2006

Nav with google earth

This article has been all over the news. I've been thinking that this was in the works about six months ago when Google Earth came out. I'm not sure whether the pics are real or not, however. Speculation, of course, but I tend to think that Google as a part of it mobile strategy intends to focus on organizing information between contexts. No longer do you have to look up an address on maps first, print out the directions, and go. No longer will you have to transfer that information between contexts onto paper and then electronically again.

Beyond that, you can find and advertise things in the real world with the google nav system. If augmented reality takes off, I think that Google will be positioned to be the medium in which to make money off of advertising when users are searching for places to eat, gas stations, etc while they're cruising in their cars.

Sunday, February 05, 2006

Long Lasting Design

PC world covered their list of top 50 gadgets in the past. I'm don't buy too much into the listings, other than that it is true that the Walkman changed a lot of things in America, and hence it deserves it #1 spot.

What I noticed is that some of the designs on these gadgets are surprisingly modern. I'd see gadgets like these on the shelfs of some stores in order to set itself apart from the crowd without being too gaudy. So I'm looking at gadget designs pre-1990...so that enough time has passed for those designs to look retro if they weren't timeless.

1. Sony Walkman TPS-L2 (1979)


5. Sony CDP-101 (1982)


10. Regency TR-1 (1954)


26. Nintendo Game Boy (1989)


Surprisingly, the sony walkman also looked pretty modern, as well as the Regency radio. Some say that the Regency radio's design was copied by the modern iPod. Like the iPods, they also came in multi colors.

35. Motorola DynaTAC 8000X (1983)


This is an example of not long lasting design. This brick was a foot long and weighed two pounds. It was considered the first mobile phone, and cost $4000. Can you imagine pulling this thing out of your pocket and asking a girl for her number with it? I'm not sure whether it's not a long lasting design simply because of its sheer size in comparison to the gadgets now, making it unwieldy, or if it's just not pleasing to look at.

Saturday, February 04, 2006

Momo, the Comcast guy that cared

My internet's been intermitten the last couple of months. It would go up and down, up and down. It's really quite frustrating, as I rely on it like I do a car or an appliance. So when it's not working, it disrupts my workflow.

We had called Comcast, and most people they hire are not troubleshooters and problem solvers. They just go by the book, instead of thinking about things. The first time we called, the rep told us to put it on a battery backup. That sounded skeptical, but we did it anyway. Then it was changing the outside splitter, and then proclaiming that the splitter in the wall was bad. After going through three of these guys, I finally got Momo, the Comcast guy that cared.

Since it was an intermitten problem, it wasn't readily reproducible. It would of course work while the technician was here. They'd just shrug and say, "It looks good to me." And then they were on their way. Moments later, my internet would be down again. It might be because I scheduled an early morning appt instead of an evening one, where the technicians just want to go home.

However, Momo was a problem solver. He went all the way back to the tap with the signal meter, and found that the connectors were corroded back there. None of the other technicians from Comcast did that. So we were losing about 10dBs just from that connector. So, a tip for all of you out there, there's a greenish pill tube protruding from the ground somewhere in the neighborhood. It's under that cover that has all the neighbor's cable services. You can check out your own connection if you're experiencing the same problem, and none of the technicians don't seem to be systematic in their diagnosis.

I'm calling Comcast to tell them to give Momo a freakin' promotion, because he's doing the world some good. And that Comcast should hire more people that are problem solvers.

Monday, January 30, 2006

Adding primary keys in Rails migrations

Module: ActiveRecord::ConnectionAdapters::SchemaStatements

The API doc on add_column() refers to column_types which say that it can be of type :primary_key. This is not true. add_column cannot use :primary_key as a type. Currently, I have no idea how to indicate that a field is a primary key and needs to be auto incremented.

You might have to drop the entire table and create it again.

Are migrations executed within a transaction?

[Rails] Are migrations executed within a transaction?

As I'm writing migration changes to the database, I find that rollingback is a pain sometimes, because of writing self.down(). When it fails, I have to reset the database. While this really isn't a problem since no real data is in there (and all the fixtures are added automatically), it is an extra step.

I figured migrations would be executed within a transaction, but apparently, it's not. This was the only link I could find about it, and the guy just says you can't. Anyone know why you can't?

Friday, January 27, 2006

Nitpicking "if" structure

So what would be better?
def method
if !event
return nil
end
return Table.find_first_by_name("oak")
end


def method
return nil unless event
return Table.find_first_by_name("oak")
end


def method
return !event ? nil : Table.find_first_by_name("oak")
end


I figured the first is a bit clearer, but longer...and while the third is shorter, I'm not sure that a coverage tool would flag parts of it as uncovered. And the second...well, having two returns seem kinda ugly. What do you think?

Thursday, January 26, 2006

Soft robots and haptics

"Chance favors the prepared mind."
- Louis Pasteur

Even though I feel like my grasp of advanced math is not as solid as it should be, I don't think it's beyond me to understand it, if I spent enough time on it (and maybe asked someone if I got stuck). But I don't feel like this is innate. Anyone should be able to understand advanced concepts if it were explained correctly. Geniuses might get it faster than others, but everyone should have the mental capacity to grasp abstract concepts eventually.

However, when it comes to creativity, innovation...ahh...that's something that's practiced. But even if you do work on it, sometimes you might not have gotten something that someone else thought of. And in that capacity, I feel that Louis Pasteur's quote above signifies to me the reason why.

I had always been looking for some type of gel substance that received and gave some type of signal as an input device, but usually to no avail. It was with this sitting in the back of my mind where, "Luck favors the prepared."

I was talking to a coworker next door, and he was working on robotics and autonomy. He was excited about a prototype for a body that he had constructed. A common problem for robotics is mobility: wheels can't go everywhere. So what he and his cohorts developed was the concept of a soft robot...a robot with a soft, amorphous body. He showed me a disk with membrane on one side, and plastic on the other. Trapped inside the disk was a dark colored liquid. When you feel the liquid from the side of the membrane, it doesn't feel special...just like liquid under a membrane. But when you put a magnet on the plastic side, it hardened the dark colored liquid, which you could now feel on the side of the membrane. Basically, the idea was to have a sac with this dark liquid as a body that you can control through magnets.

I was playing around with it while talking to him. It was pretty neat. When moving the magnet, you can feel a gel-like hardness underneath the membrane. I was thinking to myself, "This is pretty cool. You can use it to create robots that do massages with this." Immediate after--though I did not express it--I knew that the porn industry would have a field day with such a technology.

And then as I usually do, I reverse whatever I was doing, just to be playful. I stuck the magnet on the plastic side, and started pushing the hardness around through the membrane. As a result, the magnet on the other side was moving around also. I looked at my coworker and said, "You know, you can use this as an input device...I'm sure there are magnetic sensors, right? So you can push the hardness in the membrane around, detect it, and send it electronically somewhere else. You guys probably thought of it already, right?" He was kinda surprised and said, "No, we hadn't thought of that at all." I saw a flicker of an idea in his head, but he didn't divulge what it was. He seemed please with himself.

A week or two later, he came up to me and said, "hey short-timer!" And then he told me that his cohorts were really excited about the idea. Basically, for robotic-assisted surgery, it can be an input device that provides haptics (force-feedback). So, in the future, if you see any soft-membrane input devices for robotic-assisted surgery, it was cuz of me playing around with a membrane. Haha, my little claim to fame.

Rake options and tasks in Rails

I feel stupid for even posting this at all, but after typing:
rake -h
rake --help
rake help


Without too much helpful information, it wasn't until reading docs that I found
rake --tasks
goes a long way in seeing what you're able to do with rake. It kinda opens up your world.

Rails 1.0's fixtures are different than from before

Faster Testing with Rails 1.0

Was wondering wth was going on. Good thing for the web. According to Mike Clark, if you're reading the Rails book, "Agile Web Development with Rails", make sure you take note of the errata with Rails 1.0. The instantiation of fixtures as attributes and hashes are not done by default anymore with Rails v1.0.
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false


The reason being that having to instantiate all those attributes will take too long with a large fixture to test. Now, instanciations are done ON DEMAND with each test. And if they are done, they are cached. Therefore, you can either choose to override and change the use_*_fixtures settings in your test code, or you can change all your code from:
@table["my_fixture"]
to
table[:my_fixture]
table(:my_fixture)

Tuesday, January 24, 2006

RubyForge: RMagick: Hints and Tips

RubyForge: RMagick: Hints and Tips

So for image manipulation, you need imagemagick, and rMagick, which is the ruby layered on top of it. However, I had trouble installed rMagick because it complained about, first imagemagick not being installed (when it was), and then about missing libraries.

I didn't want two copies of the same app floating around on my system, by installing the tarball, so I found this large (and helpful) explanation.
Usually this problem occurs when installing RMagick over a version of ImageMagick/GraphicsMagick ("xMagick") from a binary package such as an .rpm or .deb. The problem occurs because the package installs just xMagick but omits one (or all) of the libraries that it uses, such as the FreeType library or the XML parsing library. Or the libraries are installed but not the header files that RMagick needs.


So I had to look for the gem, which for me is under
/usr/local/lib/ruby/1.8/gems/1.8/gems/rmagick-1.10.0/

And read the config.log file. I found that I was missing "libMagick.so" and "libBZ2.so" I had both of these installed, but I used YUM's "provides" command to find the packaged I needed that provided those libraries. I found the development packages and installed those.
yum provides libMagick
yum install libMagick-devel
yum provides libbz2
yum install libbz2-devel
gem install rmagick

:: Howtos : Keeping Fedora Up to Date with Yum

:: Howtos : Keeping Fedora Up to Date with Yum

I've used linux for a while now, but the intricacies of how the OS works and is put together is still a bit shrouded. I've developed a lot on a linux machine, but haven't really administered one, til recently.

I've always built my apps from source tarballs, mostly because at least this way, I'll know where I installed it /usr/local/ and it's all in one place. With RPMs, I have no idea where it put the files...but then again, maybe that's the point...that I don't have to. But even then, I've found RPMs are to use...mostly because I could never remember the flags.

Then comes yum on fedora. I like it a lot so far. It's a bit slow, but it finds the repositories, knows which packages need to be updated, and numerous other things. It also finds which packages provide a library that you need for another install, which I used to install rmagick gem. The best part is that the commands are whole words. :)

The Nature of Tagging: Public vs Private

By implication, tags are public. However, should tags be public or private? That's been the ongoing debate between me and Chris. Chris's stance is that tags should be private, because he only cares how he classifies things, and not how everyone else classifies things. My stance is that the power of public tagging is in its search of everyone's content, not from its way of classifying individual content.

Tagging is no more than keywords on things for grouping. And if tags were private, it would be no more than that. Gmail has a new feature that allows the user to group contacts. Public tagging gets its power from the aggregation and feedback loop of lots of people's sets of tags. The statement that one wouldn't care how other people classify things is true to you if you don't use other aspects of tagging, namely, the searching of new information through tags. If you only use tagging for classification, then it makes no difference whether the tags are public or private. The power of tagging is not that it's a better classification system; it's a way of utilizing humans to create a search index.

How could the index comprised of an aggregation of other people's tags be anything other than a hodgepodge of random keywords? That would only be true if the set of tags that people use on a particular object would be independent (uncorrelated) with everyone else's set of tags. Now, we know that to be untrue for bookmarks due to del.icio.us's work. This is because words with content are correlated with each other. Therefore, there is a limited set of keywords that people will use for any single piece of content. In fact, it's because of this that search engines can do their job. So while one person's set of keywords may not be the same as another's set of keywords, on average, they will overlap with each other. Thus, if you're searching for more content on the same subject, that's something public tagging does a really good job of. And that's a task that lots of people do on the internet...they're looking for related content.

Now, will [public] tagging work for classifying or searching all other objects? With the rage about Web 2.0, there are some people that think that everything should be tagged. Not necessarily, I say.

Tagging has been demonstrated to work if an object has intrinsic properties; a book is a book to everyone. But what if you're tagging your relationships to an object? I think that changes the nature of tagging a little bit. Because the relationships to an object is not the same for all people; and more importantly, sometimes these relationships are non-transferrable between people. A book will always be a book to anyone, but a book that your father gave you on your eighteenth birthday will be a relationship between that book and only you, and not between that book and anyone else.

That said, there is sometimes a shared (collective) relationship between groups of people and an object. A group of people might feel that Lover's Overlook is a special teenage place for them, but not everyone in the world would share the same relationship to Lover's Lane. But everyone can agree that Lover's Lane is a make-out place because it's an intrinsic property of the object. Therefore, I will have to curb my hard statement before that tagging relationships between objects would be uncorrelated. It will be less correlated than tags on intrinsic properties of an object, but some degree of correlation would exist. And therefore, you can search for all other objects that have the same relationships to people.

So should tags be public or private? I think that objects with intrinsic properties that people are searching for is very condusive to public tags. However, objects such as 'gifts I received for my birthday' might not be condusive to private tags. You might not care what everyone else received for their birthday. In addition, since they are different people than you, you might not want the same things they got.

I think the application of tags to objects in a system should be carefully scrutinized, rather than just following the assumption that everything is good for tagging. Are there instances of objects that should be privately tagged as opposed to publicly tagged?

Saturday, December 31, 2005

Yum can't find public key

When using Fedora Core, I couldn't get yum to find the correct public keys. Ends up that it's something with rpm. Just do this:
rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora

And it'll work.

Wednesday, December 28, 2005

Human Area Networks and Communications with Context

Human Area Networks are just a name for using human skin (while the human is alive) as a transmission medium.

But to me, the most exciting aspect of communications over human skin is that it gives communication devices "context".

So a post-it note stuck to nothing that says "trash me" will mean just the same action as a piece of paper that says "trash me". But when a post-it reading "trash me" will mean different actions when stuck on a book versus a cabinet.

In the same way, devices in the vicinity of each other can communicate, but it has no context other than geographic closeness (which sometimes is enough). But with communications over skin, it gives the context of an intent by the human to interact with the device they're touching.

This kind of thing could be applied to "needies"
http://www.needies.com/
http://www.gizmodo.com/gadgets/gadgets/needies-jealous-plush-toys-101181.php
Which are "attention-starved stuffed animals" Each one knows when they're being touched, and broadcasts that information to other needies in the room. The ones that aren't being touched will complain, and say things like, "hug me instead!", or "Throw him! Throw him!" So instead of always broadcasting, they will have extra information about the state of the world by which medium they can communicate through.

As another inane example, personal devices being held by the same person running a screensaver can have fish swim from one screen to another screen of a personal device.

Again, the medium of human area networks gives the communications context by human intent, rather than just by geographic vicinity.

Thursday, December 22, 2005

What would you do with a Terabyte?

It wasn't too long ago that having 256MBs of memory or even 1GB of disk space was a big deal. At the time, I thought "Wow! 1GB! What am I going to do with all that space?" Well, as usual, software engineers can never get enough speed or memory. When mp3s and mp4s came about, along with higher bandwidth, suddenly 1GB didn't seem like enough for all the movies and music. Applications themselves took on more complexity and layers of abstraction, and required faster hardware and bigger hard drive, not to mention the operating system.

As one Terabyte looms ahead, the question is, what would you do with 1TB? What would you be able to do that you aren't able to do now?

I imagine that beyond movies and music, there will be other forms of high bandwidth data that aren't available yet. Olfactory data and tacile data should be immense in bandwidth, though currently, we do not have input devices for those senses. If personality-based artificial intelligence becomes commonplace, then that might also be something that requires a large amount of storage. Sensory information for bio implants as well as simulation of augmented and virtual reality will take more and more storage.

I'm not sure how other computing architectures would fit into this, but quantum computers might generate a lot of data due to the sheer parallelism of the architecture.

Friday, December 09, 2005

Authorship and Insect wings

I went to two talks today. The first one talked about using statistical analysis, principle component analysis, and singular value decomposition, to be able to tell if it's the same or different author compared to other text that you ran through the math by computers. It's pretty neat, actually, though the talk was less technical than I'd like. The guy did analysis on the original Hebrew and Greek text versions of the Bible to determine whether it was probable that there were different authors under the same name. There's other things that you can use this for, some invades into privacy, and others don't. You can also use this to analyse source code in order to determine whether it was the same author that wrote something, and whether the person likely wrote code in other software.

http://www.rmcs.cranfield.ac.uk/daps/guidance/microairvehicles/view
The second talk was much better, quite neat, and still on going. The guy was a much better speaker, and he talked about micro air vehicles that mimick the use of controls and aerodynamics in wing design in insects. The problem is more complicated than you can think of first hand, but the most interesting conjuncture that he had was that it was a sensor-rich feedback control system, rather than a controller-rich feedback control system.

Thursday, December 01, 2005

Bachelor cooking

This is a show about easy cooking for bachelors. Really, it's a blog with a videos of how to cook certain things. I don't know about you, but I think this is pretty amazing, especially when you think about what was impossible just 10 years ago. For those of you in your twenties, or older, to have your own cooking show, you needed to pretty much go through one of the networks.

Now, with the advent of blogging and widespread connectivity, I'm repeating what lots of people have said already; we might be moving into a world where you can get started on very little. Granted, you get more crap, but crap is filtered by the commons, and there's a lot more niche markets, as argued by the long tail.

And these could be people you know! I found these two through a friend of a friend.

Friday, November 04, 2005

Amazon Mechanical Turk - Welcome

So we've come around full circle. I think this is a break from normal thinking, and it's not too bad, actually. I wonder if you can make a living off of just being human?

Thursday, November 03, 2005

Coding up that if/else

Something that really irks me in code is when I see something like this:

if (result == FAILED)
print "failed!\n";
return;
else
// do whatever
end


You don't need the "else"! If the "if" statement evaluated to be true, then there's no reason why it would jump out of it. Therefore, there's no reason that the //do whatever part of the code should be inset! Do this a couple times, and you'll have a nightmare of nested code. Keep your code as shallow as possible. Don't nest if you don't have to.

Sharing places in Google Earth

Google earth's coolest feature (imo) is not the stunning visuals, but rather, the image overlays you can put on it, so you can overlay, subway maps, apartments up for sale, etc.

But in addition, and even cooler than that, is that there's a KML format that you can export from google earth that's an XML file that let's you share and transfer waypoints from inside the app. So if you and I belong to the Stonecutter's secret society, and we need driving directions to our secret meeting place, someone in our group can actually change that waypoint, and we would be updated automatically.

This, I think is in line with their aquisitions in the mobile industry in the last year or so. I think that we'll see some type integration between mobile users, and global knowledge and coordination of places.

Yahoo maps in response to google maps

The yahoo maps beta is significant because it's yahoo's response to google maps. And it chooses to use Flash instead of AJAX, which is receiving a lot of hype right now. So that's something to think about in terms of the choice between the two. The argument I've traditionally heard about not using flash is because it has long load times, user's not guarenteed to have it, and it might be over kills. But the fact that it loaded up fairly quickly makes me think there's something more than meets the eye w/ flash.