Why F#, and Why Not Windows

I posted my previous entry and got a few retweets and favorites. One reply came back and made me think, “ah, it might not be obvious why I’d like to have F# on something besides Windows.” Well, here’s a list of why I want to use F# on non-Windows platforms.

  1. F# is a good language. I can’t say the best, since I honestly don’t have enough experience with it or other functional languages to really declare a victory in my opinion. However I’ll be doing some work with Scala, Haskell, and Erlang in the next couple of weeks for testing and use with some upcoming projects.
  2. There are only two technology stacks that will let one spin up an actual application on all of these technologies: OS-X Cocoa, Windows, Linux, Android, and iOS. These two tech stacks are .NET and than the Node.js JavaScript stack – with the latter being purely web based. (Yes, some could argue Adobe’s tools or the Java stack, but I’m not going down that route right now, as both are somewhat bloated and convoluted in ways we can go into at some other time)
  3. With F# I get a clean functional language that I can build native mobile, tablet, or OS apps and all the web services that I want with two advantages over Node.js. The first is the performance edge and can likely be tuned more anyway. Being paired with SignalR one can even get some wicked simple and fast real-time capabilities with minimal code. The second is it takes less F# code to do similar JavaScript things and compute, let me tell you about compute with F#. F# can run things that JavaScript just really can’t measure up to when it comes to compute. But aside from these things, they’re both excellent tools and I wanted to have F# in my tool belt.
  4. There’s always the backup plan of just converting to JavaScript too, if I needed that sort of thing. Check out FunScript.
  5. The community around F# is actually pretty cool, there are good, solid, intelligent, and friendly people in that community. Having a good community of people always makes getting into a new language or related tech much better then when the community consists of asshats or jack ass savants.

Other great things that add to the usefulness of F# include WebSharper.NET MVC 5 and Web API, Nancy API, Suave.io, and there are others.

So those are the reasons I decided to move forward with F#: solid language, provides a solid technical stack with options, it’s functional and clean with extra compute power, and a kick ass community. Of course F# came from the land of Windows and Softies (that’s short for Microsofties, and I didn’t make that up). But F# was handed over to the open source community and currently moves forward autonomously of Microsoft. By proxy of this event, and other culminating events of late, F# can easily run on operating systems besides Windows. I’m not a fan of Windows, and here’s a few snarky (yet very real) reasons why I don’t even want to mess with Windows (except in the situation where I really do want to or need to use Visual Studio).

  1. Windows is still slow. I could go into the reasons, but it tends to build slow, behave slow, be prone to the attention of spammers and such, only in the last X years has it managed security in a half ass decent way, which also leads to slowness, and … oh you get the idea. It’s a slow OS.
  2. It’s flippin’ humongous. Now is this really a problem? Not really, but it’s annoying to force fit it in when I’m doing DevOps work or actually attempting to load Windows related images with it. The OS itself is still a nightmare of gigantic proportions compared to spooling up other systems. If one wants to fight with it, that’s great, I don’t really feel a keen desire to fight with it.
  3. Linux == Smaller footprint, more features, let’s not bring up security, is actually used on major systems, large scale systems and super-computers. Windows has less than 2% market share in that space. Even Microsoft is decreasing their reliance on Windows, offering oodles of Linux options.
  4. Windows doesn’t tend to get, run, or have the bleeding edge tech options built for it. Go look at the open source massive distributed systems applications and other excellent leading platforms and tooling that are leading companies into the future. If Windows is involved at all, it’s often an afterthought. :-/
  5. Windows 8 interface. I’m just going to leave that one right there. I like a lot about it, but I’m with Microsoft, even with Windows 10 they’re not trying to push this UI/UX catastrophe any longer.
  6. SSH not built in. End of story.

Don’t get me wrong, the tooling on Windows for doing Windows specific development and even doing crud apps with lots of business rules is spectacular. I’d even bet that the .NET ecosystem does a better job, sometimes dramatically better, than the Java ecosystem when it comes to those types of applications. I however, haven’t built these style of applications in a long while. Whenever I do, Windows might be a prime option, but otherwise I’ll stick to the operating systems that get me into the coding faster, sooner, and with less resistance.

Outside of Windows there are a lot of great Microsoft tools and technologies that I’d love to have on non-Windows operating systems. One of those is F#. Another is Visual Studio, which I’m betting will continue to get better and better. I’d like to have C# (which I do with Xamarin and such) and a whole ton of other scaffolding and crud tools and other things that are available. I just prefer them without Windows.

As I often say, to each their own. Mine just isn’t Windows these days.

Using SSH Locally to Work With Ubuntu VM + VMware Tools Installation via Shell

