Recommend this book to all programmers

Quote from rosy2:

whats your recommendation to test/debug realtime event driven and threaded systems? I have no trouble testing individual pieces but the whole is different
I have a philosophy that I try to adhere to in all of life. I try to make questions meaningless. Let me explain. For example, people get confused when they ask, if the Universe is finite, what is on the "other side"? If you make the universe a sphere (n-dimensional) the question becomes meaningless. The Universe would then be finite, but boundless. There is no edge. This is similar to when early people that believed the Earth was flat, were confused when they asked, what happens when we reach the end of the world? Do we fall off the end?

In programming, I use this philosophy which is in the same spirit, imo:

Rather than fixing bugs, agile methods strive to prevent them.

Test-driven development structures work into easily-verifiable steps. Pair programming provides instant peer review, enhances brainpower, and maintains self-discipline. Energized work reduces silly mistakes. Coding standards and a "done done" checklist catch common errors.

On-site customers clarify requirements and discover misunderstandings. Customer tests communicate complicated domain rules. Iteration demos allow stakeholders to correct the team's course.

Simple design, refactoring, slack, collective code ownership, and fixing bugs early eliminates bug breeding grounds. Exploratory testing discovers teams' blind spots, and root-cause analysis allows teams to eliminate them.


http://www.freebookzone.com/goto.php?bkcls=se&bkidx=53&lkidx=1

Even more appropos in that book is the section called "Invert Your Expectations" but I cannot link to it.

I am assuming that you are talking about systems that have a non-deterministic program paths, as otherwise they are relatively easy to test with Unit Testing, imo.

Hence, I try to achieve a situation where if the components work correctly, the whole must. For example, I have become more convinced that threading is too hard in a complex interacting system, so I try to minimize the problem by using immutable data in the functional style. Other ideas are to use cores for processes, not threads. The problem then disappears.
 
That is interesting. Imo Python or any dynamic language has the same prototyping power. I am investing somewhat in learning Python, and IronPython in particular. I am also making an investment in learning Erlang and F#.


Quote from Corey:

I agree with lolatency ... I have found Scala to be a nice middle ground between something like SML (or OCaml) and Ruby. Yes, it inherits heavily from Java, but really only the good stuff.

I moved from C++ to Ruby because Ruby allowed me to prototype very, very quickly. Unfortunately, it also ultimately made me a bad programmer. Through the forced abstraction of declaration and definition, closed classes, and just the whole 'header' 'source' file paradigm, C++ made me design and code at the same time. Ruby just let me code. Therefore, I just didn't follow good software engineering practices. Also, it is very, very slow. JRuby helps, but doesn't solve all the problems. So while I got great 'coder-time' speed up using Ruby, and all the libraries available to it (the gems package is amazing), I ultimately lost time from having to start each project from scratch.

SML, on the other hand, was too strict for me. Sometimes I need a mutable object. Sometimes it just doesn't make sense to be passing everything as state. Sometimes a loop is the correct solution. Thinking 'functionally' can be very helpful, but not always the right solution, in my opinion.

Scala lets me get the best of both worlds. I can get the type correctness of a static language, and still a good amount of freedom from mutability. It has garbage collection (thanks to the jvm), and incorporates Erlang's actor paradigm. I can write my concurrent actors with non-mutable state, and even do cool stuff like <a href="http://jonasboner.com/2007/12/19/hotswap-code-using-scala-and-actors.html">hot swapping</a>. This allows me all the concurrent safety of languages like Erlang, but with all the libraries of Java. Hell, if a Java library is NOT thread safe, I can just typically wrap the methods I want into an actor and I get thread safety!

Seriously. Check out Scala. O'Reilly has a nice free e-book available <a href="http://programming-scala.labs.oreilly.com">here</a>.

I hear clojure is good too. Haven't tried it yet though.
 
Quote from UMDred11:

More power to you sir. F# was a pain for me. Too strongly-typed for me.

Meh, it does allow for <a href="http://www.atrevido.net/blog/2008/08/31/Statically+Typed+Duck+Typing+In+F.aspx">duck typing</a>, which allows you to get around some of the pains associated with strong statically typed languages...
 
Quote from nitro:

Manning is offering 40% on many books. Use this code on check out: a2740.

One very nice thing about Manning is that they also give you the eBook free with the hardcopy.

I am going to get

Functional Programming for the Real World
EARLY ACCESS EDITION

http://www.manning.com/petricek/
This code may get you 50% off

pop0907

It may only have been good yesterday :(

Try pop0908 it may work :D
 
Quote from Corey:

I agree with lolatency ... I have found Scala to be a nice middle ground between something like SML (or OCaml) and Ruby. Yes, it inherits heavily from Java, but really only the good stuff.

I moved from C++ to Ruby because Ruby allowed me to prototype very, very quickly. Unfortunately, it also ultimately made me a bad programmer. Through the forced abstraction of declaration and definition, closed classes, and just the whole 'header' 'source' file paradigm, C++ made me design and code at the same time. Ruby just let me code. Therefore, I just didn't follow good software engineering practices. Also, it is very, very slow. JRuby helps, but doesn't solve all the problems. So while I got great 'coder-time' speed up using Ruby, and all the libraries available to it (the gems package is amazing), I ultimately lost time from having to start each project from scratch.

SML, on the other hand, was too strict for me. Sometimes I need a mutable object. Sometimes it just doesn't make sense to be passing everything as state. Sometimes a loop is the correct solution. Thinking 'functionally' can be very helpful, but not always the right solution, in my opinion.

Scala lets me get the best of both worlds. I can get the type correctness of a static language, and still a good amount of freedom from mutability. It has garbage collection (thanks to the jvm), and incorporates Erlang's actor paradigm. I can write my concurrent actors with non-mutable state, and even do cool stuff like <a href="http://jonasboner.com/2007/12/19/hotswap-code-using-scala-and-actors.html">hot swapping</a>. This allows me all the concurrent safety of languages like Erlang, but with all the libraries of Java. Hell, if a Java library is NOT thread safe, I can just typically wrap the methods I want into an actor and I get thread safety!

Seriously. Check out Scala. O'Reilly has a nice free e-book available <a href="http://programming-scala.labs.oreilly.com">here</a>.

I hear clojure is good too. Haven't tried it yet though.
I am looking through your links and they look quite good. Scala seems to be the static version of Groovy,

http://groovy.codehaus.org/

an extension to Java that I find very interesting.

Thanks for the info.
 
Back
Top