Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can joke about it, but there is absolutely a lot of value in the fact that you can just fire up a debugger against Electron or React or your devtools or Node itself. The "just" is doing a lot of heavy lifting here of course, but I've done all of the aforementioned at different points of my career, to reasonably good success. I don't think everything should be written in Javascript, but at times it's been very convenient that that's what's under the hood.


Yes! At one early startup I worked at, one of our initial customers (we didn't have many at that point) had reported an annoying bug stopping their workflow. So one of our engineers logged into production on their tenant; replicated the bug; set some breakpoints in the Chrome debugger; worked out the cause of the bug; and then fixed it and deployed the fix within a few hours. Customer was happy.

I don't think there are many languages where you can do something like that? There are some where it's maybe even better, like Smalltalk...


With PHP you don't even have to deploy, just edit the files on the live server, save, and it is done. :D I'm not endorsing this way of doing things though.


Haha, yes, I used to work with PHP, and we would occasionally use Notepad++ or something like it to live edit files on the servers.

I also don't endorse this way of doing things, but there's no faster way to hotfix something.


Depending on the setup this could be the case for JS as well but of course in reality most JS is compiled these days.


Speaking from experience you can absolutely ssh into the production webserver and live edit compiled/minified JS.


Ewwww...


>I don't think there are many languages where you can do something like that

Isn't this a basic feature that all languages have?


At least from my personal perspective, the core difference here is that I use the same tool for all of those different things. Any mature language these days has a solid debugger available, but not jumping between different tools means you get more proficient at the one tool you do use.


any language where the necessary information is not thrown away when producing a binary. so that means by default languages where the source is distributed have an advantage. but that's still a lot of languages.


>any language where the necessary information is not thrown away when producing a binary

Its only thrown away if you ask the compiler to throw it away. You can always ship a debug build.


You can do that with a freaking C++ and gdb. As long as you have debug symbols.

Never mind pretty much all other languages.


Locally, sure. Can you do it to a C++ binary deployed at a customer?


Of course you can. You can attach gdbserver to a running process on the remote machine and connect to it via your local gdb.

Edit: Plus, if there was a crash, you can generally get a coredump, so you can inspect the exact state the program was in, again, with GDB.



Ok, but sorry, what is so special about Javascript here ? Did this for good old Java services a few hundred times. With hot-fix on same or next day. Remote debugging is supported for a large number of languages. It is not unique to JS alone.

JVMs support live visual profiling too - many engineers identify production performance issues this way. I don't think node js has anything to compete out of the box with the same level of convenience. (Last I checked, the profiling was bare bones primitive)


We've been doing that on the JVM for decades.


Yeah, that's handy, but it's also annoying that React Native has become the norm for mobile development. That's why we have tip calculator apps weighing in at 20 MB for what used to be 200 KB.

What TSMC giveth React Native taketh away...




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

Search: