News for hackers. Stuff that matters.

Rodeva

Re:New Chart.js beta version launched on Sunday June 29, 2014 @07:47PM (#7962960)
Each one of the chart types has a prototype method .update() which will re-draw the chart with your updated values, so real-time updates are possible.

[1] http://www.chartjs.org/docs/

Re:F.lux updated on Thursday March 06, 2014 @07:40PM (#7357645)
I've had the exact same issue. I just updated to the new beta and my mouse cursor is still jumping. It only happens during the transitioning phase (for me at least), so it's only 20 seconds that my mouse is barely usable. The new features are worth the minor annoyance in my opinion.
Re:Ask HN: Who is the most secure domain registrar? on Tuesday February 04, 2014 @12:19PM (#7178782)
Name.com has a version of MFA they rolled out about a year ago:

http://www.name.com/blog/general/security/2012/12/our-vp-of-...

Re:Your own mini-Heroku for $5/month on Thursday December 12, 2013 @11:10AM (#6895159)
I use this myself to host my website. I've forked it and added buildpacks for Jekyll and Octopress (one of the recent commits broke Octopress) for anyone who's interested and although I haven't cleaned it up enough to submit a pull request, it works perfectly. May take a look at sending one over the holidays

Octopress bare repo: https://github.com/rodeva/octopress-dokku-bare

Dokku fork for Jekyll and Octopress: https://github.com/rodeva/dokku

Re:Questions to ask your potential employer on Sunday November 10, 2013 @06:37AM (#6706087)
Assert driven testing means that the tests are part of the actual code that is running. It's helpful because when an assert fails, the stack trace is right at the position where it failed. In many ways it's an easy way to incorporate testing into your application without the need for an additional framework.

A simple example can be done by writing a single function in the root scope or some global function (javascript)

function assert(assertion, description) { if(!assertion) { console.log(description); //could also have other application error handling code } }

Then in a function in your application:

function myFunc() { var x = 1; assert(x == 1, "x does not equal 1 in myFunc()“);

\\Continue code... }

This is obviously a very simple example and can definitely be iterated upon, but it gets the basic point across and I'm on my phone so writing code isn't the easiest :-P

Some systems have something like this built in, such as node which has more features.

http://nodejs.org/api/assert.html