203 private links
I wasn't aware of the mess on Windows. I also agree that it will be more confortable for users to follow XDG conventions on *nix. The article explains well why it is such a mess.
Solution?
On *nix, the answer is straightforward: get everyone to adhere to the XDG Base Directory specification.
How do we actually encapsulate state, and actually regain compositional reasoning, fully? The technique that actually works is confining state locally. Confining state to within an object (“encapsulation” as it’s usually meant) doesn’t get us there because the state is owned by the object and thus escapes, but fully-local to a function does successfully isolate that state.
Instead of thinking in terms of a function that modifies multiple objects, you think in terms of a function that computes a description of how multiple objects should be affected, then a separate interpreter of that data type that animates that description into real action.
A minimal representation is the events of the DOM: they describe a change.
The author describes the advantages of such.
Note that Rust or Typescript are good candidates to represent algebraic data types.
The different levels of portability:
- Language
- Standard Library
- POSIX
- 3rd party libraries
- OS
The more features a program needs, the further out it must reach through the layers.#
Avoid – or wrap – compiler language extensions
C though portable is not suitable as much work as to be done to ensures it works on multiple systems.
In order to use OS extras, use an interface to reimplement it in systems that does not support it.
Kafka has a good throughput with sequential Writes and Reads.
Kafka can move a lot of data because of the zero copy read principle:
Before:
- Disc to OS buffer
- Write the content of the OS buffer to the RAM
- Copy the data to the application Buffer
- Copy the data back to the socket buffer
- Copy the data from the socket to the Network Interface Chip buffer and send it
With zero-copy read principle:
- Read from the disc and load it into the OS Buffer
- Directly copy to the NIC Buffer (the CPU is not involved)
Good practices !
✅ on my personal projects
- Documentation in the same repo as the code ✅
- Mechanisms for creating test data
- Rock solid database migrations
- Templates for new projects and components
- Automated code formatting ✅
- Tested, automated process for new development environments ✅
- Automated preview environments ✅
As a result, to avoid downtime you need to design every schema change with this in mind. The process needs to be:
- Design a new schema change that can be applied without changing the application code that uses it.
- Ship that change to production, upgrading your database while keeping the old code working.
- Now ship new application code that uses the new schema.
- Ship a new schema change that cleans up any remaining work—dropping columns that are no longer used, for example.
I find these explanations great to draw some charts for my masterthesis :)
Even if it is not complete
Using web browsers might seem inefficient, but they solve so many problems.
FasterThanLime describes how hard it is to build a text-messaging app from scratch if we want to develop it properly.
Creational
Singleton
Type of object that can be instantiated once
In Typescript, just use a global object, so you don't have the boilerplate.
Prototype
Object.getPrototypeOf
Builder
Build object step by step through different methods instead of using many parameters
Factory
Determine which object to instantiate
Structural
Facade
Simplified to hide low-level details of a system
Proxy
Reactivity system of Vue :D
Replace an original object and do some side effects
Advantage: allow user to work with the proxy just like the original object but it can trigger side effects behind the scene.
Proxy are also used when there is a large object that would be expensive to duplicate in memory.
Behavioral
Iterator
Traverse through a collection of objects.
A pull based system.
An object with a next()
method in javascript that returns a { done: boolean; value: T }
.
Observer
Allow many objects to subscribe to events that are broadcast by another object.
A Subject where other objects subscribe to it and triggers their method when the subject notify
Mediator
In case of many to many relationships, one object is a coordinator between them.
Middlewares are an example of mediator.
State
What is the difference between state and strategy pattern?
A framework for building a web app in Rust 🤔
May be useful someday.
It's true that the Rust ecosystem is growing and tools are coming. But we lack the knowledge of how we can put things together. Here it fills the gap.
One of the reasons that I advocate for SQLite on the server is that I've noticed that servers written on SQLite generally require less maintenance than those written on Postgres. I've also found that servers written in ways that can be deployed as static binaries tend to require less maintenance than those with more complicated deployment setups.
TL;DR SPAs hurt the built-in navigation of the browser. Developers reinvent the wheel for it and it is common to make mistakes bout it.
Some use cases are justified such as Youtube or Soundcloud (keep playing a video while navigating).
A methodology to build software-as-a-service apps
How to sort each type of technologies:
- what we have
- what we want
- what we don't want at all
Using an ARCHITECTURE.md file next to the README and CONTRIBUTING file to make it easy for newcomers to know where the modifications should be made.
Wow I definitely need to read this on my free time !