Blog

The Internet Of Things with Scala – Part I

There has been a great deal of buzz around the Internet of Things lately. The advent of small inexpensive devices and in particular the Arduino has inspired a generation of people with no background in electrical engineering to do some very creative things. I myself was first inspired by the Arduino and had built several small projects around the DueMilaNove model. I am a software consultant by trade so naturally I loved the fact that I could program these devices…

Data At The Speed Of Life – Reactive IoT Applications in Scala with Angular2

I had recently come off of a three year contract and found myself with some time on my hands. I was interested in working on an application that interfaced directly with some sort of small device. The director of our company, Don Coleman, had done a good bit of work with small devices so I spoke to him about the possibility of building a small application around those devices. He agreed to it and offered to assist from the hardware end. Our director of training, Ken Rimple, was researching the Angular 2 JavaScript framework at the time and offered to build the UI for the application. We eventually decided that we would build a demo to display at our booth at the 2016 South by SouthWest conference. This post explains our approach and some lessons learned.

Angular 2 RC1 and more announced – ng-conf 2016 recap

Well, another ng-conf has come and gone, and this one produced the first official release candidate of Angular 2.0 (RC1). There were tons of things happening here at the conference, and I know I can't give you a complete rundown, but here are a few big highlights. The big release – Angular 2.0.0-RC1 Yep, it's live. Angular 2.0, RC1. We've been waiting a year for this, and this means we're getting to less breaking changes, but what else does it…

Sending Mail via GMail with JavaMail

If you use JavaMail and/or the Spring MailSender bean to send mail through a GMail account with JavaMail these days, you get an authentication error saying GMail blocks less secure apps. At that point there are two options: Configure your GMail account to accept low-security connections (e.g. https://www.google.com/settings/security/lesssecureapps) Configure your JavaMail sender to use OAuth for authentication This article will describe the second approach in detail. OAuth Basics Instead of usernames and passwords, OAuth deals with tokens. First, you set…

SBT: Group annotated tests to run in forked JVMs

SbtTestGrouping Running tests that use a HiveContext On our current project, we utilize Spark SQL and have several ScalaTest based suites which require a SparkContext and HiveContext. These are started before a suite runs and shut down after it completes via the BeforeAfterAll mixin trait. Unfortunately due to this bug (also see this related pull request), if a HiveContext is recreated in the same JVM, this exception is thrown: "java.sql.SQLException: Another instance of Derby may have already booted the database”….

Slick 3.1.0, Oracle 11g, and UUID columns

SlickUUIDs UUIDs to the rescue I recently decided to change our primary key strategy from an auto-incrementing Long to UUID (aka globally unique IDs). Early on in a project, this should be a relatively simple refactoring (neither the software nor any data has been released yet). First of all and most importantly, UUIDs provide uniqueness (with a high probability) across multiple databases. Second, if you are sending numeric identifiers back in JSON and not serializing / deserializing them as strings,…

Binding custom types in plain SQL queries in Slick

Hierarchical Queries Hierarchical Queries and Oracle Not everything is as fun as the first time you discover the power of monads and for-comprehensions, or realize the state machine you wrote with pattern matching is super easy to read and follow! Some days its business as usual, which as a software developer means you’re usually trying to bend a framework to your will (or cursing the estimate you were forced to give). Today it would happen to be Slick and native…

Testing Angular 2 Components with Unit Tests and the TestComponentBuilder (RC1+)

Note – I’ve updated this article and created a new github project using angular-cli to test it. Run all tests with ng test after following instructions at https://github.com/krimple/angular2-unittest-samples-rc Testing Components In my last post, I discussed how to write tests in Angular 2 based on the new angular-testing API. We learned how to stand up a test and use the test injector, and how to mock the network requests to the Http service using the MockBackend. In this post, we'll…

How can we help your company with your development needs?

Contact Us