#dev-general

1 messages ยท Page 96 of 1

old wyvern
#

theres a combobox on top right

hot hull
#

This man seriously has a lowercase name eeee

prisma wave
#

smh

obtuse gale
#

what a nerd

old wyvern
#

hes a camel

#

didnt get to the hump

hot hull
#

So what language shall I use

prisma wave
#

ok so what language is everyone gonna use

heady birch
#

hm

old wyvern
#

I have to have a look at the list

heady birch
#

c#

prisma wave
#

this is probably gonna be awful lol

hot hull
#

You should be warned, I've not used anything but java

old wyvern
#

xD

hot hull
#

So..

prisma wave
#

ยฏ_(ใƒ„)_/ยฏ

obtuse gale
#

lol same

prisma wave
#

hopefully simple tasks will be easy

lunar cypress
#

no idea what im gonna use

prisma wave
#

hopefully

hot hull
#

javascript cheating or?

prisma wave
#

idk

heady birch
#

oh thats not bad

#

its got hints n stuff

#

I dont even know how to convert a char into an int in C#

obtuse gale
#

lol you nerds know more than one language?

prisma wave
#

haskell is hideous

lunar cypress
#

god

prisma wave
#

this has got to be the worst language i've ever used

lunar cypress
#

told you

#

haskell is nice but it's...

#

well, haskell

prisma wave
#

it's not nice

#

at all

lunar cypress
#

aj??

#

you violated the contract

obtuse gale
#

olol

#

what contract

prisma wave
#

๐Ÿ˜ 

#

everyone gotta use a new language

obtuse gale
#

I only just tabbed into discord lol

#

oh

lunar cypress
#

use a language you've never used

obtuse gale
#

ok

#

next round

lunar cypress
#

actually that wasn't so bad

obtuse gale
#

wtf is D

hot hull
#

I tried using a different language, but I can't even figure out what the fuck I'm supposed to do with java so..

lunar cypress
#

I'm smart enough to not pick something like haskell

obtuse gale
#

lol

prisma wave
#

why is it so hard to loop through a string

lunar cypress
#

where I know it takes ages to get into

prisma wave
#

come on guys

lunar cypress
#

jokes on you

#

no loops

prisma wave
#

fuck off haskell

hot hull
#

I don't get the question BM

#

I'm dumb

prisma wave
#

abc = 1 + 2 + 3 = 6

lunar cypress
#

A = 1, B = 2 and so on

obtuse gale
#

import std;

#

._.

lunar cypress
#

don't ask me about it

prisma wave
#

is haskell prefix notation?

#

i genuinely can't tell what's going on

lunar cypress
#

no

#

haskell is not a lisp

topaz bay
#

lisps suck

lunar cypress
#

but be aware for functional languages the template they generate tends to be unusable

topaz bay
#

:)

prisma wave
#

give me death

hot hull
#

I've legit no idea

obtuse gale
#

lol which language is the closest to java i can use

#

c#?

lunar cypress
#

honestly the tasks are so small it doesn't really matter

#

any c family language will do

#

Fast code, fast.

#

this is the slogan of D

#

lol

#

always share code btw

#

oh, scala, good one

old wyvern
#

that was awfully similar to java

lunar cypress
#

scala terrifies me

old wyvern
#

seems fine

lunar cypress
#

lmao frosty

old wyvern
#

removes the need for () when no params xD

hot hull
#

I don't know any of these methods, and google ain't of help.

lunar cypress
#

I knew that bm would die here

old wyvern
#

why?

lunar cypress
#

because fucking haskell

prisma wave
#

^^

#

not even the predefined example works

hot hull
#

Hurry up BM

prisma wave
#

i hate haskell

#

so much

old wyvern
#

I don't know any of these methods, and google ain't of help.Choosing clojure was surely suicide

#

xD

hot hull
#

Yugi, I changed to Clojure at the end

old wyvern
#

ah

hot hull
#

Couldn't even figure it out with java lmao

old wyvern
#

wha

lunar cypress
#

FP programmers are divided in two groups: the smooth brain lisp people and the wrinkled brain haskell people

hot hull
#

Hey atleast I didn't get last

prisma wave
#

or the huge brain Frigga programmers

old wyvern
#

FriGay

prisma wave
#

๐Ÿ˜ 

old wyvern
#

xD

lunar cypress
#

I get anxiety attacks when someone asks me what a monad is

prisma wave
#

@hot hull somehow I beat you lmao

lunar cypress
#

LOL

hot hull
#

Scam

prisma wave
#

how

hot hull
#

That's horseshit

prisma wave
#

ok

#

let's do another like this

#

but I would advise nobody uses Haskell

obtuse gale
#

k

lunar cypress
#

allright

hot hull
#

Clojure it is

lunar cypress
#

my man

old wyvern
#

Haskell it is

hot hull
#

Finna be commiting sudoku today

old wyvern
#

(I have chosen death)

prisma wave
#

just don't

#

please

#

don't

old wyvern
#

xD

lunar cypress
#

@light leaf any comments on haskell

hot hull
#

oh god

obtuse gale
#

ONO

lunar cypress
#

jfc

prisma wave
#

wtf is this question

obtuse gale
#

codeboy sounds like a nerd

prisma wave
#

he sounds like a neckbeard

#

living off muffins cooked by his mum

#

get a job mate

obtuse gale
#

make your own fucking muffins

prisma wave
#

"His mother is a busy lady" GIVE HER A REST

obtuse gale
#

75%

#

lets go

#

beat that nerds

#

Literally didnt change a line of code btw

#

75% of the time his happy

prisma wave
#

lmao

lunar cypress
#

oh shit

#

this was shortest

#

i'm an absolute idiot

obtuse gale
#

wait what

lunar cypress
#

are you kidding aj

#

you literally just printed "HAPPY"?

obtuse gale
#

didnt touch one line

#

thats the default

lunar cypress
#

bruh

obtuse gale
#

75% ๐Ÿ˜Ž

lunar cypress
#

man I could've saved so many characters

obtuse gale
#

i didnt realise it was shortest

#

I couldnt made my so much shorter ๐Ÿ˜ฆ

#

whats taking you nerds so long, just print "HAPPY\n"

#

ez

prisma wave
#

i actually have no clue what's going on here

hot hull
#

Neither

lunar cypress
#

the entire problem statement is useless

#

it's one simple calculation

old wyvern
#

fbdbfsb

#

xD

#

That was shit

#

fuck*

lunar cypress
#

without the comments i'd have beaten that... dammit

prisma wave
#

you used haskell

#

dear god

obtuse gale
#

Is score prioritised over characters?

lunar cypress
#

yes

old wyvern
#

yes in this round

lunar cypress
#

obviously

old wyvern
#

you used haskell:)

#

xD

hot hull
#

Fucking scam I got 50%

old wyvern
#

I feel dead

obtuse gale
#

and used java

#

not even 50 frcsty

hot hull
#

Aj, I couldn't figure it with fucking java, gimme a break

old wyvern
#

That output took so much work

hot hull
#

Atleast I got a nice char number :))

old wyvern
#

for some reason you need black magic to use ternary in haskell

prisma wave
#

that was the worst question I've ever seen

lunar cypress
#

tf did y'all do

#

this is literally just a linear function

old wyvern
#

Frost

prisma wave
#

it was worded so stupidly

lunar cypress
#

m + t * x

hot hull
#

Yugi?

old wyvern
#

xD that number

hot hull
#

Yes.

old wyvern
#

start it km

lunar cypress
#

again... come on

obtuse gale
#

isnt binary representation like 1010010101001 or is that something else lol

#

oh wait

#

yeah i just didnt read lol

lunar cypress
#

damn dart is fast

prisma wave
#

ah you're using dart too

jovial warren
#

and dart is what flutter is written in

prisma wave
#

yep

#

frosty with the 666 again

hot hull
#

:)

#

ofc everyone gonna beat me, but oh well

#

That one liner tho KM

lunar cypress
#

mine is also going to be a "one liner"

#

aka freeform syntax abuse

#

has bm submitted yet?

hot hull
#

yes

#

183

lunar cypress
#

good

#

was wondering why it was still pending

prisma wave
#

๐Ÿ˜ก

lunar cypress
#

good ol' popcount

jovial warren
#

lol

hot hull
#

1 more, then I gotta go finish something

prisma wave
#

ok

hot hull
#

This man used php eeee

obtuse gale
#

Couldve simplified it more as well

#

Didnt need to make $y

hot hull
#

You could've removed a lot of spaces

obtuse gale
#

do spaces count o_o

lunar cypress
#

php is a big yikes

hot hull
#

Yes Aj

obtuse gale
#

o

old wyvern
#

Sure

#

start km

obtuse gale
#

why so much binary ._.

lunar cypress
#

wtf

#

something is wrong here

rapid vapor
#

How would i have something that writes peoples uuids to a list at the end of a command (i have already set up the custom config file) and then checks if their uuid is on that list and if it is, dont let them run it again
i have been trying to do this for ages

obtuse gale
#

AH

#

SO MANY CHANNELS

lunar cypress
#

wtf

#

why is this not working

obtuse gale
#

what is this lol

lunar cypress
#

oh my god

#

i am a monkey

prisma wave
#

lol

#

well gg

lunar cypress
#

bitwise or didn't work for me somehow

#

expected 011 got 1001

#

lol

jovial warren
#

yeah because it's expecting unsigned and you gave it signed

#

that's the trouble with those things

lunar cypress
#

user=> (Long/toBinaryString (bit-or 2 3))
"11"

#

Works fine in the repl

#

it's signed

topaz bay
#

@lunar cypress did you see the conversation about unions by contract?

jovial warren
ocean quartz
#

Asks for password

jovial warren
#

okay

#

well, time to fix

lunar cypress
#

@lunar cypress did you see the conversation about unions by contract?
@topaz bay I did not

jovial warren
#

try that link again @ocean quartz

ocean quartz
#

Now asks to log in xD

onyx loom
#

CLASH OF CODE??????????

jovial warren
#

ffs lol

#

@ocean quartz could you try again please?

ocean quartz
#

Same thing

onyx loom
#

damn it

ocean quartz
#

You thought ;p

onyx loom
#

โ˜น๏ธ

jovial warren
#

stupid bloody matrix-based security!!!!

ocean quartz
#

I remember configuring Jenkins before, it was a pain

#

Even remember having a log file with 30GB

jovial warren
#

yeah because the permissions aren't fucking normal

ocean quartz
#

That crashed the vps

jovial warren
#

I don't even have 30 GB storage on my VPS lol

#

this thing currently has 20GB

#

that's ya lot

#

I could add more, but you can only add more SSD storage, which costs a fortune

#

try again now perhaps?

onyx loom
#

unlimited storage on the cloud thinksmart

jovial warren
#

yeah but how am I gonna get a CI server on the cloud big brain?

onyx loom
#

u said it urself

jovial warren
#

I did?

#

don't remember that

onyx loom
#

use the big brain

jovial warren
#

never said I could get a CI server on to like AWS

#

or google cloud

onyx loom
#

smh ur brain aint big enough i guess

jovial warren
#

anyway, try the link again

onyx loom
#

my iq too high for all of u ๐Ÿ˜”

#

still saying to log in

jovial warren
#

FUCK

#

oh hold on

#

might be helpful if I add the READ permission

#

๐Ÿค”

#

try again

ocean quartz
#

Works now

#

Kinda

jovial warren
#

what can you see?

ocean quartz
#

Doesn't have any files

jovial warren
#

yeah not yet

ocean quartz
jovial warren
#

I literally made it about 10 or so minutes ago

topaz bay
#

@lunar cypress given

type Object

val instance: Object

typeof(instance) == "Object"

and

type Object
  toString(): String

val instance: Object

typeof(instance) == "Object | Function<Object, String>"
#

And you can imagine this pattern extends into every function contract defined in Object

#

Making the type a union of all of its contracts

lunar cypress
#

What if you have two methods with the same signature?

#

Or 2 fields of the same type

topaz bay
#

Simplest resolution would be to use the first or to not have that be a union

lunar cypress
#

Hmm

#

Are you working on this for your language?

topaz bay
#

first in terms of declaration*

#

No

#

It was just an idea I had

jovial warren
#

own... language...?

topaz bay
#

Might end up doing it, idk

ocean quartz
#

The mighty Odin

topaz bay
#

ow, one sec

#

or min* rather

lunar cypress
#

I see some challenges with that, but it's certainly something that'd be useful

old wyvern
onyx loom
#

๐Ÿ˜ฎ

jovial warren
#

best site of the century

old wyvern
#

xD

jovial warren
#

actually no

old wyvern
#

what the

onyx loom
#

lmao

old wyvern
#

who has so much free time

jovial warren
jovial warren
#

hahahaha

onyx loom
#

fuckin weirdo frosty

hot hull
#

Oi, that's what the site gave me

old wyvern
#

Should a class that has SQL in its name use it in upper or normal?thonking

hot hull
#

ClassSQL

old wyvern
#

so not ClassSql right?

hot hull
#

Ew no

old wyvern
#

Alrighty thanks xD

#

I almost did that

ocean quartz
#

It's by convention Sql in the class name

old wyvern
#

oh

ocean quartz
#

But you see a lot of it being broken everywhere like URL for example

old wyvern
#

xD welp

#

I guess its fine then

ocean quartz
#

Yeah i'd say so

prisma wave
#

URL and SQL are acronyms though

ocean quartz
#

They don't know what they want

prisma wave
#

Are they all from the Java standard lib though?

old wyvern
#

True Sql looks wrong

jovial warren
#

SqlDateConverter?

#

usage.exe: error: java.lang.NullPointerException: null

ocean quartz
#

Nah, java lib tends to do SQL

prisma wave
#

Yeah

#

Sql looks like Apache being dumb

#

@jovial warren probably converts java.time.Date to java.sql.Date or something

jovial warren
#

I think most ORM software uses Java's SQL library anyway lol

#

java.time.Date isn't a thing lol

#

java.util.Date or java.time.LocalDate I think

ocean quartz
jovial warren
#

HttpUrlConnection

#

lol

ocean quartz
#

It's all a mess

#

Do what you like better xD

prisma wave
#

oh yeah java.util.Date

#

very inconsistent

jovial warren
#

the convention by kotlin standard is: if the acronym is more than 2 letters it gets written in PascalCase

old wyvern
#

So... everyone just does what they feel like ๐Ÿ˜‚

ocean quartz
#

Exactly

jovial warren
#

it's Java

#

there is no coding convention

prisma wave
#

There kind of is

jovial warren
#

people just do whatever the fuck they want

prisma wave
#

and by that I mean there is

jovial warren
#

the only conventions Java has are ones that people have come up with themselves

prisma wave
#

Uhh... No?

jovial warren
ocean quartz
#

Java changed a lot over the years, in the beginning yeah there was nothing

jovial warren
#

that link I sent is from 1997 and it's still probably quite valid lol

#

wait is Java SE 8 not LTS any more?

prisma wave
#

It is

#

Ends next year iirc

jovial warren
#

I know 11 is LTS, never knew they removed LTS from 8

prisma wave
#

"Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML)" looks like the convention is URL

jovial warren
#

yeah

prisma wave
#

I think it's because Java 11 is the latest LTS

jovial warren
#

even though the official Java class including both of those words is HttpUrlConnection

#

a.k.a the worst library in Java

ocean quartz
#

StructuredQueryLanguage

jovial warren
#

unless they've updated it

ocean quartz
#

Best name for class

old wyvern
#

yes

jovial warren
#

StructuredQueryLanguage
StructuredQueryLanguageException

#

MyStructuredQueryLanguageDatabaseType

#

MariaDatabaseDatabaseType

old wyvern
#

what?

jovial warren
#

MicrosoftStructuredQueryLanguageServerDatabaseType

#

DatabaseType is a thing from ORMLite, dw

old wyvern
#

What is the DatabaseType supposed to be

jovial warren
#

first thing I could think of lol

old wyvern
#

oh

ocean quartz
#

PostgresStructuredQueryLanguageType

jovial warren
#

the DatabaseType interface represents a type of database

#

it's PostgreStructuredQueryLanguage

#

idk why loads of people call it "postgres" lol

ocean quartz
#

Oh yeah that was a typo

#

Lovely HypertextTransferProtocolPostRequestDecoder

jovial warren
#

"also known as Postgres"

#

originally named POSTGRES

#

that'll be why

#

why is MongoDB in the "People also search for" section

#

it's probably the worst database driver I can think of

#

the syntax is a mess, and it's non-relational

prisma wave
#

non relational doesn't mean bad

ocean quartz
#

Postgre is pretty meh as well imo

jovial warren
#

non-relational means annoying

#

and it means I'd have to redesign my plugin lol

prisma wave
#

Not necessarily

#

Well yes

#

But that doesn't make it bad

#

