An After-School Program Teaches Teens Java and Python (spectrum.ieee.org)
from L4s@lemmy.world to technology@lemmy.world on 25 Nov 2023 18:00
https://lemmy.world/post/8743983

An After-School Program Teaches Teens Java and Python::The students also learn how to design board games and video games

#technology

threaded - newest

mothattack@lemmy.ml on 25 Nov 2023 19:13 next collapse

The world can be so cruel.

pivot_root@lemmy.world on 25 Nov 2023 21:29 next collapse

Back when I was in school, corporal punishment was the norm. I would still prefer that over Java.

Fades@lemmy.world on 25 Nov 2023 22:14 collapse

We get it, you have no idea what modern Java looks like

____@infosec.pub on 25 Nov 2023 23:15 next collapse

I know exactly what modern Java looks like, and it could be beautiful. But… legacy cruft and lazy devs make it painful. And tech debt, let’s be honest.

I’d view a greenfield project rather differently, but those are unicorns.

pivot_root@lemmy.world on 25 Nov 2023 23:22 next collapse

I’d view a greenfield project rather differently, but those are unicorns written in Kotlin.

BrianTheeBiscuiteer@lemmy.world on 26 Nov 2023 03:33 collapse

I don’t know a single language that’s immune to the things you just mentioned.

stardreamer@lemmy.blahaj.zone on 27 Nov 2023 00:55 collapse

Haskell is still as beautiful as the day it was first made.

Except for class methods. We don’t talk about methods.

pivot_root@lemmy.world on 25 Nov 2023 23:24 collapse

I get it, you have no idea what trying to optimize around an ever-changing JIT recompiler looks like

kaffiene@lemmy.world on 25 Nov 2023 23:59 next collapse

It looks like something that doesn’t happen

AeroLemming@lemm.ee on 26 Nov 2023 01:28 next collapse

I think if your project is so performance-critical that small runtime changes can cause performance issues, Java (or any other garbage-collected language) isn’t a good choice. That’s not the case for the vast majority of projects.

Valmond@lemmy.mindoki.com on 26 Nov 2023 09:45 collapse

Found the guy thinking java can be as fast as C/C++

pivot_root@lemmy.world on 28 Nov 2023 03:34 collapse

The just-in-time compiler isn’t bad, but the rest of it is. An optimized hot loop has the potential to emit better instructions than a C/C++ compiler not using PGO, but you’re never going to see that in any real workload.

If you could rip out/avoid the garbage collector, give it the ability to use escape analysis to avoid heap-allocating every single object, and prevent it from implicitly making every function virtual, then maybe. But at that point, you might as well just a different language.

Valmond@lemmy.mindoki.com on 28 Nov 2023 09:07 collapse

Ha I love it when I’m right 😁😉

pivot_root@lemmy.world on 28 Nov 2023 12:11 collapse

There’s a difference between the JIT being able to emit better native code than an unguided compiler, and the language being as performant as another language. Java is never going to be as fast as C or C++, and that’s something you can blame its design for.

Valmond@lemmy.mindoki.com on 28 Nov 2023 15:04 collapse

They traded speed for safety, that’s why, not something right or wrong that you should “blame” anything for IMO.

Hovenko@iusearchlinux.fyi on 25 Nov 2023 22:54 next collapse

“Python::The” That looks like Perl tho.

netchami@sh.itjust.works on 25 Nov 2023 23:16 next collapse

Java… I started with Java myself when I was a teen. It’s not a good idea.

aluminium@lemmy.world on 25 Nov 2023 23:30 next collapse

I think Java is still a good language for beginners. The tooling around it is really good and it catches lots of issues at compile time.

netchami@sh.itjust.works on 25 Nov 2023 23:30 next collapse

I’d recommend Python or JavaScript to beginners. Also, Java is dying out right now.

aluminium@lemmy.world on 25 Nov 2023 23:36 next collapse