I do a lot of work with Ubuntu, 90% or so of that work is from an Ubuntu instance. Often that instance happens to be a local VM running in VMware Fusion (or sometimes Virtual Box). Often I’ll start with a base server image which isn’t entirely setup for SSHing into the instance. These are the steps to get that installed and ready to go.

First install the image, in this particular situation I’m using the Ubuntu 12.04 LTS Server image.

Ubuntu 12.04 Server. Click for full size image.
Ubuntu 12.04 Server. Click for full size image.

That will take a few minutes to install, on machines these days I’ve experience just about 8-15 minutes. There are a million other options to do this too, such as starting with a clean Ubuntu image using Vagrant, which takes all of about 1-2 minutes, sometimes a bit more if you have to download the image. But either way, get one built and running.

Installing Ubuntu using VMware Fusion. Click for full size image.
Installing Ubuntu using VMware Fusion. Click for full size image.

Once the image is installed, login and install openssh-server and openssh-client.

[sourcecode language=”bash”]
sudo apt-get install openssh-server openssh-client
[/sourcecode]

Once that’s installed I pull up my IP address with ifconfig.

[sourcecode language=”bash”]
ifconfig
[/sourcecode]

The ifconfig command shows a lot of information regarding the network configuration associated with the various network adapters in the machine that it is executed on. In the image I’ve circled the local IP address that is assigned to the instance.

The local IP address using the ifconfig command. Click for full size image.
The local IP address using the ifconfig command. Click for full size image.

Now that you have the local IP of the instance, bring up a local terminal (in this case I’m on OS-X, but if you’re on Windows pull up Putty or on Linux or another *nix variant pull up a shell). In the terminal you can now enter the follow SSH command to log in from the local machine versus the running instance. This comes in handy when you want to treat the machine like an actual hosted machine somewhere, in which you wouldn’t be directly logged into the server.

[sourcecode language=”bash”]
ssh username@192.168.77.197
[/sourcecode]

Logged In.
Logged In.

Getting VMware Tool Installed

This assumes that you mount the installation files (aka the cdrom) via the built into mount option in the VMware Fusion menu.

Selecting 'Reinstall VMware Tools' to mount the installation files. Click for full size image.
Selecting ‘Reinstall VMware Tools’ to mount the installation files. Click for full size image.

Once that’s mounted, the machine is ready to install the tools on. However, there are a few other things to install just before installing these. First get the latest updates for apt-get with the update command.

[sourcecode language=”bash”]
sudo apt-get update
[/sourcecode]

Now install the latest gcc, make, kernel headers and other important tools.

[sourcecode language=”bash”]
sudo apt-get install gcc make build-essential
sudo apt-get install linux-headers-$(uname -r)
[/sourcecode]

In the above, everything can be put on one line, but I separated the linux-headers just for extra clarity. I can now via remote SSH on the local machine or directly into the virtual machine and run the following commands to install the VMware Tools.

[sourcecode language=”bash”]
sudo mkdir /mnttools
sudo mount /dev/cdrom /mnttools
tar xzvf /mnttools/VMwareTools-x.x.x-xxxx.tar.gz -C /tmp/
cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl -d
[/sourcecode]

Finish everything up with a good reboot.

[sourcecode language=”bash”]
sudo shutdown -r now
[/sourcecode]

Now I have the VMware Tools installed and able to SSH remotely, giving me the ability to use the virtual machine as I would an actual hosted instance.

That Was Fun, Done With The Lenovo Carbon X1, Back to GSD!

Over the last couple of months I’ve been double laptoping it. I’ve had a Lenovo Carbon X1 with Windows 8 and Ubuntu dual boot configuration with 8GB RAM, 256GB SSD and i7 and I had a Mac Book Air (MBA) 8GB, 512GB SSD and i7 Proc. The MBA was my primary work machine with the Lenovo being a secondary machine that I was using to test and build Windows 8 Applications and for building native Linux services and related code work.

Windows 8 Critique

Simply, Windows 8 is one of the most broken operating systems I’ve used since Windows ME. Forget Vista, I consider it officially dethroned. Let me clarify what is and isn’t horrible about Windows 8 though. It isn’t that it technically is a bad operating system, it’s that the idea and approach that Microsoft has taken is inherently flawed at several key points.

First, having a desktop on a tablet, which is almost impossible except for all but the finest of finger pointing tablet users, is blindingly stupid. Just go into any place where there is a Windows 8 tablet user and watch them whacking away when they get into the desktop.

The Windows 8 desktop on a tablet is patently absurd for the vast majority of potential Windows 8 users.

