Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "random tip"
A Decrementing loop that compares against a zero is faster (even though insignificant on current hardwares)
than an Incrementing loop that compares against a constant/variable.
for( i = num; i != 0; i -- )
is faster than
for( i = 0; i != num; i ++ )
The difference shows up significantly on resource constrained hardwares such as 8-bit microcontrollers.
More details in comment.44
Quick tip for naming stuff: learn some Dutch. Any random word is good for naming an app/website/project/whatever. Examples:
Turtle ----> Schildpad
Beach ---> Strand
Tonight ---> Vanavond
Tasty ---> Lekker
Sandwich ---> Boterham7
Discovered pro tip of my life :
Never trust your code
Achievements unlocked :
Successfully running C++ GPU accelerated offscreen rendering engine with texture loading code having faulty validation bug over a year on production for more than 1.5M daily Android active users without any issues.
History : Recently I was writing a new rendering engineering that uses our GPU pipeline engine.. and our prototype android app benchmark test always fails with black rendering frame detection assertion.
Spend more than a month to debug a GPU pipeline system based on directed acyclic graph based rendering algorithm.
New abilities added :
Able to debug OpenGL ES code on Android using print statement placed in source code using binary search.
I was aware of the issue over a month and just ignored it thinking it's a driver bug in my android device.. but when the api was used by one of Android dev, he reported the same issue. In the same day at night 2:59AM ....
Satan came to me and told me that " ok listen man, here is what I am gonna do with you today, your new code will be going production in a week, and the renderer will give you just one black frame after random time, and after today 3AM, your code will not show GL Errors if you debug or trace. Buhahahaha ahhaha haahha..... Puffff"
And he was gone..
Thanks satan for not killing me.. I will not trust stable production code anymore enevn though every line is documented and peer reviewed.
Random Tip (since ppl don't seem to know)
Dark Reader chrome extension
turns everything to dark theme
works on devrant too, although their native dt is better
not sure about firefox2