Poll

so hey how do u like school?

i love it
28 (11.2%)
it's aight
75 (30.1%)
>:(
146 (58.6%)

Total Members Voted: 249

Author Topic: night discussion topic i guess [night 1305]  (Read 2571161 times)


Blockland Forums Playing Cards???

I call dibs on being the joker card

im the king cause i'm a king



What card would fit shark


did a lil meme and made this in like 5 minutes (thanks for drawing, shark)
gotta collect em all



fun fact i forgot i wanted to draw parrot grass and i just remembered i did now
at 3:30 pm when i was about to go to bed
i sad now


well its 3:07 so you could do it in half an hour.

well its 3:07 so you could do it in half an hour.


It's 5:35 for him now.

It's 9:38PM, so thank forget this topic is still open.

What a loving day I had. Copy paste from Discord:

Quote
Today was.
forget.
I had to rewrite a core service for our game, and that service is connected to every other script in the game.
Naturally, my rewrites mean I now have to modify every other script.
But that's a tomorrow problem.
The reason for the rewrite was because, as my tech director put it, "a code smell so bad a pig would walk away."
As an example
So, we've had a problem for a week involving a certain dictionary throwing a "KeyNotFoundException"
Basically, to avoid excessive calls to the server, we have a client-side cache of both the user's data, plus any players that appear in their newsfeed/friends-list.
Now, the correct way to get data about any player was to call a method which first checks the dictionary/cache, returns that data if it exists or invalidates the data if it has expired via a simple timer, and if the data is invalid/non-existant, it then calls the server and adds the returned data to the cache.
Unfortunately, some chuckleforget decided to add not one, but EIGHT additional methods for DIRECTLY accessing the cache.
Naturally, none of these methods check if the player data exists in the cache.
Due to another issue, the cache would only ever store 1 player at a time (the user).
So, the other player data was never in the cache, and every other script was trying to access a player that didn't exist inside it, since all references to this service were for those eight other redundant methods.
By the way
The main method for accessing the cache/server data?
That was split into THREE method calls.
Plus lambda methods.
And there was technically 2 additional method calls you were supposed to make on top of that.
So
Overall
Completely convoluted and ridiculous.
I've simplified all of that to just three method calls; one for access any player data (the user or his friends), one for loading/saving the user's data to file for offline access, and one for updating the UI for all the player's data whenever that gets updated on the server.
« Last Edit: October 11, 2016, 06:43:56 AM by McJob »

When its 5 AM but you can't sleep cause your hip hurts too much from an injury and you have school the next day