Hacker News new | ask | show | jobs
by samlittlewood 5351 days ago
For bonus points - add robust code folding to this, especially when the folding persists across edit sessions.

I worked on a large embedded system where all the principal developers used such an editor (there was some occam heritage). One incautious copy and paste of 'a handful' of lines, and you had accidentally replicated a complete subsystem! It made debugging 'interesting'.

Every time I think 'Oooh - code folding - what a great idea', I retrieve those memories.

More generally, any time editor cleverness is interposed between the creative idea and the source code, I get a twitch. It should be possible to work on the source code without requiring anything more than a bare-bones editor - that is all I can assume about what my favourite editor shares with whatever future developers (incl. myself) happen to be using.

1 comments

Yes, that's why in my previous job I simply forced all my team to use Vim, with almost the same vimrc. Before me, some were using Eclipse, jedit, even dreamweaver, that was a mess, also with encodings.

But to complete Jacques' rant, I'd say that if duplication is bad in the part of the code handling logic and actions, it is not bad and often "normal", or even "better" in configuration parts or in content parts (eg templates). Factorizing a list of configs to replace some duplication with logic (loops, conds) can be a very bad idea.