Slashdot Mirror


Programmers and the "Big Picture"?

FirmWarez asks: "I'm an embedded systems engineer. I've designed and programmed industrial, medical, consumer, and aerospace gear. I was engineering manager at a contract design house for a while. The recent thread regarding the probable encryption box of the Columbia brought to mind a long standing question. Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system? That, in and of itself, would explain a lot of security issues, as well as things as simple as user interface nightmares. Comments?"

"Back working on my undergrad (computer engineering) I remember getting frustrated at the comp-sci profs that insisted machines were simply 'black boxes' and the underlying hardware need not be a concern of the programmer.

Of course in embedded systems that's not the case. When developing code for a medical device, you've got to understand how the hardware responds to a software crash, etc. A number of Slashdot readers dogmatically responded with "security through obscurity" quotes about the shuttle's missing secret box. While that may have some validity, it does not respect the needs of the entire system, in this case the difficulty of maintaining keys and equipment across a huge network of military equipment, personnel, installations."

390 comments

  1. For big pictures by Anonymous Coward · · Score: 1, Funny

    I like to use jpeg compression. PNG is great for line-drawings, etc though. If you really need the whole big picture, and size isn't an issue, then yes, PNG's 24-bit mode is pretty good.

  2. fairly possible by Anonymous+Coward++1 · · Score: 0, Troll

    it's been time for a paradigm shift for years now.

    --
    Karma: Bad (mostly affected by being such an asshole)
    1. Re:fairly possible by Anonymous Coward · · Score: 0

      Nice vocab

  3. In general... yes by Anonymous Coward · · Score: 4, Interesting

    I don't have as much experience as some, but I've always wondered about coders who restrain themselves in the 'world' their code runs in. It overlaps, I think, with the problems of sysadmins who leave systems/gateways/firewalls and whatnot wide open to the world.

    If a coder isn't ignoring the fact their code isn't going to be running on the exact same shell as they are, they're ignoring that it won't always be running in the exact same OS, or exact same network. Tragically, when it breaks it can then break BIG.

    Note I also don't have enough experience to offer a solution other than "get a clue!". It's more work until you embed it in your habits to take notice of these possibilities.

    1. Re:In general... yes by Anonymous Coward · · Score: 1, Interesting
      I am currently a software engineering student in Ontario (where software engineering has just recently become a 'real' engineering discipline. From an engineering perspective, the documented black-box model is the ideal way to have software written (Please keep in mind that I am a student with no experience). Here is why:

      -It allows you to take advantage of fully-tested, error reduced? code that has been audited. An electrical engineer doesn't design a new power supply circuit for every new circuit board, they take a previously done, WELL TESTED and documented circuit, and builds to the required specifications.

      -It reduces coding needed. By using a library/class/module already written to handle a specific function, you are able to save time. Don't re-engineer what has already been done, and done well.

      Where the model breaks down (but shouldn't):

      -Lack of auditing. When code libraries are written, have been debugged and used in beta, they should be audited by independant, senior people. Then the code should be frozen, except for future bug fixes, after which it should be re-audited. The auditing does not need to be done by payed people, just those who can do the job independantly and well.

      -Lack of testing. I have downloaded many many libaries and applications which do not come with a working test suite. This is a bad sign. Code that is being distributed should come with a thorough test suite which can be used by both developers (to make sure new code doesn't break something) as well as by users to make sure that software compiled correctly. I admire much of the GNU project software as it usually comes with a very comprehensive test suite.

      -Lack of documention. "Read the header files" is NOT documentation. Documentation should be clear on what EVERY public function call does, any exceptions that may be thrown, and what return values stand for what, as well as any assumptions made. It should be clear and conscise.

      -Lack of standardisation on use. I was checking out the libpng web site, and counted roughly 100 libraries which somehow provide PNG services. I did not look at each one individually, so I may be a little off here, but I do not see how having one un-audited library is inferior to 100 un-audited libraries. More uncertain code is not better. If you want to add SSE5 suuport to a version of your software, freeze and audit the old version. Start a new version (new major version number) of the library with all of the new features that you want. This way people who use version 1.2 because it is stable won't be able to accidentally use version 2.0 by having it called 1.3 which is the newest, but untested. -GK

    2. Re:In general... yes by Anonymous Coward · · Score: 0

      That's why there are system engineers on the hardware side... I would suppose that job falls onto the software architect (if exist ?) or a team leader.

    3. Re:In general... yes by dominick · · Score: 1

      I'm also in 'software engineering', close to my degree. I have had plenty of time in the field to realize the black-box system sucks ass. Challenge yourself, learn how every electron enters and leaves your system. Once you know as much as there is to know, will you ever need to ask another question again?

    4. Re:In general... yes by Goth+Biker+Babe · · Score: 2, Insightful

      I'm in software engineering in the real world as essentially a software architect for embedded systems and yes hearing about CS courses where the lecturers tell students not to worry about the hardware "If your software won't run on the specified system then you need to get the hardware engineers to give you more memory, or more MIPs, or whatever" does make me cringe. This is just not practical when you are building a product to a budget in the embedded world. Get yourself the schematics and learn the system you are going to code for but... ...coding too directly to the hardware is also bad. A company which has, for say customer reasons, use different processors and operating systems in it's products will end up with lots of teams which are all reinventing the wheel for their particular hardware. That doesn't bode well for reuse and potential requires rewrites even for cost down versions of products.

      Understanding the hardware doesn't prevent you from using black box methods. Just use heirachical ones. The system as a box, subsystems as boxes, their objects as boxes and so on. So if we take a DVD player (European market one) for example without knowing the hardware you know it's going to have the following subsystems: storage (dvd mechanism say), user i/o (front panel, remote and display), a/v routing (either video from the box or passthrough, analogue audio or digital audio - possibly optical), memory and decode (codecs etc). For storage you could split that into device driver (low and high level), io stream etc. All of these have software components that can be reused even as basic as the on screen widget set in the OSD.

      If you do use a black box/component approach then you can never have too much documentation. Components should be considered projects in their own rights. Do your requirements analysis and find out what it's needed to do, model it, document it formally, explain how it's supposed to be used. If there are areas of ambiguity then it hasn't been documented properly.

      The art of desiging the system is knowing when to reuse and when to reinvent. When to componentize and when you shouldn't. I don't see black box engineering and knowing the system as mutually exclusive as an engineer you must consider how much and at what level you need to know.

  4. Probably by nizcolas · · Score: 4, Insightful

    Most programmers who are going to come across a "black box" have enough experience to be able code for the situation. Isn't that skill a trait of a good programmer?

    Then again maybe Im missing the point :)

    --
    If you get an error, type "OVERRIDE" or "SECURITY OVERRIDE" and then try the optimize command again.
    1. Re:Probably by ackthpt · · Score: 5, Interesting
      Most programmers who are going to come across a "black box" have enough experience to be able code for the situation. Isn't that skill a trait of a good programmer?

      I think it's more than a skill, it's an attitude. I've encountered a number of programmers (just out of school/training) who are oblivious to external concerns, including interface design (traditionally what users complain most about and programmers lack any standard to follow.) Generally it takes little effort to break programs written by very skilled programmers, but blind to anything outside their scope. I was probably as bad when I first started, but recently an analyst complained angrily why I went beyond the scope of the project by including an error/warning log (most likely because the errors/warnings accounted for any untrapped logic and revealed how incomplete the spec was and how little the analyst, and some of the higher-ups, knew of the business function) I felt there were too many things unaccounted for and added the log, when it produced 1,000+ entries things got a little heated. I stuck to my guns though and see a general lack of interest in review of why there are gaps in the spec or knowledge (by the very people who should know.

      --

      A feeling of having made the same mistake before: Deja Foobar
    2. Re:Probably by ryochiji · · Score: 5, Interesting
      >programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?

      I think there's a lot of truth in this. For example, how many programmers think about writing software from the standpoint of a support technician? In fact, how many programmers even have experience as a support technician? I've never even heard anyone even talk about writing supportable software, yet, when considering the overall costs or quality of a system, I think it's important to consider how heavily the introduction of that system will tax the support department. Whether you're shipping or deploying the system, lower support needs will lower over all costs and vastly improve the reputation of the system.

      The same applies for security and usability. It's really not a question of programming/technical ability, but a question of mentality. I think programmers need to have a specific (or perhaps not-so-specific) mindset to get a bigger picture, and not very many programmers are willing to do that. Part of it may be inherent to programmer-types, but it also might be cultural (the whole "us vs. them" elitist attitude).

    3. Re:Probably by oconnorcjo · · Score: 3, Insightful
      The same applies for security and usability. It's really not a question of programming/technical ability, but a question of mentality. I think programmers need to have a specific (or perhaps not-so-specific) mindset to get a bigger picture, and not very many programmers are willing to do that. Part of it may be inherent to programmer-types, but it also might be cultural (the whole "us vs. them" elitist attitude).

      You ALMOST have it except it is not inherent in the programmer but in how programming departments are managed.

      Management usually puts an emphasis on more features and fast timelines instead of security and stability. Programmer's must prioritize the demands given to them and when management's views are skewed, so are the employees.

      Good management would have code reviews of all programmers code on a periodic basis (no matter how much experience they have) and system designers would have meetings with the programmers (including every senior to junior programmer involved in building the system) and explain why and what their system is supposed to do.

      Instead most companies give out specs and nobody knows what the hell their piers are doing either because management is incompetent or lazy and thus leave code reviews and design meetings in a dusty book that could be called "good practices that most don't do".

      One of the reasons why the code in open source software is often of a higher quality than commercial software is that: 1. programmers write their code KNOWING that somebody might be looking at it later (and often getting good suggestions back from other developers). 2. Open source projects have developer mailing lists where developers explain what/how they are designing/redesigning something new in the project.

      But most company management's are very short sighted and impatient like the rest of society.

      --
      I miss the Karma Whores.
    4. Re:Probably by edunbar93 · · Score: 1

      because management is incompetent or lazy and thus leave code reviews and design meetings in a dusty book that could be called "good practices that most don't do".

      You've mistaken laziness and incompetence for worship of the good ol' yankee buck and beating your competition to market. Management is impatient and short sighted because if they don't get their product out faster or cheaper or better (choose any two) then they're all out of a job, and by extention, so are you. Once their future (and yours) is secure, then they can actually *think* about thinking about the long term. For the most part, especially initially, their primary concern is making sure everyone has a paycheque. If you keep this simple concept in mind, a lot of management decisions suddenly become much easier to understand.

      --
      "No problem. I have the capacity to do infinite work so long as you don't mind that my quality approaches zero."-Dilbert
  5. Are cats black? by Anonymous Coward · · Score: 0
    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?

    Yes. And no.

    (Ask a uselessly-general question, get a uselessly-general answer.)

  6. Big Picture Programming by rivendahl · · Score: 1

    I think perhaps the question was meant to focus on how big picture programming (not images) might have helped or hindered the abilities of the investigators in determining the cause. On the other hand, images of the destruction might come in handy for investigative purpoases as well. Either way, and regardless the intent of the original question, what might systems engineers improve upon or how could they improve upon current paradigms to assist in investigative methods without using "black box" technology approaches?

    Rivendahl

    --
    ... there is nothing that has not already been thought ...
  7. Involvement in the SDLC by seanmcelroy · · Score: 5, Insightful

    I think the problem increases as programmers are less and less a part of the complete systems development life cycle and are contracted to work on individual components of an overall system. Especially during the maintenance phases of a system's life, the inexperience of new programmers on a project is probably more to blame than 'training' per say to think in a black-box mentality.

    --
    Be very, very careful what you put into that head, because you will never, ever get it out. -Thomas Cardinal Wolsey
    1. Re:Involvement in the SDLC by smetnoc · · Score: 0

      If the architecture is designed properly and EVERYTHING is taken into consideration at the design stage, the programmers in charge of developing the individual modules should be able to employ black-box techniques.

      It is not the job of the programmers to see the "big picture". This is the responsibility of the system architect, or whatever you want to call him. I suppose it depends on how the "team" is set up.. in some cases the programmers would need to see the big picture.

      But on most projects I've worked on there were several people (or just one) who's job it was to design and overlook the project. They would ensure that everything is taken into consideration and that all modules work well together. The individual programmers each worked on modules that were assigned to them, ignoring what everybody else was doing. It was the job of the system designer to then put all the modules together.. and even before all that happened, to ensure that all the specifications were correct.

      In my opinion such an approach is more efficient.. and I know it's possible.

      Black-box programming can be a very efficient practice if implemented properly.

    2. Re:Involvement in the SDLC by aziegler · · Score: 1

      It's simply not possible to take EVERYTHING into consideration at design stage, especially if there's only one person responsible for the design. By exposing programmers to the big picture -- but not giving them responsibility over anything except the modules for which they are assigned -- you gain the assistance of all of the programmers in your organization in vetting the design.

      -a

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    3. Re:Involvement in the SDLC by smetnoc · · Score: 0

      Of course it's not possible to take everything into consideration. things will break. the design will change. that is to be expected.

      Sure, expose programmers to the big picture. They should know what they are working with. But don't expect them to pay attention to every single detail that is not in the scope of the module they are developing. That is your job.

      If they think of something I hope they tell you, but IMO you have a bigger responsibility to watch out for things like that than they do. After all, you SHOULD have a much better understanding of how a fundamental change in one module will affect the others.

      Communication between the programmers and between the programmers and the managers in any software development project is crucial. A black-box approach to things should not compromise that level of communication. The two are NOT mutually exclusive.

  8. Huh? by twofidyKidd · · Score: 5, Funny

    I don't know what you're trying to say here man, but no amount of programming or "Fatal Error: Wing no longer attached to craft" terminal prompts would've saved them from what happened.

    If you're trying to make a case for programming paradigm shifts based on security procedures, it isn't working in this context.

    --


    Hades, PoD: Official Advocate
    1. Re:Huh? by Fulcrum+of+Evil · · Score: 1

      no amount of programming or "Fatal Error: Wing no longer attached to craft" terminal prompts would've saved them from what happened.

      Yeah, the wing coming off is a QA problem (yes, I'm serious - have you seen what has happened to NASA's safety budget?).

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  9. Black Box....yes, but....... by jlk_71 · · Score: 5, Insightful

    I am taking courses toward my degree and I must say that in my intro to programming course, the instructor was constantly stressing the need for 'black box' programming. In addition though, he also stressed that while keeping things black box, you also need to keep your mind on the whole project, always watching out for possibly security problems, etc.
    I believe that some people tend to get tunnel vision and concentrate wholely on the bb theory, without taking into consideration the whole program. This does usually lead to problems and errors in the code.

    Regards,

    jlk

    1. Re:Black Box....yes, but....... by mrtroy · · Score: 1

      change schools.
      i hope to hell they were telling you to keep focused on black box for one specific situation and not for coding in general.
      because if you ever start doing microprogramming or embedded systems you are sunk.

      --
      [I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
    2. Re:Black Box....yes, but....... by Drakonian · · Score: 1
      I think they probably mean black box as in having layers of abstraction/encapsulation in your code. It's a good programming strategy, makes things much more maintainable and reusable. It's the basis of all object-orieted design.

      Obviously you still have to take the entire system into account. Hopefully no one is arguing here that a 100 page while(1) loop is the best way to program. We might need to meet at the bike racks if you do.

      --
      Random is the New Order.
    3. Re:Black Box....yes, but....... by plumby · · Score: 4, Insightful
      There's nothing wrong with developing to a black box model. This is what design by contract and component development are all about. Each method on each component should describe, with pre- and post-conditions, what that method requires in order to work, and what changes it will make to the external environment that it is operating in. Beyond that, the inner workings of the component should be a black box. I don't care how your component does what it says it will do, just that it does exactly that (and nothing else).

      As the developer of that component, you will know exactly what the internals do, but then you treat the rest of the world as a black box, to be talked to through clearly defined interfaces.

      It is the lack of a black box approach that often leads to unexpected side-effects.

    4. Re:Black Box....yes, but....... by Anonymous Coward · · Score: 0

      Your school even mentioned security as part of programming? A better school than mine.

    5. Re:Black Box....yes, but....... by Steeltoe · · Score: 1

      Forget the notion 'Black Box', your instructor is confusing the issue of "black-box testing" and interfaces. BB-testing is appropriate in some situations, "white-box testing" in others, doing both is superb.

      What he means is that you shouldn't let the code become interdependent except through interfaces and documentation. Unless you really want nasty side-effects when you later change some innocent-looking code (job security ;).

    6. Re:Black Box....yes, but....... by johnnyb · · Score: 1

      The problem is that although it is good to try to create and code to black boxes, there is no such thing as a purely black box.

      For example, processors are often considered black boxes, but as the CPUBurn program shows, they don't entirely work that way.

    7. Re:Black Box....yes, but....... by Anonymous Coward · · Score: 0

      Joel Spolsky has an excellent article on this issue.

      One of the problems with CS programs is that they were often born from mathematics departments. Mathemeticians prefer to work in abstractions and appreciate the "elegance" of a tightly defined recursive algorithm in a pithy language. The problem is that abstractions leak, and if you don't understand what is being abstracted away, you can't fix them. The mathemeticians would have programming taught in as high a level language as possible, but that kind of training leaves a new programmer with precious few intellectual tools for analyzing a core dump sent by a customer.

      I think that CS curriculums should =start= in assembly language so that students can learn about the physical constraints of real machines and then move towards higher abstractions later in the curriculum as the importance of complex data structures and algorithms become more of a focus.

      The trend to teaching intro CS courses in Java, or worse, VB, is disturbing.

    8. Re:Black Box....yes, but....... by plumby · · Score: 1
      True to some extent, but then it partly comes down to what you've specified about your component. The vast amount of heat generated by a modern CPU is a known issue, and therefore systems are usually built with the ability to monitor CPU temperature and to shut down if a critical temperature is reached. In component terms this is a known error condition, and can be dealt with, in a similar way that a well behaved software component should define what happens in a disk full situation.

      What CPUs don't allow you to do is go in and tweek random logic gates on the chip. If you could, then the behaviour of any call would no longer be guaranteed, and this is a closer analogy to the way that many non-black box systems are built today.

    9. Re:Black Box....yes, but....... by johnnyb · · Score: 1

      What you say is true, however, there are too many issues to be able to specify.

    10. Re:Black Box....yes, but....... by rollingcalf · · Score: 1

      It's the designers, not so much the coders (unless the designers are also coding) who have to be well aware of the big picture - since they are the ones who direct how all the little black boxes work with each other.

      --
      ---------
      There is inferior bacteria on the interior of your posterior.
    11. Re:Black Box....yes, but....... by vikingds · · Score: 1

      This the same old reply that is always given to the specification argument. Thats why black boxes are a good thing, you build them to handle a very specific set of conditions that ARE fully specified and nothing else. IF the spec is complete and followed then no unexpected side effects result. IF the spec is BS, incomplete or not followed then boundary conditions will cause things to break or respond in unpredictable ways.

    12. Re:Black Box....yes, but....... by Spellbinder · · Score: 1
      i think what you understand as "black box concept" is better described as encapsulation
      to encapsulate you have to describe interfaces
      to describe the interfaces you have to have knowledge of the whole system
      if two programmer/teams describe between their capsules/"black boxes" without taking the whole system into account you will start having problems

      to the cpu analogy
      if the cpu designer don't take the whole system in account they will forget they need to build better cooling to their cpu
      the cooler designer have to check if the airflow in the case is big enough to take the heat away and i could continue endless but for now i don't think you have to take global climate changes caused by your cpu/cooling system into account =))))

      --


      stop supporting microsoft with pirating their software!!!!!
    13. Re:Black Box....yes, but....... by The+Real+Programmer · · Score: 1

      I would be inclined to agree. My first real programming experience, outside of a little bit of C, was assembly on a computer with a well-designed instruction set. I find that I'm in a much better position to understand what's going on than I would be if I were just being taught how to use black boxes. The problem is data hiding...in the hands of someone who knows what he is doing, yeah, it's useful. However, when a fool (i.e., CS student) gets his hands on an OO programming language, he doesn't understand the abstraction, and he's clueless when it breaks. The problem is that "Object Oriented" *snicker* programming is "the way of the future". What CS departments are doing is no different from removing a strong history curriculum from Political Science. In order to understand OOP, and why it can be useful (I laugh at the idea, but it *can* be useful), one *needs* to understand what's going on under the hood. One needs to know what the processor does, *how* it does it, and what happens when you feed it crap. Learning to program at the hardware level may not be eminently useful in today's world of gee-whiz optimizing compilers, but it is the ultimate in an educational experience. One can't truly program until one *understands* a computer. Programming languages are shorthands...the problem is, nobody knows longhand anymore. People piece things together that they don't understand.

    14. Re:Black Box....yes, but....... by tjb · · Score: 1

      Yow, you're gonna have a tough time if you ever work on very small systems.

      I work on chips with often less than 1K instructions of code-space in some of the processing units and three-deep call stacks as a rule. A new function call is a major design decision and you had better be damn sure that's what you want to do - the overhead alone can make it untenable, not to mention running out of stack-depth.

      That's embedded programming. There is no OS, there are no components. There's a chip and your code, and you had better know exactly what each of those things is gonna do under any circumstance. A black-box is the bane of your existance in that circumstance.

      Not all the world is a PC with enormous amounts of memory and MIPS, and knowing how to deal with small systems should be part of any decent CS/SE education.

      Tim

    15. Re:Black Box....yes, but....... by Goth+Biker+Babe · · Score: 1

      Very true. I come from the age of small 8 bit machines where you would consider each instruction for speed/overhead/program size. Do you make something a function or macro it as repeatable code?
      A function requires at least two bytes of RAM for the storage of the program counter and then there's the calling/jumping overhead. Inlining requires ROM for storage of the extra instructions but is quicker and doesn't require the stack space.

      On the other hand very small embedded devices are now being built with more and more powerful systems (100+ MIPs, Mbs memory and an OS). Where developers should have some consideration of the entire system but black box design techniques will work. Black box does encourage reuse.

    16. Re:Black Box....yes, but....... by tjb · · Score: 1

      While the MIPS thing is much less a problem than it used to be, storage space will always be scarce in high-performance embedded applications (like comm. DSPs).

      Upping the clock-rate doesn't cost much, but for high performance, all the memory needs to be on die, and more memory means larger die-size, which means higher cost, which is bad. The chips I work with can do well over a couple BIPs (all engines totalled), but has only 32K of addressable on die memory (of varying word-sizes) and that memory is still around 85% of the total die-area. You could say there's some pressure to reduce the amount of memory we need, or at least keep it under control :)

      Tim

    17. Re:Black Box....yes, but....... by plumby · · Score: 1
      i think what you understand as "black box concept" is better described as encapsulation
      How else would you describe "black box"?


      if two programmer/teams describe between their capsules/"black boxes" without taking the whole system into account you will start having problems

      I disagree. The whole system, in the case of a CPU, includes everything up to the applications that you are running on it. The CPU designer doesn't worry about the design for the UI of your web browser. The actual designer of the CPU internals will be given a set of interfaces which the system designer will work to, and will be given a set of constraints (such as min/max temperature) that he will work within. Somebody will have had a bigger picture, and will have thought about things like how this chip will need to fit together with other components, but they should pass these constraints over as part of the component design.

      the cooler designer have to check if the airflow in the case is big enough to take the heat away

      The cooler designer does not see the case that it's going in to (at least in the componentised PC world). They design the cooler and specify details about the environment that it should work in (e.g., how much space there needs to be around it), and the case builder looks at the specs of this component and then builds the case accordingly. The cooler designer also knows nothing about the internals of the CPU that it's cooling. They have no need to directly know that theres a 64mb cache, or that it's running at 2gh or that it uses super-scaler architecture, or whatever. They care about one particular aspect (or interface) - the temperature behaviour of the chip. When I build my own PCs, I also have no interest in the internals of these components. I am interested in the external behaviour, and how to wire them all up, and the designers of these components had no direct knowledge of the kit (size of box/ type of expansion boards in there etc).

      In a similar way, when my developers are building the "Payments" component of my system, I would provide them with a set of interfaces/methods (e.g., takePayment;listPaymentsFromAccount), specify the external behaviour that I expect from each one (using OCL or similar), and the external environment that they have to run in (the interface to the bank etc), and then expect them to go away and design/build a component that does this and nothing else. I don't want them to worry about what the GUI is going to look like, or whether a credit check needs to be carried out before this payments component is called. The designers of those systems will worry about that. In the same way, the GUI/business process component designers will know that there is a Payments component that, given the correct parameters, will go and apply a payment to the specified card. I don't need them to worry about the fact that the Payments component needs to make three calls to the bank in order to complete its transaction, just that the transaction will be completed within a specified time, otherwise it times out.

    18. Re:Black Box....yes, but....... by plumby · · Score: 1
      At this scale, components are not necessary. Someone should be capable of understanding the entirity of a 1K chip. The point of components is (partly) that most business applications are now absolutely huge, and no one person is capable of knowing the details of every part of the system. If you break this system into discrete parts, and clearly specify what those parts do, then it should be possible for people to be able to become experts in specific components, and for people to become experts in how those components tie together.


      What you are building (I assume) is the internals of a component. Does your embedded chip plug into something? Do the systems using your chip talk through a clearly defined interface, or can they call randomly into any part of it? Do you know the bigger picture (all of the applications that your chip is used in? - you may have, I don't know how task specific your chip is, but I've got friends who design DSPs and, although they probably know every byte of the chip, they don't know the details of some of the systems that they are used in).

    19. Re:Black Box....yes, but....... by Twylite · · Score: 1

      Keeping your head inside a bag will certainly damage most projects - but this is often a question of the level of development in question.

      Software engineering covers everything from requirements down to coding. You can't perform SE in a black box. Too often software development is performed in a business black box: there is no proper interaction with customers to really learn their requirements, what other systems to integrate with, etc. At the opposite end of the spectrum, coding CAN be performed in a black box.

      You see, by the time you've established requirements; architectured, designed and exercised the system; and cast your APIs in store; you no longer need to consider what goes on outside your black box.

      In reality, this is a dangerous practice. Very few development teams are mature enough to thoroughly design an API that doesn't have side-effects, or even to correctly identify the boundaries of a "black box". So most of the time everyone has to be aware of what's going on around them.

      The trick is handling side effects. Modular development says that you don't make account (in your black box) for problems in another box -- unless there is no way to correct that problem (legacy compatibility, operating platform, etc). And when you do make such a fix, you lose a significant amount of modularity for that component.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    20. Re:Black Box....yes, but....... by gbjbaanb · · Score: 1

      Yow, you're gonna have a tough time if you ever work on very large systems.

      for a small system, you need a different attitude to developing which does not work for large scale systems. No-one seems to consider this.

      I agree that education is to teach you things. No student knows what job they're going to get at the end of the course so they'd better be prepared for something other than simple java progrmming ;-)

    21. Re:Black Box....yes, but....... by johnnyb · · Score: 1

      What I'm saying is that the number of boundary conditions for _any_ real-life system are too many to be fully enumerated. Programmers often stop specifying at the logical level, but physical events (such as heat, temperature, radio interference, gravity, etc) actually affect their programs, too. These _usually_ do not come into play on a normal basis, but most people are COMPLETELY ignorant of them, and fail to program accordingly. For example, my grandmother has a WebTV that doesn't work properly if her new wireless phone is plugged in on the same side of the house.

  10. Re:Linux? by Anonymous Coward · · Score: 0

    Ignore Linux. It is going away, after all, IBM has just announced that they're dropping it on itanic: http://www.infoworld.com/article/03/02/10/HNitaniu m_1.html

  11. Sometimes It's Impossible by syntap · · Score: 5, Insightful

    Many times, management is the cause of preventing developers to see the "big picture". Sometimes it's "Here, code this" and you don't get a lot of opportunity to ask the questions you know need to be asked. Sometimes you have to hope resolutions to these types of issues are built into the requirements specification or will be ironed out in quality assurance measures.

    The developer is only one in a group of responsible parties in any given system, and his/her output depends largely in input from others. If a developer is kept "out of the loop" on things (or is lazy and stays out of the loop opn purpose), you're going to see these problems.

    Often it's like blaming clogged fuel injectors _for_ cheap gasoline instead of _on_ it.

    1. Re:Sometimes It's Impossible by Anonvmous+Coward · · Score: 4, Insightful

      "Many times, management is the cause of preventing developers to see the "big picture". Sometimes it's "Here, code this" and you don't get a lot of opportunity to ask the questions you know need to be asked..."

      Don't forget the "make it work by the next trade show" mentality.

    2. Re:Sometimes It's Impossible by Anonymous Coward · · Score: 0

      Gee, you get detailed requirements. I'm in government cotracting and thus far we usually just get at most one page saying "Hey, we need something that does something like this, oh an by the way here's a list of the most asinine tools to use and you may not use anything else"

    3. Re:Sometimes It's Impossible by aziegler · · Score: 2, Informative

      It's not just management. I'm on a contract right now where I've advised that the client do things in particular ways, and the management itself is reasonably amenable to the concept, but the programmer to whom I report is, well, set in her ways.

      Developers should know what the big picture is so that they can have a sense of direction in the development process. They don't need to worry abuot it, perhaps, but they should know what it is nonetheless.

      -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    4. Re:Sometimes It's Impossible by Eusebo · · Score: 1

      And my favorite, "We know the existing system is fundamentally flawed but we don't have {time, resources, know-how} to fix it, so you'll have to work around it."

      --
      It is quite simple
      Haiku should not be funny
      Try a Senryu
    5. Re:Sometimes It's Impossible by syntap · · Score: 1

      Right... I rarely get detailed requirements either. I cringed when I typed it, so added the word "hope": in there because I didn't know how else to put it.

      The original post dealt with embedded systems, which is sometimes different from the frequent ad-hoc "requirements" crap we usually get. And believe me it isn't limited to government.

    6. Re:Sometimes It's Impossible by wwwdsummers · · Score: 2, Funny

      Or even worse, "Uhm, hi. We're at a trade show right now and killer 'feature' Q isn't working in our live demo. Fix. Now."

    7. Re:Sometimes It's Impossible by Fulcrum+of+Evil · · Score: 1

      Or even worse, "Uhm, hi. We're at a trade show right now and killer 'feature' Q isn't working in our live demo. Fix. Now."

      Simple answer to that: "We're two years into this, and the first any of us have heard about it is a story on Slashdot. It will take at least 3 months to implement; I suggest you network at that trade show - you may need a new job".

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    8. Re:Sometimes It's Impossible by LadyLucky · · Score: 2, Insightful

      Anyone else here got massively overworked and stressed while working towards HIMSS? Geeeeeeeeeeeeez. So glad the work for that is over.

      --
      dominionrd.blogspot.com - Restaurants on
  12. The "Big Picture" is TOO big for most people by Entrope · · Score: 5, Insightful

    Keeping the "big picture" in mind is a good thing for managers and designers. For people implementing the finer details, though, it can be a distraction and a poor use of their time. Someone implementing or verifying flow control in a ground-to-space network link does not need to know much about the format of data carried over the link. Someone doing circuit layout or design for a cockpit control widget does not need to worry about reentry dynamics and airflow. Similar examples can be found in any large system design.

    It is the responsibility of the higher level designers and managers to encapsulate the big picture into digestible, approachable chunks. To the extent possible, they should be aware of and codify the assumptions and requirements that cross multiple domains -- when those are documented, it is easier to test the system for correctness or robustness, as well as to diagnose problems.

    When everyone on the project tries to orient their work to what they each perceive as the big picture, you end up with enough different perceptions that people work against each other. Breaking down the system into smaller, more defined, chunks combats that tendency.

    1. Re:The "Big Picture" is TOO big for most people by Anonymous Coward · · Score: 1, Insightful

      With almost 18 years in the field, I agree completely. For example, carpenters, HVAC, electricians, etc. provide "black box" solutions in construction. Good project management ensures that they see enough of the project to interface properly, but they don't design. A good UI is composed of (presumably) well constructed black boxes.

    2. Re:The "Big Picture" is TOO big for most people by MCZapf · · Score: 2, Interesting
      Yes, not everyone is a "big picture" person. I myself am a big picture person, and I've found that it has hampered my ability to be productive at a lower level, such as coding, because I keep worrying about larger issues in the development.

      On the other hand, if you aren't aware of at least some of the big picture, you may end up doing things with consequences that you didn't anticipate.

    3. Re:The "Big Picture" is TOO big for most people by Anonvmous+Coward · · Score: 2, Insightful

      "Someone doing circuit layout or design for a cockpit control widget does not need to worry about reentry dynamics and airflow."

      I think this example is debatable and can possibily be used against you. One could argue that reentry dynamics and airflow could make for a bumpy ride, thus the designers need to be aware of the journey this vessel's going to go on.

      That's besides the point, though. I'm not interested in debating that detail. Instead, I want to offer my insight from observing both poles of this dicussion: having strictly one point of view or the other is bad. If you're overly broad, you over-design software. If you're overly narrow, you design yourself into a corner.

      I'm radically oversimplifying this problem, but it's true. Everybody has their own perspective. A good manager places them where they're useful. My company has a nice mixture of personality types in engineering. They're all placed where they fit best. If we were to polarize all the sudden, I really think the project would collapse.

    4. Re:The "Big Picture" is TOO big for most people by dnoyeb · · Score: 1

      As an automotive systems engineer I am going to disagree with you and all those who say the big picture is not required or that it is a hinderance to know it.

      It is impossible to test 2 ends of a system without knowing the middle. You are eliminating the "interaction equation" and attempting to work in isolation. My model for success is lots of overlap. Not overlap of responsibility, but overlap of knowledge.

    5. Re:The "Big Picture" is TOO big for most people by pmz · · Score: 4, Informative

      When everyone on the project tries to orient their work to what they each perceive as the big picture, you end up with enough different perceptions that people work against each other. Breaking down the system into smaller, more defined, chunks combats that tendency.

      This is why good managers are worth their weight in gold. Bad managers are worse than worthless.

    6. Re:The "Big Picture" is TOO big for most people by Entrope · · Score: 4, Insightful

      One could argue that reentry dynamics and airflow could make for a bumpy ride, thus the designers need to be aware of the journey this vessel's going to go on.

      That actually occurred to me while I was writing my post, and I considered it to be an instance where my second paragraph bears true: if the ride will be bumpy, or flown upside down, or whatever, then those cases should be documented (or at least known) to the designers of the cockpit widgets.

      Yes, you need to avoid both over- and under-design. Yes, you need to know things beyond your piece of the work. But no, you do not need to consider the whole system and all parts of it when you do implementation or even some of the design.

      A good designer knows how far away the interaction horizon should be, and can analyze the effects of everything within that horizon. If the collective effects are too many to analyze, it is a sign that the design needs to be refined or reworked.

    7. Re:The "Big Picture" is TOO big for most people by Anonvmous+Coward · · Score: 1

      " But no, you do not need to consider the whole system and all parts of it when you do implementation or even some of the design."

      I simply don't agree with you. Not because I think you're wrong, but because I do not believe this is an absolute. I don't think this is the type of thing you can establish globally across the board. To put it another way, I think that you're right in some situations, maybe in a majority of them, but not in all of them.

      I believe that every situation is unique and needs to have unique attention paid to it. I don't think there needs to be a rule established here.

      Just to be clear, I'm arguing against 'absolutism', not against what you're saying. I think you make a good point. (I really am blowing what you said out of proportion, heh)

    8. Re:The "Big Picture" is TOO big for most people by GileadGreene · · Score: 4, Insightful
      This is why good managers are worth their weight in gold. Bad managers are worse than worthless.

      No. This is why good systems engineers are worth their weight in gold. Dealing with the big picture, and designing large, complex systems using an engineering approach is why systems engineering came into being in the first place.

      Managers are trained to deal with schedule and budget. Not with designing complex systems. Systems engineers are trained to design complex systems, and to make sure that all the pieces interact in such a way that the overall system acheives whatever goal it was designed for.

      That said, decent systems engineers seem to be somewhat rare these days, or at least they seem to get overruled by management. Many of the well-known engineering blunders in recent years can be chalked up to poor systems engineering.

    9. Re:The "Big Picture" is TOO big for most people by johnnyb · · Score: 1

      Someone doing circuit layout or design for a cockpit control widget does not need to worry about reentry dynamics and airflow.

      ****

      They may - or else they may design something that weighs too much or would require a cockpit that, although handles well in normal aircraft, does not take into account reentry dynamics and airflow.

    10. Re:The "Big Picture" is TOO big for most people by pmz · · Score: 2, Insightful

      Managers are trained to deal with schedule and budget. Not with designing complex systems.

      I agree with what you said; however, schedule/budget managers cannot be ignorant of what good systems engineering requires. Also, the lead engineer on a project is a kind of manager. It isn't uncommon on in a small company or project for the manager and the lead engineer to be the same person, which I guess makes their job even harder.

    11. Re:The "Big Picture" is TOO big for most people by cheese_wallet · · Score: 0, Redundant

      Where I work, we have system's engineers that have the job of keeping the big picture in their head, and making sure the designers of individual components are working in harmony with this big picture.

      Everything we do is very compartmentalized, and there are specific people on each project that make sure everyone is on the same page, that components will indeed work with each other, etc...

    12. Re:The "Big Picture" is TOO big for most people by Anonymous Coward · · Score: 0

      > No. This is why good systems engineers are worth their weight in gold.

      Nope. ERTW style philosophy will only get you through 3rd year... Not in the real world.

      The original poster was correct, this is the manager's responsibility (among others): to facilitate the necessary interactions of systems engineers between portions of the project.

      If the manager can't understand how to do that, either:

      A) The manager is bad (less likely)
      B) The systems engineers can't explain the issues in plain english so the managers can do their job.

    13. Re:The "Big Picture" is TOO big for most people by Anonymous Coward · · Score: 0

      Sometimes we just look at the specs and forget if it is rediculus.

      Take the example of the coffee maker in the B2 bomber. It's usually quoted as a $3000 coffee pot. But it makes coffee under all of the conditions the B2 flys - positive 6 Gs and negative 3 Gs(I think). Like trhe pilots are going to be drinking coffee during a tight outside loop.

    14. Re:The "Big Picture" is TOO big for most people by GileadGreene · · Score: 1
      The original poster was correct, this is the manager's responsibility (among others): to facilitate the necessary interactions of systems engineers between portions of the project.

      Perhaps you don't understand what a systems engineer actually is. I'm not talking about an MCSE, or some other silly certification. A systems engineer is, fundamentally, the technical person who takes responsibility for delivering a particular product (the system) with a specified performance.

      As another poster correctly pointed out, that task is often conflated with management on smaller projects. But on a truly large, complex system (e.g. the space shuttle) the systems engineer has ultimate responsibility for the technical performance of the product, leads the design team, and facilitates the necessary interactions between everyone else (including between other systems engineers who are operating at lower levels of abstraction). The manager is there to manage, i.e. to perform all the administrative BS, handle the budget, track the schedule, etc. etc. In a good design team there will be close interaction between the systems engineer and the manager - their jobs are not independent - but those tasks require different skillsets. Many of the problems with recent large systems have been a result of managers thinking that, either:

      A) It's ok to overrule the systems engineer, rather than achieving consensus on a compromise between technical and budget/schedule performance

      B) There's no need for a "systems engineer" at all - either the manager thinks they can do it themselves, or doesn't even realize that it should be done

  13. IMHO by Em+Emalb · · Score: 5, Funny

    People tend to focus exclusively on their area of expertise.

    Otherwise they become managers :D

    --
    Sent from your iPad.
    1. Re:IMHO by hendridm · · Score: 5, Funny

      > Otherwise they become managers :D

      At my last job you were allowed to make 3 major mistakes, then they made you a manager.

    2. Re:IMHO by GileadGreene · · Score: 2, Insightful
      People tend to focus exclusively on their area of expertise.
      Otherwise they become managers :D

      Or systems engineers...

    3. Re:IMHO by aaza · · Score: 1
      Otherwise they become managers :D

      Ahh... the old promote them out of harm's way dealing problems.

      Surprisingly, this seems to work - look at many Dilbert cartoons (dilbert.com), most of which are based on true stories sent to the author.

      --
      In theory there is no difference between theory and practice.
      In practice, however, there is.
  14. What does that have to do with UI design? by 192939495969798999 · · Score: 2, Insightful

    If i write a component that takes in X1 and outputs X2, isn't it the designer's job to make it look pretty? I mean, supposedly they were the ones that came up with needing the component in the first place, to accomplish some function or other, and thus make the user happy.

    --
    stuff |
    1. Re:What does that have to do with UI design? by SoupIsGoodFood_42 · · Score: 1
      If i write a component that takes in X1 and outputs X2, isn't it the designer's job to make it look pretty? I mean, supposedly they were the ones that came up with needing the component in the first place, to accomplish some function or other, and thus make the user happy.

      I think your post shows exactly what the author is talking about.

      Lets say that X3 is the best output for this case. But the designer never even though of that. But you did, but didn't impliment it because were told that X2 needs to be output.
      If you knew the bigger picture, you might have realized that X3 was the best solution here, and could have taked to the designer about it.

  15. Abstraction is necessary! by Dr.+Manhattan · · Score: 5, Insightful
    Being able to abstract chunks of a program or system out and not worry about implementation is utterly vital. No human, however gifted, is capable of understanding the entirety of more than a trivial system at once.

    Now, the amount of abstraction possible does differ depending on what you're doing. Embedded systems programming is hard, and you do have to know details of the machine. But I ask you - do you insist on a gate-level understanding of the embedded CPU, or will you settle for knowing the opcodes and their timing characteristics?

    Because, in embedded programming, you need to know more about the device, it's proportionately harder to do. That's one reason, apart from power and cost considerations, that embedded systems tend to be simple - the simpler the system, the easier it is to think about, to prove correctness or to at least enumerate possible pathways and handle them.

    But even in that case, you need to be able to ignore some implementation issues or you can't do it at all.

    --
    PHEM - party like it's 1997-2003!
    1. Re:Abstraction is necessary! by dboyles · · Score: 4, Insightful

      I agree, and would like to add my thoughts.

      One of the most likeable things about programming is that on a low enough level, it's always predictable. This kind of goes hand-in-hand with the fact that computers don't make mistakes, humans do. As a programmer, it's very comforting (for lack of a better word) to have a chunk of code and know that, given X input, you'll get Y output. You can write a subroutine, document it well, and come back to it later, knowing how it will behave. Of course, other programmers can do the same with your code, without having to have intricate knowledge of how the code goes about returning the output.

      But of course, there's a catch. It's probable that the programmer who wrote the subroutine initially didn't envision some special case, and therefore didn't write the code to handle it. If everybody is lucky, the program will hiccup and the second programmer will see the problem. The worse situation is when the error is seemingly minor, and goes unnoticed: when that floating point number gets converted to an integer and nobody notices.

      I know this isn't some groundbreaking new look on abstraction in code, but it is pretty interesting to think about.

      --
      -- "Complacency is a far more dangerous attitude than outrage." -Naomi Littlebear
    2. Re:Abstraction is necessary! by phuturephunk · · Score: 1

      No human, however gifted, is capable of understanding the entirety of more than a trivial system at once.

      That's not entirely true. Right brained people can, thing is.. Alot of right brained people have a hard time learning programming.. Its the way its taught, or so I've experienced . .

    3. Re:Abstraction is necessary! by Jack+William+Bell · · Score: 1

      I agree. There is nothing inherently wrong with seeing applications, or even components, as black boxes. And those working to develop business or shrink-wrap applications are in an entirely different problem domain than embedded system programmers anyway. The difference in the complexity of the OS alone is enough to require several levels of abstraction.

      The problems arising from a lack of of a wholistic view are real as stated by the article, but they are not something we can easily work around. What we need is a better way of working with the black boxes such that, although we don't have time to learn what is in them, we can see how they fit together.

      --
      - -
      Are you an SF Fan? Are you a Tru-Fan?
    4. Re:Abstraction is necessary! by Entrope · · Score: 2, Insightful

      That's not entirely true. Right brained people can, thing is..


      Being right-brained does not magically grant someone the ability to keep ten thousand things in their head at once. At best, it allows one the ability to easily defocus on things that are not important for what they do want to focus on -- in other words, to think abstractly. :)


      The hard part of being a really good programmer is not learning how to do job X, Y or Z. The hard part is learning where to draw the interfaces, where you should use existing abstractions, and where you need to extend them or create new abstractions. This is true at most layers of design -- like Dr. Manhattan said, you can find abstraction layers and idealized interfaces at many different places in a complex (especially a computerized) system.

    5. Re:Abstraction is necessary! by jforr · · Score: 1
      The worse situation is when the error is seemingly minor, and goes unnoticed: when that floating point number gets converted to an integer and nobody notices.
      Or when your floating point number is off by a decimal or two and your bank account grows by too much and gets noticed. Just hope you get lucky and the place burns down before someone sees the problem.
    6. Re:Abstraction is necessary! by aziegler · · Score: 1

      Yes, abstraction is necessary. That still doesn't mean that you can't have an abstracted view of the big picture. The impression I got from the story was that a lot of people are being told to code something without any concept of the big picture itself. When developers develop too much code in isolation, there tend to be mismatches, no matter how good the designer and the design team are.

      -austin

      --
      Ni bhionn an rath achx mar a mbionn an smacht (There is no Luck without Discipline)
    7. Re:Abstraction is necessary! by dnoyeb · · Score: 1

      " Being able to abstract chunks of a program or system out and not worry about implementation is utterly vital. No human, however gifted, is capable of understanding the entirety of more than a trivial system at once."

      Uhh, and John Carmack does not understand every ounce of the quake code. And Linus torvalds does not understand every ounce of the Linux core.

      I have to disagree, or rather ammend your statement.

      No human, however gifted, is capable of understanding the entirety of more than a trivial system at once, _in a timely fashion_.

    8. Re:Abstraction is necessary! by Anonymous Coward · · Score: 0

      holistic, holistic, holistic, come on now say it with me.... HOLISTIC

    9. Re:Abstraction is necessary! by Dr.+Manhattan · · Score: 2, Insightful
      Uhh, and John Carmack does not understand every ounce of the quake code. And Linus torvalds does not understand every ounce of the Linux core.

      No, they don't. Those codebases are split into well-defined modules, and they are able to understand how those modules fit together. And they can look inside one of those modules and know how it's put together. That's why you have a core engine that can have software, Glide, and OpenGL renderers; or a filesystem core that can work with ext2, ext3, reiserFS, XFS, etc.

      But neither of even these prodigiously talented gentlemen can visualize the entire state of their respective systems. Else why would you have, e.g., the Quake physics bugs or any number of kernel bugs? Their horizons may be quite a bit broader than average but they are still limited.

      --
      PHEM - party like it's 1997-2003!
    10. Re:Abstraction is necessary! by poot_rootbeer · · Score: 1

      This kind of goes hand-in-hand with the fact that computers don't make mistakes, humans do.

      This is not true. Hardware fails sometimes, through no fault of humans.

    11. Re:Abstraction is necessary! by Anonymous Coward · · Score: 0

      Hardware fails sometimes, through no fault of humans.

      Ahh, but who designed and manufactured the hardware?

    12. Re:Abstraction is necessary! by Anonymous Coward · · Score: 0

      Ha ha ha. You evidently have not looked at the Quake code. If you read it and still think it's modular then you are probably a better programmer than Carmack.

    13. Re:Abstraction is necessary! by ltkije · · Score: 2, Insightful
      Now, the amount of abstraction possible does differ depending on what you're doing. Embedded systems programming is hard, and you do have to know details of the machine. But I ask you - do you insist on a gate-level understanding of the embedded CPU, or will you settle for knowing the opcodes and their timing characteristics?

      I work on embedded products. A typical design has about 30,000 lines of C code, but the amount of assembly language is 1% of that and dropping. So there is little need for most of the programmers on a team to know something as concrete as assembly.

      Our code runs on 16-bit single-chip microcontrollers rated at about 5 MIPS. The chips are typical of what $5 buys today. The application, which Slashdot readers would recognize instantly, has soft real-time requirements. We could probably run most everything on 20 ms timer ticks and get good responsiveness. There are plenty of spare CPU cycles even at peak loading. Yet there are people in my company who want to read the assembly code generated by our ANSI-standard C compiler, and turn off all the compiler optimizations. Some still insist on writing their own memset() functions.

      Contrast this with the fact that it takes us 18 months to develop each new product. The 2003 version is about 80% the same as the 2001 version, about 20% of the code handles product differences from the older version, and there's maybe 5% new code for new features. What's wrong with this picture?

      One obvious answer is simple: we're probably using the wrong level of abstraction, or just the wrong abstractions, in our design. We'd do much better to:

      Abstract away hardware specifics wherever possible.

      Trade off a little performance for shorter project schedules.

      Profit!

      This is not to say we should never open the black box -- just that we should be smart about when to dig deeply into the underlying hardware and CPU cycles. And being able to debug with an oscilliscope is still sometimes a valuable talent. As others have said here, the art of engineering lies in knowing when to do these things.

      Successful black-box design can produce amazing results. For instance, look at Pure-Systems, whose initial product generates an optimized embedded kernel, written in C++, that's small enough to run on an Atmel AVR chip.

  16. Re:Non sequitor. by Bendebecker · · Score: 1

    Exactly. With a simple hardware system, you can afford to think of the underlying hardware while writing the software. However, try writing software with the hardware in mind when the hardware is the shuttle. The 'black box' mentality is important because you can easily get completely overwhelmed by trying to think of how every little piece of hardware fits into your software design. The hardware should work and not be concern. Instead of worrying about what the hardware will do if your software crashes spend that time making sure your programs are stable and won't crash.

    --
    There's a growing sense that even if The Future comes,
    most of us won't be able to afford it.
    -- Lemmy
  17. Not the theories themselves.... by keyslammer · · Score: 5, Insightful

    ... but the lack of experience.

    Programmers have to consider subsystems as abstractions: there's a limit to how many things the brain can deal with at one time. We know that this kind of thinking produces cleaner designs which are less susceptible to bugs and security holes.

    Knowing the limitations of the "black box" and what will break the abstraction is the product of lots and lots of experience. I don't believe there's any way to teach this - it's something that you just have to live through.

    That's why senior level developers can continue to justify their existence (and higher price tags)!

  18. When I was programming the temperature control ... by burgburgburg · · Score: 3, Funny

    on the new Death Star, I found that trying to envision the "Big Picture" interfered with the specific requirements of my task. I needed control mechanisms smart enough to deal with Storm Trooper suits, regular Empire uniforms, robots with various temperature ranges, Wookies. It needed to be able to maintain a comfortable temperature range in the beam tunnel vicinity even during firing. And it needed to be efficient enough that they wouldn't shift power from the exhaust port shields to the jacuzzi heaters like they did on the old Death Star.

  19. Experience by wackysootroom · · Score: 4, Insightful

    The only thing that school prepares you for is to get an entry level job where you can gain the experience to write reliable software.

    School will get you up to speed on new terms and concepts, but the only thing that will make you better at writing good code is to read good code, write your own code and compare it to the good code, notice the difference, and adjust your approach until your code is "good".

    1. Re:Experience by Havokmon · · Score: 1
      The only thing that school prepares you for is to get an entry level job where you can gain the experience to write reliable software.

      School will get you up to speed on new terms and concepts, but the only thing that will make you better at writing good code is to read good code, write your own code and compare it to the good code, notice the difference, and adjust your approach until your code is "good".

      I agree entirely, and will actually take it a step further:
      Question the 'facts' you were taught. They may appear to be correct, but you may not only learn something new by examining why the 'fact' is as it is, but you may find a better way.

      Of course, take that with a grain of salt. I don't believe the speed of light can't be exceeded. Not that I can prove anything, I just don't like having someone tell me I can't do something :)

      --
      "I can't give you a brain, so I'll give you a diploma" - The Great Oz (blatently stolen sig)
    2. Re:Experience by Anonymous Coward · · Score: 2, Insightful

      So then how does better code get developed if everyone is merely attempting to match their coding style to the "good" style they see?

      *Someone* had to provide that good code in the first place.

    3. Re:Experience by Anonymous Coward · · Score: 0

      So in otherwords, the best way to learn good code is to be graded?

    4. Re:Experience by Oink.NET · · Score: 5, Insightful
      the only thing that will make you better at writing good code is to read good code

      Because code is the most direct way to communicate wisdom between geeks? I would submit that unless you get the analysis and design right, your approach to writing good code just teaches you how to make a more polished turd.

      As far as getting better at the mechanics of coding, I would suggest reading Steve McConnell's Code Complete.

    5. Re:Experience by mrtroy · · Score: 1

      most of these posts are saying schools arent doing the right thing or preparing them the right way...CHANGE SCHOOLS!
      my school provides the experience/concepts/practical use/etc
      i thank you in giving me motivation to work hard and finish here...so i can hire and fire you guys!

      --
      [I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
    6. Re:Experience by Grab · · Score: 1

      The best way of getting to write good code is to get it reviewed by someone who *is* good. You for damn sure learn what's wrong with your coding then! Otherwise it's too tempting to just dismiss some of the issues as "this is my style" without realising/admitting that the issue is a problem.

      Grab.

    7. Re:Experience by Surreal_Streaker · · Score: 2, Funny
      The only thing that school prepares you for is to get an entry level job where you can gain the experience to write reliable software.

      -1 Pandering.

    8. Re:Experience by pmz · · Score: 2, Interesting

      Because code is the most direct way to communicate wisdom between geeks?

      Not really. I've gained much more by reading books like The Mythical Man Month and good object-oriented analysis and data modeling books. Managing complexity through good data modeling is the most important (and hardest) part of a program to get right.

      The worst applications I've had to work with were designed piece-meal by a high-turnover team of inexperience people (read: really ugly data that resulted in nasty bloated unmaintainable code).

    9. Re:Experience by MellowTigger · · Score: 1

      Because code is the most direct way to communicate wisdom between geeks?

      Yes.

      Consider the parallel example of the American legal system. Legislators (system designers) craft highly detailed specifications (laws) in English (English, you insist?!) resulting in bills ("spec" documents) that neither citizens (end users) nor law enforcers (programmers) are familiar with as their primary language, requiring a whole new creature, the lawyer, to interpret for both of them.

      If I were crafting a parallel system in Cobol (created so that business users could understand it as well as technical users, unlike English) as my specification but using Java as my implementation, and I was expecting both of them to agree with each other 100% of the time, then it would obviously be an insane duplication of effort. But when we craft the parallel system in English and then call it documentation, suddenly it's a proper and helpful effort. Similarly, why would I want to use a Spanish translation of an outline in order to draft an English novel? Isn't it vastly more efficient to craft both drafts and final product in the same language?

      Improvements in the recognition of errors (by both programmers and end users while working in the familiar landscape of actual screens/reports) offsets the supposed improvements of reliability espoused by management schools. If you want plain English translations of source code for middle management that has no familiarity with a system like users and programmers do, then write a utility to extract the translations automatically (javadoc, anyone?) just for them.

      Yes, looking at prior "good art" is the best way to learn good programming. Relying on documentation and other minutiae (especially when you know that it's wrong), amounts to professional negligence. All of the best-functioning systems that I have seen were all created by programmers working directly with end users, preparing sample reports and screens together, recording minimal documentation outside of the system itself. "Why" is a question typically absent from source code, so it should be recorded elsewhere, but "how", "when", and "what" are detailed explicitly in source code and should not be duplicated.

    10. Re:Experience by DozePih · · Score: 1

      I agree. What I've also found out is that the programming language can help you a lot with the task of writing reliable software. If you haven't looked at Erlang yet, please do.

    11. Re:Experience by fishbowl · · Score: 1

      >CHANGE SCHOOLS!

      Let's see... You're at a university. You have $5000 invested in books and tuition for this semester. If you manage to keep your grades above 2.0, you'll be allowed to borrow another $10k for the upcoming year. Half of that will be for rent, the other half for the next semester's tuition, and you don't actually know how you're going to pay for food or the following semester's tuition.

      To CHANGE SCHOOLS! as you put it, would mean applying and being accepted at another institution; if it is not in the same state you will either need 3-5 times as much money or else will have a 1-2 year waiting period where you can't be going to school, in order to meet residency requirements. And you might be starting over in some parts of your degree plan when you get there.

      You make it sound so simple to change schools once you've started at a university. It's probably simple enough if you're rich.

      --
      -fb Everything not expressly forbidden is now mandatory.
  20. From a programming point of view, it depends. by Dthoma · · Score: 3, Interesting

    Programming classes may encourage a 'black box' approach to programming, depending on what language you use. The reason for this is that it all relies on how high-level the language is; if you're using PHP then chances are you won't be worrying nearly as much about the hardware of your system than if you're using C, assembler, or machine code.

    --

    Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".

  21. We don't need anymore black boxes by jj_johny · · Score: 4, Interesting
    I think that the programmer who thinks of things in a black box mentality is usually going to be involved in failed program. I have run into so many programmers who know nothing of the many parts that their program touches. They seem to believe that their software does not work within a wider system and a wider world.

    The problem with these programmers is that they rarely understand what can and does go wrong with the outside world. It is always amazing to me that there are people out there that assume that everyone has a 100BaseT Ethernet hub between the front end and the back end or other stupid assumptions.

    The issue that crops up most when programmers think in black box terms is that today's software is not spec'd out enough so that the end user does not get what they wanted but the programmer did not solve it by asking. Too often the problem is very fuzzy and thus the programmer is there to help clarify not just implement.

    Without a well rounded programmer looking at the overall system (or his/her boss), you will wind up with chatty, buggy applications that was what the user asked for but not what they needed.

    1. Re:We don't need anymore black boxes by duffbeer703 · · Score: 1

      The thinking about the underlying system should have been done already. Somebody figures out how a system should behave, and you code around those parameters.

      That thinking should be done by the admins of the system. Any dope who puts a network intensive app on a 10Mb LAN when the app needs more bandwidth or a switched network gets what he deserves.

      When new airplanes are developed, test pilots push the aircraft to it's outer limits. The flight manual for an airplane is based upon the testing experience.

      Keeping "the big picture" in focus means that you don't really care how a motor lowers landing gear... you just care that the landing gear is down when you land.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    2. Re:We don't need anymore black boxes by sconeu · · Score: 2, Interesting

      It is always amazing to me that there are people out there that assume that everyone has a 100BaseT Ethernet hub between the front end and the back end or other stupid assumptions.

      Actually, I've found myself doing the reverse several times. For many years, I worked in what I guess would be semi-embedded systems. We did special purpose computers for the military. The thing was, we had our own RTE, and I got into the habit of coding for that, and assuming that the target environment essentially had nothing.

      Now that I'm coding for standard OSen (Linux), I find it hard to get used to the concept that it's already there, I don't have to roll my own.

      Don't get me wrong, I believe in reuse. I think it's wonderful to have the tools. It's just difficult to "rewire" myself after 15 years of a particular mindset (but I'm working at it!).

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    3. Re:We don't need anymore black boxes by (trb001) · · Score: 2, Interesting

      Without a well rounded programmer looking at the overall system (or his/her boss)

      This is what the lead programmer/designer or the PM is for. Depending on the project, you should have 1 of these for each section of the project. If the project is sufficiently large, have 1 LP for each sub-section and have them report to a primary LP. The primary should know how all the subs interface and the subs should know how every component under them interfaces together. There are few projects that I've ever seen that required more than a few LPs (and I've worked on projects with 250+ developers) because they worked in a multi-tiered environment...each LP knew their own section.

      Individual programmers need to look at things as a black box, it will make them much more efficient. Granted, you need to have sufficient requirements for them to do this effectively (very, very few projects have these). Ideally, programmers shouldn't even be hired until at least the first draft of requirements are out. The LP should be God before that, dictating what's doable, feasible and what makes sense from a technical perspective. He then needs to hire on programmers that can produce what he's envisioned. It amazes me the number of programs that staff up before requirements are out...how can you effectively staff up if you don't know what your staff is going to be doing? That's why sub-contractors are important, they can be staffed up anytime and (should!) have domain knowledge on what you're doing.

      --trb

    4. Re:We don't need anymore black boxes by Arandir · · Score: 2, Insightful

      I'm programming on a very complex system. I simply cannot know about all the parts that my code touches. I would need three engineering degrees just to understand it all. I have to program in a black box because the white box is too big.

      This is why I demand complete requirements and specifications, and invite all relevant parties to my design and code reviews. And when I'm the one called on to write the reqs and specs, I make sure I get a sign off absolving me of responsibility for it (you would be surprised how much closer the docs are inspected when you start demanding stuff like that).

      The problem isn't the developers writing black boxes, but the upper management buying into the party line of Microsoft, thinking that snap-together black box components will reduce the resource needs for the project.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    5. Re:We don't need anymore black boxes by SilentStrike · · Score: 1

      I think that the programmer who thinks of things in a black box mentality is usually going to be involved in failed program. Can you clarify what is a "failed program?" Have you written nothing but 100% solid code for your entire career?

  22. Abstractions by Anonymous Coward · · Score: 0
    You have to deal with abstractions when you program. You can never get the "whole picture", because there's no place to stop. It's turtles all the way down. For most programming, I don't worry about the existance of memory as a large array, even though that's just an abstraction for transisters, etc. It's fun to program close to the hardware, but it's often not worth the extra effort.

    There was a great Slashdot article/discussion on leaky abstractions. Search and you will find.

  23. University vs. real world by denladeside · · Score: 1

    The usual problem applies here. While the world evolves... university professors teaching material usually doesn't.

    --
    ...what e-mail program should I use?...let me consult my magic 8ball! *slosh slosh* hmmm... "outlook not so good"
  24. bah by Anonymous Coward · · Score: 1, Interesting

    We need new paradigms, and more best-processes. We need a design for system mentality and a design for integration production engine.

    Or just realize that spaceflight is risky, and it's not always the great unknown that will bring us down.

    I'm not advocating carelessness, just to point out that these space machines we build tend to last 15 years between failure and are so complicated it makes the MS Windows operating system look like Linkin Logs. REAL engineers built that sucker, and they aren't infallible, but they are thorough.

    I'd bet my life on their processes any day.

    1. Re:bah by Anonymous Coward · · Score: 0

      Except for the day the Challenger went boom, or the day Columbia went boom, or the day the baby made boom-boom...

  25. That's the difference between CS and CE. by Anonymous Coward · · Score: 4, Insightful

    Computer science professors and courses are more concerned with the methods, ideas, and logic of computer programming and design. The idea is to create a totally abstract system, hardware or software, that can then be implemented on any system. This is the purpose of "black box" programming.

    While I agree with you that programmers should understand the hardware they are writing for, any knowledge of that hardware is biasing their creation of a system to run on that hardware and further removing itself from computer science's notion of total abstraction.

  26. UI issues: left hand/right hand by Illserve · · Score: 5, Insightful

    I recently installed the recent version of the accursed RealOne player to watch an rm file. I hate Real player more than can be described by words and it just seems to be getting worse.

    So I pop it up to view the file, and what happens? I get the movie playing in a window on top of the Real advertising/browser thing. It spontaneously pops up a "help" balloon giving me a tip for how to use the browser window. The balloon is sitting RIGHT ON TOP OF THE GODDAMNED MOVIE IMAGE. It goes away after a few seconds of frantic clicking, but the point is clear, these programs are often a monstrous brew, created by too many chefs. They just throw in features, and there doesn't seem to be someone sitting at the top, deciding whether these features actually contribute to improving the final product, or just make it worse.

    Then there's Office, which, by default will turn 2-21-95 into 2/21/95. ????? I have to dig through numerous help pages to figure out what subpanel of the preferences menu will deactivate this. Worse, I enter 23 hello on a new line in Word, and hit enter, it auto indents, adds a 24 and positions the cursor after. !?!?!!?!?!?!?!!?
    How many times I've had to fight this particular feature I can't tell you.

    And it's certainly not just a closed source thing either, if anything, some open source GUI packages are even worse. Although, to be fair, I don't expect as much from open source stuff, because noone's getting paid. But when a program created by paid programmers is just badly done, I get infuriated at the incompetence, at the hours wasted taking a usable product and making it actually worse by throwing in garbage features.

    It's been said a million times, but if we made cars the way we make software, noone would get anywhere.

    1. Re:UI issues: left hand/right hand by Politburo · · Score: 1

      In the newest version of Word, they finally attempted to fix the AutoCorrect 'feature'. Now whenever something is AutoCorrected, a little indicator is put on the text, and you can right click and tell it to roll back the change (1-time or never change it again) without having to dig into the menus. It took them a few times, but they're starting to get the hang of balancing features with usability.

    2. Re:UI issues: left hand/right hand by FroMan · · Score: 1

      Then there's Office, which, by default will turn 2-21-95 into 2/21/95. ????? I have to dig through numerous help pages to figure out what subpanel of the preferences menu will deactivate this. Worse, I enter 23 hello on a new line in Word, and hit enter, it auto indents, adds a 24 and positions the cursor after. !?!?!!?!?!?!?!!? How many times I've had to fight this particular feature I can't tell you.

      Oh, that's easy. Word processors and office products are evil in general. If the world had a freaking clue, they'd know that nano or vi are all the world really needs for word processing. And don't even get me started in so-called programming ides. If there was ever a tool created by satanic haters of productivity, programming ides are it. I'm sure God is saving an especially hot coal for office product writers and programming ide makers. All of borland and corel and microsoft (other issues besides just office and visual studio here too), even kdevelop, openoffice, and all the others in kahoots with the demons of so-called assistants and wizards and productivity will be in their own little hell, hopefulyl having to use their evil products. That's serve them right!

      --
      Norris/Palin 2012
      Fact: We deserve leaders who can kick your ass and field dress your carcass.
    3. Re:UI issues: left hand/right hand by syle · · Score: 1
      The balloon is sitting RIGHT ON TOP OF THE GODDAMNED MOVIE IMAGE. It goes away after a few seconds of frantic clicking...

      Good job. As we all know, clicking frantically is the correct way to solve every problem. If that doesn't work, try rebooting, or possibly kicking your computer. Remember to take our cup out of the built-in cup holder first.

      Worse, I enter 23 hello on a new line in Word, and hit enter, it auto indents, adds a 24 and positions the cursor after. !?!?!!?!?!?!?!!?

      Whoops! You kicked your keyboard and broke the punctuation keys instead. The computer is that big beige thing on the floor. No, not the foot pedal. To the left. There you go.

      By the way, why were you writing "23 hello" in your document?

      --

      /syle

    4. Re:UI issues: left hand/right hand by Anonymous Coward · · Score: 1, Insightful

      It's been said a million times, but if we made cars the way we make software, noone would get anywhere.

      That's *such* bullshit. A car is *simple* compared to a software product, and yet it still manages to fail in a great many ways.

      Most damning, cars are unsafe: pull the wheel at the wrong time and you may get killed. And even when standing still another car may drive into yours (where is memory protection when you need it?). Software won't (generally speaking) attempt to kill you.

      Cars need significant maintenance: tires need inflating, endless gas must be bought, and don't even begin about garage maintenance by overpaid incompetent monkeys with a bad attitude. By comparison, software is considered high-maintenance when you need to download a maintenance pack twice a year.

      And cars are extremely inflexible: they can only be controlled from within the car, by a single operator. The usage of the car is locked in the factory, you cannot for example add a few more doors or loading space after you bought it. Noone would accept this of software.

      So what the hell are you comparing crappy cars to software for? It just doesn't make any sense.

    5. Re:UI issues: left hand/right hand by Illserve · · Score: 1

      Why I was typing "23 hello" into my document is my business, not Word's.

    6. Re:UI issues: left hand/right hand by Anonymous Coward · · Score: 0
      Worse, I enter 23 hello on a new line in Word, and hit enter, it auto indents, adds a 24 and positions the cursor after. !?!?!!?!?!?!?!!?

      Auto-increment is a common feature in many BASIC interpretors. Kind of surprised that it's still there, I thought most BASIC variants today worked without line numbers now... As to why 2-21-95 is turned to 2/21/95, I don't understand. That is just plain wrong - it obviously should be -114!

    7. Re:UI issues: left hand/right hand by Illserve · · Score: 1

      Word is a Word processor, not a programming environment.

      It's done because Word thinks you're making a list and intrusively tries to help you without being asked.

    8. Re:UI issues: left hand/right hand by Lodragandraoidh · · Score: 1

      Been to any Nuclear Power Plants, or Chemical plants, etc...?

      Software that crashes can kill.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    9. Re:UI issues: left hand/right hand by pjp6259 · · Score: 1

      Any of these "friendly" features of Word can be undone by hitting ctrl-z (undo). This can still be a pain if you are writing something where this happens a lot, but in most cases this is enough to get the job done, and you don't need to go searching in the menus to figure out how to turn it off, or modify the behavior.

      --
      Computers don't make mistakes. What they do, they do on purpose.
  27. what a fantastic idea! by SweetAndSourJesus · · Score: 0, Troll

    I think I'm going to roll up Asshat Linux 0.1 today. It will be the exact same thing as gentoo, but the fortune database will be nothing but slashdot posts and RMS quotes.

    --

    --
    the strongest word is still the word "free"
    1. Re:what a fantastic idea! by Anonymous Coward · · Score: 0

      >> the strongest word is still the word "free"

      Pity you Yanks have completely lost the concept of what that really means.

  28. The problem isn't black boxes it's grey edges by joe_fish · · Score: 1

    I've worked on large systems where I've had a lot to do with many parts of the system, and not been able to hold the whole thing in my head all at the same time.

    And as a someone that's had a lot to do with the building of these systems I have a better chance than most. New programmers would have no chance. We need black box systems to enable us to continue working.

    The Real problem is that the black boxes we define don't have nice sharp edges, so when we put 2 boxes next to each other there are cracks. Cracks for the crackers to crawl through.
    Joel Spolsky wrote about it and called it The Law of Leaky Abstractions

  29. Re:Linux? by OppressiveGiant · · Score: 1

    why not enclose that link in tags . Not that it really matters since its a dead link anyways.

    --
    i could not think of anything clever.
  30. Bad security? by Anonymous Coward · · Score: 1, Funny

    You need to give your black box objects a coat of super-black paint... security by invisibility...

  31. Re:Probably (levels) by $$$$$exyGal · · Score: 3, Interesting
    Programming Levels:
    1. Microsoft Frontpage
    2. Raw HTML
    3. CGI/PHP/etc.
    4. Servlets/Mod-perl/etc.
    5. Object-Oriented black boxes
    6. Documented API's
    7. Public Documented API's
    8. Performance
    9. "The Big Picture" - Architects

    --sex

    --
    Very popular slashdot journal for adul
  32. Of course by Scarblac · · Score: 5, Insightful

    It is essential that every programmer in a big system only thinks about his own problem, and uses the other parts as a black box.

    Say I want to use some library. Then it has a documented API, which explains how I can use it. I don't need to know more. For me as a programmer, that means:

    • Simplicity - it is a limit on what I need to understand.
    • Compatibility - if a new version comes out, which changes implementation details but leaves the API intact, programs that don't make assumptions about these details won't break.
    • Portability - if there is a new implementation of the same API by another vendor, I can (theoretically) just change to that implementation and nothing changes.

    I'm certain that without these black boxes, no big software engineering project would be possible. The human mind can't keep track of everything in a whole system at once (except for some simple cases - like embedded systems, perhaps).

    It is done sometimes - I believe perl looks inside a file struct when reading/writing files on some platforms to get faster I/O than standard C, for example. But that's only as an optimization after coding the general case, and even then I don't believe it's a good idea.

    For hardware, the story is much the same. Any speedups specific for the hardware are optimizations, and they should only be looked at when the program works, after profiling, when there's a speed problem, and the algorithm can't be improved.

    Remember the rules of optimization: 1) Don't do it. 2) (for experts only) Don't do it yet.

    Black boxes in software engineering are your friend.

    --
    I believe posters are recognized by their sig. So I made one.
    1. Re:Of course by MisterMook · · Score: 1

      The solution of course is to phase out humanity, as we're obviously incapable of anything. Human minds are pathetic and weak, accept no progress done by the loser monkeys that are we.

    2. Re:Of course by spditner · · Score: 1

      I think we're mistaking what the black box concept is trying to stop us from doing -- tampering, and violating the design contract.

      I would say that the glass box is a better metaphor. Though a well documented module would make it mostly unnecessary to see inside it as it's operation should be documented so that you would know how to use it. You can see in the box, but may only manipulate it through the public interface.

    3. Re:Of course by quintessent · · Score: 1
      Black boxes in software engineering are your friend.

      I completely agree, although there are a couple of pitfalls to watch out for:
      1. I am limited by the code I write on top of. If it has weaknesses, then my code most certainly will also.
      2. I am limited by my understanding of what is underneath. Is the library software sufficiently and accurately documented? Do I sufficiently understand the documentation. Slashdot featured an article on "leaky abstractions" that was quite informative. Do I properly handle not just the standard cases, but exceptions and unusual cases?
    4. Re:Of course by _xeno_ · · Score: 3, Interesting
      Block boxes can be your friend - but there are issues with them from time to time. One of the most annoying things I never knew about Java is because of the black box that is the java.lang.String class. It turns out that String.substring(...) creates a new String object that keeps a reference to the entire original sequence of characters that made up the original String object. In other words, if I had a 1024-character long string, and wanted only 5 characters from it, I would end up with a String object that presented through its black box just those 5 characters but maintained internally all 1024 characters.

      There's a way around it. Doing new String(string.substring(0,5)) allocates a new String that only contains the five required characters. But the documentation for the black box warns against doing that: "Unless an explicit copy of [the original string] is needed, use of this constructor is unnecessary since Strings are immutable."

      Well, yes, they are - but using the constructor can also be required to get around the fact that the entire array of original characters is maintained.

      As it turns out, this is a "speed hack" (ie, only one array of characters is maintained at any given time - a new array for the substring is not allocated, and the original is used). However, this implementation assumes that everyone using the black box is also going to need the parent string or is going to dereference both full string and substring (and hence allow to be gced) at about the same time, preventing memory and time from being wasted on the substring.

      Unfortunately, I had written a program that read in a list of strings, keeping certain substrings and throwing out the rest - or so I thought. (Think "comments" in the text file - they would removed, the remaining characters would be kept.) This meant I was wasting quite a bit of space by the end of the run due to characters that were no longer accessible being kept around indefinately since the "substring" objects kept a reference to the array of characters for the full string. Fixing it requires doing the new String(string) thing, which as it turns out does allocate a new buffer and is there expressly for that purpose (if you read the source code).

      My point is this - black boxes can be dangerous. A black box is a very useful abstraction - assuming that important details about implementation side effects are documented. In the given example, the Java developers implement an algorithm that is useful in many cases - but there are those cases where it would be useful not to use such an implementation.

      I think that the idea of "black boxes" are important, but that a developer also has to be aware that something happens in the black box and be prepared to learn about it if the need arises. Likewise, when creating a black box, care should be taken to either fully specify what a given implementation does and that there are no side effects to the environment (like maintaining a 1024-element array and only allowing access to 5 elements). There are pitfalls - and both users of black boxes and designers must ensure that such issues are addressed.

      (Especially because if the next String blackbox "fixes" the issue above, my code will start doing a useless extra step to get around the problems in the implementation I saw of the black box...)

      --
      You are in a maze of twisty little relative jumps, all alike.
    5. Re:Of course by Anonymous Coward · · Score: 0

      "Compatibility - if a new version comes out, which changes implementation details but leaves the API intact..."

      Just off the top of my head, packages that have failed to deliver THAT:

      glibc
      qt
      gtk+
      tk
      berkdb

    6. Re:Of course by Anonymous Coward · · Score: 0

      But what if the glass box gets dropped and smashes all over the new tiles? What then smart ass?

  33. Welcome to API's and OOP by DakotaSandstone · · Score: 4, Insightful
    I'm also an embedded systems engineer. Two huge concepts I got as an undergrad in CS were "APIs" and "object oriented programming." By their very nature, these things inspire black box thinking.

    And heck, I don't know. I mean, is it great that I can now call malloc(1000000); and get a valid pointer that's just usable? Yeah probably. In DOS, I wasn't shielded from the memory manager as much, and to do something like that, I had to write my own EMS memory swapping code! That was a PITA, and kept me from the true task I was trying to solve.

    So a modern 32-bit malloc() is a black box for me. Cool. It's empowered me very nicely.

    However, something like WinSock has become a big black box for people too. Okay, great. So it's really easy, in 5 function calls, to open a socket across the internet and send data. But you've missed the nourances of security. So now your app is unsafe, because you weren't forced to know more about what's going on in the "black box."

    Well, that's all I can really say in my post. Black boxes are a darn complex issue to talk about. Anyone who attempts to distill this down to a "yes" or "no" answer is probably missing a lot of the completixy at hand in the issue.

    Very interesting question to put forth, though. Good topic.

    --
    Nothing is so smiple that it can't get screwed up.
    1. Re:Welcome to API's and OOP by duffbeer703 · · Score: 1

      I fail to understand how getting rid of the WinSock API would make network programming more secure.

      When you & 10,000 other developers wrote your own memory swapping code, there were probaly 4,000 mistakes that crashed computers or broke apps. Generally available constructs like malloc eliminated those 4,000 bugs by creating standardization.

      If you had to go through tedium to create your own "WinSock" equivilent, you'd introduce even more bugs, and probaly decide to not include security features either.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    2. Re:Welcome to API's and OOP by edunbar93 · · Score: 1

      The trick of course, is to treat input from other programs and other APIs as if it were input from users, in no small part because it just might BE input from users. How does your server determine that its input is indeed coming from another program, and for that matter, that program is perfect in its implementation?

      This is how a lot of buffer overrun vulnerabilities get coded into servers. Basically, the coder only tests it with a program because it's faster that way. And then said coder is programming to the test and not to the real world.

      --
      "No problem. I have the capacity to do infinite work so long as you don't mind that my quality approaches zero."-Dilbert
  34. As a 3rd Year CS Student... by calebp · · Score: 2, Interesting

    I concur that there is a lot of this kind of niavete out there, but on the other hand, there are always the few that will go above and beyond. While my schooling tends to focus on a more abstract approach with emphasis on OOP, I have also started working on embedded systems in my own time.

    It seems apparent enough to me, that any passionate CS student will not be satisfied with a mystically based understanding of computer architecture; and will in turn educate themself. I propose then, that any kind of 'black-box' mentality is more a reflection of the students' drive then their education.

    --
    ________________
    "A man prepared who hesitates, is lost." -Dante The Divine Comedy: Inferno Canto XXVIII, 99
  35. hey man... by LordYUK · · Score: 1

    why's it always got to be the "black box"? Huh??

    --
    This is my sig. Its pathetic.
    1. Re:hey man... by WetCat · · Score: 1

      Because magician's black boxes, that usually
      contained some enigmas, were usually black.

    2. Re:hey man... by Mr.+Bad+Example · · Score: 1

      'cause The Man is always tryin' to keep a brother box down.

    3. Re:hey man... by Anonymous Coward · · Score: 0

      It is neither black, nor a box. So why are you just complaining about the black part? Why not about the box part?

    4. Re:hey man... by Anonymous Coward · · Score: 0

      It could be a blacker than black box instead...

  36. Oh like in the grand scheme of things ... by nicodaemos · · Score: 5, Funny

    Okay the "big picture" college profs should be showing you is this one.

  37. Not yet, anyways by captredballs · · Score: 2, Interesting

    Is black box programming a pipe dream? I wouldn't go that far, as software engineering/compsci is a relatively new "science". At any rate, I know that I am very reliant on knowledge of the underlying platform that my code is running on. When a piece of software (especially one that I didn't write) doesn't work, I often resort to tools like truss/strace, lsof, netcat, /proc,etc... to help me determine what is going on "under the hood". I can figure out what ports, files, dlls, and logs the software is using in a matter of seconds, instead of resorting to a dubugger or printf's.

    I'm no superstar engineeer, but I find this methodology (my window into the black box) so valuable that I'm often frustrated by collegues who refuse to learn more about an OS/VM/interpreter and make use of it. It is also what most frustrates me about troubleshooting in windows.

    While it's true that I don't know much about windows, I get the feeling that these kind of observation tools that are so common on unix-ish machines aren't quite so prominently available on winderboxen. Sure, you can figure out a lot about a problem using MSDEV (what I remember from college, where VC++ wouldn't stop opening everytime netscape crashed), but it isn't available on ANY machine that I ever troubleshoot.

    Hell, even when I'm programming java I use truss to figure out what the hell is wrong with my classpath ;-)

    --

    I suppose I'm not too threatening, presently, but wait till I start Nautilus
    1. Re:Not yet, anyways by FroMan · · Score: 1


      I have an apartment, forget the price.
      Ain't never been there, they tell me its nice.
      I work in cubicles, tear down the walls.
      I have VC's pay for it all.

      They say I'm a hacker, but I have a good time.
      (Everybody says HaX0Rs, HaX0Rs)
      I'm just cleaning up log files from the scene of the crime.
      Life been good to me so far.

      My dual Athlons compile kernels in 185,
      I hope gentoo, is done before I die.
      This machine is behind the firewall in the back,
      So it doesn't get hacked.


      I'm making software, my users can't wait.
      They send me email and tell me I'm late.

      So I got me an office, put certificates on the wall,
      Drop me an email, I doubt I'll really call.

      I'm lucky I'm sane after all I've been through.
      (Everybody says Use the right tool, right tool)
      I like to complain, and quite often I do.
      But lifes been good to me so far.

      I go to lan parties quite often to frag,
      Look out behind you, too bad you got fragged.
      Its tough to handle this jolt and caffine,
      and eat all the pizza and chips I must be mean.

      They say I'm a geek, but I have a good time.
      (Everybody says he's weird, he's weird)
      I'll keep going on and I think I know why,
      Lifes been good to me so far...

      Apologies to captredballs for the inspireation and Joe Walsh for the song to murder so freely.

      Note to RIAA: ptpttptptptptptptpttptppt!!!!

      --
      Norris/Palin 2012
      Fact: We deserve leaders who can kick your ass and field dress your carcass.
    2. Re:Not yet, anyways by Anonymous Coward · · Score: 0

      instead of resorting to a dubugger or printf's

      That's spelled duh-bugger. It is a tool you only need to use after you have already used a "bugger" (which is the tool that puts the bugs in).

    3. Re:Not yet, anyways by captredballs · · Score: 1


      Ha! No apology neccessary, that was hilarious. I wanted more in my sig, but that is all that it would let me have.

      --

      I suppose I'm not too threatening, presently, but wait till I start Nautilus
  38. black box by necessity by bob_jenkins · · Score: 1

    A black box is something you don't know anything about. You make it not a black box by learning something about it. Most of software development is spent learning about the system (reading documents, searching indexes, walking through code with a debugger). How much you can get done is determined by how little you can get away with learning before fixing a problem.

    That's not universal, it might not be the case with the shuttle software, but it's true for a lot of software. It's definitely true for my job.

  39. Re:Linux? by Anonymous Coward · · Score: 0

    Try again: here it is

  40. Programmers and the "Big Picture"?...? by Glock27 · · Score: 1
    Back working on my undergrad (computer engineering) I remember getting frustrated at the comp-sci profs that insisted machines were simply 'black boxes' and the underlying hardware need not be a concern of the programmer.

    I'm not sure if there was a lack of communication with your prof, but the concept should have been "SOFTware as black boxes". This is the concept of data hiding, which is a good thing. The cornerstones of software engineering are abstraction and encapsulation, and data hiding is a big part of encapsulation.

    The hardware is (to an extent) a "black box" from the standpoint of any higher-level language, including C and Ada. That is the whole point of software portability, which is also a good thing. Both of those have been used for a tremendous number of embedded systems (particularly Ada, which is used for quite a lot of the space shuttle software). One must know that one's algorithms will execute deterministically in the required time, but knowing in detail how the data and instructions flow from memory though cache and processor is emphatically not required in 99% of cases.

    Detailed knowledge of computer hardware is helpful to software engineers, but by no means essential. Talk to the hardware folks if you have a question. ;-)

    By the way, don't forget another important axiom:

    "Premature optimization is the root of all evil."

    :-)

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  41. School Doesn't Prepare You For Real World Coding by Carnage4Life · · Score: 2, Insightful

    There are many things computer science education does not teach the average student about programming. This is burdened by the fact that programming can vary significantly across areas of CS (i.e. networking vs. database implementation) and even within the same area (GUI programming on Windows vs. GUI programming on Apple computers).

    When I was at GA Tech the administration prided themselves on creating students that could learn quickly about technologies thrown at them and had broad knowledge about various areas of CS. There was also more focus on learning how to program in general than specifics. This meant that there was no C++ taught in school even at the height of the language's popularity because its complexity got in the way of teaching people how to program.

    Students were especially thought to learn how to think 'abstractly' which especially with the advent of Java meant not only ignoring how hardware works but also how things like memory management work as well. In the general case, one can't be faulted for doing this while teaching students. Most of my peers at the time were getting work at dotcoms doing Java servlets or similar web/database programming so learning how things like how using linked lists vs. arrays for a data structure affects the number of page faults the system makes were not things that they would really have to concern themselves with considering how things like the virtual machine and database server would be more significantly affect their application than any code they wrote.

    Unfortunately for the few people who ended up working on embedded systems where failure is a life or death situation (such as at shops like Medtronic) this meant they sometimes would not have the background to work in those environments. However some would counter that the training they got in school would give them the aptitude to learn what they needed.

    I believe the same applies for writing secure software. Few schools teach people how to write secure code not even simple things like why not to use C functions like gets() or strcpy(). However I've seen such people become snapped into shape when exposed to secure programming practices.

  42. How big of a team by briancnorton · · Score: 1

    If you are in a very small team, you obviously need to be aware and conscientious of the system as a whole, but on a larger team, if everybody has a view of the whole project with their own vision, everybody goes a different direction. It is better in this case to have each individual or group be concerned with following the specifications for their individual componant, and having lead programmers/designers integrate as needed. I've never worked in embeded systems, so I cant tell you if that holds up.

    --

    People who think they know everything really piss off those of us that actually do.

  43. My comp sci experience by truthsearch · · Score: 1

    My undergrad studies for computer science included fundamental understanding of gates and boolean logic. We also studied some of the microcode that goes into processors. So we went from the level of the gates to simple chips to the basics of processors to assembly to operating systems to applications. It wasn't taught in that order from the ground up. Algorithms were studied at the same time as chips, but it worked out well. Anyone getting a comp sci degree from Pace U. in NY has at least a fundamental understanding of computers from the ground up. However I have a coworker (developer) with an electrical engineering degree. He has much better knowledge of the electronics from beginning to end and he's a great programmer.

    I find knowing how things work from the bottom up makes me better at building on top. I find the most ignorant and least innovative developers to be those with only a high level understanding of how the underlying software and hardware works.

  44. Abstraction by NixterAg · · Score: 1
    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system? That, in and of itself, would explain a lot of security issues, as well as things as simple as user interface nightmares. Comments?"
    But isn't that exactly how we are able to use abstraction and make large, complex systems? A good programmer and engineer is naturally going to want how their piece of the system fits in with the overall machine, but usually it simply isn't practical.

    The best case scenario will always be for each member of a development team to understand every nuance of the system and every detail of its interface with the underlying hardware. However, it simply isn't practical (and for some systems it might not even be possible).
  45. Big Pictures? by krystal_blade · · Score: 0, Offtopic

    Go to The Hun if you want "big" pictures.

    Krystal_Blade

    --
    It will be easy to motivate our fellow man; there is hardly anything people treasure more than not being annihilated.
  46. Re:Linux? Yes...NINNLE! by Anonymous Coward · · Score: 0

    More specifically, the Big Picture is Ninnle Linux!

  47. Is it time for this link again? by clovis · · Score: 1


    http://www.fastcompany.com/online/06/writestuff. ht ml

  48. Diassembling the radio by Tomy · · Score: 1
    I think part of what makes many of us go into an engineering career is the curiosity that requires that we have to have a look under the hood. I never was a very good Lisp programmer until I wrote my own interpreter in C. That gave me the knowledge to write more efficient Lisp code.

    Every Java programmer should at least look at the source for the Java base classes, and ultimately should understand the VM. C++ programmers should at least read "Inside The C++ Object Model." C/C++ programmers should peek at the assembly their compiler creates. Python or Perl programmers that have a good understanding of the internals of their interpreters are going to write better code.

    All these abstractions are there so you don't have to sweat details all the time. But this shouldn't be misconstrued as "never."

  49. Ah, the mythical black box by QuasiEvil · · Score: 1

    It depends on what field you're in. Are you writing a portable software component that is basically a business logic module, or are you writing code that is the whole system (embedded micros, etc.)? Software components, if they need to be portable, should be blackbox-esque.

    Embedded stuff? Hell no. Software is there, usually, to facilitate the hardware. The smaller, tighter, and faster you can get the code, the cheaper the hardware to run it on, and the cheaper the overall design. That was one of the things that annoyed me most about college programming classes, etc. - the fact that everything was abstracted into a world where all hardware was equal and all code was perfectly modular.

    I'm an embedded programmer. The hardware is mother, the hardware is father. Sure, usually I have at least a bootloader and/or possibly a separate kernel that abstracts the hardware just a bit. However, while abstractions are nifty and help prevent code duplication and coder error, the machine itself certainly doesn't need them and all they do is chew up processor cycles. That leads to needing bigger, more power hungry hardware to keep ahead of all the bloated code. The trick is balancing the two.

    Sure, I can write C for a PIC with 64 bytes of memory and 2K of program space as well as I can write C for a 16-way Alpha server monstrosity, but the style of code I write will be massively different. There ain't no malloc, no filesystem, etc. on a PIC. You can't interface to a ODBC client to store data - you have to write the flash interface routines, check for errors, figure in wait states, etc. To manipulate certain registers, you have to execute very specific assembly in a very specific order, or you risk falling into bugs in certain revs of silicon.

    I also tend to think that programming is moving bits around between registers. It's a fun way to flip transistors, essentially. Likewise, I've always thought that computer engineers should start at machine architecture, then move to assembly, then C, then C++, etc. Make them really think about what the abstraction each language buys you vs. what it costs in bloat and inefficiency (because no optimizing complier is as good as an hard-working ASM guru).

    I'm not against portability, but I am against bloat and inefficient coding in cases where it doesn't buy me (or future maintainers) anything.

    ND

  50. Black-Box Programming is Essential by cK-Gunslinger · · Score: 1

    We're taught black-box programming in school because of the simple fact that hardware changes, frequently. Abstraction is necessary, or we would all be writing in assembly.

    But, of course, encapsulated programming must be designed that way. A top-down, system-wide approach to security, error-handling, IPC, etc must be established in advanced and trickle-down to each component, even if it means that your software simply returns a -1 on a failure, but the higher piece in the heiarchy sees your -1 and the -1 of other parts and determines that a boolean value of FALSE is deserved, which it returns to its parent component, etc. Eventually, a high enough component will recognize the true problem and do what ever it needs.

    The point is, black-box programming works, but only if there is an underlying plan in effect. It's the five (or is it 6?) P's of a successful project in action!

  51. A issue for humanity, not just programmers by scotay · · Score: 1

    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?

    Having a human brain leads programmers to approach problems with a 'black box' or 'virtual machine' mentality.

    I don't think we were built for a natural 'big picture' view. We were built to understand our little piece of the African savanna from inside that box.

    All the 'big picture' stuff is doable, but not as naturally. We will always feel a little more comfortable inside the box.

    Humanity will always have to force itself to think outside the boxes we constantly make to aid our system of modeling reality through perception.

    1. Re:A issue for humanity, not just programmers by ebyrob · · Score: 1

      I definitely agree that many of the issues faced by programmers/software today, are larger issues humanity (and individual humans) must deal with in order for things to "get better". I believe the immortal words were: "If it were easy, everyone would be doing it."

      However, the "black box" analogy always bothers the heck out of me. Being a rather unorthodox and original thinker, I often have trouble finding the box. Yet I still get told from time to time: "think outside the box." I was born outside the box, and I've had a very painful time trying to fit inside so that other people could see and understand what I was doing. Thinking outside the box is the easy part, it's going outside the box, then trying to poke a lifeline back into the box to help others get out that is so difficult.

      If I open my mind as far as some people ask, my brain will fall out...

  52. Part of the problem is the Real World by GeekDork · · Score: 1

    In theory, a perfect system could be built from a lot of communicating "black boxes" without knowing the whole system. That's what the fun is all about. In the Real World however, this approach is not possible since there are too many broken black boxes and too many unsupported standards that make a secure approach impossible without knowing or at least controlling (=choosing which black boxes to use) the whole system.

    --

    Fight hunger. Filet a politician and send him to a 3rd world country of your choice.

  53. Unix by kisrael · · Score: 1

    Hrmm. Some of the philosophies of Unix and its revolutionary system of pipes tend to emphasize individual components, each doing its job well. (Though Perl as the swiss army chainsaw with sometimes surprisingly better performance has something to say on that...)

    I'm probably living in a dreamland, but I really think small teams, where people can realistically have a hand in all and therefore knowledge of all parts of the system, can do almost any software project. It seems to me that "mythical man month" scaling problems really start to attack productivity, even with medium size teams.

    --
    SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  54. I think everyone is missing the point. by Anonymous Coward · · Score: 2, Insightful

    I've been doing pda programming for both the pocketpc and the palm os.

    The application for both is intended to be identical, but the api is different for each device.

    I designed the app originally for the palm, but now I am porting it over to the pocketpc. Unfortunately, the api is different enough that little of the code is portable.

    If I had known I would be coding for both, I would have tried to design the code to be more portable. Knowing the requirements of both systems might have allowed me to factor out the device-specific sections.

  55. Paying attention to the *ENTIRE* task is important by Anonymous Coward · · Score: 0

    Where I work, we have two software groups (in practice). One is an integration group, and they actually sit in the lab with the hardware. They all know how to reset the hardware, replace cards, even perform diagnostics on the system. Their code is almost invariably good, and their knowledge of the system is almost as formidable as the hardware designers. Sadly, they are limited to writing BIST and self-test code, not application code.

    The app guys, on the other hand, don't even sit in the same room as the hardware. They have to call someone to hit the bleedin' reset button, and most of them barely know how to power the equipment up. They code at an abstract level, and frequently miss nuances of the hardware that were explicitely designed in for the task at hand. Their code is *always* bug ridden, and when we have serious problems on the system bench, nine out of ten times we can point the finger at a software engineer.

    So, yes - I can say from experience that software engineers could benefit from paying attention to the entire task, not just the code they are being paid to produce.

  56. Not quite the issue by dido · · Score: 1

    One side of the issue is that if you attempt to look at any sufficiently large and complex system it will overwhelm you with its complexity. The human mind can only deal with a certain amount of complexity at a time before overloading. That's the reason why object-oriented methodologies were invented, to attempt to chop up a large and complex problem into smaller and more manageable pieces, so you can deal with certain things as "black boxes" and move on to the bigger picture. Sort of like zooming in and out. A graphic artist would never think of working at a single zoom scale when editing a picture, she would zoom in for fine work and zoom out for an overall view. Treating things as black boxes is done so that you don't lose sight of the forest for the trees, not the other way around!

    But of course, as my own experience in embedded systems development and electronics work has taught me as well, it does no good to simply leave things as black boxes. You also have to know how the black box works on the inside before you can go on to treat it as a black box. I had to learn the ins and outs of semiconductor and transistor physics before I learned how to use logic IC's, which have these components as their basic building blocks, so that I'd understand the limits and quirks of these devices. I think the big problem we have is that people are generally unfamiliar with how the many black boxes they use actually look like on the inside, so if their system winds up eventually tickling limitations or quirks (which, as the complexity of the system they're building grows becomes more and more likely), they have no idea what the hell is going on or what to do about it. In other words, too much zooming out, not enough zooming in, so you get work which has too many rough edges and not enough fine detail.

    Salon had a highly insightful article some years back about this very topic as it pertains to software engineering: "The Dumbing Down of Programming", by Ellen Ullman, Part One and Part Two. She talks about the way too much knowledge is disappearing into code, and the problems that causes.

    --
    Qu'on me donne six lignes écrites de la main du plus honnête homme, j'y trouverai de quoi le faire pendre.
    1. Re:Not quite the issue by cwills · · Score: 1

      Cannot agree more with with Ellen Ullman wrote.

      It's also not only in software engineering, but many other areas as well.

      Devices as black boxes:

      The other day my wife was explaining to one of our kids that she remembered when one could walk into a corner store with a handfull of vacuum tubes from a broken TV or radio and you would by yourself find which one was broken, buy the replacement tube and replace it without the assistance of someone else. Today -- we have the "No servicable parts inside" imprinted on the case of the box. CD player breaks, off to the trash with it, radio breaks, dumpster time.

      How many people can even imagine let alone describe how to build a radio from an old oatmeal box, a crystal, some wire and headphones (bringing back memories of some of the stories that my grandfather told me). (yes I found several web sites that describe how to build one -- do a search of cat whisker and oatmeal box)

      Math as a black box:

      It's not only the physical devices that we have lost touch with, but also general low level knowledge. A caculator ahh.. the boon of the arithmetically challanged. Takes a couple measurements with a tape measure marked off in centimeters, inputs the length into the calculator and divides by 3, and then tries to measure off .33333333 centimeters. Lost forever is the sense of the margin of error, of rounding off to the appropiate unit of measurement. The SR-71 Blackbird was built without the aid of computers, engineers relied on sliderules. Last I heard, some of the feats of the SR-71 have yet to be broken.

      Basic survival as a black box:

      Growing up in a rural area, I was at least exposed to some facets of farming. If I were dumped out into the wilderness, I suspect that I could probably find things to eat.. Contrast this to a report that some science teacher told their class that farmers were no longer needed because one could purchase all their food at the store.

  57. The picture is not static by uw_dwarf · · Score: 1

    "Black box" thinking provides the ability to encapsulate or modularise certain functions. You can test the black box to the specification (if the specification is good enough), and determine whether the black box will do its job in the specified context correctly.

    Enter "reuse." This can change the context in which the original black box was required to operate. It may work, but it may be degraded in some way (for example, a data management system designed for a year-old HP rp7410 server having to be shoehorned into a five-year-old K460). Or the black box will have to be modified to deal with a new set of conditions (what was a legitimate error in the old context is OK in the new one, and the black box has to have additional input to tell it which context applies). Either of these can be managed.

    Things get difficult when this black box is picked up without careful examination and embedded in something completely unknown to the original black box design team. The specification for the black box may not match this new context, and things will break. What's changed? The picture, not the black box. It is not the designers' fault that the black box doesn't fit the new context perfectly. But designers must be prepared to adjust them to new contexts if appropriate. And design managers must be aware of this possibility.

    In short, the black box methodology is fine, but it is limited in that it does not recognize changing contexts. Everyone involved in the design process must understand this.

    --
    The Seventh Rule: Take others more seriously than yourself, particularly when you are leading them.
  58. yes, but more a management issue by drteknikal · · Score: 1

    My sense is that this does happen, but not usually because of any flaw in the programmers or engineers. More often, it's the result of management not giving more information than is necessary to complete the task.

    It's important to take the whole team, as a group, through the big picture. Even if it is just a short overview meeting, there is significant value in making sure that everyone knows that their assignment is part of a larger whole, showing how the pieces are intended to come together, and giving everyone a context for their individual bits.

    My experience is that being given all the additional info doesn't take too much time, doesn't overwhelm anyone, and produces far more usable results. Letting everyone work in a vacuum, the other extreme, tends to cause integration nightmares and lots of wild tangents that make sense ONLY in the context of one little bit while working against the overall goals.

    --
    http://drteknikal.blogspot.com/
  59. some food for thought by mrtroy · · Score: 1

    first off im just wondering after reading these posts how many people thought you were discussing the flight data storage in airplanes referred to as "black boxes" *grin*
    on a serious note, in my undergraduate studies in computer science, we were first taught how everything works with hardware, then how to hardwire program it, then microprogramming, and so on. By the time you progress to the next step you cannot forget about how things work and relative efficiency, for example whenever I do anything now I am always reminded of that damned microprogramming.
    I dunno, if you are taking a black box approach to programming, chances are that you arent in a coding position where you need to take hardware into account. If you are in a situation when you cant/shouldnt take a black box approach I would hope that you have had enough schooling and/or experience/knowledge to take a more advanced approach
    But if you are using frontpage...it doesnt matter what you do :P

    --
    [I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
  60. bb vs. whole picture by KMAPSRULE · · Score: 1

    The project I am currently on has developers at 3 Sites(each 1500 miles or so from each other) working on different aspects of the project. One of these Sites has a very open minded Manager who stresses that even though the part being worked on by his people is only a small subsystem of the whole project, that no code is developed unless the design engineer has talked to the Guys from the Other Sites and made sure that interfaces are well Designed and Issues are worked out. One of the Other Sites takes the BB aproach and is severely locked in tunnel vision on the parts of the project that are in there ball court. The Guys working under the better Manager consistantly deliver on time, with very few defects. On the Other hand the Guys locked in Tunnel Vision consistantly Deliver late due to the higher instance of defects. There is a time and place for Limited BB type of programming but I believe it is bad programming to not at least Stick your head out of your Cube for a few minutes and see what is going on with the rest of the project.

    --

    --Im an oven mitt, not an engineer! (SLArbys Radio Commercial)
  61. All Systems Are Embedded by gnetwerker · · Score: 4, Interesting

    I started my career (long ago, in a galaxy far away) developing embedded systems, and much later, when running an R&D lab, came to the conclusion that, excepting (importantly) user-interface design, embedded systems were the best crucible in which to learn the right balance between modularity and holism in systems design and implementation.

    It's easy for programmers who have only worked on PCs to lose sight of the notion that programs affect the world, but when you are controlling big machines that, improperly instructed, will destroy themselves and the people around them, you begin to think twice about your coding tricks, your testing, and the interaction of your component in the system as a whole.

    But there is an underlying assumption in the question that modular design and system holism are mutually exclusive, and I don't accept that either. I also except user-interface design, which is more sociology and psychology and neurology than computer science.

    You are correct, however, in supposing that security is particularly vulnerable.

    Here's one (true) story, which I will deliberately leave unattributed: a programmer is writing code to control the dual vertical bandsaw in a sawmill -- two huge saws, each 12 inches of high-tensile stainless steel with 3-inch teeth, stretched tight between two six-foot diameter wheels and running at 10,000rpm. A log is pulled on a chain through the middle, so a cut can be made on both sides. Logs enter the system, are measured with a laser scanner, and a queued (physically and in the control program) before entering the bandsaw.

    The old fart programmers used to simply store log data in an array of sufficient size to hold the maximum number of logs that could ever be in the system, but are cognizant of the problem of "phantom logs" when a log falls off the belt or otherwise leaves the system in an uncontrolled way. The clever young programmer decides to use newly-learned techniques of memory allocation and linked-list design, and build a replacement.

    During mill installation the system is tested and appears to run well. At the end of the shift, however, as the last log is about to be run through the system, the operator discovers that there is no data in the queue for the last log, but decides to run it anyway. The computer dereferences a null pointer, grabs garbage data, and tells the bandsaw to set to an impossible position.

    Because the mill is still being installed, the stops on the bandsaw have not been adjusted, and the saws set to position "0" -- and run into the chainguide in the middle. High-stress stainless at great speed meets six inches of fixed steel, and the saw blades explode, burying foot-long shards of stainless steel sawblades up to four inches deep in the walls of the mill, destroying the operator's booth, and causing tens of thousands of dollars damage to the mill.

    Whose fault was it? The operator, for running the phantom log? The hardware installation guys, for not setting the stops on the mill? Or the programmer, for not constraining the output of his program, testing more completely, and using simpler techniques. Answer: all of the above. Better modules would have forestalled the problem, and better systems holism would have forestalled it as well. A combination would have given an even better margin of error.

    This has led me to the following conclusion: in order to get a CS degree, every programmer must write code that will lower a 10-ton machine press a maximum speed to within inches of his chest, and then stop it. We would have more careful programmers if this were the case. If they went on to write security code, we would have fewer holes.

    gnet

    1. Re:All Systems Are Embedded by Anonymous Coward · · Score: 0

      "every programmer must write code that will lower a 10-ton machine press a maximum speed to within inches of his chest, and then stop it."

      It's kind of fucked up that you have 'every programmer' and then finish it off with a 'his'. As though every programmer should be male.

    2. Re:All Systems Are Embedded by Anonymous Coward · · Score: 0

      It is, however, correct English. The neutral possessive pronoun is 'his'.

    3. Re:All Systems Are Embedded by fishbowl · · Score: 1

      [use of his]

      It's English. It's acceptable and proper to use the personal pronoun "his" to refer to a person of indefinite gender. If you consider that a problem, you are welcome to speak a dialect of English that follows some other convention. Instead of doing that, I recommend studying French or Italian. You will come to appreciate English for its gender-neutrality!

      --
      -fb Everything not expressly forbidden is now mandatory.
  62. Re:GET SOME PRIORITIES!!! by Anonymous Coward · · Score: 0

    ...and just what the fuck made this space tragedy more horrible than the one seventeen years ago? Same number of deaths, same situation, but this one on landing rather than launch. So much more horrible.

  63. Columbia Reference is Valid by bellings · · Score: 1

    Some of you have complained that the Space Shuttle reference is gratuitous in this article.

    To you people, I must point out that in this post-columbine, post-9/11 world, those people who are able to leverage all available datum into a synergetic process are the most likely to accept success in their lives.

    --
    Slashdot is jumping the shark. I'm just driving the boat.
    1. Re:Columbia Reference is Valid by Anonym0us+Cow+Herd · · Score: 1

      Insightful +1

      --
      The price of freedom is eternal litigation.
  64. Design Patterns by Tikiman · · Score: 1

    I think the question is confusing the "black box" concept with "design patterns". Unless you are programming assembly for Atari 2600 and need to pay attention to how many CPU cycles each instruction takes, there is no reason to consider underlying hardware (embedded issues aside). A black box in this classic sense is simply an abstraction for the zillion types of hardware ever made. The STDOUT file handle is a perfect illustration of this as it has migrated from physical devices to VT100 telnet sessions across the world. Design patterns, OTOH, can easily lead to "cargo-cult" programming, which is always bad.

  65. Necessary requirements by (trb001) · · Score: 3, Insightful

    Don't laugh, but this is one of the reasons why it's important to have solid requirements BEFORE you being coding anything. Most projects don't, I know, but something as complicated as the space shuttle would need to be completely spec'd out beforehand. After proper requirements and specs are laid down, the programmer should then approach the system as if it were a black box...with a lot of restrictions.

    The idea behind black box development is that you don't need to know what the rest of the system does...your component takes input and delivers output. That's a Good Thing (tm). Requirements are what tell you how to design and implement your black box, ie, you can't have more than 1ms latency between input/output, you can't assume some system variable is going to be out there, you can't assume your process won't be interrupted. Given these sorts of requirements, your part of the system SHOULD be a black box...someone else should send you the inputs and know what kind of outputs they're getting out. Assuming you correctly followed the requirements (that's what QA testing is for), they know what they're getting.

    --trb

    1. Re:Necessary requirements by Tony · · Score: 2, Insightful

      The idea behind black box development is that you don't need to know what the rest of the system does...your component takes input and delivers output. That's a Good Thing (tm).

      This is a Good Thing (tm) only when the black boxes are true black boxes. The problem with treating software as engineering problems with Black Boxes is that there is no such thing, in software. This is the reason object oriented programming has not been the panacea we were promised.

      In construction engineering (architecture, for instance) the behavior of all the pieces are known beforehand. A steel I beam is a steel I beam (yeah, I know there are different strengths, but these are specified by the engineering firm). A steel I beam has only two APIs: welding, and riveting.

      In programming, every black box has unique characteristics. Even if two ungif "black boxes" have the exact same API, the behavior of those routines are probably different. Even worse, in all non-trivial projects, connections among Black Boxes produce a complex system; the interrelations among those Black Boxes will change the behavior of the system, often in unexptected ways.

      The case for understanding all your Black Boxes is represented in one of the most dramatic engineering failures ever: the Tacoma Narrows bridge disaster. The bridge was well-designed. However, strong winds blowing down the narrows set up harmonics in the swaying of the bridge. This was a case of an engineering firm who did not understand the whole system, with devastating results.

      The problem with OO programming is it encourages the thinking that you only need to understand your component, and not the whole system. This is a Very Bad Thing (tm) in my book. There are too many Tacoma Narrows software projects out there already.

      Anyway, that's just my opinion. I could be wrong.

      --
      Microsoft is to software what Budweiser is to beer.
  66. I bless you.... by FirstNoel · · Score: 2, Insightful

    Ah, I think we have someone here who DOES see the big picture.

    There are lots of times, at least in my experience, where it's not the programmer's fault in how the program works.

    I've seen specs come down from higher-ups who have no idea what they are asking for. I'm a little bit luckier though. The analysts we have here tend to spot these problems long before I get to program. But occasionally some do slip through. I have loads of fun ripping these things to shreds. I feel like a professor at college with my little red pen. "Ah, wrong...can't do that! What does that say? etc, etc ..."

    Aside:
    That is also usually a good stall tactic. If I'm swamped with other projects, I'll send them a flurry of notes, overwell them with spec questions. It usually gives me a few days.

    It's tough to think outside the box, when there is no box.

    Sean D.

    --
    "Hmm. I am to metaphor cheese as metaphor cheese is to transitive verb crackers!"
    1. Re:I bless you.... by jmertic · · Score: 1

      > I've seen specs come down from higher-ups who have no idea what they are asking for.

      That is most difficult part of being a programmer: design.

      I've been working on a major project for a year where I've been wearing both the coder and designer hats. Of the total time spent, I'd say it would be 80/20 design/coding ( design split between meeting with them and putting together design specs for them ). Granted it's fairly early on so this is expected, but I've also had my fair share of difficulty pulling the specs out of them at times. The humerous part of it is that it almost seems like I know how they work better that they do.

      I've sat thru those meetings where someone asks "I want the screen to turn red when something is due!" in the middle of data design, and you just want to shoot yourself in the head. It's difficult to shift some people's brains into abstract mode, which in turn makes it like pulling teeth out to get anywhere. However, those are the most important parts of development, and now I don't hesitate spending as much time as needed there to make my life easier down the road.

    2. Re:I bless you.... by nil_null · · Score: 1

      I am relatively inexperienced programmer who finished college a few years ago (though have been writing code for the last 15 years). Anyways, I'm finding out exactly what you are talking about regarding specs. Many of the "bugs" we fix are not programming errors, but errors in the specs that the customer gave us--and very often things that we warned them about but they did nothing about until production. I always have a ridiculously large number of questions on what may appear to be minor details. At first I thought I was nitpicking, but this is really necessary to get things right.

    3. Re:I bless you.... by oliverthered · · Score: 1

      Design is easy, coding is soooo boring and painfully slow.

      OK, I much prefer design/analysis and consultancy to coding. I can code well, but I'm not the greatest coder when it comes to finishing off and the dogs body work.

      Design is much easier than coding, dealing with people to get a good design is a bit harder, but not that hard.

      --
      thank God the internet isn't a human right.
  67. It's a dichotomy by Progman3K · · Score: 1, Interesting

    You must consider the implementation, ie. real-world limitations and requirements/trade-offs otherwise your solution will not be acceptable, but if you go too far in this respect, you'll create a system almost no one else will be able to comprehend and maintain.
    On the other hand, if you go fully-elegant (applying every theory that might be applicable) to the construction, you'll wind up exhausting processing power/memory, etc...
    That's where judgement comes in; knowing where to cut, and specifically what to document to give maintenance programmers a leg-up on whatever short-cut you engineered to accomplish the feat.
    Make sense?

    --
    I don't know the meaning of the word 'don't' - J
  68. Re:GET SOME PRIORITIES!!! by Anonymous Coward · · Score: 0

    How's this one any more "horrible" than the other shuttle lost? People's priorities are distorted alright. It's a tragedy - yes, but it's also a tragedy when hundreds die in a regular air crash. Yet, do we mourn them the same?

  69. Re:School Doesn't Prepare You For Real World Codin by mrtroy · · Score: 2

    I believe the opposite.
    I am IN school where they mainly teach us abstract concepts and not specific programming languages.
    What good would it be to learn a specific programming language in the rapidly changing technological world? Keep your Cobol and teach me recursive binary tree algorithms.
    If you cant go and teach yourself how to apply these concepts to specific languages, either you arent meant to be coding or your school did not help teach the second step of algorithms which is the application
    Basically, since we were mainly taught algorithms, our assignments would be in a random language like C, java, etc, and we would code portions of these algorithms. Sink or swim, but it worked, I know everyone in my graduating class can code in any language efficiently and effectively.
    *go waterloo*

    --
    [I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
  70. Controlling complexity by praetorian_x · · Score: 3, Insightful

    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?

    Well, programming is, at its root, about controlling complexity. A good program (not that *I've* written one) will have sub-components within it that largely act as black boxes to one another. It is a great and rare skill to recognize where the boundries are in your program and establish them early, to avoid painful refactoring later.

    In my experience, it is when something *isn't* a black box that things can get seriously fsked. "What? I set a global variable and now the app seg faults when I click that drop down?" Ahhh, not "black boxy" enough.

    My perspective is from a higher level than embedded though. Embedded is a whole different game, although the "controlling complexity" insight of higher level programming languages no doubt sill applies (as far as it can go)

    Cheers, prat
  71. Re:Correction by Anonymous Coward · · Score: 0

    Ouch.. looks like somebody hit a nerve.

  72. Level of abstraction by Hirofyre · · Score: 2, Insightful

    The correct level of abstraction for a project is often hard to find, even for very experienced programmers. Sometimes you have to raise the level of abstraction of an overall system, or you will never get to the point where you can move forward on your piece of the process. Generally, I've found that the problems lie in the areas where the pieces don't quite fit together properly; namely where one person's code doesn't follow the contract a second person was expecting. A lot of the time, even for mid-size problems, it would be impossible for one developer (or a team) to have an end-to-end understanding of the problem space.

    As far as I can tell, there is only one way to avoid the "black-box" problem, and that is to have one person code the whole thing, which is very likely infeasable. The further you get from "your" part of the system, the more abstract it is going to get. If your abstraction is faulty, there is going to be trouble, but I wouldn't say it was caused by treating the problem as a black box.

  73. The only thing that school prepares you for by shortscruffydave · · Score: 2, Funny

    In high school I did a 2 year Computer Studies course.

    During that period, one night I went to a heavy party and then spent the following day trying to write functional code whilst suffering a hangover.

    This was the only experience from the course which mirrored anything which happened to me since I started programming professionally

  74. 'black box' in teaching by Anonymous Coward · · Score: 1, Insightful

    Yes, I think the 'black box', you-don't-need-to-know-the-hardware approach is dominant in teaching. It's a very useful abstraction, it works most of the time, so I think this is fine.

    Of course, any decent programmer (or researcher) should be aware of where this abstraction breaks down and where you do need to know the hardware (or lower layers) of your system.

    But frankly, I don't have any idea of how to teach this... Dumbly insisting on looking at the hardware when doing your Quicksort certainly doesn't cut it. I really hate Knuth's only-assembler approach in TAOCP. He has a very valid point, but does he really have to make it on every single page? Worst is, I'm not even sure if he reaches his goals, or whether people don't simply turn to other books...

    I guess the best approach to teaching would be to stick with 'black box' as the basic assumption but to point out examples where this model in insufficient, and then hope the students get it...

  75. Big Picture's place in problem solving... by Qzukk · · Score: 1

    Part of the reason that the Big Picture difficulties crop up is that programmers are problem solvers. Their problem is "How Do I Do X".

    And so they write something that Does X.

    This goes wrong when the problem isn't "How Do I Do X", but is "How Do I Do X, Given Y". In these cases, Y may or may not be available to the programmer. The programmer may not understand that Y is important. The programmer might not be able to determine how Y applies, or how to get Y out of The Big Picture. Or the programmer may just be lazy and figure that someone else will take care of Y for them. Or the programmer decided to write the most generalized method for Doing X, so they can Do X Anywhere.

    Solving this problem of ignoring Y is going to take education: First, know that Y exists. Second, find Y. Third, code for Y. Finally, when Y is "important enough", recycling code from somewhere else won't cut it.

    --
    If I have been able to see further than others, it is because I bought a pair of binoculars.
  76. Exactly the Problem by Anonymous Coward · · Score: 0

    Your comment is funny in a juvenile sense, but also indicative of one of the problems that some developers have - they are so impressed with their own abilities in their given narrow niche (i.e., they are geeks) that they fail to understand that they are not a one-man band and would be useless without the rest of the players. While a given manager may not understand in as great a detail what the specialist programmer does, a good one understands how to guide and support it, integrate it into the overall technical and business picture and by extension, the world. No I am not a manager, but I do understand that there is a value in the contributions that they make.

    1. Re:Exactly the Problem by Em+Emalb · · Score: 1

      Yeah, I know.

      Funny thing is, I don't do programming for a living.

      I have to suffer with the consequences of poorly developed code though.

      I am considered management where I am though. Call it luck or call it a curse.

      --
      Sent from your iPad.
  77. Black Boxes are necessary evil by staaktdenarbeid · · Score: 1

    I agree that designers in general (both embedded software developers as well as hardware developeres) tend to confine themselves in their own level of abstraction. The black box model here helps as a divide-and-conquer mechanism. If for exmaple you are writing device drivers, you would abstract hardware to memory locations and registers. And at the same time, you hope that the device API - the abstraction you are building for the layer above you - is general enough to cover all applications.
    That by itself is a good thing. However, it assumes that there is some intelligent being that has outlined the layers of abstraction and black-boxes upfront. This is hard, and relies on extensive experience. How would one go about and select an OS for an embedded system, for example? How much knowledge about the application or device is used in making this selection ? (And how much of this choice is 'just guessing') ?
    Thus people use black-box models (like OS'es) because they are known to yield some results, not necessarily the best one.

  78. Knowing too much? by retro128 · · Score: 1

    My question is, is it really feasible to know everything about a given system? A jack of all trades is a master of none, after all. And that isn't even taking into account classified systems, where different parts of the working system are not only farmed out to different departments, but sometimes different companies. This is why very detailed software specifications are so important. It is the responsibility of the hardware engineers to tell you what the machine expects. Can you, who specializes in programming, really be expected to know everything about the hardware if you didn't design it?
    Tell you what, let's forget about programming and consider other things where responsibilites need to be split up, like building a house. While a builder may do general construction, there are areas where he may not be so good in, so things like electrical, roofing, masonry and such will be farmed out to subcontractors who specialize in said activities. The builder still knows the big picture, but can't handle the miniscule details. If he tried to, certain aspects of the house would probably be poor quality and take way to much time to do. The way I see it, programming is no different. It's about making the highest quality product possible in the shortest amount of time. And like everything else, it can't be expected to be perfect.

    --
    -R
    1. Re:Knowing too much? by Anonymous Coward · · Score: 0

      I couldn't agree more. I've known other embedded systems/hardware folks to pose this question. In the end it comes down to everyone being pissed off that someone who does a different job doesn't understand what they are doing. i.e. an electronics engineer bitching that a php programmer doesn't understand what a pn junction is while not even being able to write HTML. Not maybe the best example, but you get the point.

  79. Black boxes considered harmful? by crmartin · · Score: 1

    The short answer is "yes and no". Of course.

    In fact, it's worse than that because the common mythology is that you shouldn't consider any non-functional requirements until you're finished with the code -- as expressed in the common idea that you should defer optimizing for performance until the very last step in development.

    Everyone with more than about 20 minutes of experience knows this isn't the way it's really done -- if it were, then every web system would be built first as one big honkin' monolithic program, and refined from there. Instead, we make lots of decisions (like use J2EE or not, distribute the servers or not, use an in-memory DBMS or MySQL, and so on) very early, in order to get somewhere close (we hope) to a system that does what we need.

    We call this "architecture" and in general we don't teach it in school. This is in part because it's not very well understood as a discipline, IMAO because research in architecture has concentrated on representations rather than methods. (This is not to say that it's bad, don't mistake my point. People like Dave Garlan, Mary Shaw, and Paul Clements are doing good useful work; it's just not directed to figuring out what architects do rather than what their work products should be.) Len Bass has started doing something along these lines, and I have a paper in preparation. (You can read some good stuff about architecture here.)

    The problem isn't that people program to "black boxes" though: in fact, you have to manage designs with abstraction at any time, and in an embedded system you invariably end up working with black boxes as well. For example, do you do an FFT in a DSP chip, do you implement it in a general-purpose processor? ... not to mention really weird things, like using an FFT in a DSP to implement a matrix multiply for graphics. (Sounds weird, works good.) The problem is that people are being trained to think that they can choose any kind of black box and expect non-functional issues to be handled by Someone Else.

  80. Depends on where you're taught by Marco_polo · · Score: 1

    Most of the programming courses I've taken focus on teaching you the language, and some of the tricks on using the language.

    Didn't learn how to really program until I got into the real world and dealt with real problems.

    I think a mix of self-taught and instruction yield the best mix.
    .

    --
    I am the lord of the pun. Dance Knave!
  81. True, but you need an expanded view by nosilA · · Score: 3, Insightful

    In order to do a good job on your module, you need a solid understanding of how the components you directly interact with function. In addition, a superficial understanding of other components is useful.

    For example, let's say you are working on the software for automatic transmission control in the car. You need an intimate understanding of the hardware you are running on, that's directly related to your job.

    However, you also need a solid understanding of how the automatic transmission works. Understanding the mechanics of the gear change is important to understanding timing issues, errors that can occur, and how to deal with them.

    It is very useful to have a good understanding of how a car works in general, to get an idea of how your product will be used. This allows you to optomize your product for likely scenarios.

    Sometimes, for personal satisfaction, it is nice to know how the windshield wiper mechanism works, but it doesn't help you in any way to make your automatic transmission control better.

    -Alison

  82. An old-timer's view... by onlyabill · · Score: 1

    I started programming over 20 years ago, starting on main-frames, moving to minis, PCs and now the Internet. Worked through the accompanying shifts in paradigms; batch processing to client-server and now internet/stateless. I believe that you are half right. I feel that recently schooled programmers come out of school pretty much thinking that they 'know it all' (present company excluded of course) and that they have nothing else to learn. I work with coders that range from 10 to 20 years my juniors and it constantly amazes them what this 'old boy' brings to discussions, designs and problem resolutions.

    When I started coding, the batch job was king. It either had to run right or if it failed, it had to fail right. You built code to expect the unexpected. As the systems changed, the paradigms adapted or were reinvented. They all still tried to solve the same problems, how do develop a system quickly, efficiently and robustly (emphasis on robustly). The concept of building components or black-boxes is nothing new. What does appear to be new is the lack of building in recovery from problems or even the anticipation that there could be problems. What I tell my coders is that everything they develop should be with the mindset that it is going to be controlling their mother's heart/lung machine. Everything should be designed with that level of coverage and recoverability. Most systems today are not designed or coded that way. Look at all of the issues Win/Tell systems have with SIMPLE things like buffer overflows. That is inexcusable. It is easy to blame this on MS but that is a scapegoat. The problem is in how students are taught and how they are mentored after they leave school.

    How is it where you work? Do you take the time to have weekly meetings with the other developers? To review and discuss code and coding issues? Or does the code go from the developer to QA (if you even have any) and into product with no peer review? This is not a problem that can be solved over-night but it is one that we need to work on and it will NOT be solved by changing languages or paradigms. Compiler cycles are just too cheap and it is just too easy to hit the compile button. To some degree, I have seen the enemy and they is us.

    --
    I have to use this cause I can't afford a real sig...
  83. Bad project management by Jeppe+Salvesen · · Score: 1

    Frankly, I believe there is a lot of bad project management going on. That also applies to software development, not just integration projects. Usability issues much too often arise out of not spending enough time in prototyping and usability testing.

    When it comes to seeing the big picture, well, let's face it - in the corporate world, having an open source-like eyeball count on everything kills productivity. However, the people who do the initial design REALLY should spend some time making sure that their design will work. They also should be kind enough to give the programmers a slight briefing on what sort of project they are part of.

    --

    Stop the brainwash

  84. Oh this is kind of crap... by dasmegabyte · · Score: 4, Insightful

    The "Black Box" design theory abounds because of the freedom it offers programmers from the dark ages of having to know the underlying hardware intimately before anything could be accomplished. It's what allows programmers to devote all of their time to doing what matters rather than pouring over volumes of errata and arcana.

    The reason Windows became so popular, for example, is because its API offered programmers a way to manipulate graphics without having to make graphics calls. Variation from driver to driver was of no concern, and shouldn't be -- that's an IT issue which can be repaired without redoing the entire application.

    And in a perfect world, there's no problem. If a driver hooks into an API properly and documents any disperity, then the black box theory holds true. Problem is, driver aren't perfect. A lot of them are designed for bare bones functionality, and only optimized as necessary (hence how Nvidia's still squeezing substantial horsepower out of my ancient GeForce GTS with every new driver release). Obscure hardware cases always cause trouble, which is why Dells are (sometimes) more reliable than "no name" machines with "better" hardware. Dell has the clout to make sure the drivers are as seamless as possible.

    What's the solution for embedded developers? Design and test the drivers in house, so the black box coders have a shoulder to cry on when hardware doesn't act properly. But it should not be the core developer's job to know what goes on with the hardware. That kind of thinking bloats budgets, increases the complexity of the project and ultimately the cost. Modularity, even though it makes things more difficult to map in total, makes things easier to deal with on a micro level. If the application works when unit tested but fails on the release machine, then it's the driver's fault. Much easier to fix than it is to perfectly replicate the release in your tests.

    Expecting EVERY software developer to be an electrical engineer as well is absurd unless you intend to pay them for both degrees. Better to keep it modular and put the pressure on the hardware abstractor to do a good job of catching the tiger's tail.

    --
    Hey freaks: now you're ju
    1. Re:Oh this is kind of crap... by Lodragandraoidh · · Score: 2, Interesting

      I have been given projects where I had to interface with some existing POS (such as windows) - and I did not have access to the source, and thus needed to approach the project from the standpoint of a blackbox.

      In general this works fine - until some future date, when the owner of the blackbox decides to change the API such that your code breaks.

      Blackboxes, other than in an academic setting, imply a closed proprietary system. Open systems, on the other hand, are not truely black boxes because you do have access to the source and all the underlying APIs (no Eastereggs waiting to create undocumented interactions).

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
    2. Re:Oh this is kind of crap... by dasmegabyte · · Score: 1

      Open systems have their own pitfalls though. They are far, far worse when it comes to bare bones implementations of hardware drivers because there really is no impetus to build a system that isn't immediately useful. Say what you will about windows, it's release quality. The parts of the API that don't work are on the fringes, new development, the same sort of thing that open system developers would change, too, if they didn't work the right way. Case in point: Apache 2, Cocoon 2, the infinite iterations of Freenet which are incompatible with previous nodes.

      In the case of an open system, if I need to send data out of a widget, I build a driver to send data out. I don't spend any time at all on anything else. Another person who wants to suck data into a widget will have to edit the driver. There is no call for them to maintain any sort of version compatibility with mine; frankly, if they feel it's beneficial for their use to rape the core, they'll do it without any qualms. On the other hand, manufacturers of closed systems have to just that. They have to anticipate any way a person would use their driver, or else the hardware won't sell. Just ask Iomega about their Buz box, a device which never sold because they never released a 32 bit driver for it.

      And in the end, since only one party's been touching the driver from a closed system, it's much cleaner and much more likely to have few points of failure. Fixing it is much faster because it's somebody's job to maintain that code. You don't have to download a source package touched by a hundred hands for a hundred reasosn and try to piece together what they each were trying to do. Of course, you have to rely on the vendor, but if you're an embedded systems developer you better damn well have a good relationship with your vendor as it is.

      So the decision is thus: On one hand, you have open software. Where the freedom of use and lack of liability mean the possibility of a hundred apis broken off the same core with minor differences in the feature set which are all totally incompatible (PocketLinux). Where upgrading your webserver can break every other application on your machine (Apache) due to subtle dependencies for features you probably won't use and don't have the time to recompile for. Where continued improvement and a staunch refusal to freeze development so you can use it as an "API" forces you to maintain a constant watch on all new versions of all dependent code (GNOME, GTK, even glib). A platform where all of this work is placed on me, the developer, since it's too complicated for an IT person in our target market.

      On the other hand, you have "POS" windows. A platform for which I can write a simple client server application in a day and have it run on millions of PCs without recompilation, and where most bugs are due to using the API in a way that isn't intended or necessary.

      OSS rocks, but at its worst it's a maddening cob job. I like having the source when it's good, but there's a LOT of confusing shit as well. Better to put the responsibility for fixing a driver or api call on somebody who is both libel to me and who has experience in doing so.

      --
      Hey freaks: now you're ju
    3. Re:Oh this is kind of crap... by SoupIsGoodFood_42 · · Score: 1
      -1, missing the point.

      Read this quote:

      When developing code for a medical device, you've got to understand how the hardware responds to a software crash, etc

      I think the whole point that the author is making (or should be making) is that programmers should know more about how their code will end up in the real world--how it's used in the end goal etc.

      There have been many posts taking about how programmers need to think of different code moduals and hardware as black boxes. This is irrelivant, since all that is still only part of a larger system/end goal.

    4. Re:Oh this is kind of crap... by Lodragandraoidh · · Score: 2, Interesting

      Better to put the responsibility for fixing a driver or api call on somebody who is both libel to me and who has experience in doing so.

      - dasmegabyte



      To quote the FOCUS Magazine interview with Bill Gates [October 23, 1995]:

      "FOCUS:
      Every new release of a software which has less bugs than the older one is also more complex and has more features...

      Gates:
      No, only if that is what'll sell!

      FOCUS:
      But...

      Gates:
      Only if that is what'll sell! We've never done a piece of software unless we thought it would sell. That's why everything we do in software ... it's really amazing: We do it because we think that's what customers want. That's why we do what we do.

      FOCUS:
      But on the other hand - you would say: Okay, folks, if you don't like these new features, stay with the old version, and keep the bugs?

      Gates:
      No! We have lots and lots of competitors. The new version - it's not there to fix bugs. That's not the reason we come up with a new version.

      FOCUS:
      But there are bugs an any version which people would really like to have fixed.

      Gates:
      No! There are no significant bugs in our released software that any significant number of users want fixed.

      FOCUS:
      Oh, my God. I always get mad at my computer if MS Word swallows the page numbers of a document which I printed a couple of times with page numbers. If I complain to anybody they say "Well, upgrade from version 5.11 to 6.0".

      Gates:
      No! If you really think there's a bug you should report a bug. Maybe you're not using it properly. Have you ever considered that?

      FOCUS:
      Yeah, I did...

      Gates:
      It turns out Luddites don't know how to use software properly, so you should look into that. -- The reason we come up with new versions is not to fix bugs. It's absolutely not. It's the stupidest reason to buy a new version I ever heard. When we do a new version we put in lots of new things that people are asking for. And so, in no sense, is stability a reason to move to a new version. It's never a reason."


      So, you can see that your assumption is incorrect. YOU CAN NOT DEPEND ON YOUR VENDOR TO FIX IT. We found this out the hard way at my job - after spending millions of dollars; now we have an open architecture system where we can plug and play different vendor solutions easily, and use open source next to vendor supplied applications.

      On the other hand, I have written the maintainer of a famous development environment [don't want to drop names - not good form] - and he returned my email the same day with an answer to my question. My experience tells me your basic understanding does not jive with reality.

      --

      Lodragan Draoidh
      The more you explain it, the more I don't understand it. - Mark Twain
  85. The biggest lesson I learned... by scottfitch · · Score: 2, Insightful
    The best lesson that I learned on my first large development project was that there is a big difference in the need for abstractions and black boxes in implementation versus design. All code should be written using a black box approach... no matter whether you're programming in SmallTalk or Assembly. (Though some languages make it easier than others :-).

    The big difference is that when you are actually designing and coding (verbs!) you have to look into those black boxes. If you don't understand the subsystems/objects/subroutes that your code interfaces with, you won't know what boundary conditions to test, what assumptions the other subsystems are making, etc.

    So now I always write well abstracted code (just like your Comp Sci 101 prof taught), but design with the big picture in mind.

  86. Heuristics by hey! · · Score: 1

    Mental models are fundamental to how humans think about systems. We will always view systems as a collection of "black boxes" that interact in defined and predictable ways. The "black boxes" may not literally be black boxes, but they may be assumptions like "This set of linear equations approximates the true behavior of the system closely enough under all situations of interest."

    Of course things get exciting when these assumptions turn out to be not good enough in all sutations of interest(try googling Tacoma Narrows Bridge).

    The human mind is not unlimited in the amount of naked complexity it can deal with. Therefore we need our "black boxes" as firewalls to contain the complexity beast. However, a good founding in heuristics should train us to recognize situations where our mental models of system components are not serving us, or better yet to proactively look for ways in which our assumptions may fail. Black boxes should not be taken as given, but things that can and should be opened up, tinkered with, and rebuilt.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  87. Interesting Troll by Anonymous Coward · · Score: 0

    I think he is one of the coolest trolls on slashdot ever. The fact that some of his postings got moderated insightful and interesting says a lot about how dumb slashdot mods are. If you didn't know him you would have a hard time telling if he's just a retarded linux user or if he's trolling.

    So, keep going man. You should create a new account and use a new subject though.

  88. Remember Windows 3.1? by gantos · · Score: 1

    As a programmer myself, I have come to realize that programmers are not always afforded the opportunity to "see the bigger picture." On larger projects, programmers can be assigned stubs or modules to write with guidelines on how to handle specific events. But in cases where a potential event hasn't been specifically defined -- yet the programmer knows it could occur -- a "default" event must be coded. This was ever so evident in Windows 3.1 when the error "not enough memory" could have meant one of dozens of problems.

    --

    "How do you expect me to see the forest with all these damn trees in the way?!"
  89. The funniest post I've read yet! by K'tohg · · Score: 5, Funny

    Dude. I have never laughed so hard! I can only imagine a bad cartoon:

    "Frank!!! I think we have a problem!!!"
    "What?... I'll check the console logs..... Oh No!!"
    "What's wrong?"
    "Theres a 'Fatel Error: Wing no longher attached!' message!!"
    "What do we do Frank?!??"
    "I don't know... um... I'll open up the debugger!"

    Sick man, sick. I am very proud of you. ^_^

    --
    > SELECT * FROM brain_cells WHERE synaptic_rate > 0
    0 row returned
  90. Black box is the way to go, but by Anonymous Coward · · Score: 0


    Modular programming makes things easy. So, black box is the way to go, no question about it. But, the question of whether knowing enough about the black box is enough for a good programming method is misleading. Here's why. A module runs inside some environment. It has inputs and outputs, and other factors, and the environment that it runs on. To know the black box, you have to know the environment, so there you go, you must program modularly, but must know enough about the environment the module is in, so you can fit it in better. Obviously, you only need to know the black box to program the black box. The question is how much you need to know to know about the black box, because knowing the black box also means you have to know the black box skin, color, shape, sturdiness, etc., which the environment dictates.

  91. without an oscilloscope, it's all black box by DrSkwid · · Score: 1

    consider even something as simple as a file write.

    even with C most programs make plenty of assumptions.

    When was the last time you wrote code that wrote the data to the kernel buffers, waited until the buffers flush and then read the data back uncached from the device and test it for integrity?

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  92. Engineering Black Box and Whole System by mrs+clear+plastic · · Score: 2, Interesting

    Here are some thoughts that go beyond programming and include engineering as well. And not just systems vs black block, but concepts as well.

    Here are some random thoughts.

    Take the slide rule. Back in the days before destops, calculators, and palmtops, we had slide rules to do division and multiplication. You slide the rule for the numerator over the denominator
    (I think, its' been so long). You then look at the
    result.

    The thing is, you can see how 'close' the result is to whatever you desire (in a circuit or system). You can intuit how close thing are. You can easily 'play with the numbers' with a slide rule in some cases. Slide it a little to see what it would take to get the desired results. A teeny amount, alot; whatever.

    With digital calculators, it's a harder (for me) to see the changes visualy. All you see is a quanitive value. I can't look at the physical distances on a slide rule and make inferences.

    I can remember doing the same intuiting with meters. In the days before digitization and computers, we had analog meters. A needle would point to the value (voltage, amperage, whatever). Often the 'movement' of the needle is almost more important than the actual value itself.

    Take the tuning of a final output circuit in a radio transmitter. You dip the plate and tune for
    proper power. With an analog meter, you can see the needle do a quick dip. Sometimes with a digital meter, you can miss the dip, espcially if the circuit has a high Q value. The motion of the needle of the meter controls the speed at which I turn the various knobs.

    With a digital meter, I feel removed from the process of tuning.

    Monitoring the electrical service for a facility, whether it be a radio transmitter facility, or even a computer room; I am much more comfortable with an analog voltmeter and amp-probe. It's far easier for me to watch for hiccups (needles jumping rapidly or slowly) to indicate something is happening.

    I feel that all of these examples are important in my desire to be a part of the overall system, rather than being only a blind black box. I use my overall knowlege of what is happening in the system as a whole to get a 'feel' if what is happening right there and then.

    With only abstract figures and a blind black box interface, I would feel much alone and out of touch with the reality of the system.

    I think the same can be said about programming. In all of the projects I have been involved with, I have been fortunate enough to see the overall picture of the system at a high enough level to be able to able to be a 'part of the system' rather than a disconnected black box'. This is certainly true in my background in writing scripts to monitor the health of databases and operating systems.

    Mark

    --
    Cleara
  93. Re:Linux? by Anonymous Coward · · Score: 0

    Gotta love that guy from Amsterdamn :-)

  94. No, the opposite by Anonymous Coward · · Score: 0

    If anything, my experience bears out the opposite. The people I've worked with who didn't have any formal computer science education have more trouble looking at the big picture. They want to pick out a pre-packaged "solution" and plug it in. If it doesn't fit, they don't know what to do. If it breaks something else, they'll come in tomorrow to try to fix that.

    The also tend to be "network administrators" and other "I think computers are cool but I can't hack"-type jobs. They're an embarrassment to my profession.

  95. Law of Leaky Abstractions by Anonymous Coward · · Score: 1, Informative

    Joel Spolsky says it best in his Law of Leaky Abstractions. In other words, no box is totally black.

  96. Not Black box, but *PERFECT* black box by wowbagger · · Score: 5, Insightful

    I think the problem is not so much the "black box" mindset, but rather the perfect black box mindset.

    Being an EE who now does software design myself, I try to decompose a problem into smaller problems, and decompose the solution into smaller parts. However, I don't make the mistake of thinking that my smaller parts are each perfect - I try to ask "Now, if component X malfunctions, what effects will it have on this higher level assembly Y?"

    The problem is that many time CS folks are not taught that the system can be imperfect, so by exclusion they believe it to be perfect - one plus one will always come back two, disk writes will always succeed if there is enough space for them, and so on. Folks are not taught that sometimes 1.0 + 1.0 != 2.0 (rounding errors), that disks sometimes fail (sector not found - abort, retry, cancel), and so on.

    In Circuits 1, an EE-to-be is taught the idea of the perfect op-amp - infinite gain, infinite bandwidth, infinite possible output voltage, infinite input impedance. He is taught to use this model to analyze a circuit.

    He is then IMMEDIATELY taught that the model is BS, and starts to add to it - finite input impedance, finite gain, finite bandwidth, finite offset voltage, finite output impedance. The EE-to-be is taught to apply those non-ideal behaviors when needed, and taught to judge when they can be ignored.

    Sometimes I think the best thing in the world would be if CS and EEs had to work with robotics as part of their job. When they have to deal with sticky steppers, dust-clogged optics, and misfiring soleniods they will learn to be a bit more paranoid.

    1. Re:Not Black box, but *PERFECT* black box by mph · · Score: 1
      Folks are not taught that sometimes 1.0 + 1.0 != 2.0 (rounding errors)
      Most of us use IEEE floating point these days. If your FP implementation does not give exact results for addition of small integers, you have a serious gripe to take to the implementor.

      Other than that, good points.

    2. Re:Not Black box, but *PERFECT* black box by tangi · · Score: 1
      The ranges of imperfection of electronical components are part of their specs, right? Just like an exception or rounding error in SE.
      Those components sometimes fail to comply to their specs or simply burn, right? Just like our code then.
      So it's really a matter of paranoid mindset...
      ... or strategy. Should we enforce the fault tolerance of our code using defensive programming or prevent errors by extensive unit testing?

      I believe defensive programming tends to hide imperfections which may mature and explode later but harder.
      This approach makes sense in EE where the components are manufactured in large series but for hand-written software components, I'd be more skeptical. I'd rather check twice whether my box is appropriate and really black, not only dark grey.
      If 1.0 + 1.0 != 2.0 then I'd write a real black box where 1.0 + 1.0 == 2.0, instead of writing 2.0 - (1.0 + 1.0) < 0.001 everywhere.
      This can unfortunately be done only if the specs of the system clearly say that 1.0 + 1.0 != 2.0.

      The issue is then in fact about packaging the imperfect black boxes in a perfect way, rather than assuming everything could be incorrect. Never had a bug in a defensive test ;-) ? I had and I now limit this strategy to the debug mode to cause avalanches rather than unnoticeable slips.

    3. Re:Not Black box, but *PERFECT* black box by tangi · · Score: 1
      Nobody shocked by the "2.0 - (1.0 + 1.0) < 0.001" test?

      I so have ABSolutely succeeded in demonstrating the danger of sourcing perfection out of the box ;-)

    4. Re:Not Black box, but *PERFECT* black box by wowbagger · · Score: 1

      Of course I was greatly simplifying the idea, but oft-times a value that prints as 1.0 is not really 1.0.

      And it's commonly accepted that comparing floats for equality is BAD - one compares for >= or <=, but not != or ==. If one needs to test for equality, one checks fabs( (a-b)/fmax(a,b)) < epsilon, where epsilon is chosen based upon the problem domain.

    5. Re:Not Black box, but *PERFECT* black box by wowbagger · · Score: 1

      Proper defensive programming means not only handling errors from within, but LOGGING them as well.

      I wouldn't want this:

      float sqrt(float x)
      {
      if (x < 0.0) x = -x; ...
      }


      I'd want this:

      float sqrt(float x)
      {
      if (x < 0.0)
      {
      ASSERT(x >= 0);
      x = -x;
      } ...
      }

    6. Re:Not Black box, but *PERFECT* black box by blazin · · Score: 1

      float sqrt(float x)
      {
      if (x = 0);
      x = -x;
      } ...
      }


      Maybe I'm missing something, but wouldn't you want the order of the ASSERT and the x=-x; reversed? All I see happening here is basically guaranteeing you get an assertion failure.

    7. Re:Not Black box, but *PERFECT* black box by Anonymous Coward · · Score: 0

      I swear the assert code was in there, but it didn't show up. I backed up and it was there...

    8. Re:Not Black box, but *PERFECT* black box by wowbagger · · Score: 1

      Exactly - what I want is this:

      If x greater than or equal zero, all is well.

      If x negative, then ASSERT. If the program was compiled with -DNDEBUG, the assert will compile away into nothing, and X will be negated, allowing some sane response. But if the program is build normally, then ASSERT a failure rather than masking the problem.

      And you probably weren't careful enough in copying the code, and got bit by failing to change the >'s into &gt;'s and the <'s into &lt;'s.

  97. stupid question... by Anonymous Coward · · Score: 0

    Programmers that suck work as programmer in the industy..

    Programmers that rock study e-technics and program in their spare time ;)

  98. Confused by gpinzone · · Score: 1

    There's two issues here that are being confused. Black Box programming is a GOOD thing because it forces programmers to realize what their inputs and outputs need to be. Black Box programming with unit/integration testing is a GREAT thing because it rigirously tests the interfaces between the black boxes to ensure buffer overflows, etc. don't happen.

    Looking at the "big picture" is part of design, not coding, per se. If you design first and THEN code, you already examined the big picture and can happily code your black boxes without worry.

    1. Re:Confused by SoupIsGoodFood_42 · · Score: 1
      Mod this up.

      This is what the whole point of the artical is. Nobody was suggesting that programmers change the techical way they write code. This is a design/concept/planning issue that isn't looked at enough.

  99. Hard Software Engineering by PhaserBlast · · Score: 2, Informative

    What you are talking about has been a serious concern for a number of researchers. In particular David L. Parnas has been working on this problem for many years now. The basic problem is that software specification often lacks in precision required to make appropriate decisions when writing the software. This is compounded by the lack of precise specification of the OS itself.

    Take a look at the CRL, SERG and SQRL reserach documents at

    http://www.cas.mcmaster.ca/serg/serg.publications. html
    In particular read the CRL Report 241 - "Predicate Logic for Software Engineering" - it covers some of the fundamentals. Then read up on CRL Report 259 "Formal Documentation of Well-structured Programs". There is tons of other interesting reports there that address some aspects of this very issue.
  100. MANAGED CODE by Anonymous Coward · · Score: 0

    That is what this is for, to remove the mop and bucket code that the developer need not spend 90% of their time coding, and 10% problem solution.

    Managed code is the future.

  101. Pick a question by GrouchoMarx · · Score: 1

    That's really multiple questions rolled into one there. :-)

    1) Blackboxes. You have to code in a black box. Well, either that or write the entire system, from the OS through the UI, in binary. I'd advise against it. :-) The question isn't *should* you think in black boxes, it's at what level do you modularize. THAT'S the tricky part.

    In general I'd say that everyone on a project should have a cursory understanding of every other part of the project. The UI guy doesn't have to know SQL, but he should know the basics of an RDBMS, and know that, say, user login information and their preferences are stored in separate areas. And vice-versa, the DB guy shouldn't have to worry about details like what color the widgets are going to be, but he should know that the user is expected to access both their login information and preferences at the same time 90% of the time, because that means combining the two will not only speed up access (fewer joins) but will result in less processing to format correctly, which means fewer opportunities for bugs. (Just as an example.) Making sure that everyone has that cursory understanding of the whole system, and that things are "chunked" properly, is the job of a good manager.

    2) Theory vs. Practice. In theory, there is no difference between theory and practice. :-) Experience will only get you so far. At some point, you HAVE to know the Why in addition to the How. And of course, the Why is useless without the How. It took me a while to wrap my head around C memory handling, but once I did (and it was one of those lightbulb moments), my code got a LOT better and a LOT cleaner. I was tutoring someone in C++ at one point, and he simply couldn't grasp arrays and iterative loops until I explained it to him in terms of memory offsets. (Another lightbulb moment.) Of course, neither of us could have had any idea what the theory actually meant unless we'd actually written something so that we could apply the theory in our minds, and then go back and REapply it to the problem.

    That's a problem of the educational system. They don't integrate theory and practice enough. They do all theory, and then you get out into the real world and do all practice, and the two never meet. If they did, we'd have better programmers and better programs.

    --

    --GrouchoMarx
    Card-carrying member of the EFF, FSF, and ACLU. Are you?

  102. Roman bridges by giampy · · Score: 4, Interesting

    This reminds me of how the romans used to test their bridges: they put the designer under the bridge while marching over it with the entire legion.

    Of course, a bridge i a MUCH simpler thing than a program, but, hey, 2000 years, all the bridges are still there !!!

    --
    We learn from history that we learn nothing from history - Tom Veneziano
  103. Black boxes are good by Anonymous Coward · · Score: 0

    I think that the problems that are mentioned in the question are not mostly due to people having a "black box" or "virtual machine" mentality.
    In fact I believe it is exactly the opposite that holds true. "Black box" mentality is good when it is applied correctly and sadly most people don't posess these abilities.
    You, in most situations, don't need to know the nitty gritty specifics of the underlying hardware, you do, however, need to know about the characteristics (there is a difference but I won't go into that here) of the underlying hardware; stuff such as latency issues and memory footprint. I conjecture (as have others more clever than me) that the reason that we have so much junk software is that most programmers don't know how do design interfaces for black boxes and put them intelligently together (or don't think that they have the time to do so).

    Strive to build robust black boxes that have well designed interfaces and implement those blackboxes well and remember: premature optimization is the root of all evil.

  104. Absolutely! by casmithva · · Score: 5, Interesting
    I've been quite frustrated over the years, interviewing recent college graduates whose software development abilities seem to be limited to problem-solving. They didn't know about requirements, design, configuration management, testing, lifecycles. They didn't put as much thought into how others would use their libraries or classes as they should've, eventually causing some serious redesign to be done to make overall integration easier. Only after a couple of years of having design documents ripped apart and pissed upon, having CM staff threaten them with dismemberment, having QA people file a ton of defect reports against their work, and having their phone ring in the wee hours of the night did they understand the bigger picture.

    I took a couple of CS courses in college as part of my Math major. They were full-blown CS courses, not courses that had been altered for us Math majors. And they were nothing more than problem-solving courses -- and the problems being solved were so utterly asinine that it was laughable. However, when I studied in Germany I took a CS practicum course where we were assigned the task of creating a graphics program in X Windows on SunOS 4. The class was divided into groups: GUI, backend algorithms, SCM, QA, and requirements and management. There were design sessions and reviews, unit and integration testing, etc, etc, etc. It's the closest I'd ever seen to the real world in academia. I've never heard of any American college or university offering such a course, and no one I've interviewed ever had such a course. That's not to say that it's not offered somewhere, but it just doesn't seem all that common. And that's a real shame.

    1. Re:Absolutely! by razmaspaz · · Score: 1

      I would have to agree As a student I am constantly frsutrated by the over emphasis on calculus(not that calculus is bad) and theory and the lack of emphasis on engineering. When I went to college I thought I would learn to write software in CS. Come to find out there are very few CS Departments whose goal is to teach software enngineering. they want researchers. It is frustratign to me becasue I know that 90% of us are going to get jobs in the private sector and we spend 90% of our time learning about academia. On the other side 10% of us wantto be researchers and we spend 10% of our time on software engineering. What is going on?

      --
      I tried for 5 years to come up with a clever sig...only to realize that I am not clever.
    2. Re:Absolutely! by sahala · · Score: 1
      I've never heard of any American college or university offering such a course, and no one I've interviewed ever had such a course. That's not to say that it's not offered somewhere, but it just doesn't seem all that common. And that's a real shame.

      Check out Carnegie Mellon's CS program, as well as their Software Engineering dept. There are a few courses offered to undergrads which pace students through the full blown software development process. The Software Engineering masters courses are even more rigourous. And this was a few years ago.

      That said, I would hope that students obtain this sort of experience through jobs/internships.

    3. Re:Absolutely! by Lord+Ender · · Score: 1

      CIS 560 (Systems Software Engineering) at Ohio State University seems like what you want. We have to produce 500-1,000 pages of documentation. They give us the requirements for the project (assembler/linker/loader and emulator for a certain computer archetcture), and we in teams for the entire quarter on the one project. Some people do mostly testing and QA, some do mostly documentation, everyone works to come up with the design and clarify the "client" (professor) desires for the project. OSU has a very well respected engineering college, so maybe we are an exception, but in my experience, American colleges are as good as the German one you attended.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    4. Re:Absolutely! by Stween · · Score: 1

      You've obviously made the incorrect assumption that Computing Science is meant to teach you Software Engineering then, where the two subjects are completely different.

      Yes, there's a lot of coding involved in CS, but CS is more theory based, the study of complex algorithms, and the broader spectrum of topics to cover, gives the student a clearer understanding of computing than could be achieved otherwise.

      Software Engineering edges far more toward the design process, professional software development techniques, and the building of embedded systems than CS would ever try to - it is far more a course for people just trying to get a qualification for the (often flaky) promise of a high paid job afterward.

      Both are challenging courses, but far too many people make the mistake you made. I'm happy on my CS course, and enjoy the challenges that some of the material has presented me with, and will continue to do so, but then I'm interested in CS, and not just getting a job where I get to code day in day out.

    5. Re:Absolutely! by pastryp · · Score: 1

      Ah yes, CMU. I went there. I never took a software engineering course though I was given a brief summary of the lessons learned.
      1. Things are never finished on time
      2. Things never work
      3. There are always ppl to get pissed at.

      I think that pretty much summarizes building real life software. There's really no reason for a university to offer a "real life" course, and no reason to take one. If you want that then go get a co-op or something. I certainly wouldn't pay tuition so I can sit in a bunch of meetings where I can discuss what error message should pop up on the screen...

    6. Re:Absolutely! by pjp6259 · · Score: 1

      Both of the universities that I attended offered a two semester "Senior Project" that was done in groups of 3-4. The senior project required that you have requirments docs, design docs, implementation, various levels of testing, etc.

      In addition both universities required a "Software Engineering" class which was similiar, but was only a single semester and focused on teaching students how to do things like requirments, design and testing.

      I thought this was pretty standard at universities in the US.

      --
      Computers don't make mistakes. What they do, they do on purpose.
  105. Definitely! by jhouserizer · · Score: 4, Insightful

    While there's definite benefits of treating software components as "black boxes", I agree with the asker of the question that there are some definite negative side-effects.

    For instance, we've got a couple of developers that just don't know how to work with the team, and figure that they can go sit in their dark cubes and code away their component as a black box that with simply fit in with everybody elses stuff. Common problems that arise are:

    • Different logging schemes
    • Different configuration schemes
    • Different admin-alerting mechanisms
    • Components that don't match the design pattern that all other components follow - thus making them harder to understand.
    • Components that expect some type of "global" data to exist, that simply doesn't.
    These issues have led to no end of grief for those of us who do communicate with each other about what they're doing.

    Abstraction is great!, but you still need to make sure everything fits together correctly, and not just at the interface level.

    1. Re:Definitely! by Anonymous Coward · · Score: 0

      If those are the typical problems you're running into, then your developers aren't coding their components to the standards your project manager put in place. You DO have standards, don't you?

      All of these items are things that can easily be (and rightly should be) standardized throughout a project and/or enterprise.

      If things aren't fitting together correctly, then the person (or team) whose job it was to define those interfaces dropped the ball.

    2. Re:Definitely! by jhouserizer · · Score: 1

      We do have standards / conventions that we ask everyone to follow, and as I said, most of us do. However, there are a few people who think they can work in a cave and make their own "black boxes" - regardless of how many times we try to educate them on the correct ways to do things - and they even nod their heads and say "yeah, I'll do it that way", but then don't.

      I've seen people like this at other places I've worked too - the typical "cowboy coder". I think this is a prime example of the taking the idea "I can make my component a black box, and whatever I do won't affect anyone else" way too far.

      Or maybe it's simply "I don't care what you think, I'm going to do everything my way" gone way to far... but even then, it's justified with the "black box" idea.

    3. Re:Definitely! by SWPadnos · · Score: 2, Insightful

      I'm not sure that this problem is with the black box mentality - it seems to be with those coders.

      Logging scheme: Should be part of the interface definition (the format of log messages should be part of the spec). The logging functionality should be another black box module (with a suitable interface for all portions of the project).

      Configuration scheme: Should also be part of the spec. If it's done wrong, then the module doesn't meet spec, and the programmer(s) should be reminded that their paychecks are dependent on writing modules to spec.

      Admin Alerting: Like logging, if there is a specific format / function to use, then this should be part of the spec.

      Design pattern: The spec should incorporate any company coding standards (by reference, if it's too long :). It is then up to the programmers to follow this standard. (I see that as a different issue than the black box thing, though)

      Global data: This should never be touched, unless the access is defined in the spec.

      It looks to me like:
      1) the specs are not complete; and 2) that the programmers in question don't adequately communicate when they encounter problems coding to the spec. (It's perfectly valid to discuss changes to a black box specification if problems are encountered).

      --
      - The Sigless Wonder
    4. Re:Definitely! by Chazmyrr · · Score: 1

      I work for a megacorp so my viewpoint may not apply to small business coding.

      If they consistently don't do what they are told to do, why are they still on the project? Why are they still employed?

      It costs the company significant time and resources to go back bring this type of code up to standard so it can be included in a production release. If other functionality that depends on this code has to be pulled from a scheduled release, it can cost millions.

      Millions of dollars vs. a severence package for the guy who can't follow the rules. You do the math.

    5. Re:Definitely! by Minna+Kirai · · Score: 1

      Why are they still employed?

      Usually it's because they're worth 100 other coders.

      I work for a megacorp, and have observed a team of two "cowboys" outperform a group of 40. With that kind of performance, the resources for an extra person to make the code conformant is an acceptable overhead. (And odds are that if the code doesn't conform, the standard is bad)

      Computer programming is a rather unique field in that such productivity disparities are still a fact of life. (Acting and music are similar in that way). Brooks has examples of this phenomena.

    6. Re:Definitely! by Goth+Biker+Babe · · Score: 1

      This strikes me as a management issue rather than a software one. The question you have to ask is why these people aren't towing the line. There is no excuse!

      If it's a case of these two being a couple of stars on the coding front then what you need is the right manager who can control them. My team at work comprises some scarily smart people with Phds comming out of our ears. Our boss is ideal, he knows when to let us run with the ball and when to reel us in. (The last sentence was nasty!).

  106. Myabe SW black boxes are too easy to create? by DakotaSandstone · · Score: 1
    I didn't mean to imply we should all rewrite WinSock or "get rid of it", but I guess that could have been misconstrued. I was just noting this is a complex issue. I agree with you completely: WinSock is basically Good. But even the interfaces to black boxes need to be studied so one understands their nouances.

    Two other thoughts:

    (1) Maybe software black boxes are too easy to create. That's probably true for just about anything, but consider how easy it is to scrape together a .DLL with a few hasily thought out entrypoints and release it to clients. Maybe API design should be more rigorous. Here's some flamebait: I happen to think the NT Kernel API is very well thought out, whereas the Linux Kernel API is, well, not as much.

    (2) Maybe someone shouldn't be "allowed" to use an API until they've, well, sortof taken training on it to understand the subtleties of its use. Maybe just learning "the basics" about an API isn't good enough. How much of software instability could just be explained by a programmer not understanding the function s/he is calling?

    Thanks for the reply

    --
    Nothing is so smiple that it can't get screwed up.
    1. Re:Myabe SW black boxes are too easy to create? by p7 · · Score: 1

      It isn't the APIs fault someone is misusing it. It sounds like what you are saying is that black box programming of APIs lowers the bar so that less knowledgeable programmers can access that higher functionality? That has nothing to do with black box programming. You could easily say that C code is too easy too create and it allows those programmers that don't understand the subtle nuances of ASM to make programs that might potentially be malicious or unintentionally damaging. To take it to an extreme, maybe we shouldn't let grandma's use email, they may unintentionally open an email virus. There will always be bad people out there, obfuscating the system to stop them and hindering legitimate users is much worse than what they do.

    2. Re:Myabe SW black boxes are too easy to create? by Zueski · · Score: 1

      I think you are missing his point. Black box programming hides details from you, which is in most cases a good thing, but is not intrisicly good. Being able to use WinSock to write a network application does not a network programer make.

      --
      please don't feed the monkey
    3. Re:Myabe SW black boxes are too easy to create? by p7 · · Score: 1

      Nor does being able to write directly to the network card hardware. It isn't the API that is the problem. Black box programming shouldn't hide any important details from you. Any special cases should be noted, as well as performance data if that is critical to your application. Blindly dropping data into a call without knowing that the call was designed to a certain spec is bad design.

  107. Case Study by K'tohg · · Score: 1

    I was at a company that was so into the 'black box' idea that simple things like annoying bug fixes became imposible.

    Basically (for the programming geeks) they set up an error handling policy where (deep in the program execution) it trapped all exceptions including fatal programming errors and sent them up the chain. At each level of the program it caught the exception created a new one and dicarded the old one. So by the time the user actually got an error message it was about some butterfly flapping it's wings in Africa and not about the null pointer you tried to write to.

    Anyway this IMHO is an example of 'black boxes' going too far. If you build a well designed architecture and proper object API schemes then you shouldn't run into issue like such. But if you put on the blinders and assume that whatever your doing in your black box is of no concern to the rest of the world then you are destined for doom.

    You have to look at what is going on around you to properly deal with things. This goes for real life as well as programming. Far too many drones with blinders who can't see past there own nose are walking around lately.

    --
    > SELECT * FROM brain_cells WHERE synaptic_rate > 0
    0 row returned
  108. the need, the problem and the solution by tangi · · Score: 1
    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?
    I don't think CS teaching is directly responsible for this situation.

    The real issue may rather be that most people tend to think in term of solutions rather than problems.
    The prerequisite to the solution is unfortunately the ability to state the problem correctly.
    Even when we do so carefully, we usually lack of an accurate awareness of the real need.
    Unconscious needs lead to poorly stated problems which then lead at best to inappropriate solutions.
    These inappropriate solutions are finally stacked one atop the other and called "layers of abstractions".

    CS teachers, students and programmers are just human. Nothing wrong with that provided they all know their biggest weakness.

  109. Black Box vs. black box by NaugaHunter · · Score: 1

    When I was taught, the black box mentality related only to specific functions/methods. e.g. function DoThingsToX(X,Y,Z) would change only X and have no side effects, or at least no undocumented ones. That was it. But in programming, all we were concerned with was one part of a project - with specifications on what that part should do, and on what other parts would did. Analysis & Design covered the big picture, where how the interactions of the lower parts should be planned. All requirements and interactions of what was to be programmed would be worked out ahead of time.

    Of course, this only involves "white paper" (new) projects. In the real world, I have only been involved in two or three of these, and at the risk of inflated my ego they went pretty well. But 97% of my career has been divided between supporting or adding functionality to existing software. In my opinion, this is where a black box mentality can cause problems. I 've regularly run into functions/procedures that didn't work as described, or expected, or weren't tested, or made undocumented assumptions, and so on. However, that didn't stop me from ensuring what I worked on did what it was supposed to, and passed testing, and effectively was a black box in and of itself.

    As to the professors that insisted the machine is a black box, I have to say that generally speaking I agree. For what I work on, as long as the hardware is up my only concern should be that memory requests work. The part that I think is confusing is that what was implied was hardware is a black box if you aren't directly concerned with it. If my software is to control a specific network card, then I better know everything there is to know about that network card. If my software just needs to talk through it to a network, then all I need are the protocols and error messages, and it is a black box for how it does what it does.

    --
    R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
  110. Re:GET SOME PRIORITIES!!! by cybergibbons · · Score: 2, Insightful

    No, when something bad happens, it normally highlights smaller problems that all are part of the situation. So, instead of mourning the loss of 7 people who you probabky didn't know, which is futile, get something out of it.

    I also don't understand why this is worse than other people who die in air crashes, as soldiers, in cars, or whatever. They've done something with their lives. Get over it.

    It's no worse than the Challenger disaster, and certainly no worse than the Apollo fire. Those men died horrible, slow deaths, for no reason.

  111. I thought.. by Anonymous Coward · · Score: 0

    I'm an embedded systems engineer. I've designed and programmed industrial, medical, consumer, and aerospace gear. I was engineering manager at a contract design house for a while,

    and currently employed at a petroleum distributing facility that specializes in distributing directly to small and mid sized gasoline engine supply tanks through unmanned network connected POS terminals. Oh yeah, they also sell beer and smokes too.

    Based on the amount of hard time job hunting posts here lately I assumed this was the start of another one...

  112. Engineers can see all an action's consequences by Minna+Kirai · · Score: 4, Funny

    If you're really an engineer, then you shouldn't have any trouble seeing the big picture.

    Unlike, say, managers or interns, Engineers are trained to think through all the consequences of an action.

    If you can't predict the effects of your software code on not just the rest of the project, but the economy and society as a whole, then I guess you've been slacking off.

    (nobody flame me without reading the cartoon)

  113. Re:School Doesn't Prepare You For Real World Codin by Anonymous Coward · · Score: 0

    O boy is the real world gonna hit you hard in the face.

  114. A happy medium somewhere by agaznog · · Score: 2, Interesting

    It is true that most, if not all, abstractions are leaky. But it is still essential to be able to work in "black box" mode to contain complexity when necessary. It is just as important to be able to flip back and forth between levels of "nested black boxes" when necessary. Of course no single person can learn everything, which is why there are specialized developers, and management software engineers. Meaning at higher or lower levels of abstraction can be preserved (ie. abstraction leak prevention) when working from a particular level: To ensure that everything is sound and complete in other levels, you usually have superior ranking software engineers looking over the shoulders of the code monkeys. So, if software fails because of naivete on the part of a particular developer, it's most likely an engineering management and/or software architecture problem. You can't blame a single developer for not knowing everything. You might (and probably should) blame his/her managing engineering for not ensuring that everything fits together at higher levels. Or you might the software analysts/architects for not designing everything to fit together properly. If you ranting against the general usage of abstraction in CS, you are naive. Everything humans know is an abstraction. Computer engineering is an abstraction. Electrical engineering is an abstraction. Biology, chemistry, physics and everything in between are abstractions. Mathematics is perhaps the ultimate abstraction of all. Unless you are suggesting that we all should attain some sort of zen like state where all the semantic levels converge into a giant mass, you cannot escape the "black box mentality". (Trying to suggest that programmers need to code in only machine? Or maybe raw electrical impulses?) Rod

  115. Yes and no by brandonY · · Score: 2, Interesting

    On the one hand, you should be able to look at a computer as a black box. If it's not an operating system, and it's not a driver, you shouldn't have to know what sort of system your code is running on. Portability is a wonderful, wonderful thing. On the other hand, you should always take into account what system your program will run primarily on, and you should always be aware of how the systems under your program probably work so that you don't duplicate functionality, try to out-guess the compiler, or make all sorts of horrendously expensive blocking calls that you don't need to make. I'm an undergrad at Georgia Tech, and I've found that one of the big differences between a solid degree in computer science and a weak one is that the better programs open the black box as much as possible, especially later in the program. Sure, the early classes are taught in pseudocode and java and such, but the farther along the education gets, the more we have to take classes like ECE 2030 (which explains transisters up to CPUs) and Design of Operating Systems (which explains printf down to the CPU). Another big difference is theory and knowledge of design paradigms, from the simple, like hash tables, to the more unusual, like factory classes. It makes a big difference to see the big picture, but then again it's quite possible to write perfectly acceptable code without the slightest idea how the API works. Otherwise nobody could write Windows software. Caching and pipelining and all that stuff is useful to remember, but there's a reason most of it is completely transparent -- so you don't have to know it's there.

  116. It's not the box, more likely it's the language by Kingpin · · Score: 1


    A VM is a good thing. A crummy developer can crash the VM, but not the OS. The developers making the VM should be top-notch naturally and work with the best tools/research available. This is why Java on a mobile phone is good, you may crash the VM, but not the underlying OS (ie. the phone).

    AFAIK mission critical aerospace software gets written in completely checked code, ie. errors cannot occur unless dealt with, I believe that ADA is such a language?

    --
    Unable to read configuration file '/bigassraid/htdig//conf/14229.conf'
    Geocrawler error message.
  117. Stuff that's bigger than any of us. by DoraLives · · Score: 2, Interesting
    I think the problem increases as programmers are less and less a part of the complete systems development life cycle and are contracted to work on individual components of an overall system.

    ANYTHING of sufficient size and complexity is by definition something that no one of us can comprehend in its entirety. This being the case, there's no hope of ever seeing to it that everything from minor annoyances to catastrophic failures will be abolished.

    My experience with this sort of thing isn't in software, it's large scale construction projects. Launch pads, to be precise. The basic goal is "build something that the Space Shuttle can successfully fly off of on launch day." In the real world, NOBODY knows exactly what this is going to involve down to the finest detail, and the possibility for malinteractions of that detail.

    Fortunately, the launch pad, once built, more or less just stays put and continues doing the same job over and over. With software development, no such stability is feasable. We're still learning more and more about how computers work, both hard and soft ware. In this phantasmogoric landscape, with things morphing from this to that with bewildering speed and little overall pattern, the guys who have to grind out the code (and all their bosses right up to the CEO) have no prayer of ever getting it right. Don't be so hard on yourselves, it's a situation that you can NOT control fully. Just do the best you can and let Charles Darwin sort out the mistakes.

    --
    Is it fascism yet?
  118. top-down-bottom-up teaching by Diphthong · · Score: 2, Informative

    In the lovely concrete blob where I went to college, I think they more or less got it right.

    First they teach the basics of programming (variables, environments, scoping, addition, subtraaction, subroutines, etc.) and all of that happy stuff.

    Then they teach you how to build a NAND gate using transistors.

    Then they teach you how to build a CPU using NAND gates.

    Then they teach you how to call subroutines using RAM and registers and pointers and that CPU you just built.

    Then they go back to the basics of programming, now that you have a full appreciation for everything that happens when you add two numbers together, and proceed from there into the nether regions of algorithmia.

    To me it seems to be a good approach -- it gives you the basic destination first, then it gives you the foundations to get there, and then it goes onwards. It means you've been exposed to every level of what you're working with (to a point -- we never doped silicon to build NAND gates!), so you know what's down there, and you also see the importance of ignoring what's down there when it doesn't matter.

  119. Re:GET SOME PRIORITIES!!! by Anonymous Coward · · Score: 0

    Well, the previous shuttle accident only involved a bunch of teachers. They deserved what they got, what for torturing poor, helpless school children with their homework and their quizzes day in and day out. This one involved real, honest-to-god astronauts, and thus was a true tragedy.

  120. BLACK BOX by Anonymous Coward · · Score: 0

    Outa school for 20+ years but was always taught the black box. The courses I've taken since have all taken the black box approach.

  121. All Systems Need Forth? by Baldrson · · Score: 3, Insightful
    Bit serially, although Forth isn't the be-all and end-all of programming environments, it does have the elegant simplicity that should be sought by whole systems.

    One of the priemere embedded systems languages, Forth was invented by Chuck Moore. I like Chuck Moore's 1% Code Page. His introduction:

    I've studied many C programs in the course of writing device drivers for colorForth. Some manufacturers won't make documentation available, instead referring to Linux open source.

    I must say that I'm appalled at the code I see. Because all this code suffers the same failings, I conclude it's not a sporadic problem. Apparently all these programmers have copied each others style and are content with the result: that complex applications require millions of lines of code. And that's not even counting the operating system required.

    Sadly, that is not an undesirable result. Bloated code does not just keep programmers employed, but managers and whole companies, internationally. Compact code would be an economic disaster. Because of its savings in team size, development time, storage requirements and maintainance cost.

  122. Embedded? by Red+Rocket · · Score: 1


    I'm an embedded systems engineer.

    Really? What are you embedded in?
    Just hold tight. We'll use some Practical Extraction and Reporting Language and have you out of there in no time.

    --
    - Hail to our fearless misleader! Fool speed ahead!
  123. "Big Picture" or "Reuseable Code" ??? by TFloore · · Score: 1

    If you're doing a one-off development, and everything is going to be for that specific purpose and no other use, sure, Big Picture stuff can be useful.

    But if you want to make reuseable code that you can then take on to your next project... the Big Picture is a hindrance, not a help.

    Most people tend to do one or the other, and not both. Writing good reuseable code *requires* abstracting away details that would otherwise get in the way of writing modules/objects that are general purpose.

    As with so many things, this is a balancing act, and you get better with experience. You get better at asking about constraints, flexibility, limitations, interface requirements, error handling, and all the other things you have to keep in mind when writing code you will be proud to admit you wrote 5 years down the line.

    Don't expect to leave college knowing everything you need to know for the rest of your professional life. Continue learning and picking up skills, and you'll justify those fat raises and bonuses you want.

    --
    This is my sig. There are many like it but this one is... Oops. Frank, I've got your sig again! Where's mine?
  124. Re:Probably (levels) by Anonymous Coward · · Score: 0

    web development as an example?

  125. Supportable software? by BoomerSooner · · Score: 1

    What the hell is the point of supportable software? How the hell do you plan on keeping your job when the next guy (who's in India and $5/hour instead of $55/hour) uses your "excellently programmed code" to work yourself out of a job?

    Seriously, screw the next guy. Just follow your companies procedures (no more no less) and move on your merry way. I've never met a software engineer that got paid less than a "support technician". The difference is if the support person could do the programmers job, they would be (I was a support person initially while trying to get the necessary experience to become a good developer).

    Your first few jobs usually pay shit because you know shit. Once you've been in a couple of situations you can learn from you become the 3-4 year experienced developer most jobs are looking for (not too expensive, but knows his/her shit).

    I make over 100k in Oklahoma and it's no coincidence my first 2 jobs were in Dallas Texas. I used Dallas to get a better job (there are almost zero entry-level positions in Oklahoma) where I really wanted to work. No matter how much schooling/self-learning you do there is no equal to real world experience and making someone elses job easier isn't the domain of the programmer, it's the IT manager/CIO/Team leader's job to set the goals and timetable of the project(s). In my case I'm the project manager and one of the developers so I make damn sure our specs, design docs, methodologies are followed precisely (since I've got to mop up the messes).

    1. Re:Supportable software? by mobiGeek · · Score: 4, Insightful
      Seriously, screw the next guy. Just follow your companies procedures (no more no less) and move on your merry way.
      When you said "seriously", you were joking, right?

      I mean, c'mon! The great U.S. of A. is gonna remain on top of the world by "obscurity" ?

      The reason the guy in India/Mexico/Nebraska/whereever makes $5/hr and is worth it is because he does a job that is only worth $5/hr. If the job is worth $55/hr, then a $55/hr person will get that job.

      Do you honestly believe that you are able to hold onto a higher paying position because your code is not documented? Do you honestly believe that this is the way to stay ahead of the game?

      It is this mentality that has stifled innovation. People spend all sorts of time trying to figure out how-in-the-hell they got to where they are instead of trudging forward down avenues unknown.

      Unions in the Western World are doing just this: pressure tactics to avoid "outsourcing" of work. The reason the work is being outsourced is that it is no longer work worthy of a high-paying (and supposedly higher-quality) employee. The work is being shipped off elsewhere because someone else can do it cheaper (possibly at a lower quality or a lower efficiency, but if the resultant product effectively meets the desired goal, then it is the right move for the company and, ultimately, ITS CUSTOMERS).

      The Unions need to work with the companies to find ways to take these higher-productive workers and make the company even higher returns. But Unions don't "work with" management and fight all change.

      Oh, don't get me wrong! I know that management has just as many boobs running the show too. They make plenty of mistakes themselves. But the nature of "management vs. union" mentality keeps the unions from effectively working with (upper) management to enable change that makes better use of all resources and, in turn, makes the company more profitable.



      Seriously (no, I'm not kidding...I mean seriously), you cannot believe that documenting your code, outlining your procedures, using effective architectural designs, and improving the company procudures is threatening your job, can you? If you do, then realize that a single, competent manager is all it takes to tear down your warped house of cards...

      --

      ...Beware the IDEs of Microsoft...

    2. Re:Supportable software? by cmacb · · Score: 2, Insightful

      I can understand the original posters "screw them" attitude. It is very frustrating for people who actually want to do quality work to be ultimately punished for trying to do so.

      Process improvement methodologies that proliferated in the 90's seem to be falling by the wayside. I think part of the problem is that at about the same time RAD techniques promised upper management almost instant turnaround on their requests. The RAD techniques, and the tools that go with them have turned out reams of bad and unmaintainable code that companies will either have to live with, or replace the old fashioned way (which involves thinking about business rules, a process quite foreign to most of the people involved).

      Hopefully the current generation of programmers who were obsessed with pretty graphics will be replaced by a new generation who take those things for granted and can get back to solving actual problems.

      Regarding the original story I do find it odd that the existence of that box in the wild represents a threat. One would HOPE that these transmitions use encryption techniques that depend on large keys for their security and not on the obscurity of the algorithm itself

      On the other hand I've read that a lot of this code is written in Ada and NASA is going to be walking on eggshells trying to modernize anything that uses this old software.

      While it may be completely debugged, transition of this software via new hardware and a new Ada compiler, or a re-write to a more modern language is bound to generate errors.

    3. Re:Supportable software? by dirvish · · Score: 1

      Did you read the post? He was talking about the end-user being supported, not the software being updated. If you write a program that is so easy to use that companies that implement have few support issues then you will probably keep your job, regardless of how easy it is for someone else to update your code.

    4. Re:Supportable software? by God!+Awful+2 · · Score: 1


      The reason the guy in India/Mexico/Nebraska/whereever makes $5/hr and is worth it is because he does a job that is only worth $5/hr. If the job is worth $55/hr, then a $55/hr person will get that job.

      Sorry, that's just fucking dumb. Apparently, you don't understand that different countries (cities even) have wholly different economies. There is no intinsic value of a job, independent of where the job is performed.

      I mean, c'mon! The great U.S. of A. is gonna remain on top of the world by "obscurity" ?

      More likely, the great US of A is not going to remain on top of the world.

      -a

    5. Re:Supportable software? by mobiGeek · · Score: 1
      Apparently, you don't understand that different countries (cities even) have wholly different economies.
      I don't think this is "fucking dumb". Basic economics states that supply and demand will eventually have people paying what a product is worth.

      If coding jobs are being shipped to somewhere because it is $5/hr, then that's because the job is truly worth $5/hr. You think if the job was worth $55/hr that they guy living elsewhere wouldn't collect it? Is he generous enough to take a hit solely because he doesn't live in downtown Metropolis(tm) ?

      No.

      If management moved the job somewhere hoping to save $50/hr, then they will either:
      (a) be happy with what they get
      (b) get the work back to people who can give them the quality they want (at they price it is worth).

      Management may (or may not) take a hit for their move. The company may (or may not) take a hit for their move.

      This is how economics works at the macro level (which is close to the topic of the original post).

      --

      ...Beware the IDEs of Microsoft...

    6. Re:Supportable software? by Fulcrum+of+Evil · · Score: 1

      I mean, c'mon! The great U.S. of A. is gonna remain on top of the world by "obscurity" ?

      No, we are selling our seed corn. If this keeps up, what will we do when the other guys decide they don't need a middleman.

      The reason the guy in India/Mexico/Nebraska/whereever makes $5/hr and is worth it is because he does a job that is only worth $5/hr. If the job is worth $55/hr, then a $55/hr person will get that job.

      No, the reason is that $5/hr is pretty decent money in Bangalore, or at least livable, while it's egregious in San Francisco. You can't live on $5/hr in San Fran and you can't move to India because you're probably white and American and Indian corps don't hire for that. Also, India is fairly protectionist, so good luck getting a work permit.

      It is this mentality that has stifled innovation.

      Irrelevant. Innovation usually starts with a new codebase. What best stifles competition is when a monopoly or a cartel is formed in order to protect the status quo.

      The reason the work is being outsourced is that it is no longer work worthy of a high-paying (and supposedly higher-quality) employee.

      Worth doesn't enter into the discussion. The only reason work is being outsourced is because it appears cheaper. It is cheaper if your idea of vision has a 90 day window. It discounts the lower quality (and lower number of successful projects), the difficulty of suing someone who either steals your product or sells it to the highest bidder, and the long term problem where we don't have any engineers because nobody is willing to pay them a decent wage. That isn't too god for innovation.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    7. Re:Supportable software? by Anonymous Coward · · Score: 0

      Well I love the american culture and the work environment. People here are great and this is the best place for IT. But I do however have to mention this in response to what was written. How many americans actually go for an advanced Degree in Computer Science. The best programmer in school or in real world are often foreign born programmers. I have seen many people talking about how good indian programmers are. Programming is mathematical. All physical scenarios have to be given a mathematical form first. Set of inputs, outputs and the equations which solve the problem at hand. A person with superior mathematical skills is bound to have superior analytical skills, and will be a better programmer. In India we all are trained in mathematics. Mathematics comes natural to us. I have seen the books of students in high school here, they have problems which I solved when I was probably 13 yrs old. Work goes overseas, yes it minimizes cost , but also the work is perfect. People work hard and their work is best. So whatever you wrote is wrong. I myself was a TA for many undergraduate students of computer science here. Neways its all cool

    8. Re:Supportable software? by mobiGeek · · Score: 1
      The only reason work is being outsourced is because it appears cheaper. It is cheaper if your idea of vision has a 90 day window.
      Exactly. And these decision makers will be out of decision-making positions (possibly their corporations are out of business) and the remaining decision makers see the folly of their ex-colleagues ways and change. Or they won't and they themselves become ex-colleagues.

      Eventually:

      • Someone realizes the worth of the $55/hr developer and pays for it.
      • The entire species is wiped out.
      • The job is truly worth $5/hr and the original decision maker actually earns the bonus he pays himself.

      Notice that at no point have I concluded that the job is actually worth $55/hr or $5/hr. It is irrelevant because it is the market that will decide, not the person fighting the change.

      Yes, individuals may (will!) get hurt along the way. This is the nature of change. However, change will occur and trying to keep something at the status quo for the sake of the status quo will only lead to greater change (and typically greater harm) further down the road.

      --

      ...Beware the IDEs of Microsoft...

  126. Be wholistic in planning, but 'black box' the code by gammoth · · Score: 1

    How does a team insure that the first few thousand lines of code, the first board, etc, fit neatly within the system as a whole once it is completed? The best we can currently do is follow some established principles of design and implementation.

    Someone said it earlier: Have some knowledge of the entire system, but write code in the black box principle. It is the only way to minimize maintenance of one module if a change is made in another module. Eg, by all means, understand how a module works behind the API, but when coding as a client of the API, you must treat it as a black box, unless of course you enjoy tedious maintenance.

    It is essential the programmer or at least the designer know about the entire system or the program code could do something completely inappropriate when handling an exceptional condition. Eg, exit(1) is likely a bad choice for an aeronautical system.

    On the other hand, it is entirely impossible for a designer or programmer to keep an entire system of any complexity in their head at one time. Hence, it is necessary to modularize. And for the robustness of the system as a whole, the modules need to be loosely coupled: if one should fail, all others should recover gracefully.

    Regarding GUIs, I must disagree. It is a different beast. The complexity comes from dealing with the loss of control flow and ambiguities brought on by different execution order (I clicked there, then here and then the whole screen turned blue). Backend code should be as far removed as possible from presentation code. In a windowed system, the programmer should code for event driven programming only. If the backend makes assumptions about the GUI, then any GUI changes will mean a rewrite of the backend.

    If you black box the backend, then the GUI can select from the backend as required, and the chance of an exceptional condition is minimized.

    BTW, it probably no consolation at all, but none of my university prof would have considered suggesting that a programmer needs to know nothing of the underlying hardware. There was a great posting on Leaky Abstractions that makes a great case for understanding the implementation of a module.

  127. only to a point by dwk123 · · Score: 2, Interesting

    This only works to a point, and the fundamental problem as others have pointed out is that the 'black boxes' are almost never specified to a level of detail adequate to fully describe their behavior. Things like side effects, performance criteria/guarantees, behavior on edge conditions etc are very frequently overlooked. Your statements are idealized versions that might have been taken from some software Methodology book - they completely ignore the real-world problems like bugs, partial/incomplete implementations, outdated specs/documentation and a whole host of others.
    This doesn't mean that you always have to be explicitly focused on these issues, but the overall success of the system as a whole can be critically dependent on them. In a perfect world, of course, this wouldn't be an issue. But assuming the viability of black-box treatment in most real-world projects is the source of many problems, and the truth is that a relatively small portion of the population is capable of maintaining a sufficiently broad view of a system to be able to effectively respond..

  128. Still a black box by mobiGeek · · Score: 1
    There is absolutely nothing wrong with treating things as "black boxes".
    Of course in embedded systems that's not the case. When developing code for a medical device, you've got to understand how the hardware responds to a software crash, etc.
    You are still treating the medical system as a black box. Knowing how a black box responds to something is part of its interface. If you don't know how it responds to something, then it is a black hole, not a black box.

    There are many, many problems that can answer the question you have posed. Most have to do with improper resource allocation and/or improper analysis (which can, itself, be considered improper resource allocation).

    If a project doesn't understand each of the components involved in the overall system, then that is improper analysis (or improper communication of the analysis, or improper interpretation of the communication).

    However, even as an "embedded engineer", you do not need to understand every single bit and byte from power source to CPU to each sub-system behind its interface. If you did, then there's no point in having interfaces! No point in designing sub-systems...

    I do agree that many (all?) hardware/software systems out there have deficiencies. All of these deficiencies could be overcome by pouring the right amount of the right resources at them. However, everything has its limits and the final GA'ed product is an acceptance of those limits (costs, timelines, resource availabilities, politics, accountabilities, etc...)

    Yes, many engineers come up short on stability and/or usability in their products. Sometimes this is due to their own limitations, sometimes it is due to limitations imposed on them by others.

    --

    ...Beware the IDEs of Microsoft...

  129. The Law of Leaky Abstractions by Bobtree · · Score: 1

    by Joel Spolsky, describes exactly this problem.

    http://www.joelonsoftware.com/articles/LeakyAbst ra ctions.html

  130. Re:Probably (levels) by Anonymous Coward · · Score: 0

    you probably forgot one...

    10. Manager

    :)

  131. Black boxes allow a bigger picture by TomRC · · Score: 1

    The human mind can only consider so much at once. Using black boxes ALLOWS one to view the larger picture.

    In my experience, the single biggest factor keeping engineers from considering the bigger picture in their designs is management. The moment an engineer tries thinking outside the box that management has assigned them, management starts worrying about them upsetting the project schedules, or that thinks that the engineer is wasting time that could be better spent on their little black box. After all, they hire system analysts to worry about the overall picture - why would anyone working on a component have any real insight into the big picture?

  132. Abstaction: powerful, necessary, and often misused by tmoertel · · Score: 3, Insightful
    As systems become increasingly complex, the practicality of (and even the feasibility of) treating them as a monolithic entities becomes a legitimate concern. One method of addressing this concern is via abstraction, where suitable models are used as representations of their real-world counterparts. Indeed, abstraction is one of the fundamental principles of engineering and has been used for thousands of years to great success in the construction of complex systems.

    For example, in electrical engineering, it is common to simplify complex circuits by breaking them into smaller circuits, analyzing each of the smaller circuits, and then replacing the smaller circuits with appropriate black-box equivalents. With these black boxes in place, the original circuit becomes much easier to understand.

    However, as in any modeling exercise, it is crucial to choose appropriate models and to understand the limitations of the models chosen. While a simple resistance model might be a good substitute for DC and low-frequency circuits, it would be inappropriate as a substitute for higher-frequency circuits where capacitance effects come into play.

    So, returning to the original poster's questions:

    Do Slashdot readers think that the theories used to teach (and learn) programming lead to programmers that tend to approach problems with a 'black box', or 'virtual machine' mentality without considering the entire system?
    Yes, in these days too much stock is placed in the idea of letting somebody else worry about the complexity. This is especially so in mainstream industry, where one of the key selling points of software development systems is that with Magic DevStationPro X you no longer have to worry about the details but instead just use some brilliant Wizard or API to work at "a higher level." This applies not only to software development but also to user-level domains such as operating systems and applications. For example, a common notion in industry is that by using Microsoft operating systems on servers, administrators no longer need to know how to administer servers; rather, they need only know how to use the GUI administration tools. In other words, the pitch is that you need not concern yourself that the GUI tools present a mere model of the underlying system. Let the model be the system and reap the rewards.

    That's hogwash. The model approximates the system, no more. In engineering, this is well understood, and I suspect that in good CS programs the same can be said.

    Abstraction is a powerful tool. It is widely applicable, effective, and well founded -- when used appropriately. It probably ought to be used more often. Nevertheless, it is not a substitute for rational thought. Nor is it a replacement for being responsible for the entirety of the systems we build.

    That, in and of itself, would explain a lot of security issues, as well as things as simple as user interface nightmares. Comments?"
    It would certainly explain some of these problems, but I suspect that far more errors are the result of interface errors. One of the tools that goes with abstraction is composition -- breaking things into pieces, treating the pieces individually (at fine granularity), and combining the pieces (at a larger granularity) to yield a system. The risk of combining pieces is that in order to put them together properly, the boundaries where they coincide -- their interfaces -- must be well understood and compatible. Since the individual pieces make natural units for delegation, pieces are often assigned to different people who may have slightly differing understandings of the boundary conditions. As a result, "interface mismatches" are a significant source of error in software systems.

    Certainly abstraction plays a role here. Each piece can be thought of as a black-box model. The limitations of that model, and the assumptions under which the model is valid, are certainly important characteristics of the piece's interface with the world. Yet, these characteristics are frequently neglected in documentation and often go uncommunicated across delegation boundaries. This sad fact makes interface mismatches an especially harmful side effect of using abstraction and composition in common software development practice.

    Nevertheless, abstraction is a powerful and genuinely useful tool. It is also a necessary tool if we are to build increasingly complex systems. Like any tool, its uses and limitations must be understood if it is to be applied effectively. Thus, getting back to the original poster's question about whether the use of black boxes is harmful, my answer is, No.

    The problem isn't abstraction, the problem is improper use of abstraction.

  133. Not in sync with the 'real world' by kollivier · · Score: 1

    This is the number one problem I have with most of my programming courses. I think the black box issue is a side-effect of the real problem; trying to over-simplify the programming process into a bunch of simple (and often trivial) examples. I don't actually disagree with this from an educational standpoint, except that it is taken too far.

    How many computer science depts have you work on a major project(s) over the course of your degree? How many, instead, have you implement algorithms to walk a chess board without hitting any space twice, or teach you how to draw on a DOS window? =) Do you really expect these students to just walk into a real company and start being productive? Many will be almost totally unprepared.

    While these skills (and the practice) are certainly not without value, these projects do not teach skills like integrating software components, teamwork, or how to validate incoming/outgoing data. I personally do these things much more often than having to figure out 'tricky algorithms'. In fact, I've found that those trivial examples tend to get students worked up on some small aspect of the algorithm, totally losing sight of what they need to be learning.

    Some people think that computer science programs need to focus on abstraction (and I used to think this at first), but I in fact feel that they already focus too much on abstraction. Yes, abstraction of a problem is an ESSENTIAL skill for programmers, but let's not forget that one learns to abstract by noticing patterns in various examples over time. In other words, by performing a concrete task over and over, you notice patterns in how you performed the task and are able to generalize it to other problems. So, if you have someone program over and over and over, they will (in most cases) begin to realize patterns without a book or teacher to help them out. It's how I learned, and I bet since others are asking for abstraction to be taught more, it's how they learned too. =)

    I really think the best way to teach programming is by mentoring, and an open source project is a great way to do that. Have them first take basic computer courses, and view (but not contribute to) the project and its code. Maybe even explain to them portions of the code in-class, focusing on why certain decisions were made. Then, ask them to make a few simple modifications, and submit them to project maintainers (which could be professors). The maintainers explain what is good/bad (i.e. security issues, compatibility issues, etc.) and the sample is sent back for revision. Then just step up the complexity of the modifications little by little.

    This model just doesn't really fit with our current education system, unfortunately. =) In any case, I think the computer science programs in effect do need some major updating. Some of them have learned to be more modern, but I find I do more reading than programming, and when I do program oft times I'm not sure what the point of the example is.

    1. Re:Not in sync with the 'real world' by tundog · · Score: 1

      You're missing the point here. The role of the University is not to transform you into a wag whore by teaching you how to integrate the results of a Fortran bin packing algorithm with an MS Access database. Technology is fickle. 20 years ago Fortran was a contender. Today its only used for extreame math analysis of old hardware. Tomorrow, who knows in MS Access will still be around, and besides, anyone serious about a DB application will be using expensive software that Unis can't afford anyway liek Oracle 8i. At best, they could spend the whole CS budget on an Oracle DB that is obsolete in 5 years time.

      The University teaches you how to learn. They teach you the basics that you need to know in order to be able to apply basic fundamentals to new problems. Once your out the door, its up to you to fill in the what you learn part, and thats a process that last a lot longer than four years.

      Abstract, pull out the parameters of the problem at hand and apply implementation constraints and solve the problem. That's what I do just about every day.

      If you expect students that are 100% productive starting day one on the job, recruit from a local technical school. What you gain in productivity for the first half a year you'll lose in the long term when the .Net initiative forces you to pay patent royalties and you either have to pay half your gross revenue to M$ or migrate your entire system to J2EE. "Virtual Machine? what's that?"...

      --
      All your base are belong to us!
  134. Also translates to lazyness by pygeek · · Score: 1

    I'm a comp. sci. student, and I'm constantly amazed that nearly all my fellow students find it boring to learn *anything* about how an operating system or low-level hardware works.

    IMO, to have an imformed opinion about how your program works, regardless of the black box your coding for - be it a JVM or whatever, you need to know something general about how it works low-level.

  135. Black Box Programming by Anonymous Coward · · Score: 0

    I don't think that the black box way of thinking is the problem. I use black box programming often. But I'm also the one creating the black box code, so I know what it's doing and what to check if anything does go wrong. Having the source code helps alot. That's the drawback to third party software. Sure, it works. It might even work well. But one bug in there and you're stuck waiting for some pimple-faced youth to get up off his ass and implement the changes you've been emailing him about for the past 3 frickin' months.

  136. Your right! by tundog · · Score: 1


    This is exactly the argument the ABAP developers down the hall have been searching for! Down with OOP!

    --
    All your base are belong to us!
  137. You're correct. by johnnys · · Score: 1

    As a creaky old Fortran programmer, I vividly remember taking code and rewriting it to run efficiently on other systems. If you didn't know how the compiler "unrolled" multi-dimensional arrays in memory, you couldn't write an efficient routine that walked that array. Sometimes you could reduce execution time by over 95%, just by rearranging the order of the indices in nested loops. So even in Ancient Tymes it was critical for the programmer in the "high-level" language to understand what the "lower-level" components (in this case the compiler and the platform hardware) were doing. Think of what a "black box" is: For a specified input it must generate specific output. However we can't seem to create ANYTHING without bugs or "special case" conditions where the system returns unexpected results. So, just as the Olde Pharte Fortran programmer had to know what the lower-level components are doing to write efficient code, anyone who uses any kind of "black box" mustn't think of that system as a "black box" at all: They MUST be aware of the low-level behaviour of all the systems they interact with and how to deal with that behaviour. JS

    --
    Sometimes the "writing on the wall" is blood spatter...
  138. Missing the "big picture"... by Anonymous Coward · · Score: 0

    Hello??? An aircraft's "Black box" isn't an interface to any of its control system. Rather, it simply LOGS data from as many systems as possible. It's called a black box because data goes in, but it doesn't come out.

    In the event of a crash, they analyze the data recorded by the 'black box' to find out what went wrong. This is in no way related to the software-engineering concept of a "black box interface".

    There's nothing to see here. Move along.

  139. Learn Everything, So You Know by 4of12 · · Score: 1

    what things safely can be put into the black box, and when.

    Later, a project might come along where something in the black box should be taken out, exposed and given attention.

    It behooves you to learn about everything on your project as much as time permits so you can help define your own black boxes, because the people around you and in charge of you have only an inkling of what is assumable and what is not.

    --
    "Provided by the management for your protection."
    1. Re:Learn Everything, So You Know by SlightlyMadman · · Score: 1

      I absolutely agree with this, but it's not neccesary that every single developer have this knowlege. In a proper OO development environment, only the team-leader (or equivalent role) needs the low-level knowledge. The basic coders should just worry about their tasks, as long as someone else knows what they're doing, and how it relates to the system beneath it. It's not only cheaper to not have to train them all, but it avoids confusion.

      Someone with an incorrect understanding of the underlying system will be drastically more dangerous than someone who knows that they know nothing.

      Of course, in a smaller group, everyone is basically the leader of their own team, so almost everyone would need that knowlege.

      --

      Money I owe, money-iy-ay
  140. Re:Probably (levels) by oconnorcjo · · Score: 3, Informative

    Programming Levels:

    # Microsoft Frontpage
    # Raw HTML
    # CGI/PHP/etc.
    # Servlets/Mod-perl/etc.
    # Object-Oriented black boxes
    # Documented API's
    # Public Documented API's
    # Performance
    # "The Big Picture" - Architects



    Another elitest post without a real clue. A good programmer knows how to get a job done and should ALWAYS have a big picture view of how things work around them. It does not matter whether they are working on a web site or writing a backend database app or a game engine for the latest and greatest game. Somebody writing good PHP code could probably write good backend C++ code. You are associating the tasks people do with how capable they are. Languages and programs are TOOLS and a programmer should be able to quickly learn to use new tools whether it is a new language, interacting with a new API or using a performance profiler. A good programmer really should not care HOW they get things done- ONLY that they DO get them done.

    --
    I miss the Karma Whores.
  141. Some people just don't care by Anonymous Coward · · Score: 0

    I work for a rather large microelectronic firm. An engineer in our group went for a rotation in a circuit design team, and came back AMAZED at how many people on his team had absolutely NO IDEA what the little part of the circuit that the worked on was supposed to do. They just designed it to take input X and crank out an output Y. Personally, I'd have to know the bigger picture, but some people/engineers/coders just don't care to find out. They do their job, do it well (or not) and go home.

  142. Fast Track for Managers by Anonymous Coward · · Score: 0

    Programming Levels:

    1. Big Picture Architect

    This says it all.

  143. Not that whipping-horse again! by T.E.D. · · Score: 1
    Last I checked, the vast majority of "programmers" were essentially self-taught. Certianly where I work, there are hundreds of software developers, and perhaps 5 people with CS degrees. So I think before we start flogging CS programs for the failings of the industry, perhaps that same industry should try hiring more of their programmers from CS programs.

    As for a real culprit for our persistent software security and safety woes, try the following:
    • A lack of faith in professional training (see above)
    • A pervasive culture of valuing youth over experience
    • The primacy of schedule and cost over quality. Its an old management addage that you only get to pick 2.
    • The pervasive use of unsafe languages like C and C++, and the "hacking" mindset they engender, in preference to safer alternatives like Java and Ada

    As a manager, probably not what you wanted to hear, though.
    1. Re:Not that whipping-horse again! by Zelatrix · · Score: 1

      The primacy of schedule and cost over quality. Its an old management addage that you only get to pick 2.

      Can't agree with that one. I don't have my Fred Brooks handy, but I recall he says something like "No. Focus on quality and productivity will follow". He's dead right too.

      You are spot on with the other three though.

    2. Re:Not that whipping-horse again! by T.E.D. · · Score: 1
      Can't agree with that one. I don't have my Fred Brooks handy, but I recall he says something like "No. Focus on quality and productivity will follow". He's dead right too.


      I do have my Fred Brooks handy, and its not in there.

      There is something along those lines in Peopleware. "Quality is free", if I remember. Although I don't have my copy of Peopleware handy, so perhaps its not in there either. :-) However, he was quite careful to point out that this doesn't mean "we can have all the free quality we want".

      I actually agree with this (and you). That is certianly the way things should be done. My point is that its not typically the way things are done, because quality is typically an afterthought at best.

      The thing we have to remember is that productivity is not the same thing as schedule. In fact, to meet a schedule crunch, developers often are forced to do very unproductive things. Not all of these things will show up in the product as a lack of quality, but many of them will. Ideally we'd never work this way, if for no other reason than its a criminal waste good and expensive labor. But often that's what's expected.

      So I think we are actually in violent agreement here.
  144. SPACE MACHINES last? by Anonymous Coward · · Score: 0

    Like the mars lander, the challenger, the columbia... yeah if only the aerospace industry made cars - they could get 2mpg, cost a trillion bucks and run twice a year.

  145. Brain the size of a planet... by delphi125 · · Score: 1

    Hardware fails sometimes, through no fault of humans.

    Ahh, but who designed and manufactured the hardware?

    To recurse one level further: Deep Thought, perhaps?

  146. Damn you, Clippy. by Mr.+Bad+Example · · Score: 3, Funny

    It looks like you're trying to fly a craft with only one wing. Would you like to:

    * Plummet to the ground

    * Stick an arm out the window and flap vigorously

    * Visit the Morton Thikol technical support website?

    1. Re:Damn you, Clippy. by Anonymous Coward · · Score: 0

      "I'm bleeding. Why am I bleeding? Do paperclips bleed? Aaaaaggggghhhhh... *gurgle gurgle*"

    2. Re:Damn you, Clippy. by lyric · · Score: 1

      That's ATK Thiokol now...

  147. Scope by j_kenpo · · Score: 1

    This would be dependent on the scope of the overall project, and the development methodology. In Structured programming I think it would be prudent to be mindful of the overall picture of the project as opposed to the "walls and windows" approach of OOAD (Object Oriented Analysis and Design). On a smaller project, of course you can be aware of the overall project, after all theres not much to look at, but on a large scale project its almost impossible to do that, thats why there are development teams assigned to a particular phase or portion of a project. I dont think the "black box" approach is the cause of poor security as much as poor programming. Its been a while since Ive read up on it, but Ive always been under the impression that the biggest problems in security and bugs are poor pointer handling and use of non-bounds checking string routines such as strcpy() as opposed to strncpy(). If theres security issues raised from the "black box" mentality, its due to poor management, design, the methodology, however if a developer is aware of the overall pictuer and can in some way increase security with that knowledge, I dont think it would be frowned upon.

  148. Black box by jkirby · · Score: 1

    The blackbox approach is always best if the system will allow the abstractions to do it; if not, then you gotta get down to the metal. Either way, it is still programming. There are good ones and there are bad ones.

    Somewhere in the world there is the worst working programmer and he is probably writing code as we speak.

    --
    Jamey Kirby
  149. It's not wether your in or out of the box.. by fishbot · · Score: 1

    Many programmers have strong opinion one way or the other about black box programming. However, the fact is that you are _always_ developing in a black box environment.

    What I mean is, there is always some point at which you have to develop within a certain set of defined interfaces with some other system. If that happens to be the ANSI C standard on one end, then that's fine.

    You don't need to develop in or out of the box, just ensure that you know where the boundaries of that box are.

  150. Better Phrasing... by Embedded+Geek · · Score: 1
    who thinks of things in a black box mentality is usually going to be involved in [a] failed program

    I like your post, but would prefer the phrasing "who limits their thinking to a black box mentality..."

    Like many of the posts on this thread, you emphasize the importance of an overall system view. However, there is also a need to abstract out concepts in any complex system (as the rest of the posts on this thread point out).

    I know I'm preaching to the choir here, but the key is to figure out where to draw the line. How much abstraction is "enough"? How much detail is "too much"? While there's a lot of proven guidelines and methodologies out there, the fact is that each project has to draw that line for themselves.

    And that, dear friends, is where the art lies in engineering.

    P.S. This, of course, presumes that project management supports the chosen level of abstraction with policy (e.g. enforcing code reviews) and resources (having enough heads on board so the abstrations don't leave developers isolated - you need overlap). Without that support, you're straight out doomed despite any sound engineering planning.

    --

    "Prepare for the worst - hope for the best."

  151. This will probably be burried under, ... by Anonymous Coward · · Score: 0

    I have one rule: For every "if" you write, write the "else" too! :) It sounds trivial, but _this_ is the wisdom of the Programming Gods.

  152. Undergrad programs miss this and a lot others by Anonymous Coward · · Score: 0

    Most undergrad programs put out students that are really ill prepared to start working as professional commercial coders. Unfortunately, most programs stress theory more than practicality. Students graduating have no idea how to write system designs (some don't even know what it is), few know how to unit test, or to participate in design discussions. I remember a good prof I had tell us that something like 75% of the time we would spend working as programmers would be doing something else than programming. While I'm not sure about that 75% after working for 7 years out of school I do agree that a lot of my time is spent doing things I hadn't planned on or knew about. I've worked on systems that you simply cannot get a big picture understanding of it until you've spent at least a year working on it, mostly my experience was interfacing with a complex MF. Abstraction to a certain point is neccessary, few people other than a system architect really have a big picture understanding of every portion of the system. As a developer I think it's important to understand what you are developing on a low level and understand how it impacts the rest of the system at a higher level, which in itself takes time. This is just ranting here, I've mentored a few interns in the last two years who have had varying coding abilities. One in particular from a big name school knew all the latest languages and such but unfortunately wrote code that was uncommented (or worthless comments), hard to read, and in general acted almost as spaghetti code. He was very good in spouting buzzwords of course which is all management really cares about. Shortly after that I mentored someone from a community college who wrote excellent code that was at a professional level but was very quiet and withdrawn. I don't think any undergrad program will be able to graduate a professional developer as the on the job experience is really the second learning stage of being a developer. Undergrad programs try to prepare students for careers, not give it to them, so in that regard I don't mind if they don't get the big picture. I figure they don't know a thing anyhow so expectations for them to understand a complete system architecture are fairly limited.

  153. black box is good. by zander · · Score: 1
    I am supervising a group of programmers and have helped many students into real life programming (schools arn't what they used to be;).

    In this time I learned that teaching is all about limiting complexity. Thats a mantra guys; Limit complexity!

    The blackbox idea is a very good way to get there; it has (alas) been mistaken as the only solution.
    Successful programmers learn to make a system that contains just enough complexity to do exactly what the problem demands.

    The most common mistakes are:

    • Designing for future use by using expensive design patterns when a simple solution would work just fine.
    • Creating one system that is too big to oversee, instead of creating a number of smaller systems that are seperate black boxes (thus limiting complexity)
    • Guessing about an APIs usage instead of reading the API docs.
    • When a bug occurs in the system people just rewrite the method since understanding the code allready there is hard. (learn to read code!)
    Desiging a system should be about connecting black boxes, and basically that is what ObjectOrientation was designed for..
  154. Re:School Doesn't Prepare You For Real World Codin by mrtroy · · Score: 1

    riiiiight

    tell that to my current employer?

    --
    [I can picture a world without war, without hate. I can picture us attacking that world, because they'd never expect it]
  155. The Art of Engineering - the Fog of War by Embedded+Geek · · Score: 1
    Predictably, most of the posts on this thread fall into two categories:
    • Pro - An engineer needs a system view in order to get their part of the system working.
    • Con - We need black box abstration because it is impossible for one human brain to understand the entirety of a non-trivial system.

    The problem, of course, is that both sides are absolutely correct. I know I'm preaching to the choir here, but the key is to figure out where to draw the line. How much abstraction is "enough"? How much detail is "too much"? While there's a lot of proven guidelines and methodologies out there, the fact is that each project has to draw that line for themselves.

    And that, IMHO, is where the art lies in engineering. You need a lot of expensive investigation and analysis by very experienced, talented people before they can get to the point where they can sit in a room and say "I have a hunch this is where we should draw that line." Even with all the science to back it up, it is still a very intangible thing. In the military, Von Clausewitz called it "the Fog of War." Everyone else calls it "Real Life." You can minimize uncertainty, but you can never eliminate it.

    P.S. All this, of course, presumes that project management supports the chosen level of abstraction with policy (e.g. enforcing code reviews) and resources (having enough heads on board so the abstractions don't leave developers isolated - you need overlap). Without that support, it's like marching off to battle without ammunition, maps, or boots - no amount of strategy will save you.

    --

    "Prepare for the worst - hope for the best."

  156. Sigh - not black and white by Anonymous Coward · · Score: 0

    Black box mentality is actually a very good thing - to an extent. The trouble with most programmers who adopt this mentality is that they fail to understand that the black box has to harmonize with the design of the system as a whole.

    One example that occurs to me is this guy who wrote a component to handle mail processing requests. Before we had a chance to work out the interfaces and semantics, he had hammered out the implemenation he chose and took that stance that it was a black box and thus code must conform to its design. Unfortunately, he missed some functionality and also used the entirely wrong programming model (we wanted a synchronous call interface, he made everything async job/queue).

    "Deal with it" is the mantra of those who take this concept too far. The "Black box" is the protection of the *implementation* and not the *design*.

  157. Black boxes can be expensive too by vrassoc · · Score: 2, Insightful

    ... some people tend to get tunnel vision and concentrate wholely on the bb theory, ... This does usually lead to problems and errors in the code.

    Not only errors: black box routines can be expensive on performance too. Take database programming as an example: black box programming teaches us that we must break the problem down into its smallest (easily) solveable (and reusable) parts, create a routine for each one and then work our way up. In a program that does disk reads to solve the problem this could mean many, many more reads from disk than what is necessary, if you're not careful.

    IMHO part of what makes a good programmer an even better programmer, is to know which routines to black box, taking into consideration performance and resource availability, and which ones not to.

    High level languages are no less than a library of black box routines. And there are often parts of a program that are best written at the lowest level, for efficiency's sake.

    A good programmer will constanly be weighing up the pros and cons of his or her methodology in order to provide a system that is sufficiently practical for the underlying architechture while taking into consideration all the other constraints of the project such as budget and deadline.

  158. Is it really Embedded Vs Virtual Machine? by that+_evil+_gleek · · Score: 2, Interesting

    Did you do you're embedded programming in C? Or Forth? I'm thinking C because you seem to put as an 'either or. ' I think the difference is how much you, have to do, yourself, to get to something the resembles a 'virtual machine.' More, "Who provides the virtual machine?" than "Is it a virtual machine?"

    One thing to remember is that the only thing some programmers learn from school
    is how to misuse elements of CS to rationalize away the fact that they suck.
    IGNORE sophistical arguments, instead of buying into the BS and getting the wrong idea
    about whatever they're using as an excuse.
    It sounds like you've heard 'blackbox coding' where I've heard 'implementation details'.
    Like:
    Me: What if?---
    Them: I'm not worring about 'implementation details' [with a tone that suggest that they are above it all]

    But for you, perhaps, it was like:
    You: What happens when?
    Them: We don' have to worry about that because we're coding to a virtual machine.
    You: Yeah I know, but ---
    Them: Haven't you taken object orientied programming and design?
    You: Yeah
    Them: Ah then you see... [start long winded lection about OO that isn't germane ].

    There are two types of people: People who don't know everything, and people who don't admit that they don't know everything. If we had been dealing with the former. It would have gone like:
    Us: What about?
    Them: Well, if that happens we're fscked. That's something we'd /have to/ deal with
    if we were doing embedded systems programming like in medical equipment, but for now for the purposes of CS201 we implement the 'ostrich algorithm'.

  159. Yes, Black Boxes are the norm by Gleef · · Score: 2, Insightful

    I studied Computer Science in College, and currently work as a Programmer/Analyst for a non-profit organization (Desktop, Web and Server-based systems). Yes, all of the above encourage a "black box" model to design and coding. Furthermore, I am guilty of perpetuating this to the people forced to listen to me blather, and will continue to do so until I see a better way.

    I understand that it hides some bugs. I don't like this. On the other hand, we can never have enough staff to make sure we have people expert on not only each system used but on each interface between the system to do a good integrated system.

    So what we do is take some premade components (eg. hardware, OS kernel, C library, certain widget libraries, web server, etc), and say "OK, assume these work according to these specifications, we're going to work on adding a piece that does this". When the premade component deviates from the specifications, we fix the component or update the specs.

    As much as possible, we make use of open standards and free software so that if we need to, we can open up the black box and fix something. However, the more we can assume that a component is a black box that will just do what it's supposed to do, the faster we can develop the "interesting" bits.

    The bottom line for us is to manage complexity. The more complexity that we can abstract away, the faster we can work on the custom stuff unique to our organization. A "black box" model works well for us, but yes, it does cause some bugs that need to get cleaned up after the fact. Most organizations I've seen make a similar design choice (or blunder into it blindly), and most schools teach their courses with a similar mindset.

    If we were to develop a truly critical system, one that lives or big bucks depended on, we ought to take a different approach for that system, but we aren't likely to work on such a system for a while.

    --

    ----
    Open mind, insert foot.
  160. Hardware vs. Software black boxes by BobRooney · · Score: 1

    The issue at hand is the interpreted disregard programmers have for hardware. This is largely created due the the enormous amount of hardware abstraction present in most modern operating systems. Windows developers couldt give to craps about hardware they are not specificially coding for thanks to the enormous volume of API and library calls available to provide a seamless interface for them.

    To paraphrase; It's unfair to brand "black box" brand software engineers with some engineers' stigma because they dont code for, not care to code for each specific piece of hardware they may come in contact with.

    I work for Software company that builds Point of Sale Systems, and as such I have have the opportunity to talk to both hardware and software interfaces, such as credit card units, pinpads, MSR readers, receipt printers, etc. Some are handled with Windows APIs, making it transparent what specific piece of hardware is on the other end of my commands.

    The reason Black Boxes of any type, but particularly software black boxes exist is to modularize code. OOP centers on the idea that you can take a chunk of code, wrapper it with an API and make it a component someone else can slap into their program to save them time and effort.

    Maybe purists will insist that you need to write your nlogn search algorithms from scratch each and every time you use them, but in production, and particularly consumer grade systems programming modularlizing code, using (gasp)ActiveX controls, and other such "Black Box" techniques save untold time and money. Programmers who hit deadlines are programmers who keep their jobs and maybe even get raises.

    IMHO

  161. Managers think more code, better coder by lukme · · Score: 2, Insightful

    Some managers think that you are doing nothing unless you can say, yup, wrote 3000 line of code today. They don't really seem to care that you have just created a mantenance problem.
    I was just at a job interview where my comment that I have done several projects in which I mentioned that I have replced around 5000 lines of code with 500. Due to his obsession with lines of code, this got missinterpeted as, I have only done mantenance.
    Note: the 500 line of code did the more than the 5000, with fewer bugs and was alot faster (ie, 1 scan though the data as opposed to multiple).
    Every job that I have had, I have found areas of code bloat either done due to the pressures of meeting a deadline or though incompentence. In either case, the best thing to do is to just clean them up and go forward.

  162. Re:OT: IBM Drops Linux on Itanic by Anonymous Coward · · Score: 0

    after readin da artikal I would say that IBM drops Itanic instead of Linux..

    Linux sux anyway..

  163. no grok by samantha · · Score: 1

    It is simply not possible to keep the entire system in mind in any way but by considering as a set of components with no characteristics externally (i.e., as "black box"). Anything else is incomprehensible beyond relatively small systems.

  164. What? by Anonymous Coward · · Score: 0

    I think therefore I mess up the design.

  165. The boxes have to be black by revbob · · Score: 2, Insightful
    My business card says "Embedded Software Engineer" and my current job is member of the software architecture team for the Common Operating Environment of perhaps the largest System of Systems project ever.

    I see preliminary designs for databases of objects that magically exist in pure object-land (i.e., they don't actually do anything) and yet somehow the work gets done.

    By training and disposition, whenever I don't smell silicon, I become deeply suspicious, so my first reaction is that such designs are nonsense. Perhaps it will not always be this way -- for instance, perhaps the designers of those very systems will get around to saying who actually does something and how they do it.

    But I've grown to realize that I must accept a certain amount of nonsense (subject always to good engineering judgment and a demonstration that some of these fanciful schemes can actually work) because the "how" absolutely must not enter into the design.

    If I have to say to someone writing the software for communicating between commanders and various kinds of "things" (I'm going to apply some severe declassification here) that to talk to a big orange truck you have to stick a 32-bit word into a mailbox interrupt register at such-and-such and address, while to talk to a little red truck you have to send "HELLO, WORLD!" to port 80, they're going to say to me, "Just what the hell have you been doing in your software architecture group for the past six months?"

    This is a gross example -- but the less obvious examples are nearly as bad, from my point of view.

    For instance, since one of the requirements for this SoS is that communications not be of the form, "Let's tell the enemy what we're going to do", and since communications security is best done by people who know what they're doing, we will not train every engineer to manage communications security everywhere in his application, but rather layer the architecture so that, to the greatest extent possible, engineers will not even know it's happening.

    Indeed, I expect the architecture our team develops to survive several iterations of "how"s. The first implementation better not work as well as the final implementation, or somebody's wasting money.

    In short, we'll use elementary principles of engineering in order to define common objects that communicate with one another in precisely defined ways at a level of abstraction that's appropriate for the objects themselves. That some objects will have precise real-world counterparts (e.g., big orange truck) is merely evidence that the architecture is sane. And if some of those objects have functions associated with them, that's because in the real world functions aren't performed by spirits and demons, but by (now let's not always see the same hands) objects!

    This ain't rocket science, people. If you've written an API that you can't jack up, haul out the Yugo that's underneath, and replace it with a Viper with no one the wiser except the customer who appreciates how fast he's going, you've screwed up. You've let the "how" creep into your "what".

    (Hoping some people will return my phone calls and answer their email so I can stop talking about this and get back to doing it).

  166. Often you don't know... by hubertf · · Score: 1

    Yesterday I had to learn that a small utility I make (www.feyrer.de/g4u) is used (among others) by a company who is involved with the production of weapons of mass destruction of a very trigger-happy nation. :-(

    - Hubert

  167. System Life Cycle by CaptainPhoton · · Score: 1

    I think the big picture belongs in the domain of the program manager and system engineer. Then the ability of the individual developer to deliver a correct product or implement a subsystem properly depend on passing down complete documentation of system requirements. It also doesn't hurt to include the customer in detailed design reviews. Without a "black box", you wouldn't be able to contract anything out!

    I recommend reading MIL-STD-498, it gives a great overview of the type of documentation required by government contractors. I think IEEE 1074 is more up-to-date, though I haven't read it. If you're familiar with some of these life cycles, then you won't be shocked as much by the extensive documentation you'll be maintaining when you work for your first defense company.

  168. Were not all talking about the same thing here. by small_box_of_stuff · · Score: 2, Insightful

    After reading many of these posts, I think were getting a bit confused here. In part, the original poster is a bit confused, or at least imprecise in his wording.

    When coding a module or piece of program for use in a wider system, such as a library or module, black box thinking is a good thing. In this context, a black box means something that does not expose its internals, and provides an abstraction to the user/programmer.

    The STL or the standard c library is a black box. TCPIP and the sockets API is a black box. the java standard class library is a black box. If you were required to know all the interal details of all these systems to be able to use them, you wouldnt get very far.

    Abstractions, which is what we are talkign about when we use the term black box as above, are absolutely required to write decent software. You simply cant reliably keep that many details inplay at once and expect to get it to work right.

    As useful as the above black box libraries are, it is very possible to create a library that is unusable. Making the user of the library know all the impelentation details from inside is one way to do this, but the other is to use the wrong abstractions, make the wrong assuptions about usage, etc.

    In short, what the original poster and many others are complaining about when they say they dont like black boxes is that they are using bad or incompatible boxes!

    Having to fight with a library that makes assuptions that are invalid, provides the wrong level of abstraction, or is not implemented very well is not an indictment of black boxes, but of black boxes that suck. The fact that their internals are hidden is not the problem. the fact that their interface to these internals sucks is the problem.

    So dont confuse the problems of using bad black boxes with a fundamental problem with black boxes. A bad impelemtation doesnt mean the concept is bad. A poorly designed system well may provide a black box that no one can use, or at least not in all situations. but making that box white, and exposing all its internals, isnt the solution. designing the module to work right is.

    Further, one persons perfect abstraction is anothers miserable pile of junk. Just because the black box doesnt provide the interface you need/want doesnt mean it sucks, it could just mean your using the wrong tool for the job. Complaining about how hard threads make it to hammer in a screw doesnt make much sense. Use a nail.

  169. Proper delegation by ajole · · Score: 2, Interesting

    I've always beleived that a proper system, from an oo perspective, has a top-down hierarchy with no links going upwards. That is never possible, but if you have tools T that are used by users U, and U are used by Senior users S, then T will never use U, and U will never use S. Heck, it works in companies...
    Now I know that sounds elementary and naive, but I still beleive that if you are making [too many] links up, it might be possible to re-work your design.

    --
    -P ...and the boy pulled open his bleary eyes an discovered the python he always knew he was.
  170. Black Boxes by StillNeedMoreCoffee · · Score: 1

    Mines Beige

  171. deeper than that by tartley · · Score: 1

    The problem goes deeper than the original post suggests - The type of mind which is attracted to programming, and is good at it, is already entrenched in methods of decomposition and logical seperation. I don't think one could *be* a good low-level programmer without this sort of thinking. It isn't just methods of education - I think it's a fundamental dichotomy built into the subject matter of designing and building complex systems.

  172. Black boxes the problem? or not defensive coding? by cmburns69 · · Score: 1

    Is this a problem with using the "black box" mentality, or a failure to do defensive design and coding?

    If your programmers code and design defensively, even the black box approach will succeed. No input can every truly be guaranteed to follow a certain spec. No user will always act like you expect. No system will ever be setup exactly like you planned.

    Keep these things in mind, and your project will be robust!

    An online Starcraft RPG? Only at

    --
    Online Starcraft RPG? At
    Dietary fiber is like asynchronous IO-- Non-blocking!
  173. Black box is bad? by Anonymous Coward · · Score: 0

    The idea behind the black box approach in programming is to ensure the stability of separate modules. The rest of the system is irrelevant. That individual module has certain properties which are characterised during the design phase. Once the coding is done, the module is tested, not as part of the program, but against a test harness which tests the correctness of the module.

    A programmer decides how they will code the module the best way they know. They do not change the specifications of the design. If design and code are not mutually exclusive, the program is sure to fail.

    There is no 'need to know' how other modules are coded, only that they can be used exactly how the specifications say.

  174. Re:School Doesn't Prepare You For Real World Codin by JohnsonWax · · Score: 1

    Well, are we talking about computer science or about software engineering. To my thinking, these are about as similar as physics and electrical engineering.

    Systems Engineering is really just a superset of Software Engineering, but in the end both are primarily concerned with how *all* of the bits and pieces fit together properly, not on the details. The systems engineers are the ringleaders of the other engineers, they don't always know how to make each piece work, as they focus on making sure the completed pieces work together as they should.

    Think of them more like Civil Engineers. You don't see any Civil Engineers out there pouring concrete or hammering a timber structure together, but they make sure that the tradesmen that do these things do them to the right specs, lest you end up with this.

    Truth be told, there are entirely too few Systems Engineering and Software Engineering programs out there considering the demand for them.

  175. Different roles in sw teams by prashantp76 · · Score: 1

    Aren't software teams all about role playing? The architect or senior members of the team will have a system-wide view.

    But I think it's fair for new starters on a team (either for the company or graduate engineers) to be given tasks where they shouldn't have to think too much "outside the box".

    In some cases this is beyond their experience or ability at that point.

  176. A good example of this... by shylock0 · · Score: 2, Interesting
    A while ago I submitted to Ask Slashdot about command line/GUI interfunctionality (you can look up the post for yourself, it's a while old -- but look through my info and you'll probably find it).

    Anyway, I think that the issue of the GUI is a great example. Programmers got carried away with the GUI, and now applications and OSes are completely over-GUIed. The mouse is much, much slower than they keyboard when it comes to many tasks. I use graphic design programs on a regular basis, and I would give an arm and a leg to have a quick and easy command line interface in, say, Adobe Illustrator, for precise object manipulation. Same goes for Photoshop. AutoCAD and other programs have a decent implementation of the CLI, but it could get much better.

    I would love to see programmers get out of the object-oriented point-and-click mode that they've been stuck in since the invention of the original Macintosh.

    GUIs are great for representing data, and they are great for the visual manipulation of data. But visual manipulation is often imprecise. For precise data manipulation, the CLI is still necessary -- clicking through a menu and two dialog boxes to finally find a text box with the field to rotate an object by 20 degrees, or add a 2nd column to the page, or fix page margins; that's absolutely ludicrous. There should be a simple, (preferably standardized) command line that's accessible from all applications. Remember the ~ in the original Quake? That was a huge step forward. We need it in more applications. How much productivity has been lost by over-mousing? -Shylock0

    Questions and comments welcome. Flames ignored. Post responsibly.

    --
    Statistically speaking, there's a 99.998% chance that my IQ is higher than yours. Get over it.
  177. Hey, I resemble that remark!!!! by Anonymous Coward · · Score: 1, Interesting

    As one of those people who teaches programming, I think you're missing the point. The purpose of higher level languages is to abstract away the hardware and allow the software developer to create the abstract models of the real world without considering the underlying computer system. That may not apply in all case and maybe not in embeded systems. If anything there is still too much hardware involved, things like pointers and memory alocation should not be needed in a begining programming language. After students get some expertice then they can start conserning themselves with hardware issues.
    Anyway, you seem to have learned something inspite of all those bad teachers. Have you considerd coming back to school and helping us out. We sure could use the help, were not proud, if you know a better way to teach, come and show us. We're willing to learn.

    1. Re:Hey, I resemble that remark!!!! by Anonymous Coward · · Score: 0

      Hey - you need to cull out the bad programmers.

      But maybe we need to cull out the bad teachers first!

  178. Re:GET SOME PRIORITIES!!! by udippel · · Score: 1

    Not to forget the victims of some intervention in Palestine and the looming invasion of Irak.

    Thanks.

  179. How to make programs a lot more secure by Anonymous Coward · · Score: 0

    Have the compiler add in runtime bounds checking for every type whenever an arg is passed. Severely spank anyone who tries to bypass it. Fuck optimization.

  180. Black boxes ?? by udippel · · Score: 1

    Maybe I'm a bit dumb, but happen to be one of those you address.

    Could you specify some real example or a site for what you mean?

    I had been under the impression that larger programs not only force to use 'black boxes', but encourage and thrive on 'black boxes'.

    Isn't a subroutine or a class a very handy, useful and necessary 'black box'?

    Do you want to tell me that embedded something (Windoze, Linux, etc.) can do without API or that you can follow your codes without, straight down from a kernel through all the drivers to the applications? Including a thorough understanding of what your ARM does internally and if I understand your post right, this is what you aspire.

    Since this 'know-it-all' is impossible, should we not rather encourage *robust* 'black boxes??
    *This* is actually something missed out by students (in my experience). They don't create 'Swiss-Army-Knife boxes' that could perform the task in any circumstances, environments and handle insane input in a sane way.

    As far as the embedded security-box of Columbia is concerned, we seem to deal with a hard-coded encryption. At least this is what they want to convince us about. Encryption hard-coded in a single place; otherwise not such an urgent need to recover it. Any other encryption would make it easy to change the distributed keys, which leads us back to the necessity of 'robust' boxes.

    Hope I got you right !?

  181. What is your solution? by Moirke · · Score: 1

    First let me say that the overwhelming percentage of security problems are a result of admins not patching their system. Virtually all machines today used a RISC (as opposed to CISC) design because we realized that 90% of execution time is spent on only 10% of code. I don't understand why this same realization has not been made about security holes.

    That being said, I certainly do believe that software is less secure because programmers don't completly understand all aspects of all systems. I also believe highways are less safe because not all drivers understand the physics of a vehicle in motion.

  182. The big picture... by Hubert_Shrump · · Score: 1

    ...is the view without the windows.

    Strikes again!?

    --
    Keep your packets off my GNU/Girlfriend!
    1. Re:The big picture... by Anonymous Coward · · Score: 0

      You are 100% on the mark. But the question in my mind is why "she" didn't pick up on this.

      How is is that "you" are fixing all these issues and yet "you" are not rewarded and "your" fixes are not in general circulation...

  183. Black Box thinking and complexity guarantees. by Ardias · · Score: 1

    Relying on some function, class, library, component, what-have-you as a black box can reduce performance. It helps to have a little grey knowledge of how that function or class behaves, especially if that function takes anything more than constant time to do its thing.

    For example, consider some function that gives you an answer, but always takes linear time. If you keep calling it repeatedly that means it now takes way more than linear time.

    After a while, almost every C or C++ programmer has seen something like this:

    strcat( buffer, "apple " );

    strcat( buffer, "banana " );

    strcat( buffer, "cherry " );

    Each time strcat() is called, it traverses the entire buffer before it adds the second string. So, now those 3 functions calls are taking O(n^2) instead of just O(n). Put those 3 functions calls above into a loop, and they require O( n * n * m ) where m is the number of loop iterations. And then if that loop is inside a function that gets called repeatedly, the performance gets even worse. That is probably the most common example I see of people treating a function as a black box.

    Many new programmers do things like that and unwittingly force other programmers into making expensive function calls. Just recently I fixed a cleanup routine that suddenly went from taking linear time to cubic time to finish. A coworker found a function that removed 1 item from a container, so she used it thinking of it as a black box. But, that function not only deleted 1 item at a time, but also sorted the remaining items using bubble sort - which takes O(n^2) time. After her change, the cleanup function was now much slower. No wonder it now took 10,000 times as long to cleanup a container of 100 items! The fix was to go through the container once, and not calling that other function - which needed some fixing of its own.

    Have you ever wondered why some programs are slow no matter how fast your CPU gets? Ever wonder why some of the most complex software take so much time? My guess is that there are so many layers of inefficient functions calling other inefficient functions.

    One reason I like the STL is that it has complexity guarantees. The definition of the STL tells you that some functions will take constant time always, while other take linear time at worst. Any implementation of the STL must match (or beat) those guarantees. So, you never have to worry about calling an STL function and wonder if its implementation will take 10,000 times as long as another implementation. I think of the complexity guarantees as some grey knowledge about the STL, so I can treat it as black box otherwise.

    As a courtesy (or warning) to other programmers who have to develop on top of my code, I often say how complex a function is. Such as whether it takes constant time or logarithmic time for an input of a given size. That little piece of grey knowledge allows them to decide how they want to use the function.

  184. Speaking as a student by n1ywb · · Score: 1

    Half of all programers are below average. And here the average is pretty low. Its amazing how I can barely pass calculus while the guy next to me gets an A, and yet I get an A+ in an OOP class where the average is a C

    "The Big Picture" is something that hasn't been covered at all in my computer engineering bachelors program. Hell, they don't even teach us how to use CVS! How the hell can you work on a large project with more than one developer without using CVS (or some other source control software) religiously? Teamwork is discouraged througout the curriculum. Shit, you can get kicked out of school just for collaborating with another student on a homework asignment. Now for the first time in my last semester after 5 years they're trying to force us to work on teams to do our senior projects. I told them exactly where to stick it. Frankly I don't WANT to work with any of my classmates, not because I'm not a team player. I would LOVE some help on my project. Rather I know them well enough to know none of them would be very helpful. They were never taught the big picture, and were either non smart or not dedicted enough to pick it up on their own.

    I'm rambling.

    --
    -73, de n1ywb
    www.n1ywb.com
    1. Re:Speaking as a student by Anonymous Coward · · Score: 0

      You are 100% on the mark I say!

  185. Managers do design complex systems by Stu+Charlton · · Score: 1

    Managers are trained to deal with schedule and budget. Not with designing complex systems.

    An organization is a complex human system. Executive management are charged with viewing the big picture and designing a large complex system -- but they can't use an engineering approach, because they're dealing with people, not objects.

    It's arguably more complex than engineering for many reasons: you can't guarantee strengths in individuals - you can only observe and take an educated guess, people tend to dislike change and may actively work against any change, plus there are many fuzzy aspects to actually inacting change in an organization due to the complex & mixed nature of an organization's motivation.

    The closest thing I can think of is that managing an organization at the executive level is like debugging a concurrent, distributed system with byzantine failures.

    This is why good executives are so rare, and why so many companies do a poor job of organization and re-organization.

    (One half-baked aside:
    I find it amusing that the general solution in computing to byzantine failure -- quorum consensus -- looks amusingly like organizational bureaucracy. Both are woefully ineffecient as size increases, but work to eliminate corruption.)

    --
    -Stu
    1. Re:Managers do design complex systems by GileadGreene · · Score: 1
      An organization is a complex human system. Executive management are charged with viewing the big picture and designing a large complex system -- but they can't use an engineering approach, because they're dealing with people, not objects.

      I'm afraid I have to disagree with that. Systems engineering is an approach to engineering any complex system, including businesses, enterprises, and entire social systems (the systems engineering approach is being used at the enterprise level in some places already). Just because human systems are "fuzzy" doesn't mean that a they can't be engineered.

      The problem is that managers (as opposed to engineers) are not generaly trained to develop a new system (or if they are it is without any semblance of engineering), but instead are taught how to operate within in an already existing system - they are end-users, not designers. This has started to change with the introduction of things like systems thinking for management (e.g. Peter Senge's "Learning Organizations"), and the movement towards "intelligent enterprises", but the shift is gradual, and not yet widespread. It will be interesting to see if business can successfully make the transtion from ad hoc systems to designed systems.

    2. Re:Managers do design complex systems by Stu+Charlton · · Score: 1

      You raise a good point, and I am very aware of Senge's work (and Ackoff, Argyris, etc.) on learning organizations.

      Change management and organization design & configuration experts have been popular in the literature for some time, there's a lot of good (and not so good) ideas out there, though they're still on the leading edge of practice.

      My original statement that manager's can't use an engineering approach is wrong; in retrospect I was trying to suggest that organizations are very difficult to design up-front. Many of the assumptions and tradeoffs in a structure are invalidated through growth. And re-design involves migrating human systems to the new structure -- a task that requires more than systems thinking (hence Senge's four other disciplines, which are often much harder to achieve in large groups).

      --
      -Stu
  186. Age of fp innocence by Scorchio · · Score: 1

    Folks are not taught that sometimes 1.0 + 1.0 != 2.0 (rounding errors)

    That's a scary thought!

    I remember when we were taught at school that computers aren't as accurate as you'd like to believe. The teacher wrote on the board something along the lines of :

    FOR v = 1 TO 2 STEP 0.1
    PRINT v
    NEXT v

    (ie. on every loop, v is incremented by 0.1, from 1 until it equals 2)

    and told us the loop would never end. I remember it was pretty hard to believe at the time. He didn't explain why; he just left us to try it and see for ourselves and fathom out why. Either that, or he'd just discovered it himself and he hadn't a clue what was going on...

    I've never trusted floating point values since. I'm currently up to my eyeballs in physics simulations using single precision for speed. Trying to keep the rounding errors under control is half the battle!

  187. Deskilling by DrivesMyApe · · Score: 1

    Check out Michael Jackson's "Software requirements & specifications:a lexicon of practice, principles and prejudices." There is a chapter entitled "Deskilling." I think it addresses the issues you raise.

  188. Re:Probably (levels) by hcdejong · · Score: 1

    Another elitest post without a real clue.

    I disagree. AFAI understand, the list is not about the tools per se, but the level of understanding required for each tool.

    A good programmer really should not care HOW they get things done- ONLY that they DO get them done.

    By your definition, a "good programmer" is one who is capable of functioning at a high level in the list. Well, QED. IMO the list doesn't imply a good programmer can't use Frontpage, it only implies that someone who can use Frontpage but is clueless about raw HTML is unlikely to be able to create C code that interacts with APIs or otherwise see the big picture of what he's doing.

  189. Re(2): We don't need anymore black boxes by jj_johny · · Score: 1
    A failed program is one that is not accepted by the customer as meeting their needs. The problem is usually that the processes are weak and thus bad requirements are given which lead to bad design which lead to bad coding. But the only real result comes to show for it is bad coding.

    My major point is that thinking with a black box mentality in most situations will allow somebody to stick it to the programmer when things go bad. So for your own job security and satisfaction, it is important to either deal effectively with a poorly structured environment or make sure you are in a place that has a good development methodology.

    And no I have not written 100% solid code but I have worked in a lot of poorly organized shops and the programmers usually were to blame for accepting the poor docs given to them be not understanding their ultimate responsibility for giving the customer what they needed.

  190. Re:What is your solution? Bullshit by Anonymous Coward · · Score: 0

    All security problems stem from programmers not knowing how to program!

  191. I don't like to say it but.... by oliverthered · · Score: 1

    Why did you write the log, was the analyst such a pain to deal with that you couldn't resolve the issues as you came accross them, or in the design phase?

    The log smacks of 'I told you so', but did you tell him/her in the first place?

    Ok, maybe this is a pipe dream, I usually moan about some crap, and pick up the mess though internal bug reports (which can only happen post release), it's more of a fault in the corporate system then most peoples progamming skills.

    --
    thank God the internet isn't a human right.
  192. Ah the infamous Balck Box by CompilerLite · · Score: 1

    For many years I've seen this evolve. Most coders get caught up in there code and their target system. They usually overlook the intricate parts of where their software will run. Being a Linux user and looking for solutions that are cross platform I do look heavily at Virtual Machines such as Java VM. I really like to code my projects independently of the platform. If you only worry about independence of platform all the time you do give way to many security concerns. You have to look not only at the client machine but the network environment that your application will run on and think of other possible network configurations. Who's code (beside embedded systems) is not going to be implemented into a network environment?

    The largest amount of security holes these days seem to be stemming from poor programming ethics. The amount of software coming out seems to be pushed more by financial needs of the vendor then the need for good software. If software was given the proper tests (i.e. Alpha and Beta) we may actually end up with more secure software. For you programmers out there look at the big picture as often as possible. I myself see myself falling into this dark hole of the Black box.

    Happy Coding!!!!