That's like saying "python is bad because I'd have to redesign my Java app to be in python"

rotund egret
#

True

old wyvern
#

xD

rotund egret
#

Python is bad confirmed

jovial warren
#

non-relational is annoying though

#

relational databases just make thing easier since you don't have to repeat yourself

onyx loom
#

i like repeating myself

#

did i ever say kotlin is good btw?

prisma wave
#

Never heard that

onyx loom
#

maybe i dont like repeating myself then โ˜น๏ธ

jovial warren
#

lol

prisma wave
#

and non relational can be fine depending on the data you are storing

ocean quartz
#

Tbh a lot of people (specially on spigot) use MySQL without relationships anyways, for them it'd be the same

jovial warren
#

yeah but say if you had a database of customers, and a database of the items they've purchased (for example), it'd be much easier to just have one row in the purchases table that "points to" the customer's ID in the customer table

#

Tbh a lot of people (specially on spigot) use MySQL without relationships anyways, for them it'd be the same
that's just because half of these idiots don't have a clue what MySQL even is or how it works lol

old wyvern
#

Yes but you are only considering that case

jovial warren
#

actually "idiot" depends on how bad your programming is

old wyvern
#

it depends on what you need is

jovial warren
old wyvern
#

whats that?

prisma wave
#

yeah but say if you had a database of customers, and a database of the items they've purchased (for example), it'd be much easier to just have one row in the purchases table that "points to" the customer's ID in the customer table
Theoretically non relational is faster as it avoids multiple queries

jovial warren
#

@old wyvern just look at the code

#

then you'll understand

prisma wave
#

So saying "non relational bad" is quite naive

jovial warren
#

yeah I guess, I just don't like it that much

prisma wave
#

fair enough

jovial warren
#

I thought it was non-relational?

#

public static FatBucket getPlugin;

prisma wave
#

it's NoSQL but not explicitly non relational

old wyvern
#

a variable named as a getter

#

camouflage

#

lmao

jovial warren
#

not just that

prisma wave
#

They just say you should prefer embedded documents

jovial warren
#

he's literally getting a static instance from the main class

#

and then initialising it

old wyvern
#

yes but thats the first time I see someone name a variable like that xD

jovial warren
#

oh he does it in all his plugins

old wyvern
#

like what went through their mind?

jovial warren
#

even the ones he charges people money for

hot hull
#

@onyx loom This man clearly hasn't contemplated life before

jovial warren
#

and people actually pay the price

old wyvern
#

whats his name?

jovial warren
#

RandomHashTags

#

a.k.a RandomDumbAss

onyx loom
#

xd

old wyvern
#

wow

hot hull
#

The trash that is RandomPackage

old wyvern
#

even his name sounds bad

hot hull
#

I had a stroke looking through that code

onyx loom
#

@onyx loom This man clearly hasn't contemplated life before
@hot hull thats not very nice. say sorry

jovial warren
#

@hot hull I tried to fork that once, gave up in less than a minute

#

idk how tf he copes

hot hull
#

I didn't even get to the point of forking it lmao

jovial warren
#

whatever he's on I want some of it

onyx loom
#

does the plugin work tho laugh

jovial warren
#

yeah it does

#

but the spaces in the configuration paths just sealed the deal for me

#

from the variable named as getter getting a static instance of the main class, to the very very poorly named classes in the util package, to the spaces in the configuration paths

onyx loom
#

i hope my first plugin once i get to that stage will be as bad

#

so u can all roast me

#

will be fun ๐Ÿ™‚

hot hull
#

Better be that 69420 lined chat clear plugin

jovial warren
#

lol

#

let's see how his bot is written

#

IT'S NOT EVEN AN INTERFACE

#

ONLY INTERFACES ARE SUPPOSED TO BEGIN WITH AN I

#

AND IT'S SUPPOSED TO BE A CAPITAL I

#

sorry about that lol

onyx loom
#

im thinking to just make a join plugin for my first

#

@hot hull

prisma wave
#

fork it and fix everything

#

@onyx loom recreate hypixel

#

It's pretty easy

jovial warren
#

@prisma wave this guy is beyond hope

onyx loom
#

oh yeah true

#

ight ill do that

jovial warren
#

private final boolean isPremium;

#

at least this one uses getters and setters PROPERLY

topaz bay
#

The first mistake was using gitlab

#

Lets be honest here

prisma wave
#

you're not wrong

jovial warren
#

yeah idk about GitLab

topaz bay
#

Its not even self hosted

#

Like... come on...

#

Thats the only true "benefit"

jovial warren
#

what do you use for self-hosted? Gitolite?

prisma wave
#

I only use gitlab for commissions just to separate it from my GitHub

topaz bay
#

I dont self host

jovial warren
#

I use GitHub for public projects at the moment and I'll probably setup Gitolite on the dell optiplex machine I have behind me for private projects

prisma wave
#

self hosting isn't worth it imo

topaz bay
#

literally why

#

You get unlimited private repos on github

jovial warren
#

no you don't

prisma wave
#

You do

topaz bay
#

Yes you do...

jovial warren
#

lemme find this hold on

#

oh wait maybe the restrictions only apply to organisations

prisma wave
#

mhm

jovial warren
#

which only get 2,000 min/month for the free plan

#

but I like self hosting anyway

#

actually hold on

#

I've got GitHub pro and I get a maximum of 3,000 minutes every 4 days on private repos

topaz bay
#

Thats 2000 for actions

#

Aka, their advanced CLI

jovial warren
#

yeah gl to me filling that

prisma wave
#

does anyone even use actions?

#

like anyone?

topaz bay
#

I do

jovial warren
#

actions?

prisma wave
#

why tho

topaz bay
#

Not very often though

prisma wave
#

They kinda suck

topaz bay
#

Why not?

#

WHAT

#

How??

prisma wave
#

Travis is much better

topaz bay
#

Based on what?

prisma wave
#

My personal opinion and experience with the 2

topaz bay
#

Stupid.

jovial warren
#

what even are "actions"?

prisma wave
#

Travis seems more mature, the yaml is less obnoxious

#

GitHub CI

jovial warren
#

travis? jenkins ๐Ÿ˜Ž

topaz bay
#

How is it obnoxious?

prisma wave
#

It uses map lists

topaz bay
#

That doesn't answer the question

prisma wave
#

Idk it just seems much messier

jovial warren
#

jenkins doesn't have any yaml

#

from what I've seen so far

prisma wave
#

Yaml was probably a bad choice for why they're trying to do

jovial warren
#

yeah I get free travis ci with my gsdp but I ain't using it lol

topaz bay
#

Why even make the claim of something being better without objective attributes to back it up

#

:/

jovial warren
#

alright brb dinner time

prisma wave
#

Because it's subjectively better

topaz bay
#

Just say you prefer it over something else

#

Don't make the claim of it being better

prisma wave
#

My experience with actions has been frustrating at best. They try to do way too much in just yaml, the entire process seems convoluted and verbose, idk

topaz bay
#

I don't understand this perspective

#

The only roadblocks I have come into contact with have been purely with the lack of something being implemented

#

Its not convoluted at all

jovial warren
#

you say things are "better" all the time and most of the time they're subjective opinions lol

topaz bay
#

@jovial warren That is unequivocally untrue

#

The only things I claim to be better here are IntelliJ and Gradle, both of which are objective better than all of their competitors, in many ways.

jovial warren
#

the IntelliJ one I can agree with, Gradle though, guess you could say that building 7-85x faster than maven is objectively better

topaz bay
#

Name a single thing that maven does better than Gradle

#

objectively.

jovial warren
#

objectively?

#

idk

#

subjectively? XML layout

topaz bay
#

I specifically stated objectively.

#

And you fallback to subjective matters.

#

The answer is nothing

jovial warren
#

what does gradle do objectively better than maven?

#

other than the build speed

topaz bay
#

Portability

#

Plugin Ecosystem.

#

Tooling Integration

jovial warren
#

I don't find maven's plugin ecosystem to be that bad

topaz bay
#

Did you consider thats because its pretty much non existent?

jovial warren
#

maven has built-in plugins and I suppose that's about it

topaz bay
#

Thats not an ecosystem

jovial warren
#

good point

pliant badger
#

When did you start using some sort of version control software like github, like how much time after first writing code?

topaz bay
#

When you say "first writing code", are you referring to first starting a project? Or like... writing code in general

jovial warren
#

I would suggest he means when you actually first start

pliant badger
#

Yeah let's assume after the hello world print

jovial warren
#

getting in to good habits (a.k.a using build automation and version control early on) is very good imo

pliant badger
#

I'm actually worried that i am too slow in what i am doing

jovial warren
#

it may be a little difficult for beginners to get the hang of, but it isn't that hard once you get to know it

pliant badger
#

i'm about 6 months in and now it's the first i'm trying it out

jovial warren
#

trying git? git's easy, trust me

#

literally you just push code to a repository and that's it

#

git isn't the more difficult part

pliant badger
#

yeah i kinda used only 3 commands

jovial warren
#

yeah

#

I think GitHub might tell you what to do when you first open a new repo, GitLab definitely does

#

just tells you how to hook it up

pliant badger
#

Yeah i'm not worrying about actually using that kind of software

jovial warren
#

you using build automation yet?

#

a.k.a maven or gradle

pliant badger
#

Used it in a couple of projects

#

mostly maven

jovial warren
#

use it in all your projects

#

Gradle builds much much faster, though I personally prefer Maven's XML layout, it's really up to you

errant geyser
#

Just going to sneak in and add absolutely nothing to the conversation, your welcome. gradle mr

pliant badger
#

Same reason i used maven, the pom file it's way easier to navigate and to read imo

topaz bay
#

How does this make sense?

errant geyser
#

Yeah that's got me a little bit

jovial warren
#

what's got you?

topaz bay
#

There is no way in hell you find it easier to read a giant XML document that a couple of lines of groovy

jovial warren
#

well I do

topaz bay
#

Its literally impossible

jovial warren
#

it isn't

#

because I do

errant geyser
#

What Sx said

#

Except for the impossible bit

pliant badger
#

i mean it's longer but i think because it has a syntax similar to html

jovial warren
#

XML is a markup language

#

eXtensible Markup Language

errant geyser
#

Just like Hyper Text Markup Langauge. That's why its familiar

jovial warren
#

yeah

topaz bay
#
plugins {
  id 'java'
}

repositories {
  maven({ url "https://papermc.io/repo/repository/maven-public/" })
}

dependencies {
  implementation "com.destroystokyo.paper:paper-api:+"
}
#

11 lines

#

And you're on your way to making a plugin

#

I'm pretty sure XML has 11 lines of ceremony to begin with before you even start to add your project specific details xD

jovial warren
#
<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
topaz bay
#

hyperbole. btw.

jovial warren
#

that's just the shade plugin for maven

#

I'll give you that, gradle is a lot lot more compact

#

also, why tf do you depend on the paper api?

topaz bay
#
plugins {
  ..
  id "com.github.johnrengelman.shadow" version "5.2.0"
}

..

import org.apache.tools.ant.filters.ReplaceTokens

processResources {
    from(sourceSets.main.resources.srcDirs) {
        filter ReplaceTokens, tokens: [version: project.version]
    }
}
#

equivalent in gradle ^

jovial warren
#

looks about right

#

looks a bit complex for me though

#

don't ask why

topaz bay
#

And why wouldn't you use the paper api?

jovial warren
#

idk, incompatibilities?

topaz bay
#

....

#

Why would you not run a paper server?

jovial warren
#

I do agree though, paper is objectively superior to spigot

prisma wave
#

Maven bad gradle good

jovial warren
#

but some weirdos still run spigot servers

prisma wave
#

if you know it will be only on paper, who cares

jovial warren
#

Maven bad gradle good
gradle is objectively better than maven in lots of ways yeah I agree

prisma wave
#

Use paper API

jovial warren
#

you can't run a paper plugin on a spigot server though

topaz bay
#

Yes you can

jovial warren
#

can you?

topaz bay
#

You just cant use any paper specific apis

jovial warren
#

yeah

topaz bay
#

Which is not hard

jovial warren
#

if you do you've made your plugin spigot-incompatible

#

is the paper API better to use than spigot's API?

topaz bay
#

paper IS spigot

#

Its spigot with additions

prisma wave
#

Paper API has more features

jovial warren
#

yeah ik

topaz bay
#

So wdym is it better to use?

jovial warren
#

does it have proper multithreading?

topaz bay
#

Its the same api

#

xD

prisma wave
#

Not really

jovial warren
#

does it fix any of the major issues with the spigot API that make it a pain to work with?

prisma wave
#

the default Minecraft server isn't thread safe, no amount of patching will fix that

#

yes

jovial warren
#

might start using it then

prisma wave
#

there's literally no reason not to

jovial warren
#

as long as it won't make my plugins incompatible with spigot

prisma wave
#

Unless it's a public plugin

jovial warren
#

which it is

#

going to be

#

should probably use spigot if it's public then

#

going to be*

heady birch
#

Have you tried Thread.setSafe(true)?

#

Lol

jovial warren
#

since when was that a method

prisma wave
#

damn good idea

heady birch
#

Race conditions drop to 0%

jovial warren
#

also you two

prisma wave
#

why didn't mojang think of that smh

pliant badger
#

could you guys give me some feedback on how i could improve my coding style?
i mean if i send you a code snippet? I don't really know how to get feedback lol.

prisma wave
#

sure

heady birch
#

Also, I have to add Lol underneath incase you think I'm being serious

pliant badger
#

this is a database class, i had some problems before that i think it made it some kind of god object and i was wondering if it's better now:

public class DatabaseClass {
    Main main;
    private Connection litebansCon;
    private Connection playerpointsCon;
    private Connection luckpermsCon;
    LitebansData lbd;
    PlayerPointsData ppd;
    LuckpermsData lpd;
    public LuckpermsData getLuckpermsData() { return lpd; }
    public LitebansData getLitebansData() { return lbd; }
    public PlayerPointsData getPlayerPointsData() { return ppd; }
    private String getFromConfigPath(String path) {
        return main.getConfiguration().getString(path);
    }

    public DatabaseClass(Main main) {
        this.main = main;
        try {
            createDatabasesConnection();
        } catch (SQLException e) {
            e.printStackTrace();
            main.getLogger().info(Colors.color(getFromConfigPath("DatabaseError")));
        }
        lbd = new LitebansData(litebansCon, main);
        lpd = new LuckpermsData(luckpermsCon, main);
        ppd = new PlayerPointsData(playerpointsCon, main);
    }
    //Method to connect to different databases
    private Connection connectToDatabase(String database) throws SQLException {
        String ip = getFromConfigPath("Ip");
        String port = getFromConfigPath("Port");
        main.getLogger().info(Colors.color("&fAccesez baza de date &6" + database + " &fpe adresa " + "&8[&6" + ip + "&8]"));
        return DriverManager.getConnection(
                "jdbc:mysql://" + ip + ":" + port + "/" + database,
                main.configuration.getString("User"),
                main.configuration.getString("Password")

        );
    }
}
topaz bay
#

@pliant badger put it on github

#

OH

#

Ok

#

lol

pliant badger
#

oh shit

jovial warren
#

wait hold on

prisma wave
#

that's definitely doing too much

jovial warren
#
  1. not using ORM
  2. getting plugins' databases directly? is that what I see?
