Thursday, May 14, 2009
MyMidwest MIT Hacks Article
So a while back, some hackers from MIT borrowed the cannon from Caltech's Fleming House. The inflight magazine for Midwest Airlines just published an article about hacks at MIT, and used one of my pictures of the cannon. While it's not the New York Times, it's still pretty cool in my book.
Friday, April 24, 2009
NSIS and MSI installers failing
So it's been a while since I've said anything; work's been busy.
One fun part of the canary process for this release was noticing partway through that our install rate started sucking. Some background: we use NSIS to build our main installer, which has its ups and downs. One of the performance enhancements of this release involved installing our managed assemblies into the Global Assembly Cache. However, Microsoft doesn't allow redistributing gacutil and we'd heard that rewriting gacutil using the .Net interface was time-consuming due to all the random corner-case error handling. NSIS doesn't have any sort of native support for installing to the GAC, either. We instead put together an MSI containing the assemblies to be GACd (and also installed into our Program Files folder, without including all the assemblies twice), built using WiX (which was really easy to slot into our build scripts). We then include that MSI in our NSIS installer, and call msiexec on it. Seems pretty straightforward, and since our installer already requires running as an admin, like there shouldn't be any trouble. Oh how wrong I was. While every machine in the office was able to successfully install, when we put it out in the field, it turned out we were losing 10% of our installs to the MSI failing to install. Not good.
Did some sleuthing, and fixed a few of the common errors (race conditions involving multiple MSIs being installed at once, and a few other smaller things), and got the failure rate down to 8%. Still not good. After much perusing of Google search results and MSDN, we worked around it. MSIs can install files located in external cabs, and WiX provides a convenient option to generate that cab. We now include both the MSI and the cab, and NSIS calls expand on the cab to put the assemblies into our Program Files folder while the MSI deals with putting them into the GAC. If the MSI fails, we won't startup as fast, but we'll still run at least.
End result is that the installer stays small by not including assemblies multiple times, if the MSI service is working on a machine, we'll get a startup speedup from GACing/NGENing the assemblies, and our install rate went back to normal.
One fun part of the canary process for this release was noticing partway through that our install rate started sucking. Some background: we use NSIS to build our main installer, which has its ups and downs. One of the performance enhancements of this release involved installing our managed assemblies into the Global Assembly Cache. However, Microsoft doesn't allow redistributing gacutil and we'd heard that rewriting gacutil using the .Net interface was time-consuming due to all the random corner-case error handling. NSIS doesn't have any sort of native support for installing to the GAC, either. We instead put together an MSI containing the assemblies to be GACd (and also installed into our Program Files folder, without including all the assemblies twice), built using WiX (which was really easy to slot into our build scripts). We then include that MSI in our NSIS installer, and call msiexec on it. Seems pretty straightforward, and since our installer already requires running as an admin, like there shouldn't be any trouble. Oh how wrong I was. While every machine in the office was able to successfully install, when we put it out in the field, it turned out we were losing 10% of our installs to the MSI failing to install. Not good.
Did some sleuthing, and fixed a few of the common errors (race conditions involving multiple MSIs being installed at once, and a few other smaller things), and got the failure rate down to 8%. Still not good. After much perusing of Google search results and MSDN, we worked around it. MSIs can install files located in external cabs, and WiX provides a convenient option to generate that cab. We now include both the MSI and the cab, and NSIS calls expand on the cab to put the assemblies into our Program Files folder while the MSI deals with putting them into the GAC. If the MSI fails, we won't startup as fast, but we'll still run at least.
End result is that the installer stays small by not including assemblies multiple times, if the MSI service is working on a machine, we'll get a startup speedup from GACing/NGENing the assemblies, and our install rate went back to normal.
Tuesday, September 30, 2008
lots of books
I've been taking advantage of my commute on BART to read a whole bunch of books, and the sad thing is I can't remember at this point which specific books I've read. Small Giants and Crossing the Chasm were both excellent with regards to startups. Fate is the Hunter is a pilot's autobiography that I found really good (although I've always been interested in anything related to flight). Where are the Customer's Yachts? and A Random Walk Down Wall Street are both classic investing texts. Confessions of an Economic Hit Man and Bootstrapping Your Business were both mediocre.
Modern day DLL hell
It's been a while, so I figure I'll put some random technical information on the web. At work, I just used ildasm and ilasm to take apart a Microsoft interop dll (Microsoft.Vbe.Interop.dll to be specific), change a reference to another DLL to use a hash of a privately signed copy, and then reassembled the DLL signing it with our private key. Short term, this allows us to workaround some fun with Visual Studio when it copies DLLs to the output directory and there are multiple DLL references with the same filename, but different strong names. Less concretely, this should help work around some issues that we see from time to time where users have messed up Office PIA installations.
Thursday, July 17, 2008
Warren Buffett and the Software Industry
While looking into some bugs today, I was reminded of a quote by Warren Buffett: "When a management team with a reputation for brilliance tackles a business with a reputation for bad economics, it is the reputation of the business that remains intact."
When you're building software on top of a platform of buggy software, no matter how perfect your software is, the underlying bugs will still remain and the reputation of your software will suffer for them.
When you're building software on top of a platform of buggy software, no matter how perfect your software is, the underlying bugs will still remain and the reputation of your software will suffer for them.
Tuesday, February 19, 2008
Freedom and Neurobiology
Freedom and Neurobiology is the paper form of a couple sets of lectures by John Searle. The first half of the book explores the interesting subject of whether it is actually possible to have free will given what we know about the determinism of the chemical and biological processes going on the brain. The second half goes into governmental power and how it came to exist. While interesting subjects, the book unfortunately reads like a lecture and can be a bit repetitive at times. Like a lot of other philosophers, Searle also raises more questions than he answers.
Sunday, January 27, 2008
Beautiful Code and Stardust
Beautiful Code is kind of like Founders at Work, except about programming instead of starting companies. This book, edited by Andy Oram and Greg Wilson, is a little hit or miss. Some of the essays are quite engaging and interesting, while others are dull and not particularly informative. Overall, it was a worthwhile read, and while it's not a book of patterns to be strictly applied while coding, there were definitely lessons that I'll remember as I work on future projects.
Stardust was a lot of fun to watch. It was sappy, and funny, and thoroughly entertaining. It's based on the novel by Neil Gaiman, which I haven't read, so I can't gauge how true to the book the movie is. I've really enjoyed what little of Gaiman's work I've read (and Mirrormask too), so I really need to sit down and read more of his novels.
Stardust was a lot of fun to watch. It was sappy, and funny, and thoroughly entertaining. It's based on the novel by Neil Gaiman, which I haven't read, so I can't gauge how true to the book the movie is. I've really enjoyed what little of Gaiman's work I've read (and Mirrormask too), so I really need to sit down and read more of his novels.
Subscribe to:
Posts (Atom)