align-toparrow-leftarrow-rightbackbellblockcalendarcamerachatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-crosscrosseditemptyheartfacebookfullheartglobegoogleimagesinstagramlocation-pinmagnifying-glassmailmoremuplabelShape 3 + Rectangle 1outlookpersonplusImported LayersImported LayersImported Layersshieldstartwitteryahoo

Object-Oriented Design Patterns for Computation

♦♦♦     Object-Oriented Design Patterns for Computation    

Most textbooks and courses on object-oriented programming (OOP) emphasize three kinds of object:

  • GUI (screen) objects
  • One-dimensional container (Java collection) objects
  • Composite (entity, record) application-domain objects that lend themselves to inheritance hierarchies

The object paradigm, however, is often ignored or misused for numeric computation. Surpsisingly many programmers are developing Fortran programs in Java or other OOP languages. But OOP is extremely valuable—some say necessary—in computing with numeric quantities, where carefully designed numeric classes:

  • assure type safety and units integrity,
  • help programmers to avoid common bugs,
  • expland opportunities for component reuse,
  • promote source code understandability and maintainability.

Conrad Weisert will show not only how numeric objects simplify computational programming, but also how common design patterns can simplify the creation of robust numeric classes themselves. He will draw on C++ examples from both business/commercial applications and scientific/engineering applications. Knowledge of C++ or Java is helpful but not required.

Join or login to comment.

  • Phil R.

    Although I'm new to C++, the need for these patterns has existed for a long time - in any language.
    We'll have to figure out why we can't get on the CDM internet, not that we really needed it, but being able to share some stuff would help. That's the only reason for my 4/5 rating. The rest was great.

    March 4, 2012

  • Daniel U.

    I thought this was a wonderful first meeting for me. The use of classes to describe types of quantities is indeed overlooked, and Conrad's gradual ascent to a domain language for electrical claculations highlighted how natural and useful this application of classes could be. I think there was a missed opportunity to expand the discussion, perhaps including the difference between final and intermediate values (this was alluded to in introducing square amperes as a quantity). For example, when dollars are exchanged, they are rounded to the nearest penny, but interest accrual can be fractional until the moment it's credited, and prices for gasoline have a strange 9/10ths of a cent attached.

    March 1, 2012

  • Fernando F.

    I really enjoy the talk and got me thinking more about creating the correct types. I believe I would use templates over macros, but the spirit is the same.

    Stroustrup recently gave a talk about the new C++11. He touches some of the same points at around 18:40 in the following video. He uses this to talk about the C++ 11 feature of user-defined literals. http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Keynote-Bjarne-Stroustrup-Cpp11-Style

    February 29, 2012

  • Nevin ".

    I've posted my alternative solution (which does not use macros) for Conrad's additive pattern at <http://www.meetup.com/Chicago-C-CPP-Users-Group/messages/boards/thread/20942152#[masked]>;.

    February 29, 2012

  • A former member
    A former member

    Good ideas and advice about designing classes for computation.

    February 29, 2012

  • Rob K.

    I found the template like techniques using the pre processor very creative. Though I would have probably opted for templated solution, I feel like I will be a better programmer with the information from Conrad. Its nice to be pulled outside your box. Thank you.

    February 29, 2012

36 went

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy