Feed aggregator

Need to Know More About Mendeley?

In Plain Sight - Wed, 2015-12-09 17:45

If you’re interested in learning more about Mendeley, or need access to help tutorials or guides, you should look at this new Mendeley  Resource Center site:

 

Categories: In Plain Sight

EndNote Word Plug-In Not Compatible with Office 2016 on Mac

In Plain Sight - Mon, 2015-11-16 14:08

From EndNote’s website:

“Cite While You Write is not currently compatible with Office 2016 on Macintosh.

We are actively developing a patch for EndNote X7 to fix this compatibility issue. We anticipate this free update to X7 to be ready by the Fall. We understand EndNote’s importance in completing your work and apologize for any inconvenience caused. To support Mac workflows as we develop the patch, we have the following recommendations to help Microsoft Office 365 users continue to create formatted citations and bibliographies in Microsoft Word.

It is possible to have both Office 2011 and Office 2016 on the same computer. If you want or need to install Office 2016, the recommendations outlined below will enable your continued use of EndNote to create formatted citations and bibliographies in your Word documents.”

More information.

 

Categories: In Plain Sight

Ember and Rails Scaffolding for Simple CRUD

CKM Blog - Wed, 2015-10-28 14:52

Like many developers who use Rails, I haven’t thought about scaffolding for a while, but I found myself wanting something like it when I started looking into Ember as a front end for Rails. As with Rails, my guess is that I won’t use Ember scaffolding for long, but I wanted a way to get that initial Ember application up and running, with Rails as a backend.

It turns out that there are easy to use scaffolding generators for an Ember front end and a Rails API backend, with just a few minor gotchas you need to be aware of when integrating the two.

For this tutorial, we’re going to do the simplest thing possible for a crud app. We will create a single model (User), with one field (name), and we will create a web app with Create, Retrieve, Update, and Delete operations. Ember will supply the front end, Rails will handle the back end.

One quick note – while there are ways to integrate Rails with Ember in the same application, this tutorial will build the Ember frontend out as a completely separate, stand-alone app from the Rails backend. This way, the front end can be integrated with any backend that provides the API that Rails provides.

Here we go…

Part 1 – Create an Ember front end

We’ll create a client side, front end application that provides an interface for CRUD operations.

Step 0 – Install ember and ember-cli.

This will also require installing node, npm. I’m pretty sure you’ll need git as well. I’m not going to cover all this (or the process for installing Ruby or Rails). There are plenty of guides on the web to getting all this installed. Just make sure you can execute the following command

ember -v

I’m using ember 1.13.8, node 0.12.6, and npm 2.13.4 (on Mac OS X).

Step 1 – Create an ember app

ember new ember-crud

Step 2 – Install the ember-cli-scaffold package

cd into ember-crud and run

ember install ember-cli-scaffold