old wyvern
#
    private Connection playerpointsCon;
    private Connection luckpermsCon;```Why are you storing connections?
jovial warren
#

and 3, yeah it's definitely doing too much as BM said

old wyvern
#

waaay too much

pliant badger
#

I need the connection from when i run the queries

topaz bay
#

Not using an ORM is not a bad thing

prisma wave
#

ORM isn't a necessity

#

^

topaz bay
#

Some would even say its better

jovial warren
#

ORM is just better though

topaz bay
#

Some is me.

prisma wave
#

in fact I'd say it's overkill for some things

topaz bay
#

I'm talking about me

#

lol

jovial warren
#

yeah I can tell

pliant badger
#

I mean i'm just trying to understand what i could do in order to simplify the code

topaz bay
#

ORMs are not "better"

jovial warren
#

so you think raw queries is better than a DAO API @topaz bay ?

prisma wave
#

I only use an ORM if setting all the relationships manually is too complex

topaz bay
#

There are many ways in which they are worse

#

How tf...

#

The dichotomy isnt a DAO and raw queries

#

You can implement a DAO with raw queries or an ORM

jovial warren
#

you can use both

#

they usually come together

#

I suppose DAOs do essentially just execute raw queries anyway

prisma wave
#

@pliant badger refactor. Your class shouldn't know anything about Luckperms, Litebans or PlayerPoints for one thing. Where are these methods coming from? createDatabasesConnectionfor example

jovial warren
#

yeah

#

also you're hooking in to LiteBans @pliant badger ? good luck

#

no wonder you're connecting to the database manually for LiteBans

pliant badger
#

i mean i read the litebans api wiki

jovial warren
#

but the other two should have non-shitty API's that can do that for you

topaz bay
#

What language is that?

pliant badger
#

Romanian btw

topaz bay
#

Makes sense

jovial warren
#

i mean i read the litebans api wiki
the LiteBans API Wiki? you mean you actually managed to survive reading that?

#

whatever you're on, I want some of it

#

no but on a serious note, for LiteBans, you might as well connect to the database yourself

pliant badger
#

Queries from the api and my queries are basically the same

jovial warren
#

yep

#

because LiteBans' so-called "API" isn't even really an "API", it's just a joke

topaz bay
#

everything about litebans is a joke

jovial warren
#

it's just kinda there because Ruan doesn't want to seem like a dick

pliant badger
#

So the class knows too much that for sure from what i understand

topaz bay
#

Yes

jovial warren
#

everything about litebans is a joke
I second that

topaz bay
#

This is known as breaking the Single Responsibility Principle or SRP

#

?solid

compact perchBOT
jovial warren
#

good idea, getting good practices ingrained early on

pliant badger
#

read about solid and grasp

jovial warren
#

I don't even know those fully

pliant badger
#

yeah me neither

#

i just want to get better but i feel overwhelmed sometimes ngl

heady birch
pliant badger
#

more practice should fix that.

topaz bay
#

Its a set of responsibility patterns

jovial warren
#

@heady birch you should rename yourself to "SpringBot"

prisma wave
#

@pliant badger a lot of it does come down to practice

heady birch
#

if i could ๐Ÿ™„

jovial warren
#

you can't change your nickname?

prisma wave
#

only boosters can

#

and the fancy admin people

jovial warren
#

that's a little P2W

#

lol

topaz bay
#

Its cosmetic

prisma wave
#

^

#

they are complying with the EULA

topaz bay
#

That is literally the opposite of pay to win

prisma wave
#

/nick

pliant badger
#

So if i understood correctly i good way i could refractor is making the database class only have the method that returns a connection to a specific database, and then actually call that method from classes that handle those specific cases

#

like playerpoints and stuff

jovial warren
#

yeah I was joking @topaz bay

topaz bay
#

I didn't realize you possessed the ability to do such things

jovial warren
#

you take ME seriously?

pliant badger
#

I like brister because he's purple.

jovial warren
#

that's a first

prisma wave
#

@pliant badger me too

#

it's a good colour

errant geyser
#

he can't stay purple forever

jovial warren
#

how do you get those custom colours?

errant geyser
#

Tiers

prisma wave
#

they aren't custom

jovial warren
#

whatever they are

prisma wave
#

it's tier 5 where the cool kids hang out

pliant badger
#

i like this green a lot, i use it in my windows color theme

jovial warren
#

it's teir 5 where the try hards hang out more like @prisma wave

prisma wave
#

i'm no tryhard

#

i've just been here a while

errant geyser
#

Hey BM if you just helped us all out with like a 400x global multiplier we'd all be the cool kids ๐Ÿ˜Ž

jovial warren
#

ik I'm kidding

prisma wave
#

ik lol

#

400x global multiplier

jovial warren
#

Hey BM if you just helped us all out with like a 400x global multiplier we'd all be the cool kids ๐Ÿ˜Ž
max you can get is 10x

prisma wave
#

how am I gonna do that

jovial warren
#

when someone boosts

errant geyser
#

Irrelevant

jovial warren
#

unless they stack

prisma wave
#

they don't

errant geyser
#

Bribe the admins

jovial warren
#

with what?

#

idk about you guys but I'm a bit skint over here

prisma wave
#

I could go on strike

errant geyser
#

Not having to use BMs latest invention

prisma wave
#

then they would lose their most active member

jovial warren
#

maybe you guys get paid to code

prisma wave
#

look at that

jovial warren
#

=stats

errant geyser
#

Haha I wish. I've been paid like once, the rest I've either been scammed or done for free since u have almost no way to receive payments anyway

jovial warren
#

=stats top_users

prisma wave
#

they would miss out on a lot if I went on strike

jovial warren
#

wait I'm #2?

#

get in there

errant geyser
#

BM hows your aids machine coming? You need some help deep frying the Roblox oof sound or some other earrape material?

prisma wave
#

I'm kinda scared to do anything

onyx loom
#

bardy eventually gonna overtake me ๐Ÿ˜ฆ

jovial warren
#

@onyx loom yep lol

#

nah it'll take me a long time

prisma wave
#

getting to tier 5 takes a very long time

errant geyser
#

Why? Are you afraid of the mighty OOF

prisma wave
#

not tryna flex or anything but I've been active since august 2019 and only just got it

#

@errant geyser terrified tbh

onyx loom
#

august?

prisma wave
#

I fear death

#

ye

onyx loom
#

ive been active since like november

jovial warren
#

idk about you but I no life this thing

prisma wave
onyx loom
#

yet we same level

errant geyser
#

R.I.P we lost a true gamer today

prisma wave
#

hmmm

topaz bay
#

trash

jovial warren
#

hence why I've been here since about may and I'm already lvl 23

prisma wave
#

@onyx loom you are a sweat

topaz bay
#

cause you talk too much

jovial warren
#

actually it's 30th april

onyx loom
#

im not โ˜น๏ธ

prisma wave
#

you are

onyx loom
#

how โ˜น๏ธ

prisma wave
#

idk

jovial warren
#

cause you talk too much
finally, something I can fully agree with

onyx loom
#

ok

prisma wave
#

yes

topaz bay
#

Tu parle trop

#

lol

prisma wave
#

vous tout parlez trop

topaz bay
#

uhhh

#

non

#

grand non

jovial warren
#

hablas demasiado

topaz bay
#

cest pas vrai

onyx loom
#

baguette

topaz bay
#

juste cette enfant

prisma wave
#

c'est vrai

pliant badger
#

j'aime le baguette.

prisma wave
#

c'est tout vrai

topaz bay
#

je cest pas comment tu dite "teenager" en fraincais

jovial warren
#

haven't done french since year six

prisma wave
#

je sais pas*

#

buffoon

topaz bay
#

dont correct me bitch

prisma wave
#

regarde-moi

topaz bay
#

I already told you I dont do french writing

prisma wave
#

j'ai oublie ca

errant geyser
#

I'm glad I dropped French as soon as I could. Anyway, j'adore BM earrape baguette machine in French

prisma wave
#

oui oui earrape

onyx loom
#

i want earrape

#

where can i find this beauty

prisma wave
#

it's kind of complicated by the fact that I reset my pc and hadn't backed up my deep frier

#

so that will be fun to rewrite

onyx loom
#

yikes

errant geyser
#

NOร’ร’OOร’OOO

prisma wave
#

it took like 3 hours

#

won't take long

#

i just cba

errant geyser
#

Today the world lost the most significant invention since, like, gravity. shut your face 4head I'm aware it's not an invention

prisma wave
#

we need to have a minute's silence

#

to pay our respects

errant geyser
#

Starting now. I'm timing this.

topaz bay
#

technically, gravity as we know it was invented by humans

#

smile

jovial warren
#

time was also invented

#

as a word, and also as a measurement

#

the flow of space-time wasn't invented

onyx loom
#

how dare u speak during a minute of silence

prisma wave
#

you two disgust me

#

interrupting the minute's silence

#

have you no respect?

topaz bay
#

The part where I said "as we know it" is very important

onyx loom
#

smh my head

#

not even a SORRY

topaz bay
#

fuck your silence

onyx loom
#

๐Ÿ˜ 

prisma wave
#

you will regret this

#

mark my words

topaz bay
#

You will RUE the day

errant geyser
#

How DARE you interrupt this moment of universal sadness

jovial warren
#

smh my head
get out

errant geyser
#

I can't spell now

#

Great

onyx loom
#

no u get out

#

talking during minute of silence

jovial warren
#

"smh my head" = "shaking my head my head"

#

n00b

onyx loom
#

SMH MY HEAD

errant geyser
#

You dont get to judge after disrupting the moment of global grieving for our lost program. He was better than we will ever be. He was so good. Always deep frying the memes we gave him. Always fucking destroying our ears. What more could we ask for?

jovial warren
#

lost program?

prisma wave
#

truly beautiful words

jovial warren
#

"what more could we ask for" more like "what less could we ask for"

prisma wave
#

LOOK AT THAT

#

don't tell me that's not beautiful

onyx loom
#

reeeeeeeeeeeeeeeeeee

jovial warren
#

yeah ik it's trash

#

we get it

onyx loom
#

WHAT

#

how dare u

#

get out

jovial warren
#

this is one of the rare times I actually agree with sxtanna

onyx loom
#

im disgusted

#

even if u think its trash (OPINIONS) u should respect the death of the amazing feat in humanity

topaz bay
#

You don't have to agree with me for me to be right.

#

๐Ÿ˜ˆ

jovial warren
#

we know

#

anyway, gotta be off for the night, see you guys tomorrow

onyx loom
#

gn

prisma wave
#

gn

topaz bay
#

finally

#

omg

jovial warren
#

lol

onyx loom
jovial warren
#

finally
to me pissing off for the night?

jovial warren
#

someone ban tenor

#

gn everyone

old wyvern
#

gn

errant geyser
#

Gn

ocean quartz
#

Just give up windows, i ain't using that

topaz bay
#

its chrome

ocean quartz
#

Chromium not chrome

topaz bay
#

its literally the same thing

ocean quartz
#

Kinda, one is not annoying me all the time to make it the default browser xD

topaz bay
#

Wouldnt do that if it was the default browser

ocean quartz
#

but i don't wanna

errant geyser
#

Matt just try it

#

I use it over Chrome and I like it much more

topaz bay
#

I never get bothered by it?

#

How does it constantly annoy you?

ocean quartz
#

It doesn't constantly but once in a while windows update does annoy you to use it

topaz bay
#

oh...

errant geyser
#

Windows updates are generally a pain in the ass anyway

ocean quartz
#

And katsumag nah i am too used to chrome at this point

errant geyser
#

Ok. I just like the UI design a lot more. Plus like, force dark mode

topaz bay
#

force dark mode?

errant geyser
#

Have you not seen it?

#

๐Ÿ˜ฒ

#

Google it

topaz bay
#

I mean... I don't use it...

#

So no...

errant geyser
#

Its SOOOOO good

topaz bay
#

Gonna have to disagree with you on that one

#

dark reader better

#

lol

#

Which technically, since its chromium now

#

You can use the same extension on edge

errant geyser
#

Imagine not using Piggys dark theme for spigot and the Stylish GH dark theme

#

I can't remember if it's called Stylish or Stylus

#

One of the two

topaz bay
#

I have dark them everywhere

#

smile

errant geyser
#

So do I

#

But I agree the force dark theme option for GH is hideous

ocean quartz
#

I'm terrible at valorant damn

topaz bay
rotund egret
#

That is legitimately my favorite video

topaz bay
#

I love the "How It's Made" format of these kind of videos

#

That was legitimately my favourite show as a child

quiet depot
topaz bay
#

BRUUUHHHH

#

These dutch tilts

#

If a video doesn't have at least 1 dutch tilt, its not a real how its made video

#

@quiet depot ...