Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
That's why I don't like recursion. It makes a clever and nice algo, I give you that. But it's too easy to break the dragons loose
-
@xalys In the 4th comment of this rant I explain what's wrong with careless use of recursion
-
@netikras You can also easily make a while(true) loop. recursion will at least hard crash with facts where it hung, instead of just silently idling till eternity without debug info..
-
@gitreflog jstack -l <pid>
in case of an exc the user will simply refresh the page as if it were a simple glitch. As for an inf while loop - there's no way your infra monitoring is gonna miss that :) it'll make sure you're aware of a bug in your code -
@netikras And how in the world are they gonna miss an exception? Now let's imagine a desktop application. An infinite loop might be noticeabld ot the user, but there is no way in the world the user will use jstack or any tool at all to diagnose it if he reports it at all. An exception how ever can be very well catched and auto reported via some tool like raven or sentry.io.
-
Why would a user care abt an exc or an inf loop? It's not users' matter. The developer should care abt it. Sysadmin. App-admin. Devops. Anything but the user
java.lang.StackOverflowError
Well, I've been betrayed... Now what?
rant