Monday, September 30, 2013

EmbedMongo and the Play Framework


We would like to use integrations and unit tests that don't require an actual database. As of this writing there are several solutions to this problem with relational databases, however we are using Mongo, a popular NOSQL db.

We have found using embedmongo (https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo) useful for this task.

Here is a sample of how to make this work...


The above describes the quick and dirty steps for starting up the embedded Mongo instance in an integration test.

In practice, I have created an EmbeddedMongo class with a startup and teardown method which makes use of the play framework properties file to populate the appropriate port for testing and to encapsulate the private members mentioned above.

Tuesday, September 24, 2013

Overheard at the Cody Casa while making dinner awhile back:

Says my nine year old to my seven year old: "Maddie, what would you do if the entire WORLD, everybody and everything, turned into a bobble head doll."

Says my 'then seven' year old back to my nine year old: "I'd probably just die."

Says the nine: "Why?"

Says the seven: "Cause all I could eat would be bobble heads... I bet they taste disgusting."



-- What a bright kid!


Monday, September 23, 2013

Second Wacom Bamboo Pen Tablet Attempt

Yip... this is fun...
Everything I do of course... still looks like an 8th grade art project... but I never took art in 8th grade, so now I gotta learn :)


Ubuntu and other flavors of linux tip

Hey folks, here is a tip for #linux...

We all know that Alt tab toggles between applications... however, did you know that alt tilde toggles between other windows of the same current app type?

So, if you are using chrome, and have five chrome windows open... alt tilde will allow you to toggle between just the other chrome windows.



Now, if I could just alt tilde through my family members!!!

Sunday, September 22, 2013

First Wacom Bamboo Pen Tablet drawing

So I bought a Wacom Bamboo Pen Tablet, and this was first attempt at using it.
This was done with Gimp on Ubuntu... all free software... relatively easy to use and really fun to boot!





Friday, September 20, 2013

How to manage multiple sessions from Chrome

I use this trick to manage multiple sessions while developing. For instance, sometimes I need to log in to a system that I am developing as a student, and sometimes I need to log in as a professor. It bothers me to have to log out and log back in all the time.

Chrome has a slick way of switching back and forth.

Use 'user profiles' to have multiple sessions.

To add a new user:
  • Click on the menu in your browser toolbar and select Settings. 
  • In the "Users" tab, click the [Add new user] button. 
  • When the confirmation dialog appears, select a picture and enter a name for the new user. Click [Create]. 
  • A new window for the user should appear, with a picture you've chosen for the user in the top corner. 

Groovy eh?

Each user profile can also sync up with all the bookmarks, extensions, theme, and browser settings for it if you're signed in. I don't use this quite as much... but I do make use of the feature of web development.


Thursday, September 19, 2013

Play! hates immutables

Ok...
Below the lines ... uh... below... is the original post.
So... it turns out the Play! doesn't hate immutables... The Scala Template engine that Play uses just has a ... way of accessing object fields directly... not through Getters. That made me nervous... requiring all my readable fields to be public makes me nervous. As Joseph mentions below in the comments, you can still use getters and private or protected data... And that seems to be the appropriate Tack...

Good to know...
and thanks Joe.
--------
Trying to wrap my head around Play!'s apparent hatred of using immutable model objects.
Using the scala template engine seems to require public attributes and doesn't seem to care about getters and setters.... hrm... maybe I'm missing something.

Any of you Play Framework workers have anything to say about it?

Maybe i'm over-thinking things...
Yes, probably over-thinking things.

Maybe I could maintain immutables and expose some sort of mutable 'view' that doesn't do anything.

Maybe something like this:

public class Entry {
@Id private String id;
private double latitude;
private double longitude;

        MutableEntry getView(){...}
}

public class MutableEntry {
@Id public String id;
public double latitude;
public double longitude;
}





Playframework and Ubuntu Tip

