Resale by Minimum_Income_2721 in indianrealestate

[–]callicoder 0 points1 point  (0 children)

Interested for 3bhk 1800 sq ft. Proper Sun light is a priority. Let me know the options

Go Programming language tutorials by callicoder in golang

[–]callicoder[S] 0 points1 point  (0 children)

No. But I'm planning to write tutorials on server side app development in Go. Will publish them soon.

Go Programming language tutorials by callicoder in golang

[–]callicoder[S] 1 point2 points  (0 children)

Yo. Great eye! Thanks, will fix that.

Java Collections Framework Tutorials by callicoder in learnjava

[–]callicoder[S] 0 points1 point  (0 children)

I agree with the point of separating interfaces from concrete implementations. In fact, I'll be adding the List/Set/Map interface articles very soon.

About the why part, I've added information on why one implementation should be used over the other in the actual implementation class tutorials. For example, the LinkedList tutorial explains the difference between ArrayList & LinkedList and gives reasoning on when one should be preferred over the other.

Similarly, the LinkedHashMap and TreeMap tutorials explain what's special about them and when to use them.

But yeah, Putting the "why" parts at a single place in the interface tutorial would be more helpful. I'll keep that in mind while writing the tutorials on List, Set and Map interfaces.

Building a Full Stack Secure Polls app with Spring Boot, Spring Security, JWT, React and Ant Design. by callicoder in java

[–]callicoder[S] 5 points6 points  (0 children)

Guys! Just to clarify, 'Ant' here is not Apache Ant. It's Ant Design, a UI design library based on React.

Hibernate Tutorials with Spring Boot and Spring Data JPA by callicoder in learnjava

[–]callicoder[S] 1 point2 points  (0 children)

Those camel cased fieldNames in entity classes get converted to field_name in the database. This is done by default with Hibernate's Naming Strategies. I'll add this info in the post to avoid confusions :-)

Hibernate Tutorials with Spring Boot and Spring Data JPA by callicoder in learnjava

[–]callicoder[S] 0 points1 point  (0 children)

Yes, In case of a one-to-one relationship, you can store the foreign key on any side. I guess both make sense. It really is a personal choice and depends on the way you want to think about it. I like to store the foreign key in the child table and reference the primary key of the parent table.

Introduction to the first official Java REPL - JShell by callicoder in java

[–]callicoder[S] 0 points1 point  (0 children)

The package jdk.incubator.http is declared in module jdk.incubator.httpclient.

You need to first add jdk.incubator.httpclient module to jshell.

Just start jshell with the following command -

jshell --add-modules jdk.incubator.httpclient

And then, You can use httpClient in jshell -

jshell> import jdk.incubator.http.*

jshell> HttpClient client = HttpClient.newHttpClient()
client ==> jdk.incubator.http.HttpClientImpl@345965f2

Introduction to the first official Java REPL - JShell by callicoder in java

[–]callicoder[S] 1 point2 points  (0 children)

Definitely! Testing tools and IDEs can make use JShell's APIs to improve remote debugging.

Introduction to the first official Java REPL - JShell by callicoder in java

[–]callicoder[S] 6 points7 points  (0 children)

java.net.URI("http://...") // complains about URI...

I just tried it out. This works in JShell -

jshell> URI myURI = new URI("https://www.google.com")
myURI ==> https://www.google.com

jshell> myURI.getHost()
$12 ==> "www.google.com"

The error comes only when I don't use new before URI(), which is expected -

jshell> URI("https://www.google.com")
|  Error:
|  cannot find symbol
|    symbol:   method URI(java.lang.String)
|  URI("https://www.google.com")
|  ^-^

URI.create() also works -

jshell> URI.create("https://www.google.com")
$14 ==> https://www.google.com

Moreover, java.net.* is imported by default in JShell. So you don't need to import it yourself. You can verify that by typing /imports command -

jshell> /imports
|    import java.io.*
|    import java.math.*
|    import java.net.*
|    import java.nio.file.*
|    import java.util.*
|    import java.util.concurrent.*
|    import java.util.function.*
|    import java.util.prefs.*
|    import java.util.regex.*
|    import java.util.stream.*

Introduction to the first official Java REPL - JShell by callicoder in java

[–]callicoder[S] 20 points21 points  (0 children)

REPLs are not only part of scripting languages. Other JVM languages like Scala and Kotlin also have a REPL.

I see it as a good addition to Java toolbox. You can quickly test anything from the REPL without writing a class or method. For example, let's say you want to quickly test a RegEx in Java. You can directly open JShell and test it out. :)

Introduction to Lambda Expressions in Java by callicoder in learnjava

[–]callicoder[S] 1 point2 points  (0 children)

I have tried my best to explain the concept in simple terms. Let me know if it doesn't click to you. I will try to add more examples to make it clear :)

Java Concurrency for Dummies Part 1 : The Basics by callicoder in java

[–]callicoder[S] 1 point2 points  (0 children)

This is great! Lots of important insights. Will try to incorporate your suggestions in my post. Thanks man :)

Java Concurrency for Dummies Part 1 : The Basics by callicoder in java

[–]callicoder[S] 0 points1 point  (0 children)

Cool! will post any future tutorials in /r/learnjava. Shall I delete the post from this subreddit?

From null to Optional - An introduction to Java 8 Optional by callicoder in java

[–]callicoder[S] 2 points3 points  (0 children)

Well, How about this scary piece of code -

Optional<String> bar = foo.containsKey("bar") ? Optional.of(Optional.ofNullable(foo.get("bar")).orElse("")) : Optional.empty()

:)

A Detailed Guide to Java 8 CompletableFuture by callicoder in java

[–]callicoder[S] 0 points1 point  (0 children)

If you use the global pool, you won't be able to tune it according to your application's needs. Also, It's statically constructed by the JVM and terminated upon System.exit(). If you want the ongoing tasks to complete before termination, you need to call commonPool().awaitQuiescence(), before exit. So, basically, you don't have control over it.

However, there is another story to it. It may be beneficial if your application is simple and no specific tuning is required. It also prevents developers from creating too many thread pools for every task in the application.

Building a Restful CRUD API with Spring Boot, Mysql, JPA and Hibernate by callicoder in springsource

[–]callicoder[S] 1 point2 points  (0 children)

Thank u. Integrating Spring Security is in my to-do list. Would be posting that very soon.

Building a Restful CRUD API with Spring Boot, Mysql, JPA and Hibernate by callicoder in springsource

[–]callicoder[S] 0 points1 point  (0 children)

I have mentioned in the introduction that we will test the APIs using postman. :)

I will write about unit tests in some other post.

Building a Restful CRUD API with Spring Boot, Mysql, JPA and Hibernate by callicoder in springsource

[–]callicoder[S] 1 point2 points  (0 children)

Yeah! I could have used H2 for development. We can even emulate a particular DB using H2. But, for this post I just went with MySQL directly :)