Friday, June 12, 2009

Google App Engine for Java - 3 Tips for Getting Started

Google announced an early look at Google App Engine for Java on April 7th and I have been using it ever since. Google App Engine for Java is a web application hosting service provided by Google and designed for services that expect rapid growth and, thus, it is ideal for applications that aspire to need a scalable infrastructure.

In an attempt to be a recession proof Java programmer, I created a new niche microblogging service, http://m.TwoKnobbyTires.com, for outdoor enthusiasts, fans of pro sports, and fans of college sports. It runs on Google App Engine for Java and I hope that someday it will warrant the scalable infrastructure that App Engine provides ;). My microblogging service uses Google Accounts for authentication, App Engine's email service, and the default open source JDO implementation provided by DataNucleus. The following is a getting started guide for programmers considering Google App Engine for Java. For more details about Google App Engine, read Google App Engine For Java - A Microblogging Case Study.
  1. Start with a new application - App Engine for Java does not support the full Java specification nor all of the frameworks that run on the Java platform. For example, it supports JSTL (allegedly), Java Servlets, and JSPs but does not fully support Struts 2, JDBC, JSF, Hibernate, and EJB. Thus, it is best to start with a new application rather than attempt to port over an existing application that may have compatibility issues. My service runs using plain old Servlets and JSPs; plus Servlet Filters are employed for site wide tasks like pre-loading user data and closing database connections.
  2. Acclimate to Google's non-relational data store - Google's database is non-relational which was a challenge for me since I have only worked with relational databases (e.g., Oracle, MySQL) . Specifically, Google's database is an object datastore without a schema which means that join queries are not supported and the responsibility for data integrity lies within your code. Some of the data integrity responsibility can be managed by JDO or JPA in the form of one-to-one, one-to-many, and many-to-many relationships. However, I needed to manage some of my object relationships and queries outside of JDO because the JDO annotations plus Google datastore limit the number of relationships an object can have. My application is still experiencing random DatastoreTimeoutExceptions and I have not figured out whether my database is poorly designed or if Google's datastore has been experiencing hiccups in service.
  3. Automate tests - I used Fitnesse to automate HTML tests for web pages and XML tests for RSS feeds. Automated tests are a good idea regardless of your hosting service but in the case of Google App Engine for Java, there are two good reasons to automate tests:
    1. Auto generate the datastore index file - Your App Engine database on Google's servers requires a datastore index for every query your application needs to run. The easiest way to generate a datastore index file is to let the Eclipse plugin do it for you. Specifically, run every query in your development environment by using automated tests to trigger them and the Eclipse plugin will update the datastore index file after each query execution. Letting the Eclipse plugin generate the datastore index file is easier and less error prone than writing a datastore index file by hand.
    2. Quickly adapt to internal redesigns and platform changes - I redesigned the internals of my application several times during the process of adjusting to Google's non-relational datastore. In addition, the Google App Engine for Java platform and service are still under active development. Thus, it is important to create an automated testing suite that can provide rapid feedback on the health of your software so you can quickly and confidently adapt to both internal changes (i.e., your need to redesign to support new features) and external changes (i.e., Google's updating of the App Engine platform).
Retrospective

In the past, I compared Java vs. Ruby on Rails and my analysis ended in a tie. I believe that Google App Engine for Java tips the scales back in Java's favor because it solves Java's biggest long-term problem: a lack of affordable, scalable hosting for entrepreneurs. However, I am not convinced that Google App Engine for Java is enterprise ready because there are still too many unsupported Java APIs and frameworks.

Monday, May 11, 2009

Netflix Instant Queue - On Demand Movies

