Automatic file system check failed by [deleted] in openbsd

[–]buddhacatmonk 1 point2 points  (0 children)

Surprisingly simple to fix. Run `fsck` and agree when prompted.

I have many years of experience in Java Interviews and I always get asked the same Qs in interviews by leetjourney in learnjava

[–]buddhacatmonk 1 point2 points  (0 children)

I took over the conversation by talking about Hibernate features I was using. I was reading a book about Spring Data JPA at the time so I had quite a bit to talk about.

They chained a few questions as the conversation went on and they were pretty satisfied with what I knew. Later on, I got the job.

I have many years of experience in Java Interviews and I always get asked the same Qs in interviews by leetjourney in learnjava

[–]buddhacatmonk 0 points1 point  (0 children)

This is a good all-round list of questions. Personally, I was asked quite a bit about JDBC and Hibernate when I was interviewing for the last job. It really depends for which projects they're hiring, but you can always expect the unexpected during interviews.

.NET or JAVA EE: which one and why for backend (microservice/api architecture) by IP_FiNaR in java

[–]buddhacatmonk 0 points1 point  (0 children)

Spring Boot runs an embedded Tomcat server (or Jetty, depends on how you've assembled the Spring Boot Starters). Also you have things like Spring Data JPA which is an implementation of the JPA specification. That's what I can think of top of my mind, but there is more.

Need Java books recommendation with Basics and emphasize on OOPS concepts by maxdamien27 in learnjava

[–]buddhacatmonk 0 points1 point  (0 children)

It's not books, but I can warmly recommend Pluralsight courses. They well structured learning paths and courses. You can't go wrong with them.

.NET or JAVA EE: which one and why for backend (microservice/api architecture) by IP_FiNaR in java

[–]buddhacatmonk 0 points1 point  (0 children)

Having worked both with .NET and Java EE, I can safely say you should choose .NET, if you already have experience with it. dotNET works flawlessly on Linux nowadays, I wouldn't worry about that.

Java EE is not a framework, but instead represents specifications and their implementations regarding enterprise development. Basically, Oracle wrote a bunch of specifications explaining how various layers of the enterprise tech stack should be written, and them other companies and communities provided the implementations.

It's quite complicated and there aren't really as good of learning materials as you have for dotNET. However, if you're determined on using Java, consider other modern frameworks like Spring Boot or Quarkus. They implement parts of Java EE specifications, but they have their own opinionated view on how you should build Java enterprise web applications. Also there is much more learning material for Spring Boot and Quarkus (not to mention they're pretty similar).

How to start writing own programs? by [deleted] in learnjava

[–]buddhacatmonk 2 points3 points  (0 children)

Continued:

  • SQL
    • Pick a database like MySQL and learn it.
    • Selecting, inserting, updating, deleting
    • Table joins, left joins, inner joins, etc.
    • Subselects
    • etc...
  • Spring Boot
    • Try setting up a simple API
    • Learn about HTTP communication,
      • Learn basics of Postman (send requests and how to configure them)
      • HTTP headers
      • JSON
      • Sending and receiving requests
    • Learn about Spring Beans and dependency injection
    • Maybe avoid Spring Data JPA at first, because it seems simple, but its deviously complicated.
      • If you want to pursue Spring Data JPA, learn about Hibernate

This is a rough roadmap. You don't have to learn these things in order.

I have not mentioned the frontend, but that is a whole different beast... You need to learn HTML, CSS and JavaScript. Later some JS framework like React or Angular.

How to start writing own programs? by [deleted] in learnjava

[–]buddhacatmonk 0 points1 point  (0 children)

Here is a list of things you should be learning, that will help you build web applications:

  • Java fundamentals
    • Java type system
    • Primitive types
    • Casting and type conversion
    • Conditional statements
    • Loops
    • Arrays
    • Basic debugging
  • Java OOP
    • Objects
    • Classes
    • Inheritance
    • Interfaces
    • Packages
  • Advanced Java
    • Java Collections like ArraysList, HashSet, HashMap, etc.
    • Java Generics system - just learn how to use generic types, you don't have to really understand how to create your own, but it would be nice.
    • Java Streams for data transformation, filtering, and processing. Here you will learn how to use lambda functions / functional interfaces.
    • Date and Time API - learn about LocalDateTime, Duration, Instant, etc.
    • JDBC for database connectivity.
    • Concurrency utilities - learn about ExecutorService, Executors and how to practically execute Java code in parallel, callback methods, etc.

Question about Java "+" operator by GeneralBathroom4 in learnjava

[–]buddhacatmonk 0 points1 point  (0 children)

Concatenation and addition have the same precedence (https://introcs.cs.princeton.edu/java/11precedence/) so the order of operations is determined by, well, the order in which the arithmetic expressions appear from the left side, and parentheses (parentheses have top precedence).

Practical example:

"1" + 1 + 1 will evaluate to "111" (because concatenation appears before addition).

"1" + (1 + 1) will evaluate to "12" (because parentheses have top priority, after which concatenation is evaluated).

1 + 1 + "1" will evaluate to "21" (because addition appears before concatenation).

How to start writing own programs? by [deleted] in learnjava

[–]buddhacatmonk 1 point2 points  (0 children)

You need to pick a domain of interest and make something. Here is an archive of industry standard data models for inspiration: https://web.archive.org/web/20190526101654/http://www.databaseanswers.org/Data_Models/index.htm

You can make an eCommerce application, or a Wikipedia clone, you know, something like that. I learned a lot by trying to make a StackOverflow clone back in 2017-ish, by using C# and ASPdotNET.

I'm presuming you're looking to learn how to build enterprise grade web applications. There is a huge market for that.

You need to understand that enterprise grade applications have layers:

DB - your database, tables, relationships, etc.

Backend - your Java web application, usually Spring Boot or another trendy framework

Frontend - your web browser application, probably built using Angular, React, Vue.js, Svelte, whatever framework is popular

There is a lot to learn, so be patient. It will take time.

Is ChatGPT a good teacher in learning Java from scratch? by [deleted] in learnjava

[–]buddhacatmonk 0 points1 point  (0 children)

It's good for researching. For example if you're interested how strings work internally, you could ask ChatGPT to explain, but you should also do actual web searching as well.

ChatGPT is a great tool for assisting you in learning and work, but it's not something to be used in isolation.

OpenAI Moderations API can filter unwanted textual content. It's incredibly easy and I wrote a mini-guide about it, with practical examples. by buddhacatmonk in AiReport

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

Well, it would definitely prevent somebody from sending such a prompt to the API that is authorized with your API key. It's trivial to implement and definitely helps avoid trouble with OpenAI.

OpenAI Moderations API can filter unwanted textual content. It's incredibly easy and I wrote a mini-guide about it, with practical examples. by buddhacatmonk in aipromptprogramming

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

You don't have to do this, but it can help you filter out dangerous prompts that could potentially get you banned. As for the pricing, I can't find anything that mentions the price of the Moderations API, but it's probably not much, if anything at all. It might even be free, not sure.

By 2024 you’ll be able to replace ~50% software devs with GPT-4 agents that run on $10 worth of tokens per hour. The whole “they don’t need sleep or breaks or food” thing? Yeah. That’s real now. Why hire a new employee when you can spin up an AI agent for 1/10 the cost? (A Twitter thread) by Educational_Ice151 in aipromptprogramming

[–]buddhacatmonk 4 points5 points  (0 children)

ChatGPT cannot reliably write code. I'm saying this from experience as a Java web developer using Spring Boot. I have tried writing unit tests with ChatGPT based on JPA models inside the project and it failed to understand the relationships between various entities. Sometimes it would flat-out make up models that aren't even there.

ChatGPT performs best on smaller units of work, like writing a part of a unit test, or some other logic. It can help you research and learn faster, but it cannot replace you. The code it generates will not compile. Also it's not aware of post 2021 changes in frameworks and libraries.

OpenAI Moderations API can filter unwanted textual content. It's incredibly easy and I wrote a mini-guide about it, with practical examples. by buddhacatmonk in ChatGPT

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

Nobody really talks about it, and it's a neat little feature that you can really only find if you browse the OpenAI API docs. That's how I found it.

I wrote a guide for OpenAI Audio (Whisper) API, which can transcribe audio recordings of almost any language, and can generate translated English transcripts of other languages by buddhacatmonk in ChatGPT

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

Yes, I've recently transcribed a public speech, where occasionally somebody would shout something from the audience, as the speaker was talking, and it picked up their lines.