HNHacker News
TopNewBestAskShowJobs

rthprog

25 karma · joined November 21, 2011

submissionscomments
rthprog··on Rate-limiting JavaScript function calls
OP here.

I updated the post with a link to underscore's annotated source for debounce and throttle. Thanks for the tip.

rthprog··on Ask HN: Video of Apple Keynote?
http://www.apple.com/apple-events/september-2012/
rthprog··on Chrome Killed UserScripts.org
I'm a bit disappointed that Google's alternative (the Chrome web store) requires a fee, even if it's only $5.

It seems kind of silly for Google to ask for a fee to distribute a free extension, especially since there is no way for a developer to distribute it themselves.

rthprog··on Static Asset Compilation
Aside from minifying javascript, you should probably also consider using Google's Closure Compiler in 'Advanced-Compilation' mode. I believe it does a much better job than traditional minification.

https://developers.google.com/closure/compiler/docs/api-tuto...

rthprog··on JQuery now runs on every second website
As much as I love jQuery, I feel it can quickly become a crutch, particularly for those who have spent a fair bit of time relying on features like .animate(). Modern browsers often have alternatives that (depending on the situation) simplify your code and offer significantly better performance. Similarly, I cringe whenever I see jQuery UI pop up in an interface - while it's easy to use, it also keeps some from developing UI features of their own.

There's a time and place for everything, and as a whole, I feel many are over-relying on jQuery.

rthprog··on Smart Notebooks: Building a Better Shared Document
"Also, Google Docs doesn't really do much for version control"

Why would anyone need something beyond Google's 'See revision history' tool? Sure, you're missing some features software engineers are used to, but I'm not understanding why people would need this.

rthprog··on Smart Notebooks: Building a Better Shared Document
Google Drive keeps local copies of things that can be modified offline.
rthprog··on Wristwatch in only HTML/CSS
Very cool! Though the title isn't quite right - there definitely are images in the source, so it's not actually 'only HTML/CSS'
rthprog··on Bacon Ipsum, because Unicode is hard
Link to the github repo: https://github.com/gvanderploeg/unicode-gen/tree/master/src/...
rthprog··on Why I'm Doing It All Wrong
Good for you Dan.

I'm curious - is 'Airtime for Email' keeping it's name now that Sean Parker & Shawn Fanning started 'Airtime'?

rthprog··on AngularJS 1.0 released
I work at Google. Angular is certainly used internally - that said, no team is forced to use it, or switch to it.
rthprog··on Fixie.js - Automatic filler content for HTML documents.
You can now assign the class to a container div - you must still provide some empty tags to specify what kind of content you want.

For example, if you need a couple paragraphs of text, you can use `<article class="fixie"></article>`. If you need exactly 1 header followed by 3 paragraphs, you can use ``` <article class="fixie"> <h1></h1> <p></p> <p></p> <p></p> </article> ```

rthprog··on Fixie.js - Automatic filler content for HTML documents.
The point isn't to write content for you - it's to automatically add temporary content so you can test out your design before writing copy.
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Thanks! It's actually kind of funny how small the dictionary is...
rthprog··on Fixie.js - Automatic filler content for HTML documents.
This has been replaced by `fixie.init(["CSS-selector"]);`
rthprog··on Fixie.js - Automatic filler content for HTML documents.
As mentioned elsewhere, this is now implemented as `fixie.init(["CSS-selectors"]);`
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Nice suggestion. I made some modifications so this is the new behavior. Child elements are targeted, and content is never overwritten.

``` <div class="fixie"> <p></p> <p>Hello <a></a></p> </div> ``` The above will cause only the first `<p>` tag to be filled, and the `<a>` tag.

In addition, you can now use `fixie.init(["CSS-selector"]);` to target arbitrary tag names, class names, and ids. If the tag in question contains text content, it will not auto-fill it (though it will auto-fill children, if need be).

rthprog··on Fixie.js - Automatic filler content for HTML documents.
This is fully implemented now. Woohoo :)
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Nice! I added it as an issue just a second after you.

I'll definitely give it a try, though I invite anyone else to send a pull request.

rthprog··on Fixie.js - Automatic filler content for HTML documents.
I considered doing that, but the problem is that I've noticed that some people use <p> tags as breaks between paragraphs. Requiring a class makes sure that the developer/designer knows where their filler content is going.
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Agreed, lorem ipsum can become a crutch - good copy is integral for good design. That said, this script will give you random length paragraphs, articles, and what not, giving you some room to test your layout, and makes it easy to throw in temporary content until you've written something yourself.
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Now you can use a specific class instead. Just call fixie(myclassname);
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Good point.

While there are some situations where that makes more sense, doing that for things like paragraphs is kind of silly - you're just moving junk copy to your CSS. You either have a giant CSS file, or some rather repetitive paragraphs.

rthprog··on Fixie.js - Automatic filler content for HTML documents.
On a side note, you can now change the class name to whatever you want (thanks Luke Holder via github).
rthprog··on Fixie.js - Automatic filler content for HTML documents.
Sure, but it's hard to get a variety of content in that way. If you have a paragraph that begins with lorem ipsum over and over again, you'll quickly notice.