Tuesday, September 23, 2008

Is this where the $700 billion figure comes from?

There are about 51 million first mortgages in the United States right now — but only about 1.4 million of them are either referred for foreclosure or in foreclosure, said Mortgage Bankers Association chief economist Jay Brinkmann. In other words, fewer than 3 percent of all American homes are in foreclosure.
http://www.npr.org/templates/story/story.php?storyId=94921465
If the average home is $1M and the bank can recover 50% of the value (or $500k and only recover 25%???) - that means $700B will in fact buy out all these bad mortgages.

I bet someday they'll reveal that's really where this stupid number came from.

Friday, September 19, 2008

Best name for a software project

http://sourceforge.net/projects/fck-faces/
And to think I was waiting for dick-wad to get out of beta.

Beware of LPDEST

When LPDEST is set in your shell profile it will make that printer the one used by lp, even if another default has been chosen systemwide. Fair enough - every user should be able to choose their favorite printers. However, this confusingly (IMO) alters what is returned by lpstat as "system default destination". For example:
(imagine somewhere hidden in .bash_profile is LPDEST=wrongPrinter1)

>lpstat -d
system default destination: wrongPrinter1
#ok let's fix this
>sudo lpadmin -d rightPrinter2
>lpstat -d
system default destination: wrongPrinter1
#wtf??
>sudo lpstat -d
system default destination: rightPrinter2
#root and me see two different "system defaults" on the same machine
>lpadmin -d
rightPrinter2
Permission denied: not in group 14
#i guess only root can change the real system default
>export LPDEST=rightPrinter2
>lpstat -d
system default destination: rightPrinter2

Perhaps most hair ripping will be that the GUI print settings will show rightPrinter2 as the default but most programs will print to wrongPrinter1. I see the origins of a good April Fools prank here. A better design would allow lpstat to be cognizant of user and default system preferences and label them accordingly.
(I use Solaris10 YMMV)
For more info:
http://www.sun.com/bigadmin/content/submitted/printing_solaris.html

Thursday, September 18, 2008

What wrong with this Groovy method?

def setSymmetricDifferenceTheWrongWay(s1, s2) {
def sd = s1;
sd.addAll(s2);
def tmp = s1;
tmp.retainAll(s2);
sd.removeAll(tmp);
return sd;
}

Remember Lists are still just objects in Groovy as the are in Java, not primitives. Assigning a new reference to an object does not copy the object. You need to clone them.
def setSymmetricDifferenceTheRightWay(s1,s2){
def sd= s1.clone();//remember these are objects, assignment without clone is not copying
sd.addAll(s2);
def tmp=s1.clone();
tmp.retainAll(s2);
sd.removeAll(tmp);
return sd;
}

Senior Bioinformaticist

Senior Bioinformaticist
Company: Vanderbilt Microarray Shared Resource Location: Nashville, TN 37232
Salary/Wage: 32,000.00 - 60,000.00 USD /year Status: Full Time, Employee
Job Category: Biotech/R&D/Science Occupations: Biological/Chemical Research;Mathematical/Statistical Research
Relevant Work Experience: 1+ to 2 Years Career Level: Experienced (Non-Manager)
Industry: Biotechnology/Pharmaceuticals

Apply Online
Monster recommends using Apply Now. Learn more


I'd hate to see what they are offering the junior bioinformaticist.

Wednesday, September 17, 2008

BerkeleyDB with Java

This is assuming you are not running the pure BerkeleyDB Java edition
Make sure you rebuild BerkeleyDB with
../dist/configure --enable-java
and the LD_LIBRARY_PATH
must include /usr/local/BerkeleyDB/lib

If you do not rebuild you will get java.library.path errors even though libdb_java.so is clearly installed. The BerkeleyDB guide is not very helpful in this regard. Why wouldn't Java access be enabled by default. It is very frustrating.

Infragistics

I really wanted to get the Infragistics NetAdvantage to work as I would like a "modeless popup" - as opposed to modal. I want one that does not disable the background.

In the tutorial:
To install and deploy the sample application on Sun Java™ System Application Server 9.1: [a bunch of instructions ]

In the "Known Issues and Breaking Changes":

Known Issue with JSF 1.2 and Sun Application Server 9.1

