Restructuring a large Chrome Extension/WebApp
I have a very complex Chrome Extension that has gotten too large to maintain in its current format. I’d like to restructure it, but I’m 15 and this is the first webapp or extension of it’s type I’ve built so I have no idea how to do it.
How reduce the usage of Magic Strings?
In the application database there is a configuration table with this schema:
How reduce the usage of Magic Strings?
In the application database there is a configuration table with this schema:
API for accessing CTS and DSR signals of serial port [closed]
Closed 8 years ago.
Accessing struct attribute: casting vs field name
I was just going over some kernel code, I noticed that rb->__rb_parent_color = (unsigned long)p | color;
is kinda wired. The first field of a struct is accessed by casting the pointer and not by using the field name.
At what point should you collapse many parameters into (e.g.) struct to improve readability in function headers?
While making a struct creates some overhead at run-time, packaging a bunch of frequently-used-together variables can dramatically increase code readability. How do you balance the two? I was just asked to “unroll” a struct that contained 12 variables, which now makes calls to the function header monolithic; it seems poor style and I wanted to know what others thought.
At what point should you collapse many parameters into (e.g.) struct to improve readability in function headers?
While making a struct creates some overhead at run-time, packaging a bunch of frequently-used-together variables can dramatically increase code readability. How do you balance the two? I was just asked to “unroll” a struct that contained 12 variables, which now makes calls to the function header monolithic; it seems poor style and I wanted to know what others thought.
When, if ever, should I daisy chain functions?
In a program divided up into many functions by which it is intended that they execute themselves one after another, when (if ever) is it preferred to:
When, if ever, should I daisy chain functions?
In a program divided up into many functions by which it is intended that they execute themselves one after another, when (if ever) is it preferred to:
Returning reference type passed to method
I’m asking this from .NET (C#) point-of-view, however, I’d preferire language agnostic answer.