Hacker News new | ask | show | jobs
by ecdavis 1507 days ago
I worked for the APS as a very junior programmer 10 years ago.

To interact with our database we had a custom JDBC driver which used a VT100 terminal emulator to connect to what had at one point been a user-facing mainframe application. When a query was executed, the driver would:

- Emulate a user entering a series of key-presses in the terminal to navigate to the correct screen in the application.

- Tab to the query input field, enter the query, then send a return key-press to run the query.

- Read 20 rows of output, then send a key-press to show the next page of results, rinse and repeat.

- Parse the array of rows-represented-as-strings into properly types objects.

- Repeatedly "press" escape to get back to the main screen so that the application state would be ready for the next query.

One of my first tasks was to make this driver work with a column type that stored binary data.

I kind of admired the ingenuity.