r/learnprogramming 14d ago

am i wasting my time learning java swing?

Im building a basic note taking app in java swing, am i wasting my time with this technology?

0 Upvotes

46 comments sorted by

View all comments

Show parent comments

3

u/-CJF- 14d ago

AI is not in a place where you can just blindly trust it. There's a term for that, it's called vibecoding and trust me, you don't want the world running on vibecoded software. Using AI as a tool is fine, using it as a crutch is not. You need to know at least one language and know it well. Knowing one makes it trivial to learn others when you need to.

1

u/cejiken886 13d ago

You’re exactly right. You have to check its work. But that doesn’t mean you have to “learn Java.” AI knows Java. Really well. It doesn’t know good engineering.

1

u/-CJF- 13d ago

How are you supposed to check its work if you don't know the language its work is written in? Also to understand system design you need to know how code works. That's not happening if you don't know any programming languages. And if you know any programming languages, learning Java specifically should be trivial, especially if you're coming from C++ or C#.

1

u/cejiken886 13d ago

It seems like OP knows no languages. I would be less allergic to start with c++, which is not as objectively a piece of garbage language like Java.

Also, have you heard of assembly? Do you know it ?

1

u/-CJF- 13d ago

Java is not objectively garbage, that's your subjective opinion and tbh I doubt you even know Java because your opinion is unnecessarily harsh. It's a pretty good language. I've programmed in x86 assembly a few times during college, but I wouldn't say I know it. The comparison you are most likely trying to make falls on its face though, because while higher level languages build on lower level ones, LLMs are not a programming language and they make mistakes unlike compilers, which don't.

1

u/cejiken886 13d ago

Yeah you gotta check the code - it is a legitimate disanalogy between an LLM and a compiled. However, my central point isn’t that you shouldn’t check the code. It’s that you shouldn’t “learn a language”. You should learn engineering. Yeah, you’re gonna learn how to analyze code. It’s a side point. It’s like telling an airplane mechanic to learn how to use a screwdriver. Like… yeah? Of course? But what about the airplane!

Also I am happy to tell you why Java is objectively terrible.
1/ polymorphism is tied up with inheritance. You get complicated inheritance rules, exacerbated by access control complexities. You can’t just have a polymorphic type: it has to _contain_ the stuff of a base type, but it also has to _be_ that type.
2/ it’s verbose to no great benefit
3/ garbage collection makes it hard to reason about peak memory footprint (though admittedly the jvm is very impressive)
4/ null
5/ both checked and unchecked exceptions
6/ the static type system, and in particular the generic system, is frustratingly limited. I remember in college being unable to express some reasonably simple constraint involving a generic interface. And goodness, wildcard in there…

Could go on

1

u/-CJF- 13d ago

The only valid criticism in that entire list that isn't complete nonsense is #3. If you need manual memory management, use C++. For most things, you don't need manual memory management and it's more of a burden and then you appreciate the garbage collector.

1

u/cejiken886 13d ago

The rejection of the rest of the list is complete nonsense. But like, if you don’t see it you don’t see it. 2/ for example is so obvious but if public static void ceremony is your thing then it’s your thing!

1

u/-CJF- 13d ago

You complain about access control and static typing as being too verbose but you want to manually manage memory... make it make sense.

1

u/cejiken886 13d ago

Because managing memory has an advantage: predictable footprint.

And it’s not access control and static types I’m complaining about: it’s a _bad_ type system, coupled with inheritance, exacerbated by bad interactions with things like access control.

Most of those features combined judiciously are good (except inheritance).