(for more information, see https://www.npmjs.com/package/ember-cli-scaffold)

Step 3 – Generate scaffolding for a Model (User) with one field (Name)

ember generate scaffold user name:string --pod

The “pod” option creates a different organizational structure for your files than the standard ember defaults. I prefer it and will be using it here, but the differences are very minimal.

Step 4 – Verify that your app is working

ember serve

and go to http://localhost:4200/users

You should see a very Rails-ish interface with full CRUD for a user with a single input field, name. Go ahead and create, edit, delete a few to verify that it is all working.

The ember CRUD app is using a local dev storage provided by mirage. In the next step, we’ll swap this out for a Rails backend.

Part 2 – Provide a Rails API for CRUD operations

Ember is already providing the view, so rather than creating a full blown rails app, we will limit the Rails app to providing an API for persistence.

Step 0: Install Ruby and Rails

As with Ember, there are lots of resources on the web for getting Ruby and Rails installed. Make sure that you can run

ruby -v

(I’m using 2.1.0)

and

rails -v

(I’m using Rails 4.2.0. You will need this version or later for Rails to use the rails-api gem, which I believe will be included in Rails 5).

Step 1 – Create a rails API only application

Install the rails-api gem

gem install rails-api

And generate a new Rails application

rails-api new rails-crud

Step 2 – Create an API scaffold for CRUD operations for a User

cd into rails-crud and type

rails-api g scaffold user name:string

While I promised not to go into a lot of detail here, you may notice that no view tier is created, and if you look at the user controller, you’ll see that it is set up for rendering json, not html.

Step 3 – Seed with a bit of data

Technically, you don’t need to do this step, since you’ll populate from your Ember app, but it can help to verify everything is working properly on the Rails side before integrating with your Ember app.

in db/seeds.rb, create something like this

user1 = User.create(name: 'user1') user2 = User.create(name: 'user2')

and run

rake db:migrate
rake db:seeds

Step 4 – Check out the Rails API

run:

rails server

go to localhost:3000/users

and you should see a json representation of the two users you created in the seeds.rb file.

Part 3 – Use the Rails API service as a backend for the Ember application

This is relatively straightforward, though there are a few wrinkles.

Step 1 – Modify the way Rails is rendering JSON for a list of objects

Take another look at the json returned from http://localhost:300/users

[{"id":1,"name":"user1","created_at":"2015-10-21T22:17:32.778Z","updated_at":"2015-10-21T22:17:32.778Z"},{"id":2,"name":"user2","created_at":"2015-10-21T22:17:32.783Z","updated_at":"2015-10-21T22:17:32.783Z"}]

You may notice that Rails has flattened this into a single array. Ember, by default, expects a slightly different formatting where the json array of User objects is stored in a hash with the model type as a key.

One approach to this problem is to use a serializer to establish the format for JSON output from the rails api.

Add the serializer to your Gemfile

gem 'active_model_serializers', '~>; 0.8.3'

and run

bundle update

and create a new serializer for the user model

rails g serializer user

This will create a user_serializer.rb file in app/serializers.

class UserSerializer < ActiveModel::Serializer embed :ids, embed_in_root: true attributes :id, :name end

This code will format users the way Ember expects it at the defaults, and will include only the id and name that are expected by the Ember model we created earlier (the various Rails additions like created_at or updated_at will not be serialized and sent to Ember as JSON).

Once you’ve made these changes, reload http://localhost:3000/users Or go to one of the individual users http://localhost:3000/users/1 You should see the following change to the json representation

{"users":[{"id":1,"name":"user1"},{"id":2,"name":"user2"},{"id":3,"name":"user1"},{"id":4,"name":"user2"}]}

Step 2 – Tell Rails to allow Ember to use the API

For security reasons, Rails by default won’t allow an application running on a different port to access the API. To solve this, add the following to your Gemfile

gem 'rack-cors', :require => 'rack/cors'

And add the following configuration to your Rails config/application.rb file

class Application < Rails::Application config.middleware.use Rack::Cors do allow do origins '*' resource '*', headers: :any, methods: [:get, :post, :put, :delete, :options] end end

and run

bundle update

and restart the rails server

This is the minimal configuration to get this example working – for more information on how to allow cross-origin JSON properly check out the rack-cors documentation at https://github.com/cyu/rack-cors

Step 3 – Point Ember at the Rails API

In your Ember application, open the application.js file in app/user/adapter.js (if you didn’t use the –pod structure, this will be in app/adapters instead). You should see a line

namespace: 'api'

change this to

host: ‘http://localhost:3000’

You will also need to disable mirage so that it won’t intercept Ember communications with the rails app. In the config directory of the ember-crud application, open the environments.js file and add

if (environment === 'development') { ENV['ember-cli-mirage'] = { enabled: false }; …

Step 4 – Turn off Ember’s cli security policy

Like Rails, ember comes with configuration defaults to protect against cross domain security problems. To get this example running quickly, you can remove this line from package.json in your Ember app.

“ember-cli-content-security-policy”: “0.4.0”,

As with other config options in this tutorial, this is something you’ll want to read about and understand rather than just disabling.

Step 5 – Verify that the changes to the Ember UI are directed to and properly handled by the Rails application

Restart ember by typing

ember serve

(you may need to stop and restart the server if it is still running), and navigate to

http://localhost:4200/users

You should see a list of the users you created in the Rails database seed.

Try adding, editing, or deleting a few users. You can verify the changes at the Rails back end by rendering the list of Users in the database as JSON by going to

localhost:3000/users

Step 6 – Fix the duplicates problem

You may have noticed that when you create a new record, two new items are added to your list – but if you look at the rails service, only one record was persisted and one of the records in the ember list has a null id. If you refresh the page, the record with the null id will disappear.

I’ve been looking around for a real solution to this. If you just want to make the null id record to disappear, you can hack it in the index route:

model: function() { return this.store.find('user', {id: true}); }

Postscript

I wrote this as part of my notes on getting up and running on Ember and Rails. I’ve found that if I don’t do these write ups when I’m learning something (figuring I’ll do it later when I understand it all better), there’s a good chance I’ll never do it at all. However, I figured it would be a good idea to run it by a colleague here at the UCSF CKM, Jon Johnson, who has some Ember experience. He said no problem posting his reply:


There are a couple of things you might do a little bit differently, but they aren’t wrong. I’m not sure if its a drop in but https://github.com/fotinakis/jsonapi-serializers looks like a better serializer to use in rails. Active record will work and continue to be supported, but if I were going at this from scratch I would start with that.

For Ember you might want to setup the adapter globally to talk to rails instead of just for the user model. You can do that with `ember g adapter application` It looks like that paragraph might be stuck between these two things as you reference application.js being in the user pod.

Instead of killing mirage in development you could also restart the server in production mode. Thats what we do to talk to the real API. Something like `ember s –env=production` will not go through mirage at all. I’m not sure if that is easier or harder than your way.

Categories: CKM

Always Be Collecting Feedback

CKM Blog - Wed, 2015-10-28 10:46

As part of our ongoing efforts to get to know our users better, the UCSF Library web team decided we wanted some of that sweet, sweet microfeedback action, and so we deployed a very short satisfaction survey at library.ucsf.edu back in July.

Anytime a patron clicked the How Are We Doing button at the bottom of every page, they were asked a simple question: How would you rate your experience today? Patrons could let us know if they were satisfied or unsatisfied with their web experience.

Regardless of their answer, they’d be prompted to go into detail and provide some demographic information, but the only required question was whether they were satisfied/unsatisfied. Our hope was that keeping the survey short and to the point, and constantly available on every page, would encourage participation.

The not-so-secret goal of this survey structure was for the web team to learn directly from our patrons where they’re having problems, so that we make improvements to the website based on their needs and not our own assumptions. Our thinking was that a user frustrated enough to leave a comment was a user we’d want to hear from.

Enough Background Already, What Did We Learn?

The stats below are from July 7 through August 23, 2015, the day before we introduced our new Help feature. We’re excluding overlapping dates from this analysis because the Help button began competing with the How Are We Doing button for user attention (more on this below), and we wanted to base our analysis on clean data.

Of the 201 responses received during that period, 65% had a satisfactory experience at our site. Hooray!

If we drill down to the 76% of respondents who shared their demographic information, the overwhelming number of responses came from UCSF affiliates (94%), with Staff leading the way, closely followed by Faculty, then Students. It’s likely the data was skewed by the summer months, and it’ll be interesting to see if the affiliation breakdown changes now that the fall semester is in full swing.

Patron satisfaction is awesome, but remember our not-so-secret goal was to learn why our users are unsatisfied. While only 20% of all respondents bothered to comment at all, our hypothesis about frustrated users being more likely to go into detail was correct: 87% of comments came from unsatisfied users. Hooray (really)!

What’s Making our Users Unhappy?

Most of the frustration came from patrons who felt that navigating the site and finding what they needed was just too hard. 2nd prize for user frustration goes to remote access issues, with patrons expressing difficulties getting to articles using EZproxy, UC-eLinks, and VPN.

Connection errors and Library service issues (comments like you don’t have a book I want and my barcode number doesn’t work anymore) tied for 3rd place, and I was personally amused and humbled to know that 9% of the feedback was about how annoying they found the feedback survey popup window (removed after a few weeks).

* If a patron gave feedback in more than one category, I picked the dominant issue. So What’s Next?

We were fortunate to meet with some respondents, and we used their comments and other key takeaways from our satisfaction survey, the interviews we conducted with our customer-facing staff, and the LibQUAL 2013 survey to finalize the Library User Personas we’ll rely on as we make changes going forward.

We’ll keep our satisfaction survey going, but with the successful rollout of the Help feature, the time has come to modify how we ask for feedback. The How Are We Doing and Help buttons serve different purposes; unfortunately, the current design doesn’t make that distinction clear. Getting requests for help in the satisfaction survey gave us useful information before we rolled out the Help feature, but now it’s more appropriate that help me please comments get routed to the right person right away for faster customer service.

We’ll launch our more low-key request for feedback this week.

The new Feedback button will live at the bottom of every web page.
Categories: CKM

Just Send Me a Signal: Encrypted Communication, Whether or Not You’re a Spy

Mobilized - Thu, 2015-04-16 16:15

How worried should I be about my privacy?  While this question is not yet keeping me up at night, it’s been on my mind more in the past year than ever before. Privacy online, over email, and in a social media context is one thing, but what about the privacy of my personal communications say over the phone or via text message? Considering how startled I am when I actually get a phone call shows how little I use the phone to talk to anyone anymore. I’m more concerned about privacy over text messaging. This led me to explore what I can do to protect the privacy of my messaging on mobile devices, specifically my iPhone. I heard about an open source app called Signal offered by Open Whisper Systems and decided to check it out.

Why is it important?

There are a lot of ways to think about privacy in 2015. Ever since Edward Snowden, former contractor to the U.S. National Security Agency, leaked documents which revealed global surveillance programs run by the NSA, it’s been hard not to wonder about potential impact on our daily lives. If nothing else, Snowden triggered a tide of growing public awareness regarding the extent to which mass surveillance (and secrecy about surveillance) is de facto. How do we balance national security against information privacy?

I’m not a spy. I’m not engaged in illegal or illicit activity. Nor am I generally a paranoid person. My use of messaging is pretty average, nothing anyone would be surprised by, so why should I care if the government is listening?

This is precisely the mindset Glenn Greenwald seeks to challenge, this idea that even people who are uncomfortable with mass surveillance believe there’s no harm in it for them because they’re not doing anything wrong, not doing anything they need to hide. Only people engaged in bad acts have a reason to hide. Right? Privacy is no longer even a “social norm,” according to Mark Zuckerberg, CEO of Facebook.

The trouble is, “when somebody knows that they might be watched, the behavior they engage in is vastly more conformist and compliant… people, when they’re in a state of being watched, make decisions not that are the byproduct of their own agency but that are about the expectations that others have of them or the mandates of societal orthodoxy.”

transcript link

If we assume we’re being watched, whether or not we care, a good case can be made that this is the ultimate in societal control. “Mass surveillance creates a prison in the mind.” That’s no way to live as individuals, or as citizens. What freedoms—even just of the mind—are being eroded gradually, perniciously, in our day-to-day use of technology, and what are the costs (now and in the future)? I find these questions seriously interesting to consider.

As Greenwald says, we all need “to go somewhere where we can think and reason and interact and speak without the judgmental eyes of others being cast upon us.”

If you decide you’re willing to render yourself harmless, “sufficiently unthreatening to those who wield political power, then and only then can you be free of the dangers of surveillance. ”

Okay, so let’s see what Signal is about.

Why choose Signal?

Signal started out as an encrypted calling app for iPhones and iPads. The new version, Signal 2.0, adds encrypted text messages using a protocol called TextSecure. Users can communicate via voice or text securely because Signal employs end-to-end encryption. The goal is for Signal to be “a unified private voice and text communication platform for iPhone, Android, and the browser.”

One persuasive argument for its use is that the code is open source. The Intercept makes the additional argument of consistency, particularly for iPhone users:

Signal is also one special place on the iPhone where users can be confident all their communications are always fully scrambled. Other apps with encryption tend to enter insecure modes at unpredictable times — unpredictable for many users, at least. Apple’s iMessage, for example, employs strong encryption, but only when communicating between two Apple devices and only when there is a proper data connection. Otherwise, iMessage falls back on insecure SMS messaging. iMessage also lacks forward secrecy and inspect-able source code.

After testing it for a couple of weeks with several contacts, I can say it works fairly well. It’s slightly glitchy, more basic (with fewer features) and not as elegant as iMessage. Not bad, but not awesome, which I’ll get back to at the end. First, a few observations.

Once you download Signal and allow it access to your contacts you can start messaging with someone who has Signal, but here’s the rub: they have to find you, you can’t locate them.

Notifications do not reveal who sent you a message and so you have to open the app to find out.

You have to turn sound on in your iPhone’s Settings in order for Signal to work. If you turn sound off, you’ll get an error message.

There is often a very slight delay in sending a message, and a longer delay when sending an attachment. Frequently the delay is so long the error message “Attachment is downloading” displays.

[oh, and the attachment which took so long to download? Not a dick pic.]

Ahem. Otherwise, the process for taking pics, accessing the camera roll and attaching is quite similar to iMessage.

If you want to message with more than one person at a time, you have to name the group. I created one called “ladiez” for a group including myself and my friends Michele and Kimberly.

The in-app calling feature doesn’t work, and I can’t figure out why. Each time, I get a screen that displays “Connecting…” but the phone just continues to ring.

You can download the Signal app and start using it from anywhere, say for example a sailboat in the middle of the Caribbean.

To Signal or not to Signal?

I think my answer is Not, for now, though it was a fun experiment and I’ll keep the app on my iPhone. Maybe I’ll use it occasionally for more uh…sensitive content. There was definitely something sneaky feeling about it, which I kind of enjoyed, as did those I enlisted to help test it out. I can say it does make me feel more secure—and yeah, potentially more daring—to know Signal and a growing number of other tools for encryption are out there. To know people are doing something about the various ways in which our privacy is at risk.

Links for further exploration
  1. Encryption Works: How to Protect Your Privacy in the Age of NSA Surveillance
  2. The Great Sim Heist: How Spies Stole The Keys To The Encryption Castle
  3. As crypto wars begin, FBI silently removes sensible advice to encrypt your devices
  4. As encryption spreads, U.S. grapples with clash between privacy, security
  5. Stop Taking Dick Pics, But Not Because of the NSA (SFW)
Categories: Mobilized

TimelineJS: A Superb Open Source Tool

Mobilized - Mon, 2015-03-02 16:13
What is it?

TimelineJS is a web-based tool that allows you to easily create visually-rich, interactive timelines generated by your data. It’s an open source tool from Knight Lab at Northwestern University and is free to use — all you need is your content and a Google Drive spreadsheet.

How it works

Just download the spreadsheet template from the TimelineJS website, input your text, images, and links, then upload it to your Google Drive account. Next, publish your spreadsheet in Google Drive according to TimelineJS directions, then return to the TimelineJS website to paste your Google sheet link and view the result. You can share the link or embed your timeline on your own website.

//

My timeline Same Sex Marriages in the United States and When They Took Effect uses the TimelineJS default settings for visual effects and themes, and I think those produce a clean, professional appearance. However, you can alter visual effects and themes to your satisfaction. You can also edit and update your data within the Google spreadsheet at any time, and the changes will automatically appear in your timeline. For instance, I’ve had to update marriage equality information for a number of new states!

Where it excels
  • TimelineJS scores big for ease of use. This spreadsheet method makes Timeline JS much simpler and faster to work with than other timeline tools that default to creating the timeline slide by slide and element by element.
  • It also really shines in its ability to display your timeline responsively. Check out a timeline on your phone. It adapts and looks good on both large and small screens, though I would recommend doing timeline creation on a large screen due to the complexities of inputting information.
Tips
  • There are no options for creating an account, so it’s important to keep track of links to timelines that you construct.
  • Each slide must have something entered in the Start Date column in order to display. Don’t alter the headings or delete columns from the spreadsheet template or the TimelineJS generator won’t work.
  • If your website runs on WordPress, you may need to use this plugin and your Google spreadsheet URL instead of the standard <iframe> embed code.
Who is it for?

TimelineJS is a flexible tool that can enhance many topics and areas of study. Most users will simply gather materials for the story they want to tell and enter them into the spreadsheet template. Those who have JSON skills can go further and create custom installations.

Timelines are an excellent way to visually convey transition and change within sciences or social movements, and there are lots of possibilities for teaching and learning. These can extend beyond simply the instructor presenting content to requiring class participation in gathering and describing the data. Since creation and editing of this timeline tool is done in a shareable Google spreadsheet, direct collaboration is possible. Students could also select and construct topics and histories individually or in group projects.

More examples

Be sure to look through some other examples for inspiration and ideas for your own timelines.

Categories: Mobilized
Syndicate content