Every so often I need to break out this quote. Today seems like a good day
to do that.
“Mountains should be climbed with as little effort as possible and without
desire. The reality of your own nature should determine the speed. If you
become restless, speed up. If you become winded, slow down. You climb the
mountain in an equilibrium between restlessness and exhaustion. Then when
you’re no longer thinking ahead, each footstep isn’t just a means to an end
but a unique event in itself. This leaf has jagged edges. This rock looks
loose. From this place the snow is less visible, even though closer. These
are things you should notice anyway. To live only for some future goal is
shallow. It’s the sides of the mountain which sustain life, not the top.
Here’s where things grow.”
Robert M. Pirsig
Zen and the Art of Motorcycle Maintenance
A couple points about this special session of Colorado State Legislature
that Governor Hickenlooper has called. First of all the Republicans are
saying that it is an expensive and unnecessary session being used to divert
public attention from the real issues, particularly the economy. The fact
is, the Governor wouldn’t have had the opportunity to call the special
session if legislators on both sides of the aisle had done their jobs in
the first place and gotten the bill to a vote before adjourning. This isn’t
just the Republicans’ fault as the Democrats stalled the issue in the first
place knowing they probably didn’t have the votes, at the time, to even get
this through committee. They waited until they could throw the spotlight on
it and force the Republicans to stall until the end of the session in order
to not have to vote “No” on it. Furthermore, given the nationl attention
the issue has gotten, both with the vote in NC and with VPOTUS and POTUS
commenting on it, it seems this very much is an issue that the voters are
concerned with now.
Secondly, government should no longer be determining what does or does not
constitute a legal marriage. Many of these laws regarding marriage and
sexual norms in general stem from the early notions that government should
encourage a strong population by encouraging procreation in monogamous
relationships between a man and woman. A strong population was a LARGE
population. This is an outdated notion. The government’s involvement in who
should and should not procreate, in my opinion, should have been nullified
at some point in history before the Nazi’s started saying that
blond-haired, blue-eyed citizens made the best babies.
That said, there are certain legal ramifications accorded to married
individuals that the government should have some say in to maintain a
relatively orderly society. What constitutes a family in regards to shared
health care? Who should have hospital visitation rights? Who should get
implicit guardianship of children following the death of a parent? How does
should legal inheritance of possessions be dealt with? The contract of
marriage has been relied up on to deal with many of these issues. However,
why shouldn’t any two people be able to draw up a similar contract? Why
should they need to be married?
For legal purposes, I can see why the contract would necessarily be between
two-and-only-two human beings. Of course both would have to be of a legal
age to understand and consent to a legal contract. I would propose that the
government would stop registering marriages altogether. I think that
marriage is inherently religious or spiritual or at the very least a moral
issue that the government should not be concerned with. Instead, they
register these “civil unions” between any two people who are at least 18
years of age. The government would also need to administer to the
dissolution of these contracts as they do divorce currently. A person could
not enter into such a contract with more than one person. I frankly don’t
understand what is so difficult about this.
In the wake of North Korea’s “failed” rocket test, I was reminded at how
striking it was to learn of all of Robert Goddard’s similarly “failed”
tests as he was experimenting with his liquid fueled rockets. His first
test flight barely made it 40 feet into the air! For every test in which he
achieved a new altitude record there seemed to be at least a dozen which
came nowhere close to a record, some of which burned up before they left
the ground and I’m sure hundreds of designs that never made it out of the
laboratory.
Of course Goddard, like Edison, never considered a test a “failure” because
he was always learning from those experiments. He’d probably just say that
he discovered one more way how NOT to make a rocket! He was obviously a
genius, and I’m sort of disappointed that I had not previously learned more
about him. As a society it seems that we do not celebrate genius like we
once did.
Finally, I really sort of question as to whether we should be condemning
North Korea for trying to advance their technology. Of course, I wouldn’t
want an unstable society gaining nuclear weapons, but I think even
us “civilized” countries would be better off without anyone having nukes.
But to me, stifling a country’s push to gain technological competence is
akin to the slave master making sure that his slaves can’t read.
My personal belief is that increased knowledge is central to human
morality. Ignorance is akin to evil. Knowledge leads to the truth, and the
truth is that Communism is not a economic model that is sustainable in a
just human society. It seems to me counterintuitive to keep a nation down
and ignorant rather than demonstrating to them the power of democracy and
the open market.
I’m only suggesting maybe rethinking our policy when it comes to foreign
rivals in this respect. North Korea is probably the most extreme case, and
our approach maybe shouldn’t shift too radically. But you have a country
like Iran, that we sanction and Cuba that we have effectively kept mired in
the 1950’s. I’m sure it’s an anathema to suggest we work with the three
biggest “foreign rivals” that the US has. Honestly, what I really believe I
mean to suggest is taking a different tack to work AGAINST them… lead
them to the truth that will show them that communism and religious
extremism and non-democratic government does not work. Let them celebrate
their inventors, their geniuses. One of those geniuses will break free and
lead those nations to the truth.
We ran across this this morning where a colleague was trying to load a
module she had built from a DirectoryModuleCatalog into the shell of our
Prism application. She was getting an error that the module could not be
loaded, an error which included “An attempt was made to load a program with
an incorrect format.” We stripped the module down to the bare bones, but
still were getting the error. In fact, when we tried debugging, the
debugger never even got into the constructor of the module.
A little research suggested that maybe the Unity dlls being referenced were
different, which wouldn’t surprise me since VisualStudio seems to go out
and add whatever dll might be registered that it thinks fits the bill when
you load up a project that another developer had started. After checking
and re-checking the references for both the shell and module projects, we
determined that probably wasn’t it.
Then I found a bit about the build configuration. Her plugin was being
built with an X86 target platform and the shell was being built for ‘Any
CPU’ on her x64 machine. Voila. She went into Properties > Build for the
Module project and changed the target to x64 (interestingly Any CPU was not
available, which is maybe another issue), and the module loads into the
shell as expected.
I am adding the module now to the shell. I’m looking at the UI Composition
QuickStart in the guidance to get an idea of how to start. I want to have a
main region and within that a tab region that I can add a tab to. Started
by adding TabControl and TabItem template to the shell. Had to work out the
fact that I didn’t need the Silverlight adapter and other related markup.
Added the module project as a simple class library and added the Views
directory to it. Added the UserManagementModule class as a normal class. It
implements IModule and its constructor takes a UnityContainer and
RegionManager interfaces. In the Initialize() method we Register the
UserManagement view with the tabRegion on the shell. So… we need to add
the UserManagement View. We add that to the Views directory as a
UserControl. I also just added a textBlock in the view to indicate that it
is loaded. I had to explicitly override ConfigureModuleCatalog in the
Bootstrapper and add the UserManagementModule to the catalog for now. Like
I said before, I want to use the directory discovery method to get the
modules, but we are taking baby steps here. So when I run this now an odd
thing happens: I get a shell with two tabs. The first has no content. I
think that it has to do with the fact that I am doing view injection rather
than the view discovery of the QuickStart for the main region and I am
getting the two methods crossed. The second tab has my content. It doesn’t
have the name on the tab, which is supposed to be bound to the View’s
ViewName property. Took me a few minutes to realize that I need to put that
in the ViewModel object for the view. (Duh! Isn’t that how all this is
supposed to work in the first place?) So Next I will be adding the
ViewModel for the UserManagement view, adding the ViewName property of
that, and seeing if it gets displayed in my tab. The UserManagementModel
gets added as a plain class that implements INotifyPropertyChanged, so it
has a PropertyChanged event. The model is injected in the constructor of
the view. Then we set the dataContext of the view to the model. This is a
change from the MVP architecture we have used in the past where an
interface to the view was injected into the constructor of a presenter and
the view basically had no knowledge of its presenter. With MVVM the view
will actively subscribe to events from the model and bind to its
collections and commands. I’m wondering at this point if I should create an
interface for the ViewModel, but I don’t see why at the moment so leaving
as is. WPF TabControl done differently than the Silverlight example in
QuickStart, and that is what was giving me the two tabs and not correctly
showing the view name on the tab as I wanted. I had to bind to
Content.DataContext.ViewName rather than just ViewName as described in the
QuickStart or DataContext.ViewName as some examples on the internets
showed. Now I need to activate the tab. Hook up some dataService and bind
users to a listControl. Add a second tab and probably localize region names.
To start off with, I would like to create my shell, bootstrapper and first
module. I’m choosing the User Management interface of our current project
as that initial module, though to begin with all I plan on doing is loading
a tab control into the main region. My current plan is to create a shell
with a main menu and a main content region. One of the menu items will be
Administration and one of the sub-menus under that will be User Management.
When the user selects User Management the tab control with the title User
Management should load in the main content region.
At first the menu content will just be static, but it would be nice if I
could dynamically add the menu item at runtime. I’m not sure that I can
specify that the User Management module should load OnDemand rather than
OnStartup and still be able to populate the menu. That is one of the things
to figure out. I am going to try using populating the module catalog with
directory discovery. Another option I think we COULD possibly use is a
ConfigurationModuleCatalog. In either case we just need to make sure we are
doing thigns securely so that no one can drop in a rogue assembly that
could be discovered and loaded. Also I would like to be able to “unload”
the tab control and not just hide it so that the control is not using
overhead memory. That is another thing to experiment with.
Then the user management view is probably going to be composed of two
related views: a Roles control and a Users control. Each of those controls
will have a list of their respective model data as well as a Detail view
for selected items. So my next task will be to wire up the model to
correctly display the system’s roles and users as well as the command(s)
for selecting an oject from the list and showing its properties in the
details view.
In the Users control there will be commands for adding, editing and
disabling users. (There is no deleting of created users.) This will give me
a chance to do error handling and business rules regarding the users (like
password strength and that the default Admin user cannot be disabled).
For each of the controls there are a couple view-related features like the
refresh and filter commands. They may be interesting to experiment with in
the MVVM framework, but aren’t terribly important.
Finally, there is the relatively simple task of adding and removing users
from roles, which will give me the opportunity to see how my two controls
will communicate with each other.
So on to creating my application and creating the shell and bootstrapper.
Following the walk-throughs for Prism Guidance:
In Visual Studio 2010: New Project > Windows > WPF Application. I’m naming
it AdjudicationPoC.
Change MainWindow.xaml to Shell.xaml. VS changes the code-behind name to
Shell.xaml.cs, but need to change the actual class name and constructor and
also go into App.xaml and remove the startupURI attribute. The Bootstrapper
will handle what starts, and in fact we can just go in now to the
App.xaml.cs code-behind and override the OnStartup method to create and run
our Bootstrapper. Of course, now VS is going to bitch that we don’t have a
Bootstrapper class so let’s add that to the project now too.
Now I’m going to make the executive decision to use Unity as our IoC
container, so our Bootstrapper is going to inherit from UnityBootstrapper,
and to do this we need to include the Microsoft Prism Libraries. Again
following the walk-through in the Guidance I created a Libraries folder in
my solution folder. I copied in the Prism libraries (I’m just leaving out
the MEF libraries, since, at least for now, I won’t be using them), and
added the references to my project. Our development team usually keeps our
3rd party libraries outside the solution, so that will probably change, but
good for now.
After adding those references I just need to override the CreateShell and
InitializeShell methodsof the UnityBootstrapper to create an instance of
the Shell, set it as the MainWindow of our App and show it. I’m sort of not
crazy about the reference to the App here, since it would be nice to be
able to unit test the bootstrapper (and, more importantly, automate that
test) without it. It isn’t doing much at the moment, plus I may see what
MSTest can do for me in order to really test it. That’s for tomorrow.
plus I may see what MSTest can do for me in order to really test it. That’s
for tomorrow.
We’re at the end of this project I’ve been working on for some time now. As
per usual, we kind of got into this fire drill situation of trying to get
everything all wrapped up at the end. So things like trying to implement
acceptance testing got pushed aside in favor of squashing all these bugs
that popped up precisely because we didn’t implement acceptance testing in
the first place. That is all for another series of blog posts altogether I
think.
Anyway, also as per usual we got to the end of this project and came to the
realization that the architecture of the project was deficient to begin
with. I don’t mean to say that this just dawned on us. I mean I think we
knew before that the architecture was deficient. I mean “realization” in
the sense that the problem “manifested” (perhaps a better word) itself at
the end. The core components of the application are a WPF client that
interfaces with a web service as well as a windows service which handles
data loading. The web service can interface with the windows service to
report back to the client when loading occurs. Both services are WCF
services, and we could probably improve on their architecture to an extent,
but that was a bullet we bit about halfway through the project. At that
time we made some significant changes to the service side, so while there
are definitely some changes we could make, the architecture is ok.
On the client side though we ran into issues. The client-side architecture
is a bastardization of one we used on a previous project. That project used
the Composite Application Library and an MVP architecture. It was a big,
complex application. We thought we could scale that down and cut out some
things we wouldn’t really need. It turned into sort of an ugly bastard
child in every sense of the word.
So, after the fact (which is totally the way I LOVE to do things), I am
looking at Prism 4, seeing how it improves I what we did with CAL and
figuring out how we can use it for the second release of this project,
which we’ll probably start after the Holidays. So what follows in the next
few episodes are my rambling thoughts as I experiment with Prism and WPF
and reassembling pieces of the existing client into something that I don’t
want to throw out a window.
In spirit, if not in body. Maybe a pile of money will fall from the sky…
fuckyeahrockabilly:
corinnaxo:
RE-POST IF YOU’RE ATTENDING!
I know a lot of my followers go… so REPOST!
Just have to laugh because the CURRENT CruiseControl.Net documentation on
integrating Fitnesse and CCNet says, “Use the TestRunner which comes as
part of the standard fitnesse distribution to run all the fitnesse tests
and generate the results. You will need to use the task,” and dates from
2006. This is somewhat akin to teaching your grandmother how to send email
by saying, “Use Outlook.”
Anyway, I have a test running automatically with the build and passing. The
problem is with my report. I want to have a link from the CCNet dashboard
for the project build to a nice, neat fitnesse report. CCNet 1.6 has
something in the packages called Fitnesse Results package, but there is, of
course, no documentation on using it.
I am a bit loathe to post this now; a lot has changed in eight years, but I don’t want to forget the feeling of those days, either of those days when my life drastically changed. I’m far better off today than I was then. I don’t know if we are as a country. If we aren’t, it isn’t because some terrorists flew planes into our buildings. Maybe it simply is that we collectively aren’t so naive now.
I don’t remember…
I can remember watching the towers fall. I can remember seeing the people fall before the television stations decided to stop showing it. Perhaps they decided to stop showing it once they they recognized that what they were seeing was people jumping to their deaths. I remember imagining what it would be like to be the husband of one of those women that worked at the World Trade Center and not knowing if I had just watched her leap to her death, not knowing whether she was safely on the ground far enough away from the tower that just fell or if she had burned or was buried in rubble.
Thankfully, I only had to imagine those things because my wife was right there next to me, holding my hand, weeping as the stark realization that our world had forever changed washed over us. We clung to each other, feeling suddenly vulnerable here almost in the middle of the country. We could be hurt here. Maybe they couldn’t get to us directly but they could hurt the ones we loved they could affect the way we went about our daily activities, scaring us into a certain paralysis.
The events of 9-11 did scare us. I remember the eerie sensation of hearing a jet in the sky, knowing that all air travel had been grounded and going out to look up at the fighter jets flying over. I told my wife this. I told her I was still scared. I told her I had nightmares. She told me, too, how watching those planes crash into the towers had changed her; how hearing about the personal tragedies and also the tales of courage would change her life forever; how each day would hold infinitely more meaning for her. I don’t remember her saying that each day with me would hold infinitely more meaning.
It didn’t matter then. What mattered was that she was there; that I wasn’t on the news recounting my last phone call with her; that I didn’t need to recall the last words she said as she left that morning. Now I distinctly remember her last phone call, her last words to me that she said before she left.
I don’t remember the moment when things went wrong. I do remember when she said to me that “something is just not right in our marriage”. You remember those things that change your life forever. We were on a plane somewhere over the Midwest heading from Denver to see her brother in Florida. I could not have been more astonished had I looked out my office window and seen that same plane headed directly for me. My thoughts then reflected my thoughts of nine months prior: Everything was fine… wasn’t it? This wasn’t happening. This couldn’t happen
After the events of 9-11 people looked back with the power of hindsight and said, “Well of course this was going to happen. The U.S. has for too long imposed its will on other countries, on the people of the Middle East.” We discovered how vulnerable we had been as a country and how naive we had been. In hindsight, I look back and shouldn’t be astonished that her new world did not include a vision of me, but I still am. I don’t remember at what point “until death do us part” received some new definition.
Today I watch the memorials of what occurred two years ago, and I remember exactly where I was, who I was with, what I was doing. I remember that imagined agony of not knowing where she was. I don’t know where she is now. I don’t know if she is thinking of me. I don’t know if she looks back on that day and even remembers me there, remembers us hugging and crying together, clinging to each other as if we were all that we had left in this world.
It’s a new world now. The events of September 11 will remain in my mind forever. There is no one else I can ever share that experience with.
Filed under 9-11