Feb 1 2011

Copy Data Between Two Database Tables

There are many situations when you need to copy data from one database table to another one. You may want to migrate data from one database table to a new table, sometimes you need to do so to copy data to a backup table, other times to bulk load data from from different databases. To copy date between tables in a SQL Server database you can execute the following.

INSERT INTO Note (Id, Name)
SELECT Id, Name FROM Notes

The above state will copy date from a database table Notes to a new table Note where some condition is meet.

A typical database server instance hosts multiple databases, such as production and several test databases. You can copy data not only between tables within a database, but between databases within a database server instance. To copy between databases you need to use the fully qualified database name. For example, the following SQL snippet copies data from a tables called Notes in a database called TestDB.

INSERT INTO Note (Id, Name)
SELECT Id, Name FROM TestDB.dbo.Notes

Jan 16 2011

What I Wish I Knew When I Was 20

One of my favorite podcasts is Entrepreneurial Thought Leaders put out by the Stanford Technology Ventures Program. Entrepreneurial Thought Leaders is a lecture series with guest speakers from across different fields and industries. David Heinemeier Hansson of 37Signals, Mark Pincus of Zynga, Robing Li or Baidu, Steve Ballmer of Microsoft, and a great many of other founders, entrepreneurs have spoken at Entrepreneurial Thought Leaders. So when Tina Seelig, the person that runs the Stanford Technology Ventures Program, came out with a book I knew to put it on my Amazon wishlist. Sadly no one bought me anything off my wishlist so I bought it myself to read over the winter break.

A lot of the stories and lessons Tina dives into in What I Wish I Knew When I Was 20 she talks about lectures she gave back in May 2009 and in April 2006 at Standford’s Entrepreneurship Corner.

In What I Wish I Knew When I Was 20, Tina gives some important lesson on creativity, opportunity, and having the right attitude to invite both creativity and opportunity in what you are doing. For example, she speaks of having her students develop failure resumes and to highlight lessons learned from making mistakes. Her reasoning behind failure resume can best be summarized by the following quote from her book.

It’s a quick way to demonstrate that failure is an important part of our learning process, especially when you’re stretching your abilities, doing things the first time, or taking risks. We hire people who have experience not just because of their success but also because of their failures.

Aside from taking risks, and not being afraid of failure, she speak a lot of about having the right attitude to invite the correct atmosphere for success. A persons perspective is important to success, in one because each person defines what they consider a successful venture. Like in the movie The Social Network, where the Sean Parker character says “A million dollars isn’t cool. You know what’s cool? A billion dollars is cool.” For some people success is defined by having 500 million obsessive-compulsive users, and for others it’s about having 1000 paying customers. It is often the case that people let others define their success, but the truly successful are those that define their own success. And defining success has a lot to do with a person’s values and attitudes.

I took a lot of value away from What I Wish I Knew When I Was 20. For example, create a failure resume in Google Docs. I’ve also learning to try to negate the effects of negative thoughts, especially when trying or learning something new.

Here are some choice quotes from What I Wish I Knew When I Was 20:

  • Problems are abundant, just waiting for those willing to find inventive solutions.
  • Steve Jurvetson, a partner at the venture firm Draper Fisher Jurvetson, describes failures as the secret sauce of Silicon Valley.
  • Students are told that it is much better to have a flaming failure than a so-so success.
  • On reflection, there appear to be five primary types of risks; physical, social, emotional, financial, and intellectual
  • Experts in risk management believe you should make decisions based upon the probability of all outcomes, including the best- and worst-case scenarios, and be willing to take big risks when you are fully prepared for all eventualities.
  • Being too set on your path too early will likely lead you in the wrong direction.
  • Planning a career should be like traveling in a foreign country. Even if you prepare carefully, have an itinerary and s place to stay at night, the most interesting experiences usually aren’t planned.
  • The harder you work, the luckier you get.
  • Even when we think we’re paying full attention, there’s usually so much more to see.
  • I realized afterward that thinking about how you want to tell the story in the future is a great way to assess your response to dilemmas in general. Craft your story now so you’ll be proud to tell it later.
  • A few years ago I took a creative writing class in which the professor asked us to describe the same scene twice, the first time from the perspective of someone who has just fallen in love, the second from the point of view of someone who has just lost child at war.
    You shouldn’t take yourself too seriously nor judge others too harshly.

Nov 29 2010

Random Thoughts November 2010

No explanation required, here are some random thoughts that occurred to me during the past month. These ideas are usually to long to force into 140 character limit of Twitter but not fully develop to merit their own post.

There are a slew of collaborative and social tools that still compete with email. A bunch of web 2.0 document management applications that still compete with the shared network drive. A lot of financial software biggest competitor is excel spreadsheets. And not to mention the Customer Relationship Systems that compete with phone numbers in scraps of paper and a pile of business cards. Think of an industry, and your biggest technology competitor most often the dead tree technology like paper, and filing cabinets, and entry level end products.

Programming languages don’t die with a marketing bang, but fade away with the whimpers of programmers that have to maintain applications written in them.

Shared network folder must die.  Hard an slow to search or specific document, people are always restructuring the folders and moving the files, there are always duplicate files, common for people to forget to track their changes, track changes in word is horrible when the file changes a lot and often.

In a world with smart phones and 3G data plans, why do people still use cell phone text messaging?  People have done the math and proven that one megabyte of text can cost over $1000 dollars in phone charges but only cost the phone carriers pennies to provide.  There needs to be a simple service that does group text messaging that doesn’t rely on a single protocol, such as SMS. Just how Apple’s FaceTime works on Wi-Fi and does not depend on the phone carriers, someone should develop a text messaging platform that can work without a texting plan. An ideal text messaging platform would need to work with a other protocols, such as email, Facebook, Twitter, Google Voice, and SMS.

Microsoft should do anything possible to get mobile developers to start developing for the Windows Mobile 7 platform.  Microsoft should give out Visual Studio IDEs, books, free cloud hosting, and do a 1-day training tour to promote to mobile developers. But most importantly, Microsoft has to demonstrate how their platform can be monetized by independent developers.

The idea of a star performer is unfortunately often modeled after celebrity performers where a team is there to make the star shine brighter. In a development team a star performer makes the team better.

If Hollywood set out to design a better mouse trap they would rent you the mouse trap, charge for each mouse caught with it, and they own all rights to the mouse.

From time to time a semi truck or two carrying a shipping container full of Apple goods is delivered to a Apple distribution facility. Each shipping container is followed by a rent a cop security vehicle. Each shipping container holds anywhere from $1-3 million dollars worth of Apple products just off the assembly line in China. All of a sudden I feel like going on a mission.

It’s widely known that Michael Jackson purchase the rights to The Beatles music catalog. It’s also well known that Steve Jobs had for over ten years tried to get music of The Beatles into the iTunes music store. I’m not a conspiracy theorist, but it’s of very little surprise that a year after Micheal’s death Steve Jobs was finally able to buy the rights to carry the whole music catalog of The Beatles.

The Beatles on iTunes

The Beatles on iTunes

Nov 25 2010

Retweet October 2010

From time to time I just blast tweets about software development, project planning, team dynamics, or whatever else comes to mind. Here is a synopsis of recent tweets and rants. If you want to follow the conversation follow me at techknow and/or juixe and I’ll be sure to follow back.

Software Development

  • If rhythm is a dancer, then algorithm is a break dancer.
  • If you were a Java language reserve word what word would you be? I would be volatile!
  • I get personally insulted when I am prompted to prove my humanness with a captcha. It makes me wanna bust a cap-tcha on some webdeveloper!!!
  • Is there group think in the development community? Yes, but we build patterns around group think and call it Best Practices.

Team Leadership

  • Change your perspective and you can change the world.
  • If you don’t have an original idea you can remix existing ideas in original ways!
  • Go hard, go home, go big. Pick two.
  • If a web site’s end users are not paying customers, then the end users are the product that web site then sell to their advertisers.
  • Why do people compensate their inability to communicate with the belief that others just know what they mean, you know what I mean?
  • Hype is the food of lemmings.
  • The plan was to have no plan, the backup plan was to leave the backup plan at home.
  • Most people are natural born followers, it’s human nature.
  • The toughest competition doesn’t always come from a competitor trying to build a clone of your product but from market shift in the industry

Product Placement

  • In terms of hardware, mobile, and even operating systems Microsoft is anywhere between 3-5 years behind the leader.
  • Startups age really fast in Internet time, by my calculation Digg is already and Old Media Company.
  • Like what percent of Tumblr’s posts are reblogs and reposts?
  • I want JJ Abrams to do a movie about do a remake of The Muppets in an alternate time line like he did for Star Trek.
  • I want an iPhone that transforms into an iPad when I need a bigger screen.
  • Google is an advertising company with great search technology. Facebook is a virtual share cropping company with great social technology.
  • Who collects more personal data and knows more about a given user, Facebook or Google?
  • Apple should add a few filters to their iPhone camera app.

Mini Meme Machine

  • Scotty and Christopher Walken Mashup: Captain, I’m giving her all’s she got.  She needs more cowbell.
  • You know who would be great in a reality television show? A prison gang! Imagine, Real World San Quentin.
  • r-EPO, the performance-enhancing drug of champions!
  • Monetize common sense because people don’t have it.
  • I want to trademark the & char so that I could file a trademark infringement to all law firms with names of the form Dumb Dumber & Dumbest.
  • The best part of a bagel is the creme cheese.
  • My all time historical hero is Johannes Kepler.
  • Your life comes with terms of service, batteries not included, void where prohibited.
  • In Silicon Valley, everyone drinks the kool-aid but using bottled artisan water from a 10,000 year old glacier.
  • In Silicon Valley, everyone is more interested in their piece of the pie than in the recipe of success.


  • I didn’t mean for it to be released so quickly because I wanted to control peoples’ being offended by it. – Mark Zuckerberg
  • I think people might be slightly offended but whatever, maybe there’s a way to control that. – Mark Zuckerberg
  • Quitting while you are ahead is not the same thing as quitting. – American Gangster
  • Living at home with your parents is a very powerful contraception. – David Willetts
  • We should start a new social media web 2.0 holiday: Friend, Fan, and Follower Appreciation Day!!!

Oct 27 2010

Random Thoughts October 2010

No explanation required, here are some random thoughts that occurred to me during the past month. These ideas were either to long to force into 140 character limit of Twitter but not fully develop to belong on their own post.

In the computer world, Bill Gates will always be remembered for Windows and the blue screen of death. Now that he has moved his attention to education and health care such as vaccines, a blue screen of death in these fields will can really cause someone dying.

If your enemies enemies are your friends, then it is to Microsoft’s interest to see Facebook get into the search space. It makes sense that Microsoft would pay a ridiculous amount of money for the tiniest fraction of Facebook just to see Facebook’s value go through the roof and branch into search, ads, mobile, etc.

I just started noticing people I follow on Twitter start using a new service to take and share their pictures taken from a mobile device. There are already a ton of other services such as Twitpic, Facebook, Flickr, Mobile Me, etc. I consider myself an early adopter, but I think there is a new category of adopter, the “I’ll try everything adopter.” There is a bunch of folks that suffer from the New and Shiny Syndrome where they must try every single new product or service they hear about. They all rave how much better that new product is on Facebook and Twitter for a week and then the herd moves on to the next new and shiny thing.

Every year there are a few companies that everybody wants to work for. It has been reported in many news outlet that there is a micro-brain drain at Google as engineers are migrating to Facebook. Zynga has also seen a tremendous growth and has been attracting talented developers, designers, and engineers. Both Facebook and Zynga are already large establish companies. If you are looking for the next breakout company I think you should look into Second Market. Second Market is building a marketplace for employee stock to private companies, Second Market is building a new market and perhaps a new industry. Second Market is has the potential to eventual be at a level to create or move markets.

Microsoft is anywhere between 5-10 years behind current market leaders in social, search, mobile, internet television, digital music, etc. They only consumer technology that they have a leg up on the competition is gaming with its XBox console system. As Microsoft keeps missing each industry boat in the consumer space, Microsoft more and more starts to resemble a company that only sells to large companies. For example, it took Microsoft a long time to get the security in Windows OS right (from XP to Vista to Windows 7) and all along the missed the mobile as a platform.

Twitter and Facebook need to come out with a year-end zeitgist for 2010. Google has been releasing zeitgists for each year since 2001, see the Google Zeitgist Archives. From Twitter I want to know what event was the most tweeted about, what was the hottest trending topic for the year, and a graph of the number of tweets throughout the year. From Facebook I want to know how many likes does it take to reach the center of a Tootsie Roll Pop, who do they sell private personal data to the most, if they fixed the broken fence that let out all those sad malnourished cows.

Oct 19 2010

Cease and Desist Trademark Craziness

Let me first state that I am not a legal scholar but that doesn’t stop me from having my own opinions of legal case study, especially when it doesn’t make any common sense. That said, I think there is a lot of value in trademarks, just like there is some intrinsic value in copyrights and patents. But the use of trademarks, copyrights, and patents are a common good and like most common goods it falls victim to the tragedy of the commons. The tragedy of patents are it’s patent trolls. The tragedy of copyrights are these perpetual copyrights for works that were original derived from public works. The tragedy of trademarks is that you can say one sentence without infringement on someones trademark, or at least that is what the lawyers want you to think.

One of the most heavy handed and ill conceived use of trademark law was by Microsoft against Mike Rowe, a 12th grade student that owned and operated MikeRoweSoft.com. Microsoft based their 2004 trademark case in that MikeRoweSoft sounds like Microsoft and that this might confused consumers, maybe blind consumers.

More recently there have been too many unfounded trademark suits filed by large corporate entities against operators of small website operators. One recent case pits Facebook who filed suit against Teachbook.com, an online forum for teachers, for “misappropriating the distinctive BOOK portion of the Facebook’s trademark.” This makes no sense at all. Facebook has trademarked the term facebook, not book, but they claim that the book portion of the name is distinctive enough that they can sue another company that uses the term book in their domain name. This is a clear example of an overreaching use of trademarks. This also indicates that Facebook CEO Mark Zuckerborg intends to claim any domain of the form [\w|\d]*book. Teachbook is an online forum for teachers, not for FarmVille addicts. Teachbook does not in any direct way compete in the commercial space with Facebook.

Perhaps following Facebook’s legal precedent, it has been reported that eBay has issued a cease-to-exist to a website operator because the domain name ends with bay. The owner of theplayersbay.com posted the cease-to-exist, go kill yourself, which reads in part, “Arbitrary use of the word BAY in a domain is problematic if the connected website is used in association with a business making use of eBay or operating in the same sphere of business as eBay.” Again, some law firm is protecting consumers because thepalayersbay.com is confusingly similar to the giant auction website eBay.

Another similar case that grabbed my attention was of Matt Cooper, owner of Addroid.com. Which company would you think sent Mr. Cooper a cease and desist? No, not Google the maker of the Android mobile platform. No, not Motorola, the maker of the Droid branded phone. Yes, you guessed it, Lucas Arts! You see, George Lucas owns the trademark to Droid, a pay on the word android. From what I understand from his defense Mr. Cooper claims that the term Addroid is a plan on the general term Android, and does not infringe on Lucas Arts trademark droid.

I want to trademark the ampersand (&) symbol so that I could file a trademark infringement to all law firms with names of the form Dumb Dumber & Dumbest. That said, I have to acknowledge that there is value in protecting your trademarks, as well as copyrights and patents. But the legal cases listed here are not executed in good faith of trademark laws. I believe that trademark laws, much like any legal code, is a public good that if abused by loopholes, bullying tactics, or partiality hurt people’s faith in those laws.