News for hackers. Stuff that matters.

winstonm

Re:Tell HN: Steal my ideas on Sunday March 11, 2012 @01:55PM (#3690805)
Idea #4:

http://www.tadcast.com/ https://mashable.com/2009/01/12/tadcast/

(Also http://www.brandfame.com/ and http://videosponsorhouse.com/)

There are some other startups that focus on placing background music in online videos.

Re:Going Simple with JavaScript on Monday March 05, 2012 @01:47PM (#3667729)
JavaScript has been updated in all major browsers and now supports bind/each/map/filter right out of the box.

No version of Safari supports bind.

Re:Hacked: commit to rails master on GitHub on Sunday March 04, 2012 @04:33PM (#3664091)
Yes, mass assignment with Model.new(params) and model.attributes=params is a best practice for professional production Rails websites. Business and security rules for field updates are coded in the model (attr_accessible/attr_protected/validates).

That's how it's been since Rails 1. Which is cool. But it's error-prone for newbies, especially when Rails's model and controller generators make all attrs writeable by default, with nary a generated comment about how or why to lock things down. In a culture of convention over configuration, attrs should be locked down by default: "config.active_record.whitelist_attributes=true" for new apps, and throw a helpful message when I mass assign to a model that has no accessible attrs configured yet.

Re:Car Dealers Wince at a Site to End Sales Haggling on Saturday February 11, 2012 @08:42PM (#3580793)
Interestingly, dealers already sell some of their new cars below cost. But they make their money back with service and financing charges, so the basic laws of economics still apply.

http://blog.truecar.com/2009/04/24/more-than-ever-dealers-ar...

http://www.justice.gov/atr/public/eag/246374a.jpg (from http://www.justice.gov/atr/public/eag/246374.htm)