However, the straight Metro Interface of Windows 8 (which Microsoft now calls the Windows 8 interface because of legal reasons) is magnificent for tablet usage. There are a few major things that need fixed: responsiveness related to connection state, update status and the availability of high quality applications. Once those things are fixed Windows 8 will be as competent as iOS or Android in the usability department. Until then, it’s a nice dream, with a small number of usable apps with a huge potential.

Now the desktop is the tried and true classic desktop of Windows. Thus, when you’re on a desktop machine or a laptop with a dedicated pointing device or touch screen the back and forth is fine. Matter of fact it is great! I find myself using the touch screen regularly to do a number of tasks, and hope to see its use increase more and more on a number of platforms (yo Apple, got game on this yet or not, OS-X can definitely use a touch interface).

Overall though, Windows 8 – unless you solely do Windows 8 Development, is not a reason to buy a Lenovo X1 Carbon.

Ubuntu Critique

Minus the touch screen, which Ubuntu has no clue what to do with except treat it like a pointer, this is how you see the real power and beauty of the Lenovo X1 Carbon. Ubuntu loads 2x faster and shuts down 2x faster than Windows 8. Comparable builds in IntelliJ, C, C++, Erlang and other compilers are regularly 1.2-3x faster than on Windows. The servers that one would build against, such as GlassFish (see this for my latest on setting up GlassFish & Java 7) are also routinely faster, more responsive and less prone to difficulty than in Windows.

One of the problems that is ongoing, is it is hard to move to Ubuntu unless you are doing dev. Using Adobe tools is a non-starter, best to stick to slow Windows or get real fast using OS-X. Again though, if it runs on Windows and Linux, I’d take a safe guess that the Linux versions will be faster, probably more stable, and all around it’ll likely work better over time. There is something to that whole unix way about building things. One other big booster for Ubuntu, is writing JavaScript, which I do regularly these days is a much better experience than on Windows. I use standard tools, that usually are available on Windows, but launching Sublime 2 or WebStorm is just faster, noticeably, on Linux versus Windows 8 (or whatever version really).

So overall, if you’re going to get a Linux machine, the Lenovo X1 Carbon is a prime choice. If not one of the best. If I understand correctly, there may even be some solid Linux software out there that would make the touch screen more usable too. So if you’re adventurous you may be able to solve that one single issue that I had with Linux running on the X1.

Would I Give Up My Mac for the X1?

This is easy, the answer is absurdly simple. However I did give up the Mac Book Air I had in parallel with the Lenovo for several months, as it belonged to Basho (which I’ve departed from).

Hell no!!!

Matter of fact, even though I’ve used the laptop extensively with Ubuntu and Windows 8, I’ve just bought a new Mac Book Pro Retina 15″ to do all of my work with Ubuntu, Windows 8 and OS-X. The solidness of the MBP is untouchable compared to the X1. The screen is better, the keyboard is more consistent and easier to type on, the ghost tracking of the track pad is non-existent on the air, versus the X1 Carbon. In this case, I’d even turned off the trackpad entirely on the X1 Carbon. Simply, the X1 Carbon just doesn’t measure up to the Mac Book Pro.

Other observations I’ve made about the two machines. The Mac Book Pro is far more solid, the construction is just not even comparable. The X1 feels solid but compared to the MBP it feels cheap and flimsy. Considering the hardware works flawlessly with the software on the MBP is also no competition. The Carbon regularly needed driver updates, things would flake out and I’d have to restart. This would be prevalent in windows or linux, it didn’t matter. Fortunately a restart would fix it, but none of these issues exist on the MBP, using either OS-X or running a VM with Windows 8 or Ubuntu.

Also, even though the MBP design is over a year old now, the i7, 16 GB RAM and 512 GB SSD makes the X1 Carbon seem like a morbidly out of date, slow and antiquated device even though it is actually a newer device!

So, would I give up my mac for the X1?

Getting Distributed – BOOM! The Top 3 Course Selections

A few months ago I posted a poll to ask what courses I should put together next. I just wrapped up and am putting the final edits and finishing touches on a Pluralsight Course on distributed databases, focusing on Riak. On the poll the top three courses, by a decent percentage of votes included the following:

  1. Node.js Distributed Systems – Bringing the Node.js Nodes together for Distributed Noes of Availability and Compute @ 12.14% of the vote.
    1. A Quick Intro to Node.js
    2. Introduction to Relevant Distributed Patterns
    3. How Does Node.js Fit Into the Distribution
    4. Working With Distributed Systems (AKA Avoiding a Big Ball of Mud)
    5. Build a Demo
  2. Distributed Systems Programming with Javascript @ 10.4% of the vote.
    1. Patterns for Distributed Programming
    2. …and I’m figuring the other sections out still for this one…  got ideas? It needs to encompass the client side as well as the non-client code side of things. So it’s sort of like the above course, but I’m focusing more on the periphery of what one deals with when dealing with developing on and around distributed systems as well as distributed systems themselves.
  3. Vagrant OS-X, Windows and Linux – how to build, manage and ship machines to use for development and recreation of production environments.
    1. Vagrant, What is it?
    2. OS-X, Linux and Windows
    3. Using Vagrant Machines
    4. Building Vagrant Dev Machines
    5. Vagrant the Universe!

