Live data from Hacker News

What I Wish I Had Known About Developing C/C++ From Linux Before I Started

derwiki.tumblr.com

61–70 of 104 posts

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#61
post #12

c++filt - an absolute necessity. Also, he should have just pointed out that all IDEs are ass for C++. Java is simple enough that an IDE can be a big help, but C++ is too complicated and too slow to compile. (The remote access thing is just a matter of the work environment being adapted to one set of tools and not another -- the real issue is that text editors beat IDEs for C++.) Otherwise, an excellent list.

The real issue is that C++ is too complicated and too slow to compile. Languages that are easier to throw together a reasonable parser for (Lisps, Smalltalk, Lua, or even C) have a much lower barrier to entry for development tools. Keeping the language syntax simple enough means that somebody scratching an itch can write something useful in an afternoon or a weekend, rather than taking a team and months.

Actually, no. The real issue is using compiler's front-end from the IDE itself. While it's true that C++ is hugely complex IDE writers shouldn't try to replace compilers (ie. trying as hard as they might they'll never get around C++ templates and their touring-completeness). MS got this right. gcc and every IDE that relies on it (like Xcode) is crippled in this regard.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#62
post #37
post #26

Why are we taking C/C++ programming advice from somebody who has been doing it for just over a year? And not to troll, but anyone who honestly believes vim is a better development environment than one of the mature Linux IDEs (Eclipse, Code::Blocks, KDevelop) is an idiot.

My development environment runs 24/7 and I can get to it from ANY machine on earth. ssh me@mysite.com $ screen -x Even the cursor stays where it was between sessions. How can I do that with ${IDE}?

Shouldn't this be possible with remote sessions of X or so?

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#63
post #33
post #26

Why are we taking C/C++ programming advice from somebody who has been doing it for just over a year? And not to troll, but anyone who honestly believes vim is a better development environment than one of the mature Linux IDEs (Eclipse, Code::Blocks, KDevelop) is an idiot.

If you're been doing C/C++ programming for longer than I have, this post is probably not meant for you. If you're a student who has to learn C/C++ or someone starting a job in it, then this post might be for you. This was stuff that I didn't know when I started that I wish I would have known. And not to respond to your troll, but a lot of the more senior devs on my project (10, 15+ years) as just as efficient in vim/…

Yes. And there are even modifications for using the Dvorak keyboard layout with Vim.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#64
I started with makefiles and emacs but fell in love with Visual C++ and eventual .NET. Netbeans is aok, but the article has prompted me to review "the impossible" and check out yet another interface.

My ideal user interface for programming? A brilliant group of younger smarter coders with better memory.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#65
post #45

There is one thing I feel have been neglected here: Debugging. Debugging C in Linux is a dream with gdb. Debugging (heavily templated) C++ in gdb is a nightmare. I therefore have one additional tip, though it doesn't work in console: Run Visual Studio in wine. It's debugger can pick up running Linux processes and is awesome to work with.

Great point, maybe that's why I fell in love with visual studio, the debugger?

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#66
post #61

Earlier quoted context omitted.

The real issue is that C++ is too complicated and too slow to compile. Languages that are easier to throw together a reasonable parser for (Lisps, Smalltalk, Lua, or even C) have a much lower barrier to entry for development tools. Keeping the language syntax simple enough means that somebody scratching an itch can write something useful in an afternoon or a weekend, rather than taking a team and months.

Actually, no. The real issue is using compiler's front-end from the IDE itself. While it's true that C++ is hugely complex IDE writers shouldn't try to replace compilers (ie. trying as hard as they might they'll never get around C++ templates and their touring-completeness). MS got this right. gcc and every IDE that relies on it (like Xcode) is crippled in this regard.

GCC is crippled in that regard, but it's a problem with gcc itself. It's written (perhaps deliberately) in a manner which makes it difficult to just use parts of it, e.g. just the back-end for code generation.

For an example of a less accidentally complex way to do what C++ templates do, look at ML's functors.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#67
post #62
post #37

Earlier quoted context omitted.

My development environment runs 24/7 and I can get to it from ANY machine on earth. ssh me@mysite.com $ screen -x Even the cursor stays where it was between sessions. How can I do that with ${IDE}?

Shouldn't this be possible with remote sessions of X or so?

Yes, but screen is usually good enough for most people (self included), and is quite trivial to set up.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#68
post #59

Earlier quoted context omitted.

The real issue is that C++ is too complicated and too slow to compile. Languages that are easier to throw together a reasonable parser for (Lisps, Smalltalk, Lua, or even C) have a much lower barrier to entry for development tools. Keeping the language syntax simple enough means that somebody scratching an itch can write something useful in an afternoon or a weekend, rather than taking a team and months.

> Languages that are easier to throw together a reasonable parser for (Lisps, Smalltalk, Lua, or even C) Heck, even Java. People (rightfully) complain a lot about how verbose some parts of java are (like how instead of anonymous functions or functions that can be passed as a parameter you have anonymous classes), but ignore the fact that the designers intentionally made that sacrifice to maintain consistency.

Indeed.

I'm working on a tool to help maintenance coders undo the damage from copy-and-paste programming on huge legacy code bases. One approach it uses is language-specific, but requires a bit of configuration (via Lua's wonderful LPEG), and the other is language agnostic. It's searingly obvious how much worse C++ is in this regard.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#69
I guess the big drawback for theses kind of tools for me is the time it takes to setup a nice developpement environnement. To fine tune my vim as i like it with ctags completion , good keybindings, a nice colorscheme and all, it takes me around 5 hours minimum.

I'm currently dev'ing for QT under QT Creator, and everything is nicely integrated, with some really neat features you can't reproduce in vim, and it even has an (incomplete) vim emulation mode !

I used to be an hardcore vim / cli fan, but i'd go back to that for nothing in the world now, at least for this current dev setup. Also i hate having to mess with makefiles.

Re: What I Wish I Had Known About Developing C/C++ From Linux Before I Started

#70
post #37
post #26

Why are we taking C/C++ programming advice from somebody who has been doing it for just over a year? And not to troll, but anyone who honestly believes vim is a better development environment than one of the mature Linux IDEs (Eclipse, Code::Blocks, KDevelop) is an idiot.

My development environment runs 24/7 and I can get to it from ANY machine on earth. ssh me@mysite.com $ screen -x Even the cursor stays where it was between sessions. How can I do that with ${IDE}?

VNC or RDP, to be pedantic :-)
Post reply on HN