Hacker Newsnew | past | comments | ask | show | jobs | submit | 2007-12-05login
Stories from December 5, 2007
Go back a day or month. Go forward a day, month, or year.
1.xkcd - Python (xkcd.com)
39 points by nickb on Dec 5, 2007 | 8 comments
2.Project Euler - Fun Math and Programming Problems (projecteuler.net)
34 points by Bluem00 on Dec 5, 2007 | 10 comments
3.Joel Spolsky's Talk at Yale, Part 3 (joelonsoftware.com)
30 points by jkush on Dec 5, 2007 | 12 comments
4.Simon Willison: Comet works, and it's easier than you think (server push, instead of Ajax polling) (simonwillison.net)
24 points by toffer on Dec 5, 2007 | 2 comments
5.Bruce Schneier Answers Freakonomics' Questions (nytimes.com)
21 points by nickb on Dec 5, 2007 | 1 comment
6.Edsger Dijkstra - Discipline in Thought [video] (youtube.com)
19 points by dood on Dec 5, 2007 | 7 comments
7.Loic Le Meur's Ten Rules For Startup Success (techcrunch.com)
19 points by nickb on Dec 5, 2007 | 5 comments
8.Zuckerberg apologizes for Beacon -- announces a full opt-out (facebook.com)
18 points by mqt on Dec 5, 2007 | 22 comments
9.Bit Twiddling Hacks (stanford.edu)
18 points by hhm on Dec 5, 2007 | 3 comments
10.Thinkpad Accelerometer (nikolajbaer.us)
16 points by superjared on Dec 5, 2007
11.New hypothesis for origin of life proposed (physorg.com)
15 points by nickb on Dec 5, 2007 | 4 comments
12.Ask YC: what laptop to buy?
15 points by shayan on Dec 5, 2007 | 55 comments
13.Antidiscrimination Law (or, the Dropout Anti-Employment Act) (chicagoboyz.net)
15 points by amichail on Dec 5, 2007 | 1 comment

The problem with Facebook is that their valuation was too high. Now in order to justify their hundreds of millions of dollars they've taken they are going to have to keep upping the ante in terms of selling personal data and implementing crazy marketing schemes. This will ultimately be their undoing. It wouldn't surprise me if Zuck's new investors won't let him cash out until he hits certain numbers, so now he's pretty much stuck going for broke.
15.Fortune: RIP Facebook? "...watching it now is like watching an unattended child play with a pack of matches in a wooden house." (cnn.com)
14 points by nickb on Dec 5, 2007 | 4 comments

If I were you, MBP.

However, I would seriously consider a macbook. It is smaller, lighter, and I extremely happy with it (had it for about 1.5 years. You may have more of a need for a good graphics card and such.

Upgrade the ram and harddrive yourself, it is trivial, and will take ~ 5 mins.

I wouldnt put linux on it, again unless you have a specific reason to do so. I dev in OSX, deploy on linux.


The jquery plugins are young, and you can usually find answers to all these things in #jquery on freenode. I'm surprised they break your IE, because jquery is one of the few libraries that does some very extensive optimization for IE, unlike some of the other top dogs.

I think a common paradigm is to develop for firefox (because it's convenient to debug with firebug, etc.) and then test in IE and figure out where IE's issues are. You'll learn things that IE doesn't like and avoid them in the future. IE doesn't have some of Gecko's js features, like generators and array comprehensions, so don't touch those. Also, in IE, a trailing comma in an inline object declaration is a syntax error:

var x={0,}; //i find this syntax convenient, so that always pisses me off

The event object disappears if your event handler invokes something to be done on a fresh callstack, even if you still have a reference to the object itself:

function someHandler(e){ setTimeout(function(){alert(e);},0); } //only lost when called via event invocation, and i'm not sure how widespread this problem is

Some DOM properties/attributes may be different/present/absent, but if you use jquery that'll be abstracted away. The event model in IE is lame (level 2 stuff), allowing you to attach only one listener per event per object, but jquery abstracts that away as well. What else... IE is known for leaking memory because each DOM element is actually a COM object, and cyclical references between the js engine and COM are undetected. There's a young tool called sIEve (currently v0.0.8) that can help you detect what leaked. anything else you want to know?


I won't upmod this, as I don't want news.yc to become mysteriously full of xkcd comics tomorrow. But I think this incites interesting conversation.

These days I'm investigating computer vision algorithms. I had worked on them for real time interactive apps (games that used webcams for input... ie: your fingers are the mouse) using C++, but for experimentation this was getting very tedious (even if I've always used Lua for the games themselves... but that doesn't help in the CV engine at all).

These days I've been creating an hybrid that lets me play with CV stuff in Python, so that I can experiment with a lot of algorithms and techniques at once and only later see which ones are useful for my purposes for the final real time C++ app. And it became REAL FUN at once. Python is refreshing, and Python as a language is fun. It feels like playing while you should be working.

And on monday, the real test to Python came. My girlfriend wanted me to teach her enough programming to let her program some interesting Boolean Networks stuff she's very intrigued about. In the past, I had been teaching her some other languages, like a little of C++ and Flash, but they were somewhat boring for her as they were always requiring a little more of abstract programming knowledge from her (a curious foreign in the world of CS) to let her do something interesting (structures, pointers, tedious strings stuff, and very stupid and useless stage stuff in Flash). In Python, in a few hours of teaching we could program some Boolean Networks, repeat some results we had got in paper, and get some interesting new results... it even got very interesting both for her and me, as we got some very curious and intriguing results!!

We ended the day talking about how to extend that, about what other elements of programming she'd need to learn to do some other things she wants to learn, and also she's been teaching me some basic biology to understand what's the connection with this strange BN stuff.

Of course, my gf is a very intelligent girl... but anyway I consider the success of this first intent of teaching anything superior to an interactive "hello world" to be an excellent marker of the simplicity and power of Python as a programming language.

19.Israel's Silicon Valley (washingtonpost.com)
8 points by chwolfe on Dec 5, 2007 | 2 comments
20.A Future So Bright You'll Need to Wear Sunglasses (greenspun.com)
8 points by vikram on Dec 5, 2007

How does facebook get that data? My understanding that web stores upload the data to facebook? Which ones? I bought a few items at Amazon, bookpool and BHPhotoVideo just recently and haven't seen any references to FaceBook. Who's participating?

The feature really IS dumb. While I generally don't care for my friends seeing what I buy online, I absolutely don't want my wife to get a notification about the gift I got for her for Christmas.


Yeah... And nearly everybody (as always) complain about "stupid windows unable to stop apps from stealing focus". Actually this stuff is configurable, there isn't a standard UI for it, but little freeware "Tweak UI" tool lets you do just that, see the screenshot: http://kontsevoy.com/tweakui.gif


The market for startups is so illiquid that it's qualitatively different from buying and selling most other things.

You're doing a single big sale, instead of a flow large enough to generate a smooth curve in response to demand. And the buyers are extremely fickle-- so much so that needing to get bought makes you way less likely to get bought.

24.Microsoft is proud of IE7's first year (and many commenters are outraged) (msdn.com)
7 points by nickb on Dec 5, 2007 | 3 comments
25.An Everywhere Continuous Nowhere Differentiable Function, interesting proof by John McCarthy (stanford.edu)
7 points by hhm on Dec 5, 2007 | 2 comments

Python gives you wings!

Nothing is wrong per se, but I think you have better hardware options from other vendors if you're not going to use OS X.

To me, the beauty of Apple is not the hardware, or the software, but the (mostly) fluid integration of the two. If you're going to not use the software, the hardware is really not all that special (IMO).

In fact, while I was very happy with my MBP, the screen locking thing turned out to be pretty fragile. It ended up breaking on me after a few months, so my screen wouldn't stay shut unless I squeezed it a bit where the little "hooks" drop down and sort of shook it a bit. It was constantly popping open, and the spring-loaded hinge was always popping up. Big pain in the ass.


The problem is more complicated than it seems. Apps have to be allowed to take focus otherwise a newly-launched app wouldn't have keyboard focus. You'd click on a link in your email and the web browser would come up but then you'd have to move the keyboard focus to the browser yourself.

Usually these bugs are caused by someone fixing another bug. It seems even wronger when a dialog box or some other new window comes up, and the focus is not on it. This gets reported, and the programmer fixes the problem by taking focus.

29.iPhone on Rails - Creating an iPhone optimised version of your Rails site using iUI and Rails 2 (slashdotdash.net)
6 points by luccastera on Dec 5, 2007

Python was my second language - and after Java as a first, this comic seems pretty accurate.

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

Search: