6 ms·
At least for high performance C++, the Linux toolchain improves code quality by so much. Between valgrind/cachegrind, asan, efence, always having the latest cl
by CoolGuySteve 8y ago
At least for high performance C++, the Linux toolchain improves code quality by so much. Between valgrind/cachegrind, asan, efence, always having the latest clang and clang_analyzer, and Dockerfiles for continuous integration environments, programming on Windows feels like I have a hand tied behind my back.
Even something basic like replacing malloc with your own instrumentation to track errant allocations is basically impossible since every DLL in Windows loads its own allocator.
I know Windows has similar tools but wrangling Visual Studio, especially remotely or across multiple developers, is significantly more painful in my experience.
Even if you don't ship on Linux, programming on Linux is worth it imo. I mean, Carmack wrote Quake on a NeXT and shipped on Windows, so if he was doing it back in the day, how wrong can it be?
- ryanackley 8y agoNeXT wasn't Linux. My understanding is that it was a completely proprietary POSIX based operating system. That being said there is something to be said for POSIX based (unix, linux, os x), terminal based development tools. It's where most of the innovation happens in the developer community. There is also something easy about GUI based development and debugging on Windows. A runtime environment that is fairly standard for gaming is also a big plus.
- deleted 8y ago[deleted]
- asveikau 8y agoNeXT wasn't Linux, but the point being made was that it would have been easy to dismiss NeXT as a "fringe" platform at the time. It is an argument for developing with platforms [and porting to them] when they may not be a priority for your end users.
- thrax 8y agoIt wasn't Linux but was based on mach Unix iirc. And they weren't cheap.. but they were cheaper than a similar horsepowered SGI workstation at the time, iiarc. But probably 10x the cost of a Windows machine.
- inflatableDodo 8y ago>NeXT wasn't Linux. My understanding is that it was a completely proprietary POSIX based operating system. NeXT was BSD with a Mach kernel.
- adw 8y agoIt was, in most significant ways, proto-MacOS.
- usefulcat 8y agoActually it was Doom that was developed on NeXT. A big advantage of doing development on NeXT vs DOS was that dereferencing an errant pointer couldn't take down the whole machine. https://en.wikipedia.org/wiki/Development_of_Doom#Programming https://en.wikipedia.org/wiki/Development_of_Doom#Programmin...
- grandinj 8y agoReally? I regularly manage to get most of the linux toolchain to bork, and have particular "fun" getting the profiling tools to work properly. And never mind getting a nice IDE environment like Visual Studio up and running. So it may just be a matter of familiarity and/or the particulars of the projects you work on.
- Vogtinator 8y agoHere getting a nice IDE installed is just a single "zypper install qt-creator".
- Asooka 8y agoYou need a license for qt-creator if you want to work on commercial software (or that was the case last time we checked about a year or two ago). There might be exceptions for your case, do check, because it is a nice product. Other paid IDE alternatives are CLion, which I hear is excellent, as well as SlickEdit, which is closer to an editor than a full IDE, but does offer building, debugging, completion. Free alternatives would be Visual Studio Code, which is pretty ok even for C++, or KDevelop, which almost kind of works, or SpaceVim / SpacEmacs and about a week of learning how to use it. I'm in the final camp, since basically every serious C/C++ dev on Linux has a Vim or Emacs setup they've built themselves that does about 90% of what Visual Studio gives you out of the box, with some things better and others worse. It can work pretty well, but you have to understand it's not VS and it works in its own way. If you have the money, you can buy a good IDE for Linux. Otherwise, learning to make your own out of high-level building blocks is also a useful skill, but takes a little bit of time. Personally the first time I had to write C for Linux out of college it did take me about a week before I was up to speed with it (but I was already sort of familiar with vim as a pure editor).
- redlynx 8y agoCould you provide a reference to why you think you require a commercial license for QtCreator to work on commercial software? The core application is licensed under (L)GPL. The commercial version adds a few specific features. I have been using QtCreator for a long time and as far as I know there's never been any sort of "cannot be used for commercial software" clause.
- logicallee 8y ago>Even something basic like replacing malloc with your own instrumentation EDIT: I removed my comment. I thought it was funny that someone would call this basic. apparently I was wrong and it is very common.
- monocasa 8y agoWhy are you laughing? It's pretty common in anything vaguely real-time.
- logicallee 8y agothanks, I didn't know. It didn't seem basic to me, but an advanced technique.
- CoolGuySteve 8y agoHere you go: https://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html https://www.gnu.org/software/libc/manual/html_node/Hooks-for... It's not even a page of copy/paste code to make a hook do whatever you want. Writing a .so for LD_PRELOAD is similarly a handful of lines. Or you can use the plethora of open source debugging LD_PRELOAD libraries like efence. And in a larger sense, you should try learning more and getting better at programming instead of being so dismissive.
- logicallee 8y agoThanks for the link. I had no idea this could be considered "basic". You're right, I didn't hear about this while developing some C++ programs. Out of curiosity, what's something you consider difficult or at the edge of your abilities while programming C++ in Linux? (Maybe something related to code generation?) You're clearly a very advanced user.
- dejaime 8y agoNever used C++? Most cases where Cpp is a good fit will require some memory usage and allocation profiling sooner or later.
- bitwize 8y agoYes, but these days Carmack swears by -- wait for it -- Visual Studio. Microsoft developer tooling has a reputation for being absolutely top notch. The integrated debugger alone makes Visual Studio well worth it; nothing even remotely comparable exists under Linux.
- dboreham 8y agoI'll dispute this because I find the jetbrains IDE on Linux to be comparable. If you're talking specifically about C development then I'm not sure because I haven't written C in a long time, but for Java, Python, JS the jetbrains products work as well as VS for me.
- bitwize 8y agoI was referring specifically to C and C++ development, for which JetBrains CLion is supposed to be pretty good, but still nowhere near as comprehensive as Visual Studio, particularly when it comes to debugging. In fact, concerning gaming specifically, one of the reasons why DirectX won the API wars is because Microsoft included a GPU debugger for DirectX with Visual Studio. I think Vulkan might have comparable tooling, but OpenGL emphatically did not.
- newnewpdro 8y ago> Carmack wrote Quake on a NeXT and shipped on Windows, so if he was doing it back in the day, how wrong can it be? This claim has mutated so grossly over the years it's comical. I clearly recall reading back in the day, probably in Dr. Dobbs Journal or Game Developer Magazine, that the NeXT Cube was largely used just for tools like the level editor, and they were generally seeking uses for the novel machine. It was not the primary development environment. They only had one of these expensive machines after all, and the photos I saw from the era were of designer Tom Hall using it [1]. Do you really think John Carmack and Tom were sharing a computer while they hurried to create Doom? From the caption for the NeXT Cube photo in the linked gallery showing Tom Hall, it's clearly his machine: This picture was taken during DOOM development in 1993. Tom's busy working on a map in my map editor, DoomEd, but don't worry - you won't be able to make out anything on the screen! Tom started many of the original DOOM maps and after he left, Sandy Petersen finished them -- some of the maps had very little work done to them, in fact. On Tom's monitor is a little printout that says, "Quality". He always has notes stuck to his monitor to keep him reminded of .... things. That orange thing could very well be the very first keyboard wrist pad -- made by a friend of his back before you saw them in stores. The speaker at the far right is one of the first Altec Lansing clamshell models. The microphone in front of Tom was there for NeXTSTEP's awesome email feature - built-in voice emails! We always sent them back and forth... I think I might have some of them lying around here... [1] https://romero.smugmug.com/Video-Games/The-Archives/i-T8gzwxt https://romero.smugmug.com/Video-Games/The-Archives/i-T8gzwx... Edit: It's possible they all moved onto NeXT machines after the success of Doom, but I am not aware of it. The NeXT tooling was not mature at the time and targeting x86 Windows/Dos from NeXT would have been a real nuisance. That's why it made sense for tools, since they could develop and run them on the NeXT machine. Actually, I stand corrected, if Romero's account here is honest they appear to have done it all on NeXT. This is entirely inconsistent with what I read at the time: https://web.archive.org/web/20070305165006/http://rome.ro/2006/12/apple-next-merger-birthday.html https://web.archive.org/web/20070305165006/http://rome.ro/20...
- Stratoscope 8y agoMobile friendly quote: > This picture was taken during DOOM development in 1993. Tom's busy working on a map in my map editor, DoomEd, but don't worry - you won't be able to make out anything on the screen! Tom started many of the original DOOM maps and after he left, Sandy Petersen finished them -- some of the maps had very little work done to them, in fact. > On Tom's monitor is a little printout that says, "Quality". He always has notes stuck to his monitor to keep him reminded of .... things. That orange thing could very well be the very first keyboard wrist pad -- made by a friend of his back before you saw them in stores. The speaker at the far right is one of the first Altec Lansing clamshell models. The microphone in front of Tom was there for NeXTSTEP's awesome email feature - built-in voice emails! We always sent them back and forth... I think I might have some of them lying around here...
- deleted 8y ago[deleted]
- GuB-42 8y agoI do most of my C++ dev on Linux and I prefer it that way, for the reasons you mentioned. However, Windows has great tools too. And by that, I mean Visual Studio. In particular, I really miss its debugger when I am on Linux. It is just a different philosophy with its pros and cons. On one side, you have a lot of small, loosely coupled tools, text files and command lines. On the other you have a well integrated monolith and GUI.