Netflix.com has created an Instant queue to complement its late fees-free DVD queue. Netflix's Instant queue streams a subset of the Netflix movie collection over the Internet for instant viewing at any time and without delay. We watch movies from Netflix's Instant queue by connecting our MacBook to our LCD TV using Apple's DVI to Video Adapter and Apple's Audio Adapter. Blockbuster.com offers a similar movie download service but it is not compatible with Mac computers. The following are features that make Netflix's Instant queue compelling.
  1. No movie previews - Watching a movie from your Netflix Instant Queue is about as instantaneous as it gets because the movie automatically starts and does not include any previews.
  2. Pause for a break - Pause a movie or close your web browser and Netflix returns you to the last viewed scene.
  3. Try movies with no commitment - Netflix's Instant queue is ideal for watching obscure movies and TV shows because there is nothing lost if you do not finish the movie or show. On the other hand, a poor movie choice in your DVD queue results in a two day wait while that movie is being replaced.
  4. No added cost - The Netflix Instant queue comes with no additional cost and is available on most of their monthly subscription plans.
  5. Reduce clutter of depreciating DVDs - DVDs are steadily losing their value with the advent of Blu-Ray discs and online movie downloads. What's more, Blu-Ray discs are likely to lose their value once online movie downloads provide HD quality. Thus, using an online movie service means you will not be collecting a set of rapidly depreciating DVDs and Blu-Ray discs nor paying for an expensive Blu-Ray player.
Blu-Ray discs should do well for a little while because online movie downloads still have some limitations. The following are limitations of Netflix's Instant queue.
  • Limited selection - Netflix's Instant queue only includes a small subset of its DVD library. Most of the movies available for instant viewing are a year old or older. So far, the redeeming selection of the Instant queue has been the availability of all four seasons of The Office.
  • Reduced picture quality - Our Internet connection allows us to watch movies from Netflix's Instant queue at Netflix's highest quality resolution. However, the picture quality is less than what is experienced with a DVD or Blu-Ray disc. Specifically, the reduced picture quality becomes a factor for fast-moving action movies but is less noticeable for comedies and dramas.
  • No special features - Instantly downloaded movies do not include director commentary, deleted scenes, subtitles, or any other bonus features typically found on a DVD.
  • Connecting your computer to the Internet can be expensive - Netflix streams online movies via devices like Xbox 360 and TiVo. However, those devices are expensive and connecting your existing computer to the Internet can be complicated and/or expensive too.
In sum, Netflix's Instant queue is worth a try if you can easily connect your TV to the Internet and, especially, if you are interested in watching episodes of The Office.

Wednesday, April 1, 2009

#Twitter Spam is Tweeting Me Off

As of late, Twitter spam is tweeting (i.e., pissing) me off enough to get me out of my technology blogging hibernation.

What is Twitter Spam?

My three criteria:
  1. A notification e-mail from Twitter that someone new is "following" your tweets (i.e., your status updates)
  2. The someone new is only "following" you to promote their business
  3. The someone new's business has nothing to do with anything you have ever tweeted (i.e., unwanted communication)
Twitter spam is not a "direct message" from another Twitter user because another user can only send you a "direct message" if you "follow" them and, thus, you can easily control who is able to send you direct messages.

I consider myself a passive Twitter user such that I only follow people that follow me and I only initiate a "following" connection with someone who is tweeting about similar topics. For example, I blog about Colorado trails and use my Two Knobby Tires Twitter profile to connect with people interested hiking, mountain biking, or outdoor gear retail. Up until recently, my experience has been positive including connecting with new people that share similar interests (e.g., Leave No Trace, mountain biking, outdoor gear products).

Spam Life Cycle

In the early days of e-mail, spam was not a problem because e-mail was not heavily used. However, as e-mail became more popular the opportunity to spam people for profit became larger. E-mail spam was a nightmare before e-mail services (e.g., Yahoo!, Hotmail, Gmail) became good at blocking it. Twitter appears to be going through a similar life cycle:
  1. Low usage = limited spam
  2. Mainstream popularity = increased opportunity for profit
  3. Spam escalates
  4. Twitter develops software intelligence to slow down spammers (losing the battle right now)
  5. Spam shrinks but never completely goes away
