trakt.tvSo I’ve been neglecting something cliche for quite a bit as I’m sure you have noticed. Rest assured I’m not sitting idly by and the time has been well spent. I’ve been working on trakt these past few months.

trakt helps keep a record of what TV shows and movies you are watching. Based on your favorites, trakt recommends additional shows and movies you’ll enjoy. This works as a plugin for XBMC media center that automatically scrobbles all tv shows and movies you watch. We also have plugins for MediaPortal available with several more media centers in the works.

What make trakt better than other “check-in” sites?

Well, the main thing that sets us apart is automatic and realtime scrobbling of all shows and movies. Some of the other sites out there like getglue and miso require a manual check in from your phone or the website. With trakt, we automate that so you don’t even have to remember to check in, the website will just sync up and track silently in the background.

If you don’t have a supported media center (btw, we are definitely focused on expanding our supported media centers), you have the option to manually mark a show as watched. In that sense, it is kinda like a check in and makes the site useful for everyone. There is also the concept of adding something to your library. This means you have the show or movie, but you haven’t watched it yet. When you browse the website it will indicate everything you’ve watched and have in your library so its super easy to see new things to watch.

Community

The trakt community is over 2100 members as of this post and is very active with discussions, ratings (love/hate), and members building up their watching history. We have a full featured API that community members are already leveraging to create custom mashups of their data. Interesting ideas that have been explored include customize charts of your history, mobile apps, and 2 way syncing your entire media collection with the website.

We’re actively developing the social aspects of the site including recommendations, facebook integration, and twitter integration. Stay tuned for that.

Give it a try!

This is a just a quick overview and update why something cliche has been devoid of new content lately. Check out http://trakt.tv and sign up for a free acount! Also follow @trakt for updates!

Comments Off

When I code things myself and especially when working with code that other’s have written, here are things I always think to myself.

Just a few friendly tips to keep in mind for your next project. These are in no particular order, just as I thought of them.

 
 
 

  1. use comments so others can understand what you are doing
  2. do not use any Dreamweaver generated code as your example (in most cases, do the opposite)
  3. use a JavaScript framework (my favorite is MooTools), no need to re-invent the wheel for things like ajax
  4. try and stick to one framework instead of mixing MooTool and jQuery
  5. don’t make functions with a million arguments, just pass a single array for readability and flexibility (think MooTools style)
  6. use tabs not spaces
  7. use all lowercase filenames and directories
  8. even worse, don’t name files in one case and code them in a different (ever heard of a case sensitive filesystem?)
  9. use associative arrays where it makes sense, such as multi dimensional arrays and objects (see this post)
  10. honestly, who uses Spry anymore?
  11. CSS hacks and IE conditionals are cool and all, but learning to code CSS better will almost eliminate any hacks you’ll need
  12. keep admin and front end code separated except for shared functions
  13. test in all the browsers you need to support
  14. code for standard compliance first, then fix as needed for Internet Explorer (see #11, in most cases IE will work well if you code well)
  15. avoid flash for things like menus that can easily be accomplished using HTML and CSS
  16. avoid inline JavaScript and instead use an external file to keep the HTML clean and maintainable
  17. don’t use inline CSS either
  18. make sure to secure your ajax pages, don’t want anyone messing with your database
  19. keep mobile platforms in mind when thinking about usability
  20. public pages should function in IE6, but I’m not too concerned about them looking good

Well, those are 20 things I just thought of. I’m sure I’ll think of more and when I do there will be the inevitable part 2 post.

If you aren’t familiar with PowerGallery, it is a PHP web app that I created for WebAssist. Basically, you can upload your images and display them on your page with several built in gallery designs. When programming this product, one thing I wanted was easy extensibility so more designs could be added easily. The 1.1 release added 3 slideshows that were great.

I’ve created another design called Stack and you can download it for free below. To install it, just unzip the file and upload the stack directory to the galleries directory inside your PowerGallery installation. That’s it! Log in to the admin and you’ll see Stack a new choice on the Choose Design page.

This gallery was created using the ElementStack MooTools plugin. You can see a live demo here. Since PowerGallery uses MooTools 1.2, you can easily create galleries yourself and just drop them into the galleries folder for easy use.

 

Download the design

 

Comments Off

I was working on a PayPal powered commerce website and for the checkout form, I needed to create a dropdown list of the countries that PayPal supports. I couldn’t find a list in the exact format that I needed, so I created a JavaScript array of JSON objects. Pretty straightfoward, but I thought it would be a good starting point for some of you if you need the same thing.

This list uses the countries listed on PayPal’s website. PayPal requires that you send the 2-character IS0-3166-1 code to their API. Below I have the name and code combinations.
Continue Reading

Comments Off

Over the last few weeks, I have been learning CodeIgniter which is an open source PHP framework. It follows the MVC (model-view-controller) methodology, but allows you to utilize your existing PHP skillset. Overall I think CodeIgniter is great so far, but there are are few gotchas to look out for.

I found an issue today regarding the built in encryption library. Basically, the encrypted string might not be the same thing every time. For example, you might want to encrypt a user’s email address. The first time you might encrypt it on a sign up form. Now on the login page, I want to compare the value the user typed in with the database. The problem is, if I encrypt the email again, it most likely will not match even though the original string is the same!

$this->load->library('encrypt');
$a = $this->encrypt->encode('justin');
$b = $this->encrypt->encode('justin');

echo $a == $b ? 'equals' : 'nope!'; //will print nope!

Behind the scenes, CodeIgniter is basically rotating keys to produce different encrypted strings that decrypt to the same thing. It’s actually a really cool and secure way of handling the encryption, but for the purpose of comparing values (on a login form for example) it just doesn’t work.

Alternatives

So, if you need to do some comparisons using your encrypted data, you have a few alternatives. If you want to stick with PHP, you can make use of the mcrypt_encrypt and mycrypt_decrypt functions. If you want a MySQL solution, look into the encryption functions in their manual.

I have finally started diving into more HTML5 lately and have some good links to help get you started. The syntax itself is somewhat new, but the hard part in my opinion is knowing what browsers support what. The easy answer seems to be Chrome 5 supports the most, followed by Safari 5, then Firefox, and lastly Internet Explorer 8 (with almost no support, shocking!). I have moved to Chrome as my default browser now for quite a few months since it just supports so much more of the standards than the others.

The new syntax and tags make a lot of sense one you get the hang of it and see the reasoning behind it. The CSS3 and JavaScript enhancements are also pretty slick. Some of things MooTools offers are now integrated as native functionality. I still plan on using MooTools to ensure cross browser support though.

Continue Reading

Comments Off