- write bitchen code
- play guitar
Friday, December 13, 2013
My tasklist for today
Labels:
geek,
java,
jquery,
playframework,
programming,
thoughts,
ubuntu,
yaml
Friday, November 22, 2013
@reboot in crontab
Hey folks,
I needed to run a script on startup... After looking at init.d (and having troubles with it), I finally settled in on the @reboot flag in crontabl. I was having trouble getting that working too, but I fixed it. If you are having a similar problem, here are some things you can try.
That should get some of you started
I needed to run a script on startup... After looking at init.d (and having troubles with it), I finally settled in on the @reboot flag in crontabl. I was having trouble getting that working too, but I fixed it. If you are having a similar problem, here are some things you can try.
- Make sure that your script is executable
- Chmod +x [yourscript]
- It's a good idea to log your script errors to a file to figure out why the hell it's not working
- @reboot sudo sh /pathtoscript/foo.sh > /pathtologs/foo.log 2>&1
- Check /var/log/syslog to see if crontab ran appropriately
Friday, November 1, 2013
This is just to say... at the cody house
This is just to say...
Dear Megan,
I have eaten
the snickers
that was in
your pillow case
and which
you were
probably saving
for tonight
Forgive me
it was delicious
so sweet
and so chocolat'y
Dear Megan,
I have eaten
the snickers
that was in
your pillow case
and which
you were
probably saving
for tonight
Forgive me
it was delicious
so sweet
and so chocolat'y
Wednesday, October 30, 2013
Monday, October 28, 2013
Friday, October 25, 2013
Simple #Jquery quiz question of the day... what's wrong with this code?
Hi folks,
I ran into this problem the other day and thought I might share it with you all... I'll put the answer in a comment in a few da... Feel free to post alternate solutions... or, call me a tweed... or whatever :)
So long, and thanks for all the fish.
Question:
What is wrong with this?? What will happen when it runs?Oh jeez...
i'm itching to show you... but it'll be more fun if you guess.The answer coming back soon!
Sunday, October 20, 2013
Friday, October 18, 2013
Thursday, October 17, 2013
Saturday, October 12, 2013
My kids kicking down some bluegrass
This post is sans geekness, unless you consider kids picking some serious bluegrass of the geek variety.
Many of you know that my kids have been picking bluegrass for the past few years. Last night they put on a recital at the local coffee shop and invited friends and family to come down. The amount of love in that room was incredible.
Here's some vids of what they did... WAY cool :)
Feel free to share!
High on a MountainTop
Billy in the Lowground
Love Please Come Home
Picking in the Wind
Salt Creek
Make Me Down a Pallet on your Floor
Red Hair Boy (with a teency bit of Salt Creek)
Many of you know that my kids have been picking bluegrass for the past few years. Last night they put on a recital at the local coffee shop and invited friends and family to come down. The amount of love in that room was incredible.
Here's some vids of what they did... WAY cool :)
Feel free to share!
High on a MountainTop
Billy in the Lowground
Love Please Come Home
Picking in the Wind
Salt Creek
Make Me Down a Pallet on your Floor
Red Hair Boy (with a teency bit of Salt Creek)
Sunday, October 6, 2013
Friday, October 4, 2013
Thursday, October 3, 2013
Generate YAML for testing
Hi folks,
Among several other ways, it's easy enough to generate your own YAML for testdata using YAMLWriter.
https://code.google.com/p/yamlbeans/
Here's a quick example:
I did find that I had to modify the output a tad (adding bangs here or there), but for the most part... it's pretty good.
https://code.google.com/p/yamlbeans/
Here's a quick example:
I did find that I had to modify the output a tad (adding bangs here or there), but for the most part... it's pretty good.
Wednesday, October 2, 2013
Share Code Snippets in Blogger
Hi folks,
From time to time, I wanted to share code snippets in Blogger which is pretty crappy for said task...
until... I found out about gists from github...
Gists are a great way to share code snippets. You can create them on github, and just like all code repos, they are versioned and backed up...
You can make your code look as pretty as this:
and this:
and this:
Check out https://gist.github.com/discover
From time to time, I wanted to share code snippets in Blogger which is pretty crappy for said task...
until... I found out about gists from github...
Gists are a great way to share code snippets. You can create them on github, and just like all code repos, they are versioned and backed up...
You can make your code look as pretty as this:
and this:
and this:
Check out https://gist.github.com/discover
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.
Friday, September 27, 2013
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!
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 :)
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!!!
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:
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.
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;
}
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!
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
Wednesday, September 18, 2013
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.
- 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.
- 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.
- 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.
- 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.
Subscribe to:
Posts (Atom)