Twitter Spam vs. E-mail Spam

Twitter spam is not as annoying as e-mail spam once was; at least not yet. Similarities and differences of Twitter spam and e-mail spam are as follows:
  • Twitter spam originates from a Twitter profile -E-mail spam can originate from anybody with access to an e-mail account and/or e-mail server whereas Twitter spam can only originate from someone's Twitter profile. Thus, it should be easier to identify Twitter spammers since Twitter should be able limit the rapid creation of spamming Twitter accounts.
  • Twitter spam is somewhat solicited - E-mail spam is completely unsolicited because you are getting a communication from someone who should never have had access to your e-mail address. However, having a public Twitter profile puts you at risk of receiving unwanted communication because you are choosing to give the public access to you. Specifically, having a public Twitter account is a choice you can make whereas most people receiving e-mail spam want their e-mail to be 100% private.
Obvious Spammers vs. Shrewd Spammers

Obvious spammers - Obvious spammers have a limited Twitter history, a rapidly increasing number of people they are following, and are pushing an unwanted product or service. Twitter shuts down accounts that have received hundreds of "block" requests from frustrated users. For example, the following Twitter spammers have been shutdown: http://twitter.com/Nelly546, http://twitter.com/JohnM101, and http://twitter.com/Jason720 because they were following people at a rapid rate and frustrated users like myself were blocking those Twitter accounts.

Shrewd spammers - A shrewd Twitter spammer puts up a nice facade (i.e., fancy web site) and is less aggressive so that Twitter and other Twitter users do not realize that they are a spammer. For example, I have been too lazy to "block" these Twitter profiles: http://twitter.com/valhallabiz, http://twitter.com/mileso, and http://twitter.com/comfortinnfc. Their "following" to "follower" ratios are unbalanced (2:1 or worse) which means more people will be receiving spam from them. The enablers of shrewd spammers are those that get in the habit of "following" Twitter users that follow them because they want to be nice and return the favor. It is in our human nature to return the favor (i.e, reciprocate). I am guilty of this and I am sure others are too. Unfortunately, reciprocating with a shrewd Twitter spammer legitimizes their presence and enables them to spam more people.

Solution - Software Intelligence

Twitter administration - Twitter allows users to configure which Twitter events (e.g., new followers, direct messages) trigger an e-mail to their e-mail address. In addition, Twitter lets users make their profiles private such that unapproved people cannot follow their twittering. However, neither of these configuration options solve my problem because I want to be notified when someone new follows me and I want to share my tweets publicly so I can connect with new people.

Solution - I think the next step is for Twitter to prevent accounts with an unbalanced "following" to "follower" ratio from "following" new people until their "following" to "follower" ratio becomes more balanced. Benevolent Twitter users should not have to spend energy "blocking" spammers or waste time being fooled by shrewd spammers. In sum Twitter's appeal is diminishing with each new spammer and I hope Twitter can solve the problem before it gets worse.

Tuesday, December 2, 2008

Google Friend Connect on Blogger

Today, I was given access to add Google Friend Connect widgets to my blogs and other sites. I use Blogger for my blogs and was initially concerned that I would not be able to complete step 2 in the setup process because it requires that you upload two files to the root directory of your web site; something Blogger does not support. However, my Blogger blogs already contained the required two files which can be explained by the fact that Google owns Blogger.

Google Friend Connect Widgets

I added three Google Friend Connect widgets: the members widget, wall widget, and review widget; all of which can be seen in this blog's right sidebar. As you can see, a point of confusion is that the members widget is different than the followers widget. What is the difference between members and followers? From what I can deduce, members are allowed to write wall comments and reviews while followers are not allowed to do so. In addition, a follower is following using their Blogger profile while a member has joined the Google Friend Connect network using a Google Friend Connect-specific profile.

