PLDI Talk Went Well

Eddy did a great job with the Mint talk at PLDI 2010 here in Toronto. Congratulations (in more than one way), Eddy! And thank you very much for the repeated shout-out to me in the audience.

The slides for the talk have become much cleaner over the last few days. We will make them available on the Java Mint website soon.

Eddy Presenting Mint at PLDI 2010

Eddy Presenting Mint at PLDI 2010

Share
Posted in Mint, Pictures | Leave a comment

Print This Post Print This Post  

At PLDI 2010

I’m at PLDI right now. Toronto is nice, the tutorials on Sunday were great, and so were most of the paper sessions. The downsides are the lack of outlets in the conference rooms, and the virtually complete lack of WLAN in the entire hotel (there is wired LAN in the hotel rooms).

In the evenings, I’ve been profiling DrJava to find out why our DrJava tests on Hudson was thrashing so much. I noticed that [cc lang=”java” inline=”true”]MainFrameTest[/cc] was currently using about 650 MB or heap space. No wonder our 512 MB server had trouble. I couldn’t really tell what was going on. YourKit really only showed me that there were lots of [cc lang=”java” inline=”true”]HashMap.Entry[/cc] instances being created. They seemed to have something to do with tables and the Preferences window.

I checked out several old revisions, going as far back as 4694 from the end of 2008. Its [cc lang=”java” inline=”true”]MainFrameTest[/cc] needed only about 300 MB. Through divide and conquer, I realized that the switch from [cc lang=”java” inline=”true”]JList[/cc] to [cc lang=”java” inline=”true”]JTable[/cc] for [cc lang=”java” inline=”true”]Vector*OptionComponents[/cc] added a lot of bloat, at least in the tests. This was most dramatic for the [cc lang=”java” inline=”true”]VectorKeyStrokeOptionComponents[/cc]

I started working on rolling the changes for keystrokes back. I was able to reduce memory consumption to about 400 MB. but the list-based GUI is just so ugly compared to the newer tables.

Fortunately, just before I had left for PLDI I had asked IT to add more swap space to our Hudson server, and that made the whole problem a non-issue: What took about two hours when Hudson was thrashing now takes less than 15 minutes.

I don’t think I’ll commit these changes. I’ll just file it under “can be done if necessary.”

Share
Posted in DrJava, Ramblings | 2 Comments

Print This Post Print This Post  

Hudson Server Swapping Itself to Death

After fixing the DrJava unit tests that failed and before heading to PLDI tomorrow, I thought I’d start up our Hudson server again. Unfortunately, it pretty quickly starts swapping itself to death. I don’t know what changed. Did our memory consumption increase so much? I have a hard time believing that. Did something in Hudson change? I’m not getting an OutOfMemoryError, though, either.

I also noticed that denmark.cs, our server, only has 512 MB RAM. That is pitiful, of course, so perhaps I should add some more memory. But how sensible is it to spend $50 for 2x1GB of DDR2 memory for a Pentium 4 system?

On another note, also related to hardware, my desktop at home greeted me with a crash “due to a thermal event” this morning. Whenever I had watched the temperature readings of the CPU, they were very low, never above 50 C, but maybe I do need to reapply the thermal grease. Ugh…. and I’m so busy.

Share
Posted in DrJava, Ramblings | 1 Comment

Print This Post Print This Post  

Not a Memory Leak, But Not Finalized?

I’ve been trying to fix a memory leak in DrJava today. I found the reproducible memory leak quite quickly: When I added the right margin line feature, I added option listeners that change the color and position of the right margin line in the definitions panes when the preferences are changed. These listeners have kept references to the definitions panes they needed to update. Now I remove the listeners again when a pane is closed.

I still have a unit test failure, though, that happens about once or twice per ten runs. I don’t think it’s a memory leak, because when I dump the heap and run the Object Query Language (OQL) query

select d.creationContext.toString()
from edu.rice.cs.drjava.model.DefaultGlobalModel$ConcreteOpenDefDoc d

I get as result the following output:

