Update from obsidian -
Affected files: .obsidian/plugins/obsidian-omnivore/data.json Read Later/How Game Reviews Actually Affect You.md Read Later/Use cases for Rust.md Read Later/What the Rust Book didn't tell you about testing....md Read Later/Why Signals Are Better Than React Hooks.md projects/quests.md projects/todos-notes/Update dots.md
This commit is contained in:
parent
be8dfe9cf5
commit
98ee2cd224
7 changed files with 241 additions and 5 deletions
|
|
@ -3,9 +3,9 @@
|
|||
"dateSavedFormat": "yyyy-MM-dd HH:mm:ss",
|
||||
"apiKey": "ec3bba50-4770-471b-99b1-9953ca523d8c",
|
||||
"filter": "HIGHLIGHTS",
|
||||
"syncAt": "2023-10-24T11:32:42",
|
||||
"syncAt": "2023-11-02T10:28:17",
|
||||
"customQuery": "",
|
||||
"template": "# {{{title}}}\n\n{{# note }}\n## Notes\n\n{{{ note }}}\n{{/ note }}\n{{#highlights.length}}\n## Highlights\n\n{{#highlights}}\n> [!quote] ㅤ\n> {{{text}}} \n> \n> [source]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}}\n> {{#note}}\n>\n>> [!info] ㅤ\n>> {{{note}}}\n\n{{/note}}\n{{/highlights}}\n{{/highlights.length}}\n---\n## Original\n\n{{{ content }}}",
|
||||
"template": "# {{{title}}}\n\n{{# note }}\n## Notes\n\n{{{ note }}}\n{{/ note }}\n{{#highlights.length}}\n## Highlights\n\n{{#highlights}}\n> [!quote] ㅤ\n> {{{text}}} \n> \n> [source]({{{highlightUrl}}}) {{#labels}} #{{name}} {{/labels}}\n> {{#note}}\n>\n>> [!info] ㅤ\n>> {{{note}}}\n\n{{/note}}\n{{/highlights}}\n{{/highlights.length}}\n\n---\n## Original\n\n{{{ content }}}",
|
||||
"highlightOrder": "LOCATION",
|
||||
"syncing": false,
|
||||
"folder": "Read Later/",
|
||||
|
|
|
|||
31
Read Later/How Game Reviews Actually Affect You.md
Normal file
31
Read Later/How Game Reviews Actually Affect You.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
id: f07b145f-4fc5-4acf-99a4-4e3201c009b9
|
||||
title: |
|
||||
How Game Reviews Actually Affect You
|
||||
status: ARCHIVED
|
||||
tags:
|
||||
- read-later
|
||||
- Youtube
|
||||
date_added: 2023-10-21 16:01:08
|
||||
url_omnivore: |
|
||||
https://omnivore.app/me/how-game-reviews-actually-affect-you-18b539cd3a3
|
||||
url_original: |
|
||||
https://youtu.be/8LbLvi9llCI?si=7MMwTZTpCb-mHDH5
|
||||
---
|
||||
|
||||
# How Game Reviews Actually Affect You
|
||||
|
||||
## Notes
|
||||
|
||||
Según estudios, los jugadores se ven afectados por reviews que leen/ven, ya sean por críticos o por otros jugadores. Destacar que en ambos casos, pero principalmente en otros jugadores hay opiniones que pueden decir lo mismo pero con una altas carga emocional, lo que amplifica su impacto.
|
||||
|
||||
Estas críticas tienen un impacto inconciente en el jugador en forma de _"self fulfilling prophecy"_ ó _"probar lo contrario"_.
|
||||
|
||||
Esto nos afecta queramos o no, por lo que es mejor evitar opiniones lo más posible y solo disfrutar el juego por lo que es, podemos validar nuestras opiniones luego de terminar el juego.
|
||||
|
||||
---
|
||||
## Original
|
||||
|
||||
[How Game Reviews Actually Affect You](https://youtu.be/8LbLvi9llCI?si=7MMwTZTpCb-mHDH5)
|
||||
|
||||
By [Daryl Talks Games](https://www.youtube.com/@DarylTalksGames)
|
||||
75
Read Later/Use cases for Rust.md
Normal file
75
Read Later/Use cases for Rust.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
---
|
||||
id: 7b7ae540-77ef-11ee-9aed-e318464fef5a
|
||||
title: |
|
||||
Use cases for Rust
|
||||
status: ARCHIVED
|
||||
tags:
|
||||
- read-later
|
||||
- Newsletter
|
||||
date_added: 2023-10-31 10:14:54
|
||||
url_omnivore: |
|
||||
https://omnivore.app/me/use-cases-for-rust-18b85df6f3a
|
||||
url_original: |
|
||||
https://omnivore.app/no_url?q=9e2f3a10-e4fd-4c33-85a3-ff3609f3c4d6
|
||||
---
|
||||
|
||||
# Use cases for Rust
|
||||
|
||||
## Highlights
|
||||
|
||||
> [!quote] ㅤ
|
||||
> Some popular server-side web frameworks written in Rust include Actix Web, Warp, and Axum.
|
||||
>
|
||||
> [source](https://omnivore.app/me/use-cases-for-rust-18b85df6f3a#64793bd7-d3bd-4597-9f2c-9b4697217661)
|
||||
|
||||
## Original
|
||||
|
||||

|
||||
|
||||
Hi Rustaceans,
|
||||
|
||||
Rust is fast, safe and hip.
|
||||
|
||||
But, what can you actually build with Rust?
|
||||
|
||||
…whether you want to use Rust professionally or as a hobbyist.
|
||||
|
||||
Here are a few common types of applications built using Rust:
|
||||
|
||||
**Blockchain**
|
||||
|
||||
* Rust is a great choice for blockchain applications because it is fast and secure.
|
||||
* You can write both smart contracts and entire blockchains using Rust.
|
||||
* Some popular blockchain projects written in Rust include Solana, Polkadot, and Near.
|
||||
|
||||
**Embedded programs**
|
||||
|
||||
* Rust is also well-suited for embedded programs, such as those used in cars, airplanes, and other devices.
|
||||
* This is because Rust is memory-safe, memory-efficient and can be compiled to run on a variety of platforms.
|
||||
|
||||
**Server-side applications / Microservices**
|
||||
|
||||
* Rust is a great choice for server-side applications and microservices because it is fast and efficient.
|
||||
* Some popular server-side web frameworks written in Rust include Actix Web, Warp, and Axum.
|
||||
* Many companies are migrating their critical microservices to Rust because of its safety and performance guarantees.
|
||||
|
||||
**WebAssembly**
|
||||
|
||||
* Rust can be compiled to WebAssembly, which means that you can use Rust to build web applications.
|
||||
* Rust’s small runtime and first-class support for WebAssembly often make it the first contender for any WebAssembly projects.
|
||||
|
||||
This is only a small sample of what you can build in Rust.
|
||||
|
||||
In general, Rust is a great choice if you are looking for speed, safety and versatility.
|
||||
|
||||
If you want more details, here’s a YouTube video I made on the same topic.
|
||||
|
||||
**[\>>> What can you build in Rust?!](https://letsgetrusty.krtra.com/c/BgXaOx7YGua4/OQKy)**
|
||||
|
||||
Have fun building!
|
||||
|
||||
Bogdan
|
||||
|
||||
\---
|
||||
|
||||
PS - Looking for a Rust job? Apply here - [https://letsgetrusty.com/jobs](https://letsgetrusty.krtra.com/c/ysWbInNFr59c/OQKy)
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
id: ad8a0732-733a-11ee-b2ab-13f1d6012322
|
||||
title: |
|
||||
What the Rust Book didn't tell you about testing...
|
||||
status: ARCHIVED
|
||||
tags:
|
||||
- read-later
|
||||
- Newsletter
|
||||
date_added: 2023-10-25 10:30:35
|
||||
url_omnivore: |
|
||||
https://omnivore.app/me/what-the-rust-book-didn-t-tell-you-about-testing-18b6707a120
|
||||
url_original: |
|
||||
https://omnivore.app/no_url?q=1fed5fd7-7706-46cf-9947-927b26a77112
|
||||
---
|
||||
|
||||
# What the Rust Book didn't tell you about testing...
|
||||
|
||||
## Highlights
|
||||
|
||||
> [!quote] ㅤ
|
||||
> We want to test _get\_user_ without making real database queries.
|
||||
>
|
||||
> The solution is to mock the _Database_ trait and assert _execute\_query_ is called with the correct query. But how?
|
||||
>
|
||||
> We can use the [mockall crate](https://letsgetrusty.us6.list-manage.com/track/click?u=9f28b35c1658c447f3b962a54&id=00a07042b3&e=d0eb971086)!
|
||||
>
|
||||
> [source](https://omnivore.app/me/what-the-rust-book-didn-t-tell-you-about-testing-18b6707a120#f9650419-c778-4974-9da2-aabce209609f)
|
||||
|
||||
---
|
||||
## Original
|
||||
|
||||
|
||||
The Rust Book has an [entire chapter dedicated to testing](https://letsgetrusty.us6.list-manage.com/track/click?u=9f28b35c1658c447f3b962a54&id=a95a715235&e=d0eb971086), but it's missing a critical piece…
|
||||
|
||||
What happens when your code needs to make API calls or database queries?
|
||||
|
||||
Unit tests should be be fast, reliable, and deterministic.
|
||||
|
||||
We don't want to make expensive calls that might fail for various reasons.
|
||||
|
||||
|
||||
Well here is some good news… we don't have to!
|
||||
|
||||
We can use mocking to substitute real objects for mock objects and assert certain expectations…
|
||||
|
||||
What's that? You want an example? Consider the following code…
|
||||
|
||||
trait Database {
|
||||
fn execute_query(&self, query: String);
|
||||
}
|
||||
|
||||
fn get_user(db: impl Database, id: i32) {
|
||||
let query = format!("SELECT * from Users where id={}", id);
|
||||
db.execute_query(query);
|
||||
}
|
||||
We want to test _get\_user_ without making real database queries.
|
||||
|
||||
The solution is to mock the _Database_ trait and assert _execute\_query_ is called with the correct query. But how?
|
||||
|
||||
We can use the [mockall crate](https://letsgetrusty.us6.list-manage.com/track/click?u=9f28b35c1658c447f3b962a54&id=00a07042b3&e=d0eb971086)!
|
||||
|
||||
Here is how we would test _get\_user_…
|
||||
|
||||
#[cfg(test)]
|
||||
use mockall::{automock, predicate::*};
|
||||
|
||||
#[cfg_attr(test, automock)]
|
||||
trait Database {
|
||||
fn execute_query(&self, query: String);
|
||||
}
|
||||
|
||||
fn get_user(db: impl Database, id: i32) {
|
||||
let query = format!("SELECT * from Users where id={}", id);
|
||||
db.execute_query(query);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn get_user_executes_correct_query() {
|
||||
let mut mock_database = MockDatabase::new();
|
||||
mock_database.expect_execute_query()
|
||||
.with(eq("SELECT * from Users where id=22".to_owned()))
|
||||
.once()
|
||||
.returning(|_x| ());
|
||||
|
||||
get_user(mock_database, 22);
|
||||
}
|
||||
}
|
||||
Boom! Now we have a unit test that's fast, reliable, and deterministic!
|
||||
|
||||
If you haven't seen my [intro to testing in Rust video](https://letsgetrusty.us6.list-manage.com/track/click?u=9f28b35c1658c447f3b962a54&id=90d4167901&e=d0eb971086) make sure to check it out!
|
||||
|
||||
|
||||
Happy testing, and stay Rusty!
|
||||
32
Read Later/Why Signals Are Better Than React Hooks.md
Normal file
32
Read Later/Why Signals Are Better Than React Hooks.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
id: e41b4086-963e-45e7-9ef7-2cfee7061047
|
||||
title: |
|
||||
Why Signals Are Better Than React Hooks
|
||||
status: ARCHIVED
|
||||
tags:
|
||||
- read-later
|
||||
date_added: 2023-11-01 14:16:42
|
||||
url_omnivore: |
|
||||
https://omnivore.app/me/https-youtu-be-so-8-l-bvwf-2-y-8-si-zy-gl-ie-hl-ai-pg-w-5-xo-18b8be328e5
|
||||
url_original: |
|
||||
https://youtu.be/SO8lBVWF2Y8?si=zyGlIeHlAiPgW5Xo
|
||||
---
|
||||
|
||||
# Why Signals Are Better Than React Hooks
|
||||
|
||||
## Notes
|
||||
|
||||
Signals ayuda a la performance y legibilidad de una aplicación haciendo que la funcionalidades que normalmente se realizarían con los hooks `useState` y `useEffect` se realizen dentro de `signals`.
|
||||
|
||||
Esto permite compartir este _"estado"_ entre componentes pero solo actualizar los involucrados y no todos los desendientes del componente mayor.
|
||||
|
||||
Además, podemos extraer toda la lógica del estado a un archivo aparte que solo tenga código relevante, y en los componentes se mantiene solo la implementación.
|
||||
|
||||
Es obviamente más rápido de implementar y más limpio que hacer custom hooks, pero es añadir otra dependencia, habrá otras ventajas y desventajas??
|
||||
|
||||
---
|
||||
## Original
|
||||
|
||||
[Why Signals Are Better Than React Hooks](https://youtu.be/SO8lBVWF2Y8?si=zyGlIeHlAiPgW5Xo)
|
||||
|
||||
By [Web Dev Simplified](https://www.youtube.com/@WebDevSimplified)
|
||||
|
|
@ -19,6 +19,7 @@ kanban-plugin: basic
|
|||
- [ ] Escribir guia de posturas para la meditación
|
||||
- [ ] Pasar en limpio notas del cuaderno<br>#home
|
||||
- [ ] Actualizar Mac
|
||||
- [ ] Replace Z with Zoxide<br>#home
|
||||
|
||||
|
||||
## Expedition Quests
|
||||
|
|
@ -70,13 +71,13 @@ kanban-plugin: basic
|
|||
|
||||
## Ongoing Quests (3)
|
||||
|
||||
- [ ] [Update dots](Update%20dots.md)<br>#laptop
|
||||
- [ ] Enter and engage in no bolerplate discord
|
||||
|
||||
|
||||
## Completed Quests
|
||||
|
||||
**Complete**
|
||||
- [x] [Update dots](Update%20dots.md)<br>#laptop
|
||||
- [x] [Update tmux config](Update%20tmux%20config.md)<br>#laptop
|
||||
- [x] [Neovim database managment](https://www.youtube.com/watch?v=NhTPVXP8n7w)
|
||||
- [x] Escribir ayuda memoria sobre funcionalidades avanzadas y como acualizar cierta config de neovim<br>#wiki
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
- Save - Restore sessions
|
||||
- close all sessions
|
||||
- [x] Move Tmux config to .conf directory
|
||||
- [ ] Update "check-tools" script
|
||||
- [ ] Debloat zsh
|
||||
- [x] Update "check-tools" script
|
||||
- [x] Debloat zsh
|
||||
- [x] improve terminal setup on mac
|
||||
- write better config for alacritty
|
||||
- use iterm2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue