aerkiaga's blog

Progress report on my projects

Not much to tell about this recent week. Not because I might've been lying around all day doing nothing, but simply because I've focused more on personal tasks and things I had already talked about in previous posts. I've exercised a lot, dedicated much time to learning French and improved my score quite impressively in driving tests. I also type faster (26 WPM) on the CC2.

The date on which we'll be called to choose a medical specialty and hospital has also been revealed: May 5 in my case.

I would like to use this week's post to write a review of the Charachorder Two, the new input device I received last week. I have done many other things besides trying it out and practicing on it, but I believe this will be of greater interest for anyone.

The Device

In case you haven't read my previous post, the CC2 is an ergonomic, programmable, hybrid chorded and non-chorded keyboard. By “ergonomic”, I mean it has a unique shape, with two halves that can be split apart or bolted on supports and that fit nicely under the hands; each one has nine joystick-like 3D switches that can be pressed in different ways with little force.

By “programmable”, I mean it has an apparently custom-made chip running CCOS, a firmware that allows everything to be customized, from timings and layouts to chords (more on that later). To do so, you use a Chromium-compatible web interface, but many settings can be changed using just the device, with a specialized interface that can be shown on anything that accepts keystrokes.

Then, I feel I need to explain the whole chording matter. A chorded keyboard is one on which you type by pressing multiple keys simultaneously. They are used in contexts like court transcription, which need very high typing speeds. The CC2 is that, but also not: if you move a switch in some direction, a plain old character appears; if you move more than one at the same time (and you have programmed that chord before), an entire word or phrase is sent to the computer. You can also program other actions as chord outputs, and chords can be combined in some really cool ways.

At the end of the day, your computer only sees a regular keyboard, which sends scancodes through a USB port. Remember this.

Physical description

Lighter than I expected, with a matte plastic finish. Comes with an elegant travel case included. I didn't attempt to separate the two halves (which are joined by default with an aluminium bar). Small rubber pads keep the device from sliding over the table, and there are screw holes so one can bolt the halves on e.g. the armrest of a chair.

The keycaps themselves seem 3D printed, not with a great quality though. At least they send 3 spare ones in case you lose/break the existing ones. The switches themselves work really smoothly, although I would have loved some more clickiness.

Character Entry

Easier to learn than I expected. They provide a web interface to learn the device, which I used for a few minutes a day and got to about 20 WPM in a week. The default layout is pretty good, it allows for some common letter combinations to be typed especially fast.

I was slightly worried that I would encounter problems to type using the Spanish layout, but turns out it works out quite nicely. Just a slight modification to the base layout to be able to type <, > and }, and ready to go! Common characters like ñ or ´ are well-placed by default.

Typing regular prose is physically pretty comfortable. I have tried it for programming without much success; in my experience, a regular QUERTY keyboard with Vim is enough, but it may be the case that once I get faster on the CC2 I'll be able to get more out of it...

Chorded Entry

Here I did find some issues related to my keyboard layout. First of all, the Device Manager and documentation overall don't do much hand-holding if you're outside the US layout. If anything, the Device Manager makes it even more confusing, by translating some stuff to your current layout while leaving other unchanged. You also need to be really careful about the codes you use to prevent garbled output, and dead keys aren't very well supported yet on chords.

I created my own chord library, by adding words both in order of frequency and using a weighting algorithm in a script I wrote so I could prioritize words that'll help me in my job. For example, I can easily type the word “paciente” (patient) by pinching two fingers to p and t. I've also added chords for actions like deleting the last word or switching on Caps Lock.

The default timing settings for chords make it really difficult to learn at first, so I had to increase them a bit.

Overall

I'd give this device 5 stars for what it has managed to accomplish and how easy it makes to type fast (even on a different layout), but I must warn that it lacks some much-needed polish. I expect the documentation and firmware to improve over time though.

I'm admittedly a big keyboard fan. I currently use a nice mechanical keyboard I had custom-built long ago; I don't game at all, but I do type a lot, and that's just at home. Just imagine how many lines of medical records a psychiatrist has to type every single day...

