Monthly Archives: September 2006

Re-posting old ideas

Every 4 to 6 months I have an idea for a new technology or a new application for an existing technology.

The company I work for does not invest in R+D and that annoys me, as I am unable to further develop my ideas without help.

Advised by a business-creation program, 18 months ago I removed some of the ideas I had previously posted here.

Now, after a couple of disappointments due to other companies patenting my ideas years after I had “invented them” -I guess they have discovered those thing independently, I’m not suggesting they have ever copied me-, and a conversation with Agustn Bentez of Fotn Sistemas Inteligentes Ejercicios Resueltos at aKademy 2006, I am reposting those ideas here. I hope they are still useful as prior art.

  • Wificast
    Use a wifi (a MIMO mesh network) to build your own TV or radio. No licenses needed. It could be integrated in DVB-T set-top-boxes at a very low cost.

    I started playing with this idea for the first time in late 2003 to replace autoguides and work as a GPS-like device uing low-emitting access points, whenever someone with a wificast-capable device is near the AP, the system is effectively working as a GPS system; read more about it in WifiGas). I even sent an e-mail to Seth Godin and he liked the idea.

    Unfortunately, I never applied for this patent (I did not have the money to pay for the fees and expenses associated with a patent) and now News Corporation has made public they will start to use this technology in 2007 in the USA.Read it.

  • Cremation DNA
    Very simple idea: when someone asks for cremation, store a partially-sequenced DNA. Very useful for post-mortem identification. Read it.
  • Multiplexing CAS and RAS
    Describes how to use base-band codification to improve memory-access times (hardware). Read it.
  • Snapshot System State Management
    Also known as “The Poor Man’s UPS”. Read it.

The Straight Story

I actually loved this movie by David Lynch.

The Straight Story tells the real story of Alvin Straight, a 73 years old man with a quiet life in a small country town (Laurens, Iowa). When his brother gets seriously sick, he decides to put away their differences and visit him after many, many years. So, alone, riding his lawnmower and towing a littler trailer, he begins a long journey through hundreds of miles, just to see again his brother, even if it’s the last thing he will ever do… Based on a real story.

There are some very emotional moments, like the dinner with the hitchhiking girl: When my kids were real little, I used to play a game with them. I give each one a small stick, one for each one of them, and say "you break that" and of course they could, that’d be easy. Then I say "tie the sticks in a bundle and try to break that". Of course they couldn’t. Then I’d say " that bundle, that’s family".

Say yes

This is great advice and it comes for free:

Now will saying ‘yes’ get you in trouble at times? Will saying ‘yes’ lead you to doing some foolish things?

Yes, it will. But don’t be afraid to be a fool. Remember, you cannot be both young and wise.

Young people who pretend to be wise to the ways of the world are mostly just cynics. Cynicism masquerades as wisdom, but it is the farthest thing from it. Because cynics don’t learn anything. Because cynicism is a self-imposed blindness, a rejection of the world because we are afraid it will hurt us or disappoint us. Cynics always say no.

But saying ‘yes’ begins things. Saying ‘yes’ is how things grow. Saying ‘yes’ leads to knowledge. ‘Yes’ is for young people. So for as long as you have the strength to, say ‘yes’.

(Stephen Colbert to the 2006 graduating class of Knox College)

A solution for public-keyed SFTP and Ruby

Lately there has been some talking in Ruby-Talk on how to send files using scp. Some people are doing just fine by calling scp with a pre-shared password, but I don’t like that approach and it doesn’t work for my purpose, so I did a bit of experimentation and found this code works:

require 'net/ssh'
require 'net/sftp'

class SSHAgent
 def initialize
    @agent_env = Hash.new
    agenthandle = IO.popen("/usr/bin/ssh-agent -s", "r")
    agenthandle.each_line do |line|
     if line.index("echo") == nil
         line = line.slice(0..(line.index(';')-1))
         key, value = line.chomp.split(/=/)
         puts "Key = #{key}, Value = #{value}"
         @agent_env[key] = value
     end
    end
 end
 def [](key)
    return @agent_env[key]
 end
end

agent = SSHAgent.new
ENV["SSH_AUTH_SOCK"] = agent["SSH_AUTH_SOCK"]
ENV["SSH_AGENT_PID"] = agent["SSH_AGENT_PID"]
system("/usr/bin/ssh-add")

Net::SSH.start( '192.168.1.12',
        :username=>'pgquiles',
        :compression_level=>0,
        :compression=>'none'
       ) do |session|
                 session.sftp.connect do |sftp|
             sftp.put_file("bigvideo.avi", "bigvideo.avi")
            end
end

I was using a passwordless private key for this experiment. Should you want to use a password-protected private key, you might want to set the DISPLAY and SSH_ASKPASS environment variables or use a smartcard reader and the ‘-s reader’ parameter.

The SSHAgent class comes from a public paste (I don’t know who its author is or the license that code is under).

Lastly, there is an undesired behaviour in Net::SFTP: when you use the put_file method it loads the whole file in memory, therefore you need loads of memory if you want to send big files. I’ve tried a naive fix (iterating writes) but it didn’t work (it complains about “no such file”, I think it’s a channels-related issue). Jamis Buck, the author of Net::SFTP, told me he currently has no time to fix this issue. In case you feel brave enough, the offending method starts in line 202 in

net-sftp-1.1.0/lib/net/sftp/session.rb.