<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10604489</id><updated>2012-01-24T19:16:00.549-08:00</updated><category term='voting'/><category term='theory'/><category term='field theory'/><category term='openbsd'/><category term='information theory'/><category term='clojure'/><category term='vmware'/><category term='cosmology'/><category term='politics'/><category term='programming'/><category term='quantum gravity'/><category term='lisp'/><category term='quantitative biology'/><category term='thermodynamics'/><category term='general relativity'/><category term='SUSY'/><category term='f#'/><category term='cdt'/><category term='quantum mechanics'/><category term='python'/><category term='string theory'/><category term='.net'/><category term='tdd'/><category term='ubuntu'/><category term='SAGE'/><category term='learning'/><category term='hapkido'/><title type='text'>Adam's Entropy</title><subtitle type='html'>One particular random walk through life.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10604489.post-1514377844630400634</id><published>2012-01-04T22:33:00.000-08:00</published><updated>2012-01-05T13:19:56.752-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='learning'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><category scheme='http://www.blogger.com/atom/ns#' term='general relativity'/><title type='text'>General Relativity flash-cards using Anki</title><content type='html'>&lt;a href="http://ankisrs.net/"&gt;Anki&lt;/a&gt; is a neat &lt;a href="http://www.supermemo.com/english/ol/background.htm"&gt;spaced repetition system&lt;/a&gt; that allows you to maximize memorization efficiency, or something like that. Interestingly, I came across it on the &lt;a href="http://groups.google.com/group/clojure"&gt;Clojure group&lt;/a&gt;, and there are already &lt;a href="http://blog.milehighcode.com/2012/01/use-you-spaced-repetition-system-for.html"&gt;decks available for learning Clojure&lt;/a&gt;. It accepts LaTeX, so I've decided to make a flash-deck of some handy formulas that pop up in General Relativity, because there's enough to learn without forgetting!&lt;br /&gt;&lt;br /&gt;(Also, it's handy to have LaTeX snippets someplace semi-permanent.)&lt;br /&gt;&lt;br /&gt;Bianchi identity:&lt;br /&gt;&lt;br /&gt;$\nabla_{[\lambda}R_{\rho\sigma]\mu\nu}=0$&lt;br /&gt;&lt;br /&gt;Christoffel symbol:&lt;br /&gt;&lt;br /&gt;$\Gamma_{\mu\nu}^{\lambda}=\frac{1}{2}g^{\lambda\sigma}\left(\partial_{\mu}g_{\nu\sigma}+\partial_{\nu}g_{\sigma\mu}-\partial_{\sigma}g_{\mu\nu}\right)$&lt;br /&gt;&lt;br /&gt;Covariant derivative of a 1-form:&lt;br /&gt;&lt;br /&gt;$\nabla_{\mu}\omega_{\nu}=\partial_{\mu}\omega_{\nu}-\Gamma_{\mu\nu}^{\lambda}\omega_{\lambda}$&lt;br /&gt;&lt;br /&gt;Covariant derivative of a vector:&lt;br /&gt;&lt;br /&gt;$\nabla_{\mu}V^{\nu}=\partial_{\mu}V^{\nu}+\Gamma_{\mu\lambda}^{\nu}V^{\lambda}$&lt;br /&gt;&lt;br /&gt;Covariant form of Maxwell's equations:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$\partial_{\mu}F^{\nu\mu}=J^{\nu}$&lt;br /&gt;&lt;br /&gt;$\partial_{[\mu}F_{\nu\lambda]}=0$&lt;br /&gt;&lt;br /&gt;for&lt;br /&gt;&lt;br /&gt;$J^{\nu}=\left(\rho,J^{x},J^{y},J^{z}\right)$&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;$F_{\mu\nu}=\left(\begin{array}{cccc}&lt;br /&gt;0 &amp;amp; -E_{1} &amp;amp; -E_{2} &amp;amp; -E_{3}\\&lt;br /&gt;E_{1} &amp;amp; 0 &amp;amp; B_{3} &amp;amp; -B_{2}\\&lt;br /&gt;E_{2} &amp;amp; -B_{3} &amp;amp; 0 &amp;amp; B_{1}\\&lt;br /&gt;E_{3} &amp;amp; B_{2} &amp;amp; -B_{1} &amp;amp; 0&lt;br /&gt;\end{array}\right)$&lt;br /&gt;&lt;br /&gt;Riemann tensor:&lt;br /&gt;&lt;br /&gt;$R_{\sigma\mu\nu}^{\rho}=\partial_{\mu}\Gamma_{\nu\sigma}^{\rho}-\partial_{\nu}\Gamma_{\mu\sigma}^{\rho}+\Gamma_{\mu\lambda}^{\rho}\Gamma_{\nu\sigma}^{\lambda}-\Gamma_{\nu\lambda}^{\rho}\Gamma_{\mu\sigma}^{\lambda}$&lt;br /&gt;&lt;br /&gt;Properties of the Riemann tensor:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$R_{\rho\sigma\mu\nu}=-R_{\sigma\rho\mu\nu}$&lt;br /&gt;&lt;br /&gt;$R_{\rho\sigma\mu\nu}=-R_{\sigma\rho\nu\mu}$&lt;br /&gt;&lt;br /&gt;$R_{\rho\sigma\mu\nu}=R_{\mu\nu\rho\sigma}$&lt;br /&gt;&lt;br /&gt;$R_{\rho[\sigma\mu\nu]}=0$&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ricci tensor:&lt;br /&gt;&lt;br /&gt;$R_{\mu\nu}=R_{\mu\lambda\nu}^{\lambda}$&lt;br /&gt;&lt;br /&gt;Ricci scalar:&lt;br /&gt;&lt;br /&gt;$R=R_{\mu}^{\mu}=g^{\mu\nu}R_{\mu\nu}$&lt;br /&gt;&lt;br /&gt;Einstein tensor:&lt;br /&gt;&lt;br /&gt;$G_{\mu\nu}=R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}$&lt;br /&gt;&lt;br /&gt;Formulae from Sean Carroll's &lt;i&gt;&lt;a href="http://preposterousuniverse.com/spacetimeandgeometry/"&gt;Spacetime and Geometry: An Introduction to General Relativity&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Anki synchronizes with DropBox, but it's &lt;a href="http://ankisrs.net/docs/SyncingMedia.html"&gt;a bit involved&lt;/a&gt;. When I get my deck synchronized and uploaded, I will post a link to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-1514377844630400634?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/1514377844630400634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=1514377844630400634&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1514377844630400634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1514377844630400634'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2012/01/general-relativity-flash-cards-using.html' title='General Relativity flash-cards using Anki'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-8390224497070846229</id><published>2011-12-01T04:04:00.001-08:00</published><updated>2011-12-01T15:32:52.524-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='tdd'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><title type='text'>Lisp Conversion</title><content type='html'>A few months and a lot of Lisp later, I find myself convinced/converted ...&lt;br /&gt;&lt;br /&gt;... To &lt;a href="http://clojure.org/"&gt;Clojure&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Rajesh, you were right!&lt;br /&gt;&lt;br /&gt;As far as language &lt;strike&gt;snobbery&lt;/strike&gt; coolness, it has a bunch of features I like such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A &lt;a href="http://clojure.org/dynamic"&gt;REPL&lt;/a&gt; for fast development&lt;/li&gt;&lt;li&gt;&lt;a href="http://clojure.org/functional_programming"&gt;Functional programming&lt;/a&gt; with &lt;a href="http://thinkrelevance.com/blog/2008/09/16/pcl-clojure-chapter-6.html"&gt;immutable values&lt;/a&gt;&amp;nbsp;which makes it easy to reason about concurrency&lt;/li&gt;&lt;li&gt;&lt;a href="http://clojure.org/concurrent_programming"&gt;Concurrent programming&lt;/a&gt; via &lt;a href="http://clojure.org/refs"&gt;software transactional memory&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A &lt;a href="http://hornbeck.wordpress.com/2009/07/05/lisp-1-vs-lisp-2/"&gt;Lisp-1&lt;/a&gt; &lt;a href="http://clojure.org/lisp"&gt;dialect&lt;/a&gt;&lt;/li&gt;&lt;li&gt;OOP benefits without OOP using &lt;a href="http://clojure.org/runtime_polymorphism"&gt;runtime polymorphism&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Lots of modern libraries by being &lt;a href="http://clojure.org/jvm_hosted"&gt;hosted on the JVM&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A &lt;a href="http://groups.google.com/group/clojure"&gt;vibrant community&lt;/a&gt;&amp;nbsp;(my &lt;a href="http://groups.google.com/group/fsharp-opensource"&gt;F# groups&lt;/a&gt;, by contrast, have had barely 2 messages in the past month)&lt;/li&gt;&lt;/ul&gt;To get an idea of what I mean, here's an anonymous function to find the odd numbers in a (lazy) &lt;a href="http://clojure.org/sequences"&gt;sequence&lt;/a&gt; (which could be a list, vector, or hash map):&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1354304.js"&gt; &lt;/script&gt;&lt;br /&gt;This idea of &lt;a href="http://formpluslogic.blogspot.com/2009/07/clojure-lazy-seq-and-recursion.html"&gt;lazy sequences&lt;/a&gt; is powerful, because you can do things like get the &lt;a href="http://clojure-euler.wikispaces.com/Problem+007"&gt;10,001st prime number&lt;/a&gt; without blowing the stack:&lt;br /&gt;&lt;script src="https://gist.github.com/1416617.js"&gt; &lt;/script&gt;&lt;br /&gt;You can just see the number-crunchy goodness, mixed in with Lispy functional precision.&lt;br /&gt;&lt;br /&gt;As far as practicality, there is simply too much awesome stuff.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The language itself is available on &lt;a href="https://github.com/clojure/clojure"&gt;GitHub&lt;/a&gt;&lt;/li&gt;&lt;li&gt;It has nice &lt;a href="http://clojuredocs.org/"&gt;documentation&lt;/a&gt;&amp;nbsp;to &lt;a href="http://dev.clojure.org/display/doc/Getting+Started"&gt;get you started&lt;/a&gt; quickly&lt;/li&gt;&lt;li&gt;There are great learning resources:&amp;nbsp;&lt;a href="http://www.4clojure.com/"&gt;4Clojure&lt;/a&gt;&amp;nbsp;&lt;a href="https://github.com/functional-koans/clojure-koans"&gt;clojure-koans&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Nice examples of algorithms such as&amp;nbsp;&lt;a href="http://www.algolist.net/Algorithms/Sorting/Quicksort"&gt;Quicksort&lt;/a&gt; using&amp;nbsp;&lt;a href="http://rosettacode.org/wiki/Sorting_algorithms/Quicksort#Clojure"&gt;Clojure&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://thinkrelevance.com/blog/2008/09/16/pcl-clojure.html"&gt;Easy translation&lt;/a&gt; from &lt;a href="http://www.gigamonkeys.com/book/"&gt;Practical Common Lisp&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A &lt;a href="http://www.jetbrains.com/idea/download/index.html"&gt;freely available&lt;/a&gt; &lt;a href="http://www.jetbrains.com/idea/"&gt;killer IDE&lt;/a&gt; &lt;a href="http://plugins.intellij.net/plugin/?id=4050"&gt;supporting Clojure&lt;/a&gt; with &lt;a href="https://github.com/technomancy/leiningen"&gt;project building&lt;/a&gt; and GitHub support&lt;/li&gt;&lt;li&gt;&lt;a href="http://webnoir.org/"&gt;Simple&lt;/a&gt; to &lt;a href="https://github.com/weavejester/compojure/wiki"&gt;complex&lt;/a&gt; web application support to &lt;a href="http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html"&gt;EC2&lt;/a&gt;, &lt;a href="http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/"&gt;Heroku&lt;/a&gt;, &lt;a href="http://googlecode.blogspot.com/2010/05/better-performance-in-app-engine-with.html"&gt;Google App Engine&lt;/a&gt; and others&lt;/li&gt;&lt;/ul&gt;You can easily do TDD (test driven development), which is really handy if, say, you've got a bunch of math functions that you want to be sure are correct when you port/rewrite code.&lt;br /&gt;&lt;br /&gt;Here's a screenshot of &lt;a href="http://www.jetbrains.com/idea/"&gt;IntelliJ&lt;/a&gt; with a typical &lt;a href="https://github.com/technomancy/leiningen"&gt;Leiningen&lt;/a&gt; project open:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-M-dYvAMiipM/TtfPdohU_mI/AAAAAAAA_vE/NeiVEH5OKHs/s1600/idea-lein.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="432" src="http://4.bp.blogspot.com/-M-dYvAMiipM/TtfPdohU_mI/AAAAAAAA_vE/NeiVEH5OKHs/s640/idea-lein.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can see the typical Leiningen project layout, with /src and /test folders and subfolders. First, we'll write a &lt;strike&gt;function&lt;/strike&gt;&amp;nbsp;test for a function we want which sums over all values in a given sequence:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1419076.js"&gt; &lt;/script&gt;&lt;br /&gt;The test is in C:\Projects\CDT\Newton\test\Newton.test\core.clj, and the :use [Newton.utilities] tells it to look in the file C:\Projects\CDT\Newton\src\Newton\utilities.clj for our function. Note the use of metadata ^{:utilities true} to mark this as a utilities test, which we'll use later for organization. Our test checks that our to-be-defined sum test sums correctly over both a list and a vector.&lt;br /&gt;&lt;br /&gt;Now here's the contents of C:\Projects\CDT\Newton\src\Newton\utilities.clj:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1419125.js"&gt; &lt;/script&gt;&lt;br /&gt;Finally, Leiningen allows us to choose test selectors so that we can specify which tests we want to run via project.clj:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1419165.js"&gt; &lt;/script&gt;&lt;br /&gt;Now by running lein at a command prompt (to save startup time) we can pick our tests:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-myffmQYgpC8/TtfWhU5qTQI/AAAAAAAA_vM/uTxhOaHJSO4/s1600/lein.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-myffmQYgpC8/TtfWhU5qTQI/AAAAAAAA_vM/uTxhOaHJSO4/s640/lein.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note in the first case, we don't expect any tests to run (test! means fetch dependencies and then run tests) because our sole test has been marked as a :utility. In the second case, we tell it to run :utility and it does, telling us that our test passed. Success!&lt;br /&gt;&lt;br /&gt;If our test had failed, clojure's test suite would give us good information. Here, I'm going to modify the second assertion to fail. Watch what happens:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-CqWRxYR47_Y/TtfXz8Po9GI/AAAAAAAA_vU/RvqznnUbXSk/s1600/lein-test-fail.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-CqWRxYR47_Y/TtfXz8Po9GI/AAAAAAAA_vU/RvqznnUbXSk/s640/lein-test-fail.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;How cool is that?&lt;br /&gt;&lt;br /&gt;I've so far read &lt;a href="http://www.manning.com/rathore/"&gt;Clojure in Action&lt;/a&gt; and &lt;a href="http://joyofclojure.com/"&gt;The Joy of Clojure&lt;/a&gt;&amp;nbsp;(both highly recommended), plus enough daily doses &amp;nbsp;to actually stop mucking about and start with the &lt;a href="https://github.com/ucdavis/CDT"&gt;CDT code&lt;/a&gt; already.&lt;br /&gt;&lt;br /&gt;So, a modern Lisp with powerful IDEs, modern libraries from the JVM, interactive REPL/TDD, great documentation, learning resources, and books -- what's not to like?&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-8390224497070846229?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/8390224497070846229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=8390224497070846229&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/8390224497070846229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/8390224497070846229'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2011/12/lisp-conversion.html' title='Lisp Conversion'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-M-dYvAMiipM/TtfPdohU_mI/AAAAAAAA_vE/NeiVEH5OKHs/s72-c/idea-lein.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-9110672789992292644</id><published>2011-04-19T01:09:00.000-07:00</published><updated>2011-04-19T01:52:23.760-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='f#'/><title type='text'>Reflection tools for F#</title><content type='html'>I went to the fabuluous &lt;a href="http://codeconf.com/"&gt;CodeConf 2011&lt;/a&gt; (view &lt;a href="http://lanyrd.com/2011/codeconf/slides/"&gt;slides&lt;/a&gt;, &lt;a href="https://github.com/blog/835-codeconf-2011-mission-accomplished"&gt;recaps&lt;/a&gt; &lt;a href="http://www.peebs.org/2011/04/codeconf-2011-day-one/"&gt;here&lt;/a&gt;, &lt;a href="http://thechangelog.com/post/4507882708/codeconf-sunday-summary"&gt;here&lt;/a&gt;, and &lt;a href="https://convore.com/codeconf/"&gt;here&lt;/a&gt;) and the first talk was "Tinker Fairy" &lt;a href="http://twitter.com/#!/drnic"&gt;Dr. Nic&lt;/a&gt; telling us to &lt;a href="http://lanyrd.com/2011/codeconf/sdmxb/"&gt;build tools&lt;/a&gt; to do stuff that we don't want to remember later. Then build tools to build those tools -- tool tools.&lt;br /&gt;&lt;br /&gt;One of the neat modern takes on Lisp &lt;a href="http://en.wikipedia.org/wiki/S-expression"&gt;s-expressions&lt;/a&gt; in modern virtual machines like the CLR is &lt;a href="http://en.wikipedia.org/wiki/Reflection_(computer_programming)"&gt;Reflection&lt;/a&gt;. At least, I think that it will be useful in reversing Lisp macros and expressions into the F#/OCAML equivalents.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://flyingfrogblog.blogspot.com/"&gt;Dr. Jon Harrop&lt;/a&gt; gives a terse but informative example in his book &lt;a href="http://fsharpnews.blogspot.com/2010/04/visual-f-2010-for-technical-computing.html"&gt;Visual F# 2010 for Technical Computing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First, we want a union type which represents (i.e. abstracts away) the F# type system:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/926994.js?file=F%23%20Types"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Next, we want a (recursive) function (called, straightforwardly enough, type_of) that reflects (using FSharpType) and translates a given System.Type object into one of the 'a ty union types defined previously:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/926997.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;This then allows us to emit the following two liner which can parse objects such as the List.fold function! (Note: everything after the ;; is the F# Interactive response.)&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/927012.js"&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Neat stuff! I've a thousand or two lines of Lisp to look at, so this is not something I want to have to remember later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-9110672789992292644?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/9110672789992292644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=9110672789992292644&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/9110672789992292644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/9110672789992292644'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2011/04/embedding-gists-in-blogger.html' title='Reflection tools for F#'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-8683047820261394986</id><published>2011-03-01T18:49:00.000-08:00</published><updated>2011-04-11T15:19:20.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Software Archaeology</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Vernor_Vinge"&gt;Vernor Vinge&lt;/a&gt; prophetically &lt;a href="http://books.slashdot.org/story/03/09/18/0411259/Review-A-Fire-Upon-the-Deep-Special-Edition"&gt;wrote of a time&lt;/a&gt; when programmer-archaeologists maintained the fabric of civilization by diving into and modifying legacy code which ran the systems that society depended upon.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Various other folks have picked up on this notion, from the &lt;a href="http://java.sys-con.com/node/487614"&gt;serious&lt;/a&gt; to the &lt;a href="http://giant-communist-robots.com/?p=154"&gt;humorous&lt;/a&gt;. Here, though, I'll talk about this from my own perspective (which is what you came here for, right?).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ieee.org/portal/cms_docs_societies/sscs/PrintEditions/200804.pdf"&gt;Kernighan's&lt;/a&gt; saw goes that debugging code is twice as hard as writing it; therefore we ought to keep our meaning clear and our code as simple as possible. How to do so?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are clear debates about that: &lt;a href="http://msdn.microsoft.com/en-us/library/bb669144.aspx"&gt;functional vs. declarative&lt;/a&gt;, &lt;a href="http://www.virtuosimedia.com/dev/php/procedural-vs-object-oriented-programming-oop"&gt;procedural vs. object-oriented&lt;/a&gt;, not to mention &lt;a href="http://books.google.com/books?hl=en&amp;amp;lr=&amp;amp;id=HBAuixGMYWEC&amp;amp;oi=fnd&amp;amp;pg=PA383&amp;amp;dq=patterns+and+antipatterns&amp;amp;ots=emzw4QN8Dj&amp;amp;sig=AFOJ5TeY4zHfa1pCKky8ux_X9hQ#v=onepage&amp;amp;q=patterns%20and%20antipatterns&amp;amp;f=false"&gt;Patterns &amp;amp; Anti-Patterns&lt;/a&gt;, &lt;a href="http://martinfowler.com/articles/injection.html"&gt;Dependency Injection/Loose Coupling&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"&gt;Aspect-Oriented Programming&lt;/a&gt;, etc. etc. These can be very fun to get into and there are diverse and subtle points all around, that I won't attempt to do them justice here but if you've a free week or two read any of the above links and the next five references thereafter and you'll come away more enlightened, or more confused.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But in the meantime, you've either got to a) emit working code or b) manage those who do a). And if you could do so without too badly embarrassing yourself in the future (which is nigh impossible), or at least, be willing to chalk them up as learning experiences, you're well on your way to some sort of nirvana of ineffable, crystallized logic which is a perfect solution to your problem.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Getting a clear problem statement itself being at least half of the battle and most of the difficulty, given business processes that aren't well understood, or mutate depending upon who's doing them or in which context. But that discussion more properly belongs in the realm of project management and business analysis, and won't be further remarked upon here.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you're not a coder yourself (or horribly out of date), you can still make a fair crack at judging the product by the team. &lt;a href="http://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959"&gt;The Mythical Man-Month&lt;/a&gt; is the canonical reference, but &lt;a href="http://www.joelonsoftware.com/"&gt;Joel Spolsky's&lt;/a&gt; &lt;a href="http://www.joelonsoftware.com/articles/fog0000000043.html"&gt;Joel Test&lt;/a&gt; is pretty concise, descriptive, and useful.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Archaeology can imply adventurous, sunburned types digging around fossil layers high in vast dusty mesas of stratified rock. And truth be told, that's not a bad analogy for the cacophony of systems that the average IT organization has inherited, cobbled together, purchased (often from a now-defunct vendor), or perhaps in a fit of creativity -- produced. After all, post dot-com, &lt;a href="http://footheory.com/blogs/donnfelker/archive/2008/05/05/software-development-greeenfield-vs-brownfield.aspx"&gt;Greenfield development&lt;/a&gt; is rare.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But Brownfield development is often so painful that most developers will throw up their hands and rewrite from scratch, rather than attempting to piece together the workings of an often poorly documented system written with "ancient" methods/languages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hence, onto the first item on the Joel Test: source control.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But not just any source control. &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Why GitHub? Well, first, it has the elusive "Alpha Coder mindshare". While it may not matter one way or another to your business that the Linux kernel, Git itself, jQuery, Ruby on Rails, and a host of other important projects exist on GitHub, it matters to your programmers, whether they know it or not (and the good ones will know it).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All of these actively maintained open source projects provide something more interesting than mindshare: examples. Pick a programming language, and you will very likely find an interesting project or two on GitHub that has something worth learning. It may even prove to be the Rosetta stone of programming languages -- you may find solutions to the same problem in many different programming languages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Second, &lt;a href="http://radar.oreilly.com/2009/01/github-making-code-more-social.html"&gt;Social Coding&lt;/a&gt;. Everyone knows of the usefulness of social networks -- they existed before, but it's the tools that made them marketable/actionable. Social coding in GitHub takes the usual forms -- followers, blogs, wikis, issues, teams, organizations -- plus some more useful ones (e.g. the &lt;a href="http://develop.github.com/"&gt;GitHub API&lt;/a&gt;).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We used Team Foundation Server. It was a nice tool in our .NET development shop -- a bit painful to setup with it's dependence on SharePoint, but useful. However, it didn't scale too well in terms of collaborators. We needed to add them as users into Active Directory, fuss about with SharePoint and licensing, and so forth.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So next we tried &lt;a href="http://www.codeplex.com/"&gt;CodePlex&lt;/a&gt;. CodePlex was, essentially, TFS in the cloud, and it mostly worked. There were capacity issues, and it wasn't always friendly with non .NET languages, but the main reason we didn't adopt it wholesale was:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;No way to make private repositories&lt;/li&gt;&lt;li&gt;Often painful to connect into&lt;/li&gt;&lt;li&gt;Went down/was slow often enough that we didn't want to rely on it.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;This really illustrates the third virtue of GitHub, that it's a true cloud service -- but cloud computing is all the hype right now and I really wanted to illustrate it's particular benefits in this instance.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In going with GitHub, we created an organization for our, well, organization. This gives us several important advantages over CodePlex:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Private repositories&lt;/li&gt;&lt;li&gt;Teams&lt;/li&gt;&lt;li&gt;Unlimited collaborators (in particular, we can mix and match between general GitHub accounts and team members)&lt;/li&gt;&lt;li&gt;Blogs, Wikis, Gists, Issue Trackers with voting, per-line file commenting, and other social features&lt;/li&gt;&lt;li&gt;Works well with any programming language&lt;/li&gt;&lt;li&gt;Fast, decentralized development (Git works locally, so you can get on a plane, code, and upload your changes once you've got internet access)&lt;/li&gt;&lt;li&gt;Reliable versioning (Git uses hashes for files)&lt;/li&gt;&lt;li&gt;Works well with any OS/IDE (Git has integration with Visual Studio, Eclipse, XCode plus command-line versions in most every OS)&lt;/li&gt;&lt;li&gt;Git is a well-regarded distributed version control system (DCVS)&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;My programming team ported projects over from TFS and CodePlex in under a day. By following projects, I can watch check-ins, view version differences, open/close issues, and do all the usual software management stuff without getting in the way. (Or better yet, delegate.)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The fees are pretty nominal (organizations get charged based on the numbers of private repositories they want; public ones are free). GitHub is hosted by RackSpace, so the reliability has been better than our in-house TFS boxes. Today I just added someone outside our organization to one of our projects with minimal hassle.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you're going to be digging up fossilized code, Git and GitHub are fairly pleasant tools for the job.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Look at the time! This isn't really everything I wanted to say, but I've probably said enough for now (and I have other pressing priorities including my own research), so I'll leave further pontificating for another time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I hope this was informative, or at least, entertaining!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(You can find me on GitHub &lt;a href="https://github.com/acgetchell"&gt;here&lt;/a&gt;!)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-8683047820261394986?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://en.wikipedia.org/wiki/Software_archaeology' title='Software Archaeology'/><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/8683047820261394986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=8683047820261394986&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/8683047820261394986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/8683047820261394986'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2011/03/software-archaeology.html' title='Software Archaeology'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-7800298410381553249</id><published>2010-12-03T15:23:00.000-08:00</published><updated>2010-12-03T17:50:41.325-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='politics'/><title type='text'>Socialism, Capitalism, Spending, oh my!</title><content type='html'>For a change of pace, I'm going to ruminate on the state of affairs as I see them. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(It's my blog, I get to exercise my &lt;a href="http://www.usconstitution.net/xconst_Am1.html"&gt;First Amendment&lt;/a&gt;! ;-)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Yes, I'm procrastinating. The cluster is down for maintenance, and I need a break from technical reading and writing.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My Pop shared an interesting article during Thanksgiving, which noted that way back in the beginning of the direct founding of the U.S.A., colonists in the 1600's tried a form of socialism wherein the results of the season's harvest were shared equally amongst the colonists.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(The account was written by the governor at the time, direct citations anyone?)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The official noted that there were many deaths due to starvation, much inequity in terms of labor given vs. food received, and so forth. On the whole, the colony was in danger of perishing as the vicious cycle of famine made the remaining colonists weaker and less able to work, thus reducing the harvest, and so forth.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In these dire straits, the next thing they tried was that they divided the land up equally amongst the families instead. Each family was free to keep the results of their work, and if they had excess, sell it for profit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The results were immediate: the next season's harvest was so bountiful that many families had excess, and those families that did not were able to buy from those that did. No one starved.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The official also notes the changes in motivation (paraphrasing): "Women who claimed infirmity and poor health when compelled to serve the community went willingly into their own fields with their children. The high (and unacceptable) costs that might have necessary to compel this behavior were no longer required ..."&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Score one for capitalism, individual thrift and perseverance, and ....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But wait. Where did they get the land?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Oh, that's right. &lt;b&gt;They were given it. &lt;/b&gt;Or, from another perspective, perhaps they stole it. (I don't want to get into those issues since there's even more controversy about that and it's incidental to my point.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The point is: the colonists were given the tools to feed themselves, and they then were allowed to make their own way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Capitalism is a fine system for efficient distribution of goods, services, and products. But it was an act of socialism (specifically, the land grant) that gave those first colonists the means to start on their new lives. (They had to supply the effort.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We're no longer an agrarian society. We're an &lt;a href="http://en.wikipedia.org/wiki/Information_society"&gt;information one&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What are the tools needed to make our way today?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'd argue for these, in descending order:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Health&lt;/li&gt;&lt;li&gt;Free flow of people, goods, services, and information&lt;/li&gt;&lt;li&gt;Education&lt;/li&gt;&lt;li&gt;Stability&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;I'd also argue that lack of any one of these items is problematic.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That last item may be even more difficult to quantify, except that you know it when you see it: wars, famines, natural disasters, stock market crashes, etc. Things too big for any individual or family to handle alone, something that requires a societal solution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The world is &lt;a href="http://stason.org/TULARC/science-engineering/nonlinear/index.html"&gt;chaotic&lt;/a&gt;. Trying to impose too much stability results in a dead/fragile/stratified society (see history for numerous examples). Too little, and &lt;a href="http://en.wikipedia.org/wiki/The_Road"&gt;no one can plan for the future&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are a &lt;a href="http://en.wikipedia.org/wiki/Mixed_economy"&gt;mixed socialist/capitalist society&lt;/a&gt;. Go towards any extreme for any of the above, and we will suffer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Define suffering: again, you know it when you see it. Death, disease, famine, wasted lives, inability to meaningfully affect your own destiny, loss of freedoms, etc. These are broad brush strokes, individuals/society will naturally have their own values.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So how do we provide the above to our citizenry in our society? How do we give the tools to be successful, without redistributing the results of that success &lt;a href="http://en.wikipedia.org/wiki/Fair_division"&gt;unfairly&lt;/a&gt;?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(This is not meant as an exhaustive analysis, but a mere framing of the problem.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Government spending:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now let me say from the outset, that like general relativity, I prefer solutions to be as localized as possible. I'd also like to remain as free as possible from any equations of constraint enforced by some larger entity. I don't dispute that some are necessary (anarchy is cool until you live in it), but I wonder if we are half as good at &lt;b&gt;removing laws&lt;/b&gt; as we are at &lt;a href="http://law.justia.com/"&gt;making them&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These entities need money to do their work. Right away that suggests a neat solution: &lt;a href="http://en.wikipedia.org/wiki/Laffer_curve"&gt;don't give them any&lt;/a&gt;. Unfortunately, that only works if you already have the means to provide the 4 items mentioned above. Clearly, not all individuals do, so a society based strictly upon "to each their own" would be &lt;a href="http://en.wikipedia.org/wiki/Plutocracy"&gt;manifestly unfair&lt;/a&gt;, and I do retain the silly idea that &lt;a href="http://www.theonion.com/articles/universe-admits-to-wronging-area-man-his-entire-li,18556/"&gt;the universe ought to be as fair as possible&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Oh wait, we're already a &lt;a href="http://en.wikipedia.org/wiki/Lobbying_in_the_United_States"&gt;plutocracy&lt;/a&gt;.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now spending itself is a moderately abstract formulation of reality: there are only so much goods, services, information, and time available.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Spend less than you make, and you have savings: for a rainy day, or to help someone else start something they couldn't otherwise do (perhaps with the hopes that you'll be compensated in the future for lending your resources today).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Spend more than you make (if you're allowed to), and you have debt, or future restrictions on your earning potential.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Pretty straightforward stuff.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It seems that Americans in general are now used to the consumption economy fueled by credit and debt, and we've passed that along to our government. Or perhaps it's the other way around.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's a fairly common rant, and I'll not repeat it except to say: we've obviously hit the limit on how much debt (monetary, environmental, etc.) we've incurred, and we should be looking to pay it off instead of increase it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This seems pretty simple to say and do, but let's watch how events unfold and see if the &lt;a href="http://paul.house.gov/index.php?option=com_content&amp;amp;view=article&amp;amp;id=1799:dont-raise-the-debt-ceiling&amp;amp;catid=31:texas-straight-talk"&gt;politicians actually realize&lt;/a&gt; that our government cannot continue to live beyond its means. At least the &lt;a href="http://www.fiscalcommission.gov/"&gt;Fiscal Commission&lt;/a&gt; is a start, although of course there are economists &lt;a href="http://www.csmonitor.com/USA/Politics/2010/1203/Is-deficit-commission-wrong-Critics-say-there-s-no-national-debt-crisis."&gt;who think it's not a problem after all&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm not an economist, but there seem to be some pretty &lt;a href="http://www.csmonitor.com/Commentary/the-monitors-view/2010/1202/After-the-deficit-commission-on-to-Plan-B"&gt;instructive examples&lt;/a&gt; that indicate otherwise.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Okay, back to considering things I have somewhat of a clue about.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-7800298410381553249?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/7800298410381553249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=7800298410381553249&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7800298410381553249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7800298410381553249'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2010/12/socialism-capitalism-spending-oh-my.html' title='Socialism, Capitalism, Spending, oh my!'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-6972250368535636216</id><published>2010-01-19T23:41:00.000-08:00</published><updated>2010-01-19T23:54:11.600-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>CDT rewrite toolbox</title><content type='html'>So, my colleagues have developed a &lt;a href="http://adamgetchell.blogspot.com/2007_10_01_archive.html"&gt;CDT&lt;/a&gt; program that's usable. Fortunately for me, it's in LISP, which lacks parallel processing, modern libraries, a nice IDE, and the other goodies I've become accustomed to in my work life. (That means I get to figure these features out and thereby contribute!)&lt;br /&gt;&lt;br /&gt;Enter Visual Studio 2008, &lt;a href="http://ironpython.codeplex.com/"&gt;IronPython&lt;/a&gt;, and &lt;a href="http://ironscheme.codeplex.com/"&gt;IronScheme&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Setting up IronScheme with Visual Studio 2008 was usefully detailed &lt;a href="http://ironscheme.codeplex.com/wikipage?title=IronScheme%20Visual%20Studio%202008%20Integration&amp;amp;referringTitle=Documentation"&gt;here&lt;/a&gt;: (note, you need &lt;a href="http://msdn.microsoft.com/en-us/library/bb707481.aspx"&gt;RegPkg&lt;/a&gt; via the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=30402623-93ca-479a-867c-04dc45164f5b&amp;amp;displaylang=en"&gt;Visual Studio 2008 SDK&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Setting up IronPython with Visual Studio 2008 via &lt;a href="http://ironpythonstudio.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=8934"&gt;IronPython Studio (integrated setup)&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;And voila, no more excuses to complain about development.&lt;br /&gt;&lt;br /&gt;(Yes, the end goal is to make it Python and cross-platform, although I'm really eying F#)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-6972250368535636216?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/6972250368535636216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=6972250368535636216&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/6972250368535636216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/6972250368535636216'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2010/01/cdt-rewrite-toolbox.html' title='CDT rewrite toolbox'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-7108953058372473775</id><published>2009-09-29T22:21:00.001-07:00</published><updated>2011-12-19T23:58:26.413-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hapkido'/><title type='text'>Hapkido Practicum Fall 2009</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;a href="http://pe.ucdavis.edu/Site/Welcome.html" id="hpy." title="Physical Education Program, UC Davis"&gt;Physical Education Program, UC Davis&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;Hapkido Practicum&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;Fall Quarter, 2009&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size: 100%;"&gt;Instructor: &lt;a href="mailto:acgetchell@ucdavis.edu" id="ra44" title="Adam Getchell"&gt;Adam Getchell&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Disclaimer:&lt;/b&gt; Techniques shown here are meant for informative/illustrative purposes. Just because I provide a link here, does necessarily mean I fully agree with all of the content shown. It does mean I think there is value in some of what is being demonstrated. As with all endeavors, a component of critical thinking is necessary.&lt;br /&gt;&lt;br /&gt;If something shown here works and makes sense to you, great! Practice diligently.&lt;br /&gt;&lt;br /&gt;If you don't understand or agree with something here, think about it, ask questions, form your own conclusions, and adjust your training accordingly. Martial Arts is an individual affair, albeit one with a common set of core principles derived from physics, anatomy, psychology, and other quantifiable discliplines.&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;In a time of crisis you do not necessarily have time to think!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Neither should you lose your wits about you. One of the best ways to avoid this is to know, in advance, what you are prepared to do, and commit to doing so. If (or when) the moment comes, you have a basis for action.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;9.28.09&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Discussion: &lt;a href="https://smartsite.ucdavis.edu/portal/site/1924da01-b95f-4e91-88be-9e8e22365851/page/decb05ac-7ae1-4341-aeff-7625bfac684e"&gt;Syllabus&lt;/a&gt;&lt;br /&gt;Warmups: Running, circling, &lt;a href="http://www.youtube.com/watch?v=7MGljX4bbps" id="r0jw" title="burpee"&gt;burpees&lt;/a&gt;, &lt;a href="http://www.youtube.com/watch?v=k3Z5Ag9AGgY" id="khx1" title="Gymnastics: steps to do a cartwheel"&gt;cartwheels&lt;/a&gt;, &lt;a href="http://www.youtube.com/watch?v=xS6nOqP4GpQ" id="sd06" title="Basic Movements in Gymnastics"&gt;gymnastics forward roll&lt;/a&gt;&lt;br /&gt;Techniques: &lt;a href="http://www.youtube.com/watch?v=G6bky8UEug8" id="ui21" title="Forward roll hankido style"&gt;Forward roll&lt;/a&gt;, &lt;a href="http://www.youtube.com/watch?v=zu-tix0pdQY" id="f7lx" title="MMA Footwork Secrets for Striking Power"&gt;footwork&lt;/a&gt;, &lt;a href="http://www.youtube.com/watch?v=LhezbNHHYno" id="c0.s" title="Elbow strike tutorial"&gt;elbow strikes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;Further updates can be found at: &lt;a href="http://docs.google.com/View?id=dckp3cwx_62csk8r4gk"&gt;http://docs.google.com/View?id=dckp3cwx_62csk8r4gk&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-7108953058372473775?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/7108953058372473775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=7108953058372473775&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7108953058372473775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7108953058372473775'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2009/09/hapkido-practicum-fall-2009_29.html' title='Hapkido Practicum Fall 2009'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-1844626316304949669</id><published>2008-11-11T22:44:00.000-08:00</published><updated>2011-12-27T16:09:40.396-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><title type='text'>Can LIGO detect a graviton?</title><content type='html'>A lecture given 10/27/08 by Professor Freeman Dyson of the Institute of Advanced Studies at Princeton, in honor of the 100th anniversary of the founding of the University of California, Davis.&lt;br /&gt;&lt;br /&gt;$E=\left(\frac{c^{2}}{32\pi G}\right)\omega^{2}f^{2}$&lt;br /&gt;is the energy per gravity wave, where f is the dimensionless amplitude/strain.&lt;br /&gt;&lt;br /&gt;$E_{s}=\frac{\hbar\omega^{4}}{c^{3}}$is the energy per graviton, taken from $\hbar\omega$ energy times $\frac{\omega^3}{c^3}$ density&lt;br /&gt;&lt;br /&gt;$f=\left(32\pi\right)^{\frac{1}{2}}\left(L_{p}\frac{\omega}{c}\right)$is the strain per graviton.&lt;br /&gt;&lt;br /&gt;$L_{p}=\left(\frac{G\hbar}{c^{3}}\right)^{\frac{1}{2}}=1.4\times10^{-33}cm$&lt;br /&gt;&lt;br /&gt;$\delta=\left(32\pi\right)^{\frac{1}{2}}L_{p}$&lt;br /&gt;Gives the linear displacement per graviton.&lt;br /&gt;&lt;br /&gt;Note that spherical objects can't radiate gravitational waves, and that binary stars produce kilohertz gravity waves.&lt;br /&gt;&lt;br /&gt;LIGO's threshold is therefore $10^{37}$ gravitons.&lt;br /&gt;&lt;br /&gt;$M\delta^{2}\geq\hbar T$is the uncertainty in position and velocity.&lt;br /&gt;&lt;br /&gt;$D\leq\left(\frac{GM}{c^{2}}\right)$(from combining previous two equations)&lt;br /&gt;&lt;br /&gt;$\delta^{2}\geq\frac{\hbar D}{M_{s}}$&lt;br /&gt;&lt;br /&gt;$\frac{GM}{c^{2}}\geq\left(\frac{c}{s}D\right)&amp;gt;D$exceeds the Schwarzschild radius, so impossible.&lt;br /&gt;&lt;br /&gt;Then the Bohr-Rosenfeld argument is:&lt;br /&gt;$\Delta E_{x}(1)\Delta E_{x}(2)\approx\hbar\left|A(1,2)-A(2,1)\right|$where A(2,1) is the field from dipole 2 at location 1.&lt;br /&gt;&lt;br /&gt;The detector is described by:&lt;br /&gt;$D_{ab}=m\int\Psi_{b}^{*}xy\Psi_{a}d\tau$where a is the initial state, b is the final state, and m is the detector mass.&lt;br /&gt;&lt;br /&gt;$\sigma(\omega)=\left(4\pi^{2}G\frac{\omega^{3}}{c^{3}}\right)\sum_{b}\left|D_{ab}\right|^{2}\delta(E_{b}-E_{a}-\hbar\omega)$&lt;br /&gt;&lt;br /&gt;$S_{a}=\int\sigma(\omega)\frac{d\omega}{\omega}$is the logarithmic average taken over the graviton cross section.&lt;br /&gt;&lt;br /&gt;$S_{a}=4\pi^{2}L_{p}^{2}Q$&lt;br /&gt;&lt;br /&gt;Now consider the gravitophotoelectric effect, where the graviton removes an electron.&lt;br /&gt;&lt;br /&gt;$Q=\int\left|\left(x\frac{\partial}{\partial y}+y\frac{\partial}{\partial x}\right)\Psi_{a}\right|^{2}d\tau$&lt;br /&gt;&lt;br /&gt;$Q=\frac{\int\bar{r}^{4}\left[f'(r)\right]^{2}d\bar{r}}{\int r^{2}\left[f(r)\right]^{2}dr}$&lt;br /&gt;&lt;br /&gt;$\int r^{4}\left[f'+\left(\frac{3}{2}r\right)f\right]^{2}dr&amp;gt;0$&lt;br /&gt;&lt;br /&gt;$Q&amp;gt;\frac{3}{4}$&lt;br /&gt;&lt;br /&gt;$f(r)=r^{-n}e^{-\frac{r}{R}}$&lt;br /&gt;&lt;br /&gt;$Q=1-\frac{n}{6}$&lt;br /&gt;&lt;br /&gt;$4\pi^{2}L_{p}^{2}=4\pi^{2}G\frac{\hbar}{c^{3}}=8\times10^{-65}cm^{2}$&lt;br /&gt;&lt;br /&gt;This means that if you take a detector the mass of the Earth, squash it into a large flat sheet, and run it for the lifetime of the universe, you'll detect 4 gravitons.&lt;br /&gt;&lt;br /&gt;From the Sun, there are $10^{8}$W of gravitons and $10^{25}$W of neutrinos, and we can detect gravitons about $10^{-35}$ less than neutrinos.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Special thanks to &lt;a href="http://www.mathjax.org/"&gt;MathJAX&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;and this post on how to use &lt;a href="http://irrep.blogspot.com/2011/07/mathjax-in-blogger-ii.html"&gt;MathJax in Blogger&lt;/a&gt;!&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;N.B. There's a good &lt;a href="http://blogs.discovermagazine.com/cosmicvariance/2009/07/05/catching-the-waves/"&gt;followup post&lt;/a&gt; on &lt;a href="http://blogs.discovermagazine.com/cosmicvariance/"&gt;Cosmic Variance&lt;/a&gt;, along with an &lt;a href="http://blogs.discovermagazine.com/cosmicvariance/2007/04/25/the-difficult-childhood-of-gravitational-waves/"&gt;earlier entry&lt;/a&gt; giving some good background information.&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-1844626316304949669?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/1844626316304949669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=1844626316304949669&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1844626316304949669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1844626316304949669'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/11/can-ligo-detect-graviton.html' title='Can LIGO detect a graviton?'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-1715498533835003885</id><published>2008-10-05T23:25:00.000-07:00</published><updated>2008-11-11T22:58:47.572-08:00</updated><title type='text'>A Nobel Pursuit</title><content type='html'>Well, the Nobel Prizewinners are to be announced &lt;s&gt;tomorrow&lt;/s&gt;Tuesday. In the spirit of fun (and to demonstrate how much science really does advance), here are some predictions and other fun facts gleaned from around the 'Net:&lt;br /&gt;&lt;br /&gt;Can you predict the Nobel Prizewinners in Chemistry &amp;amp; Physics by counting citations? Apparently not:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.symmetrymagazine.org/breaking/2008/08/27/nobel-prize-citations/"&gt;http://www.symmetrymagazine.org/breaking/2008/08/27/nobel-prize-citations/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Since this is an election year, it's interesting to note that 61 Nobel Laureates (including 22 physicists) -- the highest ever -- support Barack Obama for President:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sefora.org/2008/09/25/61-nobel-laureates-in-science-endorse-obama/"&gt;http://sefora.org/2008/09/25/61-nobel-laureates-in-science-endorse-obama/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Perhaps it's because Obama/Biden actually have a &lt;a href="http://pubs.acs.org/cen/news/86/i39/8639notw10.html"&gt;cogent science policy&lt;/a&gt;, and happen to believe scientists when they talk about evolution or global warming.&lt;br /&gt;&lt;br /&gt;Interestingly, &lt;a href="http://uk.reuters.com/article/scienceNews/idUKTRE49088V20081001"&gt;Reuters&lt;/a&gt; seems to think citations count for potential Nobel prizewinners:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://physics.about.com/b/2008/10/04/2008-nobel-prize-coming-soon.htm"&gt;http://physics.about.com/b/2008/10/04/2008-nobel-prize-coming-soon.htm&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;They think the contenders are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Vera Rubin&lt;/b&gt; at Carnegie Institute in Washington for her &lt;a href="http://www.amnh.org/education/resources//rfl/web/essaybooks/cosmic/p_rubin.html"&gt;work on Dark Matter&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Andre Geim&lt;/b&gt; and Kostya Novoslev for &lt;a href="http://www.sciencewatch.com/inter/aut/2008/08-aug/08augSWGeim/"&gt;Graphene&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://physicsworld.com/blog/2008/10/who_will_win_the_2008_nobel_pr.html"&gt;Physics World&lt;/a&gt; offers the following candidates:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.rle.mit.edu/rleonline/People/DanielKleppner_cv.html"&gt;&lt;b&gt;Daniel Kleppner&lt;/b&gt;&lt;/a&gt; at &lt;span class="caps"&gt;MIT &lt;/span&gt;for inventing the &lt;a href="http://www.freepatentsonline.com/3255423.html"&gt;hydrogen maser&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Berkeley’s &lt;b&gt;Saul Perlmutter&lt;/b&gt; and &lt;b&gt;Brian Schmidt&lt;/b&gt; at the Australian National University for their discovery that the &lt;a href="http://www.sciam.com/article.cfm?id=discovering-a-dark-universe"&gt;universe’s rate of expansion is increasing&lt;/a&gt;…leading to the concept of dark energy&lt;/li&gt;&lt;li&gt;&lt;span class="caps"&gt;MIT'&lt;/span&gt;s &lt;b&gt;Alan Guth&lt;/b&gt; and &lt;b&gt;Andrei Linde&lt;/b&gt; at Stanford University for their work on &lt;a href="http://en.wikipedia.org/wiki/Cosmic_inflation"&gt;inflation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Chapman University's &lt;b&gt;Yakir Aharanov&lt;/b&gt; for the &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Aharonov-Bohm_effect"&gt;Aharanov-Bohm effect&lt;/a&gt; and &lt;b&gt;Michael Berry&lt;/b&gt; at the University of Bristol for the &lt;a href="http://www.mi.infm.it/manini/berryphase.html"&gt;Berry phase&lt;/a&gt; -- the AB effect being related to the Berry phase&lt;/li&gt;&lt;li&gt;&lt;b&gt;John Pendry&lt;/b&gt; of Imperial College and Duke University's &lt;b&gt;David Smith&lt;/b&gt; for their prediction and discovery of &lt;a href="http://physicsworld.com/cws/article/print/17398"&gt;negative refraction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Roger Penrose&lt;/b&gt; at Oxford University and Cambridge's &lt;b&gt;Stephen Hawking&lt;/b&gt; for their contributions to general relativity theory and cosmology&lt;/li&gt;&lt;li&gt;&lt;b&gt;Atsuto Suzuki&lt;/b&gt; from Japan's &lt;a href="http://neutrino.kek.jp/"&gt;SuperKamiokande experiment&lt;/a&gt; and &lt;b&gt;Art MacDonald&lt;/b&gt; from &lt;span class="caps"&gt;SNO &lt;/span&gt;in Canada for their work on &lt;a href="http://www.phys.hawaii.edu/%7Ejgl/nuosc_story.html"&gt;neutrino oscillations&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; Who am I going to pick? Well, not because of any insight, but because of fondness for the topic I'm going with one of the cosmological predictions, either inflation, dark matter, or dark energy. Maybe they'll all be grouped together.&lt;br /&gt;&lt;br /&gt;Tune in &lt;s&gt;tomorrow&lt;/s&gt;Tuesday to see who wins!&lt;br /&gt;&lt;br /&gt;Update: &lt;span style="font-weight: bold;"&gt;Nambu&lt;/span&gt; (of the &lt;a href="http://en.wikipedia.org/wiki/Nambu-Goto_action"&gt;Nambu-Goto action&lt;/a&gt; for bosonic string theory), &lt;span style="font-weight: bold;"&gt;Kobayashi&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Masakawa&lt;/span&gt; (of the &lt;a href="http://en.wikipedia.org/wiki/Cabibbo-Kobayashi-Maskawa_matrix"&gt;Cabbibo-Kobayashi-Masakawa matrix&lt;/a&gt; which describes flavor-changing weak decays) share the &lt;a href="http://nobelprize.org/nobel_prizes/physics/laureates/2008/"&gt;Nobel prize for Physics in 2008&lt;/a&gt;, quite deservedly, for discovery of &lt;a href="http://hyperphysics.phy-astr.gsu.edu/hbase/forces/unify.html"&gt;spontaneous symmetry breaking&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-1715498533835003885?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/1715498533835003885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=1715498533835003885&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1715498533835003885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1715498533835003885'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/10/nobel-pursuit.html' title='A Nobel Pursuit'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-2210586757856508529</id><published>2008-04-20T16:21:00.001-07:00</published><updated>2008-05-04T19:24:18.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='theory'/><category scheme='http://www.blogger.com/atom/ns#' term='information theory'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum mechanics'/><category scheme='http://www.blogger.com/atom/ns#' term='voting'/><title type='text'>Are we living in a simulation?</title><content type='html'>Today I came across one of Dr. Nick Bostrom's &lt;a href="http://www.simulation-argument.com/simulation.html"&gt;existential philosophy papers&lt;/a&gt; regarding life vs. sim-life (aka are we living in the Matrix?).&lt;br /&gt;&lt;br /&gt;To me, the really interesting question is the assumption of substrate-independence (because I don't believe we're living in a simulation, more on that in a bit) -- that &lt;a href="http://en.wikipedia.org/wiki/Sentience"&gt;sentience&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Sapience"&gt;sapience&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Self-awareness"&gt;self-awareness&lt;/a&gt; can arise from any appropriately complex material, including computer processors. Is there some minimal complexity bound for intelligence? (First, tell me what you mean by &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/iq.pdf"&gt;intelligence&lt;/a&gt;.) On one hand, we already know that a virus is just a particular aggregation of molecules, and that any assemblage of those particular atoms will exhibit the same viral behavior. On the other, does that extend to a connection between viruses and the rest of the living world, and by analogy, to bottom-up intelligence?&lt;br /&gt;&lt;br /&gt;Will computers be able to exhibit sentience, sapience, or self-awareness?&lt;br /&gt;&lt;br /&gt;As an aside, although most people seem to know Seth Lloyd's &lt;a href="http://arxiv.org/abs/quant-ph/9908043"&gt;paper&lt;/a&gt; on the ultimate limits of computing, I tend to prefer Warren D. Smith's &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/fundphys.ps"&gt;Fundamental Physical Limits on Computation&lt;/a&gt; and &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/memorybound.ps"&gt;Fundamental physical limits on information storage&lt;/a&gt; as being more useful equation-wise (and he has very interesting papers on &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/jcj.pdf"&gt;election systems&lt;/a&gt; and &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/multisurv.pdf"&gt;voting&lt;/a&gt;, which doesn't surprise me when it concludes that our current voting system is nearly the worst mathematically possible, and that&lt;a href="http://www.math.temple.edu/%7Ewds/homepage/naturebees.pdf"&gt; Range Voting&lt;/a&gt; is a much better &lt;a href="http://www.math.temple.edu/%7Ewds/homepage/SSpf.pdf"&gt;algorithm&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;(Note that some the papers are in PS format, so you will need a PostScript reader such as &lt;a href="http://pages.cs.wisc.edu/%7Eghost/gsview/get49.htm"&gt;GSview&lt;/a&gt; along with &lt;a href="http://pages.cs.wisc.edu/%7Eghost/"&gt;GPL Ghostscript&lt;/a&gt; to read.)&lt;br /&gt;&lt;br /&gt;Before I get too sidetracked, let me outline my reasoning for why I don't believe we're living in a simulation:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The total entropy/information of our Universe is bounded at &lt;a href="http://arxiv.org/PS_cache/arxiv/pdf/0801/0801.1847v1.pdf"&gt;&amp;lt; 10E123&lt;/a&gt; (due to the &lt;a href="http://en.wikipedia.org/wiki/Holographic_principle"&gt;Holographic principle&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;A simple quantum computer with 500 entangled pairs generates more information than could be simulated by any non-quantum computer in this Universe (2^500 &amp;gt;&amp;gt; 10E123)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;If the Universe is not simulated to a quantum degree of accuracy, the simulation can be immediately exposed via &lt;a href="http://en.wikipedia.org/wiki/Bell%27s_theorem"&gt;Bell's inequality&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Thus, in order to create a virtual universe sufficient to withstand experimental quantum physics tests, you need 10E123 qubits (e.g., the Universe)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Anyways, this is a very interesting  topic, but I should continue my sidetracking avoidance and get back to my research.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-2210586757856508529?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/2210586757856508529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=2210586757856508529&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/2210586757856508529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/2210586757856508529'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/04/are-we-living-in-simulation.html' title='Are we living in a simulation?'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-7244553542099652125</id><published>2008-02-04T20:09:00.000-08:00</published><updated>2008-08-01T01:27:56.979-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><title type='text'>Causal Dynamical Triangulations updates</title><content type='html'>The papers to read to get started:&lt;br /&gt;&lt;a href="http://arxiv.org/abs/hep-th/0212340"&gt;&lt;br /&gt;A discrete history of the Lorentzian path integral&lt;/a&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/hep-th/0505154"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://arxiv.org/abs/hep-th/0505154"&gt;Reconstructing the Universe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then the usual:&lt;br /&gt;&lt;a href="http://arxiv.org/abs/hep-th/0105267"&gt;&lt;br /&gt;Dynamically Triangulating Lorentzian Quantum Gravity&lt;/a&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/abs/hep-th/0404156"&gt;&lt;br /&gt;Emergence of a 4D World from Causal Quantum Gravity&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/abs/hep-th/0411152"&gt;Semiclassical Universe from First Principles&lt;/a&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/abs/hep-th/0505113"&gt;&lt;br /&gt;Spectral dimension of the Universe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Thanks to this &lt;a href="http://www.physicsforums.com/showpost.php?p=585294&amp;amp;postcount=59"&gt;post&lt;/a&gt; from Marcus)&lt;br /&gt;&lt;br /&gt;And finally, the &lt;a href="http://arxiv.org/find/all/1/all:+AND+triangulations+AND+causal+dynamical/0/1/0/all/0/1"&gt;current literature&lt;/a&gt; on ArXiv.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-7244553542099652125?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/7244553542099652125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=7244553542099652125&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7244553542099652125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7244553542099652125'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/02/causal-dynamical-triangulation.html' title='Causal Dynamical Triangulations updates'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-6358235265680446898</id><published>2008-01-22T23:02:00.000-08:00</published><updated>2008-01-23T00:02:16.694-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='string theory'/><category scheme='http://www.blogger.com/atom/ns#' term='cosmology'/><category scheme='http://www.blogger.com/atom/ns#' term='quantitative biology'/><title type='text'>Cosmology and Quantitative Biology</title><content type='html'>Went to an interesting seminar today about detecting traces of the reheat portion of the Hot Big Bang (the part that occurs after inflation), papers not yet out on arxiv (links posted here when they come out).&lt;br /&gt;&lt;br /&gt;The interesting bits to relay back here are:&lt;br /&gt;&lt;br /&gt;1. Any symmetry breaking (Higgs, for example) invariably generates gravity waves. Thus, it's possible for to use gravity waves to probe all the way back to inflation, 10E-35 seconds.&lt;br /&gt;&lt;br /&gt;2. These gravity waves can be, in principle, detected by tabletop sized experiments! (There's a group trying to do that now). Unfortunately, there are issues of sensitivity that will make this rather difficult, but perhaps by, oh, 2020 we may detect relic gravity waves in the same way we've already detected the CMB.&lt;br /&gt;&lt;br /&gt;3. Another cosmic relic is leftover magnetic fields, of which theory predicts their strength and scale should be equivalent to what we're seeing today as galactic and intragalactic magnetic fields.&lt;br /&gt;&lt;br /&gt;4. Our guest seemed to expect to see copious production of strings and textures, which should be signified by their gravitational traces and provides further experimental tests of the &lt;a href="http://physicsworld.com/cws/article/print/30940"&gt;stringscape&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And in some other news, here's a &lt;a href="http://ptonline.aip.org/journals/doc/PHTOAD-ft/vol_61/iss_1/42_1.shtml"&gt;really fascinating article&lt;/a&gt; on bateriophages (viruses that infect bacteria) with some really nifty discussion points related to our nanotech thread. I won't spoil the article, it's well worth the read (it serves as a handy primer for nanotech issues), but an interesting result is the calculation of pressure inside the hard shell of a bateriophage, with experimental support, which shows that:&lt;br /&gt;&lt;br /&gt;1. Bacteriophages have double-helix DNA to serve as a spring to provide packing energy&lt;br /&gt;&lt;br /&gt;2. Bacteriophages rely upon this pressure to propagate, at least initially, into bateria.&lt;br /&gt;&lt;br /&gt;3. Viruses are basically mechanical, inanimate objects. They don't do anything except replicate, and any inanimate matter assembled into the particular protein configuration of a virus will behave like that virus; on the flip side, viruses have the exact electrical properties of any other similar-sized particle in a colloidal suspension.&lt;br /&gt;&lt;a href="http://ptonline.aip.org/journals/doc/PHTOAD-ft/vol_61/iss_1/42_1.shtml"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-6358235265680446898?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/6358235265680446898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=6358235265680446898&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/6358235265680446898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/6358235265680446898'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/01/cosmology-and-quantitative-biology.html' title='Cosmology and Quantitative Biology'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-5351993217975413868</id><published>2008-01-22T03:39:00.000-08:00</published><updated>2008-01-22T03:46:32.854-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='field theory'/><title type='text'>Ultra-strong electric and magnetic fields, monopoles</title><content type='html'>&lt;a href="http://www.amolf.nl/publications/pdf/4339.pdf"&gt;Response of Polyatomic Molecules to Ultrastrong Laser- and Ion-Induced Fields&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/astro-ph/pdf/0002/0002442v1.pdf" target="_blank"&gt;Physics in Ultra-strong Magnetic Fields&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-5351993217975413868?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/5351993217975413868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=5351993217975413868&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/5351993217975413868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/5351993217975413868'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/01/ultra-strong-electric-and-magnetic.html' title='Ultra-strong electric and magnetic fields, monopoles'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-7563670788575608372</id><published>2008-01-16T21:13:00.000-08:00</published><updated>2008-01-22T03:49:02.626-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum mechanics'/><category scheme='http://www.blogger.com/atom/ns#' term='general relativity'/><title type='text'>Undecidability, Regularity, and Decoherence</title><content type='html'>&lt;a href="http://arxiv.org/PS_cache/arxiv/pdf/0801/0801.2564v1.pdf"&gt;Modern space-time and undecidability&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Quantum_decoherence"&gt;Quantum Decoherence&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-7563670788575608372?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/7563670788575608372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=7563670788575608372&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7563670788575608372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7563670788575608372'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2008/01/undecidability-regularity-and.html' title='Undecidability, Regularity, and Decoherence'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-28171976180272627</id><published>2007-12-08T12:04:00.000-08:00</published><updated>2007-12-10T11:09:44.700-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SAGE'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Dynamical Triangulations, SAGE</title><content type='html'>The first paper I read for Causal Dynamical Triangulations is a fairly steep introduction (for me), so I went and looked over the &lt;a href="http://arxiv.org/abs/hep-th/9805108"&gt;2D&lt;/a&gt; case and &lt;a href="http://arxiv.org/abs/hep-th/9806241"&gt;lessons&lt;/a&gt;, as well as a general &lt;a href="http://relativity.livingreviews.org/Articles/lrr-1998-13/"&gt;review&lt;/a&gt; of methods.&lt;br /&gt;&lt;br /&gt;I'm also looking at &lt;a href="http://www.sagemath.org/"&gt;SAGE&lt;/a&gt;, Software for Algebra and Geometry Experimentation, a free mathematical programming system using &lt;a href="http://www.python.org/"&gt;Python&lt;/a&gt; + a lot of open source tools. On Windows, SAGE  &lt;a href="http://www.sagemath.org/SAGEbin/microsoft_windows/README.txt"&gt;requires&lt;/a&gt; &lt;a href="http://www.vmware.com/products/player/"&gt;VMWare&lt;/a&gt; and uses firefox. You can use it &lt;a href="https://sage.math.washington.edu:8103/login"&gt;online&lt;/a&gt;, but so far it's rather slow, and appears to have been &lt;a href="http://science.slashdot.org/science/07/12/08/1350258.shtml"&gt;slashdotted&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Impressive tool! Feels a lot like Mathematica, accessible via web browser. The &lt;a href="http://modular.math.washington.edu/sage/doc/html/tut/tut.html"&gt;tutorial&lt;/a&gt; is well-worth running through (I used the on-line version while upgrading my local install, but the local version allows you to run the calculation cells using Shift-Enter ).&lt;br /&gt;&lt;br /&gt;For example, SAGE extends Python to handle &lt;a href="http://en.wikipedia.org/wiki/Ring_%28mathematics%29"&gt;rings&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/P-adic_number"&gt;p-adic&lt;/a&gt; numbers (which I learned, should always have a prime number base to avoid the zero-divisor problem).&lt;br /&gt;&lt;br /&gt;Adding dvipng SAGE package requires adding ghostscript, via apt-get install gs.&lt;br /&gt;Also requires libkpathsea, which requires tetex via apt-get install tetex-extra&lt;br /&gt;&lt;br /&gt;PostScript: the SAGE dvipng package doesn't work, but apt-get install dvipng puts dvipng on the system, which should suffice.&lt;br /&gt;&lt;br /&gt;Note: SAGE runs on Edgy, and can be updated to Feisty by using update-manager-core as described &lt;a href="http://www.ubuntu.com/getubuntu/upgrading"&gt;here&lt;/a&gt;. The &lt;a href="http://groups.google.com/group/sage-support"&gt;SAGE-support&lt;/a&gt; group is available on Google Groups.&lt;br /&gt;&lt;br /&gt;PostScript: SAGE can be upgraded to Gutsy, I used the Upgrade Manager available in Xubuntu (I wanted a GUI for some SAGE file management via apt-get install xubuntu-desktop)&lt;br /&gt;&lt;br /&gt;Doesn't work yet on BSD, alas, and running a SAGE server has security implications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-28171976180272627?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/28171976180272627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=28171976180272627&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/28171976180272627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/28171976180272627'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/12/dynamical-triangulations-sage.html' title='Dynamical Triangulations, SAGE'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-2507375099107044993</id><published>2007-11-18T20:48:00.000-08:00</published><updated>2007-11-19T01:24:42.909-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='f#'/><title type='text'>ProjectEuler on F#</title><content type='html'>So, whilst poring through Pickering's book and browsing through &lt;a href="http://tomasp.net/about/fsharp.aspx"&gt;Tomas Petricek's blog&lt;/a&gt; (which has a promising &lt;a href="http://tomasp.net/articles/fswebtools-intro.aspx"&gt;F# AJAX toolkit&lt;/a&gt;, which alas, doesn't work yet) and stealing glances at the &lt;a href="http://caml.inria.fr/pub/docs/oreilly-book/html/index.html"&gt;O'Reilly online OCAML book&lt;/a&gt;, I decided to write some programs to exercise my understanding of the material. After some stumbling, I found &lt;a href="http://projecteuler.net/index.php?section=problems"&gt;Project Euler&lt;/a&gt;, a great site full of math programming puzzles.&lt;br /&gt;&lt;br /&gt;I solved &lt;a href="http://projecteuler.net/index.php?section=problems&amp;amp;id=1"&gt;Problem #1&lt;/a&gt; naively in ~ 10 lines of F# using list comprehensions and recursion (I've seen a one-liner using Seq.fold). &lt;a href="http://projecteuler.net/index.php?section=problems&amp;amp;id=2"&gt;Problem #2&lt;/a&gt; builds on this and takes about 30, including a debugging function to print results (&lt;a href="http://blogs.msdn.com/chrsmith/archive/2007/10/26/Project-Euler-in-F_2300_-_2D00_-Problem-2.aspx"&gt;better solutions&lt;/a&gt;, using Seq.unfold, do it in 10). I posted my code solutions to the &lt;a href="http://projecteuler.net/index.php?section=forum"&gt;forum&lt;/a&gt;, so as not to spoil anyone else's fun (you can only post to the forum for that problem after you've solved it). It's very interesting to see all of the other solutions in different languages, and the algorithm discussion is fascinating too.&lt;br /&gt;&lt;br /&gt;It's also quite impressive how easily F# morphs into math problems (though I am still writing some horrid C#/F# hybrid presently).&lt;br /&gt;&lt;br /&gt;Oh, and here's a nifty 100-line podcast downloader, &lt;a href="http://dcooney.com/ViewEntry.aspx?ID=499"&gt;slurppodcasts&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(Note that &lt;span style="color: rgb(51, 51, 255);"&gt;Idioms.using&lt;/span&gt; is no longer necessary, since &lt;span style="color: rgb(51, 51, 255);"&gt;using&lt;/span&gt; is integrated into F#)&lt;br /&gt;&lt;br /&gt;Finally, here's &lt;a href="http://feeds.feedburner.com/planet_fsharp"&gt;Feedburner's Planet F#&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-2507375099107044993?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/2507375099107044993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=2507375099107044993&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/2507375099107044993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/2507375099107044993'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/11/projecteuler-on-f.html' title='ProjectEuler on F#'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-7160386650598780178</id><published>2007-11-11T20:40:00.000-08:00</published><updated>2007-11-18T21:39:58.405-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='information theory'/><category scheme='http://www.blogger.com/atom/ns#' term='thermodynamics'/><category scheme='http://www.blogger.com/atom/ns#' term='quantum mechanics'/><category scheme='http://www.blogger.com/atom/ns#' term='f#'/><title type='text'>F#, Regge Calculus, and other interludes</title><content type='html'>Still working on &lt;a href="http://adamgetchell.blogspot.com/2007_10_01_archive.html"&gt;Causal Dynamical Triangulations&lt;/a&gt;, I've also taken some time out to (start to) learn a delightful new functional programming language, &lt;a href="http://research.microsoft.com/fsharp/fsharp.aspx"&gt;F#&lt;/a&gt;, with the help of a good &lt;a href="http://cs.hubfs.net/"&gt;site&lt;/a&gt;, online &lt;a href="http://www.ffconsultancy.com/products/fsharp_journal/"&gt;journal&lt;/a&gt;, and this &lt;a href="http://strangelights.com/"&gt;book&lt;/a&gt;. Mixing functional, imperative, and object-oriented programming with good mathematics features and the .NET framework allows me to blend work and academics. The goal is to write a first-cut CDT program in F# and refine as necessary ....&lt;br /&gt;&lt;br /&gt;CDTs depend upon &lt;a href="http://en.wikipedia.org/wiki/Regge_calculus"&gt;Regge calculus&lt;/a&gt;, which is essentially a prescribed way for dividing up spacetime into a discrete lattice (simplexes) while adhering to the Einstein field equations. (Regge calculus is explained in detail in Chapter 41 of &lt;a href="http://www.amazon.com/Gravitation-Physics-Kip-S-Thorne/dp/0716703440/ref=ed_oe_p/002-3874810-3091246"&gt;Gravitation, aka the Big Black Book&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;In particular, you divide up a smooth 4-manifold into a collection of 4-d simplexes, in the same way you can divide up a 3-sphere into the (2-)triangles of the icosohedron. If you pressed the icosohedron perfectly flat onto a plane, you would see &lt;span style="font-style: italic;"&gt;deficit angles&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;hinges&lt;/span&gt; that essentially reflect the its spherical curvature. In the same way, you analyze the simplices of the 4-d manifold to determine its curvature.&lt;br /&gt;&lt;br /&gt;If you are extraordinarily careful in how you setup your lattice, you can perfectly constrain your volume using just fixed edge lengths. (For example, a &lt;a href="http://en.wikipedia.org/wiki/Tessellation"&gt;tiling&lt;/a&gt; of triangles constrains a surface rigidly, because the tiling cannot be deformed without changing edge lengths. A tiling of squares does not, because the squares can be squashed sideways into parallelograms without changing their edge lengths.)&lt;br /&gt;&lt;br /&gt;And if you do this, you can now examine that volume (or brane, or bulk ) by solving the Einstein equations expressed in terms of conditions on the hinge angles (which are themselves functions only of the edge lengths). This is exciting because you can now program a computer (carefully) to solve problems that don't lend themselves to analytic solution, which allows you to do interesting things:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/gr-qc/pdf/0506/0506071v2.pdf"&gt;Discrete quantum gravity in the framework of Regge calculus formalism&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the past few weeks, I've also taken time to read up on a few areas of interest.&lt;br /&gt;&lt;br /&gt;Perhaps one of the more interesting recent occurrences is the recent re-examination of the 2nd law of  thermodynamics, long thought to be inviolable and one of the most solid foundations of physics by such luminaries as Maxwell, Einstein, Eddington, and Brilloun.&lt;br /&gt;&lt;br /&gt;Physics is always fun, check your assumptions at the door!&lt;br /&gt;&lt;br /&gt;First, a nice publicly accessible summary:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/cond-mat/pdf/0208/0208291v1.pdf"&gt;Why Do We Believe in the Second Law?&lt;/a&gt;, T. Duncan&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;Foundations of Physics&lt;/span&gt; journal, Volume 37, Number 12/December 2007 is devoted to this extraordinary topic (unfortunately, e-journal subscriptions required to view), starting with Geraard t'Hooft's &lt;a href="http://springerlink.metapress.com/content/4275497r4v43823p/fulltext.pdf"&gt;editorial&lt;/a&gt;, which gives a broad summary of the scope of the papers in the journal.&lt;br /&gt;&lt;br /&gt;Next, we have:&lt;br /&gt;&lt;a href="http://springerlink.metapress.com/content/lhj15642v3445722/fulltext.pdf"&gt;&lt;br /&gt;The Second Law of Thermodynamics: Foundations and Status&lt;/a&gt;, by D.P. Sheehan&lt;br /&gt;&lt;br /&gt;This paper gives a broad overview on three classes of discussion regarding the Second Law now underway: ideal gases, quantum perspectives, and interpretations.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://springerlink.metapress.com/content/c505876828551152/fulltext.pdf"&gt;Information Loss as a Foundational Principle for the Second Law of Thermodynamics&lt;/a&gt;, by T.L. Duncan and J.S. Semura&lt;br /&gt;&lt;br /&gt;This paper explores in detail the concept of information loss as being the fundamental explanation for entropy, essentially casting the 2nd law from "Entropy always increases for irreversible processes" to "Information is always lost for irreversible processes". The authors further argue that all classical derivations of the 2nd law using "entropy" actually incorporate, explicitly or implicitly, information loss as the mechanism.&lt;br /&gt;&lt;br /&gt;As an example, &lt;a href="http://en.wikipedia.org/wiki/Maxwell%27s_demon"&gt;Maxwell's demon&lt;/a&gt; is shown to be able to violate the 2nd law on the basis of having information -- in particular, knowing how to sort fast-moving from slow-moving particles. However, creation of that information eventually involves the deletion of a bit of information from storage -- for a subsequent Kln2 energy cost -- which is argued as being the source of entropy. (All faults are mine, not the authors, if I've paraphrased these arguments incorrectly.)&lt;br /&gt;&lt;br /&gt;Jean E. Burns, in &lt;a href="http://springerlink.metapress.com/content/67143288r1652w14/fulltext.pdf"&gt;Vacuum Radiation, Entropy, and Molecular Chaos&lt;/a&gt;, makes a very interesting extension to classical entropy models for isolated systems. Classical thermodynamic models separate the system from the environment. The canonical example is the refrigerator, which decreases temperature (thus entropy) locally, but at the expense of expelling even more heat (thus increasing entropy) in the environment. The entropy/heat loss inside the system is outweighed by the entropy/heat gain in the environment.&lt;br /&gt;&lt;br /&gt;However, what happens for an arbitrarily large system (such as the universe), where there is no external reservoir? Burns argues that vacuum radiation provides the mechanism for entropy increase.&lt;br /&gt;&lt;br /&gt;Perhaps of most interest to biologists and science-fiction fans is Sheehan's &lt;a href="http://springerlink.metapress.com/content/9km828746w91p011/fulltext.pdf"&gt;Thermosynthetic Life&lt;/a&gt;, which postulates the existence of life forms deriving their energy solely from thermal energy. In addition to searches for extremophile lifeforms (such as bacteria near volcanic vents) that fit this profile, it provides an engaging test into the 2nd Law, because such life-forms may well violate it!&lt;br /&gt;&lt;br /&gt;And, continuing on with our examinations into entropy and information theory, we have:&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://www.worldscinet.com/ijmpd/mkt/preserved-docs/1512/S0218271806009765.pdf"&gt;Information Recovery from Black Holes&lt;/a&gt;, V. Balasubramanian, D. Marolf, and M. Rozali&lt;br /&gt;&lt;br /&gt;This first-place prizewinning essay of the 2006 Essay Competition of the Gravity Research Foundation provides insights into two crucial questions:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Why do classical black holes have finite entropy equal to a quarter of the horizon area?&lt;/li&gt;&lt;li&gt;How does information escape from an evaporating black hole?&lt;/li&gt;&lt;/ol&gt;In essence (modulo a great many technical arguments), the answer to both of these questions is that the finite mass black hole, representing a finite number of energy states N, therefore possesses a discrete energy spectrum. In general, discrete spectra are quantum-mechanically non-degenerate, so knowledge of the precise energy and other (commuting) conserved charges determines the quantum state. But General Relativity charges are generically given by boundary terms; thus, the entire state of the black hole resides in the boundary (asymptotic region), available to all observers.&lt;br /&gt;&lt;br /&gt;This is at odds with classical GR, because there exist unobservable regions within the black hole that are causally separated. However, in the quantum mechanical case the Heisenberg Uncertainty principle dictates that a "Heisenberg recurrence time" exists. This can be thought of as a sort of spontaneous large thermal fluctuation in which the black hole may be replaced by a ball of expanding hot gas. Although the gas will re-collapse to form another black hole on a relatively short time scale, during the span of its existence the full details of the black hole's internal state are visible from infinity.&lt;br /&gt;&lt;br /&gt;And thus we see that at the quantum level, the event horizon becomes ill-defined, and quantum mechanics, entropy, and information theory collaborate against General Relativity to allow what was previously thought to be impossible.&lt;br /&gt;&lt;br /&gt;And in a final bit of fun, we see a method for efficiently converting black holes into gravitational waves:&lt;br /&gt;&lt;a href="http://www.worldscinet.com/ijmpd/mkt/free/S0218271806009625.html"&gt;&lt;br /&gt;Black Hole Bremsstrahlung: Can it be an efficient source of gravitational waves?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Taking a 2 solar mass black hole traveling at .38c and converting 90% of its rest mass into a lobe-shaped pulse with width deltaU ~ 40 for 10E40 GeV^2 sounds exciting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-7160386650598780178?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/7160386650598780178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=7160386650598780178&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7160386650598780178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/7160386650598780178'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/11/f-regge-calculus-and-other-interludes.html' title='F#, Regge Calculus, and other interludes'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-1631303790537314556</id><published>2007-10-13T12:41:00.000-07:00</published><updated>2008-08-01T01:33:22.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Causal Dynamical Triangulations</title><content type='html'>Rajesh Kommu and &lt;a href="http://www.physics.ucdavis.edu/Text/Carlip.html"&gt;Professor Steve Carlip&lt;/a&gt; are working on interesting ways to model quantum gravity using computational methods. Rajesh has been kind enough to help show me where to get started:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/0105/0105267v1.pdf"&gt;Dynamically Triangulating Lorentzian Quantum Gravity&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/0002/0002050v3.pdf"&gt;A non-perturbative Lorentzian path integral for gravity&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/0011/0011276v2.pdf"&gt;Non-perturbative 3d Lorentzian Quantum Gravity&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/0505/0505113v2.pdf"&gt;Spectral Dimension of the Universe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As things often do, it turns into code, which Rajesh has again provided.&lt;br /&gt;&lt;br /&gt;Of course, Visual Studio 2008 Beta 2 has some ... issues with the &lt;a href="http://blogs.msdn.com/vcblog/archive/2006/08/02/686894.aspx"&gt;STL&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So, in the interest of getting working code I'll try a virtual instance of Ubuntu which I should be able to &lt;a href="http://www.ubuntu.com/getubuntu/upgrading"&gt;upgrade&lt;/a&gt; later when 7.10 comes out later this month).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://register.vmware.com/content/download.html"&gt;VMWare&lt;/a&gt; server requires IIS7, so here's the instructions for &lt;a href="http://www.iis.net/articles/view.aspx/IIS7/Deploy-an-IIS7-Server/Installing-IIS7/Install-IIS7-on-Vista"&gt;installing IIS7 on Vista&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Except that I couldn't connect to my own VMWare server, and apparently &lt;a href="http://weblogs.asp.net/kdente/archive/2007/03/14/vmware-on-vista-lameness.aspx"&gt;VMWare has issues on Vista&lt;/a&gt; ... sigh.&lt;br /&gt;&lt;br /&gt;Okay, it seems to be a &lt;a href="http://communities.vmware.com/docs/DOC-1375"&gt;driver signing issue&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Meh ... &lt;a href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx"&gt;Virtual PC 2007&lt;/a&gt; will probably suffice for my purposes. I'll keep IIS7.0 anyways for when I install Visual Studio 2008 Release Candidate and want to develop against IIS.&lt;br /&gt;&lt;br /&gt;... Except that Virtual PC 2007 apparently doesn't know how to handle Ubuntu. Just hangs at the nice pretty install screen, wasting CPU cycles.&lt;br /&gt;&lt;br /&gt;Back to VMWare server. Looks like I can disable driver signing permanently using an admin console:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;bcdedit.exe /set nointegritychecks ON&lt;br /&gt;bcdedit -set loadoptions \DISABLE_INTEGRITY_CHECKS&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Let's try this again.&lt;br /&gt;&lt;br /&gt;Hmmm, that *still* didn't disable driver signing. So, bootup using F8, disable driver signing.&lt;br /&gt;&lt;br /&gt;Now install VMWare Server 1.04. This time, I'll pick a slimmer linux distribution, like &lt;a href="http://www.xubuntu.org/"&gt;Xubuntu&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have to admit, nice, slick, easy install. Not as fast as &lt;a href="http://www.openbsd.org/"&gt;OpenBSD&lt;/a&gt;'s bare-bones, efficient text setup, but it's pretty, and more importantly, it works (unlike the heavier Ubuntu desktop I just tried).&lt;br /&gt;&lt;br /&gt;Now install VMTools. Oh, it's an rpm. Fortunately, there are ways to &lt;a href="https://ubuntu.wordpress.com/2005/09/23/installing-using-an-rpm-file/"&gt;install using an RPM file&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hmmm. Should I be surprised that this didn't work? Okay, back to installing a tarball.&lt;br /&gt;&lt;br /&gt;That worked, even though it also overwrote pre-existing stuff from the RPM.&lt;br /&gt;&lt;br /&gt;Actually, no it didn't. It just stopped VMWare from nagging that VMTools isn't installed. I'll just deal with the mouse capture for now, because this really all is besides the point. (Note to self: more empathy for people just trying to get their work done using computers.)&lt;br /&gt;&lt;br /&gt;Some things never change. Xubuntu has 84 updates to patch!&lt;br /&gt;&lt;br /&gt;Well, the whole point of this was to compile this under Linux (where Rajesh wrote it) instead of tailchasing Visual Studio 2008/C++ STL issues. Almost there! Now to find a decent IDE.&lt;br /&gt;&lt;br /&gt;I've heard good things about Eclipse, but I don't really want to &lt;a href="https://help.ubuntu.com/community/EclipseWebTools"&gt;unpack Java, install Tomcat, Web Tools&lt;/a&gt;, etc. etc. when I don't plan to do any web development. I just want the C/C++ portion.&lt;br /&gt;&lt;br /&gt;Ah, &lt;a href="http://wiki.eclipse.org/index.php/CDT"&gt;CDT&lt;/a&gt; looks like what I want. Is the magic incantation really:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# sudo apt-get install &lt;/span&gt;&lt;a href="http://packages.ubuntu.com/edgy-backports/devel/eclipse-cdt"&gt;&lt;span style="font-family:courier new;"&gt;eclipse-cdt&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;# sudo apt-get install eclipse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Wow, looks like it is! Now to see if Rajesh' CDT code compiles ....&lt;br /&gt;&lt;br /&gt;Okay, right now Eclipse is a tad confusing. And again, learning Eclipse isn't the point.&lt;br /&gt;&lt;br /&gt;Let's go back to that old standby, vi.&lt;br /&gt;&lt;br /&gt;Sure helps to have a c++ compiler installed&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# sudo apt-get install g++&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, okay, looks like I'm missing some other files. Make doesn't know how to make cdtworks. A structural issue.&lt;br /&gt;&lt;br /&gt;So, when something fails, try something else ...&lt;br /&gt;&lt;br /&gt;Made some more progress on the Windows VC++ 9 version. Turns out, even though the project files were stored in my C:\Projects file, Visual Studio had other ideas, and expected everything to be stored in the Visual Studio default file path. I'll just leave that one, since the default file path ends up getting stored on our SAN, whereas I've had the most lovely fun with hard drives and Bitlocker (which is again, besides the point).&lt;br /&gt;&lt;br /&gt;Almost complies, although VC++ wants all header file declarations in stdfx.h. Just missing one file ... again!&lt;br /&gt;&lt;br /&gt;On the other hand, now I can read code in two OSes. Sure is interesting dereferencing all those pointers!&lt;br /&gt;&lt;br /&gt;Quantizing spacetime is fun, though!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-1631303790537314556?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/1631303790537314556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=1631303790537314556&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1631303790537314556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1631303790537314556'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/10/causal-dynamical-triangulations.html' title='Causal Dynamical Triangulations'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-4420244050862891579</id><published>2007-09-30T17:05:00.000-07:00</published><updated>2007-10-02T21:48:11.405-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='string theory'/><category scheme='http://www.blogger.com/atom/ns#' term='SUSY'/><title type='text'>Holomorphy and friends</title><content type='html'>I'm reading Chapter 8 of &lt;a href="http://particle.physics.ucdavis.edu/modernsusy/index.html"&gt;Modern Supersymmetry&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To understand the first sentence, I had to review Maldacena's &lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/9711/9711200v3.pdf"&gt;paper&lt;/a&gt;, which (not-so) incidentally proposed the AdS/CFT correspondence (hence its numerous &lt;a href="http://www.slac.stanford.edu/spires/topcites/2006/alltime.shtml"&gt;citations&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Hmmm. I'll have to read it again. ;-) But moving on ...&lt;br /&gt;&lt;br /&gt;Okay, now need to review &lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/9905/9905111v3.pdf"&gt;non-renormalization theorems&lt;/a&gt; and &lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/9802/9802109v2.pdf"&gt;Wilsonian effective action&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Wow, lots to catchup!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-4420244050862891579?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/4420244050862891579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=4420244050862891579&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/4420244050862891579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/4420244050862891579'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/09/holomorphy-and-friends.html' title='Holomorphy and friends'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-3003491263920273710</id><published>2007-09-27T23:18:00.000-07:00</published><updated>2007-09-27T23:35:46.260-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum mechanics'/><category scheme='http://www.blogger.com/atom/ns#' term='SUSY'/><title type='text'>Quantum Parallel Universes</title><content type='html'>Professor Andy Albrecht has kindly pointed me to one of a series of papers by David Deutsch that begins the proof of Hugh Everett's &lt;a href="http://plato.stanford.edu/entries/qm-manyworlds/"&gt;Many-World's Hypothesis&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://arxiv.org/ftp/quant-ph/papers/9906/9906015.pdf"&gt;Quantum Theory of Probability and Decisions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This paper removes the requirement to have a probabilistic&lt;br /&gt;interpretation of quantum mechanics, instead casting it into a&lt;br /&gt;non-probabilistic decision theory basis.&lt;br /&gt;&lt;br /&gt;The main result is that the usual probabilistic formulation can be&lt;br /&gt;replaced by a rational decision maker using classic decision theory.&lt;br /&gt;Furthermore (and most importantly), quantum processes whose outcomes&lt;br /&gt;look stochastic can be replaced by deterministic evolution of states.&lt;br /&gt;&lt;br /&gt;Note that this neatly removes the issues around definitions of probability in the MWI.&lt;br /&gt;&lt;br /&gt;I'm now taking, for fun, an advanced &lt;a href="http://particle.physics.ucdavis.edu/modernsusy/index.html"&gt;Supersymmetry&lt;/a&gt; &lt;a href="http://particle.physics.ucdavis.edu/teaching/246B/index.php"&gt;class&lt;/a&gt;, taught by Prof. John Terning, which picks up where my last SUSY class left off. Wow, I need to &lt;a href="http://particle.physics.ucdavis.edu/teaching/246/index.php"&gt;review&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-3003491263920273710?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/3003491263920273710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=3003491263920273710&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/3003491263920273710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/3003491263920273710'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/09/quantum-parallel-universes.html' title='Quantum Parallel Universes'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-1712358296343908635</id><published>2007-09-22T16:21:00.000-07:00</published><updated>2007-09-23T15:07:01.726-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantum gravity'/><title type='text'>A new direction</title><content type='html'>After a long hiatus, I'm back ...&lt;br /&gt;&lt;br /&gt;Back to what? Well, most of that hiatus was due to work, and I already keep a (boring) work journal. But the main thing is I'm back to doing physics ...&lt;br /&gt;&lt;br /&gt;The goal is to start (and finish) a dissertation in Computational Quantum Gravity. What does that mean, exactly? Well, that's the whole point of the journey -- and this blog will help me track my progress. It may not be that interesting to you to read, but it will be useful for me to write, and keep notes, with. And a goal left unstated is left undone -- that's why it's all hanging out here.&lt;br /&gt;&lt;br /&gt;So the first order of business is to get really &lt;a href="http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf"&gt;comfortable with LaTeX&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Next, it would be really nice to be able to post equations here. Oh, looks like someone's already &lt;a href="http://wolverinex02.googlepages.com/emoticonsforblogger2"&gt;hacked that together&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Einstein equation:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.forkosh.dreamhost.com/mimetex.cgi?G_%7B%5Calpha%20%5Cbeta%7D%20=%20T_%7B%5Calpha%20%5Cbeta%7D" align="middle" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Here's a really good intro summary on the state of the art on quantum gravity:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://plato.stanford.edu/entries/quantum-gravity/"&gt;http://plato.stanford.edu/entries/quantum-gravity/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With a reference to the classics:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://math.ucr.edu/home/baez/einstein/einstein.html"&gt;http://math.ucr.edu/home/baez/einstein/einstein.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://math.ucr.edu/home/baez/gr/gr.html"&gt;http://math.ucr.edu/home/baez/gr/gr.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well, that should be enough to start with this weekend!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-1712358296343908635?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/1712358296343908635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=1712358296343908635&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1712358296343908635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/1712358296343908635'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2007/09/new-direction.html' title='A new direction'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-111525430339354200</id><published>2005-05-04T17:51:00.000-07:00</published><updated>2007-09-22T16:39:20.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Signing and Installing the EnterpriseLibrary in the GAC</title><content type='html'>If you want to know how to do this, the gory details are &lt;a href="http://practices.gotdotnet.com/messageboard/thread.aspx?id=295a464a-6072-4e25-94e2-91be63527327&amp;mbid=12e6b3c0-1261-461b-b86d-eff86af3939d&amp;threadid=cd6a5007-bccd-4802-83a4-b4940d72088c"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-111525430339354200?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/111525430339354200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=111525430339354200&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111525430339354200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111525430339354200'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/05/signing-and-installing.html' title='Signing and Installing the EnterpriseLibrary in the GAC'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-111432432043916503</id><published>2005-04-23T23:32:00.000-07:00</published><updated>2007-09-22T16:39:43.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='string theory'/><title type='text'>Beginning String Theory</title><content type='html'>&lt;p&gt;Okay, I&amp;rsquo;ve been posting enough about my day job.&lt;/p&gt;&lt;p&gt;By night I&amp;rsquo;m a physics graduate student. Well, my work lets me go to class during the day, but (when I&amp;rsquo;m productive) night and weekend&amp;nbsp;minutes&amp;nbsp;are for physics (sounds like a mobile phone commercial).&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m currently tackling String Theory &amp;mdash; we finally have a graduate course at UCD after my petition to start one last year. Great stuff! The whole reason I wanted to study physics to begin with. It&amp;rsquo;s being taught by Professor John March-Russell, visiting us from Oxford.&lt;/p&gt;&lt;p&gt;Some great material on &lt;a href="http://users.ox.ac.uk/~ball0402/teaching/lectures.html"&gt;Philosophy of Physics by Oliver Pooley&lt;/a&gt;: I found it while reviewing general covariance. Of particular&amp;nbsp;relevance is his lecture on &lt;a href="http://users.ox.ac.uk/~ball0402/teaching/handout4.pdf"&gt;General Covariance and gauge theories&lt;/a&gt;, which helped to clarify the muddled thoughts I had running in my head.&lt;/p&gt;&lt;p&gt;Paul Ginsparg&amp;rsquo;s review of &lt;a href="http://arxiv.org/PS_cache/hep-th/pdf/9108/9108028.pdf"&gt;Applied Conformal Field Theory&lt;/a&gt; posted on his brain-child, &lt;a href="http://arxiv.org/"&gt;arxiv.org&lt;/a&gt;. Necessary material since I learned the deep-connections between Conformal Field Theory in 2d and string theory are what tell us so much about 2d objects like strings propagating along a world-sheet.&lt;/p&gt;&lt;p&gt;Belavin, Polyakov, and Zamolodchikov&amp;rsquo;s classic article &amp;ldquo;&lt;!--StartFragment --&gt;INFINITE CONFORMAL SYMMETRY IN TWO-DIMENSIONAL QUANTUM FIELD THEORY&amp;rdquo; unfortunately isn&amp;rsquo;t on arxiv, and right now our electronic journals aren&amp;rsquo;t responding, so I may have to track down Nucl.Phys.B241:333&amp;ndash;380,1984 on actual paper.&lt;/p&gt;&lt;p&gt;Well, this was fun but I should go back to reviewing my notes.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-111432432043916503?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/111432432043916503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=111432432043916503&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111432432043916503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111432432043916503'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/04/beginning-string-theory.html' title='Beginning String Theory'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-111274550620811862</id><published>2005-04-05T16:36:00.000-07:00</published><updated>2007-09-22T16:40:24.211-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Fun with ASP.NET security and Windows 2003 SP1 breakage</title><content type='html'>&lt;p&gt;Problem: you want secure database access, using a connection string like this: &lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: maroon; }.cb3 { color: fuchsia; }.cb4 { color: red; }&lt;/style&gt;&lt;/p&gt;&lt;div class="cf"&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;lt;&lt;/span&gt;&lt;span class="cb2"&gt;add&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb4"&gt;key&lt;/span&gt;&lt;span class="cb1"&gt;="DatabaseConnection"&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb4"&gt;value&lt;/span&gt;&lt;span class="cb1"&gt;="server=SERVER;Persist Security Info=False;database=DATABASE;Integrated Security=SSPI;"/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Solution: First, we're running IIS6.0. So we can set up a separate Application Pool, and setup credentials for that application pool to use. &lt;/p&gt;&lt;p&gt;We &lt;span style="FONT-WEIGHT: bold"&gt;don't&lt;/span&gt; want to use Impersonation, because then our connection credentials will run as the application user, which may be different for each request, which will slow database access down because we won't be able to use database connection pooling. &lt;/p&gt;&lt;p&gt;We &lt;span style="FONT-WEIGHT: bold"&gt;don't&lt;/span&gt; want to use a domain account, because exploiting that account gives a free ride (and reconnaissance) to our entire network. &lt;/p&gt;&lt;p&gt;We &lt;span style="FONT-WEIGHT: bold"&gt;do&lt;/span&gt; want to use a local account, with minimal rights on the Windows 2003/IIS6.0 server. We can then duplicate that account on the SQL server, assign it appropriate rights to the databases we're using (and specifically, the stored procedures), and then use pass-through authentication. &lt;/p&gt;&lt;p&gt;I used the ASPNET account (which will cause problems later, but they're interesting ones), though the account really doesn't matter (i.e. I did &lt;span style="FONT-WEIGHT: bold"&gt;not&lt;/span&gt; use this account on our production server, but another one like it.) I think it's better to live dangerously on development boxes, to catch problems early. Of course, that's not all. In order for the account to be able to startup an application pool, it has to be a member of the IIS_WPG group. I didn't find that anywhere in MSDN or the KB articles, but by experimentation. &lt;/p&gt;&lt;p&gt;So, pick an account, add it to the IIS_WPG group, create an application pool running under that account, duplicate that account on your SQL server, set permissions to the databases and stored procedures desired. &lt;/p&gt;&lt;p&gt;Voila, right? &lt;/p&gt;&lt;p&gt;Problem #2: You want to use the Enterprise Library Data Access Application Block. So following the guidelines you write some code like this: &lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; }.cl { margin: 0px; }.cb1 { color: blue; }&lt;/style&gt;&lt;/p&gt;&lt;div class="cf"&gt;&lt;p class="cl"&gt;Database authDB = DatabaseFactory.CreateDatabase("Authentication");&lt;/p&gt;&lt;p class="cl"&gt;DBCommandWrapper dbCommandWrapper = authDB.GetStoredProcCommandWrapper("usp_LookupUserbyLoginID");&lt;/p&gt;&lt;p class="cl"&gt;dbCommandWrapper.AddInParameter("@kerbID", System.Data.DbType.String, requestUserID);&lt;/p&gt;&lt;p class="cl"&gt;IDataReader reader = authDB.ExecuteReader(dbCommandWrapper);&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;bool&lt;/span&gt; records = &lt;span class="cb1"&gt;false&lt;/span&gt;;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;But get an error like this: &lt;font size="+0"&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;i&gt;&lt;h2&gt;&lt;i&gt;Security Exception&lt;/i&gt; &lt;/h2&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;b&gt;Description: &lt;/b&gt;The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.Security.SecurityException: Requested registry access is not allowed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;table width="100%" bgcolor="#ffffcc"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;pre&gt;Line 157:    DBCommandWrapper dbCommandWrapper = authDB.GetStoredProcCommandWrapper("usp_LookupUserbyLoginID");&lt;/pre&gt;&lt;pre&gt;Line 158:    dbCommandWrapper.AddInParameter("@kerbID", System.Data.DbType.String, requestUserID);&lt;/pre&gt;&lt;pre&gt;&lt;font color="red"&gt;Line 159:    IDataReader reader = authDB.ExecuteReader(dbCommandWrapper);&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;Line 160:    bool records = false;&lt;/pre&gt;&lt;pre&gt;Line 161:   &lt;/pre&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;&lt;font face="Verdana"&gt;Source File: &lt;/font&gt;&lt;/b&gt;\\Webdevel.caes.ucdavis.edu\wwwroot$\EligibilityList\AuthenticationModule.cs&lt;b&gt;&lt;font face="Verdana"&gt; &amp;nbsp;&amp;nbsp; Line: &lt;/font&gt;&lt;/b&gt;159 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;font face="Verdana"&gt;Stack Trace:&lt;/font&gt;&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;&lt;table width="100%" bgcolor="#ffffcc"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;pre&gt;[SecurityException: Requested registry access is not allowed.]&lt;/pre&gt;&lt;pre&gt;   Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473&lt;/pre&gt;&lt;pre&gt;   System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex) +443&lt;/pre&gt;&lt;pre&gt;   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +347&lt;/pre&gt;&lt;pre&gt;   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category) +21&lt;/pre&gt;&lt;pre&gt;   System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID) +15&lt;/pre&gt;&lt;pre&gt;   Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.EventLogger.Log(String message)&lt;/pre&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/font&gt;&lt;/i&gt;&lt;span style="FONT-FAMILY: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;font size="+0"&gt;&lt;!--StartFragment --&gt;&lt;/h2&gt;&lt;p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;If you look at the Stack Trace, you can see the problem is with the CreateEventSource() call. Even though you haven&amp;rsquo;t specified using the Enterprise Library Logging Block, secretly it is still using System.Diagnostics.EventLog as part of its setup.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Here&amp;rsquo;s an article which describes the problem:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;329291"&gt;PRB: &amp;ldquo;Requested Registry Access Is Not Allowed&amp;rdquo; Error Message When ASP.NET Application Tries to Write New EventSource in the EventLog&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Unfortunately, the solutions don&amp;rsquo;t work. Solution #1, manually entering a registry key, didn&amp;rsquo;t work for me. Solution #2, writing some code which calls CreateEventSource() also doesn&amp;rsquo;t &lt;em&gt;quite &lt;/em&gt;work either.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;I say &lt;em&gt;quite&lt;/em&gt; because the issue is that CreateEventSource() needs to be called by a user with Administrative Rights. So what I did was create a project using my ErrorHandler class (from &lt;a href="http://acgetchell.blogspot.com/2005/02/fun-with-microsofts-enterprise-library.html"&gt;Fun with Microsoft&amp;rsquo;s Enterprise Library&lt;/a&gt;), setup the project to run in App Pool #1 which runs using the ASPNET account, grant that account Admin rights, do iisreset &amp;amp;&amp;amp; gpupdate /force, open the project&amp;rsquo;s default web form thereby causing an event to be written which calls the ErrorHandler class which calls CreateEventSource(), and then go back and revoke admin rights on ASPNET.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Unfortunately, this needs to be done for every application which will call CreateEventSource() &amp;mdash; unless you want to leave ASPNET running as Administrator (&lt;strong&gt;very bad idea!&lt;/strong&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Inelegant, but it works. I&amp;rsquo;ve notified Microsoft KB site of my findings; perhaps they&amp;rsquo;ll revise the article, or show something more elegant.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Update: &lt;font face="Arial" size="2"&gt;This is also discussed in the &lt;a href="http://www.gotdotnet.com/workspaces/customization/uploadedhtmlpage.aspx?FileID=ded67339-a081-489a-8d63-817323f31104&amp;amp;id=295a464a-6072-4e25-94e2-91be63527327"&gt;Enterprise Library FAQ&lt;/a&gt;. However, the solutions given there are 1) run the &amp;ldquo;Install Services&amp;rdquo; script (why would you install Visual Studio on a server?) 2) use installutil on the EL assemblies (perhaps that will work &amp;mdash; I&amp;rsquo;ll have to try it) or 3) remove all logging from the EL (which in my case I want).&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Okay, we&amp;rsquo;ve got that problem taken care of. We write our EL application and breathlessly open the default page, only to find:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;!--StartFragment --&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;Server Error in '/EligibilityList' Application. &lt;br /&gt;-------------------------------------------------------------------------------- &lt;br /&gt;&lt;br /&gt;File or assembly name ko20f8cc.dll, or one of its dependencies, was not found. &lt;br /&gt;Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br /&gt;&lt;br /&gt;Exception Details: System.IO.FileNotFoundException: File or assembly name ko20f8cc.dll, or one of its dependencies, was not found. &lt;br /&gt;&lt;br /&gt;Source Error: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Line 119:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;private bool Authorize(string requestUserID) &lt;br /&gt;Line 120:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ &lt;br /&gt;Line 121:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Database authDB = DatabaseFactory.CreateDatabase("Authentication"); &lt;br /&gt;Line 122://&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IDataReader dataReader; &lt;br /&gt;Line 123:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DBCommandWrapper dbCommandWrapper = authDB.GetStoredProcCommandWrapper("usp_LookupUserbyLoginID", new SqlParameter("@kerbID", requestUserID)); &lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;This was discussed in the &lt;a href="http://www.gotdotnet.com/workspaces/messageboard/thread.aspx?id=295a464a-6072-4e25-94e2-91be63527327&amp;amp;threadid=ee840b95-2fb0-49c9-b888-26abd8268b98"&gt;GotDotNet&lt;/a&gt; forums. The problem is this:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=317012"&gt;Process and request identity in ASP.NET&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Behind the scenes the DAAB calls XmlSerializer, which want to write a temporary assembly to run. ASPNET (or the account you&amp;rsquo;re running under) doesn&amp;rsquo;t have access to the default temp directory, C:\Windows\temp, so the assembly can&amp;rsquo;t be written and the DAAB halts. Nice.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;To fix this, give the account the Application Pool runs under &lt;strong&gt;Full&lt;/strong&gt; (that&amp;rsquo;s right, it needs to create subdirectories) permissions to C:\Windows\temp.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;By the way, this use of XmlSerializer has &lt;a href="http://www.gotdotnet.com/workspaces/messageboard/thread.aspx?id=295a464a-6072-4e25-94e2-91be63527327&amp;amp;threadid=528cc244-f686-458f-b837-c5e319995087"&gt;performance implications&lt;/a&gt;.&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Finally, Enterprise Library is installed, our code references it correctly, temporary assemblies can be written locally, life is good.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;Then we install Windows Server 2003 Service Pack 1.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;And instantly, our web pages return the very lonely:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;h1&gt;&lt;font face="Arial"&gt;Service Unavailable&lt;/font&gt;&lt;/h1&gt;&lt;p&gt;&lt;font face="Arial"&gt;Looking at IIS Manager, you can see that the Application Pool has been disabled. Looking in the System Log from Event Viewer shows this:&lt;/font&gt;&lt;/p&gt;&lt;font size="1"&gt;&lt;p&gt;&lt;font face="Arial"&gt;A failure was encountered while launching the process serving application pool 'AppPool #1'. The application pool has been disabled.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial"&gt;For more information, see Help and Support Center at &lt;/font&gt;&lt;a href="http://go.microsoft.com/fwlink/events.asp"&gt;&lt;font face="Arial"&gt;http://go.microsoft.com/fwlink/events.asp&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial"&gt;.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Of course that link leads to no further information.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;To cut to the chase, the problem is that Windows Server 2003 SP1 has revoked rights/permissions on the ASPNET account, that cannot be restored even by placing it in the Administrators group. The way to fix the problem is:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Go to the .NET Framework Folder (typically c:\Windows\Microsoft.NET\Framework\v1.1.4322)&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;aspnet_regiis -ua to uninstall the framework&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;aspnet_regiis -i to reinstall the framework&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;In IIS Manager:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Enable ASP.NET pages&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;In User manager (compmgmt.msc)&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Set the ASPNET account with the password on the SQL server, and as a member of IIS_WPG&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;In IIS Manager:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Set the Application pool to run under the account with the password entered from the previous step&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;At the Run command:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;iisreset to reset IIS&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;gpupdate /force to ensure password synchronization&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;font face="Arial" size="4"&gt;Wasn&amp;rsquo;t that fun?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" size="2"&gt;Thank goodness Whidbey and Enterprise Library v2.0 aren&amp;rsquo;t coming out until September.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-111274550620811862?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/111274550620811862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=111274550620811862&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111274550620811862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/111274550620811862'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/04/fun-with-aspnet-security-and-windows.html' title='Fun with ASP.NET security and Windows 2003 SP1 breakage'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-110979540481513751</id><published>2005-03-02T12:19:00.000-08:00</published><updated>2007-09-22T16:40:40.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Enterprise Library authentication</title><content type='html'>&lt;a href="http://weblogs.asp.net/drohrer/"&gt;Doug Rohrer&lt;/a&gt;, one of &lt;a href="http://www.avanade.com/"&gt;Avanade&lt;/a&gt; guys who worked on the Enterprise Library, has posted a fantastic End to End Enterprise Library project which incorporates the EL into ASP.NET and Winforms applications.&lt;br /&gt;&lt;br /&gt;Using Collin Collier's wonderful &lt;a href="http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/"&gt;Copy Source As HTML&lt;/a&gt; makes blogging the code much easier.&lt;br /&gt;&lt;br /&gt;Looking at Doug's work, we run into the common pattern of writing a base page class which all asp.net pages inherit. Then he overrides the OnInit function to kickstart authentication.&lt;br /&gt;&lt;br /&gt;I've been using an &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;Q307996"&gt;ASP.NET Http Module&lt;/a&gt; to trap OnAuthenticate, but this is an interesting approach. Here's Dougs BasePage class:&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: gray; }.cb3 { color: green; }&lt;/style&gt;&lt;div class="cf"&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.Security;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; SecCache = Microsoft.Practices.EnterpriseLibrary.Security.Cache;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.Configuration;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web.Security;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Security.Principal;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; EntLibCommonCSharp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;namespace&lt;/span&gt; EntLibWebCSharp&lt;/p&gt;&lt;p class="cl"&gt;{&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Summary description for BasePage.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;class&lt;/span&gt; BasePage: System.Web.UI.Page&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; Private Variables&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; IAuthenticationProvider _authenProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; IAuthorizationProvider _authorProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; IRolesProvider _rolesProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; ISecurityCacheProvider _secCacheProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; IPrincipal _principal;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; EntLibCommonCSharp.AppConfigData _config;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; Public Properties&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; An Enterprize Library Authentication Provider instance.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Used to determine if a user's credentials are valid.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; IAuthenticationProvider AuthenProvider {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==_authenProvider) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _authenProvider = AuthenticationFactory.GetAuthenticationProvider();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _authenProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; An Enterprize Library Authorization Provider instance.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Used to determine if a user is permitted to perform a certain action.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; IAuthorizationProvider AuthorProvider {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==_authorProvider) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _authorProvider = AuthorizationFactory.GetAuthorizationProvider();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _authorProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; An Enterprize Library Roles Provider instance.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Used to retrieve a principal object given an identity.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; IRolesProvider RolesProvider {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==_rolesProvider) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _rolesProvider = RolesFactory.GetRolesProvider();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _rolesProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; An Enterprize Library Security Cache Provider instance.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Used to store and retrieve a principal object given a security token.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; ISecurityCacheProvider SecCacheProvider {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==_secCacheProvider) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _secCacheProvider = SecurityCacheFactory.GetSecurityCacheProvider();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _secCacheProvider;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; The current principal&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; IPrincipal Principal {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _principal;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Provides easy access to configuration data in the application config file.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; AppConfigData Config {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;get&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==_config) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _config = (AppConfigData)ConfigurationManager.GetConfiguration(AppConfigManager.SectionName);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;return&lt;/span&gt; _config;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Sets the principal for this page request.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;param name="principal"&amp;gt;&lt;/span&gt;&lt;span class="cb3"&gt;The principal to use for the rest of the request.&lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; SetPrincipal(IPrincipal principal) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _principal = principal;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; BasePage()&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// No constructor necessary&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Fires at the beginning of the page lifecycle.&amp;nbsp; Overriden here to retrieve principal data from the &lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Enterprise Library Security Cache provider or, if unable, to redirect to he login page.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; The Login.aspx page will add the appropriate token via the ASP.NET forms authentication cookie&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; if the user successfully logs in.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;protected&lt;/span&gt; &lt;span class="cb1"&gt;override&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; OnInit(EventArgs e) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;base&lt;/span&gt;.OnInit(e);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// Make sure to skip this step if you're already on the login page&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (ResolveUrl("~/Login.aspx")!=Request.Url.AbsolutePath) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;try&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// Load the principal from the FormsAuthentication ticket information.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt((&lt;span class="cb1"&gt;string&lt;/span&gt;)Request.Cookies[FormsAuthentication.FormsCookieName].Value);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; GuidToken token = &lt;span class="cb1"&gt;new&lt;/span&gt; GuidToken(&lt;span class="cb1"&gt;new&lt;/span&gt; System.Guid(ticket.UserData));&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; IPrincipal principal = SecCacheProvider.GetPrincipal(token);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (&lt;span class="cb1"&gt;null&lt;/span&gt;==principal) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Redirect("~/Login.aspx");&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="cb1"&gt;else&lt;/span&gt; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SetPrincipal(principal);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="cb1"&gt;catch&lt;/span&gt; (Exception) {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// If we have any issues, redirect to Login&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Redirect(ResolveUrl("~/Login.aspx"));&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;}&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Cool stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-110979540481513751?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/110979540481513751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=110979540481513751&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110979540481513751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110979540481513751'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/03/enterprise-library-authentication.html' title='Enterprise Library authentication'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-110919407443924901</id><published>2005-02-23T13:22:00.000-08:00</published><updated>2007-09-22T16:40:57.104-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Using Enterprise Library Logging</title><content type='html'>To get logging working without pesky WMI/Performance counter errors on &lt;span style="font-style: italic;"&gt;every&lt;/span&gt; logged event:&lt;br /&gt;&lt;br /&gt;Per &lt;a href="http://weblogs.asp.net/tomholl/archive/2005/02/18/376187.aspx#FeedBack"&gt;Tom Hollander's weblog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go to the Logging project, Project Properties dialog for the Common project, and under Configuration Properties\Build, find the Conditional Compilation Properties property and remove ;USEWMI;USEPERFORMANCECOUNTER for the build type you're interested in (ReleaseFinal, in this case).&lt;br /&gt;&lt;br /&gt;Ignore compile warnings about DB2 goop.&lt;br /&gt;&lt;br /&gt;Delete any old project references and re-add reference to new version in C:\Program Files\Microsoft Enterprise Library\src\Logging\bin\ReleaseFinal.&lt;br /&gt;&lt;br /&gt;Then add an appropriate using statement and use in code:&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: gray; }.cb3 { color: green; }&lt;/style&gt;&lt;div class="cf"&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Collections;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.ComponentModel;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Data;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Drawing;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web.SessionState;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web.UI;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.Logging;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.Logging.Tracing;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;namespace&lt;/span&gt; CAESDO&lt;/p&gt;&lt;p class="cl"&gt;{&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Summary description for WebForm1.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;class&lt;/span&gt; DefaultPage : System.Web.UI.Page&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; Page_Load(&lt;span class="cb1"&gt;object&lt;/span&gt; sender, System.EventArgs e)&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// Put user code to initialize the page here&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; LogEntry logEntry = &lt;span class="cb1"&gt;new&lt;/span&gt; LogEntry();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; logEntry.Message = "Starting up the application";&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Logger.Write(logEntry);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// Now this is cool! Tracing flow of code through application&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// and it was simple to add an EmailAlert with an EmailSink&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;using&lt;/span&gt; (&lt;span class="cb1"&gt;new&lt;/span&gt; Tracer("Trace"))&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Logger.Write("Hello world");&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Logger.Write("Hello by e-mail", "EmailAlerts",5,3000,Microsoft.Practices.EnterpriseLibrary.Logging.Severity.Information, "An e-mail message logging all kinds of stuff");&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; Web Form Designer generated code&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;override&lt;/span&gt; &lt;span class="cb1"&gt;protected&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; OnInit(EventArgs e)&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;//&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;//&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;base&lt;/span&gt;.OnInit(e);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Required method for Designer support - do not modify&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; the contents of this method with the code editor.&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;private&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; InitializeComponent()&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;this&lt;/span&gt;.Load += &lt;span class="cb1"&gt;new&lt;/span&gt; System.EventHandler(&lt;span class="cb1"&gt;this&lt;/span&gt;.Page_Load);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;}&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Voila!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It'd sure make it easier to post code to my weblog if VisualStudio 2005 included &lt;a href="http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/"&gt;CopySourceAsHtml&lt;/a&gt; functionality. This is a great application, too bad it doesn't work for me. I seem to have uncovered the first interaction between CSAH and a trial VisualPerl installation that won't uninstall.&lt;br /&gt;&lt;br /&gt;Par for the course.&lt;br /&gt;&lt;br /&gt;Although, I've suggested to the Visual Studio 2005 guys that they add this feature.&lt;br /&gt;&lt;br /&gt;P.S. Collin worked to fix CSAH, and I nuked and reinstalled my system, including Visual Studio 2003.NET. That seems to have done the trick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-110919407443924901?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/110919407443924901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=110919407443924901&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110919407443924901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110919407443924901'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/02/using-enterprise-library-logging.html' title='Using Enterprise Library Logging'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-110875902134620298</id><published>2005-02-18T12:37:00.000-08:00</published><updated>2007-09-22T16:41:33.992-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openbsd'/><title type='text'>Microsoft Security Awareness training</title><content type='html'>&lt;a href="http://www.atrevido.net/blog/PermaLink.aspx?guid=256b6bb4-f6f4-43a5-985b-7fe5796b809c"&gt;This&lt;/a&gt; is just too funny to pass up.&lt;br /&gt;&lt;br /&gt;So far, &lt;a href="http://windowssecrets.com/050127/#story1"&gt;malware's winning the war of attrition&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Well, at least &lt;a href="http://www.microsoft.com/athome/security/spyware/software/default.mspx"&gt;Microsoft Anti-Spyware&lt;/a&gt; is going to be free.&lt;br /&gt;&lt;br /&gt;Too bad there's already &lt;a href="http://www.pcworld.com/resource/article/0,aid,119641,pg,1,RSS,RSS,00.asp"&gt;malware which targets it&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You do have a real hardware firewall, don't you? If not, there's no reason why you shouldn't -- here's my &lt;a href="http://insecure.ucdavis.edu/OpenBSD/openbrick"&gt;OpenBSD recipe&lt;/a&gt; that works beautifully on inexpensive hardware, and has big-bucks features like stateful filtering, source tracking, bandwidth queuing, NAT, OS detection, adaptive state table timeouts, MAC address tagging (with brconfig), macros and tables, and hardware failover capability. All for the price of an &lt;a href="http://www.openbsd.org/orders.html"&gt;OpenBSD CD&lt;/a&gt; and whatever hardware you run it on.&lt;br /&gt;&lt;br /&gt;(One of the firewalls I set up for a class C network was a Pentium 166 with 32MB of RAM, and it mostly sat at 99% idle filtering a 100MB full-duplex LAN. OpenBSD has a very efficient network stack. When I've gone around to help setup OpenBSD firewalls for departments at UC Davis, we mostly recycle leftover desktops that have been replaced.)&lt;br /&gt;&lt;br /&gt;Of course, to help deal with malware you'll also have to do egress filtering (not just ingress filtering, where most rulesets stop), and as always, keep your systems patched.&lt;br /&gt;&lt;br /&gt;But then, there's no such thing as a panacea.&lt;br /&gt;&lt;br /&gt;Did I also mention that pf rules are nearly plain-language?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.openbsd.org/faq/pf/index.html"&gt;pf&lt;/a&gt; r0x0rs!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-110875902134620298?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://acgetchell.blogspot.com/' title='Microsoft Security Awareness training'/><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/110875902134620298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=110875902134620298&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110875902134620298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110875902134620298'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/02/microsoft-security-awareness-training.html' title='Microsoft Security Awareness training'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-110866860677444125</id><published>2005-02-17T11:10:00.000-08:00</published><updated>2007-09-22T16:41:50.172-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Fun with Microsoft Enterprise Library, part 2</title><content type='html'>Okay, I can see that this is going to be a long series ....&lt;br /&gt;&lt;br /&gt;Here's what I'm talking about on how to get Visual Studio to see Enterprise Library assemblies without browsing (taken from the GotDotNet workspace patterns &amp; practices: Enterprise Library: Message Boards):&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style: italic;"&gt;Do you want to see EntLib assemblies in Add References message box?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Create a text file named entlib.reg, and add this content:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Windows Registry Editor Version 5.00&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\AssemblyFolders\Enterprise Library]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;@="C:\\Program Files\\Microsoft Enterprise Library\\bin\\"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Double click on the file and you'll be asked whether to add this registry key. Click yes, restart vs.net and there you go.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(it is assumed that assemblies are in their default folder - otherwise, change the path above).&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Sigh. I really really try to avoid the Registry when possible.&lt;br /&gt;&lt;br /&gt;There's another neat trick for sorting out the structure of the Enterprise Library: open one of the solutions in Visual Studio, select Project-&gt; Visio UML -&gt; Reverse Engineer.&lt;br /&gt;&lt;br /&gt;Too bad all it actually does is generate a 75K blank Visio file, because Visio is unable to resolve all of the references.&lt;br /&gt;&lt;br /&gt;I suppose this will work for code that's so simple that a UML diagram isn't needed.&lt;br /&gt;&lt;br /&gt;Moving right along, I've also found how to sign all of the Enterprise Library Asemblies! You just generate your public/private key pair, and then reference them in the GlobalAssemblyInfo.cs file in:&lt;br /&gt;&lt;br /&gt;C:\Program Files\Microsoft Enterprise Library\src&lt;br /&gt;This file gets referenced by every project when it's compiled. Yay!&lt;br /&gt;&lt;br /&gt;Except that every project's AssemblyInfo.cs contains blank references:&lt;br /&gt;&lt;br /&gt;[assembly : AssemblyDelaySign(false)]&lt;br /&gt;[assembly : AssemblyKeyFile("")]&lt;br /&gt;[assembly : AssemblyKeyName("")]&lt;br /&gt;&lt;br /&gt;Which overwrite what gets pulled in from GlobalAssemblyInfo.cs.&lt;br /&gt;&lt;br /&gt;So you have to go through every project's AssemblyInfo.cs file and remove those 3 lines.&lt;br /&gt;&lt;br /&gt;Sigh. There's 23 projects in the Security section alone, which is sort of the &lt;span style="font-style: italic;"&gt;sine qua non &lt;/span&gt;for using the EL to begin with, for my purposes.&lt;br /&gt;&lt;br /&gt;Well, Caching, Configuration, Data, ExceptionHandling, and Logging are also useful.&lt;br /&gt;&lt;br /&gt;One step at a time.&lt;br /&gt;&lt;br /&gt;I've gotten Logging to work. Unfortunately, every time it logs it throws three error messages:&lt;br /&gt;&lt;br /&gt;&lt;span class="messagecontent"&gt;&lt;span style="font-style: italic;"&gt;"Failed to create instances of performance counter 'Distributor: # of Logs Distributed/Sec' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Failed to fire the WMI event 'LoggingLogWrittenEvent'. Exception: System.Exception: This schema for this assembly has not been registered with WMI.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;at System.Management.Instrumentation.Instrumentation.Initialize(Assembly assembly)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;at System.Management.Instrumentation.Instrumentation.GetInstrumentedAssembly(Assembly assembly)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;at System.Management.Instrumentation.BaseEvent.Fire()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;at Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.InstrumentedEvent.FireWmiEventCore(BaseEvent baseEvent).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Failed to create instances of performance counter 'Client: # of Logs Written/Sec' - The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Presumably these counters are installed as part of the EL service installation, but going through the batch file yields for logging:&lt;br /&gt;&lt;br /&gt;@ECHO.&lt;br /&gt;@ECHO ---------------------------------------------------------------------------------&lt;br /&gt;@ECHO Installing Services for the Logging and Instrumentation Application Block&lt;br /&gt;@ECHO ---------------------------------------------------------------------------------&lt;br /&gt;@ECHO.&lt;br /&gt;&lt;br /&gt;if Exist Microsoft.Practices.EnterpriseLibrary.Logging.dll installutil %1 Microsoft.Practices.EnterpriseLibrary.Logging.dll&lt;br /&gt;@if errorlevel 1 goto :error&lt;br /&gt;&lt;br /&gt;So I'd like to break out whatever counters are needed so I can install them on the webserver, and ideally, be able to script this installation for production code on a production server with an Installer project.&lt;br /&gt;&lt;br /&gt;Although I'm strongly tempted to just go back to using my ErrorHandling class, which doesn't need anything installed anywhere.&lt;br /&gt;&lt;br /&gt;No, I'll persist in using the EL. I'm sure there will be a payoff -- like extending the Logging class to handle XML.&lt;br /&gt;&lt;br /&gt;Of course, to extend the EL one should be cognizant of all the Unit Tests there built to ensure its continued functionality. So I need that book on Test Driven Development real soon now.&lt;br /&gt;&lt;br /&gt;Well, at least I'm not bored.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-110866860677444125?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/110866860677444125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=110866860677444125&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110866860677444125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110866860677444125'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/02/fun-with-microsoft-enterprise-library.html' title='Fun with Microsoft Enterprise Library, part 2'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10604489.post-110814912424821272</id><published>2005-02-11T10:56:00.000-08:00</published><updated>2007-09-22T16:42:05.803-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><title type='text'>Fun with Microsoft's Enterprise Library</title><content type='html'>Oh yeah, back to my day-job: I'm a programmer.&lt;br /&gt;&lt;br /&gt;So we've got a new application to update the current stone-tablet process in the University that determines if students actually graduate.&lt;br /&gt;&lt;br /&gt;Now, I like to write good code, and furthermore, if someone else writes it for me, that's even better. So if you are working on the .NET platform, you'd do well to look at the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0325B97A-9534-4349-8038-D56B38EC394C&amp;displaylang=en"&gt;Enterprise Library&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Of course, this is several thousand lines of code to pore over, good stuff, but unfortunately we have these minor annoying things called deadlines which prevents us from taking the time to grok everything properly.&lt;br /&gt;&lt;br /&gt;Come to think of it, this happens in Physics, too -- I never have enough time to actually understand all the details of the problems I'm supposed to be solving, but my advisor assures me that this is the proper state of things in research, as opposed to writing text books, and three guesses as to which one gets you tenure.&lt;br /&gt;&lt;br /&gt;Back to the matter at hand -- the Enterprise Library. Looking around at some good &lt;a href="http://blog.hishambaz.com/archive/2005/01/29/194.aspx"&gt;working examples&lt;/a&gt; , hilarity and pandemonium ensues when you try to do something simple like write to the Event Log when your application barfs. (Did I mention this doesn't come up a lot because instrumenting software seems to be a ... novelty?) I'm pretty sure that developers should &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; be doing things like editing the Registry, installing Services, or setting accounts programs run under with full admin rights -- I was a system administrator in a previous job, and I &lt;span style="font-weight: bold;"&gt;hated&lt;/span&gt; letting programmers do those kind of things.&lt;br /&gt;&lt;br /&gt;So I won't inflict the same damage on our own, long-suffering sysadmin.&lt;br /&gt;&lt;br /&gt;Now, my 52-line class solution doesn't do all the bells and whistles the EL does, but it sure doesn't require all the nastiness above:&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; }.cl { margin: 0px; }.cb1 { color: blue; }.cb2 { color: gray; }.cb3 { color: green; }&lt;/style&gt;&lt;div class="cf"&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;using&lt;/span&gt; System.Diagnostics;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&lt;span class="cb1"&gt;namespace&lt;/span&gt; CAESDO&lt;/p&gt;&lt;p class="cl"&gt;{&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Methods to handle error reporting&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; &lt;span class="cb1"&gt;class&lt;/span&gt; ErrorHandler&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;public&lt;/span&gt; ErrorHandler()&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb3"&gt;// Register application as source for Application log&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (!EventLog.SourceExists("FacultyStudentSurveys"))&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EventLog.CreateEventSource("FacultyStudentSurveys", "Application");&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; Writes an error message to the Application Event Log&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb2"&gt;///&lt;/span&gt;&lt;span class="cb3"&gt; &lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;param name="error"&amp;gt;&lt;/span&gt;&lt;span class="cb3"&gt;The thrown exception&lt;/span&gt;&lt;span class="cb2"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; WriteToEventLog(Exception error)&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;const&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; source = "Commencement";&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;const&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; logName = "Application";&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EventLogEntryType enumType = EventLogEntryType.Error;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EventLog objectLog = &lt;span class="cb1"&gt;new&lt;/span&gt; EventLog(logName);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; objectLog.Source = source;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; objectLog.WriteEntry(error.Message, enumType, 1 );&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;internal&lt;/span&gt; &lt;span class="cb1"&gt;void&lt;/span&gt; WriteToEventLog(&lt;span class="cb1"&gt;string&lt;/span&gt; message, &lt;span class="cb1"&gt;bool&lt;/span&gt; success)&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;const&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; source = "Commencement";&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;const&lt;/span&gt; &lt;span class="cb1"&gt;string&lt;/span&gt; logName = "Application";&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EventLogEntryType enumType;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;if&lt;/span&gt; (success)&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; enumType = EventLogEntryType.Information;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="cb1"&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; enumType = EventLogEntryType.Error;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; EventLog objectLog = &lt;span class="cb1"&gt;new&lt;/span&gt; EventLog(logName);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; objectLog.Source = source;&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; objectLog.WriteEntry(message, enumType);&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p class="cl"&gt;}&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I'm sure I've missed something obvious. Anyone?&lt;br /&gt;&lt;br /&gt;I just got a reply from the Hisam Baz, author of the above weblog which says, "Why write 52 lines of code when you can write 1?".&lt;br /&gt;&lt;br /&gt;To which I reply, "I'd be happy to write 1 line of code -- if it works."&lt;br /&gt;&lt;br /&gt;Which brings us to the second problem:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Non-portable references to the Global Assembly Cache in ASP.NET&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you actually try to use the Enterprise Library, you'll often come across this bit of advice:&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-weight: bold; font-style: italic;"&gt;References&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Then from your application, add references to Microsoft.Practices.EnterpriseLibrary.Configuration.dll&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;and Microsoft.Practices.EnterpriseLibrary.Logging.dll from the C:\Program Files\Microsoft Enterprise Library\bin\ directory. You should consider signing the assemblies and then adding them to the GAC. You should also add a copy of the assemblies to C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE. Once you do that, you can select the assemblies directly from the "Add Reference" dialog. One you've added the reference, then add the appropriate using statement - using Microsoft.Practices.EnterpriseLibrary.Logging - to your code."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There's only one problem -- it doesn't work.&lt;br /&gt;&lt;br /&gt;1. When Visual Studio 2003 .NET looks for references in the Global Assembly Cache, it never updates its view of the GAC in response to what you've added -- that's done by the &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;306149"&gt;registry&lt;/a&gt; (bleah). Which is why you've got to add a copy where VS can find it.&lt;br /&gt;&lt;br /&gt;2. When writing ASP.NET applications, references should be against assemblies in the webserver GAC. And naturally, installer projects written in VS 2003 do not install the files in the GAC automatically, as they do for the web application itself. So now you have to manually add assemblies to the GAC and write registry entries for each assembly to be resolved by the .NET runtime.&lt;br /&gt;&lt;br /&gt;Wait, why are we &lt;a href="http://www.sellsbrothers.com/news/showTopic.aspx?ixTopic=1199"&gt;using the GAC&lt;/a&gt; again?&lt;br /&gt;&lt;br /&gt;Okay, looks like I'll have to wade through &lt;a href="http://www.grimes.demon.co.uk/workshops/fusionWS.htm"&gt;Richard Grime's Fusion Workshop&lt;/a&gt;. Except that it doesn't cover the case I'm interested in. Joy.&lt;br /&gt;&lt;br /&gt;Well, I sure hope that the 10 lines of code I'll end up emitting in this exercise will exceed the several thousand I could be writing if I just wrote everything myself.&lt;br /&gt;&lt;br /&gt;What's that again about the virtues of programmers? Laziness, impatience, and hubris. Oh, alright then.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10604489-110814912424821272?l=adamgetchell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adamgetchell.blogspot.com/feeds/110814912424821272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10604489&amp;postID=110814912424821272&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110814912424821272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10604489/posts/default/110814912424821272'/><link rel='alternate' type='text/html' href='http://adamgetchell.blogspot.com/2005/02/fun-with-microsofts-enterprise-library.html' title='Fun with Microsoft&apos;s Enterprise Library'/><author><name>Adam Getchell</name><uri>https://profiles.google.com/105919271482206604084</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-iTKWs06T82Y/AAAAAAAAAAI/AAAAAAAA35w/kuBh45bmcN8/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry></feed>
