Dinkar Chaturvedi

Ranch Hand
+ Follow
since Mar 27, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dinkar Chaturvedi

A very warm welcome, Mark Liu, to this forum!

Couple of questions I had about the technology in general and your book in particular:

1. How do you see PyTorch compare against Tensorflow?
2. What factors made you decide to use PyTorch for this book?

Thanks & Regards
Dinkar
Thank you Ben Weidig for the insightful responses. This was helpful.

Also thanks to the members who ensured that I took away accurate information about the quick lesson on Java's history.

Thanks again!

Regards,
Dinkar
A very warm welcome to you, Ben Weidig, in this forum.

My question is more on the semantics of the language of Java. When I started learning functional programming constructs that were added to Java, I personally felt that it feels forced because obviously, it was designed with the object oriented approach in mind.

So when compared to other pure functional languages, how do you see Java's functional constructs faring against them?

Also, do you think if this limits Java's ability to allow developers to fully realize the potential of achieving the benefits of functional programming?

Thanks & Regards
Dinkar
Thank you for the response!

Yeah sure, I'll be happy to share my problem.

I have a table called membership which allows a user (entity) to join clubs (entity) which can be many-to-many relationship which is stored in the membership table. Each club has various specialized groups but as per rule, a user can choose only 1 group at any time. Changing is allowed but at any time, there can be at most 1 group user can be part of. Now we want to change this and allow users to be part of multiple groups within that club.

As you can imagine, the membership table has details of the user associated with the club and which group within that club. However, the table was designed with the rule mentioned above so we have userId and clubId as the primary keys so that table cannot have 1 user part of multiple groups in the same club as it would be a duplicate key.

We can't change the table structure to include groupId as part of the primary key because of two reasons: 1. There are millions of users and entries in that table which we dont want to disturb. 2. This is only for a very small group of users so we want to keep this change as localized as possible without touching other areas of our application.

To work around this, we decided to create a separate table called membership_plus where subsequent groups of the same club will be added. This means that the primary key of this table would be a composite key of userId, clubId and groupId. So membership will always have the first group membership of the club. Other groups go to the plus table.

Now to implement this using hibernate, in a way that I dont have to change majority of the code, I extended MembershipPlus java bean as a subclass of the Membership so that both the entries can be passed to methods wherever Membership is expected since both are identical. So I was trying to apply the table_per_class strategy by associating Membership java bean with membership table and MembershipPlus java bean with membership_plus table. However this didnt work for me. I also explored the mappedSuperClass strategy but I am not convinced whether it will be a good solution.

Thanks for reading. Hoping to get a good and practical solution that is scalabale and maintainable as well.
1 year ago
A very warm welcome to you, Cătălin Tudose, in this forum. I am thrilled to see a new book on Spring, Hibernate and the persistence API

I have been using Spring & Hibernate for quite some time now and I love the combination. Having used various different java based web technologies like the Struts framework, I can say Spring has not only survived but thrived very well.

I had a question regarding how well does Spring / Hibernate / JPA try to bridge the gap between the semantics of the Object oriented constructs within a language like Java when compared with the relational model of databases like MySQL etc.

Recently, I had a chance to work on a challenging project involving inheritance in the domain model layer however, it was not very straight forward or intuitive to say the least when I tried to use it with the existing Spring / Hibernate constructs in use in my work.

How do you foresee Hibernate & JPA evolving to a point where this issue is addressed?

Thanks in advance for your response and apologies if this was rather long  

Regards
Dinkar
1 year ago
Thanks for your response, Shai. This was insightful and helpful

Wishing you all the best :-)

Regards
Dinkar
A very warm welcome, Shai Almog and congratulations for your new book on debugging in Kubernetes.

I am sure this would be a hot seller as Kubernetes and containers, in general, gain further adoption.

I had a couple of questions from the topic of this book

  • Given that debugging is a core skill for any developer, how did your approach towards debugging change when transitioning towards a containerized environment and what were the primary factors that influenced the same?
  • Does your book focus solely on Kubernetes or the concepts described therein are applicable to other containers as well, in a general sense?


  • Thanks & Regards
    Dinkar
    A very warm welcome Daniel!

    Thanks for writing this book. Algorithms are one of my favourite areas of exploration. Looking forward to read your book.

    I have a couple of questions:

    1. Usually, books on algorithm design focus on the well known data structures. How do we extrapolate and apply this knowledge to more complex data models that one encounters in real life?
    2. Given that algorithm design has been an essential part of academics, but as one completes academics and moves ahead in the career, this knowledge and skill usually tends to be used less. How can one find ways to keep exploring and exercising the algorithmic-thinking muscle?

    Thanks & Regards
    Dinkar
    3 years ago
    Hi Iam,

    A very warm welcome to the ranch!!

    Java is now a vast ocean and choosing to write a book and what topics to include and what not, in itself, can be quite perplexing.

    I wanted to understand, how did you choose, what topics to include and what were the parameters based on which decision to include and exclude was taken
    4 years ago
    A very warm welcome to this forum Adam! I am sure your book has come at a very opportune time.

    I had a couple of questions regarding reactive programming as given below:

  • Though I have read many articles and posts regarding reactive programming, I sometimes see a mention of functional programming thrown around carelessly which tends to confuse. My question is around, how both these paradigms affect each other and how far do you see them go together?
  • As I understand reactive programming, I believe, to realize its full potential, reactive support is required end to end in any stack otherwise you don't get the full benefits of being reactive. Given that many systems are gradually warming up to this idea and have started releasing support for reactive, I wanted to know if there is an easy way to make an informed decision of choice based on available options that provide reactive support.


  • 5 years ago
    A very warm welcome to you Nicolai!

    My question is around the conceptual analogy of modules in other platforms / tools such as Maven or OSGi. What I would like to know is:

    1. How is this similar and different from modularization provided by Maven and OSGi (though these may not be comparable per se but I wanted to understand from an analogy point of view)
    2. Will these technologies work together and strengthen the notion of modules or do you think they are incompatible?
    5 years ago
    Thanks Marco for your response!

    I completely agree with your statement about this being a big topic and I certainly hope one of your next book covers this. Looking forward!

    Regards
    Dinkar
    A very warm welcome Marco! Glad to see new JDBC books coming up that emphasizes the importance of basics.

    I had a couple of questions:
  • Does this book dwell into best practices, especially around writing scalable applications that can work on heavy loads?
  • Given that sometimes framework's (eg. Hibernate) own approach becomes a bottleneck in applications demanding high performance, are they are recommendations around having pure framework based applications or a mixed approach?

  • A ver warm welcome to Heartin Kanikathottu!

    I have been reading articles and blogs about serverless programming and AWS lamdas for some time now. However, some of them raise concerns about the drawbacks of the same for instance, vendor lock-in etc.

    Does this book address these problems and provide solutions or workarounds?

    Also, does the book provide guidelines on the kind of problems this is suitable for and where it is not?

    Thanks!
    5 years ago
    Not at all. There isn't any specific thing that is bothering us with Eclipse. Its just that we wanted to explore what options do we have and if they are any better than eclipse or even worth the investment. If yes, we could evaluate how better they are in comparison to eclipse and decide if we want to use them.
    10 years ago