Why I Love the Surface Duo

I have been using Microsoft’s new Surface Duo now as my phone for over a week. Given the huge amount of negative press the device has received based on specs and software bugs, I felt the need to chime in with a positive perspective.

I have been an iPhone user for over a decade, since the very first model. Since the iPhone 6, I have been opting for the largest screen size available. I love having a screen I don’t have to squint to see, and room to type.

Reading and Note-Taking Multi-Task Setup

I’m also an avid pen-based note taker. I used to buy the Tablet PCs before the iPad existed. Earlier this year I made the computer switch from MacBook Pro to Surface Book, and am completely satisfied with that decision.

Given my preferences for large screen phones and pen note taking, the Duo is the ideal device. Even in single-screen mode, flipped all the way open, the Duo has a 5.6” display, which compares well to many flagship phones. Put together, the two screens create an 8.1″ canvas. In addition, the 3:4 screen ratio for each screen seems to me much more productive than the tall skinny aspects of many phones. It’s a balance of width and height more familiar from laptops and physical notebooks.

The deep integration of MS Office is also a big plus. OneNote, Outlook, and ToDos are important for me keeping on top of communication and planning. The ability to have two apps open side by side is one of those things you don’t realize you wanted until you have it. How often do you get a security code in email, and need to copy/paste it into an app or website? On a single screen device, this requires a lot of app switching. On the Duo, you never lose the login screen while you’re checking your email.

Another amazing productivity setup: reading or video on one screen, OneNote on the other for jotting down ideas.

Now, to address some of the criticisms. First, the Duo is unfortunately being compared to the Samsung Galaxy Fold. When making this comparison, reviewers obviously complain about the gap between screens. OK, fair enough. Reading or watching a video stretched across two screens in landscape mode is a terrible experience. So don’t do that. Like I said, a single Duo screen is equivalent to many smartphones, and just fine for when I want to consume video. As for reading, the Duo-optimized apps support a book reading mode (two pages), and reading a scrolling page is actually not bad in portrait mode (as long as you can scroll the content around the gap).

Scrolling in Portrait Mode

Other users have complained about software glitches. I truly feel like a lot of this is just getting used to a new device. Sure, sometimes a rotation or keyboard or app switch doesn’t do what I expected it to do. But I feel like that’s a combination of my learning curve and brand new software, which I trust Microsoft to continue improving (they have said there would be at least monthly updates).

The camera is another point of serious complaints. I get it. We’ve become accustomed to amazing quality photos from our phones. The Duo camera takes beautiful photos in certain conditions, and terrible photos in others (low light, especially). But look at it this way. The Duo camera is actually amazing considering it is a 4 mm sensor. The reason for the ubiquitous “camera bump” on other phones is that the sensor depth is a limiting factor in photo quality. Yet I’m perfectly happy with this tradeoff, and the idea of making the Duo thicker or giving it a bump seems alien to its beautiful thin aesthetic. Worse, I’ve heard many users say they want an external camera. So, you’d have to have the device opened to full size to take a photo?! It makes much more sense to flip it around to single screen mode to take photos, allowing for easier handling and stability while snapping.

The battery (batteries) on the Duo provide a full day of moderate to heavy usage. I do occasionally have to plug in in the evening, if I’ve been on it nonstop. But again, this is a failing of many phones, not just the Duo. And like the camera the real performance is actually better than the anticipated performance based on spec comparisons.

Finally, the price. Yep, it’s steep. If you can’t afford it, I totally get it, and there’s nothing inherently wrong with a $300 smartphone. But given the two 5.6″ screens and high-quality custom hinge, I think the price is in line with other flagship phones (one place where I’m happy to compare to the Galaxy Fold).

Composition Mode With Thumb Split Keyboard

So there you have it. It’s an expensive yet super productive, thin, adaptable, multi-monitor device that fits in your pocket. And there’s nothing else competing in that space. I will be a happy Duo user for the foreseeable future.

By the way, if you’re a software developer, check out my other blog and podcast at tocode.software.

Asp.Net Core Overview

Spending the past year on building and supporting Unison.School gave me an in-depth, full-stack experience in developing web apps with Asp.Net Core. In this post, I will describe the basic components and aspects of Asp.Net Core, and give my personal opinions on the software.

PowerPoint Presentation



Asp.Net Core is an implementation of .NET Core, which runs on the CoreCLR runtime, which is a virtual machine that executes .NET code. Unlike the .NET Framework, which is Windows-specific, .NET Core is designed to be able to run on multiple platforms, including Windows, MacOS, and Linux.

Asp.Net Core is designed to make Web Apps and Wep APIs which are deployable on any system above, as well as in Azure Web Apps or Docker containers. It is built on the decades of experience with Asp.Net and Asp. In addition to adding cross-platform capabilities, Asp.Net Core introduces built-in Dependency Injection and support for Razor Pages. Like Asp.Net, you still have access to traditional routing and model binding features.

.NET Standard

One goal that Microsoft has pushed toward while releasing .NET Core, is to also increase the re-usability of .NET code across multiple projects. With .NET Standard, they have succeeded. .NET Standard is a compatibility requirement or specification that the most recent versions of .NET Core, .NET Framework, Mono, and Xamarin all meet.

This specification means that you can write .NET Standard libraries, and access them from any modern .NET project. When creating an Asp.Net Core web app, it gives you the ability to share large amounts of code with future mobile or desktop apps.

Visual Studio

Any experienced .NET developer is familiar with Visual Studio. VS 2017 supports Asp.Net Core, and includes multiple starter templates to help you build a web app or API.

Visual Studio Template Options

VS also supports graphical interfaces for Nuget, git, and other extensions.

Command Line

For those interested in a quick clean start, or using a different editor than Visual Studio, there are also simple .NET Core commands, such as dotnet new, dotnet build, and dotnet run.

Dependency Injection

DI Setup in Startup.cs

I love the magic of Asp.Net Core’s Dependency Injection (DI). While there are many third-party DI frameworks that probably work just as well, it is nice to offer this as a built-in feature, to encourage good code architecture. I have worked on projects without DI, and while it works, the factories to instantiate objects can be verbose and confusing at times.

Templates and Applications

As stated above, the two main uses for Asp.Net Core are for Web Apps and Web APIs.

Web APIs

The API template gives you a very simple project with Controllers that listen for web calls and route them to specific actions.


This simple interface can then be connected to any business classes, databases, or other services.

MVC Web Apps

The MVC (Model, View, Controller) web app template builds upon the Controller foundation from the API template, and adds Models (aka Data-Transfer Objects, View Models), and Razor Views, which are HTML pages with embedded C# code, that is converted into HTML on render. Each Controller can return one or more views as an Action Result.

View Model (Data Transfer Object)

Razor View

The nice thing about the MVC approach is the very clear separation of concerns between the Controllers and the Views. However, this can also be potentially more structure than is needed, especially for web sites that do not also include API services.

Razor Pages

A more recent model for Asp.Net Core is that of Razor Pages. While Razor Pages use the same cshtml structure as Razor Views, they also each come with a PageModel c# file, which is more akin to MVVM designs or XAML code-behind classes.


Razor Page

Notice that the only difference in the Razor file between a View and a Page is the tag @page at the top.

The Razor Page PageModel is great for organizing all the relevant code for a specific page in one place. However, unlike a Controller class, it is not ideal for handling multiple various calls, such as AJAX and API requests.


Front-End Frameworks

Asp.Net Core is completely compatible with any front-end (client-side) web frameworks. As you can see in the templates image above, starter templates exist for using Asp.Net Core with both Angular and React. Templates for other frameworks can be found online.


Blazor is an exciting new development for the .NET community. Based on the new WebAssembly (WASM) standard, frameworks can now be written to compile code in any language to be run in the browser! The Mono development team has taken on this challenge, creating a .NET runtime that runs in WASM and on the browser.

Blazor is designed to take the existing Razor syntax, and use it via Mono/Wasm to replace other front-end javascript frameworks. While exciting, this project is still in it’s infancy, and not ready for production apps.



As .NET Standard compliant, Asp.Net Core opens us up to a huge variety of Nuget packages that are compatible with our web apps.

Entity Framework Core

Entity Framework is a .NET Object-Relational Mapping (ORM) framework that wraps SQL Server or other databases in a level of abstraction, allowing C# writers to model, query, and save to the database without leaving the familiar .NET language. EF Core is re-written specifically to work with the .NET Core framework, and it can be included in new projects with a click of a button, or imported from Nuget.

EF Core Database Context


While I haven’t had a chance to explore this yet, the real-time web communication library Signal-R has recently been given an Asp.Net Core library.



Asp.Net Core apps can be deployed on any Windows Server via IIS, just like traditional Asp.Net. However, as a cross-platform solution, they may also be deployed on a Linux server via Apache or Nginx. On Azure, you can use an App Service instance to upload your app as a managed service, without the need to deal with the server at all!

Azure App Service Portal

Azure also gives you tons of tools for managing your app, including Application Insights, auto-scaling, and site and database backups.


Many self-taught programmers, myself included, become easily overwhelmed by modern app and web development tutorials. My thought is that this is caused by the combination of UI, Database, and logic layers. So I decided to make ToCode.Software as a new type of tutorial.

I am a .Net developer, and I also love cross-platform code. There is a wonderful web tool, DotNetFiddle, that can help anyone from beginner to professional try out some simple C# code. I used DotNetFiddle as an embedded, interactive template for the beginning lessons of ToCode.Software, so users can try out code without ever leaving the site.

As the second step, I introduce Visual Studio Code, .Net Core, and the bash shell, so learners can start making their own simple console apps with file-based, object-oriented classes.

After going over many of the basics of the C# language and coding logic, there are two projects, a simple ChatBot, and a more complicated Go Fish Game. I hope to expand this series to include many of the following concepts:

  1. Adding an app UI with Xamarin.Forms
  2. Adding a web UI with HTML and CSS
  3. Connecting to a SQL database to store and retrieve data

I’d love some feedback on this project. Feel free to comment here, or on the site, and share!

Starting Over

In my last post, I talked about why I left teaching. While I am very proud to have been a teacher, and do not discourage anyone who is currently or is considering becoming a teacher, I know others get burnt out as well. This post is to share my experience in transitioning to a new career. Some of it will only be applicable to my personal situation, skills, and knowledge, but it might serve as a partial roadmap for others looking to make a career switch.

The Path to Programmer

Like many children of the 80s and 90s, I grew up with the personal computer revolution. We had a Commodore 64 at home during most of my childhood, and I was able to take beginning BASIC programming classes at a Saturday enrichment course. In middle school, we worked on TRS-80 machines, although there was more keyboarding and gameplay than programming, as far as I recall.

By high school, PCs with Windows were becoming available, and I loved tinkering with the new graphical interface. In college during the 90s, I was exposed to the evolution of both Windows and Mac. While I had to use Macintosh machines for several music-related software projects, and later for several jobs, I was always attracted to the FYI (Fix it Yourself) model of Windows, over the IJW (It Just Works) Mac model, which, back then, often didn’t just work. I loved changing themes, settings, and anything else I could experiment with.

Over the first decade of my teaching career, technology continued to play an important role. Being a tinkerer, I was quite often one of the few people in a building who understood how to fix a computer issue. While working on my masters degree, I took a class in computer-generated music, which included some simple code-writing. I was also collecting and learning from different devices. I had 2 or 3 tablet PCs back when no one knew what that was (almost a decade before the iPad). The iPhone finally brought me into the Apple ecosystem, as I discovered a device that lived up to the IJW motto.

My deeper dive into computer work began, unsurprisingly, the second time I found out I was losing my current position as a teacher, in 2010. I decided to put my training and expertise into writing a book for other music teachers, and wanted to create a website to accompany the book. So I looked into web hosting, purchased a cheap plan, and taught myself how to manage the WordPress system (which this blog is still running on today). While WordPress is a management portal that requires no programming skills to use, it also allows users to tinker with the code through embedded code and templates. I wanted my website to include a searchable spreadsheet of folk songs for teachers, so I learned how to use Google APIs in JavaScript (basically copied and pasted code and tweaked it until it worked) to connect to a google spreadsheet.

At the same time, I used spreadsheet functions to create a lesson plan form in Google Sheets with simple dropdown menus, so teachers could quickly create lesson plans, complete with national or state standards. The form was clunky, but it sped up lesson writing immensely.

A few years later, I decided to explore and learn iOS app development with Swift. I was intrigued by the new programming language (seemed simple enough to grasp), and wanted to remake my simple lesson-planner in a nicer-looking and more accessible way. So I grabbed a book (Learn Swift in 24 Hours), installed Xcode, did a few tutorials, discovered StackOverflow, and within 5 months, released my first app to the App Store, complete with a remote server that saved and synced lesson plans, and the ability to print or save lessons as PDFs.

Since I train other teachers in various settings, I was able to share my app by word of mouth, and got quite a bit of interest. I soon added a full-featured calendar to the app, so teachers could document their rotating schedules of classes (Google Calendar and iCal can’t do rotations on different weekdays, such as a 3-day school rotation). I then created a second app, which was a simple touch-screen rendition of a classroom xylophone, complete with removable bars, the perfect practice app for elementary students or studying teachers!

