Adventures with R…

About a week and a half ago, I started going through the R specialization on Coursera.  These are some of my observations.

Reminders of my Past

As I work in RStudio and go through lessons on data tidying, querying for values, and creating functions, I am reminded of some of the courses I went through in my past.  I am calling functions – such as correlation – that I (vaguely) remember learning about in my statistics class.  A lot of my interactions with R remind me of the days of working on engineering homework in Matlab.  I’m also finding that the language makes a lot of sense to me because it has elements of object-oriented programming – akin to the C# and Java that I teach at The Software Guild – and functional programming – with concepts like pipelines and chaining functions, which I liken to some of my PowerShell adventures.  It’s been quite an adventure so far.

Preparedness Going In

I’ve been curious about data science for awhile.  Catching Matthew Renze’s Practical Data Science with R workshop at CodeMash encouraged my curiosity out more.  Between January and March, I dreamt of data science stuff and had ideas popping into my head – especially since NASA’s International Space Apps Challenge is coming up in April, and I’d love to show my NASA friends what I’ve been playing with, hopefully using some of their datasets.  When it comes to querying data, I have a solid background in that too – having worked with multiple RDBMSes and worn the database administrator hat in my past.  Finally, I realized that I was prepared enough – between my solid understanding of programming languages and paradigms and having been exposed to R in the workshop – that I had better follow my dreams and take a course to keep me on the right path.

Current Status

Tonight, I hit an achievement – I finished Course 1 of the R specialization.  Yes, it’s a 4 week course.  Yes, I went through it in a short period of time – but my preparedness really helped in this case.  The only road block I had in this first course was when it came time to use statistical functions and not remembering what they meant or represented.  But after reading and plugging away at it for an hour or so, it all started coming together.

I signed up for Course 2, which starts on Monday.  I’m already through the Week 1 material there, and I’m having fun creating functions.  As I was writing some of my code, I laughed because I recognized R’s syntax and thought “ah… anonymous functions… much like my lambdas in C# and Java….”  It’s good to be adding another language to my toolbelt.

Also, while I mentioned RStudio above, I also find myself yearning to get back into Visual Studio at times.  So when I get tired of RStudio, I switch back to R Tools for Visual Studio 2015.  The only downfall I’ve run into with that is that Notepad is the editor that comes up when swirl() opens a temporary file for me.  I need to eventually sit down, look at configuration, and find out if I can either set Visual Studio or Notepad++ as my R editor for swirl() when I run it in VS.  (And no, I haven’t checked Visual Studio 2017 for the R tools yet…)

Overall, though, I am thrilled to be playing with data again, and R has captured my attention.

CodeMash 2017 Recap: Pre-Compiler Day 2

As I mentioned in yesterday’s post, one of my personal tech topics that I want to explore in 2017 is data science.  For as long as I’ve known, I love data.  As a hobbyist in my teens, I was playing with Access and reporting on data.  I eventually migrated to Visual Basic talking to Access… which led to me taking an internship right out of high school where I was QAing data sheets and working with a contractor on an app that was migrating an Access database to a VB front end and SQL Server back end.  That contractor saw my curiosity and excitement around data, and he introduced me to the Oracle database administrator.  Fast forward into my career – lots of fun writing data reports in Crystal Reports and SQL Server Reporting Services and wearing the database administrator hat over many versions of SQL Server!  Moving right along, I end up writing and supporting web applications that talk to SQL Server back ends.  Nowadays, I’m working at The Software Guild, writing database curriculum for both C# and Java cohorts and encouraging our apprentices to explore databases – amongst other topics.  I get to play with SQL Server and MySQL.

However, as much as I get to play with these tools and data, I’ve been more curious about the topic that is getting a lot of talk – data science.  One of my friends asked what we wanted to learn more about in 2017, and when I mentioned data science, another friend asked if I had met Matthew Renze yet.  While I hadn’t crossed paths with him at that point, I was curious.  He linked me to his courses, which gave me an idea of what to expect with the pre-compiler.  Most of all, I was looking forward to a day of data science at CodeMash, hoping to see what all the talk was about.

Pre-compiler – Practical Data Science with R

With a name like “practical data science”, I went into the pre-compiler expecting how to work with R and put it in practice.  The name of the pre-compiler workshop set the expectations for me quite clearly.  Reading the abstract and the pre-reqs for it, everything was spelled out enough for me to have reasonable expectations going into it.

R and RStudio

In this Practical Data Science with R workshop, we learned about the R language and used RStudio to run through labs on various topics in data science.  I really enjoyed Matthew’s storytelling, weaving a story around a fictitious guy’s ridiculous idea for a space western musical movie.  We played with a movies dataset for many of our labs, looking at the data and seeing why this guy’s musical idea was a bit ridiculous and unwise. For some other labs, we also played with iris data.

Looking at the R language, it made sense to me.  Everything being treated as a vector… I had seen that in other languages before, so it didn’t seem foreign.  The arrows of assignment reminded me of lambda syntax in Java and C#… oh arrows and lambdas and assignments… again, it seemed familiar enough.  The indexing with the ranges reminded me of my adventures with Ruby Koans of CodeMashes past.    Even now, as I recap this, I am realizing that some of the familiarity is due to my past background – surviving engineering and math statistics courses using MATLAB and Maple.  In fact, during the workshop, I mentioned to my friend Victor that I wish I had this mentality back then, as my advanced math classes may have been more tolerable back then.  Playing with R reminded me of how much I love analyzing data and building out visualizations.

R in Visual Studio

In the workshop, Matthew Renze mentioned that you could also run these things in Visual Studio.  Of course, I couldn’t resist – running a new language for me in a tool I am quite familiar with!  I installed R Tools for Visual Studio and ran through the labs from today in Visual Studio.  I really like that the Ctrl-Enter to execute code in RStudio carried over into Visual Studio.  The visualizations were neat to see when I ran them in Visual Studio.

Inspiration to Play More

After sitting through the data science workshop today, I realized a lot about myself and my love of data.  I realize that my love of data really hasn’t changed in the past couple decades – I really do enjoy seeing what all is in a database, how the data relates, the various trends, cleaning it up, understanding why there are certain trends and what the outliers may indicate.  While I had a quick flashback to younger me not happy in my classes in college that introduced the concepts, I realized that I still like the visualizations and calculations, and with the right teachers, things aren’t as bad as they once seemed.  Playing with data makes me excited, and today’s workshop reaffirmed that.

This really confirmed – 2017 will be my year to have fun with data science.

Polyglot from the Microsoft Realm

Recently, I joined my friends Dave and Victor on creating a podcast called DevCoaches.  In our first episode, we talk about our adventures with The Software Guild, where the 3 of us are instructors.  Dave and Victor are currently focused on our .NET curriculum, whereas I spend time in both .NET and Java curriculum and currently teach a Java cohort.  These guys lovingly refer to me as “a traitor”, since I’m a Microsoft MVP yet not teaching on the Microsoft stack.  So… I wanted to talk about my interesting position and why I shouldn’t be seen as a traitor. In the computer programming system, the people are represented by two separate, yet equally important groups – the people who write the code and the people who teach those who write the code.  These are their stories.

Microsoft & Other Platforms

First of all, just because I’m not on the Windows platform doesn’t mean I stop caring about Microsoft and their technologies.  From my early days in computing, I believed in Microsoft and their cross-platform dreams.  At PyCon 2009, I presented on running IronPython (a Microsoft .NET implementation of Python) on Linux through the help of Mono.  Why?  More like… why not?!?  I’m in technology because I love to play with tech and see the capabilities.  Running Microsoft technologies in a non-Microsoft operating system intrigued me, so why couldn’t I play?

Fast forward to today, where Microsoft isn’t only able to run on other platforms, but they’re bringing in other platforms too.  From .NET Core to bringing bash into Windows, it’s astounding to see where Microsoft is venturing.  Further more, it’s great to see the community embracing it – even those of us who grew up in a Windows world understand that there is more out there and it could be possibly the right mix for us.

Microsoft was once seen as an evil empire, but is it still that way?  It looks a lot like they’ve changed their tune.  Hopefully that image is changed as well.

C# vs Java?

If there’s one thing you should know about me, it’s never one programming language versus another.  It’s never “my semi-colons are better than yours”.  It’s all about knowing which tool is to be used in the appropriate situation.  Thankfully, I think Microsoft realizes that as well.  While I’m not specifically talking about C# anymore and took an opportunity to teach Java, I still recommend that my apprentices learn both.  If you can learn one, the other isn’t that much more difficult – though Java’s namespaces are still awful to the file system. So many folders… (I digress…)

As a Microsoft Most Valuable Professional, I am aware of the tools that Microsoft has and am able to give them the feedback they need to hear from those of us in the field, using their tools.  Armed with this knowledge, I actually do use a Microsoft technology in my class.  When it comes to web development and managing my apprentices’ sites, I have them organized well and use Visual Studio Code to look at their CSS, HTML, and JS.   Work has me using a Mac – which is a blog post of its own – and Visual Studio Code works fine on it.  I’ve also used Visual Studio Code in an Ubuntu virtual machine without issues.  (And yes, I have used other text editors as well.  But did I mention that I have a lot of chaos going on?  Sometimes, it helps to have one UI with a familiar layout to keep me grounded.)

Also, little do they realize that even though I’m teaching Java, I’m still looking at the C# curriculum and have to make changes to things.  So I need to keep my C# skills on point if I want to write relevant lessons.

The Power of a Polyglot

Let’s face it – I’m a polyglot.  I have a problem – if A&E had a Hoarders episode for those who hoard programming languages, I would be on that episode.  I’ve always enjoyed various programming paradigms and switching between languages – yes, even when my apprentices ask me about a perl script they’ve found and what it could look like in the languages we’ve shown so far.  I like that I’m not tied to one IDE, one platform, one programming language, one train of thought.  I like that I have the flexibility to change platforms and tools as needed.  And I’m thankful that Microsoft still keeps me as Most Valuable Professional – with involvement in the community being key – and is supportive of those of us living a polyglot life.  It’s definitely an interesting realm.

Programming languages… gotta learn them all! 🙂