TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lets Ban Some Words

1 pointsby tsewlliwalmost 13 years ago

1 comment

lmmalmost 13 years ago
Refactoring: sure, it's not specific, but if you spent a day doing it you probably found fifty different things that were duplicated across the codebase and fixed them all. Try and be more specific (in particular, tell other people which areas of code you're touching, so that you won't conflict), but it's not a bad word any more than "programming" is.<p>Framework: yes and no. Sometimes you can separate your concerns much more effectively by declaring that a certain part of the code is only concerned with UI, or database access, or something. At that point, declaring this piece to be a framework helps keep your code clean.<p>Pattern: urgh. I've written code exactly like what I see there, but it was for the case where there are four different cases and I expect there to be more. I hates that code, but it is indeed a way to work around language deficiencies; if you don't like it, use a better language.<p>Abstract: I would agree except that the java syntax for defining a delegate inline is so verbose. The client code for the example given looks like:<p>new Once&#60;Void&#62;() { protected T expensiveCalculation(){ return null;} };<p>If you write it the way the author suggests, this becomes new Once&#60;Void&#62;(new Callable&#60;Void&#62;() { public Void call(){ return null;} });<p>And when the object needs to be Serializable the "reuse existing ecosystem" argument no longer applies, because you have to declare your own SerializableCallable interface and use that, and none of the existing Callable ecosystem implements it.