3 ms·
When I was in college, I was addicted to Starcraft II. Luckily, I primarily played 4v4s so the brainpower necessary to win wasn't nearly as high as 1v1s (which
by drusepth 10y ago
When I was in college, I was addicted to Starcraft II. Luckily, I primarily played 4v4s so the brainpower necessary to win wasn't nearly as high as 1v1s (which left far less room to meme, so I didn't enjoy them nearly as much).
However, while playing game after game in the evenings, I was always frustrated that I was using the inputs and outputs of my body so inefficiently. Starcraft tied up my eyes and my hands, but I still had time to think about the things I'd be coding if I weren't playing, and wished wholeheartedly that I had a few extra hands so I could play AND code at the same time.
This frustration crept into other activities like the drive to and from classes (and, even more frustratingly so, the long drive to and from home when I visited) and I eventually came up with a plan to let me code while multitasking with things that require my hands (primarily starcraft and driving).
I had taken the traditional compilers class the previous year so I had some experience with lexing and grammars, and set out to make my own voice-first programming language. I called it Bespoke (ha) and uploaded a proof of concept to GitHub[1][2] after it was featureful enough to solve a couple Project Euler problems.
I decided to use Javascript in the beginning so I could take advantage of webkit's native speech to text and get right into the logic without having to deal with processing sound or extracting words from it. After getting a proof of concept up, I expanded the flow control and data structures it supported (piggybacking on JS) and eventually wrote some fun (albeit simple) programs while gaming, but eventually gave up on the project when I realized I could code things up in a similar amount of time by just outlining code structure while gaming (also using STT) and coding up the necessary snippets in brief downtimes (between games, at stoplights, etc).
Now, I still pretty much do the same: I use a prose-like DSL that's evolved over the years to outline what to code, in what order, and how to tie it in to other pieces. I now take the train/bus instead of driving (and code at will), and outline what to code while I'm dead in Dota 2 games.
[1] https://github.com/drusepth/voice2code/blob/master/voice2code.js https://github.com/drusepth/voice2code/blob/master/voice2cod...
[2] https://gist.github.com/drusepth/3134188 https://gist.github.com/drusepth/3134188
- jbuild 10y agoThis is really interesting. How are you able to multitask so well? I can't hardly listen to a podcast and code at the same time, let alone play a game.
- treehau5 10y agoWhen something becomes habitual, it frees up the cognitive load for you to think about other things. I assume parent has played so much starcraft, that many of the routine aspects of the game such as bootstrapping a base, farming resources, and building a military has become engrained. Especially in 4v4's the risk of an enemy trying to pull an early cheese is so low, that the beginning of the game is basically almost always the same. When I was playing Diablo II, I used to be able to complete the Secret Cow Level runs with a nova sorc almost by rote. I would often be thinking about other things, chatting with friends, calling into internet radio shows while doing this
- drusepth 10y agoAs the other response mentioned, at that point gaming was pretty habitual (and way more "thoughtless" than when I first started). I'd start up a game with a general plan and adjust mildly as needed, but in 4v4s it's basically 10-15 minutes of rushing an economy (which is pretty rote after a while) into massing up your army (which is pretty must just reflex APM of "select all barracks, queue up another marine/marauder in each; select all factories, queue up a few tanks/thors; select all starports, queue up a few medivacs/ravens") and then filling any empty space with random drops and harassment. I think there's a _lot_ more thought that goes into 1v1s since you're in a two-sided equilibrium and can't start losing much, but in 4v4s there's so much room for comebacks and throwing (and/or teams working together or not) that it doesn't matter nearly as much. I couldn't listen to a podcast and code at the same time either, probably. If I'm listening to a podcast, I'm mentally trying to process it. If I'm coding, I'm mentally trying to plan/process what I've done. Any mental processing from one takes away from the other. Podcasts, though, don't require any use of your hands. I actually feel guilty _just_ listening to podcasts (or similar) unless I'm also doing something like painting or paperwork that requires hands but not brainpower. I recognize it's kind of irrational, but it just feels like a waste of time and potential when I'm (probably) not going to live forever. I think it's just a matter of recognizing what your potential inputs (seeing, hearing, touch, processing) and outputs (hands, voice, mental "caches" like outlines that you can context switch back into later) are and choosing activities to multitask that take advantage of the maximum amount of each without overlapping.
- d_burfoot 10y agoThis is really cool. You should think about doing a startup around this, especially given the new tech ecosystem with AR/VR and good voice recognition. I would love to be able to code, using a headset+phone combo, while wandering around in a park.
- pg_is_a_butt 10y agoyou're all idiots.
- bazzargh 10y agoThe first time I read about voice programming (in Heinlin's 'Number of the Beast', the flying car they use is voice programmable[1]) I considered how you'd implement it and figured what they do in the book was too cumbersome - essentially natural language. What they did do though, was create shortcut commands for sequences of commands, then shortcuts based on shortcuts... and this to me suggested a Forth-like language might be a better fit. I think it's still the case, C-like languages have too much grammar going on to deal with without visuals, forth is grammar-free. Also, it's naturally shell-like; instead of your 'run the code', just say the function you need to execute; you can test and redefine each function as you go. I attempted to build this on a ZX Spectrum in 1983, based on some voice recognition code from a magazine...needless to say I didn't get too far with that hardware. I should have another go. [1] Sample: "Program. L axis add speed vector three point six klicks per second. Paraphrase acknowledge." "Increase forward speed three and six tenths kilometers per second." "Chief Pilot?" "Level." "Execute." Deety glanced at the board. "Gay Deceiver, H-above-G will soon stop decreasing, then increase very slowly. In about fifty minutes it will maximize. Program. When H-above-G is maximum, alert me." "Roger Wilco." "If-when one hundred klicks H-above-G, alert me." "Roger Wilco." "If-when air drag exceeds zero, alert me." "Roger Wilco." "Remain in piloting mode. Ignore voices including program code words until you are called by your full name. Acknowledge by reporting your full name." "`Gay Deceiver,'" answered Gay Deceiver.