74 points · by martin_dd · 2y ago · 52 comments
I built Docland because I constantly found it frustrating to locate and view API definitions when programming. You'd have to Google the function/class name, skip all the SEO articles, find the page you want, yet the documentation might be poorly formatted or does not support searching.
So I thought it would be really cool to create a documentation site dedicated for programming languages and libraries, so that you can find the docs all in one place with a uniform look. Docland currently only supports Java, but more programming languages can be supported thanks to its modular architecture.
Please try it out and let me know what you think! Also, the process of building Docland was extremely fun and challenging. I'm happy to share about that too.
Thank you!
Martin
Javadoc already gives you an extremely fast search index and search bar. Granted, it's only in the newest versions of Java.
The real benefit of customizing search is custom ranking and filtering logic. Docland sorts the search results by relevance (matching prefix length and casing) and dedupes overloads. In my (possibly biased) opinion it's easier to use.
Agreed. If you do have performance improvements in mind, I would recommend you bring them up to the Javadoc jdk team. They would definitely take a look if you can point out a faster solution.
https://openjdk.org/projects/javadoc-next/
> That's why the search bar in the official java.base documentation is noticeably laggy.
On my $400 laptop from 2020, I have a response time of <= 0.25 seconds. Are you seeing something different?
* Retina, MBP 14"
Well you can tell Intellij to just download the sources of libraries used in your project, and then it's ctrl-q on a method to see its javadoc.
I did not look at your project, presumably it does something more to add value to this?
If you write code 90% of the time in a frontend or scripting or other kind of language where a lightweight code editor like VSCode is the peak of productivity — and then have to fix bugs in a Java codebase the other 10% of the time — then you're likely just going to work on the Java project using VSCode, rather than learning a whole extra (more complex!) tool just to increase your Java productivity.
Docland seems like it would be a good and helpful resource for the people who do things that way.
Even Gosling admits that writing Java without an IDE is a fools errand.
Admittedly, it was slow going for a few days when I first was asked to help with the Java codebase. I had never written Java professionally — and I had even (inconveniently) missed out on ever having to write it for school.
But, given that I was already familiar with a number of other languages and their ecosystems (including newer languages influenced by Java!), I could mostly guess what stdlib ADTs and ecosystem libraries probably exist in Java, find them with quick searching when reaching for them, and read the online auto-generated JavaDoc documentation — where and when it existed — to figure out what classes and methods I would need to use to achieve the effect I was picturing.
Once I knew the types and their methods and used them a few times, I didn't need any reference for them any more. (Though I should point out that I wasn't entirely without help; these days, even non-IDE code editors like VSCode or Sublime Text, give you some level of project-level fuzzy symbol search, constant/method/identifier auto-complete, reference/definition chasing, etc. They're just limited in their knowledge to the set of symbols they can extract from the code of the project itself — with no access to the "unreferenced" symbols that an IDE would be loading from the runtime and any project-referenced libraries.)
In learning Java this way, my only actual problem really did come down to the slap-shod nature of JavaDoc documentation! After languages like Elixir, where the docs for literally every version of every package, plus every version of the runtime itself live together on one website (hexdocs.pm) — in a uniform format, and with community conventions for providing usage examples as runnable doc-tests — Java's third-party library docs living on random websites or not even web-published at all was both painful and somewhat mystifying to me at the time.
I do understand now in retrospect, that this is mostly down to Java library authors expecting you to use an IDE... but even then, I still find the lack of care many library authors put into maintaining standardized online documentation very odd. I like to look at the API of a library package as part of comparing/contrasting it to other library packages when deciding which one I should be using — which Java's documentation ecosystem often makes nearly impossible. (Even with a Java IDE, you'd have to create a project that has all of these libraries as dependencies — which might be impossible given dependency conflicts! — just to be able to do that.)
(But hey, it's still better than Python's documentation ecosystem.)
Your real point is that any IDE/tool has a learning curve, but don’t ever mistake avoiding that curve for “peak productivity”
The pricing seems a bit steep. It isn't an exact competitor, but it reminds me of https://kapeli.com/dash which appears to be $15/year. Annoyingly dash is Mac only so poor linux devs like me can't use it, so having this be a web app is great.
Increasingly, it feels like the web is a less pleasant experience, albeit stumbling upon the occasional StackOverflow/StackExchange/GitHub discussion that goes in depth on some topic or compares various approaches is still quite useful, for example: https://stackoverflow.com/a/50892881
That said, good luck on your monetization! Probably not for me at the moment, but I'm sure that some people will see the value:
> 403
> Access denied
> This documentation set is not currently available for public access.
> Please subscribe to Docland Plus to gain unlimited access and unlock all premium features!
(looking up commons-lang3, curiously the most popular package under org.apache.commons resolves without the message, but the seemingly re-published ones from elsewhere don't)
<script type="module">
import { runDocpageEntrypoint } from "/build/index.3bb1c1f7.mjs";
runDocpageEntrypoint("Production", "");
</script>
But, if I may make a suggestion, it would be so much nicer if those <code> blocks had one of the many JS syntax highlighter libraries applied to themEx. https://docland.io/doc/java/g1/_openjdk/java.base/21.0.2.u13...
That page seems to be mostly wrapped in links incorrectly.
I'm curious. What is "External link resolution"? I'm a bit embarrassed that I don't know, and I've been writing Java / Scala for decades...
Sorry for the confusing terminology -- "External link resolution" just means links to any direct/transitive dependencies will be resolved. It takes more time and memory to generate so by default those links would be broken (marked in red).
In all seriousness, I miss the Contents-tab-style of navigation like I used to do with CHM ages ago.
There was this point in time such that when I opened a CHM I knew I was going to read chapters about use cases, examples, tips and tricks, gotchas and all the way at the bottom I would find the reference API documentation.
Not sure people will pay for "just" a nice (java)doc renderer/ui.
Maybe some sort of API diff for migrations or a maintained collection of OpenRewrite migrations could be a good value add, however that's a lot more complicated to provide.
2. The homepage requires you to choose an artifact/package first. Click "java.base" and then you can find SimpleDateFormat with the "search" field on the subsequent page.
The keyboard navigation on the search doesn't work (pressing enter closes the results, doesn't navigate), and I find a search over artifacts to be too limiting for my use-case, but I guess it's not wrong.
This documentation set is not currently available for public access.
Please subscribe to Docland Plus to gain unlimited access and unlock all premium features! "