The NetAdvantage for JSF 2008 volume 2 with support for JSF 1.2 release does not work in Sun® Application Server 9.1


Gee thanks for the heads up. Do Not Taunt Happy Fun Ball.

Wednesday, September 10, 2008

Are we really making progress with JSF?

http://www.java-samples.com/showtutorial.php?tutorialid=476

This is a tutorial on how to open a link in a new window using Java Server Faces. Hello 1995.

Why do the developers of JSF think they can dispense with hyperlinks? We are having major pains here because our end users can't actually bookmark pages. Now I need to use a very foreign package (Tomahawk's Extensions Filter) just to pass an argument to a JSF page in a new window.

Yes javascript is not a lot of fun to write or debug, but sometimes the medicine is worse than the disease. Someone needs to do a comprehensive shootout between the rich JSF implementations and extJs. There must be some middle ground to abstracting javascript without losing so much basic functionality.

Tuesday, September 9, 2008

Perl to Groovy Translator

Yes I am actually looking for one as I have decided to stop writing Perl completely and start migrating over old scripts as the need arises. This is a cumbersome task so it would be nice to have something that did the most basic translation to keep me from find-and-replace hell.

Why groovy over python or ruby?
1. Groovy has seamless access to all the Java libraries without making me deal with the sometimes unbearably verbose Java syntax.
2. Grails, the Groovy web framework, has quickly taken advantage of work done on Rails. I see little reason to use Ruby just for Rails unless Grails simply cannot catch up soon. I don't see much work on the web framework side of Python. Even the GWT is Java based.
3. IMO the IDE support is better for Groovy already.

However I must really be in the minority on this one from the google results:
perl-to-python: 48000 hits
perl-to-ruby: 3800 hits
perl-to-groovy: 1 hit

I am interested in seeing more Groovy benchmarks come out. Honestly most of the bottlenecks I have encountered in my career are database related, so I am not that concerned if a script takes 50% longer to run.

Will there ever be a Groovy for Bioinformatics textbook? I suspect before that happens Java will incorporate Groovy syntax to the point most will simply call it Java 8 or perhaps ABJ - "Almost Bearable Java"

Monday, September 8, 2008

What was the name of that hot air balloon accident movie?

The one where a hot air balloon balloon accident survivor becomes obsessed another hot air balloon accident survivor because he let go of the rope?
A. Hot Air Balloon Accident Movie
B. Why Did You Let Go of the Rope?
C. Rising Suspicion
D. Enduring Love

Gnome settings manager crashes at startup

This problem took a few hours for me to fix as I got sidetracked doing fsck stuff for awhile, somehow believing my disk was corrupt. I hope this saves someone else some trouble:
Gnome would crash on start up when I logged in as myself - it would crash with
The GNOME Session Manager (process ####) has crashed due to a fatal error (segmentation fault)
I could log in as root
I could start up Gnome apps like firefox
Others could log in with no problem

The problem is related to my LD_LIBRARY_PATH
I had /opt/sfw/lib BEFORE /usr/local/lib

Obviously one of the newer libraries or possibly a corrupted version of the same library was messing things up. From doing a compare of these directories in UltraEdit, I suspect one of the following culprits:

libcairo.so.2.xxx
libgdk-x11-2.0.so.0
libglib-2.0.so.0.1400.4
libgmodule-2.0.so.0.1400.4
libgthread-2.0.so.0.1400.4
libmenu.so.5.5
libncurses.so.5.6
libpango-1.0.so.0.1800.3
libpangocairo-1.0.so.0.1800.3
libpangoft2-1.0.so.0.1800.3
libpangox2-1.0.so.0.1800.3
libpangoxft-1.0.so.0.1800.3

Putting /usr/local/lib first in the LD_LIBRARY_PATH corrected the problem. I would use /usr/local/lib for everything but there was a history of that being automounted when we were using Sparc machines.

If Firefox 2 crashes at the default browser dialog

and leaves an error related to
cairo-surface.c
from the commmand line (I am running Solaris 10 x86)
Make sure you are running
/opt/sfw/lib/firefox/firefox-bin (or whatever your path is)
and not simply
/opt/sfw/lib/firefox/firefox, which is a startup script that may contain some fixed paths like
/usr/local/lib/firefox
which you may not have installed into