devjava-content's Issues
[Report mistake] : Option to launch JFR is misspelled in page "Getting Started with the JDK Flight Recorder"
This issue does not request nor propose a new content. But it stands for reporting a mistake in the website dev.java
In the page Getting Started with the JDK Flight Recorder, at the section "Enabling JFR on Startup", it is written :
To enable JFR on startup, include the VM argument -XX:StartFlightRecorder
As far as I know, the right option name is -XX:StartFlightRecording
. The mistake happens thrice on the web page. The other pages are OK.
Please, can you fix it ?
[Proposal] Java certifications
Request Issue
No response
Website Section
No response
Proposal Details
Article on Java certification. Chad ok'd idea over email
Author References
No response
Looming Changes in Concurrency
Approved content Discussed in #21
Originally posted by cayhorstmann June 7, 2023
Content Details
An article on the state of Loom, with a focus on how to use it in practice.
Website Section
No response
Machine-readable article list
I would like to ask about adding some endpoint that emits a list of articles on dev.java, e.g. a sitemap (though it would be useful to have access to the article titles).
This would allow for building tools for finding and referring to articles without needing to scrape the site.
[Request] Method Handle / Var Handle overview
[Request] enums
The Classes and Objects section mentions covering enumerations. However, that part is missing.
I think a page about enumerations should be added there:
- What are enumerations?
- How to create them?
- What functionality do enumerations provide in Java?
[Request] Introduction to concurrency in Java
What is concurrent programming? Why do we do it? How do we do it safely? On the latter question, there's lots to explore:
- thread pools vs virtual threads (what to use when?)
- concurrent data structured (see #9)
- locks, semaphores, etc.
Basically, everything in a java.util.concurrent.*
package.
Invalid Datetime in enums article
When viewing the article I wrote on enums, it sais
Last update: Invalid DateTime
at the bottom.
However, this timestamp is displayed correctly when I locally run the version of the site in this repository:
Last update: September 29, 2023
"References for the latest release" pointing to 21
On /learn, the section References for the latest release
contains multiple links to sites about JDK 21 even though the latest release is 22:
- Java Documentation
- Java API Docs
- Java Release Notes
I propose to either update these links to 22 or change the heading to not say "latest release".
Add nested arrays to "Creating Arrays in Your Programs"
The article Creating Arrays in Your Programs explains how arrays work but it doesn't mention arrays of arrays.
I think it should cover how to create arrays of arrays, how to access them and the possibility of creating arrays of arrays where not all inner arrays have the same size (not rectangular).
[Proposal] HTTP/2 Client APIs
Request Issue
Website Section
Home --> Tutorials --> HTTP Client
Proposal Details
- Why this API and not other HTTP clients?
- Lightweight
- No dependencies
- Fetching recipe data from TheMealDB
- Building an
HttpClient
- Building an
HttpRequest
- Getting an
HttpResponse
- Method 1: synchronous
- Method 2: asynchronous
- Building an
Author References
[Request] Debugging
This request may be a bit controversial since it is not that specific to Java but I see many people learning Java experiencing issues without knowing what a debugger is and how to solve it.
We often refer to this Stack Overflow post when this question is asked in our JUG (which has a focus on helping new Java developers).
I propose to add an article that explains
- What is a debugger?
- How can debuggers be used?
- What is a breakpoint?
- What common functionality do debuggers in IDEs provide
- ideally IDE-agnostic but including things like
Step Into
/Step Over
/Resume
- ideally IDE-agnostic but including things like
- How does a debugger help me solve problems? Why are they so useful/important?
- Links to debugging documentation of (common) Java IDEs
- https://www.eclipse.org/community/eclipse_newsletter/2017/june/article1.php
- https://www.jetbrains.com/help/idea/debugging-your-first-java-application.html
- probably also something for VSC and NetBeans?
Non-Goals:
- How do (Java) debuggers work internally?
- This could be the scope of another article but I am talking about an introductory thing.
[Request] How Java has powered my career
[Request] How to start a JUG?
[Request] Regexes
I think dev.java should contain an article on regexes.
Specifically, I would suggest that such an article includes:
- What are regexes?
- How can regexes be used in Java?
- using
String
methods (matches
/replaceAll
/split
) - Compiling
Pattern
s - using
Matcher
for finding occurences inString
s, working with groups, etc.
- using
- quick overview on regex features
Is the proposal issue necessary or not?
The README mentions:
All content must start with a
Content Proposal
. This will be in the form of a GitHub issue using theContent Proposal
issue template.
and it differentiates from requests as it seems to expect a [requested]
issue before that:
Look through the requested issues and find something that you feel uniquely capable of writing
This also seems to be strengthened by the Content Proposal
issue template which expects a Request Issue
.
However, it seems that the [approved]
label is typically put on accepted content requests (at least after this repo was opened for Community Contributions).
Furthermore, both #45 and #49 didn't seem to need a proposal issue, the request (followed by the future author being assigned to it) seemed to be sufficient.
Therefore, I propose to remove the distinction between content proposals. I would suggest to:
- Add an issue template for requests (or remove the
Request Issue
field from theContent Proposal
template). - Create a Pull Request template from the current
Content Proposal
template since it makes sense for PRs to mention the request issue (and all other fields from there). - Clean up the tags so only the tags actually being used are listed. For example, I haven't seen any usage of the
[in progress]
label. - Adapt the README to reflect this workflow.
"Know Your Java?" Content Series
Approved Content Discussed in #24
Originally posted by venkats June 12, 2023
Content Details
Greetings,
I request the feedback on the topics for an article series I'd like to write. The following are a few ideas I have in mind:
Topics:
Know Your Java?
Refactoring from Imperative to Functional Style
Making use of Pattern Matching
Details:
Know Your Java?:
12-parts articles on Know your Java? The topics will include things in Java that developers may miss, the compilers may not catch, unit tests sometimes may not detect, but is useful for developers to know. In each article, the reader will look at a sample code, try to guess the behavior, will then learn about the actual behavior, and reasons, and the ways to fix or the lessons they can learn.
Refactoring from Imperative to Functional Style
12-parts article on functional thinking. In each part, the reader will start with an imperative style code, then walk thought how to approach writing that code in functional style, and see the refactoring of the code to functional style unfold.
Making use of Pattern Matching
12-parts article on pattern matching. This series will approach how readers can apply pattern matching to solve common code from traditional to more modern Java.
Please let me know your thoughts if any of these is interesting and, if so, which one you'd suggest I focus on.
Thank you.
Website Section
No response
Typo in exceptions description
In the section Getting to Know the Language on https://dev.java/learn/, the description of the Exceptions
article series is as follows:
Using exceptions to handle errors and other exceptionnal events.
I think it should be exceptional
instead of exceptionnal
.
In the description on the series page, this is stated correctly.
[Request] Explain HelloWorld
Get somebody from zero to "Hello, World":
- brief explanation of what a JDK is and where to get it (at least partially, this already exist on the site ~> link there)
- explanation of editing a
.java
file with a text editor and how to run it withjava
(nowjavac
- see JEP 330) - shortest possible HelloWorld (ignoring JEP 445 for now)
- brief explanation of the involved concepts with links to the articles that explain them in more detail
Request: Sample Requested Issue
Sample request issue body.
Reword "foreach" loop in "Refactoring to functional style" series introduction
@venkats contributes the Refactoring from the Imperative to the Functional Style series to dev.java.
In the series introduction/index page, there is a table containing all tutorials as well as how these are transformed.
The Imperative Style
column of that table contains cells like foreach(...) { if... }
even though Java uses the syntax for(TypeName variableName : someIterable)
.
I suggest changing this in order to not make it look like Java has a foreach
keyword.
[Request] HTTP/2 API tutorial
See JEP 321.
Effectively broken link in README.md
The README.md file refers to the root web page of inside.java in a manner suggesting that the target contains an announcement on accepting contributions to dev.java:
Line 5 in 50826e9
I wasted at least 15 minutes trying to find the respective announcement on the target website but was unable to find it. I'd say that this link is effectively broken. The inside.java web page contains many news items, and if the respective announcement is contained in one of these many, the link in README.md should refer to that news item instead of the root page.
Content license
The purpose of this repository is to provide Java-related content for everyone and allow that knowledge to be used.
However, I don't see a LICENSE
file in this repository.
How is the existing content of this repository licensed?
And what about third-party/Community contributions? How do they know which license they provide their content under?
Does contributing require signing the OCA? If so, which one (or which projects) is required for this repository?
I think it might be important to sort this out before the first actual (content) contributions.
Typo in jmap article heading
The heading of the article about jmap is
Jmap - Printing Detais of a Process
It should be Details
instead of Detais
.
The said article is not a part of this repository.
Addition of some important things in Dev.java
Hello everybody! I hope you are well.
I would like to give an idea to everyone who maintains Dev.java.
I'm learning a lot there ❤️ I've already completed several topics and this makes me very excited and motivated to always want more. But I've been noticing something for a while: I noticed that there are no tutorials on networks (http) and on Databases (Maybe it's me who's not finding it, even though I've already viewed everything and haven't found it).
Could you add tutorials related to this? It would also be interesting, in addition to the already added JavaFX tutorial, Also have a tutorial related to swing? It would be interesting, since swing is easier to learn than JavaFX. Swing would be like a prelude to JavaFX.
It would also be helpful if the tutorial related to threads and concurrency were added to Dev.java.
I know that all this already exists in the documentation tutorial, but it would be nice if it were more exemplified in the dev.java website.
In advance, I am immensely grateful and, thank you very much for this great chance to learn and get to know this perfect tool that is Java ❤️❤️🥹
[Request] Introduction to java.lang.invoke
While there is an Introduction to Java Reflection, I don't see any article about the APIs defined in java.base/java.lang.invoke
. I think it would be nice to have something explaining these APIs (MethodHandle
, VarHandle
, potentially interactions with invokedynamic
) as well.
Modern I/O
Approved Content Discussed in #22
Originally posted by cayhorstmann June 7, 2023
Content Details
An article on the more or less recent changes in I/O libraries, showing readers to use modern one-liners instead of loops with BufferedReader
. An expanded version of https://horstmann.com/unblog/2023-04-09/index.html
Website Section
Learn -> Tutorials -> Staying Aware of New Features?
Move "Staying Aware of New Features" after "Mastering the API"
For new Java developers, the Staying Aware of New Features
section isn't that useful (in my opinion).
Hence, I propose moving it down somewhere after the Mastering the API
section because Getting to Know the Language
and Mastering the API
are the sections that seem to be most useful for new developers.
Furthermore, it might be a good idea to sort other in order of difficulty so the most basic articles are first and each article appears after the articles it depends on.
For example, the Refactoring from the Imperative to the Functional Style
series seems to be more advanced compared to other topics in that section so it may be worth moving it a bit down.
Common Problems (and their solutions) pointing to wrong anchor
The FAQs on dev.java contain a link Common Problems (and their solutions)
which links to https://dev.java/learn/getting-started/#anchor_9.
However, #anchor_9
is not available on that page. It should instead link to #common-problems
.
The link is specified here
[Request] Key Encapsulation Mechanism API
dev.java provides a section Fundamentals of Security using JDK Libraries.
Since the Key Encapsulation Mechanism API has been added in Java 21, it could be useful to add an article for that.
[Request] How Modern Java has helped my App, Business, Project?
Add exercises at the end of each topic [Proposal]
Request Issue
No response
Website Section
Learn > Tutorials
Proposal Details
I would like a session with fixation exercises to be added to the dev.java so that we can put into practice what we have learned. It may not necessarily be a program for us to do. Sometimes it could be a quiz, I don't know. It would be very interesting <3
Author References
No response
[Request] Writing Java applications with Eclipse
Since it seems that we already have an article about using Java in VSC and at an article about IntelliJ is in the process of being added in #62, I think another article should be added for the Eclipse IDE.
There are many people using it so it would be weird to leave it out.
Website section
Learn > Tutorials > Your First Java App
Details
I could imagine the following sections:
- Introduction/installation
- creating Java projects
- possibly including build tools (I am not talking about an introduction to build tools, just about creating Maven/Gradle projects in Eclipse)
- Debugging functionality (Debug perspective, associated buttons, etc)
- Content assist
- I don't think it's necessary to talk about setting auto activation keys but this is a possibility as well.
- Differentiation between workspaces and projects
- possibly Ctrl+1 (quick fix), Ctrl+3 (quick access)
- Refactoring/Generation/Autoformatting
- only a quick overview showing the options being there
- not including any configuration of autoformatting etc
Author references
I would be interested in writing this but I am also open to other people writing it.
[ Typo ] in Using Operators in your programs
There is a typo error in Home > Tutorials > Java Language Basics > Using Operators in Your Programs
Under Bitwise and Bit Shift Operators Section it is written Bitwise | as Bitwise &
Getting started with Java in IntelliJ
Request Issue
No response
Website Section
Learn --> Tutorials --> Your First Java App.
Proposal Details
Would be great to have a getting started with Java article and IntelliJ.
Author References
Marit van Dijk (@mlvandijk) would be great to complete this ask 😸
[Request] RandomGenerator API tutorial
Explain the RandomGenerator
API introduced by JEP 356. Inspiration: https://nipafx.dev/java-random-generator/
Missing content in repository
Hello! I would like to submit a correction to the Using Lambdas Expressions in Your Application page, and thought of submitting this fix in the form of a pull request, but I'm unable to find the sources for that page. The Contributing to Dev.java page only lists this GitHub repository, but it does not appear to contain the respective source code.
Where is the correct place to file such a pull request, or at minimum to report the issue?
Also add content focused on networks and databases in dev.java [Proposal]
Request Issue
No response
Website Section
Learn > Tutorials > Mastering the API
Proposal Details
It would be very interesting if content related to JDBC/JPA and also about Networks were added to the "mastering the api" section.
Author References
No response
Refactoring from Imperative to Functional Style
Approved from Content Discussed in #24
Originally posted by venkats June 12, 2023
Content Details
Greetings,
I request the feedback on the topics for an article series I'd like to write. The following are a few ideas I have in mind:
Topics:
Know Your Java?
Refactoring from Imperative to Functional Style
Making use of Pattern Matching
Details:
Know Your Java?:
12-parts articles on Know your Java? The topics will include things in Java that developers may miss, the compilers may not catch, unit tests sometimes may not detect, but is useful for developers to know. In each article, the reader will look at a sample code, try to guess the behavior, will then learn about the actual behavior, and reasons, and the ways to fix or the lessons they can learn.
Refactoring from Imperative to Functional Style
12-parts article on functional thinking. In each part, the reader will start with an imperative style code, then walk thought how to approach writing that code in functional style, and see the refactoring of the code to functional style unfold.
Making use of Pattern Matching
12-parts article on pattern matching. This series will approach how readers can apply pattern matching to solve common code from traditional to more modern Java.
Please let me know your thoughts if any of these is interesting and, if so, which one you'd suggest I focus on.
Thank you.
Website Section
No response
[Request] Why I became a Java developer
Minor typo in records article
The Serialization section on the records article contains the following sentence:
Deserializing a record always call the canonical constructor.
I think this should be either
Deserializing a record always calls the canonical constructor.
or
Deserializing a record will always call the canonical constructor.
[Request] Advanced JavaFX content
Request Issue
No response
Website Section
No response
Proposal Details
No response
Author References
No response
[Request] Overview over concurrent data structures
The collections framework is covered in great detail and that includes mentions of concurrent data structures but that section does not strategically explore how to use them in a concurrent program.
[Request] Reflection API section
Wrong link for sets in "Getting to Know the Collection Hierarchy"
The Storing Elements in a Container with the Collection Interface part of the Getting to Know the Collection Hierarchy article contains the following sentence:
Since a Collection is a set of elements, there also set operations defined on the Collection interface:
I think this should use Set
instead of Collection
.
The said article is not a part of this repository.
[Request] Sequenced Collections
Since Sequenced Collections were introduced in Java 21, an article explaining them could be added to the section The Collections Framework.
Alternatively, information about sequenced collections could be added to Getting to Know the Collection Hierarchy and Using Maps to Store Key Value Pairs.
Potentially confusing statement about DirectoryStream
In https://dev.java/learn/java-io/file-system/listing/, it says:
Remember: The returned DirectoryStream is a stream. If you are not using a try-with-resources statement, do not forget to close the stream in the finally block. The try-with-resources statement takes care of this for you. You can learn more about stream in the Stream section.
What does "...is a stream" mean? A java.util.stream.Stream
? A java.io.InputStream
or java.io.OutputStream
? It is neither. Maybe the author meant "...is an AutoCloseable
"?
[Request] How to read stack traces
There are currently 4 articles about exceptions on dev.java.
However, none of them seem to explain what exactly a stack trace is, how to read it and how to find out where the issue is.
I frequently see new Java users (e.g. students) being confused by (especially bigger) stack traces with no idea on how to debug them.
While this Stack Overflow post explains it quite well, I think this is a good fit and would be a helpful article (especially for referencing it to new Java developers).
I would like such an article to contain the following:
- What is a stack trace?
- When is a stack trace displayed on the console (or in other logs)?
- What is a
Caused By
section? - What is a
Suppressed
section? - What should people look at/focus on when reading (bigger) stack traces?
- Differentiating between own code and other code (in frameworks)
- Why is it often a bad idea to use
System.out.println("error");
instead ofe.printStackTrace();
(or re-throwing) in acatch
-block for exceptions that shouldn't happen?
[Request] Classpath Resources
A common source of confusion among (somewhat) new Java developers (especially when they are packaging their first application as a JAR) is resources on the classpath and how they are different from files.
I would request an article clarifying these things, specifically the following:
- What's the difference between resources and files?
- When I access a file in my source folder using
java.io.File
(or similar), why does it not work in a JAR deployed somewhere (in a different directory, on a different computer, ...)- Why should I not use files for accessing anything in the source folder?
- What does
Class#getResource
/Class#getResourceAsStream
do? - What's the difference between
getClass.getResource("a.txt")
,getClass().getResource("/a.txt")
andgetClass().getClassLoader().getResource("a.txt")
?- Why does it not find my resource when I use the wrong one?
- Where should I put resources?
- with Maven/Gradle but also in plain Eclipse/IntelliJ/VSC projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.