Technology

28th May
2009
written by simplelight

If you want to share video and visual information from your desktop you should check out Dyyno. They have combined some pretty cool video compression technology with a peer-to-peer networking layer and the result is very slick.

Their technology provides the plumbing for Xfire’s live video service. It’s still in beta but if you need a WoW fix, that’s the site to visit.

24th March
2009
written by simplelight

About two years ago I began to dabble in web development and I finally understand why the cognoscenti loathe Internet Explorer. On both of my websites, things just seem to work consistently across Firefox, Safari and Chrome (my browser of choice for its blazing speed). On IE, though, there are invariably a whole slew of layout problems and different interpretations of what I’m trying to achieve. Things seem marginally better in IE8 but many of the problems persist.

Hopefully, as IE’s market share declines, Microsoft will be forced to conform to the standards.

28th February
2009
written by simplelight
ssh-keygen -t rsa

Then use this command to push the key to the remote server, modifying it to match your server name.

cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
7th February
2009
written by simplelight

The following gems and plugins are the most popular as of Nov 12th, 2008:

  • Javascript Framework: jQuery (56%), Prototype (43%)
  • Skeleton: Bort
  • Mocking: Mocha
  • Exception Notification: Hoptoad
  • Full text search: Thinking Sphinx
  • Uploading: Paperclip
  • User authentication: Restful_authentication (keep an eye on Authlogic)
  • HTML/XML Parsing: Hpricot
  • View Templates: Haml

NewRelic has a good article on the state of the Rails stack.

25th January
2009
written by simplelight

H1-B visa holders are the Palestinians of American politics (with apologies to the Palestians). Each side uses them for their own interests. One side wants to protect them from being exploited and the other side wants to prevent them from exploiting. Neither side has their best interests at heart.

U.S. Senator Charles Grassley, an Iowa Republican, sent this letter to Microsoft [emphasis mine].

January 22, 2009

 Mr. Steve Ballmer

Microsoft Corporation

One Microsoft Way

Redmond , WA   98052-6399

Dear Mr. Ballmer: 

I am writing to inquire about press reports that Microsoft will be cutting approximately 5,000 jobs over the next 18 months.  I understand that the layoffs will affect workers in research and development, marketing, sales, finance, legal and corporate affairs, human resources, and information technology. 

I am concerned that Microsoft will be retaining foreign guest workers rather than similarly qualified American employees when it implements its layoff plan.  As you know, I want to make sure employers recruit qualified American workers first before hiring foreign guest workers.  For example, I cosponsored legislation to overhaul the H-1B and L-1 visa programs to give priority to American workers and to crack down on unscrupulous employers who deprive qualified Americans of high-skilled jobs.  Fraud and abuse is rampant in these programs, and we need more transparency to protect the integrity of our immigration system.  I also support legislation that would strengthen educational opportunities for American students and workers so that Americans can compete successfully in this global economy.

Last year, Microsoft was here on Capitol Hill advocating for more H-1B visas.  The purpose of the H-1B visa program is to assist companies in their employment needs where there is not a sufficient American workforce to meet their technology expertise requirements.  However, H-1B and other work visa programs were never intended to replace qualified American workers.  Certainly, these work visa programs were never intended to allow a company to retain foreign guest workers rather than similarly qualified American workers, when that company cuts jobs during an economic downturn. 

It is imperative that in implementing its layoff plan, Microsoft ensures that American workers have priority in keeping their jobs over foreign workers on visa programs.  To that effect, I would like you to respond to the following questions:

*          What is the breakdown in the jobs that are being eliminated?  What kind of jobs are they?  How many employees in each area will be cut?

*          Are any of these jobs being cut held by H-1B or other work visa program employees?  If so, how many?

*          How many of the jobs being eliminated are filled by Americans?  Of those positions, is Microsoft retaining similar ones filled by foreign guest workers?  If so, how many?

*          How many H-1B or other work visa program workers will Microsoft be retaining when the planned layoff is completed?

My point is that during a layoff, companies should not be retaining H-1B or other work visa program employees over qualified American workers.  Our immigration policy is not intended to harm the American workforce.  I encourage Microsoft to ensure that Americans are given priority in job retention.  Microsoft has a moral obligation to protect these American workers by putting them first during these difficult economic times.

 Sincerely,

Charles E. Grassley

United States Senator

Of course, no mention of Microsoft’s moral obligation to its shareholders. And I don’t remember anyone caring about “the American workers” when we tied Microsoft up in court for years and drained their coffers. Maybe those laid off can dust themselves off and volunteer at Mozilla, the organization “dedicated not to making money”.

If US immigration policy is not intended to harm Americans then who is it intended to harm? 

 

 

 

28th November
2008
written by simplelight
  1. Upgrade to latest version of RubyGems (‘sudo gem update –system’)
  2. Add GitHub repository (‘gem sources -a http://gems.github.com’)
  3. Upgrade to latest version of Ziya (‘sudo gem install derailed-ziya’)
  4. Install Ziya in project directory (‘Ziyafy –charts’ in project home, note the double dash)
  5. Add ziya.rb to config/initializers directory
  6. Copy your themes into ../public/themes/

Some other thoughts: If you’re frustrated by the almost non-existent documentation and the fact that the gem is in constant flux, don’t despair. The best way to understand how to customize your graph is to look through the example themes (for some reason they didn’t install with my gem but I downloaded them from GitHub).

Note: You can not instantiate the Ziya object in the controller corresponding to the chart’s view. It needs to be in a separate controller. Otherwise, an XML file (instead of a chart) will be returned when that controller is invoked.

Also, the reference material at XML/SWF charts is very useful and Ziya seems to adhere quite closely to the naming conventions.

I also found that I needed user-defined functions fairly quickly to customize axes etc.

Here is an example of how to use Ziya to create a scatter chart:

== Chart Controller ==

01: def load_ef

02:    # Create graph data object
03:    chart_data   = Array.new

04:    # Pull portfolios out of database
05:   @query = sessions[:period].to_i

06:    @portfolios = Portfolio.find(:all, :conditions => [“period = ?”, @query])

07:    # Strip out risk and return
08:    @portfolios.each { |x|
09:       chart_data  << x.std_dev
10:       chart_data  << x.port_ret
11:    }

12:    title = “User-entered portfolios”

13:    chart = Ziya::Charts::Scatter.new(‘LICENSE-KEY’)
14:    chart.add( :axis_category_text, %w[x y]*(chart_data.length/2) )
15:    chart.add( :series, title, chart_data )

16:    chart.add( :theme , “assetcorrelation” )

17:    respond_to do |fmt|
18:      fmt.xml { render : xml => chart.to_xml }
19:    end
20: end

== View ==

1: <div>
2:   <%= ziya_chart load_ef_url, :size => “1200×800” – %>
3: </div>

== Routes.rb ==

1:  map.load_ef   ‘/chart/load_ef’,   :controller => ‘chart’, :action => ‘load_ef’

As far as I understand, Rails will first look for a method in your controller that matches the view, then, once it starts rendering the view, it hits the callback (line 2 in the view snippet above) and at that point calls the method in the chart_controller to render the chart data, using the routing information in Routes.rb.

Note that in this case, I am pulling the data for the chart out of my database.

14th August
2008
written by simplelight

I’ve been watching the Olympics on TV Tonic’s platform. NBC collaborated with TV Tonic to provide viewers with the ability to watch the Olympics over the internet.

Some scattered thoughts in no particular order:

  1. It’s great that NBC has finally realized that some of us want to watch the Olympics over the web and this is a huge leap forward from prior years.
  2. NBC apparently managed to sell ad space to only one company: Lenovo. I used to contemplate buying a Lenovo laptop. After watching the same ad 15-20 times a day I can now say I will never buy a Lenovo laptop.
  3. It’s great to be able to watch sports sequentially. I no longer have to have gymnastics coverage interrupted with rowing. Far less time is wasted.
  4. The user interface becomes somewhat unuseable after a while. It’s difficult to see which events you’ve watched, they don’t always seem to appear in chronological order. Also, it would be nice to be able to remove the heats and only download the finals. Even better would be able to specify exactly which events to download rather than having NBC decide for us.
  5. I realize that nothing is live for us poor saps in the USA but posting the content more than 24 hours later makes a mockery of the idea of live sport.
  6. It’s a pity the water polo isn’t broadcast in higher definition. The compression algorithm completely choked with all the water and the end result is that you can’t see the ball. That detracts from the experience but leads to my next point…
  7. We all want HIGH DEFINITION. You’re making us wait until the next day to watch the events everyone was talking about at work….at least give it to us in high definition. People watching the Olympics over the web have a decent setup. You should cater to them or risk ending up on the scrap heap of failed internet video start ups.
  8. Those Chinese gymnasts definitely aren’t 16. (That was obvious even on the low def video that NBC slopped up to us.) Let’s call it what it is: CHEATING
  9. Phelps is a legend in any quality video.
1st August
2008
written by simplelight

Unfortunately, the New Relic performance monitor for Ruby on Rails doesn’t work with mod_rails (Passenger). According to a support email from them it currently “only supports mongrel and thin (without sockets)”. They plan to support Passenger in the future. That’s great news because they provide an excellent performance monitoring tool which is very easy to install and use.

Update: New Relic has added support for mod_rails. I received this email from their excellent customer support:

I was just digging through my support emails and found a few people who had inquired about RPM supporting Phusion Passenger, aka mod_rails.

 

I wanted to let you know that we released a version of the agent with ‘beta’ support for Passenger.

 

If you’re interested, check it out and let us know how it works for you!

 

To try it out, just do:

 

script/install –force http://svn.newrelic.com/rpm/agent/newrelic_rpm

 

Bill Kayser

New Relic RPM Developer

 

23rd July
2008
written by simplelight

As online advertising matures it is likely that ad targeting will be increasingly fine-grained. It strikes me that whoever has the most valuable social graph will have a formidable edge in the online ad wars. There is a lot more additional information that can be gleaned from most social graphs: hierarchy of connections (weighting each graph connection by importance to each user), relationship (co-worker, family member, close friend, casual acquaintance), type of content exchanged along that connection etc.

The candidates who seem likely to win are:

  1. Facebook – their graph has rich content due to the additional data they derive from tagging, email and other activities which reveal the strength of social connections.
  2. Skype – the people we call often are likely to be close friends or co-workers
  3. Xobni – located on the most valuable enterprise real estate, this application has insight into who you email, how quickly you respond to them, and even what you write about
  4. MySpace – the denser graph (more “friends” per user) has diluted the value of the graph compared to Facebook.
  5. LinkedIn – heavy business focus but a lot more information is volunteered at each node. Connections between nodes probably yields minimal extra information.
  6. Verizon – they have the data but are probably restricted from mining it.

Of course, pooling the data between all these graphs would result in a tremendous database.

1st July
2008
written by simplelight

Every now and then it is forcefully driven home to me that Linux is not yet ready for mass adoption. I have been trying to set up my back / forward mouse buttons on Feisty Fawn. There is no reason why this should be difficult but the official instructions are alarmingly non-deterministic! Exhortations to “experiment” are just plain annoying. Plug and Play (TM) might not be perfect but it gets the job done most of the time.

Previous
Next