News for hackers. Stuff that matters.

danielwozniak

Imitation Is The Best Form Of Flattery
Re:Python: The Dictionary Playbook on Wednesday January 02, 2013 @05:36PM (#4999757)
Nice! Some good information here. Good for beginners, good for intermediates, some expert will probably say it's good for them too.
Re:Draw.io Doomsday sale - 100% off for 24 hours on Thursday December 20, 2012 @09:38AM (#4947889)
I decided not to sign-up since they asked me not to.
Re:The definitive guide to forms based website authentication on Thursday November 08, 2012 @10:32AM (#4758150)
It says if your going to use captcha, use reCaptcha because it is "by definition hard for ocr". I think it is completely mistaken.

Two words are shown for reCaptcha, one that is "by definition" ocr easy and one that is hard. You don't need to "solve" the one that is hard. In-fact, you can put anything for the hard one. You only need to solve the part that is "by definition" ocr easy.

Re:The Best Time to Post on Hacker News on Thursday November 08, 2012 @10:22AM (#4758092)
I've seen posts of the same link with the same title only a few hours apart get dramatically different traction (5 vs 285 up votes). There are tricks to try and game the system but it also involves more luck than most people seem to think. That said, posts that are truly insightful and anything from PG will make it to the top, it seems, every time.
I have traveled in some very, very poor places. I have met people that live without four walls and a roof. Literally, these people only have three walls! The interesting thing is while their lives are full of hardship and suffering, many of them are also very happy and joyous. It seems to me they are much happier then many very privileged people. It is all relative.
guylhem and blissofbeing both make very good points here. We can take into consideration the motivation behind the wish to be happy. It reminds me of a story I read while studying. I'm going to paraphrase here so please forgive any mistakes.

There was a man traveling down a road while it was raining. He came across a statue of Lord Buddha. He thought to himself, "The Buddha is getting all wet, that is not right. I shall cover his head so he doesn't get wet". He took off his shoe and put it over the Buddha's head.

Now, in those days (and even today in many parts of Asia) the act of putting something from your feet onto a Buddha's head is very disgraceful. In Thailand people don't even let their toes point at a statue of Buddha. Many people would think that man did something very wrong. However, his motivation was to protect Buddha and that single act was the eventual cause for himself to become a Buddha.

I am no expert and am just repeating what I have read elsewhere. Hopefully I did not mess the story up to bad and someone will still benefit.

Its unfortunate that the article does not do much to explain what "happiness" in this context means. These monks are meditating on compassion and the wish to benefit all sentient beings. The gamma waves are a byproduct of this type of meditation. The scientists are making the link between gamma rays and happiness, not the monks.
Re:Fragmentation on Tuesday October 30, 2012 @02:35PM (#4718752)
The comments on this thing gave me the best laugh I have had in a while.
Re:When does learning (to code) stop being so hard? on Monday October 29, 2012 @11:09AM (#4712584)
Just keep coding and, as important, read other people's code. Keep doing it. If your coding in python, read the standard library. That, my friend, is one of the beautiful things about open source. One day the coding will be easy and the problems your trying to solve will be hard. Thats a good day IMO.
Re:Always “hover” before you click? Wrong. on Monday October 29, 2012 @10:18AM (#4712344)
Actually you don't need that either.

onclick="window.location='<badurl>';return false;"

If you want to be even more shady you can use the 'onmouseover' event with the same redirect as above. Which defeats the look before you leap approach of hovering before clicking.

onmouseover="window.location='<badurl>';return false;"

Work smarter on *nix with jobs

Many people use screen and tmux. These tools are useful but are not always available and tend to be a bit overkill. There is a lighter way of switching between tasks in *nix environments. Say your working in vim and want to fire up ipython to test some code. Pressing &lt;ctrl&gt;-z backgrounds your vim job. You'll drop to your shell and can fire up ipython. When your ready to leave ipython you...

( Read More... | no comments | on HN )
Re:SSH key and passwordless login basics for developers on Thursday October 25, 2012 @10:03PM (#4700498)
Instead of password-less sudo you can use `sudo -s` to get a root shell. `sudo -sE` for a root shell but preserve your user's environment variable.

Older »