Wednesday, July 29, 2015

I tried Windows 10 the first day of the rollout (today!)

Installing Windows 10 on my 5 month old HP Stream 11 was easy.I have no comments on that process.

Visually two things stand out: windows are all white except for a very thin aqua blue margin and my slow laptop seems to run the UI faster. I don't know how much of the speed bump is making the code more efficient and how much is doing away with some animation effects.

The desktop now seems like a mixture between Windows 7 and 8.1. The start menu is back and the bottom icon navigation bar is always visible along the bottom of the screen unless you put an application in full screen mode. Clicking the windows start menu in the lower left corner of the screen brings up a combo: classic looking menu on the left and the metro large icon interface like Windows 8.1 on the right side of the popup - but this popup only covers about 30% of the screen. It all seems a bit odd to me but I really like it - after using it for ten minutes (it took a little while to adjust to the new interface). I think the new interface in general is very well done. I haven't spent enough time with the new Edge web browser to have a firm opinion yet, but it seems functional and the reading view does a good job of reformatting web pages without advertisements for comfortable reading.

Windows 10 Cortana, similar to Google Now and Apple Siri, is always available just to the right of the Windows start button. Just like the search utility on Windows 8.1 this is the way to quickly find stuff in the system. Need to change the PATH, then just type 'environment variables' and instantly the environment edit utility is shown. I think this actually works a little better than Spotlight on OS X and quite a bit better than hot key search on Ubuntu. I tried using Cortana for searching for things in my community. It did OK, but will hopefully get better as it gets access to more of my life context.

I will spend time locking down some of the privacy settings. I alreaded deleted the Skype application because it leaks a little too much personal information for my taste. Cortana is configuraable for setting which types of information are collected. It pays to take the time checking possible privacy settings for products and services from Microsoft, Google, Facebook, Apple, etc. I tend to keep my Linux laptops more locked down, privacy wise, than my Windows and Apple laptops. I try to strike a balance between having some privacy and also enjoy available products and services.

Saturday, July 25, 2015

Comparing Clojure + Clojurescript with Scala + Scala.js

Even though I mostly use Java, Ruby, and Haskell, I have also been getting my head back into using Scala in my spare time. I took Martin Odersky's Functional Programming Principles in Scala class three years ago, and although I really enjoyed the class (he is a great lecturer!), I didn't much care for the tooling for Scala at that time. I ended up mostly using Clojure (with a little Haskell) for my day to day most used programming language.

I experimented with Scala.js a while back and thought that it compared well with Clojurescript. Sweet to write client code in either Clojurescript or Scala.js but I think that sometimes it is faster to not have the extra complexity and the need to transpile and just use plain old Javascript. I took a class in Typescript this year and really liked it but with ES6 quickly becoming a standard some of the benefits of Typescript go away.

This morning I was looking for an interesting template project using Scala for the backend and Scala.js for client code and ran across the impressive Widok project which supports a reactive web framework for the JVM and Scala.js. I have been experimenting this morning with the Widok skeleton client server starting project which provides niceties like automatic asset (SCSS to CSS, etc.) handling, auto re-compilation, etc. I don't have a need for using Widok right now but it is on my personal "watch list." Widok is really nicely done and the client server skeleton project is easy and fun to hack on.

Still, after three years I still find the tooling for Scala to be a bit heavy. I have a much faster laptop on order and that will help reduce the 5 or 10 second delay in processing changed assets and code for my work and generally experimenting with Scala, playing with Widok, etc..

Tooling is where Clojure and Clojurescript development really shine in my opinion. My Clojure setup allows me to edit server side code, Clojurescript client code, change hiccup template code, etc. and basically immediately see the results of code changes. I like that my hiccup templates are also Clojure code. It is fun to work on projects where everything is simply Clojure. Nice. I also like that I am not using any heavy weight frameworks, just a few libraires. This contrasts with richer development kits like Rails and Meteor.js which are fantastic when your application fits their application models. I like just using libraries and keeping the technology stack simple unless there is a particularly good fit for using something more complex.

Monday, July 20, 2015

Ubuntu Linux on my Chromebook without X11

I have been very happy with using Chrome OS on my Toshiba Chromebook 2 but after often reading how easy it is to install Ubuntu I decided to give it a try. I used crouton (which runs Ubuntu along side Chrome OS) and decided to not install X11 to save space - important with just 16GB internal storage. I used:

sudo sh ~/Downloads/crouton -t cl-extra

After installing Ubuntu I had about 10.5 GB of free local storage (remember, Chrome OS is also installed). After installing the gnu command line development tools, Ruby 2.1, Java 8, lein for Clojure development and several of my Ruby and Clojure projects I still have 7.5 GB of storage. I still want to install Haskell so I will have less space to work with.

When developing web apps, you can test using the Chrome web browser since crouton runs Ubuntu right along side Chrome OS. For example, I was running a Sinatra app using port 4567 and could just hit the URL http://localhost:4567 on the Chrome browser in Chrome OS. Easy. I thought that I might have to start a ssh tunnell beyween the two Linux environments, but that was not required.

Opening several terminal windows using ctrl-alt t and then starting a shell in each with:    


shell
sudo enter-chroot

I really like Chrome OS but also having Ubuntu available for local development is great! My Toshiba Chromebook 2 has 4GM of RAM and the processor is fast enough. If you like console development using emacs or vi, then this is a good setup. My Chromebook as a 1080p resolution screen so there is a lot of screen real estate for multiple console windows and a web browser.

Saturday, July 04, 2015

Experiences with my new Toshiba Chromebook 2

When I worked as a contractor at Google in 2013 I noticed that a lot of people were using Chromebooks. On my first orientation day I received a retina MacBook Pro, that was very nice, and I didn't immediately understand the preference of some people to use a Chromebook. Later I understood that a large amount of work performed at Google could be done in a Chrome web browser. They even had a very nice browser based IDE called Cider that was very great to use because it handled all programming languages and interfaced with Perforce source code control.

My curiousity about Chromebooks has persisted. I am going to start teaching free classes at my local library in about two months on Internet secutity and privacy and I used this as an excuse to buy a Tosiba Chromebook 2. I had already bought earlier this year a little HP Stream 11 Windows 8.1 laptop using the same excuse :-)

I will start out this "review" with a list of the good and not so good things about the Chromebook 2 (all just my personal opinions). The good:

  • The number 1 reason: security. Nothing (except for a few SSH keys) is stored locally and I think that if a Chrombook gets compromised it is automatically reset with a factory image.
  • The screen is fairly high resolution 1080p and looks really nice. Some of the user comments on Amazon complained about reflections in the screen, and this would be a problem if it was used outdoors.
  • 4 GB of main memory which helps the performance. Most Chromebooks seem to only have 2GB of memory.
  • The keyboard and trackpad work well - no complaints.
  • Contrary to some reviews, the battery has been lasting about 8 hours - not bad at all.
  • This laptop is inexpensive, given the nice display.

The not so good:

  • The laptop case is plastic. It looks OK, but I expect it to get dinged up easily. I also bought an iPearl hard shell cover that should help prevent some case damage.
  • Only 16 GB of storage. How much would it have added to manufacturing costs to make this 32 GB? I did try using a 32 GB SD Card for a while which worked fine except for the card sticking slightly out of the case. I think that I will use the external memory card only for movies while flying or other cases where I temporarily need a lot of local space.
  • Privacy: I find myself using Google, Dropbox, and Microsoft web services a lot on the Chromebook. There are issues using these services that I have blogged about before: FSF and practical Internet privacy and security.

Using the Toshiba Chromebook 2:

Writing: As you might expect, I find this laptop great for web browsing and watching Netflix. It is also pretty good for writing. I use leanpub for writing. My markdown manuscript files are stored in a book specific Dropbox folder, and I use a web interface to generate preview PDF, Mobi, and ePub files (which get put back into Dropbox). I use the Chrome StackEdit app to edit the markdown files. This is a simple and effective workflow that lets me concentrate on writing.

Programming is a different issue. I do Haskell, Common Lisp, and Scheme programming in Emacs so using the Chrome shell app is fine for keeping multiple SSH shell windows open to whatever server that I am using. I spent 20 minutes this morning fine tuning my emacs Haskell setup and I can honestly say that the Chrombook is > 95% as effective for Haskell development than my MacBook or Linux laptops. The advantages of using remote servers for Haskell development are my servers are usually faster than than my laptops and long running computations like cabal sandbox/init/build don't heat up my laptop. You would think that Clojure development would be fine on a Chromebook except that my Clojure development workflow uses IntelliJ, not Emacs. It is not worth changing my Clojure development style, so I'll just use my other laptops for Clojure work (and for Java and Ruby, which also use IntelliJ for my work flow). I have tried using nitrous.io (web based IDE) for Javascript and Ruby/Sinatra development and that works well on my Chromebook.

I am very happy that I bought the Chromebook - no buyer's remorse :-)

July 5, 2015 (next day) edits):

For web based Haskell development, I left fpcomplete.com off of my list - an excellent web based IDE and Haskell learning center.

Also, I spent some time this morning working on a Clojure project using Emacs + cider instead of IntelliJ. To be honest, since I usually use IntelliJ, I forgot how great cider has become. Beautiful integration with lein, nice auto-complete, etc.