java.lang.RuntimeException: new ConcreteOpenDefDoc
at edu.rice.cs.drjava.model.DefaultGlobalModel$ConcreteOpenDefDoc.(DefaultGlobalModel.java:467)
at edu.rice.cs.drjava.model.DefaultGlobalModel._createOpenDefinitionsDocument(DefaultGlobalModel.java:639)
at edu.rice.cs.drjava.model.DefaultGlobalModel._createOpenDefinitionsDocument(DefaultGlobalModel.java:102)
at edu.rice.cs.drjava.model.AbstractGlobalModel.newFile(AbstractGlobalModel.java:1151)
at edu.rice.cs.drjava.model.AbstractGlobalModel.newFile(AbstractGlobalModel.java:1141)
at edu.rice.cs.drjava.model.AbstractGlobalModel._ensureNotEmpty(AbstractGlobalModel.java:4121)
at edu.rice.cs.drjava.model.AbstractGlobalModel._init(AbstractGlobalModel.java:359)
at edu.rice.cs.drjava.model.AbstractGlobalModel.(AbstractGlobalModel.java:306)
at edu.rice.cs.drjava.model.DefaultGlobalModel.(DefaultGlobalModel.java:191)
at edu.rice.cs.drjava.ui.MainFrame$157.run(MainFrame.java:3014)
at edu.rice.cs.util.swing.Utilities.invokeAndWait(Utilities.java:70)
at edu.rice.cs.drjava.ui.MainFrame.(MainFrame.java:3006)
at edu.rice.cs.drjava.ui.DefinitionsPaneMemoryLeakTest$1.run(DefinitionsPaneMemoryLeakTest.java:81)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
----
java.lang.RuntimeException: new ConcreteOpenDefDoc
at edu.rice.cs.drjava.model.DefaultGlobalModel$ConcreteOpenDefDoc.(DefaultGlobalModel.java:467)
at edu.rice.cs.drjava.model.DefaultGlobalModel._createOpenDefinitionsDocument(DefaultGlobalModel.java:639)
at edu.rice.cs.drjava.model.DefaultGlobalModel._createOpenDefinitionsDocument(DefaultGlobalModel.java:102)
at edu.rice.cs.drjava.model.AbstractGlobalModel.newFile(AbstractGlobalModel.java:1151)
at edu.rice.cs.drjava.model.AbstractGlobalModel.newFile(AbstractGlobalModel.java:1175)
at edu.rice.cs.drjava.model.AbstractGlobalModel.newFile(AbstractGlobalModel.java:1183)
at edu.rice.cs.drjava.model.AbstractGlobalModel.closeFiles(AbstractGlobalModel.java:1979)
at edu.rice.cs.drjava.model.AbstractGlobalModel.closeAllFiles(AbstractGlobalModel.java:1944)
at edu.rice.cs.drjava.ui.DefinitionsPaneMemoryLeakTest$7.run(DefinitionsPaneMemoryLeakTest.java:197)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

This creation context stores the stack trace when the instance is created, and I can tell that one of these documents was created when DrJava was initially started, and the other after all documents have been closed. These aren’t the documents that need to be garbage-collected.

However, the test is based on finalization, and for one of the documents (not one of these two that still exist), the finalizer isn’t called. At least that’s what it seems like. It is garbage-collected, because otherwise it would appear in the query result.

I am also using the NetBeans memory leak test utilities, and they do not report a leak either. I’m starting to believe again that finalization is a fundamentally flawed way of checking for garbage collection.

Share
Posted in DrJava | Leave a comment

Print This Post Print This Post  

Back in Houston for a Bit

I’m back in Houston for five days again. I was looking forward to sleeping in my own bed again, but that turned out to be less comfortable than I expected: My air conditioning unit had broken again, and it 31 C (88 F) inside. Fortunately, the maintenance people didn’t just put in more coolant like they’d already done twice this year, and several times in the years past. Instead, they installed a new air conditioning unit. Why not sooner?! Now it’s cool again, but this new unit is really loud. I’ve got to check if there is a way to calm it down a bit, but not right now. I don’t have the time.

Probably because of the heat, my main desktop PC at home also broke. The power supply had been dying for about half a year now, so this was expected. I installed the replacement power supply that I had bought a while ago, but what I didn’t realize was that I had to remove the CPU cooler to get some of the cables out. I was worried that the thermal grease wouldn’t be good enough anymore once I put the cooler back on, but after careful tests, that worry seems to have been unfounded. The core temperatures of my Core 2 Duo don’t go above 48 C under load.

