For example, both vim and emacs have snippet or template plugins (ex: yastnippet, snipmate, ultisnips, xptemplate, etc) that can be activated with a short keystroke and which then expand to whatever code or text the user desires. Then, depending on the features of the snippet/templating plugin in question lots of other advanced behavior (such as selecting items from a menu, activating sub-snippets/sub-templates, etc) can be activated. No need to use a steno keyboard for any of this.
Weirdly, though developed for Georgi the lightweight springs have found themselves back into Gergo and GergoPlex as users have reported it helping with their RSI flareups (compared to traditional mechs)
I used that for a couple common symbols in LaTeX' math mode, e.g. entering ;lra gets me a \leftrightarrow.
But I wouldn't recommend that approach for multi-line snippets and more complex cases, the config will get unreadable otherwise.
imagine writing code as fast as your thoughts are?
Well, also a note: programming is not typing. it's 90% thinking. But at the end of the thought process, it just burns to turn your thoughts into working code ASAP! It would be so nice to streamline, optimize the process of the thought to code transfer. Until mind readers are invented, steno is a great solution
I'm skeptical that typing is the bottleneck you think it is on the code-writing front.
>Why should I spend time implementing this logic as a function when I can just use macros to type it 5 times with 5 key strokes?
I remember once in undergrad we had a particularly gnarly computation problem to tackle. Some people's code ran as long as 40 minutes. Most were around the 10-15 minute mark. A few were in the 4-5 minute range.
Mine ran in 50 seconds. No one else came even close.
Now, I get that that's not always required. For a one off calculation, it makes no sense to spend 3 hours of developer time to save 1 hour. But if you have to run it 10, 100, 1000 times it starts to make a lot of sense.
I can hack together a convoluted piece of shit pretty quick. No design doc, documentation, design elements that would give me flexibility or error checking. There are always compromises, but I just find it's extremely rare that my typing speed is the limiting factor. It always seems like spending a bit more time thinking about design saves me time in the end.
Maybe you're John Von Neumann or something but like I said, I'm just pretty skeptical.
Maybe its easier to specifically describe the code/problem?
For the best speedups, refactoring crappy code isn't going to cut it. It WILL still result in some nice performance boosts, and it's a good way to code in general. But when performance is absolutely essential, you're probably going to have to completely redesign from the ground up.
Mostly it seems like it just comes down to focusing on the parts that are going to take the vast majority of time and then just thinking very, very deeply about the problem you need to solve in that chunk. (Including asking if you're solving the right problem!) and what each and every function call or operation does, and trying to be as smart as you possibly can. Some fairly subtle things here working with intrinsic libraries can sometimes do some really stupid things behind the scenes that are hard to spot. Be careful to avoid any extra steps that are unnecessary, where data might get copied in memory unnecessarily or things like that.
Most of the time for the real speedups, I was writing my own libraries in Fortran that were custom tailored to the problem I was trying to solve. This is important because you might find some weird data validation being done or something that isn't relevant to your pipeline, but is included for generality.
There's certainly no magic bullet, but the most important is thinking hard about your problem, make sure you're solving the right one and the next most important thing is probably custom tailoring the libraries if you have time. ...assuming it's a problem that isn't so well solved. Sometimes that can be a waste of time of course, because your use case isn't so unusual.
EDIT: also how many times in your career you had a problem where you had to make a significant and time consuming effort over that one line of code (other than hackathons, of course). With practically all high-level langs in modern collaborative environments readability is prioritized. “I should be able to read your code as a well written prose” - uncle Bob’s statement, is pretty much universal doctrine. Ability to type fast here is greatly underestimated
Readability and verbosity are two different things. I can see how someone using Java would think that typing faster is better. But that's a reflection of poor language design choices rather than anything intrinsic to programming.
Strictly speaking I don't need to use Vim to write and edit my code and it doesn't impact my typing speed in the slightest, however it cuts delays when modifying code(moving hands to mouse, to arrow keys etc.) much shorter and makes the whole thing feel more direct.
Although from my perspective I have my doubts if switching from something like Vim to a steno keyboard would be worth the time investment. For the usual text and many other tasks I can definitely get behind the idea, though.