recentpopularlog in

dirtystylus : codearchitecture   29

PHP: Traits - Manual
A way to encapsulate reusable methods that can be shared across classes without inheritance
oop  php  documentation  codearchitecture 
november 2018 by dirtystylus
Sarah Mei on Twitter: "All code is optimized. The difference is in what it’s optimized _for_."
All code is optimized. The difference is in what it’s optimized _for_.
Runtime speed is one thing you can optimize for, but it’s much more common to optimize for other types of speed. The three I most commonly see:
- speed of shipping the code
- speed of onboarding new devs
- speed of making changes after onboarding
by:sarahmei  twitterthread  codearchitecture  onboarding  communication 
october 2018 by dirtystylus
Andrew Clark on Twitter: "So many update performance problems in React go away when you use local state. If you have some state that updates frequently and needs to be fast (ahem, forms), probably shouldn't be putting that in a global store that the whole
So many update performance problems in React go away when you use local state.

If you have some state that updates frequently and needs to be fast (ahem, forms), probably shouldn't be putting that in a global store that the whole app subscribes to!
codearchitecture  reactjs  javascript  statemanagement 
september 2018 by dirtystylus
How is JavaScript used within the Spotify desktop application? Is it packaged up and run locally only retrieving the assets as and when needed? What JavaScript VM is used? - Quora
This organization structure, combined with the global-ish nature of JavaScript in the browser, has made us build the desktop client UI out of many small, self-contained web apps called Spotlets. They all run inside Chromium Embedded Framework, each app living within their own little iframe, which gives squads the ability to work with whatever frameworks they need, without the need to coordinate tooling and dependencies with other squads. While this approach has the disadvantage that we have many duplicate instances of different versions of libraries, increasing the size of the app, but it offers the massive advantage that introducing a library is a discussion between a few people instead of decision that involves ~100 people and their various needs. Not only would such a big discussion extremely time-consuming and hard, it would also force us to use a least-common-denominator approach to picking libraries, instead of picking the ones specifically tailored to the problem domain of each squad. Considering the size of a single song compared to the size of a JavaScript library, this trade-off is a no-brainer for us.
programming  javascript  music  spotify  codearchitecture  npm  via:peter_chappy 
july 2018 by dirtystylus
How to Feed the Birds
When confronted with a section of code that's messy and hard to understand in what is now your yard, so to speak, it's easy to want to cast blame and curse those that came before you and left you this mess without so much as a letter explaining how they got here. I have to remember, though, that I too have written code that got the job done, but maybe not in the most elegant way. My code kept out the squirrels, but made it harder for the next person to feed the birds.
code  codearchitecture  refactoring  maintainability 
april 2018 by dirtystylus
Coding CSS for Context - Snook.ca
Going back to our thing that we’re trying to style: the button. Yes, right now, we’re styling a button in a modal dialog. Is this the only place that this exists? Right now, quite possibly. Will it always be the only place it exists? If your project is constantly in flux, then not likely.

Here’s what’s important:

We want to identify that this is a variation on our button.
We want to indicate the purpose of this button style.
We want to avoid tying the code to a particular context that could change.
css  codearchitecture  webdev  bestpractices  by:snookca  components 
march 2017 by dirtystylus

Copy this bookmark:





to read