Programmatically Speaking ...

This site

Fav Blogs

Sponsors

  • MaximumASP
  • Packet Sniffer
    Home Loan
  • optimum rewards

February 2008 - Posts

Google, Ebay, Facebook, ... and Barack Obama

Stories of Howard Dean in the 2004 primary election do not just limit to his infamous scream, rather, through the prism of the Internet technology, it is how Howard Dean, with the help of Meetup.com and other internet tools like blogs, successfully organized thousands of volunteers, raised money from the net incomparable to no one else, transformed himself from a relatively unknown governor to a formidable player for presidential bid (that is before he went down in a scream).

Howard Dean only caught a glimpse of what internet technologies can achieve for a political candidate.

At Dean's time, blogging was still a novelty, YouTube yet to be invented, Facebook was in its infancy, Web 2.0 has not gained its currency.

In February 2007, shortly after Barack Obama jumped into the 2008 presidential foray, his campaign revealed a completely revamped website with all of the web 2.0 components and features. Most importantly and prominently, it launched My.BarackObama.com. One of the major designer and creator of My.BarackObama.com (MyBO) was Facebook co-founder Chris Hughes. Not surprisingly, it has the feel and functions of a more advanced Facebook, however it is not at all a poking-field for hormone-raging college students, it is entirely focused and revolving soly around Obama Barack's campaign.

 

My.BarackObama.com and his campaign crystallized some of the principals of web 2.0.

  • Networking
  • Harness collective intelligence
  • The Long Tail
  • Cross-platform and multimedia

Networking

The first generation of social networking website were mainly dating websties such as Match and Classmates in the early 1990s.

The second generation appeared in the late 1990s, including FireFly, eGroups/OneList, ICQ and Evite.

The third generation, dubbed Social Networks 3.0, started to take off in tremendous popularity and growth around 2004-2005.

The third generation networking websites are backed by the advancement and sophistication of a series of networking technologies across multiple platforms, including: instant messaging, text chat, internet forums, blogs, Wikis, online membership and profiling and a bevy of social network services to allow people to come together online around shared interests, hobbies and common causes. The ever more powerful search engine also enables users to find and network with their like-minded friends.

Currently Facebook and MySpace stand at the pinnacle of the networking website pyramid.

The Facebook networking features including: The Wall that allows users to post messages on other users profile, Gifts and marketplace to give, exchange or purchase objects; "Pokes" to poke one another, Events to inform or be informed one's events, plans and whereabouts.

MySpace.com offers an equally rich set of social network features including: Bulletins for common messages, Groups for people to form groups, MySpaceIM for instant messaging, MySpace Classifieds for ads listing.

Both the Facebook and MySpace provide RSS-based news service. Both provide elaborate video and photo features.

Built on the strength of Facebook, My.OB site allows you to send and receive messages, track, plan and attend local events, create and join groups, start a blog, initiate an online campaign.

Obama internet social networking does not stops at My OB. He has claimed a great more friends on Facebook and MySpace than any other presidential candidates, he has created multiple online accounts and profiles on websites of different languages and interests and focci (Blackplanet - tailored towards young black population, Linkedin, MyGrito (in Spanish), Digg, Econs.com - a networking siting for people over 50 years old). He has a rich album and thoughtful profile on Flickr, a dedicated BarackTV on YouTube. The plethora of online activities helps him communicate effectively with millions, help supporters organized and motivated and connected. They also become vibrant tools of online fund raising.

Harness collective intelligence

The all-inclusive and forever-updated Wikipedia is a perfect example of collective intelligence at work. It hit a million-articles mark on March 1st, 2006. It exists in more than two hundred languages and has hundreds of thousands of contributors around the world. Its mass of information, gradual and granul refinement relies on exclusively the collaboration of an army of volutunteers. It is an unprecedented excercise of trust that any registered user can add an entry and edit any existing entries.

Google's breakthrough in ranking webpages - pagerank - is also an aggregated work of collective intelligence too.

"PageRank relies on the uniquely democratic nature of the web by using its vast link structure as an indicator of an individual page's value. In essence, Google interprets a link from page A to page B as a vote, by page A, for page B. But, Google looks at considerably more than the sheer volume of votes, or links a page receives; for example, it also analyzes the page that casts the vote. Votes cast by pages that are themselves "important" weigh more heavily and help to make other pages 'important.' Using these and other factors, Google provides its views on pages' relative importance"

Jim O'Reilly in this widely-circulated work <a href=http://www.oreilly.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html">What is web 2.0"</a> also states:

"Much of the infrastructure of the web--including the Linux, Apache, MySQL, and Perl, PHP, or Python code involved in most web servers--relies on the peer-production methods of open source, in themselves an instance of collective, net-enabled intelligence. There are more than 100,000 open source software projects listed on SourceForge.net. Anyone can add a project, anyone can download and use the code, and new projects migrate from the edges to the center as a result of users putting them to work, an organic software adoption process relying almost entirely on viral marketing.

Relying not on a pre-built however inmovable political machine, instead the Obama campaign has used an open, participatory, dynamic model. and heavily invested in building grass-roots organizations. His campaign has set up intensive regional training camps across the nation, to create "self-sufficient, interdependent teams that take responsibility for all aspects of a campaign within their congressional district." Thousands of volunteers received training, set up regional offices and solicitied campaign donations and votes. His campaign volunteers range from celebrities, local politicians, students and salon hair dressers. His army of volunteers went door to door from all counties of Iowa to rural North Dakota.

The Long Tail

In January 2008, OBama campaign collected 36 million campaign donation, dwarfing the $13.5 million donation in January Senator Hillary Rodham Clinton of New York has collected and the $12 million Senator John McCain's campaign has collected.

Out of the 36 million, $28 million came from online, with 90 percent of those transactions coming from people who donated $100 or less, and 40 percent from donors who gave $25 or less and who are expected to contribute more.

This is The Long Tail.

The Long Tail was coined by Chris Anderson in his best selling book: "The Long Tail: Why the Future of Business Is Selling Less of More", respresented by the graph of a short head and a long-tail curve. In statistics it is known as the graph of power-law distribution. Wikipedia explains the Long Tail as the following

 

"Given a large enough availability of choice and a large population of customers, and negligible stocking and distribution costs, the selection and buying pattern of the population results in a power law distribution curve, instead of the expected normal distribution curve. This suggests that a market with a high freedom of choice will create a certain degree of inequality by favoring the upper 20% of the items ("hits" or "head") against the other 80% ("non-hits" or "long tail")."

Internet companies that have successfully utilized the Long Tail strategies include Amazon, Netflex, Ebay and Google. Netflix has a library of more than sixty thousand DVD titles, about seventy per cent of which are from the back catalogue and its genres range from documentaries, art-house movies, and other little-known films. Everyday thousands of people buy and sell items on Ebay, many items are obscure and start as a price as low as 1 cent. A big chunk of Google's coffer was filled by small advertisers, tiny companies. Google adsense enables users to place ads with virtually any blog, any web page. A no small portion of Amazon.com's sale come from the non-hits, the Long Tail.

"What's truly amazing about the Long Tail is the sheer size of it," Anderson writes. "if you combine enough of the non-hits, you've actually established a market that rivals the hits."

Technological advancement was behind The Long Tail success: powerful database for storage and information organization, search engines, query tools help to match supply and demand, ubiliqutous availablity and use of the Internet.

YouTube, blogs and multimedia

YouTube is a bright Web 2.0 star because it made video uploading and playing snappily easy. Since its launch in 2005, it has become an ever-more-popular platform for video sharing. As of February 20, 2008, YouTube has hosted more than 73,100,000 videos, and has about 2,750,000 user channels.

Political candidates for the 2008 U.S. Presidential election have been using YouTube as an outlet for advertising their candidacies. Presidential candidates such as Ron Paul, Hillary Clinton and Joe Biden all have created YouTube videos. CNN also organized and aired a live YouTube presidential debate.

Obama uses BarackTV on YouTube to broadcast his messages and activities. His webite allow individuals to subscribe to the videos or just video tags, to repost or email those videos.

His hugh following and rousing speech also inspired many other memorable videos, such as "Yes We can", which enjoyed a wide audience and extensive media attention, which in turn helped to fuel his compaign.

Obama also extended his reach to other platforms: iTunes and Cellphones, he offers free videos on iTunes or cell phones, Obama Mobile also gives the option to download wallpaper, ringtones and subscriptions to key issues via SMS.

Like every other major website, Obama uses a mix of publishing tools, blogs, instant messages, text messages, videos, images. Obama Campaign has Launched a Comprehensive Text Messaging Initiative to Expand Grassroots Network and Organize Supporters.

In the 2004 campaign, Howard Dean's innovative use of blogs made him a front runner. By 2006, more than 1/5 of policital candidates have created campaign blogs and 14 million Americans said they actively read political and media blogs, and two million were writing about politics on their own blogs Pew Internet & American Life Study.

My.Obamabark.come offers any one who registered by clicking Vote for Obama a blog for free. All blogs on his website have a RSS feeds. Updated-by-minute and by-all function to keep on users connected and informated and excited.

Final words

The post-internet-bubble-burst-era is actually a booming internet era. It belongs to a net generation, who are young (between 18 and 27) and grew up with the Internet, who also has seen rapid growth in technology breakthoughs. This gave rise to the Internet as a powerful medium for political campaigns. Riding on the wave, Obama Barack has successfully used every Web 2.0 tools, blogs, videos, and social networks to organize and strengthen his campaign.

References

Barack Obama campaign
What Is Web 2.0:Design Patterns and Business Models for the Next Generation of Software
Wikipedia: YouTube
Wikipedia: Facebook
Wikipedia: MySpace
Wikipedia:The Long Tail
Going Long

Google Thematic Map Tiles

Google Maps Api has made creating point-based maps easy. Almost anyone with some rudimentary knowledge of html and Javascript can plug in some addresses and get a fairly dynamic map. And it is entirely fun to be able to mix in images, videos., etc.

 However, making a thematic map is still far from easy. The first challenge is to create the reservoir of tiles (256 x 256 pixles) at different zoom levels and feed Google Map API tiles with appropriated x, y coordinates and zoom level. Seems that a lot of developers have been wrestling with this. There seemed to have emerged some software to accomplish this:

A. Mapki Tile_Cutter (http://mapki.com/wiki/Tile_Cutter): a c# program that reads a geo-referenced source image and automatically produces a set of 256x256 tiles ready for use in a custom map layer or overlay

B. MapCruncher created by Microsoft Virtual Earth

As stated by Virtual Earth:

"Just find 5 to 10 corresponding landmarks on your map and on Virtual Earth, and MapCruncher will register your map to the global coordinate system, warp it to fit a Mercator projection, and generate a set of image tiles that can be seamlessly mashed up with VE's standard road or aerial imagery. It even makes a sample HTML page to show you how to use your mashed-up map."

C. Arc2earth

"A2E monitors the current map extent and downloads the appropriate tiles to display for that map extent. It also georeferences these tiles so that they appear in ArcMap no matter what Spatial Reference you have set in your map. "

However, none of the above seem to meet the challenge to dynamically create thematic maps with a base set of tiles and a dataset? 

How do you create a set of base tiles of, say US census tracts, and then based different datasets, say population, household income, educational attainment, to create any number of thematic maps?

How? 

 

 

Comb the tangled SQL server 2005 connection string and deploy the database to remote SQL server

No matter how many ADO .net application I did and will write in the past and future, near and far, there is no way I can remember the long connection strings in indecipherable machine language. 

Normally I would do a quick search and grab whatever turns up on the first spot and stuff it in my web.config file. Normally I use access, normally it would work. Occasionally I also used SQL server 7.0. However that feels so embarrassingly backward.  So recently and finally I decided to switch to the .NET IT database: SQL server 2005. I use the express version. I got quite some error messages during the process, such as :

named pipes Provider, error: 40 - Could not open a connection to SQL Server (even though I was able to connect to the database using my Visual studio IDE and SQL server 2005 management studio. However my .aspx pages simply could not get talk to the SQL server)

SELECT permission denied on object 'AgentInfo', database 'master', schema 'dbo'

(A simple search actually turns up a deluge of calls for help regarding these messages)

 So I digged into the ADO.connection class and tried to make sense of the madness.

This is a typical connection string to a local SQL server express instance that attaches a dabase file (stored in the connectionStrings section of Web.config):

  <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" providerName="System.Data.SqlClient"/>
  </connectionStrings>

This is a connection string to point to a remote SQL server,

  <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="server=xxx.xxx.xxx;Initial Catalog=DBname;uid=username;pwd=password" providerName="System.Data.SqlClient"/>
  </connectionStrings>

The keywords: 

Data Source (alternatively: Server/Address/Addr/Network Address) :The name or network address of the instance of SQL Server to which to connect.

Integrated Security (or Trusted_Connection): defaulted to false. When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication. Recognized values are true, false, yes, no, and sspi. SSPI is the same as true

AttachDBFilename: The name of the primary file, including the full path name, of an attachable database.

Initial Catalog / Database: The name of the database 

The following script could be used to create and grant necessary rights and assign roles to an account to access a remote SQL server.

USE Master

GO

Create Database DBname

GO

Use DBname

GO

EXEC sp_addlogin 'DBuser', '*****','DBname'

EXEC sp_grantdbaccess 'DBuser', 'DBUser'

EXEC sp_addrolemember 'db_owner', 'DBUser'

EXEC sp_addrolemember 'db_datareader', 'DBUser'

EXEC sp_addrolemember 'db_datawriter', 'DBUser'

GO

Silverlight Again

After much complaining, I finally decided to pay my dues and learn Silverlight. After all, I am an entrenched Microsoft camper and it is not possible to forever deprive my colleagues and users of the pleasure and ease of uploading, sharing and enjoying videos on our own website. After all, a picture is worth a thousand of words, a video is worth 10,000 images.

So I went ahead ...  

The process of setting up media files and play them in Silverlight is actually smooth and straightforward, albeit the steps are one too many, so are the required files.

Microsoft Silverlight QuickStarts has offered a good step-by-step workthrough. http://silverlight.net/quickstarts/silverlight10/media.aspx

  • Install silverlight plugin
  • add references to the silverlight javascript files: Silverlight.js and createSilverlight.js
  • step 2: create the HTML host element and initialization block
  • step 3: define the creation function that initializes your plug-in instance
  • create your Silverlight content files
  • ... 

    Finally, to add media to your files, you create a MediaElement and set its Source property to reference your media source file through a URI path. The following is an example.

    <Canvas
       xmlns="http://schemas.microsoft.com/client/2007"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
       
      <MediaElement
        Source="thebutterflyandthebear.wmv" Width="300" Height="300" />
    </Canvas>

    Some limitations:

    a. Silverlight only works with certain media types, mostly Windows Media Video/Audio files (.wmv and .wma ) and some MP3 files.

    b. It also has a size limit. Since every single streamed file have two memory mapped files, therefore very large file can be denied due to the limit of user memory space available.

    Prerequisites:

    Microsoft Silverlight is fast evolving, and seems that 2.0 is now at the horizon. However, it also seems that the list of prerequisite is fast expanding too. Now to work with Silverlight 1.1, you will need the following:

    • Microsoft Silverlight 1.1 Alpha.

    • Microsoft Visual Studio 2008 Beta 2.

    • Microsoft Silverlight Tools Alpha for Visual Studio 2008 Beta 2.

    • An ASP.NET Web site. 

    Even with an organization backing, it is not easy for me to get all the newest toys.

    Final Thoughts: Flash vs. Silverlight 

    While i am writing, I am keenly aware of my status as a beginner or outsider with regards to both of the technologies. My feeling is that Silverlight has a lot of potential, however it will experience a lot of growth pain and its future is uncertain. However it does provide a great tool for .NET developers to jump in to manipulate graphics, animation, videos and audios programatically and much much more sophistically.

    However, in the battleground of online video streaming, Flash is still the king, because its 90% installation base and long-running success stories represented by YouTube, of which I have wonderful user experiences.

      

    Dynamic menu, multiple sitemapprovider, etc.

    Everyone has been shouting "three cheers!" and "horray" since the arrival of .NET thing. How could I go against the tide?

    Still. Still feel that ASP .NET comes with packages, impressive yet unwieldy. For each problem, it hands out one heavy-set, all inclusive solution. The key is how to dig into the solution kit and fish out the right method, member and clear ways to manipulate...  Very often, that means encyclopedia-like knowledge or extensive search.

     That is what happened today at my work (still busy as hell!).

    Problem 1: I needed to implement role-based dynamic memu, so different people get to see different things. I thought it would be a piece of cake.

    Go search.

    I found 3 possible ways to implement.

    a) Create multiple Sitemap files. Specify it in the web.config file. Then dynamically switch the sitemapdatasource to the right SiteMapProviders.

    Sample web.config:

    <siteMap defaultProvider="FLSA_SiteMapProvider" enabled="true" ><providers>

     

    <add name="DefaultSiteMapProvider"

    description="Default SiteMap provider."

    type="System.Web.XmlSiteMapProvider "

    siteMapFile="Web.sitemap" />

    <add name="AdminSiteMapProvider"

    type="System.Web.XmlSiteMapProvider"

    siteMapFile="~/admin.sitemap" />

    <add name="AuthorizedUserSiteMapProvider"

    type="System.Web.XmlSiteMapProvider"

    siteMapFile="AuthorizedUser.sitemap" />

    </providers>

    Sample Master file:

    .... 

    in the page_load function:

     

    if (Request.IsAuthenticated)

    {

    if (uname == "admin")

    SiteMapDataSource1.SiteMapProvider = "AdminSiteMapProvider";

    else

    SiteMapDataSource1.SiteMapProvider = "AuthorizedUserSiteMapProvider";

    }

    else

    SiteMapDataSource1.SiteMapProvider = "DefaultSiteMapProvider";

     

    Solution 2:

    Use multiple place holders for different menus, dynamically set the visibility of the menus.

    Solution 3:

    Programmically add/or remove menu nodes. 

    ... 

    Problem 2:  My sitemap needs have to some section headers with empty links. I thought that would be a given too. Turned out there is no easy and elegant solution. So far I am still searching.

    Wonder if anyone would be so kind to show me the way.

     

     

    Posted: Feb 06 2008, 01:30 AM by xxxd
    Filed under: ,
    The leading UI suite for ASP.NET - Telerik radControls
    Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.