Posts

Showing posts from 2016

Benefits of static web sites hosted on Google Cloud Storage, Azure Storage, or Amazon S3

Most of my sites have no dynamic content but I often still hosted them as a Ruby Sinatra app or use PHP. A few years ago I experimented with using the static site generator Jekyll but still hosted the generated site on one of my own servers using nginx. After a while I decided to revert the site to its old implementation as a Sinatra web app (even though the site was always static, that is, no server side actions required except for serving up static HTML, JS, and CSS files). I am now using a far superior setup, and I am going to document this new setup to document it for myself, and perhaps other people may find this useful also: I chose to use Google Cloud Storage for personal reasons (I used to work as a contractor at Google and I fondly remember their infrastructure, and using GCP is slightly similar) but using Amazon S3 or Microsoft Azure  is also simple to set up. Start by installing Harp and a static site local web server: npm install -g harp npm install -...

My new Haskell book Haskell Tutorial and Cookbook now available

My new Haskell book Haskell Tutorial and Cookbook  is now available for a minimum price of $4. This book has a Creative Commons share and share alike, no commercial use license - so you can legally (and with my blessings) share it with your friends.

Great short video by Douglas Rushkoff that summarizes his latest book 'Throwing Rocks at the Google Bus'

Those of you who know me in "real life" might remember me talking about how much I enjoyed Rushkoff's newest book that was published recently. Well, he just put out a short video that summarizes many of the useful and interesting best-parts of the book:  YouTube Link I especially like the part where he explains why family owned businesses are so much more stable than other businesses. Makes sense. He also explains the flow of how the economy has worked since the dark ages, and how modern technology platforms, while a mostly good thing, necessitate doing things differently now, or else. Anyway, enjoy the video, or not :-)

The Julia programming language: amazingly nice

Well, at least I am amazed. I took a brief look at Julia  a few years ago but since I understood it to be somewhat derivative of GNU/Octave (or Matlab) and R (I sometimes use GNU/Octave, but not often), I only gave Julia a very short look. Fortunately, a current customer uses Julia so I have been ramping up on the language and I very much like it. A bit off topic but I would like to give a shout-out to the  O'Relly Safari Books Online service  which I recently joined when they had a $200/year guaranteed for life subscription price (half regular price). I am reading "Getting Started with Julia" by Ivo Balbaert which is fine for now. I have "Julia for Data Science" by Zacharias Voulgaris   and "Mastering Julia" by Malcolm Sherrington in my reading queue. When learning a new technology having up to date books available really is better than finding information on the web (or at least augmentation to material on the web). I very much like the tooling f...

My prediction: Immersive real-time VR in Olympic closing ceremonies in 8 years

My wife and I are watching the closing ceremonies right now. Great visual effects that will be even better with immersive virtual reality. I expect that in 8 years we will have the option of being able to change our point of view from the stands to down on the central floor in a complete immersive VR experience with 3D sound and head tracking. I haven't worked in VR in almost 20 years when I helped found the virtual reality systems division at SAIC (where I handled 3D sound with head related transfer functions, motion, haptics, and some graphics) and then a year later did a virtual reality project for Disney while working at Angel Studios. Even if I don't work in VR anymore I am a huge fan and I have high expectations for what is to come in user experience.

I was surprised that so many of the NACL 2016 papers described deep learning projects

I attended the North American Chapter of the Association for Computational Linguistics conference last June in San Diego.  Here is a link to the published papers. The conference was great. The keynote talks, panel discussions, and the talks I attended were interesting! As an independent consultant I payed my own way to the conference and I found it to be a good investment. Sometime I would enjoy attending a European chapter of the ACL conference.

Some new love for Scala and Python

I am a practical developer. I do have my favorite programming languages (Ruby, Haskell, Clojure, and Java) but I tend to look first at what libraries are available in different languages for whatever project I am currently working on. I did a lot of work in machine learning in the 1980s (mostly in neural networks) and since then I have probably spent about 30% of my work time directly working on machine learning problems. That has changed in the last few years since several of my consulting customers wanted help spinning up on machine learning. I have used Scala a fair amount but it has never been a "favorite language," mostly because I didn't care for the tooling. Now I find myself motivated to use Scala because of the awesome Apache MLlib and Breeze machine learning libraries. Also, I have solved my "tooling problem" for Scala development; if you are interested here is my setup: I use a remote high-memory, high-CPU server instance for fast builds. I used t...