I have met with the Habanero group to discuss integrating Habanero Java into DrJava. I have met with my Mint buddies to talk about the upcoming PLDI 2010 talk on multi-stage programming. I still have to investigate an apparent memory leak in DrJava, something that had occurred before too, and make a new stable release.

I also have to renew my Texas drivers license… again. I haven’t had the time yet, so I’m driving with my international license right now.

On Saturday it’s off to Toronto. A bit hectic, eh?

Share
Posted in DrJava, Mint, Ramblings | 1 Comment

Print This Post Print This Post  

Fixed DrJava “Smart Run” Problem

Yesterday, Steve Gilbert notified me of a problem with the “smart run” feature I had introduced to simplify running applets and ACM Java Task Force programs.

The problem was that I knew whether a class was an applet, an ACM Java Task Force program, or a regular Java program with a main method, but this knowledge wasn’t reflected by the types. I would have needed some kind of non-static “duck typing”.

I have a fix for this problem now that uses a bit more reflection. You can download a preliminary DrJava version from my own web server.

It seems we have some problem with the department web server and I can’t create the usual weekly build. This fix will definitely go into the upcoming release.

Share
Posted in DrJava | 1 Comment

Print This Post Print This Post  

Now I Want an Apple iPad Too: Papers for iPad

OK, now I also want an Apple iPad: Papers for iPad has been released.

Papers for iPad

I still haven’t made it to the Apple Store to play with an iPad since it was released, but the visit is firmly on my To Do list, especially after what an iPad did to this family.

Share
Posted in Uncategorized | Leave a comment

Print This Post Print This Post  

Beethoven and Brainstorming

I went on a walk today, on the prettiest day so far, for some Beethoven and brainstorming. I think I came up with some more nice ties back to my Master’s thesis.

Brainstorming outside.

Brainstorming outside.

Outside on a sunny day.

Sitting outside on a sunny day, with Beethoven in my ears.

Share
Posted in Concurrent Unit Testing, Pictures | Leave a comment

Print This Post Print This Post  

Travel Arrangements for PLDI 2010

A few days ago I registered for PLDI 2010, just in time for early registration, and booked my flights from Houston to Toronto and back. I’m looking forward to being back in Canada and seeing my third Canadian city. I’ll most likely be staying at the conference hotel.

I will be there for the day of tutorials and the main PLDI conference. I plan on attending the Semantics of shared variables and synchronization (a.k.a. memory models) tutorial by Sarita Adve and Hans Boehm, followed by the Parallelizing Irregular Applications through the Exploitation of Amorphous Data-Parallelism tutorial by Keshav Pingali, Milind Kulkarni and Martin Burtscher.

Our Mint talk, Mint: Java Multi-stage Programming Using Weak Separability, is on Wednesday at 1:30 PM.

I’ve started to like air travel again. All my flights this past year have been very pleasant.

Share
Posted in Mint | Leave a comment

Print This Post Print This Post  

Right Margin Line in DrJava

Check out the right margin line that I just implemented. You can enable/disable it and change its position under Preferences/Display Options, and configure the color under Preferences/Display Options/Colors.

By default, I have it enabled as light-gray line at 120 columns right now. Should we disable it or change the number of columns?

Share
Posted in DrJava | 1 Comment

Print This Post Print This Post  

DrJava Reaches One Million Download Milestone

The JavaPLT group is pleased to announce that DrJava recently passed
the milestone of one million downloads since its inception as a
SourceForge open source project in 2002. The DrJava developers want to
thank all the users of DrJava for making the project so successful.

DrJava is a lightweight integrated development environment (IDE) for
writing Java programs. It is designed primarily for students,
providing an intuitive interface and the ability to interactively
evaluate Java code in an “Interactions Pane”. It also includes
powerful features for more advanced users including the DrJava
developers. DrJava is freely distributed under the BSD License, and it
is still under active development by the JavaPLT group at Rice
University.

The development of DrJava began in 2001, lead by Professor Robert
“Corky” Cartwright of the Computer Science department, with the first
release being made available in Spring 2002. From the beginning, the
DrJava source code emphasized the use of Java generics, novel at the
time. Early in the evolution of DrJava, support for Java generics was
added to the Interactions Pane. After the addition of a project
facility in 2004 and improved support for large projects beginning in
2006, DrJava experienced a sharp increase in popularity.

DrJava is a cross-platform application available for Windows, Mac OS
and Linux. DrJava supports several different Java compilers, including
Oracle/Sun’s JDK, OpenJDK, the Eclipse Java Compiler, as well as
research compilers such as NextGen and Java Mint. In 2005, DrJava
introduced support for a hierarchy of Java language levels, a
pedagogic framework that helps beginners learn Java by partitioning
the language into levels of increasing syntactic complexity.

Since the inception of the DrJava project, over 60 students have
contributed to DrJava in Professor Cartwright’s class on Production
Programming or as part of independent study projects. DrJava is now
being used at institutions across the globe, including the University
of Pennsylvania, Cornell University, Georgia Tech, University of
California-San Diego, University of Washington, Université de Nice
Sophia-Antipolis, National Unversity Singapore and Rice University.
DrJava has also been used as teaching tool in books by Pearson
Education and Wiley Higher Education.

DrJava is available for download for free at http://drjava.org/

Share
Posted in DrJava | Leave a comment

Print This Post Print This Post  

Enerjy Fault Proneness Analysis of DrJava

I just read that a company called Enerjy did a “fault proneness”
analysis of many Java open-source projects
, and DrJava was among them. We rank in the lower half, but just above Eclipse.

I don’t exactly know how the rules are weighted, but they are pretty
arbitrary. One thing I noticed, for example, is this rule: “You can
configure JAVA0020 for allowable names. The default is for the name to
begin with a letter followed by letters, digits or underscores.”

We consistently prefix fields with an underscore, so we consistently
violate their convention. I don’t put a lot of trust into metrics like
these, particularly when they are ill-configured.

I still thought this was interesting.

Share
Posted in DrJava, Ramblings | Leave a comment

Print This Post Print This Post  

Simpler ACM Java Task Force Programs in DrJava

Daniel L. Schuster, Professor of Computer Science & Mathematics at Western State College of Colorado and author of The Free Java Book, had asked me at SIGCSE 2010 if we could simplify runing ACM Java Task Force programs in DrJava. Other IDEs can run ACM Java Task Force programs that just look like this

//HelloWorldConsole.java
import acm.program.*;

public class HelloWorldConsole extends ConsoleProgram {
public void run( ) {
println("Hello World");
}
}

In the past, DrJava needed a main method:

//HelloWorldConsole.java
import acm.program.*;

public class HelloWorldConsole extends ConsoleProgram {
public void run( ) {
println("Hello World");
}
public static void main(String[ ] args) {
new HelloWorldConsole( ).start(args);
}
}

This was, in my humble opinion, due to the rather twisted way the ACM Java library determines the main class using command line arguments, Java properties, OS-specific ways to determine the command line involving process IDs, etc.

I think I have nonetheless found a working solution. I’m using a bit of reflection behind the scenes of the “Run” button and the “java” command in the Interactions Pane.

There is a new option in Preferences/Interactions Pane called “Smart Run (‘java’) Command”. If enabled (default), the “Run” button and the “java” command in the Interactions Pane detects if the class (a) is an ACM Java Task Force
program (subclass of acm.program.Program) or (b) an applet (subclass of java.applet.Applet). If the former is the case, then DrJava runs the program’s main method, but inserts "code=MyClass" as argument 0. If the latter is the case, DrJava starts the
applet viewer. If neither is the case, the command behaves just as before.

With a program from the book, like the one above, all the students need to do now is compile and press the “Run” button.

I have created a new weekly build that is available from our DrJava Weekly Jar website (direct link: drjava-weekly-20100508-r5249).

If Dan determines that this solution works for him, this feature will definitely be in the next stable release, which we expect for the end of May.

