I'm trying to learn Deep River Blues, as played by Doc Watson and others. There are lots of great videos on YouTube, including:
http://www.youtube.com/watch?v=cE2swkx9WXE&feature=related
http://www.folkways.si.edu/albumdetails.aspx?itemid=3105
Saturday, May 21, 2011
Sunday, May 15, 2011
Ewan Dobson is awesome
I just stumbled on YouTube videos of Ewan Dobson - fingerpicking acoustic guitar. worth a listen if you haven't heard him.
Saturday, April 16, 2011
Competitiveness Vs Productivity
I was reading a series of articles on competitiveness, with a focus on declining US competitiveness: America's tech decline: A reading guide, and it occurred to me that a focus on competitiveness may be misguided, and that a focus on productivity might provide better guidance.
The focus on competitiveness identifies winners and losers. It creates a context in which local relative advantage is preferred over global absolute advantage. Monopolies are favoured, to capture benefit locally, despite their reducing the total benefit obtained from the set of resources monopolized. Actions which decrease the competitiveness as others are promoted as legitimate means to "win" the competition.
A focus on productivity, on the other hand, would admit the possibility that we can all be winners. Decreasing productivity in other areas would, generally, not increase local productivity. Therefore, there would be less incentive to use resources sub-optimally.
There are ample and inevitable reasons for competition. World population is increasing rapidly while the supply of many primary resources is limited. Without increases in global productivity, global population growth cannot be supported. Current trends suggest a deteriorating situation for most people, with only those who are ruthlessly competitive being able to improve their situation. There is no shortage of people who are so competitive, and there is no morality in large corporate bodies - the corporations are far more ruthless and competitive than any of the individuals.
A focus on productivity would suggest curbing some of the more immoral behaviours of large organizations and promote an effective balance between socialism and central control on the one hand, and individualism, capitalism and free markets on the other hand. Extremes in either direction have been unstable and ultimately undesired in the long run, with all the best societies having a mixture of capitalism and socialism, personal liberty and central management.
If we can't have sufficient for everyone, we are destined for strife and conflict, potentially and, as resources become more limited, almost certainly brutal. If we can have ample for everyone, then there will be no compelling need for competition, and only our basic character (competitiveness, greed and envy are very common traits) to cause such strife. To have ample for everyone, we must increase productivity and distribute what is produced so everyone has a sufficient (ample) share.
Promoting competitiveness and making others lose may yield fantastic local benefits in the short term, but in the long run it may not be the best strategy.
The focus on competitiveness identifies winners and losers. It creates a context in which local relative advantage is preferred over global absolute advantage. Monopolies are favoured, to capture benefit locally, despite their reducing the total benefit obtained from the set of resources monopolized. Actions which decrease the competitiveness as others are promoted as legitimate means to "win" the competition.
A focus on productivity, on the other hand, would admit the possibility that we can all be winners. Decreasing productivity in other areas would, generally, not increase local productivity. Therefore, there would be less incentive to use resources sub-optimally.
There are ample and inevitable reasons for competition. World population is increasing rapidly while the supply of many primary resources is limited. Without increases in global productivity, global population growth cannot be supported. Current trends suggest a deteriorating situation for most people, with only those who are ruthlessly competitive being able to improve their situation. There is no shortage of people who are so competitive, and there is no morality in large corporate bodies - the corporations are far more ruthless and competitive than any of the individuals.
A focus on productivity would suggest curbing some of the more immoral behaviours of large organizations and promote an effective balance between socialism and central control on the one hand, and individualism, capitalism and free markets on the other hand. Extremes in either direction have been unstable and ultimately undesired in the long run, with all the best societies having a mixture of capitalism and socialism, personal liberty and central management.
If we can't have sufficient for everyone, we are destined for strife and conflict, potentially and, as resources become more limited, almost certainly brutal. If we can have ample for everyone, then there will be no compelling need for competition, and only our basic character (competitiveness, greed and envy are very common traits) to cause such strife. To have ample for everyone, we must increase productivity and distribute what is produced so everyone has a sufficient (ample) share.
Promoting competitiveness and making others lose may yield fantastic local benefits in the short term, but in the long run it may not be the best strategy.
Thursday, March 24, 2011
Render SQL Server Reporting Services report as a PDF file
We have various reports developed using SQL Server Reporting Services. In some cases we want to provide our users with PDF versions of the reports without them having to navigate the Report Server website. For these purposes, it is convenient to produce a PDF file and send it by email or save it to a share.
I thought it would be easy, but it wasn't so. It took many hours to get a program working that would access our report server and save a report to disk as a PDF file. The following program worked:
I compiled this program using Visual Studio 2010 Express edition. The report server is part of SQL Server 2008 Enterprise Edition.
Within Visual Studio I had to create a reference to a web resource. This is a bit tricky... I don't have VS in front of me now, but I opened the project settings, selected resources (or something like that) and drilled down through advanced settings until, way at the bottom of one of the pop-up screens, there was an "Add Web Resource" button (or something like that). There I entered the name of our report server. Something like:
This (reportexecution2005.asmx) works despite the server being SQL Server 2008 and Visual Studio being 2010. All the sample VB code I could find used something called "rs" without declaring or initializing it. None of those posts said anything about where it came from or what versions of tools the code worked with. I stumbled upon ReportExecutionService() quite by accident, and cobbled together working declaration and initialization by trial and error and by following a few hints here and there on the Internet.
There is lots left to learn and understand, but in the mean time, the above is working for me.
I thought it would be easy, but it wasn't so. It took many hours to get a program working that would access our report server and save a report to disk as a PDF file. The following program worked:
Module Module1
Sub Main()
Dim format As String = "PDF"
Dim fileName As String = "C:\temp\test.pdf"
Dim reportPath As String = "/Project1/Report1"
' Prepare Render arguments
Dim myCredentials As New NetworkCredential(userName:="USER", password:="password")
Dim rs As ReportExecutionService = New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim historyID As String = Nothing
Dim deviceInfo As String = Nothing
Dim extension As String = Nothing
Dim encoding As String = Nothing
Dim mimeType As String = Nothing
Dim warnings() As Warning = Nothing
Dim streamIDs() As String = Nothing
Dim results() As Byte
rs.LoadReport(reportPath, historyID)
results = rs.Render(format, deviceInfo, extension, _
mimeType, encoding, warnings, streamIDs)
' Open a file stream and write out the report
Dim stream As FileStream = File.OpenWrite(fileName)
stream.Write(results, 0, results.Length)
stream.Close()
End Sub
End Module
I compiled this program using Visual Studio 2010 Express edition. The report server is part of SQL Server 2008 Enterprise Edition.
Within Visual Studio I had to create a reference to a web resource. This is a bit tricky... I don't have VS in front of me now, but I opened the project settings, selected resources (or something like that) and drilled down through advanced settings until, way at the bottom of one of the pop-up screens, there was an "Add Web Resource" button (or something like that). There I entered the name of our report server. Something like:
http://server/reportserver/reportexecution2005.asmx?wsdlI don't know if the "?wsdl" is necessary. Some posts said it was and this is the URL I was using when I finally got it working. More to test, if I wasn't already many hours behind schedule.
This (reportexecution2005.asmx) works despite the server being SQL Server 2008 and Visual Studio being 2010. All the sample VB code I could find used something called "rs" without declaring or initializing it. None of those posts said anything about where it came from or what versions of tools the code worked with. I stumbled upon ReportExecutionService() quite by accident, and cobbled together working declaration and initialization by trial and error and by following a few hints here and there on the Internet.
There is lots left to learn and understand, but in the mean time, the above is working for me.
Friday, February 18, 2011
perl/tk mega-widget configuration
perldoc Tk::ConfigSpec says if where is set to SELF then "apply configure to the core widget" but it doesn't explain how to make it work. I started with a skeleton widget:
I added a configure subroutine...
package Tk::Test;But when I created one, setting option -xxx, I got the following error:
use strict;
use warnings;
use base 'Tk::Frame';
Tk::Widget->Construct('Test');
sub ClassInit {
my ($class,$mw) = @_;
$class->SUPER::ClassInit($mw);
}
sub Populate {
my ($self, $args) = @_;
$self->SUPER::Populate($args);
$self->ConfigSpecs(
-xxx => [ 'SELF', 'xxx', 'Xxx', 'x' ],
);
}
1;
Tk::Error: Can't set -xxx to `XX' for Tk::Test=HASH(0x93d5420): unknown option "-xxx" at /usr/lib/perl5/Tk/Configure.pm line 47.Eventually I figured out that I need a configure subroutine in my widget. It gets called after Populate has run, passed the -xxx option and its value. My initial widget was inheriting its configure subroutine from Tk::Frame and that configure didn't accept the -xxx option (and why wouldn't it).
I added a configure subroutine...
package Tk::Test;With this, the error was gone. Now all I have to do is learn how to write a configure sub properly.
use strict;
use warnings;
use Data::Dumper;
use base 'Tk::Frame';
Tk::Widget->Construct('Test');
sub ClassInit {
my ($class,$mw) = @_;
$class->SUPER::ClassInit($mw);
}
sub Populate {
my ($self, $args) = @_;
$self->SUPER::Populate($args);
$self->ConfigSpecs(
-xxx => [ 'SELF', 'xxx', 'Xxx', 'x' ],
);
}
sub configure {
my ($self, @args) = @_;
print "configure: " . Dumper(\@args);
}
1;
Wednesday, June 23, 2010
Software Patents in New Zealand
Steve Lundberg does not represent me. He claims to represent the supply side of the New Zealand Information and Communications Technology industry (see the note at the end of http://webcache.googleusercontent.com/search?q=cache:wzDfoNHqC5YJ:www.patents4software.com/%3Fp%3D72) and he advocates for software patents in New Zealand. But I have been writing software for over 30 years and I don't want software patents in New Zealand or anywhere. Steve Lundberg does not represent me.
It is interesting, and I am sure no coincidence, that the U-turn of the New Zealand government on the issue of software patents was leaked by a US based patent lawyer. I suspect Mr Lundberg works for US interests, not the interests of New Zealand. No doubt, those interests he is working for are interested in extracting as much value as they can from New Zealand. He is very pleased with the U-turn, and that is all the more reason for everyone in New Zealand to be very displeased.
Software patents are the tools of large global companies that can afford patent portfolios and legal teams and use them to eliminate competition. They provide little prospect of benefit and great risk of harm to New Zealand (or anywhere or anyone else except for those few mamoth companies that will never have anything but sales offices, lawyers and "tax" collecters here in New Zealand). Consider the absurdity of patents that have been issued in the United States and Europe. Consider the reality of a small company defending a patent and, worse, the reality of a small company defending itself against claims of patent violation. Consider that the largest companies in New Zealand are worth less than lunch for the legal teams of the big players in the software industry.
Even if one admits merit in software patents (I don't, but many do) then they should be rejected on the basis that the cost of mediating and enforcing the privileges granted by patents exceeds the value of what is patented. It is fundamentally unjust that defending oneself against even frivolous claims of patent infringement can bankrupt a person or business. Even if patents do encourage development that benefits society, this benefit must be weighed against the lost benefit of development that is discouraged by the risk of costs associated with defending oneself against claims of patent infringement.
It is interesting, and I am sure no coincidence, that the U-turn of the New Zealand government on the issue of software patents was leaked by a US based patent lawyer. I suspect Mr Lundberg works for US interests, not the interests of New Zealand. No doubt, those interests he is working for are interested in extracting as much value as they can from New Zealand. He is very pleased with the U-turn, and that is all the more reason for everyone in New Zealand to be very displeased.
Software patents are the tools of large global companies that can afford patent portfolios and legal teams and use them to eliminate competition. They provide little prospect of benefit and great risk of harm to New Zealand (or anywhere or anyone else except for those few mamoth companies that will never have anything but sales offices, lawyers and "tax" collecters here in New Zealand). Consider the absurdity of patents that have been issued in the United States and Europe. Consider the reality of a small company defending a patent and, worse, the reality of a small company defending itself against claims of patent violation. Consider that the largest companies in New Zealand are worth less than lunch for the legal teams of the big players in the software industry.
Even if one admits merit in software patents (I don't, but many do) then they should be rejected on the basis that the cost of mediating and enforcing the privileges granted by patents exceeds the value of what is patented. It is fundamentally unjust that defending oneself against even frivolous claims of patent infringement can bankrupt a person or business. Even if patents do encourage development that benefits society, this benefit must be weighed against the lost benefit of development that is discouraged by the risk of costs associated with defending oneself against claims of patent infringement.
Friday, June 18, 2010
gmusicbrowser on Debian Lenny
I have Debian Lenny on my laptop and I wanted gmusicbrowser. There isn't a package to install this on Lenny, but there is one to install it on sid (http://packages.debian.org/sid/sound/gmusicbrowser) and this package installed without error on lenny and, so far, is running without any problems.
To install it, download the .deb file from the above noted page (follow the "all" link under Architecture in the table at the bottom of the page, pick a mirror and download), then install with:
This may not be the best way to install it, but it's easy enough and it seems to have worked OK.
To install it, download the .deb file from the above noted page (follow the "all" link under Architecture in the table at the bottom of the page, pick a mirror and download), then install with:
dpkg -i gmusicbrowser_1.0.2-2_all.deb
This may not be the best way to install it, but it's easy enough and it seems to have worked OK.
Subscribe to:
Posts (Atom)