Many (many!) years ago I created this easily printable monthly calendar. If you ever need a monthly calendar you can print, I hope that’s helpful.
If you ever wondered what Digital and Print book sales look like for a technical book (a computer programming book, in this case), here you go. This is a slightly cleaned up chart that O’Reilly provides to me for sales of the Scala Cookbook over time, showing eBook sales vs the printed book sales.
putStrLn doesn’t print to standard out, it returns a value — of type
IO () — which describes how to print to standard out, but stops short of actually doing it.”
From the article, An IO Monad for Cats.
If you need to dump the contents of an array to the Android Log (Logcat) output, I can confirm that this approach works, at least with simple arrays of integers and strings that know how to print themselves:
If you’re trying to print more complicated arrays of custom objects you’ll probably need to implement good
toString methods on those objects, and then this technique should work.
I just ran into a problem where the
putStr function in Haskell was not printed out in the order I wanted it to be. I wanted to prompt a user for input, then read their input, but the
putStr output didn’t appear until later, after I hit the Enter key. (
putStr is preferred here over
putStrLn because it does not add a newline character after the output.)
From this article, here is a list of the best fonts to use for readability and comprehension in printed documents.
As a quick note, I just got a little bit better about logging stack traces when writing Java or Scala code. In Scala I used to get the text from a stack trace and then log it like this:
// this works, but it's not too useful/readable logger.error(exception.getStackTrace.mkString("\n"))
In that code,
getStackTrace returns a sequence, which I convert to a
String before printing it.