There are two other new features in DrJava that Dan and his students may find interesting:

  1. DrJava doesn’t require the JDK anymore to compile programs. This
    could simplify the instructions in “Setting Up Your Computer”. To
    compile, DrJava now uses an integrated Eclipse compiler and needs just
    a JRE 6. To use the debugger or generate Javadoc, the JDK is still
    necessary, though.
  2. You can generate a custom drjava.jar file that already includes the
    ACM Java library classes from the acm.jar file. That way, those
    classes are already included on the classpath, and you don’t need to
    add it to the Extra Classpath under “Resource Locations”.

I’m convinced these two features, plus the smart “Run” command I just implemented, make DrJava an even better, simpler teaching tool.

Share
Posted in DrJava | 6 Comments

Print This Post Print This Post  

New Mint Release: r15405

I just created a new release of Mint and DrJava with Mint: May 8, 2010 (r15405). The release is available from the Mint implementation page:

The DrJava team released a second beta version of DrJava yesterday, drjava-beta-20100507-r5246.

Nothing has changed on the Mint language side, but there have been minor changes in the Mint build process, and several examples have been added.

There have been plenty of new features and bugfixes for DrJava, and they have been integrated into DrJava with Mint. Most importantly, DrJava with Mint will now automatically select the Mint compiler on start-up.

(Re-posted from The Java Mint Blog.)

Share
Posted in DrJava, Mint | Leave a comment

Print This Post Print This Post  

One Million Downloads of DrJava!

We have reached one million downloads of DrJava!

The DrJava download figure, provided by SourceForge, is authoritative as of Friday, May 7, 2010, at 8 PM CDT.

Many thanks to all our users!

Share
Posted in DrJava | Leave a comment

Print This Post Print This Post  

New DrJava Beta Release: drjava-beta-20100507-r5246

We have just released our second beta version in preparation for the next stable release: drjava-beta-20100507-r5246. You can download it from SourceForge or from the DrJava homepage.

Available for download at http://drjava.org .

DrJava is a lightweight programming environment for Java designed to
foster test-driven software development. It includes an intelligent
program editor, an interactions pane for evaluating program text, a
source level debugger, and a unit testing tool.

In addition to bug fixes in anticipation of the next stable release,
this beta release includes a number of new features introduced after
the last beta release:

These features include a simplified Java language level facility,
the ability to generate a custom DrJava .jar file that contains
additional libraries, and the ability to abort a “Find All” search
that encounters missing files.

Note: Java 1.4 compatibility has been dropped. To use DrJava, you will
need Java 5 or newer.

New features since the last beta release:

– The Java Language Level facility has been simplified. There now is
only one language level called “Functional Java”, using the file
extension .dj. It is comparable to the Intermediate level and
can still compile .dj0 and .dj1 files. .dj2 files are compiled
using the Full Java compiler. DrJava will suggest that you rename
.dj0 and .dj1 files to .dj files, and .dj2 files to .java files.

– DrJava can generate a custom .jar file of itself that includes
additional files. There is a Tools/Advanced/Generate Custom
drjava.jar menu item that takes the current DrJava executable file
and a number of user-specified files to generate a new jar file.

* The libraries included in the new jar file will then
automatically be included in the classpath and be usable without
adding them to a classpath somewhere.

* There is no functionality to remove the libraries again from the
modified jar file.

* Generating a custom DrJava jar file disables the check for
updated versions. Otherwise a user may download an updated
version that doesnt have required libraries anymore.

– When DrJava encounters missing files during a “Find All” search,
it will ask the user whether to continue or abort the search.

– Improved “New Java Class” dialog with some auto-completion.

– Better feedback when Java API data is loaded, which may involve
some delay if it is retrieved from the internet.

New features since the last stable release:

– The Eclipse Java Compiler is now integrated into DrJava. DrJava
therefore does not require the JDK anymore to compile
programs. Note that the JDK is still required to use the debugger
or to create Javadoc.

