The numbers don’t add up in the Texas energy crisis.
Predictable partisan yelling over yet another catastrophe has been detected in Texas. Rather than relying on Google searches and social media, I opted to do some of my own research into ERCOT’s catastrophic failure to secure Texans' reliable energy. ERCOT is specifically tasked with delivering cheap, life-sustaining, reliable energy 100% of the time. The requirement is not 99%, not 99.9%, but 100% of the time. The crisis taking place in Texas should remind us all that energy is not optional. Hopefully, policymakers will use this as a teaching moment and…
Rendering web components server-side using Google Puppeteer is a real challenge. Serialization of the Shadow DOM is in an experimental phase. Declarative Shadow DOM allows serialization of the Shadow DOM and can be enabled with a few easy steps. Without following these steps, you’ll be left with empty custom elements after rendering in Puppeteer.
For your Shadow DOM to be serialized with experimental features, you first need to set the
shadowroot property of the template.
To serialize Shadow DOM in Puppeteer, we are going to use a proposed new function for elements:
Zen Observables are a great lightweight alternative to RxJS. If you are using Apollo Client, you won’t pay a bundle size penalty for using Zen. One issue, though, is multicasting in Zen isn’t supported. There is a Github issue that’s been open for several years to address this problem. If you’re looking for a quick and dirty way to provide minimal support for multicasting, I’ve prepared an example in TypeScript below.
It’s important to note we are using Ramda to compose our
emit functions. This allows us to take advantage of singletons in functional code. …
How to fight censorship by creating decentralized applications
If you think Ethereum is just a cryptocurrency, you missed the point. Ethereum is a platform that is resistant to censorship by corrupt governments and institutions. It also provides a cryptocurrency that can be traded in exchange for goods and services without fear of asset forfeiture or seizure. The founders of the project believe that web 3.0 must be resistant to censorship and turnkey tyranny. For years developers have debated whether Ethereum's fear of censorship was just hyperbole. While ideologues are cheering the coordinated shutdown of Parler, libertarians realize that Ethereum’s basic…
Object.getOwnPropertyDescriptor and walk the prototypal chain.
There are numerous articles on how to clone objects. Today using the spread operator is generally the preferred way to copy simple objects. There are some limitations to the spread syntax that are important to understand.
The main shortcoming is that accessor methods are not copied.
Object.assign has the same issue. This isn’t optional in systems where accessor methods are used. The second issue is that methods are not copied. To create a deep copy of class instances and other complex objects, we need another solution. I’ve created a simple copy method that…
Why Angular Schematics?
Angular Schematics offers composability that is not found in other generators. Its built-in utilities support functional concepts, including function currying and…
Addressing social responsibility in the field of software engineering
The tech industry deserves a harsh slap in the face. While it professes to value “diversity and inclusion,” it continues to require a credential that has an average cost of $127,000 as a prerequisite for employment. Simultaneously, the institutions that issue said credential abandoned their primary mission of innovation in favor of outputs. Of course, I’m speaking about the American university system and its partnership with corporate America. Big tech is addicted to a system that produces poor outputs at obscene cost, and this cost is a barrier that millions of…
Turn those stormy developer seas into smooth sailing
I’m currently working with development teams in the Czech Republic, Poland, New York, and San Fransisco. On top of that, every team is now working remotely. With async communication now the norm, I’m constantly working to make that processes more efficient. Efficiency in communication helps maintain velocity by reducing churn. One area where this can be a real challenge is GitHub. If your code pipeline is starting to look like a train wreck, consider implementing the tools below. …
React Higher-Order Components (HOC) are not dead; in fact, they are a handy tool when done right. Eric Elliot has the definitive guide on when to use HOCs vs. Hooks. However, one case that is often overlooked is how to consume hooks' results in your HOC. Adding a HOC for the sole purpose of passing the result of hook invocation in component properties is an anti-pattern. Passing via properties can quickly balloon and lead to naming collisions, along with other negative effects. To avoid this, you can use function currying.
Note: these example use Flow types, but apply equally to…
There are serious and systemic issues with AWS Services
I love AWS. It’s an indispensable tool for many start ups. However I also have two eyes and can see. And what I see is a walled garden of open source tools repackaged and sold at a premium.
Developers are not adopting AWS Services in place of native open source technologies. Below are just a handful of match ups, all of which AWS is essentially loosing.