Daily Shaarli
June 6, 2022
I totally agree and it felt natural to me
Memory and local storage are great for “private” state — settings, caches, history. URL parameters are good for the “public” state, so that one could bookmark or forward the stateful link.
En Allemagne, on fait passer le billet régional illimité à 9€/mois.
En France, on supprime l'abonnement TER des 12-25 ans à 29€.
Pourtant l'expérimentation en Allemagne peut avoir des effets bénéfiques:
- savoir si plus de gens prennent le train avec un tariff attractif
- est-ce efficace pour désengorger les autres moyens de transport
- est-ce que le réseau ferroviaire peut supporter une charge plus importante
- comparer les émission carbone et l'impact sur l'environnement
Lien de l'offre de la DB: https://www.bahn.com/en/offers/regional/9-euro-ticket-en
Seulement 10% des victimes de viol portent plainte.
Une fois la plainte déposée, 70% des plaintes sont classées sans suite.
Quand ça va jusqu'au procès, seulement 1% des violeurs sont condamnés.La Cour de cassation a infirmé ce point de vue et demande que ce soit rejugé. Mais nous sommes quand même avec un droit qui permet de prononcer un non-lieu alors même que l’agresseur a reconnu que la femme a dit non. En l’absence d’un refus jugé « sérieux », l’agresseur est en droit de penser que l’autre est d’accord. Le droit pénal l’y autorise.
En lisant cet article, c'est affligeant de constater que le niveau de la justice est très bas sur ce sujet.
Il y a par exemple, par défaut, un accés aux corps. C'est à la victime de prouver de A à Z son non-consentement, d'autant plus qu'un ou plusieurs « non » ne sont pas valables selon certaines jurisprudence.
I am already applying that, but only because I had a class about it. It is useful though to have content about it online.
Une surcouche à https://recherche-ebook.fr/ afin de rechercher plus simplement les ebooks :)
C'est top et simple d'utilisation!
#idea #project: créer une alternative à recherche-ebook.fr ! Cela pourrait bien être une application web statique, récupérant les données par le client au lieu du serveur.
Nous avons besoin d’une pause entre la journée d’action et la nuit de repos. Le temps que nous consacrons à la méditation répond à ce besoin. C’est une période où nous sommes seuls avec nous-mêmes — un temps propice à la guérison. À défaut de nous accorder une telle plage de temps, nous devrons nous rabattre sur le temps consacré au sommeil pour diriger notre regard vers l’intérieur, en toute tranquillité, sans aucune distraction. Ces trois conditions sont aussi celles de la méditation.
Si nous ne pratiquons pas la méditation, le temps du sommeil devra également répondre au temps de réflexion. Mais sans les qualités qui font de la méditation une activité liée à la guérison, il est probablement que ce temps de réflexion tourne vite à la rumination, aux regrets, aux inquiétudes et contribue à nous garder éveillés. Dans la méditation, nous devons d’abord calmer l’esprit en nous concentrant sur la respiration. Ce qui nous permet de mettre les choses en perspectives. Nous pratiquons la liberté.
The tricky part is to make sure that requests made with JavaScript work the same as with HTML.
- Implement features in HTML first
- then add javascript
Conveniently, if the HTML is done properly we can derive all the information we need.
document.querySelector('form').addEventListener('submit', (event) => {
const form = event.target;
const url = new URL(form.action || window.location.href);
const formData = new FormData(form);
const searchParameters = new URLSearchParams(formData);
const options = {
method: form.method,
};
if (options.method === 'post') {
// Modify request body to include form data
options.body =
form.enctype === 'multipart/form-data' ? formData : searchParameters;
} else {
// Modify URL to include form data
url.search = searchParameters;
}
fetch(url, options);
event.preventDefault();
}
For POST requests, we’ll send the data in the request body.
- If the form explicitly sets the enctype to 'multipart/form-data', it’s safe to use FormData in the body.
- Otherwise, we can fall back to URLSearchParams.
For GET requests, we’ll send the data in the request URL with the URLSearchParams object.
For the response: the header Accept: 'application/json'
tells the server that json is awaited by the client else return HTML or a redirect :)
if we want to support HTML forms, we are though limited to GET and POST. But there is a nice workaround too:
- The GET and POST routes don’t change.
- The PATCH and DELETE routes become POST.
- We append the “methods”
/update
and/delete
to their respective routes.
Also: to include extra data in your request, you can use and input with the name, value, and the type of “hidden”.
It is also important that not all progressive enhancement is a zero sum game.
an open-source encrypted backup app for inclusion in Android-based operating systems
- Ask for help if you get stuck for more than an hour... I don't think it applies to every cases though
- Docs? What are they? Write some along your coding session for yourself: yes!
- Product thinking: User-oriented thinking
- Hunt for a mentor
- Work of art
- Being less stupid: instead of being smart, try to make one less stupid decision every day.
- Multiple approcahes: always try to come up with multiple solutions after going though a ticket, then pick the solution that suits well in the delivery time
- Keep the team in the loop: always over-communicate
- Product Job Mentality: think first, don’t start working unless the requirements are 100% understood; Never work on a feature for more than 2 weeks without validating it with users.
- Do code reviews
How about we treat every young man who
wants to buy a gun like every woman who wants
to get an abortion
mandatory 48-hr waiting
period, parental permission, a note from his
doctor proving he understands what he's about
to do. a video he has to watch about the effects
of gun violence, and an ultrasound wand up the
ass (just because). Let's close down all but one
gun shop in every state and make him travel
hundreds of miles, take time off work, and stay
overnight in a strange town to get a gun. Make
him walk through a gauntlet of people holding
photos of loved ones who were shot to death,
people who call him a murderer and beg him not
to buy a gun.
It makes more sense to do this with young men
and guns than with women and health care,
right? I mean, no woman getting an abortion
has killed a room full of people in seconds,
right
Oh yeah, fair point
- React is a UI library.
- React component libraries are always for UI
- Components will update, whether you want them to or not
- useEffect is a major to control the rerendering