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

From the article:

"Gold lies on the streets and you just need to dig it up with ideas. Ideas are like the shovel," he says.


It looks like South America and Antarctica are the only two continents free of blasts.


Founders are more savvy now, and no longer ask questions like, "So when we get money from investors, when do we have to pay them back?"

So if you do get $$ from investors, when do you have to pay them back?


If it is a convertible bond, that isn't really as silly a question as the article makes it out to be, and is very relevant given Yuri Milner's convertible bond offer - in which case I believe the answer is "1 year, unless Yuri decides to exercise the option to convert".


What is AMA?


"Ask Me Anything".


I upvoted your response, because I guess that's the thing to do on a site like this. But then someone else apparently downvoted. ?!


I fail to see how the following code from the book is an example of a singleton:

01 var mySingleton = function(){

02

03 /* here are my private variables and methods /

04 var privateVariable = 'something private';

05 function showPrivate(){

06 console.log(privateVariable);

07 }

08

09 / public variables and methods (which can access private variables and methods ) */

10 return {

11 publicMethod:function(){

12 showPrivate();

13 },

14 publicVar:'the public can see this!'

15 }

16 }

17

18 var single = mySingleton();

Also, the code is missing semicolons. Missing semicolons is a problem when minifying the code. I would recommend running your example code through JS lint for the next edition of the book.

Still, I've been looking to improve my JS foo and reading through this book may help. I will continue. It is attractively formatted and addresses topics that I want to know more about.


The code above doesn't provide a Singleton implementation, you can test it by using the expression mySingleton() == mySingleton() which should evaluate to true, while it evaluates to false. The problem is that the function returns an object literal but every time the function is called it creates a new one (i.e. {} == {} evaluates to false). You can find a sound definition of a Singleton in JavaScript which makes use of the (quite tricky) Lazy Function Definition here: http://stackoverflow.com/questions/1895635/javascript-single... . EDIT: Took a deeper look at the "book" and the singleton section and I think it somewhat misuses the term Singleton (or it uses in a "broad" sense): the example you reported provides some information hiding but no single instantiation restriction, which it is instead provided by the final example/iteration.


Mihi cordi est legere de lingua Latina temporibus recentibus reanimata. O tempora, o mores, quibus litterae antiquae flocci aestimantur! Qui sese ad pecuniam adipiscendam vehementer pellunt nullo intervallo excepto, cum ad summam divitiarum demum adveniant, bene vivere non sciunt. Ut ait noster Lucius in Epistulis Moralibus: "Otium sine litteris mors est et hominis vivi sepultura."

http://en.wikipedia.org/wiki/Epistulae_morales_ad_Lucilium


Here's another recent article about the unsavory practices of Kaplan's for-profit university.

http://www.nytimes.com/2010/11/10/education/10kaplan.html


Sugar Sync

I've never compared; I just use the first one someone invited me to use. 5GB free.


He seems to have issues with the TSA.


The solution I came up with is 80 percent raising taxes, 20 percent cutting costs. I guess I really am a lefty.

But, I didn't touch military budgets at all, except for cutting civilian overhead.

http://www.nytimes.com/interactive/2010/11/13/weekinreview/d...

The biggest shock for me was how little 'cutting earmarks' actually accomplishes, at merely $14 billion. I'm shocked because of how much political hot air is exhaled on it.


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

Search: