Welp, looks like I'll need to learn Maven for my course on creating new programming languages lol
I mean, it's my choice to use Maven instead of Ant or Gradle, but yeah, I gotta learn to code and compile Java outside of Eclipse lol
Maybe I should first learn how to compile and run Java without any build tool?!?

I mean, I should probably learn how to do that for an hello world?

Holy shit my Java is rusty lol
Dang lol, gedit really doesn't do anything for you lol.
(which, to be fair, is probably the right decision for a plain text editor)
(yeah, I'm writing an hello world in gedit, because I have some Java extension on VSC lol)
(which, to be fair, is probably the right decision for a plain text editor)
(yeah, I'm writing an hello world in gedit, because I have some Java extension on VSC lol)
Oh dang, the args array in Java doesn't start with the program path like in C?!
Yoooo, I can compile and run an Hello World on the command line, and I can even specify an argument to say hello to someone instead of "World"

Okay, but then why did my teacher used a classpath option during this morning's laboratory??
Me to me: That option was when running the Java program, not when compiling
Me: Welp, now I'm even more confused lol
Me to me: That option was when running the Java program, not when compiling
Me: Welp, now I'm even more confused lol
Hold on, does Eclipse have a preference for Ant?!
Holy shit lol, VSC is really doing a lot of stuff for me lol
Okay, so I can't put dashes into the groupId and the artifactId lol
Okay, so the groupID is used as the package name??
And so what's the artefactId?
The documentation says that an artefact can be a JAR, source or binary distribution, or also a WAR??
And so what's the artefactId?
The documentation says that an artefact can be a JAR, source or binary distribution, or also a WAR??
What's the difference between a JAR and a binary "distribution"?!
What even is a "source" distribution?! Is that just a zip of your .java files?!
And what's a WAR?!
What even is a "source" distribution?! Is that just a zip of your .java files?!
And what's a WAR?!
Okay, so a WAR seems to be for web pages or web apps.
Yo, implementation of CoulAdj as a Java webapp lol?

I mean, maybe I could try to first implement it in Java as a command line application lol?
Like, yeah, I have an implementation already, but...
Well, let's say it was done after my first year, so you literally have to open Eclipse to run it, LOL
Well, let's say it was done after my first year, so you literally have to open Eclipse to run it, LOL
Also, I added a file dialog window later on, but also I didn't bother to handle the case where the user cancels the dialog, so that's going to crash if the cancel button is clicked lol
Also, amazingly enough, that Java implementation managed to run the CoulAdj program in like, 4 seconds lol.
Compare with my first Python implementation this week that runs in like 8 minutes lol
Compare with my first Python implementation this week that runs in like 8 minutes lol
Like, re-implementing CoulAdj in so many languages has really made Java shine, because as a 1st year undergrad, I was able to quickly make something that would run "instantly"
Like, in Power Query, my first implementation had an estimated runtime of 8 or 80 hours, I don't remember lol. It might have been 8 or 80 days too 
For JavaScript, nothing was working until I learned about the event loop, and that meant I had to review the architecture

For JavaScript, nothing was working until I learned about the event loop, and that meant I had to review the architecture
JavaScript also necessitated tuning, because performances would be bad if you don't process enough pixels on each event loop.
But also, if you process too many, you're going to freeze the browser tab, and that is Bad lol
But also, if you process too many, you're going to freeze the browser tab, and that is Bad lol
And for Python, well my current implementation is still in the 8 minutes range lol, but I haven't looked into it thoroughly tho lol
Anywayz, now that I'm also planning to do like 3 re-implementations in Java (Command line, file dialog, and Web app), I feel like there's a real need for better test samples lol
Oh! Right!
For the Qt implementation, I got caught by surprise with the unresponsive GUI, because I had to manage an event loop just like in JavaScript,
But I had no concept of that at the time, so I just didn't lol woops
For the Qt implementation, I got caught by surprise with the unresponsive GUI, because I had to manage an event loop just like in JavaScript,
But I had no concept of that at the time, so I just didn't lol woops
So like, yeah, feels like a really good first language to learn programming,
But right now, I feel like I'd rather recommend Java, because you have less chances of running into performance issues when trying to do something big but simple?
But right now, I feel like I'd rather recommend Java, because you have less chances of running into performance issues when trying to do something big but simple?
Like, CoulAdj takes an image in input, and outputs, for each colour in the image, the list of all adjacent colours.
And like, the algorithm is really not complicated. You visit every pixel, and then visit all its neighbours, and if one has a different colour, you register it
And like, the algorithm is really not complicated. You visit every pixel, and then visit all its neighbours, and if one has a different colour, you register it
So like, the "register it" part can be tricky, but usually languages have ready-made stuff to do that and purge the duplicates.
(Power Query was... Lacking, lol)
(Power Query was... Lacking, lol)
(Like, yes, Power Query has functions to remove duplicates, but it's really not well suited to do that for millions of items)
And like, the program has a couple of tricky spots, but they're also usually beginner-level to fix.
Like, when visiting the neighbours, you need to make sure you're not trying to go outside of the image.
The output can also be finicky to format.
>
Like, when visiting the neighbours, you need to make sure you're not trying to go outside of the image.
The output can also be finicky to format.
>
You have to get an image file from the user and transform it into something your program can manipulate.
What if the user didn't give you a file?
What if they gave you garbage?
What if the user didn't give you a file?
What if they gave you garbage?
And like, yeah, knowing which data structure to purge the duplicates can be tricky, but like...
When I did it in Java, I picked the hash table because I didn't feel like I needed to sort the output.
And I had no clue how hash tables worked.
When I did it in Java, I picked the hash table because I didn't feel like I needed to sort the output.
And I had no clue how hash tables worked.
But like, the defaults for the hash tables, plus the Javadoc, were enough to guide me into writing something that worked *well*
Like, I was about to write "worked okay", but no. I'm looking at the other languages, and no. My Java wasn't working "okay". It was working *well*
Like, I was about to write "worked okay", but no. I'm looking at the other languages, and no. My Java wasn't working "okay". It was working *well*
And like, now I've been trying to implement it in Python with 2½ years of undergrad under my belt,
And my first implementation has an 8 minute runtime, and the actual solutions seem to be:
A) Completely change the algorithm
B) Introduce C/C++ in the Python module
And my first implementation has an 8 minute runtime, and the actual solutions seem to be:
A) Completely change the algorithm
B) Introduce C/C++ in the Python module
I mean, maybe Pillow is going to fare better than numpy for visiting pixels?
But like, Pillow is probably using numpy under the hood lol
But like, Pillow is probably using numpy under the hood lol
I mean, that project seem to also be an odd sheep?
Like, before implementing it myself in Java, I searched to find one someone had already done, and...
Turned out nobody really had?
I mean, I didn't find any
Like, before implementing it myself in Java, I searched to find one someone had already done, and...
Turned out nobody really had?
I mean, I didn't find any

Like, even the geography softwares didn't have a quick way to do this lol
So like, I guess that if you're more into actual image processing, you'd be fine with Python and numpy? 
Like, they certainly are making it hard for you to access individual pixels lol

Like, they certainly are making it hard for you to access individual pixels lol
Which, you know, if you're a library for matrix operations, kind of makes sense lol
Anywayz, all of this to say that I feel like it's unfair that Java is held is so low esteem in the wild when it has held so much better than so many other languages for my CoulAdj project

(off-topic)
Omfg, I so fucking hate when people talking on Zoom don't read the fucking chat
Omfg, I so fucking hate when people talking on Zoom don't read the fucking chat

Okay, so I let my Python implementation finish processing a big test in full, and the unoptimized version does it in like 10 minutes and 2 seconds lol.
Also, 2 things:
#1, the results of the big test are all correct
#2, the Python module (library?) ImageIO ignores the alpha component in bitmap images...
#1, the results of the big test are all correct

#2, the Python module (library?) ImageIO ignores the alpha component in bitmap images...

Also, formatting and writing to file the output of the big test took a whooping 0.01 second lol