– DrJava supports the OpenJDK and JavaMint (multi-stage programming
in Java; see http://www.javamint.org/ ) compilers.

– JUnit 4.7 support.

– ConcJUnit support (for concurrent unit tests; see
http://www.concutest.org/ ).

– Access control for private and package private members now enabled
by default.

– DynamicJava (Interpreter) error messages are much better,
especially those involving method and constructor invocation.

– Added support in DynamicJava for explicit type arguments in local
function invocations (x = foo(23)).

– The Breakpoint, Bookmarks, and Find Results tabbed panes now have
Previous/Next buttons and associated keyboard shortcuts for simpler
browsing.

– The Interactions Pane working directory can now be specified even
when not using projects.

– If DrJava cannot start, for example because of bad memory settings
in the Preferences, DrJava will suggest that you let it reset the
Preferences.

– The preferred compiler can now be set, and this setting will be
restored when DrJava starts the next time.

– Zoom for Print Preview.

– New Class wizard.

– Save Copy ability for Definitions documents, Interactions Pane and
Console Pane contents.

Bug fixes since the last stable release:

– Fixed some indentation bugs.

– Fixed some GUI initialization problems that prevented DrJava from
starting on some systems.

– Fixed a bug that prevented DrJava from opening on MacOS 10.5 or
10.6.

– Fixed compiler error when closing curly brace missing.

– Fixed NullPointerException in Jar Project dialog.

– Fixed a bug that prevented users from editing External Processes.

– Fixed a bug in un-commenting source code.

– Fixed a bug in displaying the Auto-Import dialog in the
Interactions Pane.

– Improved suggestion to increase interactions JVM heap.

– Improved responsiveness when selecting a compiler.

– Fixed a bug that prevented users from generating Javadoc of
Language Level files.

– DynamicJava (Interpreter) bug fix allows the declaration of
interfaces.

– Miscellaneous small DynamicJava bug fixes make it much more robust
and correct, including better handling of member lookup, inner
classes, enums, interfaces, raw types, static imports, switch
statements, casts, and final variables.

– Bugfix for comparing 0.0 == -0.0 and NaNs.

– Bugfix in DynamicJava: Supports annotation declarations

– Bugfix in DynamicJava: Fixes parser bug for enums

– Bugfix in DynamicJava: Fixes implicit accessibility of interface
members

– Bugfix in DynamicJava: Fixes checking of assignments from character
literals

– Bugfix in DynamicJava: Improves checking of casts

– Bugfix in DynamicJava: getClass() is a special method with type
Class for all classes

– Bugfix in DynamicJava: Improves error messages for inner class
references

– Bugfix in DynamicJava: Preserves location in wildcards

– Bugfix in DynamicJava: Catches errors that occur during static
initialization of a class

– Bugfix in DynamicJava: Short-circuiting during type checking

– Bugfix in DynamicJava: += for strings

– Bugfix in DynamicJava: Array initializer is assigned to a non-array
type

– Misc improvements to DynamicJava SoureChecker

– Bugfix that prevented users from watching local variables in the
Debugger.

– Smaller Java Language Level fixes.

Share
Posted in DrJava | 2 Comments

Print This Post Print This Post  

Eclipse 3.6M7 Released

The Eclipse 3.6M7 milestone has been released now, and I integrated the new milestone of the Eclipse Java Compiler into DrJava. It seems like every problem I had found has been fixed. I remove our custom version of the Eclipse Java Compiler.

Share
Posted in DrJava | Leave a comment

Print This Post Print This Post  

Body Worlds – Koerperwelten Bremen

My mother and I visited the Koerperwelten Bremen exhibition today. It is one of the Body Worlds traveling exhibitions that display real human bodies that have undergone plastination. Here are some images from the exhibition in Bremen.

There has been some controversy about these exhibitions. Some claim that the display of the bodies devalues the donors or human life in general. In general I cannot understand those sentiments, although I found some of the plastinates a little questionable. For example, the poker players were not as educational as some other displays, although I can see that this arrangement may have been useful as a common “every day scene” accessible to visitors.

There was another body, I think it was called “mythical being” or something along those lines, where all muscles had been separated so that they could be seen individually. This was particularly visible in the arms, where all muscles for the fingers were now visible. That was highly educational, but I found the fact that the body was “riding” on its spinal column, as if it were a witch’s broom, somewhat distracting.

I left with a profound sense of wonder about the human body. Life is beautiful.

PS: The incredibly beautiful girl staffing the tickets booth, who looked a bit like a young Heather Graham, even accepted my US student ID. A rare occasion.

Share
Posted in Uncategorized | Leave a comment

Print This Post Print This Post  

Visa Interview

Today, I went to Berlin to renew my student visa. For the last few weeks, I had collected letters, filled out forms, taken passport pictures and paid fees. Compared to five years ago, everything was a bit easier.

The main form was the DS-160, and it was filled out online. All I had to bring was a print-out of a barcode. The problem with the DS-160 web page, though, was that it asked for information like all the dates of when I had entered and left the US during the last five years… and the website timed out after 30 minutes of inactivity.

Everyone in my department was very kind and helpful, in particular my advisor Corky, my committee member Walid Taha, and the department chair Joe Warren, of course. Today at the embassy, everyone was friendly too.

I was a bit worried, because five years ago, I encountered quite the “Giftzwerg” there: She asked me “Do you have forms X, Y and Z?” and I said “Yes.” She returned my papers and said “No, you don’t.” which really confused me. What she meant to say was “Do you have ONLY forms X, Y and Z, and nothing else?” She clearly enjoyed being cryptic.

But today, I encountered no one like that. A young woman checked our documents outside, in the slight Berlin rain, and she noticed two problems: I still had my I-94 form in the pass, and she said that was “a big no-no”, but I told her it was a multiple entry I-94 form. She asked me to discuss this with her colleagues inside. Then she was looking for the receipt that I had paid the SEVIS fee. But I told her I had been a student for so long, I didn’t have to pay the SEVIS fee, I was grandfathered in. I had a print-out from the ICE website too, had I needed it.

Next were a metal detector and an X-ray machine and a couple of Marines checking passports, and then I was in. There were only three visa applicants before me. I handed my passport and a few pieces of paper to a woman behind bullet-proof glass (I think it was the same woman who worked there five years ago; last time, she commented that she had the same birthday as me) and sat down to wait for my interview.

Maybe half an hour later, I was called to another window, and a male consular officer (the only one I’ve ever dealt with) got me ten-printed. Then he asked me what I was doing in the US (“I’m a PhD candidate in computer science and work as a research assistant at Rice University.”). Next, he asked me a bit about my research and how much work I had left to do. He said he got a PhD too, and that it took him longer than it will take me.

Then he already told me my visa had been approved and that the embassy will process my passport and mail it back. Great! Thanks, everyone, for your help.

Update

Today, on Wednesday, just a day and a half after my interview, I received my passport with a new visa stamp.

Share
Posted in Graduate School | Leave a comment

Print This Post Print This Post  

Python is Pretty Cool, And So Is DrJava

I’ve got to admit: Python is pretty cool when it comes to quickly writing powerful scripts. I wanted to extract the number of all-time downloads from DrJava’s SourceForge statistics page, but it wasn’t on the same line as the “Total” word, so a simple sed one-liner wasn’t enough.

Of course I could have written it in Java, but that would have involved compiling it and having class files in addition to the Java file. I probably could have written it as a bash script, but to be honest, bash is pretty clunky. Python did the job easily and well.

import shutil
import os
import time
import datetime
import math
import urllib
import re
from array import array

filehandle = urllib.urlopen('http://sourceforge.net/project/stats/detail.php?group_id=44253&ugn=drjava&type=prdownload&mode=alltime&file_id=0')

found = False
for lines in filehandle.readlines():
if found:
text = lines.strip()
p = re.compile(r'<.*?>')
text = p.sub('', text)
# p = re.compile(r',')
# text = p.sub('', text)
print text
break

if lines.find('Total') != -1:
found = True

filehandle.close()

There are probably better, more elegant ways of doing this, but Python is one of those languages that I use but never learned, just like Perl or PHP. Maybe it’s a “P” thing. No, it isn’t, I actually learned Pascal at my Gymnasium (German secondary school) and at university in Germany.

Anyway, using this script I have now integrated a download counter on the DrJava website that gets updated every midnight. We’re seriously getting close to a million, faster than I expected. This is probably because of the new DrJava beta version we released.

With less than 5,000 downloads to go, we might hit the million early in May already!

Share
Posted in DrJava, Uncategorized | Leave a comment

Print This Post Print This Post