The members widget applies to an entire site but the wall and review widgets can be applied to the entire site or to individual pages. Currently, my wall and review widgets apply to the entire site. Although, of the two, the review widget would be better suited as a per post widget.

Google Friend Connect Administration

The Google Friend Connect administrative tools provide the ability to view membership reports, moderate comments and reviews, and assign administrators. Overall, Google Friend Connect is easy to install and manage since there is not much too it. Finally, it will be interesting to learn whether or not Google Friend Connect widgets improve reader engagement and interaction.

Saturday, November 22, 2008

Recession Proof Java Programmers

For the purpose of being recession proof, Java programmers should diversify what they spend their time learning. Specifically, Java programmers should add business topics to their learning diet.

My Learning Diet Backstory

Before starting my Crosby MBA Program two and half years ago, I was an avid Java programmer with an intense appetite for technology knowledge. I spent a lot of time reading Java newsletters and articles from sites such as the Java.net (even wrote a couple articles), TheServerSide.com, and JavaWorld.com. In addition, I earned four Sun Java Certifications and attended the JavaOne technology conference from 2004 to 2006. I focused on learning about new frameworks (e.g., Apache projects), APIs, and methodologies (e.g., Agile, XP). I was so engrossed in the learning things to help me be a better programmer that I could not have told you whether the company I worked for was going to achieve long-term profitability or how much my programmer team contributed to its profits. On the other hand, recession proof programmers have a pulse on both technology and business.

Recession Proof Learning for Java Programmers

Recession proof learning includes a mix of technology and business such that an understanding of industry trends and profitability can be gained. If you are a technology-only learner like I was before, then I recommend easing yourself into business with the subsequent action items.
  1. Start with TechCrunch - Subscribing to TechCrunch's e-mail should be an easy thing for any Java programmer to do since it is solely concerned with business news within technology industries. Particularly, TechCrunch generates a steady stream of comprehensive news and reviews from a broad range of tech industries. I recommend skimming TechCrunch's daily e-mail to read only what is of interest. As time passes, you can begin to build a sense of which tech industries are hot, cold, and saturated (i.e., highly competitive).
  2. Listen to WSJ Podcasts - The Wall Street Journal What's News and Tech News Briefing are three to six minute podcasts that can expose you to industry news and trends that you would not be exposed to otherwise. For example, you can learn which companies and industries are failing due to the recession and, thus, plan a job change to a different industry before your company fails.
  3. Review the most profitable industries - I advocate reading Fortune 500's most profitable industries on an annual basis. The 2008 list of most profitable industries (from end of year 2007 data) was lead by Network and Other Communications Equipment, Mining/ Crude-Oil Production, and Pharmaceuticals. Working in an industry that is among the most profitable is an excellent strategy for increasing job security. Important questions to ask yourself are: what industry is my company competing in? Is the industry trending towards an increase or decrease in profitability? Is the industry growing such that there is room for new companies to make a profit without incurring tough competition from established companies?
Benefits of Business Learning

Benefits I have experienced from following business news and trends include the following.
  1. Business news stimulates ideas - A great way to get your creative and entrepreneurial juices flowing is to hear about what other entrepreneurs are doing, why some are successful, and why others fail.
  2. Visualize your career path - Having a pulse on your industry and other industries can help you plan career moves. In the short-term, it can give you a better understanding what is affecting the profitability of your current employer.
  3. Identify new opportunities - Subscribing to industry news and trends can put you in position to pounce on new opportunities. For example, in summer 2007, Facebook released the Facebook Platform allowing developers to build applications inside Facebook. Programmers that acted quickly experienced success while slow movers got lost in the shuffle. The same thing is now happening with mobile platforms. For example, developers can earn money developing applications for the iPhone that are sold at Apple's iPhone App Store or for Google's Android platform in the Android Marketplace. Success in these evolving markets requires continual monitoring so you can understand their market size and potential.
