News for hackers. Stuff that matters.
Re:Using unix as your IDE by ajross on Wednesday June 13, 2012 @11:34AM (#4106452)
On the one hand, I'm pleased that someone is posting this in the new-fangled bloggy tutorial style popular among the youth of today. It's nice to see my preferred environment evangelized.

On the other, it's a giant facepalm that the simplest, best documented, most powerful development tradition of the last 40 years actually needs this treatment. That there is a whole generation of developers who come out of school thinking that "building" is the action of pressing a button in an IDE GUI (and that "writing a program" means launching a big wizard that pukes a dozen files into a new directory) is just depressing.

Oh, and get off my lawn.

Re:Using unix as your IDE by Goladus on Wednesday June 13, 2012 @01:45PM (#4107271)
My problem with make and autoconf, as a young student, was the difficulty of finding quality, intermediate examples. Textbook examples were trivial, professional examples were too dense to understand. There was nothing to bridge the gap.

Trying to read the configure scripts and Makefiles for software like Apache httpd server was overwhelming. There's obviously many man-months of work there as well as unknown styles, conventions, and tricks.

How (and why) would I go from "gcc -lexample -o program csci201.c" and maybe a simple Makefile to a 10,000-line ./configure script? I never had any idea.

Re:Using unix as your IDE by endgame on Wednesday June 13, 2012 @04:55PM (#4108389)
The files you want to be reading are configure.ac (formerly configure.in) and Makefile.am. configure is compiled from configure.ac via m4 (no, really) and Makefile.in is compile from Makefile.am by perl. Makefile.in is used to generate Makefile at the end of ./configure (by config.status, actually).

Some configure.ac files are a bit hairy, usually because they depend on heaps of optional packages or because they test for all this obsolete stuff that autoscan told them to.

Have a look at libfake437[1], MudCore[2] or libtelnet[3] for some in-between examples.

[1]: http://code.google.com/p/libfake437/source/browse/#svn%2Ftru...

[2]: https://github.com/endgame/MudCore

[3]: https://github.com/elanthis/libtelnet

Re:Using unix as your IDE by padraigm on Wednesday June 13, 2012 @02:34PM (#4107608)
The reason you couldn't find a quality, intermediate example of autoconf is that there is no such thing; it's an obtuse and painful tool. As someone else mentioned, cmake is a much better choice.
Re:Using unix as your IDE by joelthelion on Wednesday June 13, 2012 @02:11PM (#4107455)
Fortunately there are better build systems available nowadays. CMake is a lot easier on the beginner, and yet it is used by large projects like KDE.
Re:Using unix as your IDE by joe_the_user on Wednesday June 13, 2012 @02:54PM (#4107739)
Sadly, my experience with CMake makes miss the otherwise annoying make.

This is mostly from trying to compile tar balls that used it. It didn't seem to give error messages for missing parts as well as simple make.

Re:Using unix as your IDE by thwarted on Wednesday June 13, 2012 @03:19PM (#4107890)
Does it even make sense to use a GUI IDE to write and build something as cross platform as Apache? All that boiler plate from the IDE is great, but much of what one would consider boiler plate in the Apache code base was built up over time as features were added and it was ported to new platforms.
Re:Using unix as your IDE by Goladus on Wednesday June 13, 2012 @05:34PM (#4108583)
Right, I basically picked apache randomly. Pretty much any significant open source project from the era I was a student (1997-2001) has the same problem, from a student's point of view anyway.

The problem was that an intermediate student who can use gcc and make but has questions like "what's the best way to organize my source code into directories?" there were no good answers if you were stuck at the command-line with man pages. If you didn't have a good mentor, you were figuring it out for yourself, or trying to emulate a random open source project with hundreds of source files organized into multiple subtrees with helper files, shell scripts, dozens of libraries and modules, and huge configure files that bear no resemblance whatsoever to any problems you're actually trying to solve. Or, maybe, if not a big project, then another intermediate developer who was just as clueless as you and you don't actually want to be imitating.

Meanwhile, GUI-heavy IDEs were offering sane default answers for those intermediate questions and offering tools to help manage a moderate number of dependencies, build steps, and platform targets. Unfortunately, they were also hiding important details and too often became crutches for people who didn't understand how compiling and linking actually works.

Re:Using unix as your IDE by thwarted on Sunday June 17, 2012 @11:08AM (#4123071)
I contend that things like "the best way to organize my project into directories" is something that is discovered, and changes, over time while building a project and is specific to that project and the people working on it. Obviously, students don't know this, but they should be writing code, and working toward this discovery, rather than fretting what to name the directory where library routines are stored as The One True Way™.
Re:Using unix as your IDE by BrainInAJar on Wednesday June 13, 2012 @12:04PM (#4106650)
> thinking that "building" is the action of pressing a button in an IDE GUI (and that "writing a program" means launching a big wizard that pukes a dozen files into a new directory) is just depressing.

I use UNIX as my IDE almost exclusively. When it comes to Java however, I don't think there's any way to avoid using Eclipse or Netbeans or something. Any nontrivial Java project is going to be convoluted enough that using the traditional tools is an exercise in futility.

Re:Using unix as your IDE by x1 on Wednesday June 13, 2012 @12:24PM (#4106761)
I grudgingly agree. It is frustrating but something created while using an IDE tends to create specific ways of thinking.

For example, most IDE developers tend to love their debuggers... want to learn something? Just run the debugger! Want to debug something, hey run that debugger and watch 'dem breakpoints!

When I code without a debugger I tend to write smaller, easier testable code because I lack a real way to step through a convoluted process. I feel this encourages a simpler application (but I have no study to prove that).

Another example is most Java/C# work tends to be in the center of the unknown universe. You are editing something twelve layers deep in a mess of public/private/protected objects and you aren't sure if the item you should call is the MarginalFlowStateController or the ControllingMarginalFlowState... with an IDE you would just open up both of them, their unit tests, and any documentation until you discover which one you should be calling.

It bothers me because I really enjoy my vi/tmux development environment where every time I :w a file and run a test I am running on virtually the exact same environment as dev/qa/pre/prod.

Re:Using unix as your IDE by nradov on Wednesday June 13, 2012 @01:12PM (#4107052)
While writing small, easily testable code is a good practice it isn't sufficient. Running your code in a debugger and actually watching things happen exposes a lot of bugs and inefficiencies that tests don't tend to catch. Getting that dynamic view of control flow and state is a huge advantage for improving quality.
Re:Using unix as your IDE by x1 on Wednesday June 13, 2012 @01:20PM (#4107111)
Meh, I think you are over-inflating the benefits of a debugger. Everything you described can be achieved through proper testing.

Want to know if something is efficient? Then build a test to gauge it. That way if it changes and becomes less efficient in the future your test will break. That's a much more solid approach than simply walking through the code a couple times and noticing something out of place.

Re:Using unix as your IDE by eropple on Wednesday June 13, 2012 @01:51PM (#4107300)
> Meh, I think you are over-inflating the benefits of a debugger. Everything you described can be achieved through proper testing.

You're falling into the trap of "one tool to solve all problems." Why waste your time writing tests to "gauge efficiency" when a profiler tells you more, more effectively?

Re:Using unix as your IDE by x1 on Wednesday June 13, 2012 @01:55PM (#4107333)
The test will persist and always be there to test again where as a gauge will be a one time thing.

What happens next week when someone does an x += hugeBlockOfText in a loop?

I'd rather have a set goal and a test/process that validates it over a one time event where human error is involved. You want X process a million records in under three seconds? Build a test.

I'm not advocating one tool. I'm simply saying that everything described so far is better solved with a test first approach over a debug first approach. Build a test to replicate the problem. Solve the problem. Keep the test to prove that the problem is solved.

Re:Using unix as your IDE by eropple on Wednesday June 13, 2012 @03:06PM (#4107811)
> What happens next week when someone does an x += hugeBlockOfText in a loop?

Then it will show up in your profiling? If you're doing something perf-critical it is absolutely insane not to be running it through a profiler suite on a regular basis. Your continuous integration system can (or should) be completely capable of replaying real or synthetic activity in order to demonstrate real-world hotspots.

Tests only find what you already want to find. Performance concerns are much fuzzier than that (unless you want to be writing "performance tests" for literally-literally everything, which you're welcome to do but I have better things to do than that).

Re:Using unix as your IDE by nradov on Wednesday June 13, 2012 @04:07PM (#4108145)
Except that it's tough to make performance and efficiency tests actually persist. The expected test results have to be keyed to the particular test environment and so those tests can't really be portable to other computers. And then every time you upgrade or change the test environment you have to modify the tests with different expected results.

The only way to make such tests really persist is to build in some kind of fixed known benchmark to evaluate baseline performance in the test environment, and then evaluate the software under test relative to that benchmark. This is a huge extra effort and hard to get right.

Re:Using unix as your IDE by zaphar on Wednesday June 13, 2012 @03:14PM (#4107866)
And when the test tells you the problem has come back? How do you debug it then?
Re:Using unix as your IDE by nradov on Wednesday June 13, 2012 @03:57PM (#4108085)
You're missing the point. Sure you can build a test to gauge whether your code meets some arbitrary level of efficiency. However the process of dynamically stepping through your code in a debugger engages a different part of your brain than inspecting static code or writing tests.

I can't offer any hard evidence to prove this. But personally I've found that keeping the discipline of always stepping through my code in a debugger — even when it seems to be working correctly — leads to improved results. Try it for a few weeks with a good interactive debugger and I think you'll see what I mean.

Re:Using unix as your IDE by scott_s on Wednesday June 13, 2012 @03:25PM (#4107922)
I don't reach for a debugger often, instead relying on sanity checks and traces. But when I do reach for a debugger, it's because I am so completely confounded by what is going on, and I have started questioning even the most basic of assumptions, that I just want to watch the damn thing execute.
Re:Using unix as your IDE by papaf on Wednesday June 13, 2012 @01:41PM (#4107247)
When I code without a debugger I tend to write smaller, easier testable code because I lack a real way to step through a convoluted process. I feel this encourages a simpler application (but I have no study to prove that).

I was talking to a programmer who used to have to hand in punch cards and wait a day to get results. He said people tended to get it right first time in those days.

Re:Using unix as your IDE by roguecoder on Wednesday June 13, 2012 @09:40PM (#4109384)
I suspect they've just blacked out the pain of the times they didn't.
Re:Using unix as your IDE by bluekeybox on Wednesday June 13, 2012 @01:41PM (#4107250)
I don't think anyone is saying that IDEs like Eclipse or Xcode or Visual Studio do not have a place. They absolutely do.

HOWEVER: (1) from my experience of working with people fresh out of school who were exclusively familiar only with the IDE way of building programs and who knew little to nothing about the command line tools -- such people were curiously unaware that many tasks (testing for example) could be automated. People who used command line extensively, on the other hand, would be the first ones to write a simple script that performed testing of their program. Testing is just one example (I'm sure there are many IDE-tailored solutions for it). There are other things that are done repetitively; using an IDE can mold one into thinking that such tasks are impossible to automate and that they can only be performed by clicking buttons.

(2) (Again this is about people either in school or fresh out of it -- certainly not about highly professional IDE users). People who were taught IDE first and who are not familiar with the command line will often assume that running command line utilities is an old-fashioned way and that they are more "modern" (therefore somehow "better") programmers just because they are using a GUI. Such people will then go on to write programs that completely ignore the standard way of interacting with the shell, even if their programs do run from the command line. One example: One of the programmers (who used exclusively GUIs for building programs) would write command-line utilities which, when outputting a text file, would place '\n' at the beginning of each line and not at the end, which then resulted in parts of the output being truncated when I ran them through sed/gnuplot/whatever. Firthermore, even though his programs were quite complicated (read: painful to debug), he had no idea what the difference between stderr and stdout was, and would write any errors that would come up to stdout. The same programmer was then curiously defensive when I told him that his way of doing it was wrong (his answer basically was: "I've been programming for a long time, and I've always done it that way, and I don't care that my programs don't play nice with that sed thing with which I'm not familiar with").

Re:Using unix as your IDE by roguecoder on Wednesday June 13, 2012 @09:37PM (#4109372)
I have encountered the inverse:

1) People who exclusively use the command line, especially when recently graduated, have extreme difficulty thinking in an OO fashion, because they have not had the tools to support exploring inheritance and call stacks the way someone with a visual OO development environment has (Smalltalk is ideal for this.)

2) People who have used the command line exclusively are content without visualizations, which can be massively more effective at conveying information, especially about performance and architecture.

3) People who have used the command line exclusively are less likely to employ refactoring tools and more likely to tolerate long, poorly factored code because vim/emacs makes it easy to navigate and ignore the ugliness.

4) People who have used the command line exclusively, especially when they are recent graduates, believe that their approach is inherently better and necessary in order to be a good developer. They get curiously defensive if you expect them to be able to instantly jump to the definition of a method in question or actually use the Strategy pattern.

Re:Using unix as your IDE by bluekeybox on Thursday June 14, 2012 @12:55PM (#4112289)
1) Don't really have a defense for that. Then again, not everyone who uses an IDE and claims they know OOP had had experience with Smalltalk.

2) I have encountered people who used UML/SQL schema diagrams in a cargo-cultish way to prove to themselves and (especially) others that what they were doing was well thought-out when in fact the opposite was the case.

3) That reads more like an argument in favor of Vim/Emacs as superior editors. Also, it seems silly to blame lack of refactoring on editor when it's more of an issue of whether the programmer has a sense of code elegance and clarity or not.

4) I guess hubris is not exclusive to either side.

Re:Using unix as your IDE by lftl on Wednesday June 13, 2012 @01:59PM (#4107366)
Having just picked up Android development (and my first real usage of Java), I've been pretty happy using eclim (http://eclim.org/). It bridges the gap nicely, I get eclipse's error checking, decent completion, automated import statements, refactoring, etc. all inside vim. The only two features I've found myself bouncing into eclipse for are the debugger, and android GUI layout previews.
Re:Using unix as your IDE by debacle on Wednesday June 13, 2012 @12:18PM (#4106730)
ant was built specifically for building large Java projects, was it not?
Re:Using unix as your IDE by mseebach on Wednesday June 13, 2012 @01:23PM (#4107131)
Needing an IDE for Java in my experience has to do with two things: The amount of boiler plate and really good refactoring tools/autocomplete.

Building the project is not really that difficult, and make can be made to do it just fine.

Re:Using unix as your IDE by strictfp on Wednesday June 13, 2012 @01:01PM (#4107007)
I thought that it was written to prove that the supposedly declarative data format of xml still is vulnerable to imperative misuse. :)
Re:Using unix as your IDE by stonemetal on Wednesday June 13, 2012 @12:30PM (#4106810)
Understanding the process of building has zero to do with knowing how to type make, or knowing the exact command line parameters GCC needs. Confusing a few cli commands with the process of building is just as bad as believing in the big magic button.
Re:Using unix as your IDE by ajross on Wednesday June 13, 2012 @12:41PM (#4106881)
Of course. But one environment scales and the other doesn't. A IDE user who only knows how to modify projects by adding files and clicking checkboxes for optimization settings will do that for the rest of their career. A CLI user who needs to edit makefiles will eventually have a vastly more powerful tool in the shed.
Re:Using unix as your IDE by joe_the_user on Wednesday June 13, 2012 @01:53PM (#4107315)
I'm using the Qt Creator IDE right now, in Linux of all places.

The Desktop GUI I'm making involves about twenty libraries, multiple threads and other complexities.

I could make my job even more complex by diving in and learning a command-line way to do everything. But it seems to me, my personal approach is, I move ahead by dealing with the necessary complexity and letting the unnecessary complexity fall away.

I mean, I'm sure there a way use ls with wildcards in a way that doesn't puke all subdirectories out at you when you're trying to find a single file in a large directory. But the fact that ls does this by default seems like strong evidence that the interface wants you to remember random bs - indeed, I've read stuff here where people were saying essentially "vi is good because it makes me remember arbitrary commands, strengths your brain". It might even be true that it strengths your brain but I think only a subset of even geeks want to relate to their computers like this and this subset isn't the same as geeks who can create useful and powerful programs or the most productive subset.

Also, I don't see any inherently more powerful tools here. Qt Creator can show me the meaningful references to variable foo, excluding comment "foo". I can't see grep doing that (even though I use grep for some thing but I still memorize ten cli options). All the tools are pretty Turing complete if you dig so it's hard to claim one thing is more powerful than another.

Re:Using unix as your IDE by ajross on Wednesday June 13, 2012 @02:11PM (#4107452)
First off: clearly you're right. IDE's are very large, featureful software and there are lots of specific tasks they accelerate that you won't find addressed in the common CLI workflow. Finding "references to foo" is a good example.

But here's some stuff Qt Creator can't do (or rather, provides no particular support for -- you can always use it as a text editor, of course): iOS apps; Android apps; sending email automatically; kernel drivers; languages other than C++ or Javascript: Scala, Haskell, TCL, C#, sh, perl, prolog, lisp...; build and deploy a node.js app; fire up an AWS instance; build a binary for an AVR microcontroller and download it to a device; Verilog or VHDL editing/synthesis/verification.

Obviously I could go on and on, but you get the point. The command line environment? Yeah. It "does" all that stuff. And it does it in the same way. A Makefile for your VHDL project is going to look like a Makefile for your web app. The build scripts for your machine learning rig and your AVR hackery work the same way. You write your email in the same editor you use to write your C++ and CoffeeScript (and that you used 20 years ago to write your TCL!).

So sure: if you want to spend your career searching for "foo" in your Qt C++/QML projects, Qt Creator is a great choice. And the next environment you work in will have a new tool, that does all the same boring stuff in mostly the same ways, and you'll need to learn it again. Pick up the command line and get better at it and you'll find you've opened up a much bigger door (and you won't need to learn to use a new editor every year, to boot).

Is it clear now why there are some of us (with decades of make and shell and ssh in our toolbelts) who sit here and scratch our heads at the perpetuation of this nonsense?

Re:Using unix as your IDE by eropple on Wednesday June 13, 2012 @03:21PM (#4107900)
> Is it clear now why there are some of us (with decades of make and shell and ssh in our toolbelts) who sit here and scratch our heads at the perpetuation of this nonsense?

It's no more clear than it was before--that is to say, perfectly so. But here's one for you, in turn: I'm glad that it works for you and that you like it, but if you want to insist it's objectively superior and I don't know what's better for me (which is what you've been doing throughout this thread), I cordially invite you to go fuck yourself. Impolite of me, sure, but telling you to go fuck yourself is considerably less impolite than patronizing people who decide they don't value working in the same way you do. I've been where you say to be, I've done what you say to do, and I got the T-shirt that you're rocking out in. I put it in a drawer because I think it wears poorly.

I have plenty of experience with "make, shell, and ssh"--I'm neither new to nor afraid of working in shells. Doesn't mean I want that to be my primary work environment and certainly doesn't mean I'm either ignorant or wrong for disliking it. For me, a phrase which I will italicize a few more times because you seem unable to internalize this, the UX of the command line abjectly sucks for tasks beyond basic file manipulation and quick text editing. It sucks! For me. I don't care about its hallowed consistency when it makes me feel like shit to be using it all day and makes me feel like I'm wasting my time. Learning new tools is, for me, a smaller cost than hating what I do. I'd rather go learn a new tool, one that's specialized to its use case, because in every case I've encountered it is both a more productive and more enjoyable experience. If I'm not going to value doing my job in an enjoyable fashion, I might as well go be a plumber.

I'm more than happy to use the command line to handle deployment tasks and other automation, but for actually creating things, writing code and doing development work? I'd rather have a tooth pulled than work in vim all day. But I recognize that that's the case for me. Your decisions to use those tools are right for you but not for me are your decisions--if they make you happy, awesome! But your patronizing "what you do is nonsense" crap (and your consistent implication that not adopting your methods is borne out of ignorance rather than experience) leads me to invite you to GFY.

Preferring consistent tools to specific tools for different tasks is not better; it is preference. And, quite literally, nothing more.

Re:Using unix as your IDE by s00pcan on Wednesday June 13, 2012 @04:59PM (#4108402)
I stare at Vim all day long and I can say that I don't give a shit what tools you use. Use whatever works best with how you think. Personally, I don't need to write a text editor because a group of people who more-or-less think about how to use computers the exact same way as me already did that.

I don't know why you took the parent post so personally; they never attempted to convince you that the command line is superior all the time for everyone. I can relate to it already. I saw a post on here a few days ago about shortcuts for some random new-ish editor (Sublime text 2?) listing awesome shortcuts that people should use. So what? None of that can compare to what is possible in Vim and it never will. I'm sure it's helpful for those who use that tool, but sometime soon there will be some other new tool that replaces it as the hot new editor for language x and those people will have to relearn it when they switch tools. However, that new tool will still use <ctrl-g> to find by line number.

Learning new tools on Linux is as easy as reading the man page or reading online and failing that I would dive into the source code. For example, I learned how to use rsync last night, but only enough to do what I was trying to do. Luckily, that knowledge will build as I require new uses for it. What makes this all worthwhile is that I can now make my computer do whatever I want and I am not limited to what others have built for a specific use case because these tools can handle almost anything.

Re:Using unix as your IDE by eropple on Wednesday June 13, 2012 @07:59PM (#4109123)
> I don't know why you took the parent post so personally; they never attempted to convince you that the command line is superior all the time for everyone.

Characterizing a well-reasoned decision not to use the command line and command line tools for everything as "nonsense" certainly is implicitly placing your chosen tool stack as objectively superior. It isn't.

The rest of your post is more of the same--I'm glad it works for you (and for text editing I use MacVim quite often, but not for development because for that task it sucks for me) and its reasons are great for you, but it is not objectively superior. Which is why I responded to the post to which I responded in the first place--because it was the sort of sneering arrogance that's so common in these parts, where my way is the best way. It is the best for you, and I'm happy that you enjoy it, but taking the tribal rock-throwing ("what you have chosen to do is 'nonsense'") attitude that ajross did is stupid.

Re:Using unix as your IDE by super_mario on Wednesday June 13, 2012 @05:16PM (#4108495)
But, but, UNIX command line tools are tools :D. If you enjoy learning new tools why don't you learn a set of tools that is applicable to any future task/programming language you will encounter?
Re:Using unix as your IDE by eropple on Wednesday June 13, 2012 @08:10PM (#4109154)
I don't enjoy learning new tools. I enjoy the user experience of using the right tool for the job more than I do using the same tools for every job.

For example: I use MacVim and Textmate for text editing (writing markdown files, etc.) because they're good at it. And that's about where it ends, for me; I would under no circumstances use it to write more code, than a one-off Python script because I find it displeasing to do. I feel annoyed and angry because writing code in it is, for me, a slog; I consider ctags basically defective and they're not as good as, say, IDEA's Python (or Java, or Scala) support (or Visual Studio's for C# or VS's and Xcode's for C++).

Similarly, and heading back towards the command-line realm: while this thread is full of people extolling the virtues of make (and my eyes made a credible attempt to roll out of my head at the idea, because make is one of the build tools I swear at most often at work...), it would be utterly stupid of me to use make for most of my personal projects because xbuild (for C#) and Maven (for Java) exist--but, oh the horror, they're specialized to their task, what if I want to flip waffles instead? And to that I respond, I don't care about using xbuild or Maven to flip waffles, because their job is not to flip waffles but instead to build C# and Java code. If I need to write a platform-independent build script for C or C++, sure, I'll use make (although today I'm more likely to use cmake), but that doesn't make it a wonderflonium-packed delight for everything else under the sun. I know this from personal experience; I deal with a make-powered Java app with makefiles best termed "monstrous" and if I could turn back the clock and make it a Maven application we'd have about a tenth of the headaches that we get from the current system. Because it's made for the job.

I would rather adapt to tools better suited to a given task than use consistent tools across all problem sets. I don't find picking up new tools to be daunting or particularly time consuming (I picked up IDEA in about two hours, despite it being markedly different in behavior than previous IDEs I'd used, and I'm significantly more productive) and I don't find value in the "elegance" of bolting 30,000 things into vim to make it almost as good as my IDE was, for me, a decade ago.

But what I have said above, if you listen to ajross, is head-scratching nonsense. Which is patronizing and insulting to people who've decided that their priorities aren't his. Such was the attitude to which I replied.

Re:Using unix as your IDE by pjmlp on Thursday June 14, 2012 @06:24AM (#4110642)
Very well written post.
Re:Using unix as your IDE by secoif on Wednesday June 13, 2012 @07:25PM (#4109020)
This is one of those cases where you should have calmed down before typing.
Re:Using unix as your IDE by joe_the_user on Wednesday June 13, 2012 @03:23PM (#4107914)
Ah, the "which way is the logical way" stuff is such an arbitrary but yet so weirdly satisfying...

I could to write emails with vi and I could learn to write python extensions for Qt Creator to do just about anything also. I could add an email-sending make step to my project if I happen to want send emails when I checked changes into git. I don't know which one is better and I don't do either right now because I don't have to.

As far as doing things "the same way" goes, the same way as what? I've actually done lets of command-lining in my time. When I need to formulate a twenty argument command, I usually edit it in a text file and paste it to the prompt. And the thing is, the argument syntax of shell commands isn't consistent. The only unifying factor is the various pipes but it's hardly a panacea. I mean, fricken grep only searches directories recursively for a pure wildcard search (just "*"). You can pipe the results of this search to a further search for, say. ".cpp" but if you've got lots of non "cpp" files that happen to have the "cpp" string next to the string you want in them, you're hosed. I'm sure someone has some other trick for this somewhere. But the situation seems to boil down to "you can do anything if you take the time to learn everything" - I mentioned you could write custom IDE extensions right?

Re:Using unix as your IDE by neutronicus on Thursday June 14, 2012 @12:34AM (#4109777)
The best of all possible worlds?

emacs.

Re:Using unix as your IDE by gutnor on Thursday June 14, 2012 @08:38AM (#4111000)
> A IDE user who only knows how to modify projects by adding files and clicking checkboxes for optimization settings will do that for the rest of their career.

Sorry, but seriously that is BS. I started coding with Basic on a Commodore 64. By the same reasoning, I should be mystified by a mouse.

People learn, tools and languages evolve, especially during the whole span of a 40 years career.

Re:Using unix as your IDE by j_baker on Wednesday June 13, 2012 @01:11PM (#4107049)
Indeed. But these tools can (and some might argue should) be learned outside of school. On what basis do you make the claim that make should be taught in school? I can count the number of times I've had to edit makefiles as part of my job on one hand, and I don't think I'm odd.
Re:Using unix as your IDE by ajross on Wednesday June 13, 2012 @02:37PM (#4107629)
Everything is best learned by self study. School should expose you to the different choices in life. We expect doctors to have a good grounding in the practice of chemistry even though they'll never do a lab test themselves.

Also: I'm not following. The context of your post implies that you agree with me, but the facts seem to say you're an IDE user. How can you possibly be doing development without modifying your build system? If you're not using make, you're using something else. My guess is it's an IDE...

Re:Using unix as your IDE by j_baker on Wednesday June 13, 2012 @05:35PM (#4108587)
Actually, quite the opposite. I'm not sure I agree that students need to be informed of how to write build files, but I don't use an IDE myself. That said, I did learn how to program in an IDE, and I don't feel as though I missed out on a whole lot in doing so.
Re:Using unix as your IDE by cooldeal on Wednesday June 13, 2012 @01:11PM (#4107046)
>A CLI user who needs to edit makefiles will eventually have a vastly more powerful tool in the shed

That is true if the user didn't already give up and leave programming completely due to the obtuseness and complexity of autotools,makefiles, m4,macros and workarounds like cmake.I survived it, but many others in my Masters class did not. http://esr.ibiblio.org/?p=1877 If even ESR finds them troublesome, what hope does a beginner have?

>Of course. But one environment scales and the other doesn't. A IDE user who only knows how to modify projects by adding files and clicking checkboxes for optimization settings will do that for the rest of their career

Using an IDE does not mean that you cannot do advanced configuration, including setting options that change the commandline of the compiler used. Don't almost all GUIs call commandline compilers on the backend?

Visual Studio even shows you the commandline being used when you hit the Build button. SQL Server usually has a "Script" button to generate script for a admin GUI option and you can do anything you can do in the IIS GUI with Power Shell.

The power should be there for when you need it, but making everyone go through arcane options has the unfortunate side effect of making the tool less popular though it does show the power of the tool to the novice user.

Re:Using unix as your IDE by ajross on Wednesday June 13, 2012 @02:33PM (#4107593)
This is the kind of discourse that shows the disconnect. I'm sorry, but programming is complicated. You're seriously claiming that someone who can intelligently navigate the rats nest that is the J2SE library environment can't handle autotools (and for the record: autotools really isn't what I'm talking about)? Please. It's just laziness and aesthetics. One looks shiny and new, and the other crufty and old. People like to play with shiny new toys.

And, sigh, "advanced configuration" is certainly something more than setting compiler flags. That was sarcasm, intended to show the limit that IDE users hit trying to extend their tools. For a practical example, how about this: conditionally build the modules of your C/C++ project such that they can be either linked in statically to the main binary or loaded dynamically, and generate both versions in a standard build. Someone who knows how the linker works and how to write a makefile can do this in a day, easily. Someone who only knows the IDE will be lost; there's no button for that. They'd probably hack up some monstrosity involving thousand-line boilerplate like building all the modules as separate subprojects or some nonsense.

Re:Using unix as your IDE by marmaduke on Wednesday June 13, 2012 @04:30PM (#4108254)
> programming is complicated

I'd like to hide in the corner and applaud the recognition of this reality. I grew up with Windows, I've been learning cli and vim and ... for 5 years and I still suck. But as Kennedy said, "don't wish for easy lives, wish to be strong [wo]men."

Re:Using unix as your IDE by msbarnett on Wednesday June 13, 2012 @03:52PM (#4108056)
>> Of course. But one environment scales and the other doesn't. A IDE user who only knows how to modify projects by adding files and clicking checkboxes for optimization settings will do that for the rest of their career

> Using an IDE does not mean that you cannot do advanced configuration, including setting options that change the commandline of the compiler used. Don't almost all GUIs call commandline compilers on the backend?

That's really illustrating his point, rather than countering it. If all you think of in terms of "advanced configuration" is "setting options that change the command line of the compiler", you're missing entire worlds of flexibility and productivity wins because of this GUI-centric view of things.

What about, say (and this is a very trivial illustration of flexibility), compiling part of the project, running a tool that analyzes those .o files along with some network resources, which generates yet more source files, which are then picked up by another step in the same build process and linked into the final executable?

I had to build essentially that kind of build system a few years back, for two different ecosystems, so that they could share some common infrastructure in a Big Org™ (a command-line/unix/ant-based Java build system, and a Windows/Visual Studio 2003/2008 based C# build system). The Java version was straightforward, but the Visual Studio version was an exercise in frustration.

The IDE Gods grant you no "custom build step that will generate an unknown number of files with unknown names which you will then pick up and compile as part of this compilation process" button to press. They give you a build scripting language, MSBuild, but it's so crippled by the baked-in assumptions of its IDE-bound design that it won't get you anywhere (to be specific, it assumes that you can hardcode the name and path of every file to be compiled by the project. It will let you insert a wildcard, but it expands them when the IDE opens the project file, which is useless when files are generated during the build, and if anyone deletes a file from the project in the IDE, it will "helpfully" rewrite the wildcard into separate entries for everything the wildcard matched back when the IDE opened the project file. Pure crap).

And this is a really trivial way to use the flexibility that the unix build environment gives you. There's so much more that can be automated than any IDE could hope to present a GUI for.

Re:Using unix as your IDE by Derbasti on Wednesday June 13, 2012 @04:51PM (#4108374)
I call standard makefiles as a pre-build or post-build task in Visual Studio. The pre-build task even generates some source files that are subsequently used in the build.

Just make sure you have make.exe in you PATH and maybe defer the call to a batch file if it is too complex for VS. Or use the batch file to set up the PATH altogether.

Re:Using unix as your IDE by msbarnett on Wednesday June 13, 2012 @06:05PM (#4108712)
Pre-build tasks wouldn't cut it, IIRC. The issue was that compiling the project required compiling part of it (part a), then generating source based on the results of (a), then building that generated source (which required the presence of the compiled results from (a), then compiling the rest of the project (b).

Unless I'm grossly misremembering, pre-build tasks would only have worked if the project had been broken up into separate projects such that the generation script could run post-(a) or pre-(b).

Re:Using unix as your IDE by ori_b on Wednesday June 13, 2012 @02:38PM (#4107634)
Exactly. With my typical setup, a makefile looks like this:

    BIN=my-program
    OBJ=file1.o file2.o file3.o
    DEPS=../foo/libfoo.so

    -include ../config.mk
    include ../mk/c.mk
    include ../mk/lexyacc.mk
It's not hard to modify, it's flexible, and if I need custom scripts to generate files, it's very easy to extend. I don't have to futz with compiler options, command line parameters, etc. I just add the next .o file to the list, and get back to coding.

There's room for improvement, but it works for me. And it's implemented in less than 100 lines of make.

Re:Using unix as your IDE by lmm on Thursday June 14, 2012 @08:17AM (#4110918)
Most makefile projects end up with a simple list of files to add to. But each one does it in a slightly different way, because make is basically an unstructured shell-scripting language.

I can barely stand to work on projects that don't use maven any more. Declare your dependencies and your sources in a standard format that every other project uses, and then get on with actually writing code; the build system is not the place for arbitrary complexity.

Re:Using unix as your IDE by ori_b on Thursday June 14, 2012 @03:29PM (#4113094)
Make is a way of defining dependencies. It's relatively far from a free-form shell like language.
Re:Using unix as your IDE by j_baker on Wednesday June 13, 2012 @01:05PM (#4107022)
> That there is a whole generation of developers who come out of school thinking that "building" is the action of pressing a button in an IDE GUI

Why? I mean, the fact that a newbie developer just needs to know how to press one button to build their code is actually pretty amazing. Plus, how many school projects are complex enough to require much more than that?

Re:Using unix as your IDE by zem on Wednesday June 13, 2012 @08:44PM (#4109251)
i've been developing under linux since 1993, and i would love it if building were pressing a button in an ide gui (without having to drag the rest of the ide development process along). it seems like a genuinely superior development model to me - write your code, have your dependencies figured out automatically, and hit a button to build. writing makefiles by hand is just a sign my toolset is not powerful enough, or my language insufficiently well designed to automate dependency analysis.
Re:Using unix as your IDE by Peaker on Thursday June 14, 2012 @07:22AM (#4110789)
Funny, I find it sad that we need so much tinker-knowledge about obscure command lines of build tools to program stuff.
Re:Using unix as your IDE by horsehead on Wednesday June 13, 2012 @12:32PM (#4106829)
I take it from reading this and other posts that cutting my programming teeth by learning to code in gedit and the command line, sans dev tools, is a good approach then?
Re:Using unix as your IDE by x1 on Wednesday June 13, 2012 @12:35PM (#4106848)
I wouldn't go that far.

The best way to learn something is through whatever method encourages you to learn.

For some that is starting from zero, others want to start at the highest level and work backwards, others start in the middle and jump around. Whatever can keep you interested.

Re:Using unix as your IDE by phren0logy on Wednesday June 13, 2012 @12:39PM (#4106873)
I agree with x1 that you should start with whatever will keep you going. If the command line appeals to you, check out Zed Shaw's "Learn C the Hard Way." It is not at all sans dev tools, but it will have you using sophisticated CLI tools rather than a GUI. I have found it to be a good fit for me personally, and I suspect I'm not alone.
Re:Using unix as your IDE by shanemhansen on Wednesday June 13, 2012 @12:51PM (#4106953)
gedit's not bad, but try and work your way into vim/emacs. This will allow you to use the same development/debugging environment that you use on your laptop on remote servers, which will vastly improve your earning potential.
Re:Using unix as your IDE by jaybill on Wednesday June 13, 2012 @01:28PM (#4107169)
Not to sound like a jerk, but I would really like to see the math you used to determine that learning one text editor versus another increases your earning potential.
Re:Using unix as your IDE by shanemhansen on Wednesday June 13, 2012 @02:21PM (#4107520)
I might not have phrased that very well, I was trying to claim that being comfortable with command line tools (the unix "ide") will increase your earning potential as an engineer vs only knowing a gui ide.

Being familiar with command line tools for debugging allows you to troubleshoot issues in production, saving the company money, and troubleshooting issues in production generally means working with command line tools on linux servers. This is valuable even if you're not in operations.

2 examples to back this up (one from a backend developer and one from a frontend developer):

My former boss used to run the Customer Order Workflow (COW) team at amazon. He related to me how useless/slow he felt the first time a production issue popped up and he was trying to get some ungodly combination of WinSCP and notepad working. Obviously he learned vim very quickly after that.

Even if you're not on the "backend", you may find yourself needing to ssh to a server which is reverse proxing to something else, and running curl/wget to try and figure out why the CDN isn't serving the latest version of the CSS file you just created even though you're using a cache busting query string.

Sadly saving the company money doesn't always translate into more for you, but experiences like this generally end up making you a go to guy/girl, which can lead to being a lead engineer.

Re:Using unix as your IDE by horsehead on Wednesday June 13, 2012 @12:57PM (#4106985)
Thanks. (to all the commenters under this thread).

I was thinking about vim just a bit ago (I hear emacs pinky is a real bitch). Maybe I'll put eclipse on my ubuntu too and check it out (dunno if it has support for python or not. I tried IDLE and didnt like it ... )

I have kind of stalled out a bit lately. maybe it's time for an IDE anyway

Re:Using unix as your IDE by mixmastamyk on Wednesday June 13, 2012 @02:08PM (#4107428)
I like geany, it is a lot more powerful than gedit, but still a lot simpler than most ide/mega editors. You can hide the features you don't use.

Despite the advice that you must use a terminal editor to edit files remotely, nautilus (& others) let you mount remote folders over ssh and edit them locally with the editor of your choosing. I find it very convenient. I hit a bookmark and start editing, keeping the terminals reserved for commands instead.