Thought on the economy

by James Shaw 31. March 2009 16:33

Read the following news:

http://www.bloomberg.com/apps/news?pid=newsarchive&sid=atJq2AOruM1M

 

Couple of thoughts on the article:

 

- Larry Summers said now's NOT the time to have "less demand in America...There’s no place that should be reducing its contribution to global demand right now." I'm no economist but it makes me wonder how you can ever get out of a hole by digging yourself deeper.  It's illogical to me that as indebted as we are, we can just spend more and more and prosperity will come back. Like a family that already has a pile of debt, how can you get out of debt by getting into more debt? To get out of debt you cut costs and save, and the time to do that is immediately.  

 

- Countries like China that have saved are the ones that can afford to spend, not the US. China's being criticized for not spending enough, esp on its social security programs (75% of its stimulus is on infrastructures). To me they're being very careful with their money. Rather than bailing out failing companies they're spending money on stuff that will help them increase their productivity once the world economy gets better and demand is back, which is smart.

 

I'm also a little skeptical of government-implemented social security program; we've got one here in the U.S., but my generation can totally not depend on it. We still have to save for retirement ourselves. Maybe rather than counting on the government for retirement and other entitlements (other than protection again the unforeseen like health-care and unemployment), China's (granted it's a little too light on the entitlements) way is better in that it keeps citizens on their toes to save, and those big savings in the banks in turn generate the credit that fuels the economy. That's a healthy economy, not one based on borrowing and consumption.

 

Obama talks about the need to to get credit flowing again in this country, but true credit comes from savings, not from the central banks' printing money... So rather than spending, instead, as indebted as we are, we should save our way back to a sound economy. The alternative (borrowing more from foreigners and printing money, which is the action taken right now), will just keep us in this phantom economy that'll only last as long as the dollar doesn't collapse..., and there are already signs of it.

   

 

Beautiful Code

by James Shaw 13. March 2009 22:07
When coding recently, I found myself greatly appreciating C#'s rich features that reduce the number of lines of code written.  Let me elaborate.

There has been so many times when I find myself wanting to access a list of objects randomly, based on some field of that object.  To do it efficiently I'd want to use a dictionary to to access these objects, with the key being the field I want to find the object by.  This need happens so often with lists of different types of object (say from 3rd party API's you use) that it's best to write a generic helper function that can wrap a list of any type of object with a dictionary and returns that dictionary, rather than writing a helper function for list of each type of object.  The following is such code, using generics and reflection in C#:
 
    public class Util
    {
        ...
        /// <summary>
        /// generic method that wraps the given IEnumerable into a IDictionary with the given
        /// field (of the objects in IEnumerable) as the key.
        /// </summary>
        /// <typeparam name="KeyType"></typeparam>
        /// <typeparam name="ValType"></typeparam>
        /// <param name="src"></param>
        /// <param name="keyFieldName"></param>
        /// <returns></returns>
        public static IDictionary<KeyType, ValType> ToDictionary<KeyType, ValType>(IEnumerable<ValType> src,
                                                                                   string keyFieldName) 
            where KeyType : class
            where ValType : class
        {
            var ret = new Dictionary<KeyType, ValType>(src.Count() );

            foreach (ValType ele in src)
            {
                var key = typeof(ValType).GetProperty(keyFieldName, typeof(KeyType) ).GetValue(ele, null) as KeyType;
                ret[key] = ele;    
            }

            return ret;
        }

    }
 
With the above you can access a list of any objects like this:
 
            var attendeesById = Util.ToDictionary<string, Attendee>(attendees, "Id");
 
Here for example it assumes Attendee class contains an "Id" string property.  You can use Util.ToDictionary with IEnumerable of any other types of objects. 

