Re:Ask HN: What code samples should programmers read?
by lr4444lr on Monday June 05, 2017 @10:16AM
(#14487729)
I think the ease with which your IDE lets you get and debug into the source code of your dependencies (assuming your language lets you do this) is definitely something I overlooked in my earlier development career as pivotal to better understanding not only the dependencies, but how to think about software from other peoples' POV, which when done often enough gives you a better intuition for where and why different bugs manifest. JetBrains indeed makes some awesome products.
Re:Ask HN: What code samples should programmers read?
by reitanqild on Monday June 05, 2017 @08:54AM
(#14487227)
Java, Maven and Netbeans is almost as easy but since dependencies are compiled I have to click one more time, -download sources- and there I have it.
Re:Ask HN: What code samples should programmers read?
by jdmichal on Monday June 05, 2017 @10:55AM
(#14488021)
Eclipse will automatically attempt to download sources from Maven when you jump into a dependency.
Re:Ask HN: What code samples should programmers read?
by reitanqild on Monday June 05, 2017 @03:48PM
(#14490945)
I suspected it was easy in eclipse as well and should possibly have mentioned that.
That said let me add that IntelliJ probably has similar systems.
Re:Ask HN: What code samples should programmers read?
by nazgul17 on Monday June 05, 2017 @07:36PM
(#14493330)
If you don't have the source, IntelliJ will decompile the binary and I must say it does a terrific job.
It also handles downloads via Maven, but I have only done it only once and don't remember the details.
Re:Ask HN: What code samples should programmers read?
by Entalpi on Monday June 05, 2017 @09:58AM
(#14487594)
This is why I love C++ and C even though you cant find the source you can read the headers.
Re:Ask HN: What code samples should programmers read?
by sigjuice on Monday June 05, 2017 @01:04PM
(#14489195)
What programs or libraries are these for which you can't find the source but have the headers available to read?
Re:Ask HN: What code samples should programmers read?
by Matthias247 on Monday June 05, 2017 @04:19PM
(#14491432)
All proprietary third party libraries which one might depend on. And depending on the domain that could be at lot.
Re:Ask HN: What code samples should programmers read?
by smitherfield on Monday June 05, 2017 @03:21PM
(#14490545)
Anything proprietary? Trivial example: Windows or MacOS system headers.
Python dependencies are source code, not compiled blobs, and the import syntax makes it very explicit where definitions come from.
If I'm unsure how to do something with the library I usually look at the source of the relevant module before looking up online docs.