2009-11-23

Linux: Font + Fixing Eclipse (IBM VM)

Font Enhancement: http://keramida.wordpress.com/2009/11/07/dejavu-condensed-as-default/ (Condensed is much better)... for general use.

I've also switched my fixed-width font to Droid Sans Mono:
http://hivelogic.com/articles/top-10-programming-fonts
//modified zero version in comments of link
//I tried Inconsolata, but didn't really like it
Update: I'm using Deja Sans Mono Book - Slightly Cleaner

Also, I suggest using a Murrine based theme (seems much faster):

Eclipse under Sun's 64Bit JVM sucks... badly enough that I have been considering switching back to Windows --

I've just installed IBM's 64Bit VM:
http://dmartin.org/weblog/eclipse-ubuntu-linux-amd64

Noticeable initial lags (maybe a slower form of hotspot; I don't care this isn't for production, but after an initial hit it seems noticeably speedy) -- hopefully this will fix all the GUI glitches (e.g trashing my perspective layout, crashing hard on open type hierarchy or Findbugs, random lags, etc... missing buttons (expand/contract... was awful).

Interestingly; there are noticeable GC differences - when running say Findbugs the memory usage increases rapidly and GC's... this seems quite different from the usual much more gradual increase under Sun's VM -- oh, and it is *much* faster.

IBM's VM and the Condensed Font change have made Eclipse awesome again... We'll see after a couple days...

2009-11-18

Perl Script/Strip Lines (Thanks Anthony)!

Since perl never remains in my brain --

perl -ne '($d) = m|date="(\d+)"|; print if (!$d || $d >= 1230768000000)' ICO2009.xml |head

Strips lines from a Code Swarm processed xml file that are prior to a certain date.

2009-11-14

Eclipse + Android Source

Install Repo, Fetch Eclair...

http://source.android.com/download

And... the Python script+Instructions found here:

http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html

Work perfectly :)

Now for my ShakeSensor...

2009-11-08

SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666";

What's that? The VendorId corresponds to Motorola... I have a new Droid. Android SDK is up and running and debuggable through Eclipse.

Now to start writing some code for it!

Drrroidd...

2009-10-04

Mine

SlingShot T3

Thus begins a new obsession; should arrive shortly!

2009-09-30

Making Subversion Behave

I'm not sure why but, for some reason I've been having issues with Subversion; the error message is meaningless... since the working copy is completely up to date, cleanup, update, replace with, etc... none of that helps:

svn: File or directory 'somefile' is out of date; try updating

The solution is to trash the all-wcprops cache within the parent's .svn folder... but you often need to do this multiple times, the solution:

find . -name all-wcprops -type f -print0 | xargs -0 rm

It would be much better to just switch to Git :)

2009-07-01

Exceptional Song


public class ExceptionalSong{
private static Pattern toMusicString(String input){
StringBuilder sb = new StringBuilder("I[").append(input.length()).append(']');
for(char c : input.toCharArray()){
if(!Character.isWhitespace(c)){
char cx = Character.toUpperCase(c);
int cxx = 'A' + ((cx % 7));
sb.append((char) cxx).append(' ');
}
}
System.err.println(sb.toString());
return new Pattern(sb.toString());
}

public static final String throwableStackTraceString(Throwable t,boolean indent){
StringBuilder sb = new StringBuilder('\n');
sb.append("StackTrace {\n");
String tabsString = indent ? "\t" : "";

for(StackTraceElement ste : t.getStackTrace()){
sb.append(tabsString).append(ste).append('\n');
if(indent){
tabsString += '\t';//Indent
}
}
sb.append('}');
return sb.toString();
}

public static void main(String[] args){
Player player = new Player();
RuntimeException rte = new RuntimeException("I'm a Runtime Exception!");

Pattern song = new Pattern();
song.add(toMusicString(rte.toString()));
song.add(toMusicString(rte.getMessage()));
song.add(toMusicString(rte.getLocalizedMessage()));
song.add(toMusicString(throwableStackTraceString(rte, false)));

player.play(song);
}
}

2009-06-12