In sum, diversifying your knowledge can reduce your risk of unemployment and, thus, improve your chances of being a recession proof Java programmer.

How do you get your technology and business news? Which topics do you follow?

Wednesday, November 12, 2008

SWOT Analysis - Yahoo!'s Future Looks...

Yahoo!
Yahoo! is one of the oldest and largest Internet companies in the world. In the last year, TechCrunch has been chronicling Yahoo!'s management and merger issues. Interested in understanding Yahoo!'s situation from a long-term perspective, I have illustrated the profitability of the industry and performed a SWOT Analysis to generate strategies for Yahoo!'s management team.

Profitability of the Industry

According the CNN's Fortune 500 magazine, Yahoo! is in the Internet Services and Retail industry which is comprised of Amazon, Google, Liberty Media, IAC/InterActiveCorp, eBay, Sabre Holdings, and Expedia. In 2007, the Internet Service and Retail industry experienced a 7.0% return on revenues (i.e., efficiency of operations), a 5.0% return on assets (i.e., productivity of assets), and an 8.9% return on equity (i.e., power of equity). In 2007, Yahoo! operated near the industry average profitability with a 9.5% return on revenues, 5.4% return on assets, and 6.9% return on equity. In 2007, its main competitor, Google, led the industry with a 25.3% return on revenues and 16.6% return on assets, and was the industry runner up with a 18.5% return on equity. The following chart illustrates the recent trend in industry profitability with data from 2005, 2006, 2007. Specifically, the following chart shows that Yahoo!'s profitability has declined at the same pace as the industry's decline in profitability while Google's profitability has remained consistently strong. Further, Yahoo!'s profitability peaked in 2005 because their profitability in 2003 and 2004 was similar to their profitability in 2006 and 2007.

Yahoo!'s Stock Chart

The following stock chart shows how Yahoo!'s stock has been plummeting in recent months and, particularly, why a SWOT analysis is needed :)



Compete.com's Monthly Unique Visitors

Interestingly, as Yahoo!'s stock price has plummeted, its monthly unique visitors has remained steady with that of Google's monthly unique visitors. Further, Yahoo!'s 11/7/2008 Form 10-Q shows that their 2008 revenues are similar to their 2007 revenues but that their operating expenses have increased. Thus, Yahoo!'s stock price is correlated more with investor expectations of future profitability than it is with Yahoo!'s current usage and revenues.


Yahoo! SWOT Analysis

SWOT stands for Strengths, Weaknesses, Opportunities, and Threats. It is a brainstorming exercise to generate strategies that use internal strengths to maximize external opportunities, use strengths to minimize threats, minimize weaknesses by taking advantage of opportunities, and minimize weaknesses and threats.

Internal Strengths
  1. Affiliate partnerships with eBay, WebMD, Cars.com, Forbes.com, and the Newspaper Consortium
  2. Globally recognized brand
  3. Expansive Internet properties and ad network that includes Yahoo! Mail, My Yahoo!, Yahoo! Search, and Flickr
  4. 2.1 billion in cash and cash equivalents
  5. Copyrights, patents, and trademarks
  6. Developer APIs allow entrepreneurs to create mash-ups
Internal Weaknesses
  1. Management attrition
  2. Anti-takeover provisions make a third-party acquisition more difficult
  3. Less experience in managing a search service than competitors
  4. Weak blog and social network platform (i.e., Yahoo! 360)
  5. Outsourcing of data centers, data providers, and streaming content providers
External Opportunities
  1. Acquisitions of smaller technology companies including ad networks, social networks, and content providers
  2. Be acquired to create new synergies
  3. Internet usage on mobile phones is increasing
  4. Online video is growing
  5. Social networks are growing in usage but have are not as profitable as search engines
External Threats
  1. Recession causes a reduction in online advertising spending - most Yahoo! ad contracts are on per click basis or limited to one year in duration; in addition, search volumes can decline at any time
  2. Converging technologies and fierce competition from Google, Microsoft, and AOL
  3. Device and platform freeze out - for example, Google's Android mobile platform and Window's Internet Explorer encourage users to use their Internet services instead of Yahoo! services
  4. Traditional media companies are increasing competition for advertising dollars because they are putting more focus on online revenue (e.g., Disney, CBS, and NBC)
  5. U.S. and foreign government regulation of Internet, mobile, and Voice over Internet Protocol
  6. Network Neutrality ends and Yahoo! is required to pay usage fees to Comcast, AT&T, or Verizon
  7. Click fraud
Recommendations

The profitability of the industry is declining so Yahoo! needs to realign its strategies to regain investor confidence. The future for Yahoo! looks bright, considering how bleak things look now.

Use Internal Strengths to Maximize External Opportunities
  • Use 2.1 billion in cash and cash equivalents (strength #4) to buy Automattic, the makers of the blogging platform WordPress (opportunity #1 + weakness #4)
  • Use it affiliate partnerships (strength #1) to deliver ads on mobile phones (opportunity #3)
  • Use it affiliate partnerships (strength #1) to deliver ads on new social networks like MyYearBook.com (opportunity #5)
Use Strengths to Minimize Threats
  • Partner with Sprint whose CEO recently dissed Android (opportunity #3) to become the default services for mail, search, maps, and photos on Sprint phones (strength #3) and, thus, minimize device free out (threat #3)
Minimize Weaknesses by Taking Advantage of Opportunities
  • Acquire promising start-ups and their leaders (opportunity #1) to assemble a new senior leadership team (weakness #1)
Minimize Weaknesses and Threats
  • Remove anti-takeover provisions (weakness #2) to facilitate an acquisition (opportunity #2)
  • Partner with traditional media companies (threat #4) to deliver video content (opportunity #4) and social networking features (opportunity #5)
  • Use 2.1 billion in cash and cash equivalents (strength #4) to acquire third-party data centers, data providers, and streaming content providers (weakness #5)
Resources
  • Yahoo! Investor Relations
  • CNN's Fortune 500 Top Industries (2008)
  • CNN's Fortune 500 Top Industries (2007)
  • CNN's Fortune 500 Top Industries (2006)

Thursday, November 6, 2008

Obama’s Self-Fulfilling Economic Recovery Plan



What matters more to the future of our economy: public perception that the economy will recover or the latest reports on unemployment and the GDP? After Obama’s win, I’m not so sure. Can the mere fact that people believe Barack Obama will be better for the economy actually improve the economy? Setting aside an in-depth analysis of his economic policies for now, do the specific policies even matter that much when compared to the perceptions of American consumers?

With such a large majority of people trusting Obama over McCain to clean up the current economic mess, it seems almost a certainty that consumer confidence will recover somewhat now that Obama is headed for the Oval Office. The exact details of Obama’s proposed policies may not be the underlying reason for any new-found confidence (if it exists). A bigger factor may be that a majority of people simply believe that an Obama administration — or just a change in political party, for that matter — will be better for the economy.

If a majority of people believe that an Obama presidency will lead to a stronger economy, then, to some extent, it becomes a self-fulfilling prophesy. Consumer confidence is tied to people’s perception of the economy, not just the latest unemployment statistics. If consumers are more confident about an economic recovery, they will act accordingly (or should I say spend accordingly), which will, in turn, bring about an economic recovery. It’s a self-fulfilling prophecy!

In all honesty, I am part of the minority who do not agree with details of Obama’s economic policies. I do not believe that more middle-class tax cuts at the expense of corporations, investors, or people making more than $250,000 a year are the path to economic salvation. I think it risks creating an unfriendly business climate, which will harm growth and job creation at exactly the time when more jobs are desperately needed.

But whether or not I’m right about Obama’s tax policies may not matter as much as whether people just think the new policies will work. I, for one, am hopeful that's the case.