I seriously don’t get why Python is so popular for learners. Its a weird ass very isolated language syntactically. The libraries for it are great but still.

netchami@sh.itjust.works on 25 Nov 2023 23:39 next collapse

JavaScript sometimes can be weird as hell. That’s why I prefer Python. I don’t know, for me it seemed logical from the beginning. Java definitely ain’t better.

Linkerbaan@lemmy.world on 26 Nov 2023 00:11 collapse

Because it dared to change the shitty syntax of bad syntax languages so humans can actually read it.

aluminium@lemmy.world on 26 Nov 2023 08:46 collapse

Its probably bias to what you are used to the most. I think for example copy pasting stuff around in C like languages is way easier than the tab mangling one has to perform in python.

Also python has so plenty of bizarre (i.m.o. not very readable) syntax beyond that. Like

def __init__(self) : for a constructor

the most verbose lambda syntax for something that should make it less verbose to inline functions def x = lambda x: x + 1

logical operators being words while numerical and comparative ones aren’t def x = not a or (b <= c)

private methods not really existing thus needing underscores as a crutch

I don’t wanna hate on python, the ecosystem and libraries around it are amazing but people saying python is the gold standard in terms of syntax and “readability” is questionable i.m.o… There also is a reason why many of new modern hyped languages (which don’t have to abide to backwards compatibility to some other language like mojo) like Rust, Kotlin, Go, Zig, and Swift are C style langs.

FourThirteen@lemmy.world on 26 Nov 2023 00:47 next collapse

Java is absolutely not dying… unfortunately. Billions of people depend on spaghetti code written by corporations every day. I think Java will be the next COBOL. It won’t die and it’s unfortunate.

bionicjoey@lemmy.ca on 26 Nov 2023 13:01 collapse

“Java is dying” is what people who’ve never actually worked as a dev for a big company think.

netchami@sh.itjust.works on 26 Nov 2023 13:18 next collapse

The company I work at is currently replacing all of their legacy Java shit with Go

Maalus@lemmy.world on 26 Nov 2023 14:21 collapse

Okay, and this is relevant how? One company doing stupid shit doesn’t mean a language is dying - it’s the basis of enterprise basically everywhere

netchami@sh.itjust.works on 26 Nov 2023 14:32 collapse

Many companies are migrating away from Java. Have you seen any big projects started in the last 5 years that use Java? I haven’t. Java is only used to either maintain existing stuff or to migrate away from even older shit like COBOL or Perl.

bionicjoey@lemmy.ca on 26 Nov 2023 14:57 next collapse

Many companies are migrating away from Java.

And way more aren’t. Especially among big market cap companies.

Maalus@lemmy.world on 26 Nov 2023 15:11 collapse

Yeah, I have seen plenty of big projects started in Java. Hell, I’ve written code for at least 10 of them. Just because you personally don’t see something happening, doesn’t mean it isn’t there. Java is as popular as it gets, being in the top 3 languages used. It’s not going away and it is not being deprecated any time in the future.

MonkderZweite@feddit.ch on 26 Nov 2023 14:16 collapse

You say legacy code?

BrianTheeBiscuiteer@lemmy.world on 26 Nov 2023 03:31 next collapse

Ditto. Been a Java developer for over 10 years and the tool maturity more than makes up for its faults as a language.

starman@programming.dev on 26 Nov 2023 16:18 collapse

In my opinion, C# would be better for this job. It is similar, but has many features that simplify the code, such as top level statements, LINQ, collection expressions and stuff like that. It’s also way more popular in game development and that’s what most teens are interested in

kaffiene@lemmy.world on 25 Nov 2023 23:57 collapse

Java is a great language. Still one of the most used languages in the world. Ditto python

Linkerbaan@lemmy.world on 26 Nov 2023 00:11 next collapse

PUBLIC STATIC VOID MAIN STRING ARGS

floridaman@lemmy.blahaj.zone on 26 Nov 2023 01:09 next collapse

you know how it goes

WindowsEnjoyer@sh.itjust.works on 26 Nov 2023 09:08 next collapse

Say it with me:

PUBLIC STATIC VOID MAIN STRING ARGS

ultra@feddit.ro on 26 Nov 2023 12:55 collapse

PUBLIC STATIC VOID MAIN STRING ARGS

onlinepersona@programming.dev on 26 Nov 2023 09:46 next collapse

INT MAIN INT ARGC CHAR POINTER ARGV ARRAY BODY

bionicjoey@lemmy.ca on 26 Nov 2023 13:00 next collapse

It feels like some arcane spell when you first learn it, but once you are familiar with Java, each token in that declaration feels totally justified. Like yeah, the args are an array of strings. Yeah, the main function needs to be static and public. Yeah, it doesn’t return anything inside the JVM, so it’s void.

Linkerbaan@lemmy.world on 26 Nov 2023 14:50 collapse

Java21 is gonna flip your whole world upside down

bionicjoey@lemmy.ca on 26 Nov 2023 15:05 collapse

Yeah my brain still thinks about Java in Java 8 because that was primarily what I worked on when I was a dev.

dlrht@lemm.ee on 26 Nov 2023 14:23 next collapse

This had me burst out in laughter real hard omg

eerongal@ttrpg.network on 26 Nov 2023 16:15 collapse

As of java 21, you can actually just use:

void main()

morrowind@lemmy.ml on 27 Nov 2023 09:19 collapse

You’ll definitely get to use Java 21 in whatever job you get.

onlinepersona@programming.dev on 26 Nov 2023 09:50 next collapse

Kids in Asia are way ahead of that. Some countries have had programming on their curriculum for more than a decade

realharo@lemm.ee on 26 Nov 2023 16:29 collapse

I had programming (Pascal) in school in a random-ass country in Europe 20 years ago (I was like 14).

This has been widespread all over the world for a long time.

onlinepersona@programming.dev on 26 Nov 2023 16:45 collapse

At 14 I could barely get a for loop and if statement working properly. Pascal then VB for me, once a week for 2 years. Only really started programming in uni. Some Asian countries start in primary school at as early as 3 years old. It’s as important as languages to them. By 14 they’re already doing robotics and writing social media clones.

We are quite far behind in the west.

soulfirethewolf@lemdro.id on 26 Nov 2023 10:34 next collapse

Java is a good language if you’re a beginner, but if you’ve already coded before in other languages, it’s going to suck.

sebsch@discuss.tchncs.de on 26 Nov 2023 14:51 next collapse

Especially for beginners its a bad language. You have the understand artificial concepts about classes, objects, abstract states before you re able to learn the important stuff like if/else, looping etc pp.

I would always give beginners a language which is at least in their way as possible.

Pipoca@lemmy.world on 26 Nov 2023 19:02 collapse

You don’t really have to.

You can just handwave public static void main, and only deal with primitives, then static functions, before introducing objects.

That’s what they did at my high school. It’s weird, and there’s much better ways and languages to introduce procedural programming, but it’s possible.

realharo@lemm.ee on 26 Nov 2023 16:31 collapse

They should’ve just picked Kotlin.

It also encourages good basic habits, such as not making a variable mutable unless you specifically need to (val is way more common than var, the IDE makes them very visually distinct).

[deleted] on 26 Nov 2023 14:13 next collapse

.

pineapple_pizza@lemmy.dexlit.xyz on 26 Nov 2023 16:14 collapse

Why after school? I was able to take programming classes in highschool in 2010. In the us

jasondj@ttrpg.network on 26 Nov 2023 16:45 collapse

2002, but it was Visual Basic. I got a fucking C in that class because I spent more time helping other kids figure out the assignment than spending time putting worthless clutter in my interfaces to the teachers standards.

Oh well. At least I learned how to write a GUI to track the hackers IP address.