ozmm.org Archives - 21 December 2014, Sunday

  • JavaScript Style

    ozmm.org 23 May '14, 2pm

    I know that when you write Ruby or Python, you use under_scored method names and CamelCase class names. But JavaScript isn't Ruby or Python. Consider: In browsers, all methods are camelCase. In node.js's standard library, all methods are camelCase. In commonjs, all methods are camelCa...

  • Managing Expectations

    ozmm.org 06 Jan '14, 8pm

    If you look on Cultured Code's Arrivals page, you'll see something like this: This is a very tempting thing for small companies to do. You want your customers to know that you're working on something they want. But ultimately, it's a bad idea. When Cloud Sync launches, I'll think, "Fi...

  • CoffeeScript Mode major mode for Emacs: coffee-mode

    coffee-mode

    ozmm.org 21 Dec '13, 9pm

    If you're using Aquamacs, ⌘r should compile the current coffee-mode buffer and open the resulting JavaScript in a new buffer using js2-mode . You can customize the mode used to open JavaScript by overriding coffee-js-mode and you can override the key combo by adding this to the

  • rake start

    ozmm.org 06 Dec '13, 10pm

    I'm working on a Sinatra app that uses MongoDB. I'd love to start both Sinatra and MongoDB at the same time, then kill them at the same time, too. Luckily we can use Rake's

  • ones zeros majors and minors

    ozmm.org 05 Oct '13, 9am

    If you look on Cultured Code's Arrivals page, you'll see something like this: This is a very tempting thing for small companies to do. You want your customers to know that you're working on something they want. But ultimately, it's a bad idea. When Cloud Sync launches, I'll think, "Fi...

  • How are rubies cut?

    ozmm.org 30 Sep '13, 7pm

    Master Rubyist Charles Nutter recently posted an entry titled The Rubyists are wrong . Wrong about the way rubies featured in our Ruby logos are cut. My father has worked in the jewelry business for over 30 years. As soon as I read Charles’ article, I wondered what Pop would think. So...

  • When GitHub goes down...

    ozmm.org 23 Dec '12, 5am

    What if my GitHub repository is corrupted or deleted? Don’t Panic! Because of the distributed nature of git, everyone always has a local full copy of the repository, complete with history. Any of your repositories, assuming they have been kept up to date, can be uploaded to the GitHub...

  • I Love Labels

    ozmm.org 10 Aug '12, 1am

    I really love when checkbox labels are done properly. To see what I mean click on this checkbox's text label ("Click Me!"): Click Me! <input type="checkbox"> Click Me! Nothing happened, right? Right. Now click on this checkbox's text label: Click Me! <label><input type="checkbox"> Cli...

  • SORT in Redis

    ozmm.org 03 Aug '12, 6pm

    A Hurl (in Redis) is a JSON object describing an HTTP request. Its key is the SHA1 of its value. This is convenient because it means we won't store duplicate values - we use Redis' SETNX command to only save the value if its key doesn't already exist - and probably won't get collisions.

  • try()

    ozmm.org 27 Jul '12, 9am

    → try() 26 February 2008 This is something we’re using on GitHub that I really wish I started using sooner. For lack of a better name, it’s called try() . It works like this: def remove_email ( email ) emails . find_by_email ( email ) . try ( :destroy ) end Another example: file_type ...

  • Slightly Obtrusive JavaScript

    ozmm.org 22 Mar '12, 1pm

    → Slightly Obtrusive JavaScript 31 May 2010 There are good things and bad things about "Unobtrustive JavaScript." One bad thing: it's hard to tell what JavaScript is touching an element. Idea: Only ever use classes and ids prefix with js- when touching the DOM with JavaScript. For exa...