Donito's comments

Donito | 12 years ago | on: Ask HN: Interview Questions for Front End Developers

Create an infinite scrolling effect for an image gallery. This will test out the following:

* Ajax * Event handling (scroll) * Basic arithmetic (e.g. when to trigger a new request based on % page scrolled) * Template/DOM insertion * Thinking about edge cases (e.g. what happens when the page is resized, or the ajax request has no more elements to return)

Donito | 12 years ago | on: Javascript Constructors and Prototypes

Terrible article in my opinion teaching some really bad habits that will cause hard to find bugs over time. Truth is, omitting semi-colons is probably fine at smaller scale, but for larger javascript code base with multiple maintainers, it's definitely a better practice in my opinion. Oh well, no point in me saying what has already been said :)

Donito | 12 years ago | on: ChessBoardJS

Play a full game and you'll be surprised, the AI is actually surprisingly good and gets better as the game progresses, especially given the size of the code.

Donito | 12 years ago | on: Why is there no (ad-free) YouTube Premium?

There's hidden cost associated with offering a paid membership for "privileged" users, in that it affects the overall perception of the product. Many non-paying users would feel negatively about it, and start looking for alternatives. As a result, the membership fee has to cover (1 + lost users) advertisement revenue.

Donito | 13 years ago | on: Ask Programming Superstars: Do you have to interview?

Absolutely, many people don't realize that interviews are a two way street. Not only is the company interviewing you to assess your technical skills and cultural fit, but you are interviewing the company as well to see whether you'd like to work there.

If you're a "superstar" (I don't really like that term), you want to work with other talented individuals. So if the interview process is non-existent or overly easy, it sends a negative signal about the "potential" quality of other hires.

Donito | 13 years ago | on: Ask PG: Do you ever get overwhelmed?

Quote from pg: "For some reason I didn't check the comments after the surgery to see if they were in the right place. I must have been distracted by something."

Short answer to your question: Test the fix after deploying it on production :)

Donito | 13 years ago | on: Ask HN: Rails or Nodejs

I've gone that route in the past, and truth is it's painful to run rails on windows (albeit not impossible). The main issue I ran into was that some gems (libraries) rely on native extensions that are not available on Windows.

HOWEVER, there's still a way which works pretty well, which involves running rails from a Virtual Machine (e.g. Ubuntu) to which to ssh into, while coding from windows. Take a look at http://tinyurl.com/b8w4exm (using vagrant might be easier than this tutorial).

Donito | 13 years ago | on: Ask HN: Rails or Nodejs

Asking whether to use Rails vs. Node is like asking whether you should use DirectX or XAML. Both can be used for rendering UI, but every technology has its strengths and weaknesses so the answer is "it depends".

You can either start by choosing a technology, then a project that is adapted to it. Or pick a project, and choose the framework that is best for achieving said project. Here are some thoughts about Node vs. Rails to help with your decision:

Node: - Uses Javascript (on back-end) - Asynchronous IO, great for handling high volume of requests or massive amount of simultaneous connections. - Smaller learning curve, given you're most likely already familiar with JS - Can do much more than traditional web frameworks (e.g. php/rails), like binding to a specific port, handling socket connections etc.. - It's pretty fun :)

Rails: - Uses Ruby, so there's a bit of a learning curve here - Extremely mature framework with impressive amount of existing libraries (known as gems) that plugs into it - By nature, enforces great software practices (e.g. testing) - Best adapted for creating traditional SaaS applications - It's also a lot of fun :P

Honestly, if it's for fun, just pick one and start doing a project. They're both in their respective ways fantastic.

Donito | 13 years ago | on: Naming programming variables, classes and other things

"Its pretty well accepted that one of the hardest things in building stuff with computers is naming things so that humans can understand whats going on." -- Hum... that's pushing it a little bit isn't it? :P

Regardless, I think what you're looking for is commonly known as "naming conventions": http://en.wikipedia.org/wiki/Naming_convention_%28programmin... - I would suggest googling "naming conventions for <insert your language of choice>" as a starting point. From there, if you have more questions, feel free to ask :)

page 1