Latest TIOBE index shows Java in decline

You are as dense as the code that you write :)
Do you do hello world examples for a living?

import x.y.AbstractConsoleChatPlugin; public class ConsoleChat extends AbstractConsoleChatPlugin { public void onInput(String input){ if("exit".equalsIgnoreCase(input)){ consoleOut("Good bye"); } } public void onKeyPress(char key){ if(key == 'S') consoleOut("You pressed 'S'!"); } }

Your code is the kinda code that results in massive security holes in the end because you all gung-ho writing direct console string manipulation. And the fact that you write console type applications using Java shows no skill in selecting propper language for a solution. A bash script would have made much better sense.
I guess the modern professional way would be to run the Java code as a Function /Lambda in a server environment. This should obviously be behind an API gateway.

But you are right - this does require bash. So we need to create a docker image based on alpine/curl with a bash script to call the api and direct input and output to the it.

Obviously we then require a key vault.

Basic modern architecture to be WebScale.
 
You are right. We just use good secure libraries like log4j.
Really? So name your favourite language? If it's python, you made hacking famous because of all the security holes.
If it's C/C++ buffer overflow was invented.. I mean seriously that is a really bad argument.

And just a thought, the log4j issue required some really stupid architecture to make possible, it was not for just your every day logging. And you know... me ... doing all enterprisy things... we had massive systems, many many java systems... not a single one compromised or affected by the log4j issue.

Make stronger arguments for your fictitious argument.
It's developers that suck, not the languages. Are you a developer?
 
Really? So name your favourite language? If it's python, you made hacking famous because of all the security holes.
If it's C/C++ buffer overflow was invented.. I mean seriously that is a really bad argument.

And just a thought, the log4j issue required some really stupid architecture to make possible, it was not for just your every day logging. And you know... me ... doing all enterprisy things... we had massive systems, many many java systems... not a single one compromised or affected by the log4j issue.

Make stronger arguments for your fictitious argument.
It's developers that suck, not the languages. Are you a developer?
My favourite language is Scratch. It is so powerful you can even build operating systems in it, with zero security issues.

https://scratch.mit.edu/projects/892602496
 
My favourite language is Scratch. It is so powerful you can even build operating systems in it, with zero security issues.

https://scratch.mit.edu/projects/892602496
Ah :) Zero security issues :) Sure :)
I dont know it, and didnt look much, but it sounds like a scripting language... using a linux kernel... so it's kinda not a scratch thing by itself? you still need a linux kernel, so you still need to compile, so means you still using c/c++ and makefiles.

If the linux kernel has a security flaw, or c/c++ has a security flaw, then your scratch has a security flaw....

Oh a little google gave me
Which is a discussion seeming to be about the team not focusing on security issues :/ it's september last year.. but yeah thats enough to take any clean record away.
 
Ah :) Zero security issues :) Sure :)
I dont know it, and didnt look much, but it sounds like a scripting language... using a linux kernel... so it's kinda not a scratch thing by itself? you still need a linux kernel, so you still need to compile, so means you still using c/c++ and makefiles.

If the linux kernel has a security flaw, or c/c++ has a security flaw, then your scratch has a security flaw....

Oh a little google gave me
Which is a discussion seeming to be about the team not focusing on security issues :/ it's september last year.. but yeah thats enough to take any clean record away.
Oh I run my daily driver in a Scratch terminal running in said Linux kernel on top of Scratch. I repeat this process about 3 times until it is impossible for any malicious code to ever have access to real hardware. I bet your fancy JVM cannot do that.
 
Oh I run my daily driver in a Scratch terminal running in said Linux kernel on top of Scratch. I repeat this process about 3 times until it is impossible for any malicious code to ever have access to real hardware. I bet your fancy JVM cannot do that.
I'm confused. You are not aware java can run on a Linux kernel?
I can probably do what you are explaining in nearly any language. Gw-basic included
 
But can Linux run on the JVM?
Yeah probably not much of an issue.
For a quick path, I could call javascript code from Java, so I could run the Linux kernel in javascript via rhino engine. Then rub docker image inside of that and run my Java. Else there's probably existing emulation work for Java that could run do it.

So not only can I do it, I can do it many different ways. The problem is thinking a single language is a glory of all things. It's not.
And take into consideration, your solution is not a one language solution, it depends on work from other languages.
 
Last edited:
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import javax.swing.*; public class SuperObscureKeyPressExample { public static void main(String[] args) { try { // Use reflection to instantiate the controller and execute it Class<?> controllerClass = Class.forName("KeyPressController"); Constructor<?> controllerConstructor = controllerClass.getDeclaredConstructor(); Object controller = controllerConstructor.newInstance(); Field observerField = controllerClass.getDeclaredField("keyPressObserver"); KeyPressObserver observer = new ObscureKeyPressObserver(); observerField.set(controller, observer); controllerClass.getDeclaredMethod("startListening").invoke(controller); } catch (Exception e) { e.printStackTrace(); } } } class KeyPressEvent { private char key; public KeyPressEvent(char key) { this.key = key; } public char getKey() { return key; } } interface KeyPressObserver { void handleKeyPressEvent(KeyPressEvent event); } class ObscureKeyPressObserver implements KeyPressObserver { @Override public void handleKeyPressEvent(KeyPressEvent event) { char key = event.getKey(); CustomLogger.log("Good Riddance'!"); } } class KeyPressBean { private KeyPressObserver observer; public void addObserver(KeyPressObserver observer) { this.observer = observer; } public void notifyObserver(char key) { observer.handleKeyPressEvent(new KeyPressEvent(key)); } } class KeyPressListener { private KeyPressBean keyPressBean = new KeyPressBean(); public void startListening() { keyPressBean.addObserver(event -> { char key = event.getKey(); if (key == 'S' || key == 's') { CustomLogger.log("KeyPressListener: You pressed 'S'!"); } }); Timer timer = new Timer(0, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // Simulate key press events, remove this in a real application keyPressBean.notifyObserver('S'); } }); timer.start(); } } class KeyPressController { private KeyPressObserver keyPressObserver; public KeyPressController() { // Use reflection to inject the observer try { Class<?> observerClass = Class.forName("ObscureKeyPressObserver"); keyPressObserver = (KeyPressObserver) observerClass.getDeclaredConstructor().newInstance(); } catch (Exception e) { e.printStackTrace(); } } public void startListening() { // Start listening for key presses KeyPressListener listener = new KeyPressListener(); listener.startListening(); } } class CustomLogger { public static void log(String message) { System.out.println(message); } }
Getting PTSD flashbacks from dealing with a previous colleague. Ask him why so complicated, and he'll drone on about best practice, and pattern this and pattern that. Until a week later and he can't remember how it works, and I have to rewrite it as 2 lines.
 
Getting PTSD flashbacks from dealing with a previous colleague. Ask him why so complicated, and he'll drone on about best practice, and pattern this and pattern that. Until a week later and he can't remember how it works, and I have to rewrite it as 2 lines.

Cool story but I think this exactly makes my point.

Those big nasty scary patterns are usable in any language. Patterns is not an invention of Java... seriously. You can use them in c/c++.
Bad use of patterns might be more likely what you are talking about.

Note your example talks about a 2 line solution.
Doesn't sound like a problem that is suitable to be solved by Java. In fact I would question whether your mate was wasting the companies time.

It can only be newbs that complain about imports in Java.
Have you seen what a .h file looks like for c++? You ain't seen nothing.
All these examples and points you all make are irrelevant. Silly scenarios for silly people that use wrong tools to do things.

This is why Python exists. Stick to Python.
 
Cool story but I think this exactly makes my point.

Those big nasty scary patterns are usable in any language. Patterns is not an invention of Java... seriously. You can use them in c/c++.
Bad use of patterns might be more likely what you are talking about.

Note your example talks about a 2 line solution.
Doesn't sound like a problem that is suitable to be solved by Java. In fact I would question whether your mate was wasting the companies time.

It can only be newbs that complain about imports in Java.
Have you seen what a .h file looks like for c++? You ain't seen nothing.
All these examples and points you all make are irrelevant. Silly scenarios for silly people that use wrong tools to do things.

This is why Python exists. Stick to Python.
You appear to be touched on the studio and rambling on about unrelated things.
 
Cool story but I think this exactly makes my point.

Those big nasty scary patterns are usable in any language. Patterns is not an invention of Java... seriously. You can use them in c/c++.
Bad use of patterns might be more likely what you are talking about.

Note your example talks about a 2 line solution.
Doesn't sound like a problem that is suitable to be solved by Java. In fact I would question whether your mate was wasting the companies time.

It can only be newbs that complain about imports in Java.
Have you seen what a .h file looks like for c++? You ain't seen nothing.
All these examples and points you all make are irrelevant. Silly scenarios for silly people that use wrong tools to do things.

This is why Python exists. Stick to Python.
82zf3c.jpg
 
Top
Sign up to the MyBroadband newsletter
X