• Home
  • About

Shores of the Dirac Sea

A blog about physics… mostly.

Feeds:
Posts
Comments
« Digging back in time for an identity.
And a mountain of paperwork later… »

Making mistakes

December 6, 2010 by dberenstein

Here is an example of what happens when one makes a mistake.

There is a good implementation of a function, and there is one where a sign went wrong. This is a rather common occurrence.

Check carefully if you can spot the difference. You can hardly tell the two plots apart ;) You can only tell which one is right if you have some expectations of what the end product is supposed to look like.

 

Good coding

Bad coding

About these ads

Rate this:

Like this:

Like Loading...

Posted in computers, Physics | 1 Comment

One Response

  1. on December 7, 2010 at 10:14 pm Vladimir Kalitvianski

    To me it is quite clear that the left picture is right (zero) and the right one is wrong (infinity, does not fit the frame).



Comments are closed.

    Recent Posts

    • Woof Woof
    • Happy 3.1415926535… day
    • Unstable Universes
    • Bad science reporting versus good science reporting
    • If some of my students were writing problems
  • Archives

    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • November 2012
    • September 2012
    • August 2012
    • July 2012
    • May 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
  • December 2010
    M T W T F S S
    « Nov   Jan »
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Recent Comments

    Plato on Woof Woof
    Pepe on Woof Woof
    dberenstein on Woof Woof
    Lubos Motl on Woof Woof
    Wyrd Smythe on Happy 3.1415926535……
  • Physics/Math/Science Blogs

    • Asymptotia (Clifford Johnson)
    • Backreaction
    • Coctail Party Physics
    • Cosmic Variance
    • Dmitry Podolsky
    • Jeffrey Epstein Science
    • John Baez
    • Michael Nielsen
    • Musings (Jacques Distler)
    • Not even wrong
    • Resonaances
    • Robert Helling
    • Shtetl Optimized
    • Sunclipse
    • Terry Tao
    • Tomasso Dorigo
    • Uncertain Principles
  • Science Resources

    • Physics (APS journal)
    • Scientific American
  • Some More Blogs

    • Evil Inc
    • Fafblog
    • phd Comics
    • Regator
    • Scenes from a multiverse
    • Site Meter
    • WordPress.com
    • WordPress.org
  • Pages

    • About
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.com

Blog at WordPress.com.

Theme: MistyLook by WPThemes.


Follow

Get every new post delivered to your Inbox.

Join 33 other followers

Powered by WordPress.com
%d bloggers like this: