[BNM] 1, 2, 3, 4, I declare a language war ! (was Hot news: Microsoft buys OScommerce!)
Wayne Douglas
wayne at codingvista.com
Fri Jul 6 20:25:15 BST 2007
paul perrin wrote:
> Just picking up on the 'Abstraction is always good' line...
>
> I don't agree that it is always good -- it often encourages people to use
> the wrong tools for the job... If you can abstract everything to look like a
> nail, then you only need a hammer in your tool box. But if you are in fact
> hammering in everything including screws and bolts you are losing some of
> their specific benefits.
>
> I saw a bit of code that took some data from a database, extracted a date,
> added a day to it and then wrote it back.
>
> The date was physically held in the database in a 'days since' format - so
> (One line of SQL if you don't abstract it any further than relational
> tables). However it actually went somehting like this - the date was held in
> the database as an integer, the data later translated this to UCT time, the
> application layer translated this to a GMT time, the UI layer translated
> this to a local time, then the programmer used some client side javascript
> to convert this to a serial time to add a day and then convert it back to
> local time and then - if an update was required, it then followed the path
> in reverse...
>
> Everyone abstracted at their layer for their own reasons, but in the end it
> would have been better to go straight through - I blame the architect (if
> there was one!).
>
> Paul /)/+)
>
>
> [...]
I agree - the other benefit to using abstraction sensibly is
implementation of your code through the eyes of other developers. People
want results - fast (me for one) - lots of abstraction means loads of
learning, more time to results, probably more coding. Allowing a gateway
straight into the code offering instant results and maintaining
expressiveness through the provision of related classes offering lower
level methods is good software design. It all boils down to naming
conventions, common sense and forethought IMO. And that's a
heterogeneous thing. :)
It's friday night WTF am I doing!!!
Laters skaters!!
w://
More information about the BNMlist
mailing list. Powered by Wessex Networks