News for hackers. Stuff that matters.

Xavi

Re:Living in a parking lot in Santa Barbara on Saturday December 23, 2017 @01:50PM (#15995592)
Not everyone "decides" to have kids. Sometimes it just happens.
Well a package manager does much more than verify downloads, but sure you can think of it as a single featured package manager.
Just brain storming... could another possible solution be to create a public list of hashes of well known scripts, and then write a small `sh` wrapper that verifies that hash of the script it's about to execute?
Why is having node as a dependency such a bad thing? No snark. Genuinely curious.
Re:How well do you know HTML? on Sunday June 09, 2013 @07:52PM (#5851327)
Neither did I, though I still enjoyed it. Really opened my eyes to aspects of web development I never considered.
Are you paying any money to the original author?
Re:A programmer’s guide to healing RSI on Wednesday September 05, 2012 @04:43PM (#4481370)
When I used to work on windows I created a little AutoHotKey script that remapped my keyboard when ever the capslock key was on: https://github.com/xavi-/Keyboard-Remapper

It mapped I,J,K,L to the arrow keys, U to the home key, O to the end key, N to backspace, M into the del, and etc... Did wonders for my wrists.

There's an option to turn on/off the auto responder. Checkout the second image in the slide show: https://chrome.google.com/webstore/detail/illgajkjilbddcllil...
BTW, Google seems to be pretty open with what they know about you. Here are two links where they display an explicit list: https://www.google.com/dashboard/ and http://www.google.com/ads/preferences/
Re:JQuery Performance Tips Cheat Sheet on Wednesday December 14, 2011 @02:56PM (#3353326)
I understand in principle this is true, but in reality what kind of performance hit are you looking at?

I've never seen any real stats.

Quickly switching of themes is one reason why you would want to make it easy to change css: http://xavi.co/articles/jquery-ui-css-themes-hosted-on-cdn

I can also be quite useful during development. One cool trick to achieve something similar is to add a contentEditable attribute to a style tag: http://css-tricks.com/8618-show-and-edit-style-element/

Re:What happens when a Social Game - is run with Bots? on Sunday June 05, 2011 @08:25AM (#2621877)
Out of curiosity, how do you make sure only real people are playing?
Re:Simply Lift on Thursday May 26, 2011 @11:25AM (#2588056)
Presumably the code snippets are meant for beginners who need/appreciate more verbose comments.
Re:JavaScript Interview Question on Thursday January 20, 2011 @03:24PM (#2125127)
Oops, that's a type-o. The capitalize doesn't need to change.

Thanks for the heads up.

Re:JavaScript Interview Question on Thursday January 20, 2011 @03:22PM (#2125121)
Yep, that is exactly the solution I would be looking for.

I would be blown a way if someone came up with solution that could handle arbitrary function returns. My friend actually wrote an interesting article on the subject. Here's the link if you're interested: http://msdn.microsoft.com/en-US/scriptjunkie/gg575560.aspx

Re:JavaScript Interview Question on Thursday January 20, 2011 @02:05PM (#2124847)
Many interviewees, when presented with `say("hello")("world")`, understood that `say` was a function that returned a function, but few were able to actually implement `say`.
Re:JavaScript Interview Question on Thursday January 20, 2011 @12:30PM (#2124383)
A while back a couple of colleagues sat down and came up with our own set of JS interview questions. Here's what we came up with:

Can the interviewee code: https://gist.github.com/633341

Can the interviewee read/debug code: https://gist.github.com/633087

I used these questions during a couple of interviews. They seemed to work well.

Re:RAPT: A physics-intensive HTML5 Platformer on Saturday January 15, 2011 @10:40AM (#2107131)
The performance is quite good. Is the source (the unminified version) available anywhere?
The async and defer attributes are great. Don't forget to added them to your disqus script as well.
I'd argue that "cute obfuscation" techniques aren't needed anymore... gmail's spam filter is pretty good...
Re:The Rust programming language on Thursday July 08, 2010 @06:39PM (#1499020)
I agree, TypeState seems especially interesting. This paper from one of the comments does a good job describing it: http://www.cs.cmu.edu/~aldrich/papers/classic/tse12-typestat...
Re:DSLs in JavaScript on Saturday March 27, 2010 @12:43PM (#1223191)
"I know many of you think JavaScript is a toy language..."

hmm, I thought the dev community got over the javascript-is-a-toy-language mentality 3 or 4 years ago?

Re:Raising money for StackOverflow on Monday February 15, 2010 @06:05PM (#1127805)
I agree, this does help fix the "fastest gun in the west" issue, but I don't think it eliminates the problem.

A mediocre answer that was posted one minute after the question was submitted often has more votes than a well thought answer posted several hours later.

A better solution might be to randomly order answers, regardless of votes, for the first couple of hours (maybe even day). This will further help remove any ordering bias.

I also feel that authors of answers should be hidden for the first couple of hours (or day). Just because John Resig answered a question, doesn't necessarily mean it's the best response.

Re:Sarcastic Font on Sunday February 14, 2010 @11:30AM (#1124794)
I know it's fun bashing IE, but if anyone cares, this css rule achieves the same effect in IE:

  filter:progid:DXImageTransform.Microsoft.Matrix(M11=1,M12=.2679,M21=0,M22=1,sizingMethod='auto expand');
Re:My lazy American students on Wednesday December 23, 2009 @04:53AM (#1011854)
I've heard similar stories form friends of mine who were also CS TAs.
Re:Google Analytics unblocks the Web w/ Async support on Wednesday December 02, 2009 @09:33AM (#972071)
They've also moved away from document.write. Now we can use google analytics on pages served as XHTML without resorting to these types of hacks: http://www.the-xavi.com/articles/operation-is-not-supported-...