CodeMic: A new way to talk about code
codemic.io
codemic.io
Back when I was at Twitter, we used Review Board for code reviews (this was in 2009, before GH was a thing for most companies). It was tough to thoughtfully review large branches, especially for parts of the codebase that I wasn’t familiar with. I remember thinking, if I could somehow record the development process for a PR I was reviewing, it would be easier to understand what the submitter was trying to accomplish and how they went about doing so. I found myself more so reviewing code style instead of functionality, architecture, or design.
I watched most of the intro video, but didn’t go deeper on the site. Does CM integrate easily into the code review/PR process? I suppose I could just attach a link in any PR description?
Great work!
- attach a link as you said
- once the web player is ready, it could perhaps be integrated into the code review tool. It'll be like embedding a youtube video
- the entire recorded session can be exported as a zip file and attached to the PR or shared privately
- why is Doom gameplay is shown alongside recording of someone coding a player logic? Was it the developer recording the screen and narrating, explaining what he means with that line of code?
- I see appeal to "relive" your own code (so you have a mental model of problem domain and the code base in your head). But how is it supposed to work for onboarding new developers? Even in the code examples in video, how does one understands the thinking - like, what are those magic constants (dist == 200), for example? Is there audio narration or what?
Also, I believe that next year will be the true explosion of agentic code editors, so how is it gonna work here? Is it going to capture prompts in Cursor/Windsurf? Will it even be easy to follow what changes AI assistant made in bulk in multiple files. Since I switched to Windsurf, the speed and workflow is so dramatically different from that old-school person typing coding workflow.
The main idea is to create narrated guides through the code. It can be audio only or mixed with video and images.
CodeMic basically records changes made to the code (as well as scroll, selections etc). It doesn't really care if the changes are made by the developer or the AI assistant. I think it would be the job of the narrator to explain why the files suddenly changed.
I'm excited to see what kind of content developers will create on CodeMic but personally, my inspiration is 3Blue1Brown. That is to say, not so much live recording of a 3 hour long programming session but instead shorter, more polished and well planned content. I suppose time will tell which will be more popular.
Self-directed learning is the best learning. Consider me sold, it's a pretty simple mashup in principle but it's immediately clear why it would work well (both implementation and as a user).
Not sure if early access with email gives everyone access now, or if it will be only given to some people or only when it’s a bit more ready.
OP should for sure make a follow up post, with Show HN prefix, when it’s available for all users. For now, if it’s not yet available for everyone to try, I think OP made the right choice to not mark this post as “Show HN”.
I like the idea of CodeMic a lot. Will the mobile app or web player also allow you to explore the code like you would in the IDE? Perhaps something built on VS Code in the browser that integrates CodeMic? Similar to how GitHub has VS Code in the browser that you can use to explore and edit code from repos.
With something like VSCode for browser, as opposed to a simple code viewer, we'd also be able to use the intellisense features to better understand the code.
Would be super if the player can be embed in docs.
One of the reasons I loved Scrimba for learning html/css/js was the fact that the lessons were integrated with an IDE and I could pause the teacher and tinker with the code right then and there.
CodeMic is going to be similarly useful for me.
One thing I’ve thought about is how AI assistants are actually turning code into literature, and literature into code.
In old-fashioned programming, you can roughly observe a correlation between programmer skill and linear composition of their programs, as in, writing it all out at once from top to bottom without breaks. There was then this pre-modern era where that practice was criticized in favor of things like TDD and doc-first and interfaces, but it still probably holds on the subtasks of those methods. Now there are LLM agents that basically operate the same way. A stronger model will write all at once, while a weaker model will have to be guided through many stages of refinement. Also, it turns the programmer into a literary agent, giving prose descriptions piece by piece to match the capabilities of the model, but still in linear fashion.
And I can’t help but think that this points to an inadequacy of the language. There should be a programming language that enables arbitrary complexity through deterministic linear code, as humans seem to have an innate comfort with. One question I have about this is why postfix notation is so unpopular versus infix or prefix, where complex expressions in postfix read more like literature where details build up to greater concepts. Is it just because of school? Could postfix fix the stem/humanities gap?
I see LLMs as translators, which is not new because that’s what they were built for, but in this case between two very different structures of language, which is why they must grow in parameters with the size of the task rather than process linearly along a task with limited memory, as in the original spoken language to spoken language task. If mathematics and programming were more like spoken language, it seems the task would be massively simpler. So maybe the problem for us too is the language and not the intelligence.
Soon AI will read this big blob of code and I can ask away and the AI can explain while jumping to places in the code, which I can hoover for inspection. Then I ask it to refactor it or add this or that functionality, add tests for it and show the results of the tests.
Code becomes literature, becomes code.
I agree that linear code is easier to read and understand. I've noticed that often when my own code gets confusing it is because it's too nested, or too many things are happening at once, or the order of actions is not clear. After gaining a deeper understanding of the problem, rewriting it in a more linear fashion usually helps but not always possible.
I'm curious how a programming language could enable writing complex code in a linear fashion if the complexity of the code is due to the interconnected nature of all its parts. In other words, there may be no way to connect all the parts in a linear way without oversimplifying.
Of course, sometimes the complexity is incidental, that is, if I were a little smarter or spent more effort, I could reduce the complexity. But some complexity is intrinsic to the problem being solved.
The question that really fascinates me is not why code is non-linear, but why literature isn't?
Mathematics and programming derives from spoken languages. The thing is that spoken languages lack precision: What you said is not what I understand. So they chose a subset, assign the items precise meanings and how to use them in sentences. Then convert the whole in a terser form for ease of notation. Starting with the terse notation is the wrong way to go about it, just like someone does not start learning music by reading sheet music. Learning programming is easier by learning what the components are and not how to write syntax.
> So maybe the problem for us too is the language and not the intelligence.
The issue is understanding. Behind every bad code, there's someone with either lack of understanding or making hasty decisions (time pressure, tiredness,...).
This is true, but extreme precision is most useful if there's only communication one way, i.e. the programmer communicates to the computer how to operate and the computer does not respond (other than to execute the code). But if there's a dialog, then both parties can ask for clarification and basically perform a binary search to quickly hone in on the exact meaning.
This only happens for toy examples; all real development is iterative, across years and teams. There are a few people who can do Feynman "think very hard and write down the answer", but it's a unique skill of limited availability.
> One question I have about this is why postfix notation is so unpopular versus infix or prefix, where complex expressions in postfix read more like literature where details build up to greater concepts. Is it just because of school?
Developers (you, and the rest of the audience) really need to be able to distinguish between a personal aesthetic preference and some sort of timeless truth.
> Could postfix fix the stem/humanities gap?
I feel fairly confident when anyone posts One Weird Trick nonsense like this that the answer is "no". Especially as postfix is in no way new, it's decades old.
Heck, this is also Anglocentric: there are plenty of human languages which are "postfix", in that they're subject-object-verb rather than subject-verb-object. Such as German and Japanese. Doesn't seem to convey an automatic advantage in either science or literature against the juggernaut of ubiquitous English.
(Mathematical notation tends to use infix operators for some things and prefix operators for others; postfix seems to be rarer? Mostly for units?)
I'm hoping CodeMic will be more than tutorials and in more places than VSCode.
For example, I have a passing interest in compilers and would love to see a tour of say LuaJIT by an expert, to see its general architecture or a deep dive into some specific corner of it. Not really a tutorial, but a guided exploration.
With proper architecture (e.g. using LSP), all-editor support would have been (semi-)automatic.
More on the solution to the "M by N problem": https://matklad.github.io/2022/04/25/why-lsp.html#Standard-E...
<input type="email">
At the moment when I click to add my email, Safari on iPhone suggest putting my name into it. Usually Safari will suggest putting my email into email inputs. So maybe it’s missing the type attribute?I would appreciate any tip or hints on how to approach it.
The VSCode APIs [1] is the place to look for driving VSCode. Perhaps I could help more if you explain what exactly you're trying to do.
Rundoc is a tool for writing tutorials such that the author is guaranteed the outcome is valid (if a command fails, the tutorial fails) and for helping users see the exact output they would expect (instead of a static output). The tool has website integration that allows you to take screenshots and navigate a webpage.
Recently I wrote this tutorial https://schneems.com/2023/06/14/its-dangerous-to-go-alone-pu... which makes heavy use of vscode extension shortcuts and hover over tips. I would love to be able to keep that tutorial up to date by scripting the tooltips to make sure the options don’t change and the suggested commands like CMD+. Continue to work.
I believe there are two ways to do what you want.
1. Use the VSCode extension APIs and the built-in commands[1] to write an extension that unit tests your tutorials
For example, you could use vscode.executeCodeActionProvider which will return the actions that VSCode suggests at a specific point in the file.
For the shortcuts, I think the only option would be to read user's keybindings.json file directly.
This is the easiest way I think and may be enough but generally speaking, VSCode's APIs are very restrictive and may not give you everything you need.
2. VSCode being an Electron app can be run from Playwright (similar to Selenium) which should give you full control to drive and inspect it. I haven't done this myself but apparently Playwright is used internally to test VSCode as well. So it should be possible. See [2].
In the future, we could add live record & replay which would pave the ground for pair programming as well.
> He wrote about a peculiar observation: everyone says reading code is important, yet few of us actually do it.
This is an approximation of watching screencasts, just like watching games on Lichess is an approximation of watching chess on Twitch or YouTube.
While it’s a nice supplement to reading code, it is a tiny fraction of my code consumption. That “code is not literature” is just the non linear nature of reading code*, but still perusing the source code, documentation, commits, tests, data, etc is far more important way of consuming code than watching it being typed out. Talks are important but most of the utility is the author deliberately communicating something.
As for reading code in a way that reflects it being different from literature, it’s helpful to be able to quickly search the code and find references whether through searching or links. Running the tests or using the code in a repl or by making a program that uses it is also important and reflects the naturalist aspect mentioned in the article.
This seems like it could be quite cool but I think to help programmers to understand more codebases it would be better to try to streamline reading code in a non-linear way. Take reading the repo of LLVM for example. I think an LLM could be handy here. I could ask it to categorize the files.
* Reading literature is also not fully linear, especially after the first read.
It's about the guide happening inside your IDE next to your code. When the guide talks about a specific part of the code, it should be shown right there next to it. Not a small snippet of the code but the code in its proper context where you can use your IDE to dig deeper into it, see the relevant docs, change it, run it, experiment with it.
With CodeMic, the guide is synced to the code inside the IDE. It's really a different experience.