Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Bitten by the worst case (or why it pays to know whats inside the black box)

by tilly (Archbishop)
on Jun 27, 2004 at 02:13 UTC ( [id://369905]=note: print w/replies, xml ) Need Help??


in reply to Bitten by the worst case (or why it pays to know whats inside the black box)

Life is about trade-offs.

Thinking of things as black boxes makes it easier to bring someone to the point where they can be productive, and makes development far easier.

Knowing what is inside the box allows you to solve obscure problems when they arise.

The vast majority of the time, thinking in terms of black boxes saves you time and energy. I agree that it can be worth it to learn how the box works a bit, though, because when it goes wrong it can be very useful to know that. But the payoff doesn't come that frequently, and often isn't all that large. Besides as long as someone on your team knows, and you know who to delegate to when confused, the effect isn't all that different from actually knowing it yourself. (Except that the other person gets the credit. Also ignore this if you don't work in a team.)

Perhaps what I'm saying is that while in an ideal world we would all know everything about every topic, in the real one we can't expect to. So learn what you can, make black boxes of many things, and fill in some of your ignorance as time and opportunity present themselves. But accept that there will be ignorance.

Replies are listed 'Best First'.
Re^2: Bitten by the worst case (or why it pays to know whats inside the black box)
by demerphq (Chancellor) on Jun 27, 2004 at 08:17 UTC

    Obviously there is a point where the cost of looking into the black box exceeds the benefit of doing so. If you rarely use the black box, then there is little if any point in investigating how it works, and as you say this point is all the more true if you have access to people who do understand its innards when you get stuck on some bizzare boundary issue.

    However, when one uses a tool regularly I believe the benefit of learning the basics of how it works far exceed the costs. Databases are a good example. Most programmers end up having to regularly use some form of relational database. Yet I think a lot refuse to learn even the rudiments of the principles of its operation. This to me is just plain silly. Its not just a matter of dealing with obscure problems, but rather of a more holistic approach. Understanding a bit of how referential integrity works, how indexes work can and should be a guiding force in how you design queries, how you design table relationships, etc. Consider that fully normalizing a database is good for RI purposes but may be very bad for performance as it will typically mean far more joins to get the same data. And as a joins cost increases with the size of data involved this can be a very bad design decision despite its academic idealness.

    A different example would be filesystems on your favourite operating system. A programmer will be using and interacting with the filesystem in just about every program they write. Understanding the basics of how a filesystem works enables the programmer to make basic design decisions that in the long term pay off big time. For instance consider the three level directory structure in CPAN. Originally this structure was not employed, however had the programmers considered the scaling potential of CPAN in conjunction with the scaling properties of a flat directory structure they would have avoided the considerable effort required to restructure the data mid way. Im fairly sure that the programmers knew both points, but I suspect that the black box mentality was at least in part behind them not making the connection between the two.

    So i guess my point is that if you use a black box regularly you need to apply some kind of multiplier to the immediate benefit you gain from the investigation before considering the cost. Doing your homework earlier will help avoid costly and time consuming changes later.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://369905]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found