Another good use of generics to reduce code I had was when parsing XML; when parsing XML frequently you want to parse an element's value to a .Net type, using int.parse() for example, if the element is supposed to contain an int.  Well I would just use int.parse() to do the job except that sometimes the element can be optional, so it's again nice to have a generic helper method that takes in an XML element and returns the appropriate type after parsing, or null if it's optional.  For example, when using the following code to parse XML,
 
    WebRequest httpRequest = HttpWebRequest.Create(url);
    using (var httpResponseStream = httpRequest.GetResponse().GetResponseStream())
    {
        var xmlRoot = XElement.Load(XmlReader.Create(httpResponseStream));
        var xmlNamespace = XNamespace.None;
        ret = new List<Event>(from result in xmlRoot.Descendants(xmlNamespace + "item")
                                    select new Event()
                                    {
                                        Id = XmlUtil.GetXElementValue(result.Element("id"), true),
                                        Name = XmlUtil.GetXElementValue(result.Element(xmlNamespace + "name"), true),
                                        Description = XmlUtil.GetXElementValue(result.Element(xmlNamespace + "description"), false),
                                        VenueName = XmlUtil.GetXElementValue(result.Element(xmlNamespace + "venue_name"), false),
                                        VenueLatitude = Util.ParseOptional<double>(XmlUtil.GetXElementValue(result.Element(xmlNamespace + "venue_lat"), false)),
                                        VenueLongitude = Util.ParseOptional<double>(XmlUtil.GetXElementValue(result.Element(xmlNamespace + "venue_lon"), false)),

                                        ... 
                                    });
 
The following helper methods in Util come in handly, esp Util.ParseOptional, which is shared code to parse any type that I want to parse out of XML and that has a parse method.  The more shared code (i.e., the less code a developer writes) the less chance for bugs :).
 
    public class XmlUtil
    {
        ...
        public static string GetXElementValue(XElement xe, bool required)
        {
            string ret = null;

            if (xe != null)
            {

                if (xe.Value != null)
                {
                    ret = xe.Value.Trim();
                }
                else if (required)
                {
                    throw new Exception(xe.Name + " should contain a value");
                }
            }
            else if (required)
            {
                throw new Exception("required XML element is missing");
            }

            return ret;
        }

    } // XmlUtil class


    public class Util
    {
        /// <summary>
        /// generic method that parses the given string to the given type, taking into account
        /// that the given string might be null.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="arg"></param>
        /// <returns></returns>
        public static Nullable<T> ParseOptional<T>(string arg) where T : struct
        {
            Nullable<T> ret = null;

            if (!string.IsNullOrEmpty(arg) )
            {
                var methodInfo = typeof(T).GetMethod("Parse",
                                                     new Type[] { typeof(string) });
                ret = methodInfo.Invoke(null, new object[] { arg }) as Nullable<T>;

            }

            return ret;
        }
 
 In summary, I find .Net's generics and reflection features very helpful in abstracting functionality further and reducing even more lines of code written.  The other features demonstrated in the snippets like Linq to Xml, variable type inference (the "var" keyword), and object initializer (the ability to initialize properties in constructor) also help a lot in writing less code, and really speed up development.  I recently had to switch coding between C# and Java, and what a difference it was without them: the Java code is a lot more lines (and thus more chance for bugs) and you just end up typing more.  
 
Java was a revolutionary language (and I learned it before C#) but it seems like in the evolution of languages C# has surpassed it (at least in terms of the core language features).  

Short ETF's a better way to short?

by James Shaw 20. January 2009 21:22

Shorting a stock can be a risky thing to do: unlike with a normal purchase of a stock where the most you lose is the original purchase price of the stock, the loss from shorting a stock can be unlimited should the market move against your prediction, during which time you'd suffer the additional agony of margin calls from your broker to cover your shorts, making it more expensive and psychologically debilitating to wait out the market to move in your direction.  Yet shorting can make very good sense at times, like the financial meltdown that occurred late last year which affected tons of the financial stocks; it would have been very rewarding to have shorted those stocks.  How do you play shorts while minimizing the drawbacks of shorting? 

 

I found that the short ETF's can be a good way to minimize the drawbacks of shorting.  ETF's (Exchange Traded Funds) are a financial instrument that holds other assets (like a mutual fund) to accomplish a very explicit, stated financial objective, like tracking an index (how well an ETF meets its stated objective depends on how well it's managed).  Short financial ETF's like SKF, for example, buys other financial instruments (e.g., derivatives like options) to seek twice the inverse of the daily performance of the Dow Jones Financial Index.  When you short using a short ETF, you buy it like a stock so your loss is not unlimited, and you have the ability to wait out market fluctation against your prediction, without the worry of margin calls :).

 

During November last year I bought and sold SKF at quite a big profit, for example; I had guessed the market right then (it was really obvious back then too with the financial stocks :)).  Later I bought SKF again, and this time I guessed wrong and it fell almost half, but because it was an ETF and not a pure short I didn't panic and was able to wait out the down-turn and sold when it came back up, and actually made a little profit too.  BTW I found technical analysis not very applicable to short ETF's (but again value investors probably don't think technical analysis works at all), so I wouldn't enter or exit based on it (exit when the profit is enough).

 

Normally I don't play shorts unless it's blatently obvious a market for shorts, and my conclusion is, if you're going to play shorts, it's safer to do it through the short ETFs; the drawback is that you can't short as granularly (you play by sector, like the financial stocks in this case, rather than a specific stock), but to me that's actually safer. 

 

P.S. This blog entry is just my personal opinion; please don't hold me liable for any financial decisions you make. 

Developing Facebook app on your local machine

by James Shaw 12. January 2009 18:23

Facebook used to let a developer specify the Callback URL to be localhost (e.g., http://localhost:56570/MyApp/) for an IFrame-canvas app such that as you develop your app, you can just test it on your local machine before pushing it out to your ISP.  That's no longer the case: you cannot specify a callback URL containing "localhost" anymore.  So how do you keep using localhost for debugging purposes during development?

Here's what I did:

1. You need to have another Facebook app, say "My App Dev", registered for development purpose (you'll need one anyways once you've released your app and need to develop incremental features). 

 

2. In this app have settings that parallel the production Facebook app except the "Post-Authorize Redirect URL".  Have the "Post-Authorize Redirect URL" point to a small HTML file (say "TestPage.htm") on your ISP that redirects back to localhost :).  Create TestPage.htm like the following:

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Untitled Page</title>

</head>

<body>

<script type="text/javascript">

var newWindowLocation = "http://localhost:56570/ThePageIWantPostAuthorize.aspx" +

                                    window.location.search; // get the query string that FB tags on, including "?"

window.location = newWindowLocation; // redirect to localhost

</script>

</body>

</html> 

So your "Post-Authorize Redirect URL" would be http://apps.facebook.com/myapp_dev/TestPage.htm", for example.

 

3. Make sure in your code use the right Facebook APIKey and Secret for the right release, since now that we have 2 "Facebook apps" for the same app.  With .NET for example, you can have the following in web.config:

 

<add key="APIKey" value ="My App's key"/>

<add key="Secret" value ="My App's secret"/>

<
add key="APIKey.debug" value ="My App Dev's key"/>

<add key="Secret.debug" value ="My App Dev's secret"/>

and use compile-time macro to determine which set of values to use in your code:

#if(DEBUG)

var apiKey = WebConfigurationManager.AppSettings["APIKey.debug"];

var secret = WebConfigurationManager.AppSettings["Secret.debug"];

#else

var apiKey = WebConfigurationManager.AppSettings["APIKey"];

var secret = WebConfigurationManager.AppSettings["Secret"];

#endif

The same compile-time macro can help you pick the right set of other properties like db connection strings, since you'll probably want to use a local database instead of the one on your ISP during development. 

With the above trick, with just one additional HTML file (TestPage.htm) uploaded to your ISP and an additional Facebook app registration, you are back to your happy self debugging on your local machine :).

P.S. Obviously this trick won't work for FBML-based canvas.

Tags:

Tech

How the current (and past) financial crises are built into the system

by James Shaw 18. December 2008 07:28

My sister sent me a great video on how our current monetary system works that I encourage all of you to see (watch all 5 parts).

It explains this question of how current and past financial crises are built into the system.  The reason is that nowadays money is backed by debt, e.g., every dollar banks create is backed by someone taking out loan from the bank, at interest (and to be more precise, every dolloar is only backed by a fraction of a loaned dollar, thanks to our fractional reserve system). The fact is that the system assumes in the future there will be more debt and therefore more money to pay off not only the loans but also the interest on them; it's basically assuming an ever-growing society, in terms of  productivity, economic activities, etc, that drives the need for more loans and thereby create the bigger money pool needed to fully back existing money pool (otherwise they are just paper) plus interest.

This assumption of an ever-growing society is not sustainable (because businesses do go bust) and can be downright dangerous, for the world to keep wanting to grow, depleting our natural resources on the way, and trying to achieve growth by perhaps taking excessive risks (like the mortgages and their packaged securities in this crisis). The central banks' (the Federal Reserves in the US) tinkering with the system by printing money without backing is not really solving the problem, and actually adds fuel to the fire by adding more debt to the citizens (inflation is really another form of tax) that assumes even bigger productivity (fingers crossed) in the future to repay it.
 

This begs the question that perhaps we should change our out-dated monetary system to not back our money by debt, or make our money an interest-free instrument. 

 

China Trip 2008

by James Shaw 6. December 2008 20:04

I better blog about my trip to China in September before I forget too much Tongue out.

I went to China for 3 weeks with GAP Adventures, a travel company that I highly recommend, esp if you're single Smile.  If you travel alone, they will pair you up with another single traveller to share a room in the hotel, unlike most other travel companies I found that force single travellers to pay more to stay in a single room.  This company's got trips to everywhere, even space!  The particular one I went on is called "China Experience".  Here's the people I travel with:

The places we covered include (in the order visited): Shanghai, Wuzhen, Hangzhou, Yangshou, Kunming, Chengdu, Lhasa, Xian and Beijing.  It was a lot of ground, and we not only experienced China as a tourist, but also as people livingthere, e.g., riding on the train in the same crowded section asordinary Chinese, visiting the country-side as well as the urban areas,etc. It was more physically engaging than just walking around (biked alot).  You can check out my photos with comments on Facebook; my fellow traveller Lars also took some pretty artistic pictures of the trip.

My favorite city out of the whole trip is Kunming in Southwestern China.  It's not a top tier city like Beijing or Shanghai, but the weather is a lot nicer, and it also seems less polluted.  It's in fact much like San Diego: dry and not humid, unlike most other Chinese cities.  Tibet also is also an interesting experience, simply because it's so different from the rest of China.  My overall impression is that some places of China are naturally gorgeous, some monuments are quite grand (see Leshan Buddha and the Great Wall in the pictures), some places are quite modern, but some places are also quite rural.  It's really a place of contrasts.

There are also cultural differences that took some getting used, even for me who came from Taiwan.  People spitting is common.  Everything is negotiable like the price of the stuff that stores/vendors sell.  At first I was quite embarassed to bargain when I buy stuff, but later I was told by a local that I should start bargaining at 30% of the initial price, and pay no more than 50%, otherwise I overpay.  It's really a good experience to bargain, since you'll need to learn to negotiate with people in life sooner or later, might as well start with the small stuff. 

It was funny that in Tiananmen Square I was approached by a lady that tried to sell me a hat for 15 yuan.  I said I'd only pay 5 yuan for it.  She said it cost her 8 yuan, and walked away pretty offended.  A while later I was about to leave, she came back herself, and sold it to me for 5 yuan, but still seemed pretty offended and kept saying I got a steal. 

Also people there can be quite pushy sometimes.  I was annoyed by a masseuse that kept trying to upsell me services, and a KTV bar that was pretty unscrupulous on their billing.   You just have to be very careful.

One thing I can get used to is that tipping is not customary at most places Tongue out.  I like the idea that good customer service is just a natural expectation of a business, rather than something you pay for; in most countries in Asia tipping is not customary.  I was also impressed by how they in general really work it to earn their money, e.g., store clerks doing their best to sell you stuff vs in the US those clerks just stand there.

China seems very dynamic with people hustling and bustling all the time to better their lives.  I think Jim Rogers is right when he said that "If you were smart in 1807 you moved to London, if you were smart in1907 you moved to New York City, and if you are smart in 2007 you moveto Asia."

 

McCain and Obama's tax policies

by James Shaw 27. October 2008 10:26

One obvious big factor in deciding which Presidential candidate to vote for is their tax policies, i.e., how will they affect my income.  The following is what I gathered from a tax newsletter that I subscribe to:

John McCain
• Repeal AMT for individuals but not businesses (corporations).
• Double the personal exemptions from $3,500 per person to $7,000.
• Raise the estate tax exemption to $5 Million and cut the estate tax to 15%, but not repeal the estate tax.
• Would permit portability of estate tax exemption for spouses (same as Obama). This would allow each spouse to make full use of his or her estate tax exemption and effectively double McCain’s estate tax exemption to $10 Million for married couples. This is a change from current law in that today if one spouse dies without using his or her full exemption, anything not used is effectively wasted.
• Maintain current tax rates (maximum 35%).
• Maintain 15% rate for long-term capital gains and many dividends.
Would reduce top corporate tax rate to 25%. It is currently about 39% for some corporate (C corporation) taxpayers.
• Maintain current Section 179 amounts for expensing.
• Raising taxes by Congress would require a 3/5 majority vote.

 

Barrack Obama
• Payroll tax credit of $500 per person or $1,000 per family to offset some payroll taxes.
• Reform the AMT to eliminate it from the middle class.
• Child and Dependent care credits, along with the savers credit, would increase.
• Would raise the estate tax exemption to $3.5 Million and lower the top tax rate to 45%.
• Would permit portability of estate tax exemption for spouses (same as McCain). This would allow each spouse to make full use of his or her estate tax exemption and effectively double Obama’s estate tax exemption to $7 Million for married couples.
• Would reduce the top corporate tax bracket to 30.5%.
• The top income tax bracket would go to 39.6%, a 4.6% increase and would apply to those who make $350K per year or more. All prior tax cuts under the Bush Administration would remain for those making $250K per year or less.
• An overhaul of the college tax savings and using a $4,000 tax credit per year per student to assist with educational costs. This would be a large tax savings to families with college students over the current law.
• The 15% long-term capital gains tax would increase to 20%.
• Taxes on dividends would be taxed as ordinary income and would lose its favorable current tax status.
• Would end the cap on the number of hybrid vehicles which qualify for favorable tax savings.
• Would help small businesses by offering a 20% tax credit (for investments up to $50K) for investments made to small businesses.
• 0% capital gains rates for start-up businesses to encourage investments in small businesses.

I've highlighted important distinctions (to me at least) between the two. 

What do people think?  Anything inaccurate?

Customizing Sharepoint 2007: Quick Post

by James Shaw 17. July 2008 09:29

In my 1st technical post I'd like to share how I implemented a delicious-like feature in a Sharepoint site (called "Quick Post") that lets users post a file or Url to a Sharepoint document library with one click of a button on any page of the site; the user can tag each post just like with delicious, and the site has tag cloud and searching-by-tags features for users to find info later; the user will get suggestions on existing tags when he tags. 

The following is a screen shot of the pop-up window after the user clicks on the Quick Post button in the site:  



The type just gives the user a choice on one of the two different document libraries.  The location is a toggle between the ASP.NET FileUpload control for file and TextBox control for Url, using Javascript.  

With this custom UI, the user is able to post a file or Url to the document library without leaving the page he's on, and in one screen (unlike the built-in multiple Sharepoint pages for adding a file or Url, and any tags in the tag field of the document library); the custom UI also has tag suggestion to maximize tag reuse :).

The Pop-up Window

The pop-up window you see in the screen shot is a DHTML window (which is better than a browser window because of pop-up blocker).  I'm all for re-using others' code as much as possible :), so for the pop-up window I used and would recommend this 3rd party widget.  Just include the 3rd party widget in your page that pops up the window (in our case the master page since the QuickPost button needs to show up everywhere):

    <link rel="stylesheet" href="http://devcentral/_vti_bin/windowfiles/dhtmlwindow.css" type="text/css" />   
    <script type="text/javascript" src="http://devcentral/_vti_bin/windowfiles/dhtmlwindow.js">
   
    </script>

and have the button click call the following javascript function:

        var quickPostWin = null;
       
        function openQuickPostWindow ()
        {
            quickPostWin = dhtmlwindow.open("quickPostBox",
                                            "iframe",
                                            "http://devcentral/Pages/QuickPost.aspx",
                                            "Quick Post",
                                            "width=650px,height=400px,resize=1,scrolling=1,center=1",
                                            "recal");                       

            if (quickPostWin.onclose == null)
            {
                quickPostWin.onclose=function(){ //Run custom code when window is being closed (return false to cancel action):
                    return true;
                }
            }               
           
        }

The content inside the window comes from a ASP.NET user control (.ascx).  The easiest way I found to develop custom pages in Sharepoint is to develop it in Visual Studio (so you take advantage of the designer support, code-behind, etc), and host it in a Sharepoint web part: a page viewer web part to host .aspx, or like in this case, a 3rd party smart part web part to host .ascx; the page shown in the DHTML window (http://devcentral/Pages/QuickPost.aspx) is just a Sharepoint page with one smart part web part that hosts a .ascx.  Sharepoint still has some way to go in terms of its integration with Visual Studio for development, and this is kind of a stopgap until MSFT builds the functionality of developing custom pages for Sharepoint right into Visual Studio.

AJAX functionality

As seen in the screen shot, Quick Post provides suggestions as the user starts typing in tags, just like delicious.  To add AJAX functionality like this, I used the AJAX Control Toolkit from codeplex; it contains quite a few extenders to ASP.NET controls to add AJAX to your web page, and in this case I used the auto-complete extender to the tags text box.

To use AJAX Control Toolkit in Sharepoint, make sure to reference it and include the ScriptManager in the page.  Since in our case we want AJAX functionality in every page (as in most cases I think), I just put the following in the master page:

<%@ Register Tagprefix="ajaxToolkit"
             Namespace="AjaxControlToolkit"
             Assembly="AjaxControlToolkit, Version=3.0.11119.26320,
             Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>

...

    <ajaxToolkit:ToolkitScriptManager ID="ScriptManager1" runat="server" />

Here I'm using AJAX Control Toolkit's implementation of the ScriptManager rather than the one in ASP.NET AJAX, as the former is supposed to be more efficient at sending the javascript down to the client.

The auto-complete extender itself is pretty straight-forward as documented: in my implementation, the web-service responding to the user key strokes in the tags text box just iterates over all records in the document library, extracts and parses the tags from the comma-separated tag field (using Sharepoint API's), and return the tags matching the given prefix.

There's perhaps one tricky thing in the web service.  In our Sharepoint site, the user is free to create sub-sites, and those sub-sites can contain library items with tags as well, so to make sure we capture all existing tags from all sites in this site collection, you need to make sure either every user has the permission to iterate over all sites, or elevate the privilege in the web service code somehow, .e.g, by impersonating a user that for sure has permission to do it:

            SPUser wssAccount = null;
            using (SPSite siteCollection = new SPSite("http://devcentral"))
            {
                // need to impersonate to iterate over all sub-sites
                wssAccount = siteCollection.OpenWeb().AllUsers["corp\\dcentral_wss_svc"];
            }
           
            using (SPSite impersonatedSiteCollection = new SPSite("http://devcentral", wssAccount.UserToken))
            {
               // iterate over all sites, get all the tags, and return matching tags

               ...

            }

The above will also do the trick any time your custom code using the Sharepoint API's needs to run in elevated privilege mode.

Storing Url in a Document Library

Sharepoint document libraries can have multiple content types, and when it does, the user can choose which content type it is when adding a record to a document library.  There's a "Link to a Document" content type that's well suited for storing Url's in a document library; in fact it can store link to another document as well.  For our Sharepoint site, however, we just need to support storing Url's.  

It's however not well documented how to add a document link programmatically, as I had to do for our custom UI.  When a user adds a document link to a document library, what happens behind the scenes is that Sharepoint actually creates an aspx file on the fly that does nothing more than redirecting to the document link Url you give, and it's the aspx file that's stored in the document library, just like a document stored in the document library.  A rather convoluted way to store links in my opinion, but that's the way the document link content type works.

After bugging him about it, Cliff Green from MSFT wrote up how to programmatically add a document link to a document library in his blog :).  Essentially you have a aspx template file that you read into memory each time you add a document link to a document library, after filling in the Url in the template file in-memory.

Conclusion

In this blog post, I've hopefully covered how to have custom pages in Sharepoint (leveraging Visual Studio designer), adding AJAX to your page, and how to have Url's in a document library.  In future posts I will share more customizations I've done in Sharepoint.  Hope this has been a useful read :).

Swimming

by James Shaw 15. June 2008 13:56

I started swimming again; it's hot lately in SD, and nothing beats swimming during a hot afternoon!

One complaint I have about swimming is that it's individual, i.e., not like volleyball where you play and bond with your friends.  It's like running but even more boring because at least with running you can listen to music.  That's one reason why I haven't swam as much.

Lately I bought a under-water MP3 player, SwiMp3


You hook these babies onto your goggles, and you've got music!  You can plug it into your computer's USB port, and upload any MP3's you want onto it (mine's a 256 MB version); it's also charged when it's plugged into your computer's USB port like that.

