download

Learning Functional Programming in Scala (pdf)

Table of Contents1 - What’s new (June 25, 2017)2 - Buying the book3 - One more thing4 - Preview5 - Some time in the future ...

My new book, Learning Functional Programming in Scala, is currently on sale as a PDF you can purchase for just $25 US. (The price will be increased to $30 on August 1st.) Details are listed below.

Back to top

What’s new (June 25, 2017)

If you’ve been following along with me recently, the latest changes are:

First draft of my Scala/FP book, coming soon

Health (and other things) permitting, I hope to have a first draft of my book on Scala and functional programming (now titled, Learning Functional Programming in Scala) completed by the end of May.

It may only be in an alpha or beta state by then, but I’m debating about making it available as an Amazon ebook for a low cost at that time. I’ll be going back to work almost immediately after that, so if I don’t release it now, it may be another year before I can really finish it.

Update: The first 600 pages of my book, Learning Functional Programming in Scala, are now available as a free PDF download.

Scala: How to download and process XML data (such as an RSS feed)

I was looking for a good way to access XML resources (like RSS feeds) in Scala, and I currently like the idea of using ScalaJ-HTTP to access the URL and download the XML content, and then using the Scala XML library to process the XML string I download from the URL.

This example Scala program shows my current approach:

Scala - How to download URL contents to a String or file

Scala URL FAQ: How do I download the contents of a URL to a String or file in Scala?

I ran a few tests last night in the Scala REPL to see if I could think of different ways to download the contents of a URL to a String or file in Scala, and came up with a couple of different solutions, which I'll share here.

Download URL contents to a String in Scala

The best way I could think of to download the contents of a URL to a String looks like this:

A shell script to download a URL (and test website speed)

I've been having a problem with a GoDaddy website lately (see my GoDaddy 4GH performance problems page, and in an effort to get a better handle on both (a) GoDaddy website downtime and (b) GoDaddy 4GH performance, I wrote a Unix shell script to download a sample web page from my website.

To that end, I created the following shell script, and then ran it from my Mac every two minutes:

How to download iPhone photos to Windows XP

iPhone photos and Windows XP tip: How to download iPhone photos to a Windows XP computer.

Okay, this was surprisingly hard. I just went to download all my iPhone photos to my Windows XP computer, and assuming this worked with the normal iTunes sync process, I started the 'sync', waited a very long time, and then at the end, all my photos were ... wait ... none of my photos were downloaded from my iPhone to my Windows XP system. What the heck?