Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "ragnarok"
-
Is your code green?
I've been thinking a lot about this for the past year. There was recently an article on this on slashdot.
I like optimising things to a reasonable degree and avoid bloat. What are some signs of code that isn't green?
* Use of technology that says its fast without real expert review and measurement. Lots of tech out their claims to be fast but actually isn't or is doing so by saturation resources while being inefficient.
* It uses caching. Many might find that counter intuitive. In technology it is surprisingly common to see people scale or cache rather than directly fixing the thing that's watt expensive which is compounded when the cache has weak coverage.
* It uses scaling. Originally scaling was a last resort. The reason is simple, it introduces excessive complexity. Today it's common to see people scale things rather than make them efficient. You end up needing ten instances when a bit of skill could bring you down to one which could scale as well but likely wont need to.
* It uses a non-trivial framework. Frameworks are rarely fast. Most will fall in the range of ten to a thousand times slower in terms of CPU usage. Memory bloat may also force the need for more instances. Frameworks written on already slow high level languages may be especially bad.
* Lacks optimisations for obvious bottlenecks.
* It runs slowly.
* It lacks even basic resource usage measurement.
Unfortunately smells are not enough on their own but are a start. Real measurement and expert review is always the only way to get an idea of if your code is reasonably green.
I find it not uncommon to see things require tens to hundreds to thousands of resources than needed if not more.
In terms of cycles that can be the difference between needing a single core and a thousand cores.
This is common in the industry but it's not because people didn't write everything in assembly. It's usually leaning toward the extreme opposite.
Optimisations are often easy and don't require writing code in binary. In fact the resulting code is often simpler. Excess complexity and inefficient code tend to go hand in hand. Sometimes a code cleaning service is all you need to enhance your green.
I once rewrote a data parsing library that had to parse a hundred MB and was a performance hotspot into C from an interpreted language. I measured it and the results were good. It had been optimised as much as possible in the interpreted version but way still 50 times faster minimum in C.
I recently stumbled upon someone's attempt to do the same and I was able to optimise the interpreted version in five minutes to be twice as fast as the C++ version.
I see opportunity to optimise everywhere in software. A billion KG CO2 could be saved easy if a few green code shops popped up. It's also often a net win. Faster software, lower costs, lower management burden... I'm thinking of starting a consultancy.
The problem is after witnessing the likes of Greta Thunberg then if that's what the next generation has in store then as far as I'm concerned the world can fucking burn and her generation along with it.6 -
After opening game files for Ragnarok Online and saw the quest files are human readable (lua or other scripting language). Had some Flash workshops to confirm my interest.
Later in college, I make games for every lecture projects (with my friends). Now our game studio is 7 years old.2 -
Today I am experiencing all the joys of workspace virtualisation, with CIT that only looks at security, not what is used by the people and why... They restrict me now from doing my work... While I am sitting at home 🤭 yeah open up another ticket explaining these asshats that we need things to get our jobs done, and that they just do things to pretend to enhance security by destroying productivity
Let us walk into ragnarok with sun on our faces... Why the fuck do I even work here? -
What keyboard macros do you guys use when you have programmable function keys?
Also a funny little story that I just remembered. My brother used to have a key that would type his password cause he was THAT fucking lazy. He was writing an NPC for a private Ragnarok Online server that I was testing with a couple people. Apparently he had hit that function key in the middle of an announcement command.
So basically, everything went as planned, but then while announcing an event, it would announce his password to THE ENTIRE SERVER. Lucky for him, there were only three of us online at the time, and we told him as soon as it happened.2 -
!dev.
I like to hold myself off of gaming content that I don't want to spoil myself with. The Last Of Us Part I, God of War 2018, God of War Ragnarok are few of the games I deliberately didn't watch any gameplay videos of, just because I knew that these games are bangers and I should have first hand experience myself.
I'm still waiting for GoW: Ragnarok to come to PC so I can enjoy it like a first time player.
But what I didn't do, is to hold myself to Marvel Spiderman 2's gameplay spoilers. I have watched almost all gameplay videos and I now know how the game ends. And I am disappointed with what the game turned out to be. It's just punching bad guys, swinging around here and there and a story goes on in the back as cinematics.
This is a testament of how marketing can affect the hype of a game. They dropped so many abstract trailers that it kept the suspense, a bit too much. The game didn't deliver on the hype imo.
Now that I have spoiled myself, I understand that it's just another Spiderman game, like Spiderman 2018 and Spiderman: Miles Morales. And as a result, my chest now feels empty.