Now I might flip this list, but either way they’re all going to be super cool. So stay tuned and I’ll be working up these into courses. So far here’s the sub-bullets above are the basics of the curriculum I intend to put forward. Am I missing anything? Would you like to see anything specifically? Leave a comment and I’ll be sure to get everything as packed in there as possible!!

Banning the Phablet… with the Samsung ATIV with Keyboard.

Ok, in the end, let’s just call these things tablets. I know there is the attempt to call these phablets, but that’s so freakin’ stupid. They’re called tablets Microsoft. Just go with the flow. Here’s an unboxing, initial application viewing & a bit more via video. I’ve broken this review into three sections; A Video Review & Unboxing, A Few Product Photos and A Few Notes. On to the review…

A Video Review & Unboxing

A Few Product Photos

Samsung ATIV (Click for full size)
Samsung ATIV (Click for full size)
The ATIV with Windows 8 Start Screen displayed. (Click for full size)
The ATIV with Windows 8 Start Screen displayed. (Click for full size)
The side view of the ATIV; power button, the something another button, headphone jack and USB port. (Click for full size)
The side view of the ATIV; power button, the something another button, headphone jack and USB port. (Click for full size)
The button, connectors removed for attachment to keyboard. (Click for full size)
The button, connectors removed for attachment to keyboard. (Click for full size)
Close up of the screen. (Click for full size)
Close up of the screen. (Click for full size)
The Connectors between the bottom and the keyboard. (Click for full size)
The Connectors between the bottom and the keyboard. (Click for full size)
ATIV connected to the keyboard. (Click for full size)
ATIV connected to the keyboard. (Click for full size)
Power chord side. (Click for full size)
Power chord side. (Click for full size)
Base of it, folded with keyboard. (Click for full size)
Base of it, folded with keyboard. (Click for full size)

A Few Notes

On an Atom device, a ton of software is incompatible with Windows 8. NOTE this. It is vitally important to be aware of. Especially if you’re under the impression you’ll do any type of “Microsoft” Application Development. Also much of the 64-bit software won’t run even in compatibility mode. All things to keep in mind when making a purchase.

Strava, Pandora, Spotify and many other apps just do not exist for Windows 8 – still. Microsoft is either going to have to win market share in the app market or they’re going to have to pay companies to build Windows 8 versions of their applications. This isn’t entirely out of the question, as Microsoft has basically paid for most of the applications that are in the Windows 8 store.

If you’re an Evernote power user, or any type of power user for that matter, you will likely need to download the regular Windows version of any application in addition to the Windows 8 Start bar, tablet style metro interface contraption that is available via the store. The Evernote application for instance is cumbersome and requires more fiddling about clicking and moving things on the screen to be truly useful.

Amidst all of these problems there are a few gems in the Windows 8 application space. The one that stands out the most to me at this time is the Amazon Kindle Application. It is truly one of the more polished applications, but in addition it looks good and works well in the Windows 8 touch universe. Another application that holds up is the Weather Application. Yup, the simple built in Windows 8 Weather Application.

The Evernote application, fact is it doesn’t synchronize effectively nor does it actually show you how or were it is within that process. In the end, even though the application appears, at first to work well with touch, it doesn’t work well overall. Maybe it’s Evernote or Microsoft that is at fault. I don’t know. As the consumer I don’t need to know because it’s their responsibility to make these things work. Hopefully, that’ll happen eventually.

I’ll be using the tablet in an ongoing basis to build and test Windows 8 applications and for some everyday tasks; email, twitter and other applications as they become available. I’ll definitely have more to say about this device. Another review in a few months when I get really used to the Windows 8 interface and the hardware itself.

NOTE: I don’t get paid to do any of these reviews. I merely do these because I enjoy good, candid reviews and want to contribute back to the tech community. I am not paid to advocate Windows 8, Samsung, Apple, Tablets or Phablets or anything in this video. This is merely a product that I have purchased that I intend to use for software development and testing in the near future.

Cheers,