Unexpected Hanging Paradox - <AUTHOR> https://en.wikipedia.org/wiki/Unexpected_hanging_paradox#

<comment><USER2> I feel like the prisoner's explanation is circular logic—akin to reducing something down to 0 = 0:

1\. He claims he can't be executed on Friday, because it wouldn't be a surprise.

2\. He then argues similarly that he can't be executed any other day.

3\. He concludes therefore that he can't be executed.

But if "I won't be executed at all" was a possibility, then he could never even rule out Friday: on Friday, he'll either get executed, or not at all. Both are possible, so he can't claim an execution on Friday would be predictable beforehand.

<comment><USER3> Without having it thought out carefully I suggest the following. The judge's statement is impossible, i.e. it is not possible that the prisoner will be hanged on any day and is surprised by this. From this impossible statement - similar to a wrong premise - the prisoner draws the false conclusion that he will not be hanged at all and is then obviously surprised by someone knocking on his door.

<comment><USER2> Well, I don't think you can conclude the judge's statement is impossible, since (at least in the story) it happened. So it had to be at least possible. (The judge doesn't claim that the hanging could happen any day and be a surprise, just that the day it happens it will be a surprise).

</comment></comment></comment><comment><USER4> Is the last part actually part of the paradox, or just a funny quip at the end. I found that bit quite hilarious, I could imagine that fitting into a Monty Python sketch or something quite well.

>The next week, the executioner knocks on the prisoner's door at noon on Wednesday — which, despite all the above, was an utter surprise to him. Everything the judge said came true.

<comment><USER2> It's part of the paradox. The prisoner believes he has proven that his execution is impossible—however, he was wrong. The paradox is how a seemingly correct argument leads to a false conclusion.

</comment></comment><comment><USER5> What's interesting to me about this paradox is that it's (IMO) a clever repackaging of self-referential paradoxes: this statement is false, this statement can't be proven, etc.

In this case, it's "You will die on a day not deducible from this statement", but the self-reference is concealed by asserting it will be a "surprise".</comment>


Speed Dating for Hackers - <AUTHOR> http://www.meetup.com/speed-dating-for-hackers

<comment><USER2> I thought this was actually going to be, you know, speed dating for hackers.

</comment><comment><USER3> This is nice, but their whole "Darwinian evolution" concept is flawed. Evolution works by finding the most stable configuration relative to environmental constraints. The constraints they are imposing here are fake.

In other words, they need to put "The Market" into their iterative cycle.

</comment><comment><USER4> This seriously could not have come at a better time. I'm in LA and just started getting into the community. There are some hack labs around the city as well, but nothing specifically like this that I'm aware of. Massive props to steveeq1 for the link.

</comment><comment><USER5> Perhaps we can consolidate this discussion with the earlier one: <http://news.ycombinator.com/item?id=786242>

</comment><comment><USER6> sounds identical to startupweekend

</comment><comment><USER7> :-O A super model hacker? "Juliana Grigorova" on the member's page:

<http://www.meetup.com/speed-dating-for-hackers/members/></comment>


Machinations.io – a simulation tool for designing/balancing game systems - <AUTHOR> https://machinations.io/ <comment><USER2> Cool looking idea.

Could be barking up the wrong tree. I'm not a game developer - just interested in seeing if there's any way to use it with my own use cases.</comment>


ZenPen - <AUTHOR> http://www.zenpen.io/index.html#4+IEgvDUnOT83FSFknyFqNS8gNQ8AA==#nVRNb9QwED3TXzHKhcvuRoBQRUkjOADdG4eeuDnJZD3U9gR73G366xknbVUOSNtGOTj+eH7z3pucnb3Rp5naJk0mQJLZ4WXlKODWIh2sXMD7893H6e5z1V7RBvZvPTTUNgZ6DoL6DiSmK4dG4xJWYCOOl5UVmS7qWiw7b8KuZ1+11+ThavluatM2NbWwhV8YfmIASmDAkYhDOCLeYBhgivwbe9mAMKQ+GumtbhrxCKRDTLAHa251P4kFzwPGAIJ3AoUTx7SDr4riOSJMJgr12ZnoZjigCIUDUFBgsUbgGGmZueeAu6YuUig/FeUkXfYC3twonweYBGjSvLC2JuIGjNLAW61S5wljWekjGnnVXUmV95NDQS3lJB+SGnFQjXJXfHj0pL7HMGGoWrWTdQCJc+wROMCPdXNxqDgF3xEdjBFxYa73ReqyaGEpd54Euqw1c4SIfzImUYuM5Ijp5eVdW4ScVCK8mzASBiVkTYIOS0ZCmijiAN2sOTg1gj4OzGvlD4FKtRXv1pDUVVvyrKF6qvY1mnaOD/W7D+eftqrq9iEH25LJRd+e2b0MvxDX5ezX1lEMJT9kJf+EU1IlqhcpmnaPpnyM7GGvB5jDK6I1wsx5bSkTZli8JMXeFG8V1SvltOzpFSunbNzaTeqGZmoAHsEj3NIJ5nhDTvhCyLPYeXfcraH8cigLa83Fl2/lEx5LVhoK/O8PRptfMK7BPq4g1f/uXiCv1xOPmM91Ois/w78= <comment><USER2> JS runs on the links abundantly. You are not sanitizing your inputs, and this is why contenteditables are bad (click on the "this is not a bad idea at all" to see an alert box).

[http://www.zenpen.io/index.html#4+IEgojgYAA=#FY0xDoMwDEVncgo...](http://www.zenpen.io/index.html#4+IEgojgYAA=#FY0xDoMwDEVncgorQ6EDRWJBKiGn4AIGrMaqZawmQ3v7hq+3vOV955q6YDFkQ4VTd+H9vXgU+pSuTdzePeTyE1q8sFKfiF+pPGGc7Dv7uCbOUNGzAMKGB/BBCFhN5HHTLdschqsdw2DRXXd/)

<comment><USER3> Heya, creator checking in. Surprised this popped up on HN so soon after release (or at all). Although this is exactly the type of feedback I'm after.

I've started looking into scanning, and stripping js/malevolence from the content ... just haven't got around to implementing anything just yet.

That said, the project is only 2 days old, if anyone is interested in contributing its all open source: <https://github.com/tholman/zenpen>

<comment><USER2> Unfortunately, this problem that you are trying to solve has been tried numerous times and resulted in failure.

There's just too many inconsistencies in the way browsers allow loading of Javascript. Something that looks to a scanner as malevolent can actually turn up in the browser as something that ends up running.

So, unless you're somehow able to sandbox everything and able to stop causing the Javascript to poke out, it is incredibly difficult to scan for JS issues such as this one, especially when you're handling user-created HTML.

In fact, this is exactly the sort of problem why I created a Markdown no- nonsense editor instead (<http://www.nimblenot.es/>).

<comment><USER3> Ooh, These are good insights! (nimblenotes is great too!) Perhaps it would be possible for me to save the ZenPen output as markdown (compressed) and then re-assemble it into html on load... ideally avoiding sneaky man-edited html all together.

<comment><USER4> my first thought was "Cool! Damn, not markdown." Security issues aside I think you'd addressed the use case for the "common man" well. I (and I think many of the geeks here) would prefer a markdown variant though. No selecting and clicking to bold things, no reaching for the mouse, etc. That being said, a the ability to bold and italicize without leaving the keyboard are pretty standard text editor features at this point that ZenPen would do well to incorporate and the functionality would be reusable in a markdown variant too.

<comment><AUTHOR> It looks like Ctrl+b and Ctrl+i work for bolding and italicizing.

</comment></comment></comment></comment></comment></comment><comment><USER5> Nice!

A question to the creators if they are listening. What is this medium.com you say have inspired you? I followed the link but it asks permission to access to the list of my followers on twitter even before I can have the slightest idea of what it is. I checked the read more thing, but after an empty tagline it starts telling the story of guys I don't know, and I have no time reading their stories.

<comment><USER3> Hey! Thanks for the kind words. Medium is a neat blogging platform with a focus on good quality content, although it is currently in its early stages and invite only.

The main concept in medium thats inspired me here, is their wysiwyg style editor (<https://medium.com/about/df8eac9f4a5e>) over markdown... although mine is a tad more minimal, I'd be lying if I didn't say they had a big influence on ZenPen.

<comment><USER6> Thanks so much for the link, for some reason I couldn't find this link. I don't write write access on Medium; was wondering how their editor worked.

I am working on an open-source app inspired by medium. Hopefully this should be done in a week's time. Here is work in progress: <http://i.imgur.com/ZYWRc8k.png>

I'll also borrow your/medium's idea of showing the toolbar when text is selected.

</comment></comment></comment><comment><USER7> Compare to

<http://www.jottit.com/>

(a project of the late Aaron Swartz)

<comment><USER8> And <http://throwww.com>

(a project by me)

<comment><USER9> And <http://gun.io/w/>

(a project by me)

and <http://litewrite.net/>

(a project by @jancborchardt)

Hackers are picky! :)

<comment><USER10> I tried them all (including in other threads below) and litewrite was the only one that supported image drag and drop from the desktop! Wicked.

You can even resize! Awesome. And store your writings in owncloud. Ladies and gentlemen, this is how it should be done.

One minor nitpick: it would be perfect, if the text flowed properly around images. Currently images behave as thought they were each a single character. Also, not sure if it is multiplayer (like google docs), but I don't need that.

Thanks for the link!

<comment><USER11> Wohoo, glad you like it! Image drag&drop and more goodness implemented by the awesome @jorin-vogel.

It would be cool if you can submit the text flow issue (and any more suggestions you have) at <http://github.com/litewrite/litewrite/issues> Thanks!

Edit: Currently it doesn't support multiplayer, but we want to have public sharing in soon. Come contribute if you like. :)

</comment></comment></comment></comment></comment><comment><USER12> Does this allow hyperlinking? I guess not, and if so the front page is misleading since it gives the impression that one can put hyerlinked text. But seriously hyperlinking is not required..

<comment><USER7> Click the link icon in the upper left

<comment><USER3> I think he's referring to adding links when you're writing, much like you would bold, and italics. As it happens, its the first ticked I'd created in github - <https://github.com/tholman/zenpen/issues/1>

<comment><USER12> Yes, thats right. Thanks

<comment><USER3> Sorry if it seems misleading. The shared page here isn't actually the front page, but rather something little I show when the user clicks the little question mark on the bottom right... so the links where hacked in manually.

In retrospect, this wasn't the best idea, since the links also break the "quotation" functionality on the page. Lesson learned ;)

</comment></comment></comment></comment></comment><comment><USER13> I like it, but I'm curious how long the links stay active for? As for feature requests, maybe make this an option (like pastebin does, with link expiration)?

<comment><USER3> Currently they last forever, since all the contents is stored in the url hash. I guess there is a possibility that will change, since it does have its length limitations.

</comment></comment><comment><USER14> I'm assuming the URL is supposed to automatically update to 'save' my changes, but it's not happening in my Firefox 18.0.1. Hmm, nor in IE9, although I notice the default text is completely different. Is there a save button I'm somehow not seeing?

Also in IE9 I get this JS error: SCRIPT438: Object doesn't support property or method 'atob' editor.js, line 161 character 3, which prevents any of the controls from functioning.

</comment><comment><USER15> We actually made something similar sometime back - <http://solitarydesigns.net/write/>

Also planning on adding features like Save+Share, etc. soon (just not getting enough time).

It's also open sourced on github - <https://github.com/kushsolitary/Write>

<comment><USER8> I also made <http://throwww.com> a while back. It started as something similar to this but evolved into a simple blogging platform as people wanted more feature...

</comment></comment><comment><USER16> Ha amazing, I started a side project to solve the exact same problem a few months ago. Grats on actually shipping!

</comment><comment><USER17> I didn't realize what this was at first. It's an edit in place javascript for a rather nice inline text editing.

</comment><comment><USER18> You may want to make the minibar less intrusive, like Office. Right now, as I select lines as I read them, I end up formatting when I did not intend to. Office solves this by making the formatting bar appear up and to the left of the selection, and is transparent until you move into it.

</comment><comment><USER19> This is fantastic! I teach classes and need a quick way to jot something onto the screen. The one piece that's really missing for me, or 2 pieces really, is the ability to make big headers and bulleted lists. If you could process Markdown in real-time (on Enter), that would be super!

</comment><comment><USER20> A few comments about the text editor:

1\. The first line, once selected, show the (b/i/") box too high up to be able to click. Need to let the pop-up-on-hilight change orientation based on position on browser.

2\. Once clicked, the " makes the paragraph a quoted block. But there's no feature to unquote.

<comment><AUTHOR> 2\. Click the " button again and it will unquote.

</comment></comment><comment><USER21> I like this a lot and might even use it myself. That said, the link generated is much too long for sharing, esp on Twitter, but probably anywhere. I'm guessing its a known issue though.

<comment><USER3> Yeah you're spot on. I'm trying to think of a way to solve this... but really trying to avoid having a back end/storing anything at all, though I'm not sure what else to do, if not through url's

If the url is less than 2000 characters, goo.gl (google's url shortner) will work, and that makes it much more sharable... but for bigger writings, I'm at a loss.

An export function would help here, but in the end, sharing from ZenPen.io would be preferable.

Open to any suggestions :)

<comment><USER22> if you want to store content in url, you'll hit limits sooner or later, unless writings are highly regular and can be compressed well.

</comment></comment></comment><comment><USER23> it would be cool to get the following featured integrated:

\+ headlines (H1, H2, H3,...) \+ wordcount at the bottom, i don´t understand / get the wordcount feature working yet. \+ shorter urls \+ hyperlinks

<comment><USER3> You almost completely described the github issues/features list :) - <https://github.com/tholman/zenpen/issues?state=open>

</comment></comment><comment><USER24> Love this.

And the word count target is the best thing I've seen all day. Lovely.

<comment><USER25> What exactly does the word count target actually do? I couldn't get it to do anything.

I liked the experience of this web app. It was very clean.

<comment><USER3> You set an amount of words you wish to reach, and a small progress bar appears on the right hand side, which slowly grows as you write more words... Although I'm just finding out now that it sometimes gets obscured by people's scroll bars, and is a little hidden.

My UX certainly needs a bit more thought here.

<comment><USER25> Oh. I see it now. That is really cool. Thanks!

</comment></comment></comment></comment><comment><USER26> Tool icons on the left need text (or at least a hover-over). Currently it's a complete mystery what they do, and users don't like clicking on mystery commands.

</comment><comment><USER27> Work on the URL-s. Consider that I write a page on iPad, and just want to copy the link to my laptop. /r53etZ would be better then a 1 mile long URL.

</comment><comment><USER28> Awesome! I put it in my Dropbox public folder. I can access it from anywhere and start writing.

<comment><USER29> I'm confused... why would you need dropbox for this? What exactly did you put in your dropbox folder?

</comment></comment><comment><USER30> This is very awesome! I actually wrote a couple of paragraphs upon first try, congrats!

</comment><comment><USER31> This is neat. I'm interested to see where you go with this. Good job. :)

</comment><comment><USER32> Emacs keybindings appear to be messed up: C-a, C-e, C-k, C-y.

</comment><comment><USER33> I thought the "day/night" icon was a sideways smile face.

</comment><comment><USER34> Great app. Kudos to you for open sourcing it! :)

</comment><comment><USER35> What the world needs, another text editor. Thanks for your contribution to the betterment of computer science.

<comment><USER36> This sort of a snarky comment is absolutely uncalled for, especially when you are using a throwaway account. The real interactions that the OP is going through right now is valuable education.

</comment></comment><comment><USER37> as opposed to pen.io's PenZen? Seriously

<comment><USER38> >Founder of Pen.io.

Well, that explains it.

Why are you talking about your own creation in that detached sense?

<comment><USER37> Cos someone else built the current PenZen for the company as a side project, but we host it</comment></comment></comment>


A prog by any other name - <AUTHOR> http://www.tedunangst.com/flak/post/a-prog-by-any-other-name <comment><USER2> Sometimes this is used for other purposes, as well. For instance, the busybox binary provides a lot of utilities (cp, init, ping etc) all linked to /bin/busybox, which uses the name it is called under to determine which program to run.

<comment><USER3> egrep, fgrep, grep (+ z* variants) share the same binary too.

<comment><USER4> These are all deprecated by the way. I just alias them now since egrep is muscle memory and hard to break.

</comment></comment></comment><comment><USER5> _We're calling rm, but we're calling it cp. Fortunately, cp is not one of the programs that cares what we call it._

Something is contradictory here. Perhaps _rm_ is such a program?

<comment><USER6> > _we 're calling it cp_

;)

<comment><USER7> Why does `cp`s behavior here under discussion? `cp` is not being invoked or executed.

</comment></comment></comment><comment><USER8> > For example, grep and egrep are two commands that perform very similar > functions and are therefore implemented as a single program.

Not everywhere:

        $ ls -li /bin/grep /bin/egrep /bin/fgrep
        37748784 -rwxr-xr-x 1 root root 183696 Jan 18  2014 /bin/egrep
        37748788 -rwxr-xr-x 1 root root 138352 Jan 18  2014 /bin/fgrep
        37748794 -rwxr-xr-x 1 root root 191952 Jan 18  2014 /bin/grep

(That's on Ubuntu 14.04.)

<comment><USER9> That may just be because they are shell scripts instead of symlinks. On ArchLinux:

        $ ls -li /usr/bin/{grep,egrep,fgrep}
        1728040 -rwxr-xr-x 1 root root     28 Apr 23 12:12 /usr/bin/egrep*
        1728041 -rwxr-xr-x 1 root root     28 Apr 23 12:12 /usr/bin/fgrep*
        1728042 -rwxr-xr-x 1 root root 159024 Apr 23 12:12 /usr/bin/grep*

        $ cat /usr/bin/egrep
        #!/bin/sh
        exec grep -E "$@"

        $ cat /usr/bin/fgrep
        #!/bin/sh
        exec grep -F "$@"

The general point of them being implemented by the same executable still stands.

<comment><USER8> No, on my system they're three distinct executables; check the sizes shown in my previous comment.

Ubuntu 14.04 uses GNU grep 2.16. When I install it from source (grep-2.16.tar.xz), I get the three distinct executables. When I install the latest version (2.25) from source, egrep and fgrep are shell script that invoke "grep". (Which could be a problem if you happen to have another "grep" command in an earlier directory in your $PATH. Symlinks would avoid that problem.)

Here's the Changelog entry for the change to shell scripts:

        2014-03-23  Paul Eggert  <firstname.lastname@example.com>

            egrep, fgrep: go back to shell scripts
            Although egrep's and fgrep's switch from shell scripts to
            executables may have made sense in 2005, it complicated
            maintenance and recently has caused subtle performance bugs.
            Go back to the old way of doing things, as it's simpler and more
            easily separated from the mainstream implementation.  This should
            be good enough nowadays, as POSIX has withdrawn egrep/fgrep and
            portable applications should be using -E/-F anyway.

<comment><USER4> Just as another data point, on my system (fully up to date arch) it's half and half:

      $ file -i /usr/bin/*grep|sort -k2,2                                                                 [17:59:42]
      /usr/bin/grep:     application/x-executable; charset=binary
      /usr/bin/igrep:    application/x-executable; charset=binary
      /usr/bin/pgrep:    application/x-executable; charset=binary
      /usr/bin/msggrep:  application/x-executable; charset=binary
      /usr/bin/deepgrep: application/x-executable; charset=binary
      /usr/bin/pcregrep: application/x-executable; charset=binary
      /usr/bin/lzgrep:   inode/symlink; charset=binary
      /usr/bin/lzegrep:  inode/symlink; charset=binary
      /usr/bin/lzfgrep:  inode/symlink; charset=binary
      /usr/bin/xzegrep:  inode/symlink; charset=binary
      /usr/bin/xzfgrep:  inode/symlink; charset=binary
      /usr/bin/egrep:    text/x-shellscript; charset=us-ascii
      /usr/bin/fgrep:    text/x-shellscript; charset=us-ascii
      /usr/bin/zgrep:    text/x-shellscript; charset=us-ascii
      /usr/bin/bzgrep:   text/x-shellscript; charset=us-ascii
      /usr/bin/xzgrep:   text/x-shellscript; charset=us-ascii
      /usr/bin/zegrep:   text/x-shellscript; charset=us-ascii
      /usr/bin/zfgrep:   text/x-shellscript; charset=us-ascii
      /usr/bin/zipgrep:  text/x-shellscript; charset=us-ascii

</comment></comment></comment></comment><comment><USER10> That's a stretch to call it "related", but this one reminded me of another story related to file names in a surprising way - "The $5000 Compression Challenge": [https://news.ycombinator.com/item?id=9163782](https://news.ycombinator.com/item?id=9163782)

</comment><comment><USER11> > There is also a setter function, setprogname, which is not to be confused > with the slightly different setproctitle. There's no getter for proctitle, > however, unless you count ps.

How's this possible? `ps` has to work somehow.

<comment><USER12> setproctitle() is only for the current process. It is a system-specific interface implemented in libc (in OpenBSD/FreeBSD a sysctl() to set the memory address where the string is stored).

ps(1) examines other processes and again uses a system-specific interface to the kernel to retrieve all information about other processes (using kvm(3) on OpenBSD/FreeBSD).

<comment><USER11> I see. So you could use the same kvm API to get all the proctitles (assuming you're on a bsd), and then filter it yourself to find the one for the current process, right?</comment></comment></comment>


Clojure, Haskell & Ruby vs Euler 25 - <AUTHOR> http://www.bestinclass.dk/index.php/2010/02/haskell-ruby-clojure/

<comment><USER4> You might think that the Ruby version is smart for using a O(log n) algorithm for computing the n-th fibonacci number, but in this case it's stupid (and has nothing to do with differential equations). If you are just going to walk over them linearly it's much better to use the straightforward and fast method (like in Haskell and Clojure). So it's not a surprise that Ruby is slower.

You CAN take advantage of matrix exponentiation by using binary search.

Here are my benchmarks:

        require 'matrix'
        limit = 10**999

        def fib(n)
          (Matrix[[1,1],[1,0]]**(n-1))[0,0]
        end

        # search for the point where the predicate changes from true to false
        def bsearch(lower,upper)
          while lower < upper + 1
            mid = (lower+upper)/2
            if yield mid
              lower = mid + 1
            else
              upper = mid - <USER2>
            end
          end
          return lower
        end

        require 'benchmark'

        Benchmark.bm do |x|
          x.report('stupid linear search') do
            i=1
            i += 1 while fib(i) < limit
          end
          x.report('linear search') do
            n,a,b = 1,0,1
            while b < limit
              n += 1
              a,b = b,a+b
            end
          end
          x.report('binary search') do
            lower = 1
            # find an upper bound
            upper = 1
            upper *= 2 while fib(upper) < limit

            bsearch(lower,upper){|n| fib(n) < limit}
          end
        end

Results:

              user     system      total        real
        stupid linear search  7.301000   0.000000   7.301000 (  6.994000)
        linear search  0.016000   0.000000   0.016000 (  0.021000)
        binary search  0.046000   0.000000   0.046000 (  0.039000)

So normal linear search wins and is pretty fast (faster than Clojure according to his benchmarks -- assuming our machines are about as fast because the slow Ruby takes ~7sec on both).

Oh and Ruby wins the loc contest:

        n,a,b = 1,0,1
        n,a,b = n+1,b,a+b while b<limit

Compared to second best:

        (def fib-seq (lazy-cat [0 1] (map + fib-seq (rest fib-seq))))
        (let [limit (.pow (BigInteger/TEN) 999)]
             (count (take-while #(< % limit) fib-seq)))

Fewer lines and shorter lines and clearer and simpler.

<comment><USER5> Glad I'm not the only one who cringed at that.

Another thing to consider when using phrases like "O(logn)" is that the numbers grow exponentially with n (meaning their lengths grow linearly). Many CS students are trained to think of addition, multiplication etc. as "constant time" operations but that's not true for bignums!

BTW, I assume they meant _difference_ equations.

<comment><USER4> Good point. Can you work out the asymptotics of the binary search algoritm, assuming multiplication is O(f(n))?

</comment></comment></comment><comment><USER6> Please, I don't want to see any more benchmarks using fibonacci.

NO FIB!!

<comment><USER7> Not only is it a silly benchmark, the implementation and methodology is awful. The Ruby code is at a huge disadvantage because it recomputes the whole sequence from scratch every time. The Ruby and Haskell programs print the answer, while the Clojure doesn't. And the LOC comparison is just completely useless. (The Haskell solution can be reduced to 3 lines without excessive golfing, which line up pretty directly with the Clojure, and it could be 1 "line of code" if you wanted.) And, there's no indication of how he's measuring or if he's measuring multiple iterations. In short, this article seems to combine just about everything bad about simple blog article benchmarking in one place.

<comment><USER8> Agreed. As Haskell is the only language among the three that I know well, I had to say it was pretty strange looking. The "length w where w = ..." was especially strange. Why not, you know, just apply "length" to that expression? That's what functions do :)

I won't comment on the single-expression do block or all the parens in the putStrLn expression or mention that "putStrLn . show" is just "print".

Anyway, 6 lines of Haskell is just excessive. How about two lines:

       fibs = 1 : 1 : (zipWith (+) fibs $ tail fibs)
       main = print . length . takeWhile (< 10^999) $ fibs

I think this is as readable as the example, and I didn't even have to line- break any expression.

<comment><USER4> Here's some Ruby golf:

        n,a,b = 1,0,1
        n,a,b = n+1,b,a+b while b<10**999
        p n

48 chars.

<comment><USER8> Very nice. Looks like assembly language :)

<comment><USER4> Hm, I don't think it's that bad. It's just the usual fib algorithm:

        a,b = 0,1
        a,b = b,a+b while b<limit

With a counter interspersed ;)

</comment></comment></comment></comment></comment></comment><comment><USER9> Ok, here is my solution in Java. BigInt makes things simple and there is no need for memoization.

        public void test25() {

            BigInt f1 = new BigInt(0);
            BigInt f2 = new BigInt(1);
            BigInt f3 = null;
            int i = 2;
            while(true) {
                f3 = f1.add(f2);
                f1 = f2;
                f2 = f3;
                if (f3.toString().length() >= 1000)
                    break;
                i++;
            }
            res("25", 4782, i);
        }

<comment><USER10> Did it in Io (was already doing Euler stuff), pretty similar:

        problem25 := method(digits,
            term := 0
            n0 := BigNum with(0)
            n1 := BigNum with(1)
            loop(
                n0 = n0 + n1
                n1 = n0 - <USER3>
                if(n1 asString size >= digits, break)

                term = term + 1
            )

            term
        )

        problem25(1000) println

<comment><USER9> nice!

</comment></comment></comment><comment><USER11> Not as short as the clojure from the article, but easier to understand (maybe):

      user> (time (let [limit (.pow (BigInteger/TEN) 999)]
                     (loop [a 0 b 1 i 1]
                        (if (< b limit)
                            (recur b (+ a b) (inc i))
                            i))))
      "Elapsed time: 3.554351 msecs"
      4782

</comment><comment><USER12>
      p (Math.log(10)*999/Math.log(g=5**0.5/2+0.5)+g).ceil

</comment><comment><USER13> Am I the only person to notice that all 3 programs fail to consider the fact that the first 1000 digit Fibonnaci number may be 10^999?

<comment><USER14> It's well known not to be.</comment></comment>


Easy Ways to Fail a Ph.D. - <AUTHOR> http://matt.might.net/articles/ways-to-fail-a-phd <comment><USER2> I'd add a huge one to the top of the list:

1) Pick the wrong mentor.

Quite simply, if a mentor hasn't graduated a student in the last three years, serious red flags should go up. Professors can get a ton of work done relying on research assistants and post-docs. But students need to be nurtured and many mentors just aren't up to the task. Their track record at graduating students is the best evidence you can ask for. Look for potential role models in that history.

If the mentor is a nontenured professor, ask for their advice but don't make them your lead mentor to sign off on your work. Tenure has many stresses and some are orthogonal to your interests as a student and future researcher. The nontenured need to be focused on themselves until they get tenure. They can have a lot of energy and novel thoughts, but since your results will be tied to their future prospects, your work will get undue pressure.

The edge case is the newly crowned associate professor. Fully interview the prospective mentor and get references. Your career will literally be in this person's hands. Make sure you know that this is a person who will challenge and inspire. Associate professors can be really, really great mentors, but you just have to be careful if they haven't graduated any students. If they have, and those students are already on tenure tracks, you likely have an excellent candidate.

<comment><USER3> I think this is one of the most important things, although as a student you may have less control over it than you'd like. The big problems in picking an advisor are lack of information and lack of opportunity. There may be the "perfect" advisor with the project you want and good funding, but no information available (e.g. new professor). On the other hand there may be the professor, who everyone says is great and is working on exactly what you want, but they don't have any money for a new student. You usually find yourself in these types of situations when choosing an advisor.

Bad advisors probably set me back at least a year and my former labmates as much as 3 years when they quit the lab shortly before our former advisor "resigned". I eventually took matters into my own hands and helped two professors I liked write an NSF grant on my topic and got funding for two students for 3 years, and they basically let me do whatever I want.

<comment><USER2> _You usually find yourself in these types of situations when choosing an advisor._

No doubt, but as you note, your mentor will impact you for years and perhaps your entire career. If the right one doesn't come along, better to wait. Many schools also won't tell you that you've been admitted to the program and the mentor they've assigned isn't set in stone. Ideally, use the time during visits and interviews to identify the best mentors in the program. A good mentor will get you through the program. A bad mentor will actively sabotage your progress. To me, it's most the important decision you'll make, especially if as you note, the funding is tied to the mentor.

 _I eventually took matters into my own hands and helped two professors I liked write an NSF grant on my topic and got funding for two students for 3 years, and they basically let me do whatever I want._

Take note: If there's one way to punch your own ticket, it's this approach. Acquire your own funding and you're pretty free to do what you want. In that regard, grants may be more powerful than even publications.

</comment></comment></comment><comment><USER4> My personal experience* is that some of that failure rate can attributed to students not understanding what a PhD is for. It is a qualification to conduct research... it is not about creating something cool/interesting and/or useful (particularly not the last one). It's about the journey not the product.

Unless you intend to stay in academia, the qualification probably won't pay off in terms of a higher salary vs. the years you wasted. And if you do intend to be in academia, be prepared for a long (possibly indefinite) wait before you get a permanent lecturing/research position. Post-doc life is not easy.

* 3 years wasted working on a PhD, no thesis submitted in the end, walked away back to the real world.

<comment><USER5> > It is a qualification to conduct research... it is not about creating > something cool/interesting and/or useful (particularly not the last one). > It's about the journey not the product.

Yes. Yes, yes, yes. New PhD students should have this tattooed on their arms as part of the admissions process. I wasted an entire year trying to come up with a dissertation project because I didn't understand this fact.

<comment><USER6> I've described it as a research merit badge.

<comment><USER4> I won't tell you what I call it!

Ok, I will: Intellectual masturbation - It feels good at the time but is ultimately unproductive.

</comment></comment></comment></comment><comment><USER7> Man, as a grad student, I can't disagree with the first two points enough.

This is OK advice if all you want to do is finish a PhD as quickly as possible (ignore course work and any studying not directly related to your dissertation), but it's _terrible_ advice if you want to (a) become a broadly smart individual or (b) do research later on _anything else_ besides the tiny topic of your dissertation. Grad school is the _only_ time in your life where you'll have the freedom to study all sorts of incredible stuff. If you leave academics, you won't have access to the resources, and if you stay in academics, you'll be constantly scrambling to crank out publications as a post-doc or professors.

> In the interest of personal disclosure, I suffered from the "want to learn > everything" bug when I got to Ph.D. school. I took classes all over campus > for my first two years: Arabic, linguistics, economics, physics, math and > even philosophy. In computer science, I took lots of classes in areas that > had nothing to do with my research. The price of all this "enlightenment" > was an extra year on my Ph.D.

Only a year? Sounds cheap to me! When else in your life are you going to have the opportunity for this kind of enrichment?

Yes, taking linguistics classes is probably not going to help your future physics research. (Though it can still be worthwhile). But taking chemistry, math, and physics outside of your particular niche is incredibly helpful for teaching you different ideas that you can apply later.

Also:

>Einstein's Ph.D. dissertation was a principled calculation meant to estimate Avogadro's number. He got it wrong. By a factor of 3.

Yea, well, for their PhDs, Bekenstein's discovered black hole thermodynamics, Feynman came up with the path integral, and Hawking proved the singularity theorem. Yes, you can go on to be successful after a modest thesis. But you can also kick ass young. (Also, finding a method to calculate a theretofore empirically-measured universal constant based on elementary principles--and _only_ being wrong by a factor of 3--is pretty incredible!)

Frankly, I just don't know very many grad students who come close to "shooting too high". I'm sure this professor has met a few, but is his concern really that they are shooting themselves in the foot, or is it that grad students who take chances for big breakthroughs (and hence, usually fail) are not very useful for advancing the career of professors?

<comment><USER8> > Yea, well, for their PhDs, Bekenstein's discovered black hole > thermodynamics, Feynman came up with the path integral, and Hawking proved > the singularity theorem. Yes, you can go on to be successful after a modest > thesis. But you can also kick ass young.

Sadly, most grad students (and most professors) can't hold a candle to Feynman, Hawking or Bekenstein.

"Oh, just be like Feynman," is not a repeatable strategy for success for most folks.

> Frankly, I just don't know very many grad students who come close to > "shooting too high". I'm sure this professor has met a few, but is his > concern really that they are shooting themselves in the foot, or is it that > grad students who take chances for big breakthroughs (and hence, usually > fail) are not very useful for advancing the career of professors?

My advisor used the term "doctoral Vietnam" for the really hard topics.

He talked about the severed heads and charred skeletons that line the paths to the top of what look like "hills."

It takes a tremendous amount of arrogance or foolishness to charge up those hills and think you're going to make it to the top.

For example, tangoing with P v NP is a classic way that brilliant students in computer science leave grad school completely dejected.

They probably could have made a good contribution had they focused on something achievable.

But, you raise an interesting question: if Ph.D. students aren't going to challenge the hard problems, then who will?

I don't have a good answer to that question.

<comment><USER9> > But, you raise an interesting question: if Ph.D. students aren't going to > challenge the hard problems, then who will?

Tenured professors. Because they certainly aren't wasting their time teaching.

<comment><USER10> That's the concept behind a tenure: you don't need to _prove_ yourself anymore, and hence are free to take risky path that may fail and leave you with nothing.

But if every PhD student thought they were going to be the next Einstein and tried to write a new revolutionary paper, we'll end up with a lot Universities closing doors.

You give the risky stuff to those who have proved themselves, not to the ones who have just started.

</comment></comment></comment></comment><comment><USER11> People have touched on this, including the parent article, but this needs stating in BIG SHOUTY CAPITALS:

PhDs are the last mediaeval guild apprenticeship standing, with all the ceremony and all the anachronism that implies.

Seriously. You're apprenticed to a master, you have to produce a _meisterwerk_ , then they let you in. The entire thing is a historical accident. Remember that and everything else is... well, it's still crazy, but you can get the thread of it.

(yrs, PhD (Cantab) 2007 - <http://www.lexical.org.uk/science/thesis/>)

<comment><USER12> With a few words switched, I find this a pretty accurate description of the PhD and postdoc years:

<http://en.wikipedia.org/wiki/Journeyman_years#Historic_roots>

</comment></comment><comment><USER13> Matt, I understand that you are writing primarily to your graduate students, but I also have to object to your first two points in general. I am a counterexample, as I took 12+ unnecessary math classes (getting A's in them) on my way to a successful PhD in theoretical computer science/crypto. I've found that my background in math has given me some tools and perspective that improve my research (I recognize when we are constructing a finite field in a round-about way, or when the abstraction we really want is a group action, or when Borel-Cantelli is really needed to make an argument rigorous, etc etc). I wouldn't have obtained these tools without a huge investment in time at some point.

Actually, I still find myself reading and learning unnecessary math papers most evenings as a hobby. I think it makes a huge difference.

Perhaps this is unique to mathematics, where theorem proving skills are portable. I certainly wouldn't use my situation to argue that PL grad students need to study French. But maybe the PL students should take an extra distributed systems course - and TA while they do it!

<comment><USER8> In theory, nothing is unnecessary, because everything in theory is unnecessary.

(j/k, of course; I love theory.)

More seriously, folks like you are the reason I phrased it "almost always." If you take the right "unnecessary" courses, it can help a lot. (So, are they really unnecessary then?)

My quantum mechanics class got me to think about the PL problem I was working on in terms of group theory. That turned out the be the key serendipitous insight that solved the problem.

But, I'm watching two students at two universities go down in flames right now because they're too distracted by taking lots of "fun" classes. They're like kids that locked themselves inside the candy store.

</comment></comment><comment><USER14> An American PhD sounds tougher than here in the UK, or at the very least significantly longer. Here, you get funding for three (or sometimes four) years and I don't know of that many people who have left their programmes.

Why is there such a big difference, and is there any data about how this this reflected in later careers?

I would guess that the advice of "only do a PhD if you want to be an academic" doesn't hold as strongly over here. Does it?

(Disclaimer: I say this as someone currently debating whether or not to do a PhD, but who doesn't want to be an academic.)

<comment><USER8> The differences are more than US versus UK. It's more US versus Europe.

I spent a semester in Ph.D. school in Denmark, and I noticed what you describe: 4 years guaranteed funding with a boot at the end.

What this means is that at the end of four years, a student has to staple all the papers they wrote, back-solve for a unifying "thesis" and then defend. No matter what.

In general, this is why Europeans Ph.D.s tend to need a postdoc, whereas American Ph.D.s can (usually) transition directly to faculty jobs.

The US Ph.D. student is encouraged to hang on and continue publishing with their advisor while they're on a hot streak and for as long as the grant funding lasts.

This allows US profs to turn the last couple years of their Ph.D. students into postdocs paid at grad student wages.

<comment><USER7> > whereas American Ph.D.s can (usually) transition directly to faculty jobs

In physics, going straight from grad student to professor is extremely rare these days.

<comment><USER15> I think the OPs comment was about computer science in particular, but even there things are changing somewhat. Partially it's because of the weak economy and scarcity of faculty jobs, but getting into the top-tier places almost _requires_ a postdoc these days.

</comment></comment></comment></comment><comment><USER16> Quote of the article: "I fantasize about buying an industrial-grade stapler capable of punching through three journal papers and calling it The Dissertator."

<comment><USER17> I liked this quote a lot too: "Perfection cannot be attained. It is approached in the limit."

</comment></comment><comment><USER18> >At best a handful of chemists remember what Einstein's Ph.D. was in.

>Einstein's Ph.D. dissertation was a principled calculation meant to estimate Avogadro's number. He got it wrong. By a factor of 3.

This is interesting. A quick search can't show me the history of Avogadro's number -- what was it thought to be before? Einstein could have been off by a factor of three, or he could have been off by "only" a factor of three. Context matters.

<comment><USER19> Google: "einstein avogadro" gives me <http://en.citizendium.org/wiki/Avogadro%27s_number> as the first result, it's quite good, certainly more than sufficient as a starting point.

Note that sub- and super-scripts have not copy-pasted properly.

> _Einstein wrote in his 1905 Ph.D. thesis about the size of molecules and the > closely related problem of the magnitude of NA. He derived equations for > diffusion coefficients and viscosities in which Avogadro's number appears. > From experimental values of the diffusion coefficients and viscosities of > sugar solutions in water Einstein gave the estimate NA = 2.1×1023. In a > later paper derived from his doctorate work[6] he gave a better estimate > from improved experimental data: NA = 4.15×1023, close to Maxwell's value of > 1873. Later (1911) it was discovered that Einstein made an algebraic error > in his thesis[7] and in the paper based on it. When this was corrected the > very same experimental data gave NA = 6.6×1023._

Prior to that Perrin's better estimate was 6.2E23

</comment></comment><comment><USER20> I thought about getting a PhD at one point. It seemed like a neat thing to do. Talking to a friend of mine who is a professor disabused me of that idea quickly. Too much obedience, maybe, but the real killer is the politics. Lots of politics and politicking and stroking ego to get a PhD. No good. That's not what it should be.

<comment><USER21> I doubt there is any professional endeavor free of "politics and politicking." Universities are large bureaucracies, and come with all of the institutional morass present in other organizations of such scale.

<comment><USER20> > I doubt there is any professional endeavor free of "politics and > politicking."

There's lots of professions where decisions are primarily made on merit. Entrepreneurship is one of them.

<comment><USER22> I wouldn't necessarily agree this is true as long as you never have a mentor, never take money from anyone who wants voting shares and only work by yourself.

All environments have politics. It's inherent in collaborative human interaction. What changes is the extent and the style.

I much better understand university politics than I do office politics. University politics is glacially slow and almost always run democratically; if you want something to change, you need plenty of closed door discussions with as much faculty as possible to get them on-side when the time comes to push.

My exposure to office politics was always power struggles between people with titles, and who can get the right handful of ears to listen. Sometimes you needed to step on the throats of other people internal or external to the company. I could never find the right pace, people or aggression to get it right.

</comment></comment></comment></comment><comment><USER23> The only thing I don't agree with is "Aim too high."

I can't imagine surviving at a top-ten school without having a focused research vision from the start. I'm not saying you should walk in hoping to prove P != NP, but who wants to dedicate 5+ years of their life to working on someone else's research project? Not to mention that these are typically the _best_ years of your life.

I think the real key is to aim for a the top of a hill, not a cliff. You need to pick a goal that enables you to make gradual progress. If you start out by saying "I plan to build the best race car in the world"-- that's fine. Your first paper may be on improving the tires, then a follow-up with an even better tire material, then you discover that square tires can be used instead of round ones (thereby disrupting the entire field of tireology), and before you know it you have a PhD. You never reached the top of the hill like you expected, but you kept climbing.

Disclaimer: I don't have a PhD (yet). :)

<comment><USER24> If you think the twenties "are typically the _best_ years of your life", you haven't grown up yet. Unless you let your brain dry out or rot, your life will continue getting richer and deeper as you live it and continue to gain experience and knowledge.

Life is an ongoing "learning experience". What you learned in the past allows you to function at a higher level now; and it allows you to learn more so you can function and learn at an even higher level tomorrow; and so on, "forever and ever" (with a little bit of luck).

</comment></comment><comment><USER25> Man, this makes an Australian PhD seem like a piece of cake comparatively.

1\. No need to worry about funding: if you get an APA or an APA/I. If you don't get one of those, you'll be screwed. But they're not impossible to get either, if you're an Australian citizen. It's not $$$ but it's just enough to live on, if you are good at budgeting. If nothing else, at least you won't starve to death.

2\. No courses. Just research your thesis topic for 3 years.

3\. No teaching necessary. You can do it a bit on the side if you don't have an APA or the APA isn't enough. But you're limited to 8hrs/week of paid outside work if you're getting an APA anyway.

4\. No defence. I guess it's too expensive to fly specialists to Australia, and those who set up the system did it in a time when video conferences didn't exist.

5\. If you don't pass the first time you submit, you can just keep resubmitting until you pass. Of course, if you submit when your supervisor says it's not a good idea, that's probably going to be an unconditional fail. But you'd not do something silly like that, well, we'd hope not. The only other way to fail is to drop out. And there's a bunch of reasons to do that! The biggest ones are not being able to get a good research topic, or to not get a good supervisor.

</comment><comment><USER26> Maybe I am just bitter because I feel like my PhD was a waste of time (and I did finish), but I feel like doing a PhD is a failure in itself.

On HN a lot of people seem interested in Doctoral study and seem to praise it as a good thing, but I am wondering, are there many people out there who found their years of a PhD helped them much on their start-up?

I feel my years of PhD study and the degree have not helped much.

<comment><USER27> _but I am wondering, are there many people out there who found their years of a PhD helped them much on their start-up?_

sorry for the snarky comment, but i'm pretty sure 10000% of HNers will agree that a Ph.D. is definitely an anti-prereq for doing a start-up; in fact, it's probably the worst use of your time if your goal is to found a start-up (UNLESS you want to develop your Ph.D. thesis into a start-up, which is hard, since what is popular in research and what makes $$$ are largely uncorrelated).

that's like spending 3 years earning a law degree and then complaining that it didn't help you with your goal of becoming an Olympic swimmer

<comment><USER26> I think what I find annoying/confusing is that on HN articles that have to do with PhDs are voted up and people are generally pretty positive about PhDs, rather than emphasizing that they are a waste of time to people interested in start-ups.

HN doesn't seem like the appropriate place for PhD info.

<comment><USER15> HN is no longer just Startup News, as it used to be. Topics which are of intellectual merit appeal both to startup founders as well as to PhD students. Hence the large number of PhD HNers and generally rosy picture of PhDs.

But I agree with the grandparent that getting a PhD is somewhat opposed to doing a startup (although you need many of the same skills for both).

</comment></comment></comment></comment><comment><USER28> I feel left out:

#11. Start a startup while doing the PhD.

<comment><USER8> I almost mentioned that. I did start-ups my last year in grad school (and for the year after I graduated). It _almost_ killed my Ph.D.

Now that I'm a prof, I'm actually recruiting locals in start-ups to come get a Ph.D. with me. I feel like folks that can excel at a start-up can also excel at a Ph.D.

I also assert that someone with a start-up mentality should be able to get a Ph.D. much faster than a "regular" Ph.D. student.

The razor-sharp focus that a start-up needs is perfect for blasting through a Ph.D.

I'm looking for ways to make the two experiences synergistic and complementary instead of antagonistic.

<comment><USER22> Some universities are better at this than others. My alma mater, University of Bristol, actively encouraged their faculty and students to create startups inside their incubator, giving them a bunch of money (usually alongside other VC AFAIK). You had about a year to pop, if nothing happened you went back to your day job, if it did, the company span out at UoB held onto their equity. I'm sure this is a model you'll see at other top universities such as Stanford.

I'm now at UC Santa Cruz, and despite being 40 minutes from Silicon Valley, I see absolutely zero of this entrepreneurial spirit. The administration is wasting their talent from top to bottom. They had a business plan competition. Top prize: $500. Not an incubation offer. No VCs invited. Nothing.

Even my Computer Science Masters at UoB had a business plan class baked in, and the final project pitch was to a board including the head of CS, the head of the business incubator, another faculty member, and an invited VC. You had to impress all of them to do well. Apparently the VC was the only person who didn't like my pitch :) But UCSC is doing nothing like this anywhere. It's a terrible waste.

</comment></comment></comment><comment><USER29> This may be good advice for getting a doctorate in ?computer science? -- the author never states his discipline in the article.

It may _not_ be particularly good advice for other disciplines. For example, as a doctoral student in Ecology you would be very lucky to have anything submitted for publication before you take your orals. It takes too long to get set up and start your research, especially if there is a seasonal component, and there are too many dead ends along the way. If you work hard, and with a little luck you may have one or two publishable papers by the time you graduate. Aim for the stars, but the important thing is clearing the trees...

</comment><comment><USER30> Join a financial institution and get very well paid before finishing. This is the easiest way to fail your Ph.D.

</comment><comment><USER31> I like the article. A good comprimise between pragmatic cynicism, and good advice.

<comment><USER8> I really like the term "pragmatic cynicism."

</comment></comment><comment><USER32> The converse:

"How to Succeed as a Graduate Student in the Sciences"

[http://www.chemistry-blog.com/wp- content/uploads/2010/06/Gas...](http://www.chemistry-blog.com/wp- content/uploads/2010/06/Gassman-and-Meyers.pdf)

<http://news.ycombinator.com/item?id=1504679>

</comment><comment><USER33> huh. I wish my advisor had been told about this. Before I dropped out, I'm pretty sure the problems I was having in my Ph.D. were mostly _because_ of not doing 1, 2, 3, and 10. And my prof. pretty much pushed us towards 5 (the too soon one) exclusively. Although, to be fair, I was also an expert at 4 and 8. :)

</comment><comment><USER34> My way:

#1, pick a supervisor who's going to be absent the entire first year and who decides to change your research topic significantly from its proposal to fit in with her own research (yes, I know this is common)

then

#2, decide the real world is more exciting and start working on a startup idea. Whoops. Still, dropping out to do the startup makes me cool like Larry and Sergey, so I'm down with that.

</comment><comment><USER35> I think Einstein's dissertation is a bad example of a dissertation that was not an immediate superstar. It was. Einstein could have taken this author's advice of stapling together his first three papers. Einstein's considerations about more precise calculations of Avogadro's Number lead directly to his novel technique(at the time!) of using Brownian motion to deduce that photons exist as particles, and not just waves. Then it only took a couple of years for that idea to morph into his famous _Annus Miribilis_ paper _On the electrodynamics of moving bodies_ , from which Special Relativity sprung forth. And the rest was history.

<comment><USER36> Actually, the Brownian Motion paper concerned the increasingly popular atomic theory, not photons. The photoelectric effect paper used the notion of photons, but it wasn't new and Einstein didn't really believe that photons existed. And special relativity is different from those two entirely. And all those papers were published in the same year. The same year in which he defended his thesis.

<comment><USER35> Thanks for the clarification!

</comment></comment></comment><comment><USER37> Professor Might's advice is on the whole good.

I would add:

Academic Jobs. Professor Might suggested that a Ph.D. is good only for an academic career, and I would in part disagree: I got a Ph.D. in engineering where it was solidly in my mind before, during, and since that never did I want an academic career. Actually I did take an academic job for a while as a way to have time better to care for my wife in a long illness, but I regarded the job as a waste of time for all concerned.

The best of my Ph.D. coursework was terrific stuff. And the Ph.D. did confirm to me that I knew how to do research. To me, both of these are the two main pillars of my current attempts to start a successful business.

Long one of the best approaches to progress is to do _field crossing_ : For a career in computer science, either in practice or in research, I would suggest (1) avoiding taking any courses at all in computer science unless just want to waste some time and (2) taking all the best courses could find in the _mathematical sciences_.

In particular, my view is that now, for the future of computing, computer science has a fatal disease and is nearly dead -- the field is missing any powerful _intellectual methodology_. The problems in computing remain important, but by a very wide margin the most powerful tools for progress in those problems are just the mathematical sciences.

For how to get a Ph.D., I would recommend: Start with what is fairly clearly an important, apparently not well solved, real problem from outside academics. Then attack the problem with some new work in the form of theorems and proofs with prerequisites in the mathematical sciences.

The usual criteria for publication are "new, correct, and significant": Okay, given where you got the problem and that you did some original work just for that problem, your work is likely "new". For "correct", it is fairly easy to know that theorems and proofs are correct, and it is difficult to argue with them. For "significant", since the real problem was, likely so is your solution.

I brought my own research problem to graduate school. The best coursework in my first year was a BIG help. I did all the actual research independently in my first summer. All my advisors ever did was approve my final work. I recommend this approach.

If a student has done some good research and still has a problem with his advisors, then I'd recommend just publishing the work. Nearly no one in academics wants to argue with the significance of published paper.

I do recommend doing some publishable research while a graduate student. Once in a course I saw a problem that should have been solved but was not solved in the literature. I took out a week, found a crude solution, got the problem approved for a _reading course_ , in the next week found a better solution, and wrote up the work. It was clear that the work was publishable, and, thus, much better than needed for a _reading course_ , and later I did publish it. That work gave me good _research credibility_ and helped me get the rest of my way through graduate school.

For getting a paper published, it can also help if the paper has more prerequisites in the mathematical sciences than any of the reviewers have; this situation can be relatively easy for someone bringing to computer science original work based on the mathematical sciences.

Can this approach to research work? Here's my evidence: I've published several papers in computer science jointly with others, and I've published two papers on my own. One of these two, and the best paper of the lot, really is in computer science. I've never had a paper rejected, and I've never had to make any significant revisions. The two papers where I was the sole author were in relatively good journals.

I was encouraged to publish my dissertation but wanted to sell it and refused to publish it! Again, I've never had any interest in an academic career.

I would take issue with the path suggested for research that a student should start with advanced courses in computer science, read 50-150 papers, and then do some research. That approach is too narrow -- it's nose to the grindstone, shoulder to the wheel, and ear to the ground and then trying to do good work in that position. Moreover, in a plowing analogy, will likely break a plow just where the last 50 people did.

For big success in academics, need to do some broadly powerful work. For that, I would suggest picking a direction with a much wider _field of view_ , also starting with a field of computing important outside academics.</comment>


The impact of the iPhone 3GS RAM increase - <AUTHOR> http://www.taptaptap.com/blog/the-impact-of-the-iphone-3gs-ram-increase/

<comment><USER2> They need to set a background color for their site so you can read the post before background images have finished loading or if you have images disabled.</comment>


Android Studio 1.0 released - <AUTHOR> https://sites.google.com/a/android.com/tools/recent/androidstudio10released

<comment><USER2> the post on official blog: [http://android- developers.blogspot.com.br/2014/12/android-st...](http://android- developers.blogspot.com.br/2014/12/android-studio-10.html)

</comment><comment><USER2> great!!! like my friend says, now is missing just the java 8 :)

<comment><USER3> Is Java 7 already supported? I don't mean the syntax I mean invokedynamic, java.lang.invoke, new filesystem API, ….

<comment><USER2> Yes it is supported, but java 8 has strong improvements like lambdas and closure and default methods in interfaces, and the java 8 is still unsupported :(

<comment><USER3> Really? Lambdas require exactly 0 vm support beyond invokedynamic which is already present in Java 7.

The official documentation [http://developer.android.com/reference/packages.html](http://developer.android.com/reference/packages.html) lists one of the invokedynamic (java.lang.invoke) nor file system (java.nio.file) packages so I assume they are missing.

What little documentation I could find suggests that there is only source compatibility for 1.7 [http://tools.android.com/tech-docs/new-build- system/user-gui...](http://tools.android.com/tech-docs/new-build-system/user- guide#TOC-Using-sourceCompatibility-1.7) with actual invokedynamic VM-support missing.</comment></comment></comment></comment>


Did you know? (video) - <AUTHOR> http://www.youtube.com/watch?v=pMcfrLYDm2U

<comment><AUTHOR> And there is newer version.. <http://www.youtube.com/watch?v=jpEnFwiqdx8></comment>


Her Mother Was Neanderthal, Her Father Something Else Entirely - <AUTHOR> https://www.nytimes.com/2018/08/22/science/neanderthals-denisovans-hybrid.html <comment><USER2> > "They didn't meet that often, but when they met they seemed to not have > prejudices against each other and mixed freely," he said.

That seems like a pretty big assumption. Considering what I know about humans, I would have guessed some chance meetings could result in violence.

</comment><comment><USER3> Discussed 3 days ago:

[https://news.ycombinator.com/item?id=17821253](https://news.ycombinator.com/item?id=17821253)</comment>


Ask HN: Alternative" News Source That Counters Major Attitudes? - <AUTHOR> Hi friends,
Could someone recommend to me an "alternative" news source? A news source that focuses on similar topics as the big names, CNN, CNBC, NPR, etc., but tries its best to counter the idea often promoted by those major sources?
Such as: Assuming CNN and NPR are going very pro-Trump one day (assuming), the "alternative view" news should sound very anti-Trump in the mean time. I think an alternative view into news helps one forming a critical thinking mindset.
Just shower idea.
Apologize if it's already a thing -- Don't know how to phrase that into a search term. <comment><USER3> Don't look for sources that are biased in a different way. The solution to spin in the news really shouldn't be spin in the opposite direction - <USER2> would just add another source of misinformation. The solution is consuming only solid, fact-based journalism with reliable sources.

Also, not every issue requires "balanced" views - if the news is extremely negative/positive regarding a certain problem/person/party, that's fine as long as the news is supported by facts. Adding "alternative" news would be adding lies in that case.

<comment><AUTHOR> Thank you for pointing out that -- if I may use a metaphor -- toxic medicine will not counter an existing intoxication. Just to be clear, I'm not trying to _learn facts by consuming news_. Rather, I simply wish to have an opposite sound inspiring me to think "ah! Interesting view -- I may also be able to come up with some alternative view on my own beliefs/writing/work." In other words, I'm looking for a news source that, combined with easily reachable opinions, easily constructs some "debate 101"-style, try-coming-up-with- different-opinions, practice-backing-up-both-sides material. It's not really related to learning something from the news, but thanks for warning me against the worse.

</comment></comment><comment><USER4> Most alternative news sources lack fact checking and are pretty much blog rants about something the writer doesn't like.

<comment><AUTHOR> Correct. I should have emphasized more on my requirement of basic fact- checking.

</comment></comment><comment><USER5> Why would you assume a news source that automatically contradicts the mainstream media would promote "critical thinking?"

For that matter, why the implicit assumption that stories presented by mainstream media always need to be "countered," but not stories presented outside the mainstream?

<comment><AUTHOR> These are brilliant questions, Krapp! Now that's some critical thinking I want to practice. To answer your questions: (1) I'm seeking for a news source that could ignite some "ah! interesting view -- never thought about that before" moments. I think that would be helpful after my getting bombasted by the 5 news channels (which usually shares similar attitude towards topics) every morning and just before I getting emotionally carried away. (2) To answer your second question, we need to clarify what I meant by "alternative news source." I consume news from China, Japan, and the US everyday. Each country would have its own "mainstream voice," and it would be inaccurate to call any of them "THE mainstream" or "THE alternative." Therefore, my definition of "mainstream" is not country/party-specific. Rather, I define "mainstream-ness" with accessibility. Which side of the story am I getting bombasted on? Which news channel pops up everywhere on the TV at my local pub, in streetside news kiosks, and in my podcast feed? And what tone/attitude/opinion they share towards topics? Answer to these questions would be considered "mainstream" to me. Therefore, it's not about "always countering which news sources." I should have phrased myself more like, "What are some news sources that specializes in giving voices to minorities (NOT esp. ethnically)?"

Thank you for your questions. They have been very provoking.

</comment></comment><comment><USER6> The only real solution to this problem is reading a variety of stories on the same topic. Left, central, right, countercultural, local, and so on.

<comment><AUTHOR> You are right, but at times I find it difficult to collect the variety on my own -- without knowing what side of story each news source would present makes it unrealistically time consuming to do so. Rather than conducting some serious research into a topic, I would prefer if I can simply have a news source that deliberately counters the voices of major news channels.

</comment></comment><comment><USER7> I like the Economist which I think does a good job of providing an outsiders view of American politics as well as context on how a story has other implications. Not sure if their coverage of UK politics is biased or not.

<comment><USER8> Economist sometimes do a poor job of fact checking their journalists. I also like the Economist, but it's not perfect. You still have to think for yourself and try to cross validate the information

</comment></comment><comment><USER9> I've found the FT (i.e., Financial Times) to be useful. The writers like to poke fun at themselves from time to time.

<comment><USER10> Agreed, it doesn't matter if you have a local variant in their trademarked light salmon color :-) Solid journalism, non biased and self critical. And sure that's not a 100% score but still best paper.</comment></comment>


Where Are the 47% of Americans Who Pay No Income Taxes? - <AUTHOR> http://www.theatlantic.com/politics/archive/2012/09/where-are-the-47-of-americans-who-pay-no-taxes/262499/

<comment><USER2> That article made me wince because it was apparently written by someone who had never heard of Simpson's Paradox[1].

Just because Texas _as a whole_ tends to support Romney, and just because Texas _as a whole_ has a lot of people who pay no income tax does not give you the data needed to conclude that people who do not pay income tax tend to support Romney, or even that they are more likely to do so.

And in fact, the exact opposite is true. It's been a staple of American political analysis for decades that although poor _states_ tend to vote Republican, poor _people_ tend vote Democratic. If you take Mississippi, you will find that it is poor and thus (as expected) it votes Republican. But _within_ Mississippi the poorest groups overwhelmingly vote Democratic (regardless of skin colour, in case you think racism plays a role), while the richest groups vote Republican. Look at a rich state and the same trends hold - the poorest groups within that state will vote Democratic, while the richest will vote Republican. (A ton of research exists on this; this blog post seems to sumarrise it well[2].)

To quote from the article: "So Romney appears to be wrong about these voters. But if calling for a less progressive taxation system was enough to alienate poor voters in the Deep South, the Republican Party would have already lost its stronghold there." This is something that could only be written by someone who has no grasp of American politics.

You only have to glance at an exit poll - _any_ exit poll - to realize that Republicans alienated poor voters _LOOOONG_ ago. Let's say 2004, presidential election, Mississippi again[3]: Kerry beat Bush by 24 points among people making less than $15k a year, but by only 9 points among people making $15k - $30k. Look at people making $30k - $50k and he lost by 20 points, a massive 36 points among people making $50k - $75k, and an eye-popping 43% (71% to 28%) among people making over $75k. And, again, the same trends exert themselves in every state, every race, and every year, over and over and over. Texas in 2004? Kerry wins every income band up to $30k, and loses everything else by increasing landslides (losing 92% to 8% for people making over $200k). California in 2004? Same deal; Kerry wins every income band up to $100k, and loses everything else by ever-increasing margins as you climb the income scale. Congressional elections in 2010? Same thing: [4]

TL;DR: Today I learned that you don't need to have a good grasp of statistics, logic, or American politics to be an associate editor of _The Atlantic_.

[1]: <http://en.wikipedia.org/wiki/Simpsons_paradox>

[2]: [http://super-economy.blogspot.co.nz/2011/04/red-state- rising...](http://super-economy.blogspot.co.nz/2011/04/red-state-rising.html)

[3]: [http://edition.cnn.com/ELECTION/2004/pages/results/states/MS...](http://edition.cnn.com/ELECTION/2004/pages/results/states/MS/P/00/epolls.0.html)

[4]: [http://4.bp.blogspot.com/-JGX1ch5CkN8/TZ9mEU7lnJI/AAAAAAAAAe...](http://4.bp.blogspot.com/-JGX1ch5CkN8/TZ9mEU7lnJI/AAAAAAAAAeU/KIF8RJuRY0g/s1600/cnn.png)

<comment><USER3> Agreed.

But the larger point is that all of those poor people in red states who pay no taxes are effectively disenfranchised. Their states are red - their blue votes are meaningless.

The majority of those who pay no income tax are already non-entities in Presidential elections.

<comment><USER2> Of course, all those rich people in blue states who pay a huge slice of the federal income tax take are also effectively disenfranchised. Their states are blue, and their red votes are meaningless. Harder to get upset about all the poor lawyers and bankers who don't have their votes counted, but it's just as real.

Democracy is funny.

</comment></comment></comment><comment><USER4> That conclusion about red states being overrepresented in the untaxed 47% was the first thing I thought of. It makes me think that Romney mis-spoke, was pandering, or has been seriously taken out of context. I have a hard time buying into the narrative that he is so clueless about American demography.

<comment><USER5> My guess is that he was pandering. The statements were made at a fundraiser where he's trying to echo the narrative of the crowd, not present a realistic overview.

</comment></comment><comment><USER6> I like how "my colleague Derek Thompson picked up the baton" and clobbered the article by disproving its thesis.</comment>


Why we are much smarter than we think we are - <AUTHOR> http://leostartsup.com/2012/02/why-we-are-much-smarter-than-we-think-we-are/

<comment><USER2> Am I the only person who considers use of the word "smart" as a leading indicator of the absence of intelligence? The term is so vague as to be utterly meaningless, and is usually a signal that we're really talking about someone's insecurities, their feelings of inadequacy, or their passive- aggressive megalomania. /psychobabble

<comment><USER3> Does the phrase "work smarter, not harder" trigger your alarm bells too?

<comment><USER4> You're probably past the point where this sentence is useful. Did you often thought about that ? Most people didn't.

</comment></comment></comment><comment><USER5> My immediate reaction:

\- There are circumstances where talking as if you know what you're talking about when you really don't can do more harm than good, both to you and to your audience.

\- The idea that we should stop learning before we get so deep into a subject that we can't immediately communicate our insights to a layperson (which is not very deep at all) smacks of anti-intellectualism.

<comment><AUTHOR> Hey szany, thanks for the feedback, I can totally understand where you are coming from.

That's interesting and I totally agree, talking as if you know all about the subject can certainly do more harm than good. What I tried to focus on with this post, is to see everything you do somewhat like an MVP. The key is to keep getting feedback on everything you do and shipping stuff as soon as you have a slight grasp of the situation. I didn't mean to pretend you are an expert but to be content with the amount you have learnt and sharing it immediately to learn more faster. Does that make sense?

<comment><USER6> I had a similar reaction as szany. I think part of the problem is that your post has an really shallow example: knowledge of bars and restaurants in Hong Kong. That's not a topic that would ever require very deep study.

There are a range of subjects which really do require deep study before you should be spouting off on them, for instance: compilers. I've got stacks of books on compilers and have spent a decent amount of time studying the details of Lisp implementation, and I'm not sure there's much to be gained from sharing what I know. I would just be regurgitating what I've read in books which present the topic better than I could, so I don't think it would be beneficial, unless I were to specifically seek out feedback from experts, but that's not what you're talking about it seems.

I just think there are shades of gray here and your post might have benefited from some more specific examples rather than presenting the idea that we are in general "smarter" than we think we are. I find it humbling and inspiring to realize how much "smarts" I _lack_ and how much I have to learn, when it comes to deeply technical subjects.

<comment><USER7> I guess that Leo's post resonated with me because I find that the sharing of what I've learned so far helps me learn it better - and sometimes, there are people who are in the same boat as you before you came to some realization.

That is to say, sometimes I get stuck on something that should probably be easy - and when I find the crux, the thing that got me unstuck, sharing that is beneficial to people who are stuck in the same way. We all think and learn differently, so if there's just one other person out there who thinks the same way as me and might find things easier with the same realization I had...well, I think it's worth it.

<comment><USER8> The act of sharing also requires you to evaluate what you know . It is through the act of teaching that we can be more certain that we have truly learnt. I myself often think that I know something, but when I try to explain it to someone I often find nuances that I hadn't considered yet.

I don't think Leo is talking about giving the keynote adress at some GCC symposium but rather sharing with the intent of gathering feedback as to gain further insight into the subject.

It's not so much about training someone as it is about growing knowledge together.

</comment></comment></comment></comment></comment><comment><USER9> Well see the problem is that we're not _all_ smarter than we think. The Dunning-Kruger effect means that some of us think we're much smarter than we actually are. Unfortunately, 99% of the code out there seems to be written by people in this latter category.

<comment><USER10> I find it interesting that the author posits that those who _sell themselves_ as being smart therefore are.

<comment><USER11> Well they were smart enough to realize that that's enough to convince most people.

I can see his point in the context of marketing and pundit-ism.

In the context of anything actually intellectual this is all just silly but the author isn't interested in or speaking to that world.

</comment></comment></comment><comment><USER12> Great post Leo. There are some great comments here, but I have a feeling you did not intend for people to think they are smarter than they are.

Rather, I think the point you may perhaps be trying to make is that we should all be very pragmatic about sharing our lessons, no matter what stage we are currently at. This is something I believe in very much. I feel far too many people wait until they have achieved something they perceive as substantial before they share their lessons or achievements.

I think we can all benefit by sharing our lessons much earlier and more frequently. If we do it in an open way, where we acknowledge we are on a journey and will need to make adjustments to reach our goal, then this humble approach can really bring some fantastic advice from others who are just a little further along. And, like you've said, there are without a doubt people not as far along who can benefit too.

Cheers Leo!

</comment><comment><USER13> I think the main problem is that we are in general unaware of what others do not know. I think we all extrapolate that if we know something, others must also. I'm not sure if that is a great self-centered reflective view we all take or simply optimism for our fellow man. Either way, I find that opportunities are missed because of this. I have many colleagues who are experts in their field but believe that what they know is simply common sense.</comment>