John Carmack: Best Programming Setup and IDE – Lex Fridman Podcast Clips
youtube.com
youtube.com
We were working on a distributed file system, and I had complained that we couldn't be expected to finish on the same deadline as the hardware device driver teams and the network stack teams. How would we even develop our software if we didn't have any working communication between machines? Well, my friend came to the rescue and wrote the kernel support for the NIC and a comm stack up to the level of UDP (having a debugger helped).
Eventually, the managers of the other departments that wouldn't cut my team any slack on our schedule started coming around to ask us for help because they were falling behind schedule. They were responsible for the official development of the network device drivers and networking, and it turned out they didn't have a working kernel debugger like we had (thanks to my friends personal one), so they had fallen behind schedule while we were already making good time on our distributed file system running on top of the our own hacked together temporary device drivers and networking code. I had to lend the teammate and his debugger to the other two teams to help them with their schedules.
I’m guessing he got fired and moved to a cabin in the woods. No way talent of that level can exist in a corporate environment too long. Too much jealousy, etc and the higher ups usually can’t stand someone who won’t play by their rules even if the results speak for themselves.
Hope I’m wrong.
Not sure if it's an age thing but there is a particular feeling common to contemporaries of that era, growing up in our formative years as computers grew from their humble beginnings to the incredible machines we have now. At that time, each new improvement brought astounding differences in capability. In the space of 10 years we went from 8k to 64k of memory, 4 colors to 256 colours to 16k colors to 16M colours. Resolution from 320x200 to 640x480 to 1024x768, which was close to photo-realistic (for the time, an amazing capability). I remember how revolutionary it was when I first got a computer that could render 80 columns of characters - rather than 40. Storage went from tapes to floppy drives storing a hundred kb of data to MB to hard drives storing GB of data. Every time one of these changes happened, a vista of opportunity opened up to explore and innovate and figure out what you could do with the new capabilities. Writing code in those times was all about deeply understanding the internal capabilities of the machine you had and how to get the most out of them.
Something about that process forged a deep appreciation for the fundamentals of hardware and software that I don't know how anybody could get these days.
Each generation will forge deep appreciation for stuff higher on the stack. And there will always be folks working at the embedded boundary, forging deep appreciation for the folks who blazed the trail you described before them.
Also, to be fair, it's easier to learn stuff today than it was 20 years ago. You don't need to invest as much time and the resources are a lot better (yay for YouTube!)
Cutting corners is not the only reason why software slows down as hardware speeds up. Many people just have no idea how fast their computer is supposed to run, and their "fast enough" is often much slower than it could be. And in some cases that’s the difference between "fast enough to make a smooth animation", and "slow enough that I need a spinning wheel".
I know spectroscopy very well, and yet hearing him talk about light-matter interaction was still very educative for me at the time and I was impressed by the depth and sheer knowledge he had on the matter, learned many things I didn't even know existed from him.
Same applies to many other topics related to physics, engineering and mechanics, not just computer science and programming.
Whoever says that you need a degree to get depth in several topics has never knew people like Carmack who simply study and try to understand.
*this post does not contain an implication about Carmack. He is actually real smart.
When I was a technical evangelist, I regularly gave hour long technical presentations to relatively large ballrooms and it's ridiculously hard to maintain focus. The fact that Carmack gives a detailed talk rather than a presentation or speech is already a distinction, but mostly off the cuff, for hours, non-stop, to a packed conference hall? Impressive doesn't describe it.
Yes! There's a post we wrote on precisely this phenomenon with John Carmack as the main character that you might find interesting.[1]
TLDR: There was a time when people were willing to spend (literally) tens of thousands of dollars on ultra-premium hardware in order to compute on hardware a few years ahead of the market.
For example, John Carmack spent $23K for a NeXT workstation on which he made Wolfeinstein 3D, Doom I & II, and Quake. He also spent ~$10K on the world's first 1080p monitor, which he used to program the Quake trilogy.
“Decades” is a bit hyperbolic. I got a 22” that would do 1920x1440@80 for under $1000 in 1999. I’m also skeptical of that non-4:3 resolution quoted.
It's _really_ painful to remember how scarce information was in the early 90s and how prohibitively expensive the hardware. I guess it was a better filter when only the people who really loved computers were getting into the industry though.
I think that scarcity of information has helped me quite a lot. I often see others giving up on problems where they lack sufficient information, but I have an ingrained ability to sniff out the information - whether it's reverse engineering, gleaning subtle hints from what is available in the documentation I do have or just "thinking like the computer" to intuit things, I can very often make headway where others have failed.
What I found interesting:
* he has insane hours and has never burnt out. He says that if you want to achieve big things in your life, you need to work a lot. He also says that as long as he's working, and making progress (and he always makes progress when he keeps trying, reminds me of Linus), then he can withstand his hours and pressure.
* he learns a lot through reading computer science books
* he is really big on simplicity, seems to appreciate Golang and its design, and he's not into metaprogramming on C++. I really like that he's focused on building things that work, and can be maintained, and not that interested in theory and advanced concepts that don't seem to bring him much. He also says he spent some time on the functional side, and that probably made him a better programmer, but he's back doing C++.
* he talks about the sort of hacking community he felt part of, where you just wrote code and shared it and reused other people's code. It really feels like open source is something else, made me feel bad about all these patents, and weird licenses (even Apache 2 or MIT) and academic people whining about credits. Wish we could just share and use whatever and be happy with it :(
* Agree with him, VSCode is THE IDE. It's much better than emacs IMO (I've tried using vim many times but couldn't).
* 8-9 diet cokes a day. Holy fuck. That's a lot of caffein (and I'm guessing not good for the teeth)
(agreed though. VS has been a beacon of light inside MS even in its darkest periods.)
Either the whole thing freezes and becomes unresponsive, or intellisense stops working, or (often) both.
Sublime Text + GDB + RR is my no-bullshit setup right now and I love it. A mouse interface to GDB would be nice, but I can live without it.
Most Windows programmers I know (not a lot) use VS for the ease of integration with all things .NET and Microsoft.
It was a surprisingly bad experience - weirdly slow even on a high performance PC and so much clutter by default.
Tried out VS 2022 just now. First impressions are better.
VS seems to be a WPF app nowadays, so I assume the UI is written in C#.
I think there's two major things you need in order to do that. Work on what you love/want and have no/little need for socializing.
That sounds like an intense schedule for sure but not really that insane. He's not super human and just staying in shape, and well rested is what has allowed him to do this for decades on end. Work life balance and taking care of his family is just part of that deal as well.
I notice that the quality of my own work is simply much better when I'm well rested and that beyond a certain point, the most productive thing is for me to simply take some rest or do something non work related. The rare case that I need to work on something late, I pay the price the next few days. It all averages out in the end in terms of productivity.
Grinding away at a problem for hours is simply draining. Often those problems melt away the next morning after I sleep a bit. Your brain doesn't stop working when you do. The hard work is immersing yourself in the problem and absorbing all its facets and then calmly reflecting on all the assumptions you are making. Generally, if you are stuck you need to find out which of your assumptions it is that is wrong. I've woken up with fully formed solutions in my head for seemingly unsolvable issues or bugs that I fought with the previous day so often that I actually rely on this happening a lot these days. So, I generally stop working around 6-7 pm and I'll park harder issues until I'm well rested in the morning or after a weekend.
I don't work on the weekend. The weekend is for resetting my brain. Just as important as sleep is. The most productive use of that time is allowing that brain reset to happen. Getting frustrated and stressed is counter productive. It leads to poor sleeping patterns and stuff just piles up. Take a break, relax.
I'm not sure what disqualifies that as insane, but it pretty much precludes any social life. I'm on-and-off doing these kind of hours (sometimes work takes over life, sometimes life takes over work), but when I do these kind of hours even when I'm not working my brain is still thinking about work. I can't imagine doing this for decades at a time, this is truly a life dedicated to work. But I agree that you can't achieve great things without sacrificing your life.
> Work life balance and taking care of his family is just part of that deal as well.
I don't judge anyone for how they like to spend their time (and certainly admire Carmack), but what work/life balance? There isn't much except work there.
If you can eliminate the average 90 minutes a day commuting Americans do, along with the average 20 hours a week spent cooking and cleaning et cetera by hiring people to do that for you, a rich person can have more life working 60 hours a week than a poor person has working 40.
Carmack is a high level martial artist. That would have required a significant time commitment.
Interestingly, it might not be the that significant of a commitment in terms of raw hours although it certainly is in terms of consistency and persistence. Quick googling reveals that it might take around 2500 training hours to get to BJJ black belt (I guess if you're pretty talented). Over 10-year period, that's just under 5 hours/week. And BJJ black belt is a pretty big deal.
With a more effective teaching model, I believe one could achieve the proficiency needed for a black belt in 2/3 of the time. However, this does not mean becoming a name on the world stage, for which much more talent and possibly more hours of practice are needed: talent saves many hours of practice that are instead needed by less talented practitioners, assuming that the latter can reach the level of talented people even in the limit of infinite time and youth.
Yeah, competitive scene is a whole different beast.
I did my PhD in a lab that demanded it: we were expected to put 6 days, 12 hours a day. It’s possible for maybe 30% of population maybe? Especially if you’re privileged and don’t have to worry about other things in life (like kids, parents, money, physical health, chronic issues, mental health, etc). So in some ways the ability to train and be able to adopt this more “productive” life is a bit exclusionary and even discriminatory. In the end I chose not to continue in academia primarily because of this demand, I just didn’t feel like it was worth it.
Now I’m in tech and I do get bored, but happy that I have the choice to set my hours.
damn, I can only feel bad for people who use that term :( it seems like simple human interaction are being optimized out.
1 standard can of diet coke (375 ml) contains 48 mg caffeine -> 128 mg/liter. So 3 liters (8 cans) contains 384 mg caffeine. Brewed coffee contains ~400 mg/liter.
The discussion about tools and languages was particularly interesting. You might expect John Carmack to be pretty old school and dogmatic on using e.g. C and instead it seems he has a very broad taste and experience with different languages and tools. Just a very pragmatic person that switches between doing C, python, Go and other languages. For someone that is into hyper efficient graphics code, admitting that for the vast majority of code, using a garbage collector is perfectly fine is IMHO a very pragmatic and mature attitude. He doesn't have to prove anything to anyone anymore on that front of course.
VS Code is indeed a very popular IDE. The Jetbrains ecosystem is also pretty interesting. I found his comments on debuggers to be pretty striking. GDB is so hard to use that programmers avoid using it. Having a proper debugging UI changes that. He was talking about how he just runs most things in the debugger by default to see if things work as he expects.
In the same way having static code analyzers tell you that, no, actually your code wasn't perfect and is full of little time-bombs that could go off at any moment is a great argument against just pretending you are Buddhist monk that only requires a pen and paper to produce perfect code. Exaggerating here of course but I know some people and that on purpose avoid using, or even learning about tools that would allow them to be more productive and better engineers.
Not using tools that are there is a choice that a lot of people seem to insist they need to make. I've heard all the excuses on this front and it usually boils down to people believing in their super skills, discipline, and intelligence to the extent that they believe they don't need those tools. Some people actually feel threatened by a tool telling them they are doing stuff wrong. They get annoyed and frustrated by that. It's irrational.
He has been using various programming languages for a long time. Basic, assembly, (turbo) pascal, etc. In my experience most old school dogmatic C programmers started with C and never even tried to use any other programming language halfway seriously.
He especially gives a lot of praise to Borland for making turbo pascal and how far ahead it was of its competition back in the day when it comes to developer tooling (IDE, debugger, etc)
He's also a high level grappler (nerd worlds collide if I ever had a chance to roll with Carmack :) ), which is not an easy feat.
Lol, he said Visual Studio is THE IDE, not VSCode. Compared with VS, VSCode is a toy.
Is it still true today? I don't really do C++ so I have no use for VS, but I have a hard time imagining not having access to everything to do C++ dev with VSCode
Open source was like that and was created to be like that. Parts of it still are, but much of it has degenerated into fiefdoms and lots of developers of larger open source projects have been soured by the prospect of just being free labor for surveillance capitalist mega-corps.
The good corners of the OSS world tend to be small communities doing interesting things. It's just like how the small topical subreddits are still okay while the big areas on Reddit are complete trash.
It's not that much caffeine and it won't do anything to your teeth.
> Agree with him, VSCode is THE IDE.
Nothing in that interview suggests he's ever used VSCode.
I'm sorry, but diet coke (and most sugar free drinks) causes dental erosion. It's not the sugar that causes it, but usually the citrus acid. Even some flavored sparkly waters have citrus acid in them.
It's my understanding that soda is typically acidic, and after you drink it the soda coats your enamel, in turn wearing it down.
I remember how insane it sounded to me that someone as talented as Carmack would look up for a second or a third resource describing a concept just because he couldn't clearly understand it on first try because, contrast to how we react when a student fails to grasp pointers. Our kneejerk reaction to someone not understanding a concept on first try would be "You want to re-read that again? Guess you're not talented. And you keep making mistakes after an hour? Sigh you're a lost case".
And here you have literally Carmack himself not caring how many books he has to reference, because all that it matters is that it will eventually click, he will own it, he will make progress and that's all that matters.
As a sidenote I wonder if he's ever used Pharo, it seems like the kind of thing he'd like.
I don't see this as a lot different than MacOS spraying .DS_STORE files everywhere. It's not a big deal to add to .gitignore, but it does leave a fingerprint. It's just that tries to determine reasonable defaults if the path doesn't exist instead of Netbeans/Eclipse/whatever forcing you to pick them with a wizard if you want any of the "real" features to work.
It's hard to start at anything specific :)
I haven't seen a single person who seriously used both and went back.
Search, VCS, keymapping, defaults, heuristics, refactoring wide of use, AI-based autocompletion - there's simply no real adversary.
Last time I was blasted when copying an old DB to a one in a new DB it correctly guessed the renamed columns based partly on type and size, partly on column names.
Also I love its suggestions so much that when learning a new language I always look at Jetbrains' respective autosuggestions - simply because it makes me a better programmer, faster.
The biggest selling point for me for vscode is good defaults (I like vanilla configurations to get started fast on new machines) and discoverability. I want to be able to install 10 plugins and try all of them in a few minutes, and learn shortcuts as I use the plugin (with emacs each extension is an investment)
I found use-package, try elisp packages make it easy to try new packages in emacs.
— Brian Kernighan
Not really: the linked text shows it is a costly strategy to avoid later «self flagellation»: it is meant to avoid the practice of mindless coding - of overly fast feature insertion, blowing amounts of low quality code to maintain. Torvalds: «I'd rather not work with people who aren't careful».
Also: «I happen to believe that not having a kernel debugger forces people to think about their problem on a different level than with a debugger ... that mindset where you know how it behaves, and then you fix it from there. [...] It's that you have to look at the level _above_ sources. At the meaning of things. Without a debugger, you basically have to go the next step: understand what the program does. Not just that particular line».
At no point has anyone suggested using the debugger in lieu of understanding what the program does and that’s a pure strawman. Understanding is step 0. Once you’ve done that piece, a debugger levels up your game. Same with other tools like profilers, printf debugging, EBPF debugging, etc. Hell, even simple things like executing the code in the first place / running tests / gathering metrics is a debugging tool. It’s rare that someone stares at a difficult bug until they see the matrix. It usually involves iteration cycles of some kind to test out different hypothesis / collect data and a debugger is one tool to speed up those iteration cycles.
There was a story on HN a while back about how one of the inventors of Ethernet had to hook up oscilloscopes to figure out what the electrical signal was doing to figure out why CSMA wasn’t working properly. An oscilloscope is an analog debugger and you can’t tell me that the inventor of Ethernet didn’t understand Ethernet or that the oscilloscope hampered that in any way, especially since the bug turned out to be very nuanced with a chip generating a spike switching modes.
That is not implicit: it seems explicit and literal. Apparently, Torvalds must have had different experiences - and evidently within a strongly different framework: it looks like the project manager in a drastic effort to propagate the will about what is part of the project and what is not.
If you are working on a relatively small or modular codebase for a long period of time Torvalds perspective makes sense, since the codebase will also benefit from that kind of introspection (ok Linux is not exactly small but excluding drivers is on the order of ~100k AFAIK, which is small relative to the time it's been active); id games are on the order of millions of lines of code (according to Carmack) and while the different engine generations are related they still draw a line under each one after a certain point and move on so they are also very time limited.
I enjoy playing computer in my head in fine detail on small code and find a lot of joy in small code. But I can also respect that on a large and unwieldy enough code base where it's necessary, it's going to make more sense to lean on a debugger and other tools more often.
I wonder to what degree this contributed to the eventual downfall of the platform. The learning curve was so steep and the IDE and tools placed so many mines under your feet so relentlessly that it must have driven some talent away.
(An example: you closed the emulator and it left over some running background processes that you had to fish out and kill in the Windows process manager. If you forgot to do that, you could restart the emulator, but breakpoints would stop working. But if you mistakenly killed another important background process, the restarted emulator would freeze and you had to restart the entire Windows.)
On the contrary, I just love working with JetBrains IDEs. The debugging functionality is so great that I feel no one is trying (deliberately or out of neglect) to waste my time. Given that I am 15 years older than I was in the Nokia days, time has become a more valuable resource for me.
We went through several IDEs, Visual Studio, CodeWarrior and finally Carbide.
I’m not saying the OS itself wasn’t complicated though.
With enough effort and care, a frictionless experience can be made with a TUI should some "Jetbrains" come along and try to make a commercial product out of it.
It's sufficiently comical to be satire
If I care about that, I’ll probably care about Electron using hundreds of megabytes of RAM I shouldn’t even have to buy in the first place. It’s thinking like this that make people say sad things like "16GB of RAM is a bit tight nowadays, maybe you should go up to 32".
(Edit: to people who think buying a bit more RAM is no big deal: remember that our resources are finite, that computers are one of the most polluting industries out there, and the climate clock is ticking.)
JetBrain's IDEs are extremely slow and memory intensive - well beyond VSC and ST - and yet, complaints are always directed at VSC.
I like to be able to edit new text files instantly, and the simple, pragmatic solution, is to keep an editor always open in the background.
I start my code editor maybe once or twice a day, so the launch speed does not even register
RAM and computers in general are so cheap that I just max out every laptop configuration I buy. If you’re a programmer and will use a machine for work spending $3-4k every couple years should not be a problem, we’re paid very well and should therefore use the best tools we can find.
I start my main editor (with the shortcuts I like and all) every time I write (or edit) a commit message. And back when I used Mutt, every time I wrote an email as well. (Now I’m using Thunderbird, but I did like the ability to use my preferred text editor everywhere.)
RAM is cheap at the individual level. But if the entire world needs to go from 16GB to 32GB or whatever, the sheer volume of the resulting electronic waste does not exactly increase my faith in humanity.
Some valuable advice I got about Emacs after switching from Vim is that it's not really a text editor, it's more like an operating system. You shouldn't need to reboot the OS between saving a file and commiting it. I typically only start Emacs once, then do everything from inside it. That being said, it's a very different workflow from Vim or VSCode, and not everyone's favorite way to work.
I even got it setup so I open multiple projects in the same single instance, and slightly change the background color based on what root directory a file is in. This way I don't get turned around when working in both a client and server, or producer and consumer.
I've configured $EDITOR to start `emacsclient "$@" -a ""` with necessary arguments (I get emacs frame instantly when necessary).
https://stackoverflow.com/questions/4458800/how-to-use-one-i...
Then it has to be Windows Notepad. Android does not have a default text editor, if it did then I'd agree.
The underlying problem with Electron is that browsers are also massive resource hogs and I don’t see people switching to elinks anytime soon.
Maybe I’m stuck in a cycle of consumerism - accepting slower software and buying faster hardware - but I value convenience a lot and in the grand scheme of things vscode using up like $5 worth of RAM is not enough to look for alternatives.
I think you are missing out the part where it's technology developed continuously for almost half a century.
VSCode is very nice, but I quickly become frustrated by it's lag in comparison.
It does beats the pants of every other GUI IDE out there, with JetBrains IDEs coming a significant second place.
But Vim or Emacs with LSP are extremely capable IDEs and have unmatched speed compared to any GUI IDE you can name.
I do not doubt that they are. I use Emacs with a simple config as the default editor to open files with, but I do not know elisp to set up something more feature-rich, and have not felt the need to yet, but I would like to try some day. It is a truly unique piece of software with lots of love put into it, and it is also GPL which I like. The problem is just that the defaults are painful and I want to know exactly what my elisp is doing, and this would take some work. Yes I know that Spacemacs and Doom Emacs exist.
But my comment (the phrasing could be clearer) was about the choice of TUI vs GUI if one was to start creating a new IDE today, in response to the parent comment:
> With enough effort and care, a frictionless experience can be made with a TUI should some "Jetbrains" come along and try to make a commercial product out of it.
In such a case my preference would be to have a decoupled architecture which would allow for both. You can make such nice things with today's computing power and graphics cards, that it would be a shame to not take advantage of it. And the performance can be stellar. We are talking TFLOPS nowadays.
The ‘native’ there is redundant. The only thing that matters is if VSCode works well enough and is performant enough to be a viable option.
Often native apps will win on the ‘works well enough’ criteria, due to superior OS integration and familiarity, but that isn’t a given. If you use multiple platforms then having a solid cross platform option also has advantages in that area.
VS Code is not just mildly popular, it's significantly more than twice as popular as any text editor has ever been in the modern era.
Source, it's currently used by 74% of programmers (https://survey.stackoverflow.co/2022/#technology-most-popula...), the next highest text editor, since the survey started in 2015, was Sublime Text in its prime (2016) at 31%.
It's fair to call VS Code's popularity unprecedented and historic. And it's already being used to shape the future of the industry. E.g., we're watching the decline of local development right now (outside of specialized use cases) largely through VS Code's support for remote development features.
This is most likely just beginning of how VS Code will leverage its position to shape the future of programming.
74% of the respondents to the latest Stack Overflow survey, you mean.
I agree. The reason Electron got popular is because front end devs can quickly build a desktop app for use cases where a web app will not work.
And I say that as a web dev who has worked on probably a dozen apps with Electron. Mostly internal tools, but also stuff in production for end users.
For the end user projects we ended up replacing Electron with native apps using the native web view. Each app had a tiny native layer for stuff like downloading files, etc. I don't remember the exact numbers but our macOS app went from +100MB to about 5MB download. Memory usage was also great reduced. The macOS app barely used something like 15MB of RAM IIRC. That was in 2018. Today there are projects that already do this.
I think Maui will rather compete with Flutter and QT, not Electron.
I use VSCode with a Vim plugin. I get all the best keystrokes from Vim, and the GUI of VSCode.
For me, going to Vim would be worse, and going to plain VSCode would be worse.
unless you got both to work?
There are edge cases but I can’t think of a specific right now. When I run into one, which isn’t that often anymore, I’ll open vscode’s terminal panel and do a quick edit in nvim there.
Vim multiline editing works fine :). Not sure what the VSCode offers thoug (maybe I'm missing out)
I agree. I just can't stand the git CLI, and love the GitGraph plugin in VSCode. But like you say everyone has their preferences.
One thing I have issues with is autocomplete and using . to repeat the last edit (which includes the autocomplete). Other than that, all fine.
Edit: all the vim commands give me a huge advantage on productivity when editing. All the GUI with plugins gives me a huge advantage on project navigation. Would love to see anyone do better using either one or the other.
1: https://marketplace.visualstudio.com/items?itemName=asvetlia...
For C++ I never even tried it because I'm usually content with qt creator.
I miss sometimes Emacs but i prefer to use VSCODE nowadays as its a much modern environment and brings me directly to the point of comfort. I also tried Neovim but i was not convinced to replace VSCODE, i mostly use it on the console for quick and dirty editing.
I would also like his take on Pharo, which I like and many years ago released an open source NLP library for Pharo.
Now I like to have a GUI that has things like a right-click menu instead of having to rely on maintaining muscle memory for everything.
Of course, another part of that, I think, is becoming older. Mastering some aspect of the computer or software like Vim just isn't interesting to me like it used to be.
1. Pure Raw Text Editing: This stuff like jumping around within a single file, making edits. Vim really shines here with keybindings that become muscle memory & are portable cross platform- for example I am forced to use a Mac for work but use Linux for my personal stuff, the keybindings for the exact same tool are often different between mac and linux. Vim really shines here
2. Work that requires you to consider the language AST: Stuff like refactoring- renaming something through the entire codebase, jumping to definitions and implementations, auto-completing symbols. This is where I fall back to IDE features as they are unambiguously better at it than Vim. (Yes I know you can get this type of stuff kinda working in vim but it has never worked well enough to my satisfaction... you have a to install dozens of plugins, often a plugin for each language that you want syntax support for which adds bloat and in my experience I have never gotten them to work quite right in a reasonable amount of time)
It's been a long time since I used C, but I wonder whether VSCode really gives a better experience than Emacs. Nowadays you can use Emacs with an LSP server, which is likely also what VSCode is doing. And there are Emacs distributions like Spacemacs and Doom Emacs that take away the configuration pain. As someone who has used Emacs for a very long time, I'd be tempted more into looking at CLion from JetBrains instead.
Regarding the comment about the debugging. For me personally, I always take the time to study the code first before I start debugging. A lot of times I already find the problem by just reading the code and even if that is not the case, I have a much better understanding about how the code is supposed to behave and that makes the debugging session a lot more useful.
And I say that because I have the impression that it is common for developers to dive straight into a debugging session without a good understanding of what the code is doing or trying to do. It's like they see the sympton and want to fix the sympton instead of fixing the core cause.
But that might just be my background with garbage collectors: in that case the sympton only becomes visible a long time after the actual problem occurred. The sympton was often dereferencing a pointer that failed, while the problem was the garbage collector writing a wrong value for that pointer in one of the earlier garbage collections. And that led to a lot of assertions in the code to catch problems early on.
I don’t understand this sentiment about “modern” (interactive, user friendly) debuggers.
Simply because you have a tool doesn’t mean you have to skip the step of trying to understand the code. Is the suggestion seriously to avoid having tools that are objectively better because there may be a temptation to use them too early, whereas having only more primitive tools would do better?
I have seen the same argument about syntax highlighting. That pretty colors makes for sloppy code reading and monochrome text means you read slower and thus more thoroughly…
On the contrary, I get quite annoyed losing track of indents and scoping. VSCode finally adding colored brackets has been a blessing in navigating legacy code with way too much nesting in the face of developers still unable to keep their code from scrolling horizontally and dividing methods / using different paradigms to prevent overnesting.
Also helps to just not have to spend the limited amount of focus on things that an IDE can cover for you. Programming has become far more complicated (no, not complex) in many ways, and we as a species haven't magically gotten a lot better at understanding it while we seem awfully good at writing things even more complicated.
The amount of times color change has indicated syntax error to me makes it a no brainer. Sure, some systems may have an older editor that doesn't have color highlighting, but that's a rare scenario for me. I'm not going to give up the huge benifit just to "train" my mind for such rare cases.
Exactly. Maybe that was not clear from my comment, but my point is basically that using the most fancy tools is not gonna help a lot when you don't start with getting an understanding of the code.
Around 2003-2004 or so i used Anjuta on Linux which provided a Visual Studio-like environment with integrated debugger, C++ code completion, project management, etc. I used it for all my C and C++ development as it was both fast and featureful.
Sadly the developers decided to rewrite some core part (probably my first brush with the GNOME approach to software engineering) and the rewrite was so buggy that crashed pretty much all the time, forcing me to move elsewhere.
> And I say that because I have the impression that it is common for developers to dive straight into a debugging session without a good understanding of what the code is doing or trying to do. It's like they see the sympton and want to fix the sympton instead of fixing the core cause.
Did you watch the video? He spends a significant amount of time talking specifically about why he thinks what you are saying here is misguided.
Still, for me personally, I need to study the code and know what to expect before I start the debugger. It makes the debugging session a lot more useful and efficient. And, actually, like John Carmack said that other people told him, in a way, I do "replay" the code in my head while reading it. And a lot of times, I already figure out what the error is when reading the code. But, I will often still debug the code to verify that what I'm thinking is true: I do trust the debugger more than my brain.
Aside from that he also mentioned that nowadays software systems tend to be complex and too big to completely fit into one's mind. I agree with that, but IDEs make it easier to isolate the code in the system that is relevant for the issue at hand: you can find the call sites of a method, the use of results, the origin of input values and so on. I don't know how good IDEs are currently for C/C++, but those things are standard for C# and Java. And with those tools, it really is not that hard to get a rough view on where and how a piece of code is used in a big system. Obviously, this will be easier in a well-designed system than in a spaghetti-code system.
It is important to know all the contexts in which the code you are debugging is used. Often people are focused on the one specific context in which a user saw a bug, and they focus on that, start a debugging session for that, fix the code for that and break the usage in the other context... because they do not take the time to read and understand the code. And that is also where unit/integration tests come into play.
So, nothing against the use of good IDEs and debuggers, but always be sure to understand the code you are changing.
The original HN post got derailed into talks about Lex, and I don't think that most people had even watched / listened to a 5-hour podcast at the time of the discussion.
- Alles Gesagt from German newspaper Die Zeit (almost half of them are in English). These are interviews that go on until the interviewee says a magic word. They usually do them at the interviewee’s home.
- Dan Carlin’s Hardcore History, my favourite on long drives.
After the .Net jobs I pretty much switched back to Vim, TextMate and other text editors, and frequently forgot that debuggers are available. As Carmack points out, if they are difficult to use, you'll find yourself using them much less. For some reason I've found myself in environments where IDE are seen as second rate. Like training wheels for less skilled developers, but you know what: I want a debugger, I wanted integrated into my code editor and that's good enough for a guy like Carmack, then it's good enough for me.
https://lwn.net/2000/0914/a/lt-debugger.php3
Wonder if there's a difference in average attitude between people who do creative stuff (e.g. games) vs people who do infrastructure type stuff (e.g. Linux kernel)
His comment on not keeping code in your head also aligns with the fact that most games development prefer object oriented approach to model characters and other entities, and that lends itself less toward reasoning about code in your head as opposed to FP.
It’s a really pragmatic opinion and shows a real maturity and lack of ego. Something a lot of self-proclaimed “rock star” developers could learn from.
I remember working at a gamedev studio around 2007 and while almost everyone else used Visual Studio 2005 (i think, i don't remember exactly), i used Eclipse/CDT with some makefiles that another developer (who used Vim) had written and always felt VS was more limited overall.
(it has been almost a decade since i used Eclipse/CDT though, i don't even remember why i moved on from it)
> On a cold winter day, Carmack laced up his shoes, slipped on his jacket, and headed out into the Madison snow. The town was blanketed in the stuff, cars caked in frost, trees dangling ice. Carmack endured the chill because he had no car; he'd sold the MGB long before. It was easy enough for him to shut out the weather, just like he could, when necessary, shut Tom and Romero's antics out of his mind. He was on a mission.
> Carmack stepped into the local bank and requested a cashier's check for $11,000 [$23,219.85 inflation-adjusted]. The money was for a NeXT computer, the latest machine from Steve Jobs, cocreator of Apple. The NeXT, a stealth black cube, surpassed the promise of Jobs's earlier machines by incorporating NeXTSTEP, a powerful system tailor-made for custom software development. The market for PCs and games was exploding, and this was the perfect tool to create more dynamic titles for the increasingly viable gaming platform. It was the ultimate Christmas present for the ultimate in young graphics programmers, Carmack. – Masters of Doom, pg. 93
Carmack also shelled out $10K to use the world's first 1080p monitor, which he used to create Quake I, Quake II, & Quake III:
> [In] 1995, Carmack spent $9,995 on one the first 1080p monitors: the Intergraph Interview 28hd96. This monitor was gigantic, but the extra screen space and image quality surely came in handy during the creation of the Quake trilogy. It provided a 28" screen with 1920x1080 @ 85Hz, a resolution not unheard of on today's hardware. Essentially, Carmack was able to trade $9,995 of 1995 money for a monitor that put him decades into the future.
That said, I love good debuggers.. basic, C++, Java, all had great tools. I always ran my Java servers with hot code replace.. saves you hours of startup time
The tight focus on the developer experience with TypeScript was what won me over. Functionality like live share has been a game changer. The extensibility is also pretty great and doesn't feel like I sacrificed that aspect of vim either. If anything, it even surpasses it because of the UI possibilities. Some personal examples that come to mind are:
* Live preview rendered markdown as you edit
* Live preview MermaidJS diagrams as you edit
* Live preview MJML email templates as you edit
* Live preview draw.io/diagrams.net diagrams as you edit
* Live preview SVG images being edited/generated by code
* Work on Jupyter notebooks and actually run them
Glad you like that one, I was probably the lunatic that kickstarted that hack of an idea back in the Atom days :) Can't recall if I ported it to VScode or if someone else did/copied the idea (not that I care! I just needed such a tool in a pinch and then gifted it for someone else to take over)
https://github.com/josa42/atom-svg-preview/commit/995e4fe0ba...
> Live preview rendered markdown as you edit
I use a plugin for that.
> Work on Jupyter notebooks and actually run them
I use a "repl plugin" for that, and I actually prefer the experience over Jupyter a lot! (even discounting the vim keymaps).
> Live preview SVG images being edited/generated by code.
Now that is something I didn't even consider. There's probably a plugin for that and I'll look into it lol.
I've never needed to do the rest, but I can imagine how helpful those features would be If I did.
To be clear, setting up even the two plugins above was not easy (in that, I probably spent about 2 hours between the two), so I think this comparison, by itself, actually favors VSCode.
One of the first projects I worked on, as hobby, was based on the Quake 3 engine (which was one of the projects Carmack worked on). However, especially with real time applications I find the use of debuggers particularly difficult, because there are a lot of bugs that depend on timing and which are therefore hard to catch using debuggers.
Nevertheless, I completely agree, that good tooling is absolutely essential. Even as someone who likes the minimal setups (e.g. tmux+vim), I know that you should ask yourself often, if you are using the right tool for the job.
His full time job seems to be running this podcast interviewing people. Every few days he publishes a 2-hour long interview.
He distributes ads, I am not sure how much that brings in.
Update: As commented below, he does have papers.
The comparison to Rogan is of course wrong, there are levels to this, but that doesn't really make his audience niche as in small despite all the robot comments since the start.
https://chartable.com/podcasts/artificial-intelligence-14342...
Rogan, being a comedian, has a completely different energy. He will discuss serious topics too but his most iconic moments are usually him and some comedians/fighters shooting the shit about drugs or chimps.
He is way more successful and has multiple sponsors.
https://www.atomic14.com/2022/07/27/successful-youtube-video...
That’s one month of rent.
I would be interested in some estimates of revenue per audience.
Lex will he making an awful lot of money from his sponsorship - which is also where the big channels on YouTube make the majority of their money.
If you can go to a marketing department and say “I’ll get your product in front of a captive audience of X-million people with this demographic” you can charge a lot of money.
Also, he's a research scientist at MIT, which I'm also sure means making a living is not a problem.
Anyway, there is an article written on CodeProject[0] a few years ago about installing VS6. It may also work on Win11, however due to the changes over time you need to do some more additional stuff:
1. Do not install the OLE/COM viewer
2. Ensure the installation finished propertly otherwise SP6 wont install
4. Install SP2 CD if you have it (it was part of my own VS6 box)
5. If setupsp6.exe wont run, copy sp698ent.stf to acmsetup.stf and run acmsetup.exe instad
6. Install tlloc fix from [1], otherwise the debugger wont be able to terminate finished applications
After all that Visual C++ 6 should work fine. For VB6 you may want to run it in Win9x compatibility mode, otherwise you'd get some slow drawing in the form editor. But something like Lazarus[2] would be better if you want to throw together some GUI app, it isn't like there is any special integration between VC6 and VB6 (something that i always found weird - ideally VB6 should have been able to use VC6 headers or even C sources directly just by making them part of the project, kinda like how you could mix Delphi and C++ in later versions of Delphi and C++ Builder, but for some reason Microsoft treated VS6 and VB6 as if they were each being made by a different company and only coincidentally happened to be on the same CD).
Though honestly if you have enough RAM, VS6 isn't really that much faster compared to modern Visual Studio. From that time period something like C++ Builder 1 is way faster.
[0] https://www.codeproject.com/Articles/1191047/Install-Visual-...
You could access compiled DLLs from C and C++ projects within Visual Basic. Not quite the same thing as headers I know but it did at least fill that gap that you described.
You mean “Microsoft” language surely? You couldn’t access DLLs from Perl, PHP, Java, and a bunch other other languages that had been ported to Windows.
And my point wasn’t that VB was special. Just that you could still interface with C++ code albeit only via compiled libraries (you also could access COM objects too).
> my point was that since both were MS products and part of the same package they could have much better integration.
I got that was your point but they weren’t part of the same package. VB didn’t ship with a C++ compiler and nor did Visual Studio support compiling Visual Basic. They were sold as separate products and their IDEs were rather different too. Don’t be fooled into thinking that because they share a similar product name (I mean that makes sense from a marketing perspective) that they were the same package. Having used both, I wouldn’t be at all surprised if the similarities were only skin deep.
There were languages that weren't able to call such DLLs, but there were also many that could that weren't made by Microsoft - e.g. Borland Delphi, Power BASIC, a bunch of Smalltalk implementations, etc.
> I got that was your point but they weren’t part of the same package. VB didn’t ship with a C++ compiler and nor did Visual Studio support compiling Visual Basic. They were sold as separate products and their IDEs were rather different too.
I know what they were, what i referred to was what they should have been considering that they were (potentially) part of the same package (Visual Studio as a product, not the IDE that hosted Visual C++, though honestly that shouldn't really matter) and made by the same company who had access to the source code, libraries, etc to make these two programs "know" about each other in a more integrated way than what external 3rd party development tools were able to do.
This was about a what could have been, not about what it was (nor about why it was like that either - chances are they were made by largely different teams that competed with each other and only had to deal with their programs "living" in the same CD :-P).
I know. I’m not saying “only Microsoft languages” could. I’m responding to your absolute stating that not “all” Windows languages could. I’m simply saying that absolute only works with regards to Microsoft languages. I’m not suggesting it’s limited to only Microsoft languages.
You really need to calm down a little here mate because your comments are an over reaction to the replies being made.
> I know what they were, what i referred to was what they should have been considering that they were (potentially) part of the same package
But they weren’t part of the same package. So your argument falls flat on the very first assumption.
> made by the same company who had access to the source code, libraries, etc to make these two programs "know" about each other in a more integrated way than what external 3rd party development tools were able to do.
This is another assumption. If you’d spent any time working for a company like Microsoft you’d quickly realise that different products might fall under different teams who have very little cross pollination. I’ve seen this problem time and time again in larger tech companies and it’s often just as frustrating for the employees as it is for the customers.
> This was about a what could have been, not about what it was
I got your point was about “what ifs” but the problem is your “what ifs” are based on assumptions that don’t hold true. So you’d need to stack up a number of other “what ifs” just to get to the stage that your original “what if” is even imaginable.
I've no real experience with using gdb - my main debugger usage has been on the JVM or using old Borland debuggers on Win32. Are there no good open source user-friendly debuggers out there?
I tend to develop software interactively with a REPL where I can so if a good debugger can give you something akin to that experience I'd be very tempted to jump ship from emacs to VSCode to try it for languages like C/C++.
Emacs has a couple gdb modes which are fine, and a DAP mode which is very good.
Both vim and neovim have DAP client plugins, but many DAP servers/adapters are not well maintained, so the overall experience isn't great.
So, to repeat Carmack IS NOT using VS Code, but the full Visual Studio on Windows.
Amen.
Link to the podcast this clip is taken from: https://www.youtube.com/watch?v=I845O57ZSy4
Perhaps he's a little biased in his broad conclusion because this is the kind of work he often does?
I hit edge cases occasionally still though I can’t think of a specific one right now. When it happens I sometimes open vscode’s terminal panel and Do a quick edit in nvim on the spot without leaving vscode.
Vscode has replaced putty for me in my workflow.
Don't forget that a terminal puts off 4/5 developers.
Then I learned: you never need to stop gdb! Just enter "r" and it will restart the program with the fresh changes leaving all breakpoints and setup intact.
Game changer to me.
Arrogance is not something I have observed. Is he not allowed to share his perspective on doing things? I doesn't have to work equally well for everybody
What takes appreciation is the differences between a DOS game executable and a modern hyperscale backend app server fleet. gdb-server ain't going to solve many problems on 500k boxes.
I don’t really see the need to get snarky about his comments like that.