Tuesday, September 29, 2009

First day of Classes

Today is the first day that it actually feels like I am on Sabbatical. Classes are starting and I am not there. I am sure I won't miss the commute, but I am worried I will miss the structure of working. I do better with structure. Now I have to make my own.

I ordered a couple of books from Barnes and Nobel the other day for some light reading: Hegel's Science of Logic and a long poem called "It" by Inger Christensen. For almost a century after his time, Hegel was the philosopher that one had to contend with either to expand on or refute. I have read a great many of the refutations. I thought it was time I read the man himself. The logic is considered his major work. Christensen is from Denmark and considered a major poet in Europe, though unheard of here. I find in her a kindred spirit. Her poems combine structural puzzles along with a hymn like beauty. Exactly what I have always striven for. Her poem "Alphabet," for instance is based on the Fibonacci sequence. She uses it to determine the number of lines in each section. (I often use mathematical structures too, though I usually count words.)

The trick will be to not get carried away with reading and to remember what I need to do.

Sunday, September 27, 2009

Database and Derrida

I have been a bit remiss about updating the blog the last three days. We have had a contractor here who is--finally after 11 years--giving us a back yard. The sound and sights of a backhoe moving dirt from the pile in the front yard to the back has distracted me and made it hard to focus.

I did outline a few of my next steps. One of the things I promised to write was an appendix on how to use Access with the book. (I used SQLExpress.) So I need to recreate the book's database in Access. The design parts will all be the same, but I will need to show how to actually create the tables and relationships in access. I will also have to run all the SQL from my SQL chapter to see if it works in Access. The security chapter will be the difficult one. Access security is nothing like SQL Server security, and Access doesn't support stored procedures. For the ASP.Net Chapter all I should have to do is change the connection string.

On the side, or at the corners, or in whatever gaps of time occur, I have been reading Derrida on Plato and Mallarme. Derrida was one of my excuses for not getting a PHD when I finished my Masters--or rather Deconstruction was. The Liberal Arts departments in the major universities were involved in an outright war among competing philosophies--Deconstructionism, Structuralism, New Criticism. Jobs were lost for not espousing the appropriate jargon at a given university. I thought none of that had anything to do with literature and so went to work for the Forest Service instead of continuing after my masters.

I still think that was true. But, years later, I have come to actually read Derrida. I don't agree with all his pronouncements on language and meaning, but I find his discussion of specific texts surprisingly, for me, insightful and interesting. I love his book on Paul Celan, and am learning a great deal about Mallarme. . .

What Derrida and Database have in common is any one's guess. It is one of the conundrums of my life trying to reconcile my irreconcilable inclinations. But at least it keeps me occupied. I am not often bored.

Wednesday, September 23, 2009

Convocation

So, this morning I rose in the dark, ground coffee beans and started the coffee brewing while I got dressed, filled a travel mug, went out to the car and drove, still in the dark, up through the patches of forest and the fields with their low domes of mist to Graham. By the time I reached Puyallup the sky was bluing toward dawn. Then onto 167, to 161, to I5 and into Seattle for Convocation:

Convocation: with voice, or, better, voice with, to vocalize together, as on the African Velt some hundreds of millennium ago. The 'tion' nouns it--I love turning "noun" into a verb. The act, as it were, of voicing together the hope for a new year.

Tuesday, September 22, 2009

Equinox

Today, for a moment only, light and dark are balanced, Set has achieved a stalemate with Ra. But soon enough, the dark days of winter.

Today also they are delivering dirt for our back yard. After 11 years of living here we will finally have a yard and not just managed weeds.


Monday, September 21, 2009

WPF

Monday Morning. Things have not gone well so far today in terms of getting things done.

Yesterday I worked on recreating my Library application with Windows Presentation Foundation (WPF). WPF (and Silverlight) uses the xml based XAML to create forms and objects. XAML is far more flexible and powerful than the tradition text based Windows forms, but the price for that power is complexity. I must confess I find WPF frustrating at times. The controls have less immedate functionality than their Windows and Web counterparts. You can add functionality and have enormous freedom to customize, but, as I said above, at a cost. Here is an example of XAML code. It is the code for my opening window:



<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Library Manager" Height="500" Width="597" Background="CornflowerBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="200" />
<RowDefinition Height="200" />
<RowDefinition />
</Grid.RowDefinitions>
<Calendar Grid.RowSpan="2" Height="165" HorizontalAlignment="Left"
Margin="0,37,0,0" Name="calendar1" VerticalAlignment="Top" Width="240"
DisplayDateChanged="calendar1_DisplayDateChanged" FontSize="15" />
<DataGrid Grid.Row="1" Height="139" HorizontalAlignment="Left"
Margin="31,43,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="522"
DataContext="{Binding}" />
<Label Content="Items Due" Grid.Row="1" Height="28"
HorizontalAlignment="Left" Margin="12,8,0,0" Name="label1"
VerticalAlignment="Top" Width="120" />
<Button Content="Add Checkouts" Height="23"
HorizontalAlignment="Left" Margin="258,45,0,0" Name="bubtnAdd"
VerticalAlignment="Top" Width="100" />
<Button Content="Return/Renew" Height="23"
HorizontalAlignment="Left" Margin="258,83,0,0" Name="btnReturn"
VerticalAlignment="Top" Width="100" />
<Button Content="Users" Height="23"
HorizontalAlignment="Left" Margin="258,124,0,0" Name="btnUser"
VerticalAlignment="Top" Width="100" />
<Button Content="Analysis" Height="22"
HorizontalAlignment="Left" Margin="258,161,0,0"
Name="btnanal" VerticalAlignment="Top" Width="100" />
</Grid>
</Window>

I also decided to use LINQ to connect to the database. LINQ creates a class for each entity in the database and theoretically makes it easier to retrieve and manipulate the data. It uses a syntax that resembles, but is not quite, SQL. The advantage of LINQ's syntax is that it is the same no matter what the data source. It also generates intellisense and can be debugged by the compiler--unlike an SQL String. Here is the code for the Calendar date changed event:




private void calendar1_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
{

DateTime selDate=(DateTime)calendar1.SelectedDate;
LibraryDataClassesDataContext lib = new LibraryDataClassesDataContext();
var due = from d in lib.CheckOuts
where d.ReturnDate ==null && d.DueDate <= selDate
select d;
dataGrid1.ItemsSource = due.ToList();
dataGrid1.AutoGenerateColumns = true;
}

This works. When I click on a date in the calendar it will display all the books due or overdue as of that date. The problem is, it doesn't refresh. When I click back on an earlier date, it should show only those books overdue as of that date. But once filled, the grid does not change. This would be automatic in windows or ASP.Net. Here I am going to have to figure out how to clear and refill the grid manually.


Anyway, that's what I wasted my Sunday on when I could no longer bear to watch the Seahawks losing to San Francisco.


Addendum: I figured out the refresh problem. I was using the wrong event. I used Calendar_DisplayDateChanged when I should have used Calendar_SelectedDateChanged.

Saturday, September 19, 2009

A Rainy Saturday Morning

Pouring rain. The light green through the leaves. This is the Northwest that I know and love. I moved to this side of the mountains, in part, to get away from the constant heat and sun.

I have had very few philosophical thoughts the last few days. I have been preoccupied with rebuilding my computer after the installation of Windows 7. Everything has gone amazingly smoothly, and computer is behaving much better than it did with Vista. It is faster, smoother. I have had almost no errors or hangups. Many programs hiccuped a little on the install because they didn't recognize the OS. But Windows has a nice feature that lets a setup run in compatibility mode, and then they are happy.

I didn't hate Vista as much as some people did. After Service Pack 1 it was fairly well behaved and it had a lot of features that I liked. But Windows 7 is definitely better. My computer--a two year old Toshiba Laptop--behaves as if it were new.

I spent this morning with a few final downloads. Mostly I downloaded the Java runtime, and the Java SDK with the Netbeans IDE. I don't do a lot of development in Java, but I like to have the option. I also was checking to see what I lost. Inevitably there are a couple of small things that don't get backed up. I think I lost a bit of the River poem--but it is a bit I am pretty sure I can recreate. I also lost the SQL script I was making for my Winter 2010 SQL class. I want to give that class a new database and a new set of assignments. Again I can recreate what I did, but this involves a few hours work. The last thing I lost--or not lost actually, it just doesn't work anymore--is my library application. It is an ASP.Net application I wrote to keep track of what Library books I have out. It helps keep down the fines. I can recreate it easily enough, and probably even make it better. In all not bad for having to do a clean install.

So, rain. I always get a boost of energy in the autumn. I love the coolness and the smells of the season. The cinnamon of fallen leaves. The rustle of dried plants in the breeze. Autumn is when I turn to more philosophical musings, so there will be more of those soon.

Friday, September 18, 2009

A Fresh Start

So I did it--I wiped my laptop and installed Windows 7. So far everything has gone fine. All the reinstallations have gone well. The only trouble I have had is that there is no sound. That is not a problem with Windows 7. I had the same problem with Vista. As far as I can tell, there must be a wire loose between the sound card and the speaker. As far as the OS is concerned the sound card is operating fine. My solution in the past was to buy a USB sound card to bypass the internal sound. It worked fine, but the sound card I had won't work with 64 bit operating systems. So I ordered another one. I hope it works.
I am amazed at how fast my computer is now. I think it is mostly the switch from a 32 bit to a 64 bit operating system. But it is probably also due, in part, to the greater efficiencies in Windows 7. I have a great deal more RAM available. From what I understand, A 32 bit operating system doesn't actually use all 4 gigs of ram. Also Windows 7 requires less RAM to run.
Anyway, so far, I am happy with change.