Using TensorFlow Deep Learning neural network with the University of Wisconsin cancer data set

My example of using a TensorFlow Deep Learning neural network to build a prediction model using the University of Wisconsin cancer data:  https://github.com/mark-watson/cancer-deep-learning-model This short example also shows how to use CSV files with TensorFlow. It took me a short while getting my data in CSV files into TensorFlow so hopefully this complete example, with data, will save people a little time. Look at the source code for a documentation link if you want to change default parameters like using L1 or L2 regularization, etc.

Action items after attending the Decentralized Web Summit

I attended the first six hours of the  Decentralized Web Summit   on Wednesday (I had to leave early to attend a family event). Great talks and panel sessions and it was fun to have conversations with Tim Berners-Lee and Vint Cerf, and also say hello to Cory Doctorow. I would like to thank all of the people I talked with during breaks, breakfast, and lunch: good conversations and shared ideas. The basic theme was what can we as technologists do to "lock open the web" to prevent governments and corporations from removing privacy and freedoms in the future. There was a lot of discusion why the GPL is a powerful tool for maintaining freedom. The call to action for the summit was (quoting from the web site) "The current Web is not private or censorship-free. It lacks a memory, a way to preserve our culture’s digital record through time. The Decentralized Web aims to make the Web open, secure and free of censorship by distributing data, processing, and hosting across millio...

As AI systems make more decisions, we need Libre Software now more than ever

I have been using AI technology on projects since the 1980's (first using mostly symbolic AI, then neural networks and machine learning) and in addition to the exponentially growing progress the other thing that strikes me is how a once small AI developers community has grown by perhaps almost three orders of magnitude in the number of people working in the field. As the new conventional wisdom goes AI services will be like cloud computing services and power: ubiquitous. As AI systems decide what medical care people get, who gets mortgages and at what interest rates, the ranking of employees in large organizations, nation states automatically determining who is a threat to their power base or public safety, control of driverless cars, maintain detailed information on everyone and drive their purchasing decisions, etc., having some transparency in algorithms and software implementation is crucial. Notice how I put "Libre Software" in the title, not "Open Source....

Writing technical books: the craft of simplifying ideas

I am in the process of writing a fairly broad book on setting up a laboratory for cognitive technology / artificial intelligence . I don't find writing to be easy but I enjoy the process a lot. The main problem that I have is removing unnecessary materials and ideas, leaving just enough so readers can understand the core ideas and experiment with these core ideas using example programs. Unnecessary complexity makes understanding difficult and generally does not help a reader solve their specific problems. If a reader understands the core ideas then they will know when to apply them. It is easy enough, when working on a project, to dig down as necessary to learn and solve problems but the difficult thing for most people is knowing what ideas and technologies might work. In my field (artificial intelligence) the rate of progress has accelerated greatly, leading to much complexity and thus increasing difficulty just to "keep up" with new advances. I organize my thoughts...

I am enjoying my business trip in Singapore

Singapore is a great place: a well run country that caters to business. Sunday: After a surprisingly easy trip from Arizona to Singapore I am getting settled in. No jet lag today! I took a very long walk first thing this morning and took a few pictures: https://onedrive.live.com/redir?resid=96BA71CF7F82BA59!56414&authkey=!AJdcHJmgLjMlwWM&ithint=folder%2c   The first picture is the sunset from 30K feet starting to descend into the Hong Kong airport, then a picture after landing. Carol and I have been in Hong Kong, so that was nice and familiar. I didn't have a window seat landing in Singapore, so no photos from the air. The other pictures are from outside my hotel in Singapore, deep inside the MRT (rapid transit center), and generally around the neighborhood. Singapore has a very nice feel about it. Everything from airport services, port of entry, transportation, hotel accommodations, etc. is well-run, friendly and first rate! Late morning I took a second long wa...

In defense of iPads as productivity devices

I often hear or read people referring to iPads as toys. I don't agree. I use my iPad Pro as a "productivity device." Multiple SSH terminals open at the same time to my servers, the publishing system I now use to write my books, cloud based note taking and research (using Google Keep, Evernote, Word and Notes, etc). I also read eBooks, listen to audio books, and my wife and I use it to watch Hulu TV, Netflicks, HBO Go, and purchased Google Play movies and TV shows. I find the iPad an awesomely useful device. I only use my laptops for software development and since I use Emacs for Lisp, Haskell, and Ruby, with multiple SSH terms that I can flip between quickly, the device also supports programming. I do spend a fair amount of time in IDEs like RubyMine and IntelliJ on one of my 4 laptops, but I just prefer mobile devices whenever I can use them. In addition to my iPad Pro, I also get a lot of use out of my iPad mini 4 and Android Note 4 phone. The trick is having all...

History in the making: first Lee Sedol vs. AlphaGo match game

I was up to 1am this morning watching the game live. I became interested in AI in the 1970s and the game of Go was considered to be a benchmark for AI systems. I wrote a commercial Go playing program for the Apple II that did not play a very good game by human standards but did play legally and understood some common patterns. At about the same time I was fortunate enough to get to play both the woman's world Go champion and the national champion of South Korea in exhibition games. I am a Go enthusiast! The game played last night was a real fight in three areas of the board and in Go local fights affect the global position. AlphaGo played really well and world champion Lee Sedol resigned near the end of the game.

OK, now I remember why I like Ruby: reading through the code for the Reality Wikipedia/DBPedia interface

I have been diving deep this year using Haskell, largely in working on examples for the Haskell tutorial and cookbook-style book I am writing. I was revisiting some of my own (old) code for using Wikipedia/DBPedia data and I ran across the very nice  Reality library  which is written in Ruby. Reality is so very much better than my old code and I enjoyed looking at the implementation. Ruby and Haskell complement each other in the sense that they are in the opposite ends of programming languages spectrum. If you were forced to only use two programming languages Ruby and Haskell would be good choices. Ruby, like Clojure, has ready access to the vast Java ecosystem via JRuby so the combination of Haskell and Ruby really does cover the bases. The ability to integrate real world data as found in Wikipedia/DBPedia into systems is a powerful idea. In building AI systems, large companies like Google, Facebook, and Microsoft preprocess and use available world knowledge (I worked for...

Great talk on Spark

I just listened to an ACM sponsored talk  Making Big Data Processing Simple With Spark  by Matei Zaharias. You may need to be an ACM member to watch the webinar. I first joined ACM in the mid 1970s - recommended. For handling huge datasets Spark is evolutionary or revolutionary depending on your point of view. A bit of personal history before I talk specifically about Spark: In the late 1980s I was an architect and developer on a multinational project to use seismic data from 38 data collection stations to detect atomic bomb tests. All of our data handling software was custom; if we had Spark, or even Hadoop, we would have saved a ton of effort. Similarly, in the 1990s I was tech lead on a fraud detection system that used massive real time telephone records data sets. Modern infrastructure would have saved a lot of time and money. My first serious use of map reduce was processing large Twitter data sets at Compass Labs. We used Hadoop on Amazon ElasticMapreduce. Later wh...

Simple Haskell: using a sqlite3 database

I have been using Lisp languages professionally since the early 1980s. While I now use Java, Ruby, and Clojure for much of my work, I have been slowly been getting up to speed using Haskell over the last 5 years. My difficulties using Haskell are caused almost 100% when I need write impure Haskell code. This occasional discomfort is made up for by the fun and productivity of writing pure Haskell code. Using haskell-mode in Emacs I get the same happy feeling writing pure Haskell code that I used to get using Common Lisp, Scheme, and Clojure - and with the advantages of a strongly typed language! I like to mock up test data and write the pure code first and then write impure code that needs to access the web, RDF data stores, relational databases, file IO, etc. For me, as a student of Haskell, this is the easiest way to write Haskell programs. About 15 years ago, in one of my Java artificial intelligence books I wrote an example program that provides a natural language processing (NL...

I will not vote for Hillary Clinton. I reject the "lesser of two evils" argument.

I believe that Hillary Clinton is in the pocket of Wall Street, a lacky by any definition. I also believe that she is, as Ralph Nader says, a poster child for the military industrial complex. I also don't like her close ties to agribusiness giant Monsanto and her advocacy for the industry's genetically modified crops. I believe that our two party system is broken, almost never giving us a choice that matches the preferences of the electorate. Corporate news corporations favor Clinton over Bernie Sanders in subtle and unfair ways, basing so much of their slanted (as directed to the financial interests of the network owners) discussion in terms assuming Hillary Clinton will be the Democratic candidate and pushing the false narrative that Bernie Sanders has no chance of winning the general election. Some of my friends who are Democrats believe that it is a mistake to not vote for whatever Democratic toadie the establishment runs. What if a Republican wins? Oh NOoos! The sky w...