Hacker Newsnew | past | comments | ask | show | jobs | submit | NoHandle's commentslogin

High cohesion is bad in exactly which programming environment? Functional or procedural?

I've always understood high cohesion to be related to low coupling. Also, writing util classes before you need them (where low cohesion may be necessary) is a nothing more than a time sink. Do something when you need it, not before. You are not omniscient and will not be able to account for everything no matter how hard you try.


So that is how I wrote all that code yesterday...


Yea, but I only learn to spite my co-workers.


Stack Overflow certainly deserves some credit. I was unaware of how much growth they have seen and that is mostly due to the fact that the service has rarely diminished for me. Taking on that kind of increased load, while preemptively scaling to meet is no easy task.


Eh, I could do it in a weekend. (I'm so sorry)


That made me smile so I forgive you.


It is a balance. Follow DRY while you are developing and the refactoring should occur as you develop.

Need to write something to a file, fine; just do it. Need to do it again in another class; time to extract common behavior.

You should also have an idea of what components will likely need this kind of abstracted behavior and preempt the wasted time writing something twice by just doing it the first time.

All of this comes with experience and the best way to gain experience is by doing it. Avoid trying to keep everything loosely coupled because it adds too much complexity is a great way to introduce tons of code smells and maintainability/extensibility issues.


Was tempted myself, but the installation seemed aimed at individuals who are not particualarly computer savvy (really awkward to format and reinstall) and their biggest concern is that they are pissed off at vista (Not using it).

So close MS, almost made me buy an OS for the first time(Aside from OEM includes).


Seriously, a visually updated install process put you off the whole OS?


I should have included the caveat, I am currently using the RC at home and love it. My problem is installing Vista/XP so I can install Win7 every 6 or so months when I want to format my computer.


Have you ever actually installed an "Upgrade" of Windows? You don't need to install Vista or XP first to use an upgrade version of Windows 7. Indeed, just having an old Windows 7 install on your machine is more than enough.


Actually, that's been changed with Windows 7. It now requires the presence of an activated installation of a prior version of Windows.


Which, again, doesn't change the fact that if you already have a Windows 7 install (I don't mean RC, I mean final), you can use the upgrade DVD, blasting the old install away during the process.


That is exactly my point. I want to install a fresh copy of the OS. Not pave over the previous instance.


Let me make it clearer for you: _you can do this with the upgrade DVD_.


Oh right didn't realise this was upgrade copies.


Why not just buy the standalone OS? You are not forced to buy the upgrade, and if you are reinstalling that much, it'd probably be worth it.


My understanding of the deal is that it is only for upgrades. I tried to find an instance of the stand-alone, but could not. If I could get a stand-alone copy of Windows 7 for the deal they were offering, I would have bought one without thinking.


50% off is a pretty good incentive to do so. However, I heard a lot of people were burned when they preordered vista. And I don't just mean they paid good money for a shitty OS.


Oh wow I didn't realise it was 50% off.


Very true that the podcasts are little more than entertainment. However, I don't think there is a problem with unit testing within the community. In fact, there is probably very little real unit testing going on at all. Probably why everyone speaks so profoundly about everything needing it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: