Warning: Somewhat serious C# geekage lies just yonder. It is geared towards those of you who are software developers working with C#, especially if you're coming from a few years of Java coding. If this is not you, you're welcome to read on, but you'll probably be bored.
I just went through some pain trying to figure out why ReSharper was telling me that the namespace of a particular class was wrong. The specific error I was getting was "namespace does not correspond to file location". I noticed that the directory name the source file was in did not match the namespace. I liked the namespace, so I decided that once the project was in a somewhat stable state I would go back and clean up the directory structure.
So, once the project was in a somewhat stable state, I cleaned up the directory structure (not a completely trivial task, as I had to coordinate the solution with the project files and keep the revision control system happy), and was surprised to find that ReSharper was still telling me the namespace was wrong. I tried different names. I tried adding dots. I tried removing dots. I tried searching the ReSharper support forums. It was all to no avail. Then I dug through the .cproj file itself, and found that it contained an attribute indicating a root namespace for the assembly.
It then all fell into place: I was treating namespaces just like packages in Java. Although they're close, they're not the same. In Java, the package name must match the directory name. In C#, it appears it just has to match (or be a subspace of) the root namespace for the project.
This is one of those cases where, having Java experience hindered rather than helped my learning of C#. Of course, if the ReSharper error message had mentioned the root namespace rather than file location, that would have been helpful as well. Perhaps the ReSharper developers are coming from a Java background as well. But I can't get too annoyed with them because ReSharper is a fantastic tool.
Monday, July 23, 2007
Tuesday, July 17, 2007
Book Log: Prgramming C# by Jesse Liberty
I found Programming C# to be exactly what I needed to make the transition from Java to C# and .NET development. Jesse Liberty has a very clear, consistent expository style. He is readable while avoiding excessive cuteness.
The book covers the C# language itself, then shows how to build applications that use the Windows GUI, ADO.NET, web services and the whole .NET framework. Throughout there are warnings and tips directed a programmers coming from Java, C++ and Visual BASIC.
I recommend this book to any software developer moving from another language to C#.
The book covers the C# language itself, then shows how to build applications that use the Windows GUI, ADO.NET, web services and the whole .NET framework. Throughout there are warnings and tips directed a programmers coming from Java, C++ and Visual BASIC.
I recommend this book to any software developer moving from another language to C#.
Tuesday, April 03, 2007
Construction-Paper SCUBA Gear!
Wednesday, March 28, 2007
"...lower the rescue pack"
This is another post in the "Kids say the Darnedest Things" category. It's cute. You have been warned.
A couple of months ago, Davey (5 years old) came into the room where I was futzing with the computer. With his usual earnest manner he asked, "Dad, have you seen Slowly?"
"Who?" I replied. I assumed I misheard him.
"Slowly. I've been looking for him and can't find him anywhere."
"Hmmm," said I. "I'm not sure who you mean. Who is 'Slowly?' "
"You know," he said, "Buzz Lightyear's little friend." (Buzz Lightyear is a character from the movie Toy Story. We have a Buzz Lightyear action figure with a cool space suit. The suit has a backpack with a built-in net on a string that can be lowered down and brought back up. Buzz also came with the little three-eyed green alien who fits in the pack.)
I queried, "Do you mean the little green alien with three eyes?"
"Yes," said Davey. "I can't find him."
"What makes you think his name is 'Slowly'? I don't remember them giving the little aliens any names in the movie."
"I know his name is 'Slowly' from what Buzz says when you push his button. He says, 'Slowly...lower the rescue pack.'""
A couple of months ago, Davey (5 years old) came into the room where I was futzing with the computer. With his usual earnest manner he asked, "Dad, have you seen Slowly?"
"Who?" I replied. I assumed I misheard him.
"Slowly. I've been looking for him and can't find him anywhere."
"Hmmm," said I. "I'm not sure who you mean. Who is 'Slowly?' "
"You know," he said, "Buzz Lightyear's little friend." (Buzz Lightyear is a character from the movie Toy Story. We have a Buzz Lightyear action figure with a cool space suit. The suit has a backpack with a built-in net on a string that can be lowered down and brought back up. Buzz also came with the little three-eyed green alien who fits in the pack.)
I queried, "Do you mean the little green alien with three eyes?"
"Yes," said Davey. "I can't find him."
"What makes you think his name is 'Slowly'? I don't remember them giving the little aliens any names in the movie."
"I know his name is 'Slowly' from what Buzz says when you push his button. He says, 'Slowly...lower the rescue pack.'""
Friday, March 16, 2007
Book Log: Without Roots: The West, Relativism, Christianity, Islam by Joseph Cardinal Ratzinger and Marcello Pera
I read it, but don't have time (or rather, the energy) to comment on it right now.
Monday, February 12, 2007
Book log: The Cube And the Cathedral: Europe, America, And Politics Without God by George Weigel
In this meditation on the state of Europe, George Weigel looks at certain puzzling aspects of European culture and tries to understand how it got this way and where it might be going.
What are the puzzles posed by Europe? Are few:
The books is very readable, much more so than I expected. I found it riveting and insightful. One chapter entitled "Two Ideas of Freedom" is the clearest exposition I've found of the distinction between freedom as understood in Catholic moral teaching ("...a matter of gradually acquiring the capacity to choose the good and to do what we choose with perfection, with excellence."), versus the notion of freedom as nothing more than the ability to do whatever one has a whim to do. Weigel very clearly shows how the first understanding of freedom has the potential to elevate human beings and draw them into real happiness. It connects people with each other and with every idea of human excellence. In contrast, the idea of freedom simply as the exercise of willfulness severs people from one another, leaving them adrift, without direction, and prey to every whim, passion, and emotion.
It is this second idea of freedom that dominates modern European thought, driving many of its pathologies and partially explaining the intense hostility in European intellectual circles towards Christianity.
Weigel sees this hostility towards Christianity as a great threat to democracy itself, for the democratic models of government in Europe and America owe a great deal to the development of Christian theology of the centuries, especially its emphasis on the value and dignity of every person.
What are the puzzles posed by Europe? Are few:
- "Why, in the aftermath of 1989, did Europeans fail to condemn communism as a moral and political monstrosity?"
- "What accounts for disturbing currents of irrationality in contemporary European politics?"
- "Why is European productivity dwindling? Why does German, rightly renowned as the economic engine of the European Union, have a per capita gross domestic product equivalent to Arkansas and only slightly higher than West Virginia and Mississippi? ... Why does Sweden have a considerably higher level of its population living below the poverty line ... than the United States?"
- "Why, in the process of enlarging the European Union, is Europe retreating from democracy and binding itself ever more tightly in the cords of bureaucracy, with Brussels bureaucrats calculating the appropriate circumference of tomatoes and prescribing the proper feeding procedures for Sardinian hogs?"
- "Above all, and most urgently of all, why is Europe committing demographic suicide, systematically depopulating itself in what British historian Niall Ferguson calls the greatest 'sustained reduction in European population since the Black Death of the 14th century'?"
The books is very readable, much more so than I expected. I found it riveting and insightful. One chapter entitled "Two Ideas of Freedom" is the clearest exposition I've found of the distinction between freedom as understood in Catholic moral teaching ("...a matter of gradually acquiring the capacity to choose the good and to do what we choose with perfection, with excellence."), versus the notion of freedom as nothing more than the ability to do whatever one has a whim to do. Weigel very clearly shows how the first understanding of freedom has the potential to elevate human beings and draw them into real happiness. It connects people with each other and with every idea of human excellence. In contrast, the idea of freedom simply as the exercise of willfulness severs people from one another, leaving them adrift, without direction, and prey to every whim, passion, and emotion.
It is this second idea of freedom that dominates modern European thought, driving many of its pathologies and partially explaining the intense hostility in European intellectual circles towards Christianity.
Weigel sees this hostility towards Christianity as a great threat to democracy itself, for the democratic models of government in Europe and America owe a great deal to the development of Christian theology of the centuries, especially its emphasis on the value and dignity of every person.
A thoroughly secularized culture from which transcendent reference points for human thought and action have disappeared is bad for the cause of human freedom and democracy because democracy, in the final analysis, rests on the conviction that the human person possesses an inalienable dignity and value and that freedom is not mere willfulness. [pg. 172, emphasis added]Ultimately, Christians have a firm, deep, and strong reason to defend the value of liberty for all. Secularists, who see freedom only as license and have no "higher" values to point to, have no such basis to defend the idea of democracy.
Christians do know...why they need to engage the convictions of others with respect and why they must defend the Other's freedom: because it is their Christian obligation to do so; because this is what God requires of them. But who, or what, teaches a similar sense of obligation to the people of the cube [the secular modernists]... Who, or what, will teach the Europeans of the future that the democratic values this cube claims to represent are worth promoting---and defending?[pp. 176-177]
Thursday, February 01, 2007
Subscribe to:
Posts (Atom)

