233 points · by mgrouchy · 14y ago · 127 comments
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.
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.
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...
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.
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.
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.
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.
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.
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").
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.
Building the project is not really that difficult, and make can be made to do it just fine.
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.
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.
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.
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.
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.
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?
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.
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
grep -lR 'old_method' | xargs sed -ie 's/old_method/some+other()+expression/g'
is just plain awesome. Want to find out what libraries a process is using? cat /proc/$pid/maps
Want to find out where that process is logging to? ls -hal /proc/$pid/fd/
Basically it's often hard to use a gui ide to accomplish an arbitrary task if the IDE wasn't built for it, or if no one has taken time time write plugins. At the risk of gushing, the command line is just one of the most extensible, composable environments ever invented, and it's success over the past 40 years proves it.But you are right, if an IDE wasn't built for a task you're SOL and you can likely compose something together on the command line to solve it.
I use Visual Studio to develop for WP7, and refactoring is even more awesome: change any name, click the little popup (non-intrusive at all) and select refactor. Done. Not only in that file, but also in your project and any other project you have opened.
I'm not trying to bash command line tools (I'd really love to know them better), but I think that there are things that are far easier with a graphical IDE.
"if you only want to refactor Class1.Foo() method while not changing Class2.Foo()"
vim has functionality for scope in most languages (see http://vimdoc.sourceforge.net/htmldoc/eval.html#internal-var...). If vim doesn't have the functionality, it is a one-liner in your config file.
Additionally, there are language-specific vim refactoring options such as eclim (eclipse functionality in vim and vice-versa) for java, and rope/bicycle repair man for python
edit: on a side note, these religious discussions are great for unearthing great links and cli tricks!
When sed fails, and I don't have pycharm open, I stick with something like:
grep -lR 'thing_i_need_to_change(' | xargs emacs
To get a listing of files and pull them all up in buffers.Sure maybe it adds a file browser or a couple of menu commands for building and running. But in terms of actual coding, VIM rules (I am sure EMACS fans feel the same way about EMACS and for similar reasons).
The selling point of an IDE is generally that it's "integrated" whatever that means. The selling point of UNIX or Linux is you can string the tools together, loosely integrated, to accomplish a better job, but it's not integrated in the same way out of the box.
I don't think there is any question that the UNIX approach leads to better productivity in my mind. The issue is that like all high productivity tools, it has a learning curve.
- bash and make are completely separate programs. As a matter of fact, I spend half of my time developing with ksh and Solaris make. The two programs you mention don't go 'hand in hand'.
- `find | xargs grep` is a terrible construct. 99% of the time (if not a lot more) you'd prefer using something like `find -exec`, I have yet to come across a version of `find` that wouldn't work that way.
My point is not to be an arrogant prick, and criticize the parent post. These kind of misconceptions usually indicate poor understanding of the larger Unix philosophy. By her own admission, my parent "just do[es]n't know enough".
I believe that in order to truly use Unix as an IDE, one has to go beyond the (arguably bad) reflexes taught by common GUI IDEs. It's not simply a matter of "What command can replace feature X from Netbeans/Eclipse/Visual Studio/...?" Modern IDEs weren't conceived with sed/awk in mind, aren't (for the most part) scriptable like most Unix shells are, and aren't sitting on top of a freaking Lisp machine like emacs is (you know the whole enlightment deal, lisp is superior, bla bla bla).
I am sounding like an evangelist, Unix tend to do that to me. I am trying to make a simple point:
It's normal to feel that something is missing if one is simply transposing her knowledge from point-and-click IDEs to the Unix shell.
(To answer your question, a combination of sed and awk does wonder to rename across the code base. And SO much more ...)
It's also far from obvious whether a for or a while loop best fits the problem at hand. How does one figure these things out? By learning about the tools/constructs and using them (experience). Furthermore, it is expected of software developers to know these things.
It's all well and good to be an IDE jockey, but being a software developer entails more than clicking through wizards and filling in some logic. Learning tools (such as UNIX CLI tools) opens up a whole other world of untold power in accomplishing not just programming tasks, but everyday tasks as well (how many people know that there is a CLI unit conversion program that not only has more units than you can shake a stick at, but is scriptable and has a tiny footprint to boot?). Not to mention that these tools have been around and ported to just about everything, and will probably continue to be around for ever, and eat less RAM and CPU while being more flexible and powerful than their GUI counterparts.
Edit: I didn't mean to come off condescending and scolding, but I forgot to insert some helpful links in response to your statement that there should be better evangelism/PR for shell programming; hope these links fit the bill:
I don't know about lisp, but that's not even close to true for C. typedef struct A { int A; } A; is an easy counter example and that doesn't even take into account macros or any of the other tools that play horribly with grep and friends.
The reason Unix hackers prefer C is because it's rock solid, extremely well supported and plays nicely with hardware. And it doesn't hurt that it's old enough and popular enough that a huge number of people have extensive experience with it.
Of course, there are many things for which vim and bash (":%! sort -n" anyone?) are far superior to an IDE. I tend to use both.
It should be pretty simple to add a hook to vim to rebuild the tags whenever you save a buffer, for example. That should take the load off your mind. The issue with IDEs I find is that this stuff is automatic and no way to turn it off, and then I find at the worst time that Visual Studio is crawling to a halt as it runs a load of complex parsing in the background on my 500k lines of C++, just when all I wanted to do was write some code.
Think of it as separation of concerns - you wouldn't write a program where all the code was in one tightly bound monolithic system. Why do so for your tools?
Another not-so-smart feature is auto completion (in C++ at least) and refactoring.
However I can live with these missing features as once you get used to something like Vim or Emacs, its quite frustrating to work on bloated IDE's.
I also recommend the following talk about "subtext": http://www.subtextual.org/subtext2.html.
IDE's are great for navigating huge codebases, and massive libraries with long informative names (intellisense), integrated debuggers that can step into libraries, refactoring tools, etc. The visual gui builders are also really pretty cool - and a wysiwyg example not that far from Bret Victor. They require less effort (and skill) for these specific common tasks.
Bret's use of time is great for games, but not appropriate for all programming tasks. There's been extensive discussion of light table (here and on progit), about how it seems more suited to smaller, experimental coding (not large codebases) - but this remains to be seen, as the tool's not yet available.
I use vim myself, because I'm writing parsers and related code, an example of pure code (non-library, non-gui, non-web), leaning toward the algorithmic, which vim grew up around and was shaped by. Vim/emacs are still the deepest most fundamental level of coding - but that's only appropriate if you need to be working from first principles. Most of the time, for most high-value development, you're not. I think that for specific domains, where custom tools can get some leverage, it's more productive to use those tools. Tool for the job.
Edit: As mentioned in the comment bellow, it was less than year, in fact less than six months even, so you guys might be right. I just saw a big number and assumed it was a long time ago. My bad.
They were quick to provide an OO environment where someone could create something "impressive" very fast. A little eye candy is all it takes to impress many developers and users. And that's all she wrote. They beat everyone else to the punch. To this day, IDE's and OO programming still rule. And MS's mysterious API's are still very much a competitive advantage, tying programmers to the MS IDE and platform. They control you.
The unfortunate result of this over a long period is that today's developers are a lot less knowledgeable about how to build things from the ground up. Take away their IDE and they can't really do much.
If you want to create something truly "new" and push the envelope (think systems programming), then you need to start at a lower level than the IDE where someone else has handled the low level details for you. (Who built those objects anyway?) A recent post here on HN said that the most talented programmers are the ones who can move from different levels of abstraction effortlessly. From very high to very low and back again. The IDE keeps you in a box. One level of abstraction. Dirty low level details are scary to many developers.
IDE's are useful. They increase productivity exponentially. But if we take away your IDE and you are helpless without it, that's a problem from a progress standpoint (e.g. new systems development). Companies like MS are controlling you and controlling the rate of progress. And they have an incentive to maintain status quo. The envelope does not get pushed.
To the best of my knowledge - i.e., I've read somewhere - Emacs is a derivative in style from Lisp Machines at the MIT Lab. It's not really a Unix program.
Emacs predates the Lisp machines, btw. The original was written (as TECO macros) on ITS. The Lisp machines came out of the same culture and thus had their own emacsen. But GNU Emacs that we are all using today was written on Unix from day one.
There's a public access ITS system over in Sweden, or you can grab an emulator and run it yourself. I recommend trying it just so you can see how Emacs and Info have remained essentially the same (RMS's sad devotion to that ancient religion, etc)
Edit: Slight fact correction. The author of this article led me to believe that ack uses Perl Compatible Regular Expressions, which is a C library that implements a regular expressions system whose pattern syntax is very similar to what's found in Perl. Now that I've read ack's website, I see that ack is written in Perl and actually uses Perl's regexps. The author must have just meant that ack's regular expressions are literally "Perl-compatible."
Time marches on, however; and modern IDEs offer rich tools like refactoring capability, in-place documentation (IntelliSense) and fully integrated debugging tools that are a considerable evolution from what was available in the 1970s, that can only have come from having all the tools be aware of the language that's being used. From dumb, simple tools that munge streams to text to smarter, context- and semantics-aware tools that operate on program representations -- that's progress. Accordingly, Unix itself is no longer an acceptable IDE.
UNIX is in no way, shape or form an IDE. IDE stands for Integrated Development Environment and means exactly that. All your tools under one roof.
I do not deny and in fact would also assert that the separate tool chain / everything is a stream of bytes philosophy can be used in amalgam as an incredibly powerful methodology for software development, but that doesn't make it an IDE.
agreed. if anything, it's a UDE: Unintegrated Development Environment. which is it's strength and weakness. the initial learning curve is steeper than with an IDE, maybe, but you don't run into these painful low ceilings like with an IDE. so much synergy & integratability in the CLI paradigm. pick and choose. customizable UX, custom workflows, automation, and typically much less opaque configuration, lower idle cpu and memory use, etc.
http://cscope.sourceforge.net/cscope_vim_tutorial.html
I have cscope+vim+make/build+gdb+logging windows on auto-open for my developer desktop terms, and spend a lot of time navigating large codebases with cscope in all its incarnations. If you like this article, but haven't heard of cscope+vim, give yourself 30 minutes to check it out ..
You can consider Unix as a collection of hierarchically organized entities that can act as nouns and verbs. To develop in this system, all you need to do is to add verbs for text editing and compiling.
BeOS/Haiku has this versatile property as well. In fact, you can use BeOS as your media player/mail client with no app at all.
Python and Ruby are built with this quality. There is tremendous power in their REPL. The language is somewhat its own advanced debugger.
Smalltalk is much like Unix, with its structure of nouns and verbs and a REPL everywhere. This is precisely why the Smalltalk compiler is just another first class Smalltalk Object.
Any app like an IDE is actually something like a design pattern. It's actually a symptom of something lacking in your language/substrate. This isn't something bad or wrong, because kitchen sink architectures have their own drawbacks. It's also possible for a system to be too generalized.
Rather, the sign of something wrong (or conversely the sign of something right) is the extent to which you are building everything yourself or composing pieces that are already there. To what extent are you building together your own, and to what extent are you exploring powerful tools that are already there and putting them together to get things done?
Being able to do the latter is the definition of power in most contexts. The too much need for the former is pathological.
Unwieldy IDEs, app servers, dependency management, etc -- this is all a sign that something needs to be improved.
- replacing Foo just in specific modules/classes
- finding the call stack of a specific function/method even across closed source binaries
- provide a visual overview of modules/classes dependencies
- GUI design
- code refactoring
- debugging with hot code replacement on the fly
- browsing symbols in object files / binary modules
My development environment currently consists of Ubuntu/Arch Linux (haven't switched at work yet), Tmux, Vim, Xmonad, Urxvt and Zsh. The only sane way to start moving towards using these tools is to use one new tool at a time, see which defaults annoy you and then customize it to your workflow. I would definitely not start with anyone else's default settings (Janus for Vim or Oh-My-Zsh) unless you just want to see what these tools are capable of. Last week I completed a full productive workday without touching my mouse except to move it out of the way and over the weekend I had to work from home at this job for the first time. I had my ssh tunnels and keys setup already so it was a simple as attaching to my tmux session from work and continuing where I left off.
The reason I am going through this process is to learn more about Linux/Unix but more importantly I am sick and tired of setting up programs on computers, learning settings and modifying configurations through guis that change at the developers' whims. I don't need or want a system that anyone can use; I want a system that works the way I think with my exact hardware. The best benefit of doing all this is that I can actually learn and understand what my tools are doing and remove as many abstractions as I can handle. Most recently I learned about strace; I always wondered how people came up with answers to Linux questions about random dependencies.
For example, my 'work' setup is very IDE-like; when it starts it mounts my dev VM (nfs), starts vim, opens windows for logs, database client, SSH to the VM, source control (tig and git).
Apart from active development and easier configuration, vertical splits(screen has it for some time now).