I can touch-type on QWERTY at about 55 WPM, which is about the average typing speed for a physician. I can also touch-type on Dvorak (not any faster though), which can be a small help to avoid carpal tunnel syndrome in the long term; a colleague of mine intends to use that alternative layout at work for this very reason.

I have something different in mind. This week I received my order of a CharaChorder Two, an input device that could be described as an ergonomic, programmable, hybrid chorded and non-chorded keyboard. It could also be described as the mother of all input device learning curves, with people reportedly reaching 300, even 500 WPM after over a year of training; at those speeds, I could easily shave off precious minutes and annoying interruptions every time I see a patient, allowing me to focus on my job and my patients, and avoiding delays. An investment in time that I'm confident in recovering soon.


On a different note, I'm already pre-inscribed for a Master's Degree in Biomedical Engineering, as well as steadily studying for a driver's license and doing daily language lessons on Duolingo (I'm learning French at the moment).

This week, along with the usual physician-interviewing activity, I've set out to try something new. I've been learning some concepts in analytical finance, with the help of a loved one who is an expert in the field and was eager to teach me, as well as a thorough use of the Internet.

Now I can solve some problems using things like the Black-Scholes framework or Nash bargaining equilibria. I've been writing a financial calculator program in Rust to get a better grasp of all of it and other things like Monte Carlo valuation. This is also a great opportunity to try out some programming stuff, like attempting to make a nice CLI interface, using an internationalization crate or introducing dimensional analysis in calculations.

If the calculator turns out good, I will surely publish it on my Github. Nonetheless, I would advice anyone up front against using it for anything other than experiments or learning; I'm not a financial advisor, just a medical doctor having some fun on my spare time (I might be lying though, so don't take medical advice from me either, or anyone on the Internet for that matter).


I've also begun taking driving lessons. The reasons I've waited for so long are twofold: I wanted to focus on studying during my university years, and I have never had a compelling reason to drive (public transport is great here). But that might change in one or two years, when I'm sent to different hospitals and other mental institutions to complement my specialized training.

I want to enroll in a Master's Degree in Biomedical Engineering this month. Becoming an engineer is in some way a goal for me, and would allow me to formally claim some of the skills I've learnt along the years. I secretly feel like one day some game-changing invention will shape the way we interact with our brains; something like an improved brain-computer interface, or a revolutionary imaging technique, maybe something else entirely... And, when that happens, I want to be right in the middle of the fun! All of that medicine, psychiatry, electronics, programming, and formal verification will finally converge on something (just pipe dreaming...).

This week I've given a good cleanup to my digital life. First, I purchased a backup drive; I transferred much unnecessary data from my devices and freed up space, then did backup copies of all of them and scheduled further, periodic backups.

I also downloaded and deleted all my data from the cloud, including photos and emails, and stored two copies of said data in different drives. I deleted any social media accounts I was no longer using and removed all comments from the ones I was using.

Finally, I installed a password manager; locked it with a very strong master password and changed many of my online passwords to randomly generated ones stored locally. Then I backed up the database to two other drives and two different devices.


Of course, I've kept interviewing local doctors to get an idea of what each hospital is like from their perspective.

Regarding Nacre, I've done small incremental changes to data type-related code generation. Now all kinds of structs can be constructed and their fields accessed. Only recursive types are left.

I have created a Github roadmap for the first release. It will probably take a lot to finalize, but most of the work is already done.

Here are the mutation testing-measured scores for the different components:

  • nacre_ast: 59 %
  • nacre_cache: 100 %
  • nacre_compiler: 76 %
  • nacre_kernel: 85 %*
  • nacre_parser: 48 %

*nacre_kernel additionally has a fuzz testing suite.

This week, I've interviewed a few local medical practitioners to help me choose a medical specialty, and, more important, a place to work and train on it. Long transcripts from the interviews, recent news and information on the different hospitals – all are helpful in the decision.

I also re-learnt the ways of Taskwarrior, a command-line task management software. I tried it long ago, but now that I've already transferred most of my workflow to the keyboard by virtue of tools like tmux and Vim, I'm starting to really feel the increased productivity.

