I Don't Always Write Hive-Engine NFT Code...

avatar

But when I do, sometimes it turns into nested mindfucks!
image.png

Been coding for a long time now.. not much surprises me anymore.. But when I wrote this logic as part of a function last night to send multiple HE NFTs in a single transaction it donned on me that I've either lost my mind or finally started producing code that almost looks professional.

The amount of nesting and whatnot on that is pretty damn neat. I'm sure there is ways to optimize that shit, and that someone classically trained in software engineering likely is appalled at how the thing is laid out, but hell, for a guy that literally has no education and learned to code from endless googling and brute forcing the logic / syntax until it goes.. Pretty neat.

If you see a way to optimize this horse shit, please post it below.. If not, that is cool too. Figured I'd share the snippet to gloat about how fucking insane some of my creations can get on the code end of things. Feel free to steal the code if it's of use to you, granted not many folks are actively coding on Hive-Engine NFT stuff.. but if you are, feel free to use the logic.


VOTE @KLYE FOR WITNESS!
( vote or our future AI overlords will require butthole scans to go shopping )
Every Single Vote Helps, Thanks for the Support!

Need to get in Contact with KLYE?
Join the Official #KLYE Discord Server Today!

image.png
Looking for an Affordable, Secure & Reliable Server Host for Your Witness Server or Other Web Projects? Check out Privex.io!



0
0
0.000
10 comments
avatar

looks so intense! as a noob coder i wouldn't know the first place to copy and paste that code in my hand lol

0
0
0.000
avatar

heh, It's taken me years to get to the point I can nest logic like that.

Better to write the stuff out to follow the logic / understand it.

It's 3 layers of iteration basically. First take the typeArray, use that to stuff the different symbols and id #'s into nftTypes, then when you're done iterating that, go to nftTypes array and use that to stuff the data into the madeNfts array, which is finally pushed to the actual JSON that Hive-Engine / Hive custom_json uses as transfers. :D

0
0
0.000
avatar

Wow! You are special! Those lines do not happen often lål

0
0
0.000
avatar

lol. Something like that.. It takes a fair amount of abstraction and logic to write shit like that.

0
0
0.000
avatar

Abstraction and logic, what a combination!

0
0
0.000
avatar

Sometimes it's even valid logic! XD

0
0
0.000
avatar

idsNshit.push()

lol

Sometimes you gotta push out some shit, bro.

0
0
0.000
avatar

The more frustrated I get in coding the more vulgar my variable names get.. XD

0
0
0.000
avatar

I 100% do the exact same thing.

0
0
0.000
avatar

As is tradition!

0
0
0.000