I just used it for the 1st time today; it was not bad.  The quality isn't as good as regular MP3 player (so don't expect to listen to book on CD), and be ready for a sudden volumn increase when you come out of the water.  It definitely makes my laps more interesting though, and you should consider it if you swim a lot and want some music too :).  

Tags:

Fun

TechEd 2008

by James Shaw 6. June 2008 13:51

TechEd 2008 just finished.  It was a blast!  I enjoyed it a lot.  Microsoft did a great job throwing a fairly smooth event, given the number of attendees, and pampering of the attendees, including a night at the Universal Studio.  See my picture with the Simpsons there:

Look.  They even provided bean bags for us to sleep on when we are exhausted from the conference:

The sessions themselves were about 1/3 bad, 1/3 good, and 1/3 excellent.  I have to give MS credit for trying to get feedback; I heard from one of the speakers that they have a monitor that constantly shows the bottom rated speakers who probably won't be invited back next year.  I also noticed a pattern of the MS speakers there: they are all PM's rather than developers.  Hmm...  Even most of the staff manning the product booths were PM's.  I asked one of them why there's no developers; he said that they'd rather work and finish the product.  Do you believe that?  :).

The excellent sessions I attended were (in case you want to view their videos online): "Asynchronous ASP.NET", "Silverlight Tips", and "ASP.NET AJAX Extensions Deep Dive" by Jeff Prosise, "ASP.NET Performance Black Belt" by Steven Smith, and "SEO for Developers" by Nathan Buggia.  I only went to the sessions based on the topic, and Jeff's sessions always overflowed.  Apparantly a lot of people went to sessions based on the speaker :).

