Hacker Newsnew | past | comments | ask | show | jobs | submit | more tericho's commentslogin

My guess is even basic obfuscation of his code via minification/compression would eliminate the majority of these copies. The version of his portfolio linked in the article has no obfuscation (granted it could be in dev mode)


This is anecdotal, but I once found this incredible use of $scope while viewing the source for a sports page: https://gist.github.com/tcrosen/96279e39f9b0fb85c266


I just started learning Angular and that code smells. Why wouldn't you make some sort of object for all of those and assign the object to scope?


As someone who struggles mightily with sleep I can tell you it's science not preference that makes you prefer cold. I can't find the original source of this fact but here is a decent alternative[1].

> ...scientists were able to lower skin temperature less than a degree Centrigrade without affecting core body temperature. The changes were dramatic. People didn't wake up as much during the night and the percentage of the sleep spent in stages 3 and 4 (deep sleep) increased. ... A 0.4 C decrease in skin temperature caused a decline in the probability of early morning waking from 0.58 to 0.04.

[1]http://www.sleepdex.org/thermoregulation.htm


That article is wrong. The quote that you gave, is contradicted in the last paragraph of the same article: >> Recent research by Dutch scientists found that by increasing skin temperature the sleep quality in elderly people could be enhanced.

Also the study, that the article links to [0] says:

By employing a thermosuit to control skin temperature during nocturnal sleep, we demonstrate that induction of a mere 0.4 degrees C increase in skin temperature, whilst not altering core temperature, suppresses nocturnal wakefulness (P<0.001) and shifts sleep to deeper stages (P<0.001) in young and, especially, in elderly healthy and insomniac participants. Elderly subjects showed such a pronounced sensitivity, that the induced 0.4 degrees C increase in skin temperature was sufficient to almost double the proportion of nocturnal slow wave sleep and to decrease the probability of early morning awakening from 0.58 to 0.04. Therefore, skin warming strongly improved the two most typical age-related sleep problems; a decreased slow wave sleep and an increased risk of early morning awakening.

[0] http://www.ncbi.nlm.nih.gov/pubmed/18192289?dopt=Abstract


Wow, I've been trying to make a Settlers of Catan game for fun and the thing I struggle most with is the board algorithms. This a fantastic resource to help with that, thanks.


I don't see how this requires you to know the intricacies of call/apply or how it would even force you to use it frequently enough to understand the difference.


I guess I don't understand. There's a lot of ways to accomplish tasks in any programming language but in JS in particular there's a way to assign the value of this and you can use it to have clean, dry code, and I'd expect any sr. level people to know how to use it. jQuery source has over 100 uses of call and apply.


> jQuery source has over 100 uses of call and apply.

Right, jQuery does it for you. You usually don't need to do it yourself unless you're contributing to jQuery (or another lib/framework that needs them).

I might ask someone about call and apply but wouldn't be overly concerned if they didn't remember the exact syntax or mixed them up. I've done the same myself. I wouldn't expect someone to remember every little nuanced part of a language, especially if it's not something they use frequently.


What isn't wrong with using Notepad? If you use Notepad you are either a) too lazy to see what else is out there b) ignorant c) stubborn or d) don't care enough about your workflow to improve. There is literally no way you could form an argument that Notepad makes you more productive than any other popular editor.


Like most JS concepts, to me it's a "use it or lose it" situation. When I have to use them they are fresh in my head, when I move on to another project for 6 months that has no complex modules or uses a framework like Angular, there is no way I'll remember the intricacies. That being said, there is still a different between having used them and simply being aware of their existence, which I suppose could be made clear during an interview.


I started as a back-end developer (well, a software developer) and have made my way towards the client over the years. With my background in engineering (eg. learning how things work) I can confidently answer most of the questions. But I can see how modern "front-end developers" would have trouble with a LOT of them since today it's more about getting things to work than how or why.

That being said, I think it's a great list to work from. I would expect you can arrive at a fairly good understanding of a candidate's abilities based on how they answer the questions rather than if they can answer them all.


This is interesting. The main use cases seem to be large computations, since HTTP calls would be more expensive any almost any routine operation.


Well, not that large since it will kill your function if it takes more than 60 seconds to run.


Placeholders do not get submitted with forms AFAIK. So I don't see what that has to do with autocomplete.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: