Saturday, September 29, 2012

I tried using Twitter Bootstrap this morning. Really nice way to support mobile devices.

I rewrote my markwatson.com website recently, tossing the 15 year old PHP implementation and replaced it with a little Clojure + Noir web app. This morning I spent a short while refactoring it to use the noir-bootstrap project on github. Along the way, I read through the Bootstrap scaffolding documentation. Really cool stuff.

One thing that I had to add was

<meta name="viewport"
      content="width=device-width, initial-scale=1.0">
to the head section of my Noir page layout template. Before I did this my web site did not identify the media type when I used an iPad and a Samsung Galaxy III S phone for testing.

I wrote earlier this year about using Noir and the Dojo Javascript library for my cooking/recipes web app. Dojo makes it easy to write mobile web apps but Bootstrap helps a non-expert Javascript developer like myself write something once and have it work across devices.

Sunday, September 23, 2012

Alternative JVM languages

I am enjoying Martin Odersky's course "Functional Programming Principles in Scala." I use JRuby and Clojure a lot in both consulting projects and my own projects but my main use of Scala in the past was writing some programming examples for my book "Practical Semantic Web and Linked Data Applications, Java, Scala, Clojure, and JRuby Edition" that is available here for free. I had purchased three Scala books and occasionally played with Scala but it never really "clicked" with me (same situatuon with Haskell: bought three books on Haskell, lots of experiments, never had the "clicked" experience).

Taking Martin's class is definitely helping me become more comfortable with Scala.

Having an interactive repl for Clojure and JRuby has always been a big win for me over Java development, even with great Java tooling (e.g., when I have to do GWT or SmartGWT development, having both the server and client side code in Java, all debuggable in IntelliJ is nice, but still a very heavy weight development environment!)

Scala provides a good repl experience and has something else really neat that I learned about in Martin's course: the Eclipse+Scala plugin "worksheet" support. A "worksheet" is a separate edit window that can contain any Scala code and every time you save the worksheet file, then the value of every expression in the worksheet is displayed in the right hand column. This is sort of like Light table for Clojure and Javascript, but very polished and integrated nicely into the IDE. I am a huge fan of IntelliJ, but I have switched to Eclipse+Scala plugin for Clojure development for the class. BTW, if you want to experiment with the "worksheet" functionality, it is probably easiest to download the Scala IDE bundle from the Typesafe download site.

Tuesday, September 18, 2012

More work on my NLP web service

I have done a short sprint the last three days on my NLP SaaS kbsportal.com mostly working on classification/tagging.

When I have time in the next month I also make some improvements in sentiment analysis and entity recognition. The text summarization code also needs work but it may be a while before I have more time to work on that.

I rewrote KBSportal in Clojure early this year. It used to be a pile of Common Lisp, Scheme, and Java code experiments written over a 10+ year period and it was great to pull just the parts I wanted into a new system. It might be heresy to Lisp programmers but I will (probably) eventually rewrite it again in plain old Java to save a bit on memory footprint and CPU time. Clojure is a very efficient language but not as efficient as Java.

Sunday, September 02, 2012

Effectively using Linux for work

I am going to write up a few of the things that make Ubuntu Linux a more comfortable software development, writing, research, and having fun environment. I hope that readers of this blog add their own suggestions in comments (remember: I moderate comments to avoid publishing SPAM so it might take a short while before I see your comments and approve them).

I use Evernote and the Kindle reader a lot and there are no officially supported Linux clients. Evernote has an open source client client NixNote that is OK but I prefer to simply use the web interface on the Chrome web browser. This is a little slower than a native client with local copies of everything but it is OK. I also use the Evernote Chrome plugin. For reading books I buy for the Kindle the Chrome Kindle plugin works fine, especially since I own a Kindle device and my Samsung Galaxy 3 III phone (with 1280x720 screen resolution!!) is also good to read with. One serious problem is watching Netflix movies on Linux. I get by using our large TV with Google TV or my iTV (a gift from my stepson last year). Also watching Netflix and Hulu+ on my Samsung Galaxy 3 III is fine if no one else is watching. I also have an iPad 2 I bought last year that works well for watching video; I am planning to swap this out for a Nexus tablet that has a smaller screen but higher resolution than my iPad 2.

Other tools I use everyday work fine on Ubuntu Linux (sometimes with some adjustments): IntelliJ, RubyMine, LaTex tools, Emacs, git, etc.

For many years I wrote copious work notes in a physical square deal style laboratory notebook. I switched 20 years ago to using plain text files for copious work notes on everything that I do. Now I organize notes differently using a combination of Google Docs (back them up often!) and RTF formatted text files that are a little better for me than plain text because it makes it easier to tag different kinds of content with styled text and different colors - this helps me find things faster. I like to use AbiWord to quickly open, edit, and view RTF files - faster and lighter weight than Open Office or Libre Office.

For a lot of what I do there is little difference between using Linux, OS X, or Windows. Interacting with customers using github and Google shared documents is the same. To be clear, which desktop (or laptop :-) operating system people use is their own choice. For me, being able to apt-get install software and have the same environment on my laptops as on my servers make using Linux a great advantage. For most casual computer users obviously Windows or OS X is a better choice for them.

Saturday, September 01, 2012

Can we agree to stop buying Apple products?

Apple has gone too far in starting legal proceedings to stop sales of the Samsung Galaxy S III phones. Have you seen these? Carol and I both have them. It looks to me like Samsung bent over backwards on this product to not infringe.

I have a long happy history with Apple: I wrote the Chess playing program they gave away on the free demo tape for the early Apple II, I did quite well with a commercial AI product for the Mac in 1984, and I respect their technology.

That said, I think that the iPad 3 that I bought for my stepson a few months ago might be the last Apple product that I buy unless they have a turnaround in their business strategy and stop trying to be the world's largest patent troll. I have already decided to not buy one of the retina MBPs and to not renew my iTunes Match service subscription when it expires. Apple has the legal right to pursue any legal proceedings they want but as consumers we can vote with our wallets and stop buying Apple products! Obviously I want you to make your own decisions - I am just sharing my thoughts on the best strategy for affecting a company whose actions I don't like and a boycott of Apple products seems like the best strategy.

And, there are now some very sweet non-Apple laptops :-)