Excel First word Last word Nth word

February 25, 2011 Leave a comment

Here’s an easy way to get the first word of a string
=LEFT(A1, SEARCH(” “, A1)-1)

Here’s an easy way to get the last word of a string
=TRIM(RIGHT(SUBSTITUTE(A1,” “,REPT(” “,100)),100))

And here’s an easy way to get the nth word of a string
=TRIM(MID(SUBSTITUTE(A1,” “,REPT(” “,100)), (nth-1)*100+1, 100))

No more macros, yeah!

Categories: Uncategorized

Open letter to The Daily

February 9, 2011 Leave a comment

Please don’t turn The Daily into just another news website. That is what it basically is now, except I have to pay for its content and view it on the iPad. Apple’s iTunes music store proved that you can compete with free if your product is better. The Daily has to be better than the NYTimes.com and HuffingtonPost.com. Currently, it is not.

Here are a few ideas to make it better. Cover fewer stories. Be very selective in what you consider the biggest stories of the moment. Put as much human resources as you can into the stories you’ve decided to cover and present your coverage in a comprehensive format.

For example, the biggest world event at the moment is the uprising in Egypt. Not only should The Daily have up to the minute updates of what is going on, The Daily should have an archive of articles about Egypt dating back years, even decades. These articles should be organized into an easy to navigate timeline or outline so that readers can switchback and learn the historical events that led to the current uprising. I’m not talking about a history of Egypt from the time of the pharoahs. I’m talking about the war with Isreal and the peace accord, the assassination of Sadat, etc. Relevant articles from the past organized in a way to help me understand what is going on in the present. In short, each story should be a constantly updating college term paper.

The Daily is a great opportunity to move beyond the simplistic model of the hyperlinked-filled news blog. On the internet, news is free and plentiful, but research isn’t. The Daily should provide its readers with in depth research . On the internet, commentary is free and plentiful, but editorial isn’t. In the paragraph above, I wrote that each story should be a constantly updating term paper. I am not suggesting that you present each story as an aggregation of twitter feed. What I mean is that the shape of the outline and timeline should change with the news. It should change in the way that will best help the reader navigate the story and understand what is going on. You’re editing the entire “term paper”, its presentation, its navigational structure, and the written word content. And all of this is done in the service of the reader, to help him understand, not just to entertain him.

Categories: Uncategorized

Coinstar Versus Netflix

September 28, 2010 Leave a comment

Today I bought 800 shares of Coinstar @ 41.78/share. I could spend the money on Netflix @ 160/share but I think the future of DVD rental belongs to Coinstar and its Redbox vending machines.

Netflix did very well for themselves when they were competing against Blockbusters. They offer consumer a straight-forward DVD rental plan. Consumers clearly were willing to put up with delayed gratification in exchange for never having to worry about exorbitant late fees. In the competition between Netflix and Blockbusters, Netflix won.

The demise of Blockbusters and Netflix’s recent move into streaming content suggests that Netflix thinks their future competitors are Apple, Amazon, cable companies. Like everyone else, they think physical media is dead. The problem is that physical media is not dead. All those DVD and Blue Ray players are not suddenly obsolete just because Blockbuster filed bankruptcy.

Unlike Blockbusters, Coinstar has figured out a way to rent DVD to consumers without the cost of running costly physical stores. Coinstar does not need to generate revenue with late fees. They pass this saving to their customers. The Redbox vending machines we see popping up everywhere allow consumers to rent DVD and BlueRay disc at $1.00 and $1.50 per night respectively. There are no late fees and the disc is yours if you keep it for more than 30 days. This is a very reasonable proposition to consumers while allowing them to enjoy Hollywood movies without having to wait for it to come in the mail.

I have yet to meet a Redbox user who decided that Netflix is a better option. I don’t think Netflix will be as successful wooing Redbox users as they did wooing Blockbuster’s users. Converting a-la-carte user to a subscription user is not an easy task. Especially, when the Redbox a-la-carte model has proven itself with high customer satisfaction. Most people are willing pays subscriptions for things they use everyday, such as cable, phone, internet service. I don’t think DVD rental fit this category.

With the demise of Blockbusters, it seems to me like Redbox has the monopoly on the non-subscriber base. As long as Coinstar continue to make Redbox vending machines more accessible to consumers, they will discourage people from turning to alternatives that requires a subscription. Still, there will always be a segment of consumers who will subscribe. I think this segment will be small for the foreseeable future. If it does grow, Netflix will have to fight Apple, Amazon, cable companies for a piece of that pie. That is no easy task.

In the post-Blockbuster era, I see Coinstar competing directly with Netflix for consumer hearts and minds, while I don’t see Netflix fighting back. Winners never come out on top by ignoring its competition.

Categories: Uncategorized

I never knew he was so prolific

September 1, 2010 Leave a comment
Categories: Uncategorized

Rails, OS X, and IE6, oh my!

August 30, 2010 Leave a comment

To check your rails app on IE6 during development, use Parallel desktop. Install appropriate version of Windows and IE.

In your OS X system preferences, turn file sharing on. On my computer, the shared IP address is 192.168.0.110

In your rails app do

./script/server -b 192.168.0.110

Use IE in Parallel and visit http://192.168.0.110

Enjoy.

Categories: Ruby On Rails

Birth Control Commercials

August 30, 2010 Leave a comment

Why do all commercials for women birth control have to disclaim that the product does not prevent HIV and STD? Do most women really equate pregnancy with venereal diseases? Do they really think stopping one will stop the other? Are these commercials insulting women’s intelligence?

Categories: Uncategorized

Giving into the Dark Side

August 22, 2010 3 comments

Dave Winer is a smart guy. But when he writes something like this, I have to wonder if he realize what he’s saying. Karen Hughes and Howard Dean voice agreement that a mosque should not be near the site of Ground Zero. Instead of asking why two people on opposite poles of the political spectrum thinks this way, Dave Winer writes a post calling for their deportation because he doesn’t agree with them. Does Dave Winer not realize that Hughes and Dean have just as much right to voice their opinion about the mosque and Ground Zero as anyone else?

If Dave Winer wants to defend the religious freedom to build a mosque near Ground Zero, he should write a thoughtful post about it that acknowledge that he understand the argument of the opposition. Instead he posts pictures of strip bars he found near Ground Zero, as if that proves there is nothing symbolic or important about Ground Zero. Dave Winer’s pictures only shows that he has given into cynicism about the whole mosque and Ground Zero discussion. Calling Karen Hughes’ op-ed “positively Nazi” without taking the time to refute Hughes arguments is mean and wrong. Dave Winer owes Karen Hughes an apology.

Categories: Uncategorized

RoR on GoDaddy

UpdateI was able to get .fcgi to work and the GoDaddy hosting does serve up the pages faster. To get fcgi to work, when you get to step 11 use the following

AddHandler fcgid-script .fcgi

instead of

AddHandler fastcgi-script .fcgi

Shared hosting still means there are limited number of processes available, so if your site is idle for more than a few minutes, the server will kill your processes. When someone visits your site after this happens, it will take a few second to spawn another processes. After that, it will be fast. Still very annoying.

End Update
If you’re thinking of hosting your RoR application with GoDaddy, be warned. You will have to jump through hoops to get it up and once you do, your site will be slow as molasses. But if you insist on doing it, here are the steps.

1. Create a rails 2.2.2 application. GoDaddy does not support 2.3.5.
2. Once you’ve tested everything, edit the dispatch.* files in the public folder. The first line of each file should say “#!/usr/local/bin/ruby” (without the quotes)
3. Freeze your rails environment the the following command “rake rails:freeze:edge RELEASE=2.2.2″. This will create a rails folder in the vendors with the entire rails 2.2.2 version.
4. Get a GoDaddy deluxe hosting account for your domain.
5. Enable SSH, so you can login. You will have to wait at least 24 hours to login.
6. Create a MySQL database for your application using GoDaddy’s control panel for your website. You will have to wait a couple of hours for the database to be set up. Once it is setup, manually create the tables for your application using the phpMyAdmin tool GoDaddy provides. You will not be able to use rake db:migrate.
6. Once the online database is setup, get the hostname of the database server and edit the database.yml file of your application. It should look like this:

production:
adapter: mysql
host: xxxxx.db.xxxxxx.hostedresource.com
port: 3306
database: xxxxx
username: xxxxx
password: xxxxx
7. Edit your enviroment.rb file so that the first 3 lines look like this

ENV['RAILS_ENV'] ||= ‘production’
ENV['GEM_HOME'] = ‘/usr/local/lib/ruby/gems-dev/1.8′
RAILS_GEM_VERSION = ’2.2.2′ unless defined? RAILS_GEM_VERSION

8. Use an FTP client and upload your web application to GoDaddy’s server.
9. Using your FTP client change the permission of the dispatch.* files to 755
10. Once you’re able to login via SSH, create an .htaccess file in in the html folder. You should see your rails application folder there also. The .htaccess file should look like this
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/stats/.*
RewriteRule ^(.*)$ /your_rails_app_folder/public/$1

This rewrite allows users to access your the rails app at the root domain (http://www.yourdomain.com) instead of a sub directory (http://www.yourdomain.com/your_rails_app_folder/)

11. Finally, cd to the public folder of your rails app and add the second .htaccess file. It should look like this

AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteBase /your_rails_app_folder
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

Notice the last line. I use cgi instead of fcgi. fcgi is faster but I have not been able to successfully use fcgi dispatcher with GoDaddy. You may have better luck.

12. Check out your website on the browser. If all goes well, you should see it.

Categories: Ruby On Rails Tags: ,

Role of the Press

I’m having an online discussion with Dave Winer who runs http://scripting.com and http://rebootnews.com. We are discussing the role of the press at Apple’s iPhone 4 launch.

I find it surprising that Dave would say that the role of the press is simply to get the story. He seems to imply that the story exists in and of itself. I don’t agree. The press serve its readers. A news story is the means by which the press operates. What story the press choose to publish affects how well it serves its readers.

If the press publish a story about people who already bought the iPhone what they think of it, then they are covering the product. How iPhone 4 users respond to their purchase (positively or negatively) is useful information to readers who have not purchased the iPhone 4. I think this is where the press should focus their resources.

The question I pose is, “Should the press cover that launch and report why people are standing in long lines to buy the iPhone 4?” I say no. The reader gains no insight on the iPhone 4 other than the fact that the iPhone 4 is popular. People do not need the press to tell them that the iPhone 4 is popular. People do not need to read about the complaints of long lines. Everybody hates long lines. They do not need the press to affirm what they already know and feel.

Categories: Uncategorized

Crawfish!!!

March 31, 2010 Leave a comment

I love this time of year.

Categories: Uncategorized Tags:
Follow

Get every new post delivered to your Inbox.