How's Nacre? Well, this week was more calm, with just some work on struct code generation. The goal is to get different data structures working and tested, then proceed to the next task in the roadmap, namely adapting the command-line interface.

For the first half of the week, I got Nacre a little bit further forward; now it's possible to compile some relatively simple programs. The tests working so far showcase some Bool operations and an Option::map, which requires enums with fields, closure passing, plenty of foreign function interface gimmicks and generic specialization. The test code for this one looks like this:

fn test(f: Bool -> Bool, x: Option Bool) {
    x.map f
};

And, speaking of specialization, I attended some conferences in Madrid during the second half of the week, regarding the choice of a medical specialty. I've been transcribing my notes for the last few hours, and I've arranged an interview with professionals in my target field later this week. So far everything seems clearer than ever for me: I want to become a psychiatrist.

So much has happened since my last blog post. My Google Summer of Code project was successful. I got a medical degree and ranked among the top 1% in public healthcare medical examinations. Did some research on ultrasound imaging and made a few prototypes (one manufacturer has offered to support my next prototype).

I've become more proficient in Rust and learnt Verilog and Chisel, which I use to program FPGAs for my ultrasound devices.

As for my programming projects, these years I've slowly expanded nodeverse, my voxel-based videogame. But my largest projects by far have been formal verification-related; I learnt Coq, and latter attempted to create my own language for formal verification: Rooster. After working on it for some time, I had collected a lot of knowledge on the design of these kinds of languages, and programming languages in general. Last year, after a lengthy design phase, I finally felt comfortable enough to go on to create Nacre.

I will probably talk more about this Nacre language in future posts, but for now I would just like to make an overview of its completion status and goals. Right now the compiler is almost fully functional, with a complete type checking kernel, the parser only missing some features, and code generation disabled by default for now but steadily progressing. Right now I'm implementing a specialization pass at the IR level.

The end goal is to get a language that one can use to write specific critical parts of a larger project in a formally verified fashion, letting the build system handle compiler invocation and linking.

Well, I did it. I got accepted by Open Chemistry and Google to officially work on Avogadro 2's biomolecular support. See this Discourse post to learn more and add your own ideas. I'll be (and have started!) working on the following:

  • Adding the ability to create molecular surfaces (Van der Waals, solvent accessible and excluded), colored by at least one scheme (e.g. electron density, hydrophobicity, partial charge...).
  • Adding support for rendering non-covalent interactions, like close contacts, hydrogen bonds, etc.
  • Making Avogadro 2 able to handle coordination complexes gracefully.
  • Fixing issues affecting bioinformatics workflows and improving performance in that area.

Additionally, I've cleaned the dust off Nodeverse and finished the latest piece of infrastructure: a set of scripts to convert OpenSCAD files into .obj!

I've just added automatic UV map generation and better handling of non-rectangular faces. Note that the scripts are only designed to work with axis-aligned faces (which are the only ones I'm using in Nodeverse, by design), but now at least they can have any shape within that constraint.

The idea is to use these new tools to ease development of models for the nv_ships mod, part of Nodeverse.

I did quite a lot of learning last week around molecular dynamics and quantum mechanics. In fact, I managed to get GROMACS, CP2K and OpenBabel working together to give accurate predictions on the density and heat of vaporization of various substances.

I sent a small PR to Avogadro 2, advanced in the design of both the Big Project and the tomograph, printed a piece of the latter... But I've got an exam today, in a few hours, and I've barely touched the subject :)

The more I study about Medicine, the more I see what's missing from it. And the less I think I know about the field... So massive...

For example, why don't medical records leverage Open Source Software? Why aren't EKG and other devices generally available on the cheap? Why do all imaging tests have pitfalls preventing their massive use? Why is AI not assisting imaging techniques yet? Why isn't there pharmacological secondary prevention for cancer? Why are tisular force equilibria so under-researched if they are so important? Why is the surgical field physically open to air? Why are GMO bacteria taking so long to be part of microbiome-targeting therapies?

I should probably stop wishing and keep studying. Somebody will eventually research the above after all, but no one can do my exam for me!