Domain: billharlan.com
Stories and comments across the archive that link to billharlan.com.
Comments · 11
-
Re:In further news...
You can have a decent text editor in emacs. Just use vi mode. 8)
-
Re:Who needs two applications?
There's still the vi-mode for sissies afraid of carpal syndrome.
-
The best emacs trick...
...is obvious.
(ducks)
-
Re:Java n00b's questionI agree. If someone would make a "vi" mode in Emacs it would not become popular either, for all the right reasons. VI mode for Emacs is alive, kicking and even popular
-
Re:Really cool but...
IIRC, Emacs has a vi-mode, so anything that supports emacs supports vi.
-
Re:The gist of Linus's reply
And it has finally gotten a decent editor too!
-
Re:Damn...
Just use the vi mode.
OTOH, I'm sure somebody wrote a VI clone for emacs but can't find where. -
Re:Code, Compiler and OptimizationAs someone else who has been in the industry a long time, I find that only a very small amount of code actually needs to be optimized in the method you mention above.
The biggest problem I run into are programmers who "know the compiler" so much that they make impossible to decypher all-in-one-if-statement code blobs.
Write the damn code in a clear and precise way. Compile and run it. If performance is an issue (which for the majority of s/w it is not), then profile the code and make sure you know where the problem is.
Then, and only then, should the programmer consider rewriting code for optimization. And even then, often it is the algorithm that needs to be fixed, not the fact that the compiler's optimization is missing something obvious. These compiler thingies tend to to be pretty decent these days.
One of my favourite quotes I share with new grads as they come on-board with their fancy compiler theory classes under belt:
In "Literate Programming," Donald Knuth wrote "We should forget about small efficiencies, about 97% of the time. Premature optimization is the root of all evil."
-
Re:FYI: 'ZZ' is the same as ':wq'
Yes, there is a vi mode (called vip-mode) for emacs.
And DOS EDIT was a dream of user friendliness compared to edlin. Edlin: for when you can't retype the whole thing in less than a half hour, so you spend 45 minutes struggling with commands. -
members as pointers, args as references.
Painful years of C++ refactoring forced me to come up with some rigid personal rules for managing the ownership of C++ objects. For example, class members should always be pointers. Method arguments and return values should always be references. Avoid using null pointers as flags. When ownership of an object is passed to another, add a flag that that makes it optional. This sort of non-stop distraction is the reason I now write most everything in Java.
-
favorite computer books
I've given away dozens of programming books, but here is a list of books still on the shelf. Used bookstores are better off without a computer section.