Hardcoded paths in my plugin

You want to use plugin_dir_url():

$url = plugin_dir_url( __FILE__ ) . 'js/my.js';

tech