Blog Archives
Facebook IPO and the Future of Social Networking
Posted by Ronnie Diaz
Just in case the recent FB IPO has your wallet itchy, lets take a look at some interesting facts.
^ Zuckerberg himself invested in this project..
I’m not trying to sell you a product, but to give you a quick understanding, Diaspora is an example of a distributed social network.
A distributed social network is a really just Decentralized Computing, opposite of Facebook which is centralized.
Diaspora is just one example, you will see on the Wiki link above there are many attempting the same thing, just as there are many centralized social networks competing with Facebook.
Just a Fad?
I do not believe social networking is a Fad.
However, like all software systems it will be potentially subject to lackluster modules, stymied growth once it’s exceptionally large, and software evolution.
Now I’m not big on evolution in general.. but.. software does evolve.
If you try to think of a single example of a software system which has not evolved over time, you will find this list is very small..
What is it evolving into?
The answer to that question at best is an educated guess. But certain patterns in software systems, as well as the donation of Mark Zuckerberg to Diaspora (which is a direct competitor), hints the company may move in a more distributed direction – if not – it could risk getting left behind.
Let’s take a quick look at why Facebook is no different than these other systems.
These diagrams are obviously highly simplified, and don’t due justice to the rich history behind the growth of these systems, but they serve to illustrate a very strong theme in computing of growth through networking.
Every system that starts centralized eventually becomes decentralized and distributed. History does show that over expansion and distribution too rapidly spreads things thin, but in moderation it is a model for success.
To IPO, or not to IPO?
To summarize my overall assumption – centralized social networks will be replaced with decentralized ad hoc networks and/or the survival of social networks will be dependent on much tighter integration at the operating system level (which we are already seeing, look at the newest flavor of Fedora or Windows 8).
In investment terminology this means there may be very good long term profit to be made if FB makes the right decisions and continues to evolve at the same pace as society. This can easily be assessed over time, but is uncertain right now.
FB press releases do not seem to hint much at a distributed system or leaning heavier on tighter OS integration, and I believe these two key points to be critical to their long term growth.
Basic Risk Assessment
Stock predictions are guesses, with no promise of accuracy, but my estimation is a large majority of well funded shareholders already see the valuation of FB as a high volatility and high risk simply by considering FB’s reported revenue versus it’s valuation.
Many people are not aware that alot of these shareholders get a stake on the price of the IPO much earlier than the average joe, and in fact they inflate the price so once it is out the door it is already much higher than the stated “IPO price” you will see on the news, but never had the opportunity to get.
By the time you get to purchase, the majority % of these shareholders will be selling for short term gain. Even though brokerages and firms openly discourage this and it is frowned upon it still seems to mysteriously happen.. (look up LinkedIn’s graph on first day of trading)
In some cases this will happen so quickly that you won’t even notice, and you could quickly get pulled under the waves the second you jump in the water.
So if you want to risk holding for the long term and following FB’s growth, go for it, but if you’re trying to get rich quick, it is not likely.
References
Distributed Social Network (Wiki), http://en.wikipedia.org/wiki/Distributed_social_network
Fedora Project, http://www.fedoraproject.org
WebSequenceDiagrams, http://www.websequencediagrams.com/
Zuckerberg Diaspora Investment, http://www.wired.com/epicenter/2010/05/zuckerberg-interview/all/1
Windows 8, http://en.wikipedia.org/wiki/Windows_8
FB’s reported revenue, http://www.bloomberg.com/news/2011-09-20/facebook-revenue-will-reach-4-27-billion-emarketer-says-1-.html
FB’s estimated valuation, http://www.forbes.com/sites/ciocentral/2012/02/02/facebook-valuation-we-dont-know-what-we-dont-know/
the savedstate dictionary does not contain the expected values and might have been corrupted
Posted by Ronnie Diaz
This is a common error with custom action development, especially if you are working with your own custom installer class, not using wix or some other windows installer derivative.
Since many of the Google entries for this were unresolved, thought I would give it a quick tackle. 😉
First Solution
Throw an exception.
This solution seems to be the most popular among Google results.. You can throw a new Exception or InstallException, but this creates an unsightly error message which you would not want your users to see.
public override void Install(System.Collections.IDictionary stateSaver) { Process proc = new Process(); string path = Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(InstallHelper)).Location); proc.StartInfo.FileName = path + "\\somesubprocess.exe"; //note ProductCode argument is an installer variable proc.StartInfo.Arguments = "\"" + this.Context.Parameters["action"] + "\" \"" + this.Context.Parameters["ProductCode"] + "\" \"" + this.Context.Parameters["src"]; proc.Start(); //optional showwindow code to force window into foreground IntPtr msiwindowhandle; msiwindowhandle = FindWindow("#32770", InstallTitle); ShowWindow(msiwindowhandle, 0); if (proc.ExitCode == 1) { throw new InstallException("Installation cancelled. Any changes made will now rollback."); Process.GetCurrentProcess().Kill(); if (stateSaver == null) { stateSaver = new Dictionary<string, string>(); //Add some default values to the dictionary here...if you dare.. } base.Uninstall(stateSaver); base.Rollback(stateSaver); //will give you article title error } else { base.Install(stateSaver); } }
The code above was a bit much to simply explain the concept of throwing a new “InstallException”, but does illustrate there are definitely things you can do from your custom action bootstrap DLL which have room for error (like spawning a sub process!).
The Alternative
…is to simply click/call the cancel button for the base installer from your custom action code.
Since the msi installer process is separate from your bootstrap custom action DLL, you will have to use some old school tricks to work around the constraints.
Simply import User32.dll and call the “SendMessage” function, passing in the handle of cancel button. See code example below:
using System.Runtime.InteropServices; [DllImport("User32.dll", EntryPoint = "SendMessage")] public static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); [DllImport("user32.dll", SetLastError = true)] private static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle); [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr SetActiveWindow(IntPtr hWnd); [DllImport("user32.dll", SetLastError = true)] static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow); enum ShowWindowCommands : int { Hide = 0, Normal = 1, ShowMinimized = 2, Maximize = 3, ShowMaximized = 3, ShowNoActivate = 4, Show = 5, Minimize = 6, ShowMinNoActive = 7, ShowNA = 8, Restore = 9, ShowDefault = 10, ForceMinimize = 11 } public static string InstallTitle = "AppbarTitle"; //used to get the window handle public override void Install(System.Collections.IDictionary stateSaver) { ShowWindow(msiwindowhandle, ShowWindowCommands.Show); IntPtr cancelbuttonhandle; const int BM_CLICK = 0x00F5; msiwindowhandle = FindWindow("#32770", InstallTitle); cancelbuttonhandle = FindWindowEx(msiwindowhandle, IntPtr.Zero, "Button", "Cancel"); SetActiveWindow(msiwindowhandle); //necessary for button click to fire SendMessage(cancelbuttonhandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero); }
The MSDN Social article listed in my references below comes up in Google rankings high for the error the OP received when calling the Rollback method manually. To track any social momentum my solution may possibly gain, refer to this link.
References
MSDN Social, http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/ea7d09d1-2812-4f04-b6ed-e7293f2a2d75
wix, http://wix.sourceforge.net/
MSDN, “Installer.Rollback Method”, http://msdn.microsoft.com/en-us/library/system.configuration.install.installer.rollback.aspx
MSDN, “Installer.BeforeRollback Method”, http://207.46.16.248/en-us/library/system.configuration.install.installer.beforerollback%28VS.80%29.aspx