Porting the lesson planner and pocket xylophone to Android seemed the next logical step. I searched around for way too long hoping to find a way to write Android in Swift or port my code, before finally realizing that Java wasn’t terribly different or much harder to grasp, and that the apps weren’t too large to rewrite. Even if you could write in the same programming language, the bigger difference is the interface with iOS and Android operating systems. Still, this desire for a cross-platform solution did become an important part of my journey, as I eventually decided to try Xamarin, which is in yet another language (C#), but allows you to share some or all code between Android, iOS, MacOS, and Windows.

Xamarin runs on the .Net platform, which was created by Microsoft. This eventually led me to realize that not only could I create apps with .Net, but websites and web apps as well!

Turn What You Know Into a New Starting Point

Remember, all of this learning occurred while I was teaching full-time during the year, and teaching graduate courses for 2-6 weeks each summer. Instead of watching TV, reading, or playing video games, I spent a huge amount of “down-time” learning and coding. It was just as exciting to me as any video game, and far more productive.

As I was making the decision that I needed to change careers, programming was the obvious choice. Yet finding a job in a new field, with no degree, and very little in the way of a portfolio, seemed impossible. At the same time, I realized that I had accumulated knowledge and professional connections that could still help me in the future. So I decided to continue creating software for music teachers, as someone with a unique position of both understanding their needs, and having the technical skills to make it happen.

I launched Unison.School early in 2017, and left my teaching position that June. Even before leaving, I laid out all the details I needed to make an attempt at running my own business. I had to learn to create an LLC, work out how I was paying my family bills for a year (thank you to extended family for investing in the business), and explore various advertising methods. Once school was out, I dived into full-time development, creating a web-based version of my touch-screen xylophone and lesson planner, and then implementing a new feature, digital rhythmic and melodic assessments that automatically save a grade to the teacher’s gradebook.

Keep on Learning

While working on Unison.School, I also devoured resources to improve my programming skills. I listened to podcasts (I especially recommend Coding Blocks), read books (check out Clean Code), and took online courses (HarvardX’s CS50, Pluralsight). I used Google and StackOverflow incessantly, and took advantage of all the free developer tools that Microsoft and others offered. Everything I learned was used to make Unison.School a better site.

Use What You’ve Learned to Create a New Portfolio

Unison.School has several hundred teachers currently using some part of the site after just one year of development. However, since I decided to go with a free tier to attract users, this has not yet translated into a financially stable business. Nevertheless, the site has become the centerpiece of my professional portfolio, giving me concrete proof of my skills as a developer.

When I would need a break from working on Unison.School, I would create small programming projects that I could post on GitHub, a free, online repository to share code. I created a Sudoku game (which required lots of math!), and pulled the Gradebook feature out of Unison.School as a separate app. By using GitHub, prospective employers could see the actual code that I write, as opposed to just a finished project.

I kept my LinkedIn profile up-to-date, adding links to all my work. I wrote blog posts about programming, and answered questions on StackOverflow. I took Pluralsight quizzes to demonstrate my knowledge, and figured out how to post these badges to my blog.

Finding a Stable Job

Applying for and finding a job is always the hardest part. No matter your resume, knowledge and experience, blindly applying to positions can seem like a futile task, as you can apply for hundreds with little or no response.

One issue was how to quantify my experience. Nearly every application wanted “3 or more years experience.” I had just under 1 year full-time when I started applying in earnest, but a decade of hobby-level/part-time experience. Did this make me a beginner? Was I qualified for mid-level positions? Certainly there were holes in my experience, such as working on a team, and I didn’t have many tech-related references. I decided to apply for both entry-level and mid-level positions. I had one phone interview that seemed to be going well until the interviewer realized that I had been working full-time as a programmer for less than a year. Apparently, that was not what they were expecting, since I’d already passed their programming test. I’m sure this exists in other fields as well, but it is startling to see just how many developer jobs require those 3-5 years experience. It creates a no-win situation for newcomers, and yet makes you infinitely more marketable a few years later.

They say that most jobs come through people you already know. In my case, that didn’t happen. Cedar Falls/Waterloo is a small metro area, and there just aren’t a huge number of programming jobs. Even though I knew people in the industry, there was nothing that matched up with my skillset and experience level.

The job I finally found was through the StackOverflow jobs board. The nice thing about these listings is that they are targeted specifically to developers, and there are many postings for remote workers, which seemed ideal in my situation. My new company, ID Networks, had a posting, and it caught my eye because it used .Net technology, and strangely enough it was located in northeast Ohio, not far from where I was born and raised! I mentioned this connection in my cover letter, which may have helped my application stand out from the hundreds that they received. It also helped tremendously that the senior developer who interviewed me, Steven Doggart, is much more interested in aptitude than experience, and he gave me ample opportunities to demonstrate not only what I knew, but how I learned.

Looking Forward

I just started my work at ID Networks, and I hope to stay a long time. At the same time, I’m excited to maintain, expand, and support Unison.School for all my teaching friends. I managed to make a huge leap, from one field to another, and I’m grateful for everyone and everything that helped me.

Why I Left

There are many, many educators in this country dealing with stress and burnout. The reasons are many, as are the blog posts out there that address this issue. Many rightly point to the combination of poor funding, unscientific testing expectations, overbearing administration, and un-creative scripted lessons as reasons for teacher burnout.

I don’t see any point in re-hashing those issues here. Rather, I’d like to speak to the burnout that I specifically experienced, which doesn’t fit this mold, as there may be others out there with a similar experience. In a future post, I’m also going to speak to my approach to transitioning away from being a teacher, as many teachers feel “stuck” with no other marketable skills.

Why I Left

I loved my job as a music teacher. Getting hugs from little Kindergarteners, watching students master a difficult concept, blowing away families at concerts with our performances. I was respected by my principal and district colleagues, and even a leader and mentor to many other music teachers around the country. Easily 90% of students that I worked with enjoyed music class, and trusted me to lead them in interesting experiences. When things didn’t go according to plan, we would laugh and try again, or put that aside for something else. I had an excellent schedule and every instrument I could conceivably want to teach with.

In the end, none of this was enough. Every day I had levels of stress that were making me physically and mentally ill. It wasn’t the principal, or my colleagues (although there were a few that were difficult), or state mandates. It was the kids. The same kids that I loved and respected were literally driving me nuts.

If you’re not an educator, you may not get this, but every day, every single day, there was at least one student in my classroom who was angry and defiant. I saw 150+ students per day, in groups of at least 20, and sometimes 30. I was often the only adult in the room, trying to educate these children. What happened in my classroom was largely in my control, but what happened before that was not. Students would come with a lack of sleep, or having been in a huge fight with a parent, sibling, or other teacher. And even with carefully planned, differentiated activities, some students would get frustrated by their failures in my class, or have a negative reaction to another student in a group. Whether the problem started inside or outside the room, these students would shut down. At best, they would sit out and refuse to participate. At worst, they would act out, yelling and interrupting to the point that continuing the lesson was impossible.

(BTW: I am aware that not every school environment has quite as many children with such challenges, as I’ve taught in all types of schools: rural, urban, big and small. This is definitely a problem that is connected to poverty and other social ills. But I think these issues still exist, to a varying extent, in most schools.)

My natural reaction to a shouting or defiant child is to get angry and yell. After years and years of working on my own classroom management and building one-on-one relationships with students, my inclination is still to yell. Maybe it’s testosterone, maybe it’s a sign of my neuro-atypical brain (I’m genuinely curious about the experience of other teachers, especially men). Controlling my reactions to student behavior required a firm and proactive discipline approach, support from the school office (I could send a student out if I really needed to), and forcing myself to always wait when reacting to a situation. I became very good at management, a model for other teachers even. I had proactive routines, consistent expectations, and firm yet unthreatening consequences (such as sitting out for one activity).

Even with all this, I would occasionally get upset with a defiant student. What happened when I held in my anger? An adrenaline surge with no outlet, which as modern medicine will tell you, is a dangerous thing to have happen every day. If I let go and yelled at a student, an equally strong dose of guilt and shame would be my reward. It was a no-win situation, and I was harder on myself than anyone else could be. Eventually, I decided that something had to change for my own personal health. Moving to a less economically-stressed school community would have helped, but it is hard to find new job openings when you are a veteran teacher who costs twice the amount of a new teacher.

So I left teaching, my lifetime career. I still completely believe in the purpose and promise of public education. Private alternatives are not viable to replace the scale of our public schools in this country. They are band-aids put on specific sore spots, at the expense of the rest of the bleeding body. No, improving our schools requires more financial commitment, teachers who are prepared for these huge challenges, and a systemic governmental approach to guiding families out of poverty. And I feel that contributing 18 years of my life to this cause was a valuable contribution. But now it’s time to take care of myself, re-focus on my family, and have a much-deserved change in stress levels. I hope to continue mentoring future teachers as an Orff Schulwerk instructor in the summers, and I am thoroughly enjoying my developing skills and career as a software engineer!


PS, It turns out there is a medical/scientific diagnosis, Sensory-Processing Sensitivity, that describes the way I personally react to stressful and noisy situations. I did not know this when I left, but having discovered it, I am glad that I made the decision I did. If you feel the same, you may want to look into this. Even if you decide to stay, understanding your own reactions will be crucial to planning out a successful class, day, and year.

Extricating AspNetCore Identity from Entity Framework Database for Xamarin

Unison.School has become a very large project. I’m proud of the hundreds of teachers who are using it in their schools, and hope to keep building it even larger.

I built Unison.School while learning the cutting-edge Asp.Net Core 2.0 framework, including the EntityFrameworkCore database ORM. Based on the starting templates for a web app, I built my Teacher and Student user models inheriting from the IdentityUser class. This provides lots of wonderful built-in functionality around logging in and authorizing access to specific pages.

In the year since laying out those login procedures, the model for the project has grown to over 100 entities in the database. A teacher, for example, could be connected to all the following entities:

Each of these, in turn, would be tied to even more tables. This was all fine and good until I looked to create a mobile app version of the service.

As you may know, Xamarin allows .Net programmers to share code with and across mobile platforms. What you may not have realized, if you are new to .Net and follow a path similar to mine, is that IdentityUser is not compatible with Xamarin. Yet I wanted to use many of these same classes in my mobile app, and it seemed ridiculous to create two copies of each entity, and have to maintain the code between them.

The model library included a link to the Nuget package for Microsoft.AspNetCore. EntityFrameworkCore.Identity, so I needed to move any code I wanted to reuse into a new portable class library, and reference it from both the Asp.Net Core app and the Xamarin app.

My first attempt to disentangle the model was to create an IApplicationUser interface, which both my Asp.Net Core ApplicationUser (base class for Teacher and Student) and a new mobile version could inherit from. I copied all the code that I cared about into this interface.

        public interface IApplicationUser
            string Id { get; set; }
            string FirstName { get; set; }
            string LastName { get; set; }
            string UserName { get; set; }

Next, I realized that I also needed to create new classes for Teacher and Student that did not inherit from IdentityUser. So I similarly created ITeacher and IStudent.

So far, so good. But now, let’s take the teacher’s LessonPlan object as an example. In the Teacher class we have:

        public List LessonPlans { get; set; }

And in the LessonPlan class:

        public string TeacherId { get; set; }
        public virtual Teacher Teacher { get; set; }

In the DbContext builder, the two are connected:

            .HasOne(lp => lp.Teacher)
            .WithMany(t => t.LessonPlans)
            .HasForeignKey(lp => lp.TeacherId);

If I moved LessonPlan into the shared library, it could not reference Teacher. The same was true for all the other entities that had relationships with my user classes.

I initially thought I should perservere with a strategy I’ll call “Interface All the Things!” I created an ILessonPlan, and dozens of other interfaces. Each entity then referenced the interfaces, instead of the base classes. However, I discovered when moving back to the DbContext that this approach would not work. Entity Framework relationships must be between concrete classes, not interfaces. It is possible to cast a single object to it’s instantiation:

            .HasOne(b => (Teacher)b.Teacher)
            .WithMany(t => t.LessonPlans)
            .HasForeignKey(b => b.TeacherId);
        // Casts ITeacher to Teacher

But this is not possible to do with a List<object>, which describes one side of all my one-to-many relationships.

I was definitely stumped for a long time, and could find no help on the internet for this scenario. Finally, while listening to my favorite podcast, Coding Blocks, they mentioned in one episode removing unneeded relationships, especially dual-directional ones! Since EF and all the tutorials show how to make the connections, it never occured to me not to connect two objects that I didn’t need to follow with a query!

Once I understood this, implementing was simple (although time-consuming). In the LessonPlan example, I removed the property public Teacher Teacher { get; set; }, but left the public int TeacherId { get; set; }. I was also able to delete the connection in the DbContext builder. This allowed me to move my LessonPlan and most other entities into the shared library, since there was no direct connection to the user classes.

A large portion of the time was then spent tracking down everywhere I had used a call such as lessonPlan.Teacher. While these were less common than calling teacher.LessonPlans, the need did arise. So now, in such instances, I did have to add one step:

        var teacher = DbContext.Teachers.Single(t => t.Id == lessonPlan.Id);

This extra line of code was a small price to pay to reuse my 100 classes in a new project! In the Xamarin project, you can also create a nearly identical DbContext, inheriting from the DbContext base class instead of from IdentityDbContext. I’d also like to point out how useful ReSharper is for a refactoring of this magnitude. It will automate a lot of namespace changes, search for usings, etc. I can’t imagine how long it would have taken me without that tool.

Share Pluralsight IQ Badges on your Blog

I really love the courses and quizzes on Pluralsight. It has really helped me fill in gaps in my programming knowledge, and lets me see where my weaknesses are.

However, I was frustrated that the only “share” options are to Tweet and post to LinkedIn a new skill IQ score. So I decided to write a few lines of code to create my own live Pluralsight IQ badges on my web page.

I started by going to my Pluralsight Profile page, and opening the debugger. By doing this, I discovered that every user has a unique GUID, and this is called with https://app.pluralsight.com/profile/data/skillmeasurements/ plus your GUID. Look in the Network tab to find your unique code.

Now, this code is not directly attainable via javascript, so I found a simple backend PHP script here (thanks to the authors):

/* proxy.php */
$url = “https://app.pluralsight.com/profile/data/skillmeasurements/YOURUNIQUEGUID”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec ($ch);
curl_close ($ch);
echo $result;

I saved this to my server, then put a blank div in my blog footer:
<div id="plural-sight-div" style="display: flex; flex-direction: row; padding: 5px; flex-wrap: wrap;"></div>

And finally, I wrote a simple javascript script to fill the div! (Note, I know I could move a lot of the styling to css, just was lazy today).

function fetchPluralSightIQ(pluralSightDiv) {

$.getJSON(“proxy.php”, function(json) {

for (var i = 0; i < json.length; i++) {

var badge = json[i];
var badgeDiv = document.createElement(‘a’);

badgeDiv.style.flex = ‘1 1 auto’;
badgeDiv.style.backgroundColor = ‘#262626’;
badgeDiv.style.color = ‘white’;
badgeDiv.style.margin = ‘5px’;
badgeDiv.style.textAlign = ‘center’;
badgeDiv.style.display = ‘flex’;
badgeDiv.style.flexDirection = ‘column’;
badgeDiv.style.padding = ’10px’;
badgeDiv.href = ‘https://pluralsight.com’ + badge[‘url’];
badgeDiv.style.fontSize = ’13px’;

var img = document.createElement(‘img’);
img.src = badge[‘thumbnailUrl’];
img.style.width = ‘100px’;
img.style.margin = ‘auto’;

var badgeTitle = document.createElement(‘label’);
badgeTitle.innerText = badge[‘title’];
badgeTitle.style.color = ‘lightgray’;
badgeTitle.style.marginBottom = ’10px’;
badgeTitle.style.fontSize = ’20px’;

var level = document.createElement(‘label’);
var rank = badge[‘level’];
if (rank === ‘Expert’) {

level.style.color = ‘lightblue’;

} else {

level.style.color = ‘lightgreen’;

level.style.fontWeight = ‘bold’;
level.innerText = ‘Q ‘ + rank.toUpperCase() + ‘ ‘ + badge[‘score’];

var percentile = document.createElement(‘label’);
var pct = Math.round(badge[‘percentile’]);
var pctWithSuffix = ordinal_suffix_of(pct);
percentile.innerText = pctWithSuffix + ‘ percentile’;
percentile.style.marginBottom = ’10px’;

var verified = document.createElement(‘label’);
var vDate = new Date(badge[‘dateCompleted’]);
verified.innerText = ‘VERIFIED ‘ + vDate.getMonth() + ‘.’ +
vDate.getDate() + ‘.’ + vDate.getYear();




document.addEventListener(‘DOMContentLoaded’,function() {

var pluralSightDiv = document.getElementById(‘plural-sight-div’);
if (pluralSightDiv !== undefined) {




function ordinal_suffix_of(i) {

var j = i % 10,
k = i % 100;
if (j == 1 && k != 11) {

return i + “st”;

if (j == 2 && k != 12) {

return i + “nd”;

if (j == 3 && k != 13) {

return i + “rd”;

return i + “th”;


Hopefully, Pluralsight will either leave this JSON available and/or create their own badge code. Until then, enjoy!

Open Source Giving Back – Gradebook

As part of developing my skills as a new software engineer, I have benefitted greatly from the shared code of thousands of other developers. Open sourcing non-critical code lets us all build upon each other’s successes, rather than reinventing the wheel.

I have posted a few other half-created code projects before, but today I uploaded an entire functioning Gradebook program (based on the grade book in Unison.School) to GitHub (link here). If there are other education-based software companies out there, they may benefit from this work. It also gives me a chance to demonstrate my skills to future collaborators.

For creative (and busy) Music Teachers

As an Orff Schulwerk teacher, I know how hard you work to develop student-centered, creative lessons for your students every day. Two things I loved about teaching with Orff Schulwerk: seeing my own ideas coming to life with the students, and even better, seeing the students’ ideas take over and guide the learning!

There were also some things I didn’t “love” about teaching. One was documenting my lessons and assessments. I never quite felt comfortable teaching from any one textbook, as the pace of my classes never fit the perfect model. For assessment, I would rather be “in the moment” with the kids, giving them direct and immediate feedback to improve their skills, than standing aside with a gradebook writing down scores.

So I designed Unison.School to be a tool for busy teachers like myself. The lesson planner gives me the ability to write unit/project lesson plans based on repertoire and the creative process, and share them on Google Drive with my principal and colleagues. The calendar and daily planner, which functions just like a paper planner, lets me keep track of what each class works on with minimal typing. Finally, I designed the melodic and rhythmic assessments to be completely objective and automated, allowing students to take an authentic, skills-based test, with immediate feedback, from any internet-connected device. This means I can send a few students at a time back to a computer station to take a test, while continuing the creative process for the class. Alternatively, I can bring in a cart of iPads and test an entire class in less than five minutes! The scores are saved to a grade book, and can be used for Student Learning Objectives, Common Formative Assessments, report cards, or whatever system your district employs.

I hope that Unison.School can make a few “less exciting” parts of your job easier, and give you more time to focus on creative student engagement. To get started, register for a free account, and follow my walkthrough video, or just start playing with the free tools!

One last thing. If you’re stressed out this last week before winter break, try sharing my Jingle Bells lesson with your classes! I’ll try to add more interactive video lessons in the near future.

I’m always open to suggestions and feedback to make Unison.School serve you better.

Have a wonderful winter break, happy holidays, and a joyous New Year with your students!

Why Web-based Technology is the Best Fit for Education

I started my tech career with two separate strands: website building for simple sites like this blog, and app building for mobile phones. The websites were made with WordPress, and were very easy to put together, following the built-in menus. Only when I wanted something advanced, like a searchable folk song database did I need to expand and learn a little (cobbled-together) javascript and php.

The app experience was more serious programming. Since I was learning just as Apple unveiled the Swift programming language (and Objective-C is terrifying to look at for the inexperienced), I began with Swift, and then expanded to Java as I converted apps to the Android platform.

My main focus was a music teacher lesson planning app, where teachers could access their class schedule, and create nice lesson plans for their administrators with little hassle. One thing that many users requested was a web version, where they could access their lessons from a computer, and type more easily. While the apps were already using an online database on my server, this request required me to go back to the web and cobble together an online portal as well.

Of course, my full-time career during all of that was as an elementary general music teacher. I remember being asked countless times by colleagues and administrators, “How do you use technology in your classroom?” My answers at the time (before building my own solutions) were limited to mostly tools I used myself, rather than tools the students used.

One seriously limiting factor for using any technology was the ability to install and update software. The district devices were locked down, so that teachers were unable to install or update any software without making an appointment with the tech support person, who travelled between buildings. While I understand the security reasons for this procedure, it was difficult for a music teacher, who needs iTunes installed, especially when Apple sends out updates on a regular basis! Likewise, our textbook series came with digital resources which I could not install without “assistance.” (techies like me hate asking for assistance, although we’re happy to provide it).

In a previous job, I was a middle-school choir director, and worked alongside the high-school director. He showed me the SmartMusic program, which was really incredible. Yet not only did it require a hefty download and quality computer, it was also expensive, and not really designed for the students I was working with.

When I began Cedar River Tech and Unison.School, I decided to take what I had learned as a beginning programmer, combined with the challenges that I knew teachers faced in schools, and start with a web app. The first feature was a touch-enabled digital xylophone. By making this a web page, I only had to create one app that would instantly work on any device. Yes, it’s slightly less convenient to go into your browser on your tablet or phone than to open an installed app. But in exchange, I can reach every student in the world who wants to use this tool right now. As a result, I was able to move on immediately to more challenging and helpful tools for the sight, without rewriting the first tool in multiple languages.

You can always expand by adding native apps later, but to provide core functionality to as many users as possible, especially in a field as diverse as education, web-first is the clear winner.