These sessions are also good to check out: "IIS 7 Security and Tuning" by Ruslan Yakushev, "Silverlight Controls" by Karen Corby, "REST web services using WCF" by Jon Flanders, and "Optimizing Javascript and IE" by Cyra Richardson. 

At the conference, I was really impressed by Silverlight's capabilities and felt that it's really going to disrupt the web space.  I attended a BofF session (i.e., a peer discussion among TechEd attendees w/o MS) on Silverlight vs AJAX, and as people started listing out the pro's and con's of AJAX and Silverlight, it became clear that RIA like Silverlight is the superior solution and the next step of evolution in web development; AJAX is really an intermediate stage towards richer content/easier development (Google is solving ease of development with GWT, but there are just things you can't do with AJAX that you can do with Silverlight/plugin-type of model).  The one major drawback is searchability (Plugin model is still a black box that search engines can't crawl), but like Nathan said, it's something that all search engines are trying to crack and find a solution of. 

With all the talk about Silverlight, I also felt a bit deja vu.  In my college years Java applet was all the hype of the day, and, except more advanced graphics and a declarative model, it pretty much has everything Silverlight has (including a bridge with Javascript/Browser DOM).  Java applets didn't take off for some reason (non-ubiquitous broadband?).  It seems like we're going back full circle to a plugin-model of web development like Flex/Flash and Silverlight. 

I also saw an interesting book at the conference store and couldn't resist buying it:

I've skimed through it and think it's a pretty candid assessment of Microsoft today; it's written by a well-know Microsoft analyst Mary Jo Foley.  Check it out!

Overall it was a great experience for my 1st time at a Microsoft conference.  The MS people were friendly technical enthusiasts who seem genuinely passionate about technology, and I felt right at home talking to them :). 

Powered by BlogEngine.NET 1.4.5.0
Theme by Extensive SEO

About Me

 

View James Shaw's profile on LinkedIn

BlogRoll

Download OPML file OPML