I was having trouble getting the 'play' command to work in Ubuntu...
I kept getting unknown argument errors.

It turned out that I had another Play binary in my path from the sox package. That's NOT the right 'Play' :)

The way I fixed this was to put a symlink with a different name to play, say... playf in my bin dir.
Now, you can start play with the 'playf' command.

Problem solved!

ln -s /[path to play]play-2.1.3/play /bin/playf



Cartoon... Sometimes, it's so hard to explain this stuff!





Tuesday, September 17, 2013

The Mentoring Workplace and Badges

As a part of #mooc on #openbadges, we were tasked with describing an ecosystem that might at some point be served by openbadges. Now, step into my time machine and travel back to my grad school days where I did some work on a system that was meant to foster a 'Mentoring Workplace'.
The idea was to borrow ideas from the Pay It Forward Foundation to encourage growing a Community of Practice in a semi natural, somewhat organic manner. This is what I am basing my assigment off of.

  1. Describe the ecosystem of this industry or community and provide an overview of how it currently works.
The Mentoring Workplace can exist in any environment where fostering and developing a solid Community of Practice is a desirable outcome. Informally, the Mentoring Workplace is simply the practice of somehow encouraging mentor-ship from individuals to individuals.

Every learning experience that an individual has as personally constructed is biased in the sense that the learner has used their own background to build that knowledge upon. Thus mentor-ship on any subject is useful no matter how or who is acting as a Learning Provider. The Mentoring Workplace takes advantage of this by encouraging sharing of knowlege. The Mentoring Workplace also considers mentoring to produce a useful artifact beyond that of the individuals in the way of documentation.


  1. Describe the roles of the primary stakeholders in this ecosystem: learning providers, job seekers, and employers.

Learning Providers
In the mentoring workplace, we can refer to the mentors as the 'Learning Providers' stakeholders of our ecosystem. These individuals are expected to share their personally constructed knowledge of a skill, ideology, or perspective to mentees.

Job Seekers
In the sense that the mentees of the mentoring workplace are inherently interested in improving their knowledgebase for purposes of personal and professional growth, mentees represent the 'Job Seekers' of our ecosystem.

Because the idea of the mentoring workplace is to foster a free flow of knowledge and experience, at any time in practice Learning Providers can exist also as Job Seekers and vice versa. Playing both roles is encouraged and expected.

Employers
The mentoring workplace ecosystem exists entirely because the institution is interested in providing an environment that fosters knowledge growth, personal growth, and a community of practice that grows and evolves from the learning experiences of the individuals. The 'Employers' in this ecosystem are individuals that provide the environment and practices for the mentoring workplace to evolve.

  1. Create personas/archetypes that represent each of the stakeholders.

Leslie the Learning Provider has been writing apps with the play framework for the past few months. She has constructed her own knowledge base including ideologies, opinions, and methods that are somewhat different from her piers. Teaching what she knows will help her to further develop her knowedge, and by participating in this program, she will have the opportunity to be mentored by others in areas that she has gaps.

Jerry the Job Seeker has just started writing apps with the Play Framework. While much or most of the skill can be developed on the job, he'll benefit from the experiences of others. He will be mentored by Leslie.

The Eastward Communications Employers are looking for a way to increase their overall community of practice in all areas of their core competencies. Furthermore, they will benefit from additional documentation of practices and services for onboarding new talent.

  1. Write one or more “before badges” user stories that articulate specific problems or areas needing improvement in this ecosystem.
Before badges, the Eastward Communications Employers had instituted the Pay it Forward Mentoring program in their organization. Skills were mentored, and were 'payed forward' appropriately. While the program was effective, the documentation produced and the actual effort that went into the mandatory program was meant with varying degrees of success.
Eastward wanted to improve adoption of the program and tried several different tacks. Employees enjoyed the program, but saw little in the way of document able proof that the program existed. Some employees found it difficult to participate in a program that didn't add any sort of artifact to a resume.