this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

extract Post to module post

+114 -28
+2 -23
src/hooks/usePosts.hook.ts
··· 1 + import { Post } from "@/modules/post/entities/Post" 1 2 import { computed } from "vue" 2 3 3 - interface Post { 4 - filename: string 5 - lastUpdated: Date 6 - href: string 7 - title: string 8 - date: Date 9 - meta: { 10 - filename: string 11 - lastUpdated: Date 12 - href: string 13 - } 14 - frontmatter: { 15 - title: string 16 - publishedAt?: Date 17 - } 18 - draft?: boolean 19 - } 20 - 21 4 const byMostRecentFirst = (a: Post, b: Post) => { 22 5 if (!b.date) { 23 6 return 1 ··· 33 16 export const usePosts = () => { 34 17 const posts = $(useDocuments<Post>("@/pages/posts")) 35 18 36 - return computed(() => 37 - posts 38 - .filter((post) => import.meta.env.DEV || post.draft !== true) 39 - .sort(byMostRecentFirst) 40 - ) 19 + return computed(() => posts.sort(byMostRecentFirst)) 41 20 }
+11
src/layouts/post.vue
··· 1 + <script setup lang="ts"> 2 + const { frontmatter } = usePage() 3 + </script> 4 + 1 5 <template> 2 6 <div class="post"> 3 7 <app-header /> 8 + 9 + <img id="main-illustration" v-if="frontmatter.illustration" :src="frontmatter.illustration" alt="Main illustration"> 4 10 5 11 <article id="main-article"> 6 12 <slot /> ··· 9 15 </template> 10 16 11 17 <style lang="scss"> 18 + #main-illustration { 19 + max-width: 100%; 20 + object-fit: contain; 21 + } 22 + 12 23 article#main-article { 13 24 max-width: 680px; 14 25 margin: auto;
+18
src/modules/post/entities/Post.ts
··· 1 + export interface Post { 2 + filename: string 3 + lastUpdated: Date 4 + href: string 5 + title: string 6 + date: Date 7 + illustration: string 8 + meta: { 9 + filename: string 10 + lastUpdated: Date 11 + href: string 12 + } 13 + frontmatter: { 14 + title: string 15 + publishedAt?: Date 16 + } 17 + draft?: boolean 18 + }
+1 -1
src/pages/posts/feature-factory.mdx
··· 5 5 draft: true 6 6 --- 7 7 8 - # {title} 8 + # An introduction to the feature factory 9 9 10 10 From my experience, project failures mainly come from having mistrust between teams. Therefor lead time due to team availability to solve dependencies increases. 11 11
+5 -4
src/pages/posts/introduction-to-smart-notes.md
··· 1 1 --- 2 2 title: Introduction to smart notes, how to take notes efficiently 3 + illustration: https://res.cloudinary.com/practicaldev/image/fetch/s--F-oPy0uT--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s8t5g0o0h4x1ss6anr02.png 3 4 layout: post 4 5 date: 2021-12-16 5 6 --- ··· 29 30 30 31 #### Our cognitive biases 31 32 32 - Besides memory, brains aren't reliable because of many cognitive biases: confirmation bias, attentional bias, mere-exposure effect, normalcy bias, you name it. Even if it's the most complex system in our body, our brain must face many obstacles in order to not fool itself. For instance, more often than necessary, we look for arguments that unconsciously reinforce our original thoughts, we tend to argue with a pre-existing belief. This is what Julia Galef calls the “soldier mindset” in “[The Scout Mindset](https://juliagalef.com)”. She opposes it to the scout mindset: a mindset in which the search for the truth is what primarily guides its reasoning. 33 + Besides memory, brains aren't reliable because of many cognitive biases: confirmation bias, attentional bias, mere-exposure effect, normalcy bias, you name it. Even if it's the most complex system in our body, our brain must face many obstacles in order to not fool itself. For instance, more often than necessary, we look for arguments that unconsciously reinforce our original thoughts, we tend to argue with a pre-existing belief. This is what Julia Galef calls the "soldier mindset" in "[The Scout Mindset](https://juliagalef.com)". She opposes it to the scout mindset: a mindset in which the search for the truth is what primarily guides its reasoning. 33 34 34 35 As the scout's goal is to draw the most accurate map in the battlefield, taking notes becomes the map for your thoughts: they tell you what you know, what you don't know and guide you through your reflection. 35 36 ··· 37 38 38 39 ### Where do smart notes come from? 39 40 40 - Smart notes is a term used in the book “[How To Take Smart Notes](https://takesmartnotes.com)” written by Sönke Ahrens that tells the story of Niklas Luhmann, a sociologist who has published hundreds of articles thanks to his note-taking system: [the Zettelkasten method](https://zettelkasten.de/posts/overview). 41 + Smart notes is a term used in the book "[How To Take Smart Notes](https://takesmartnotes.com)" written by Sönke Ahrens that tells the story of Niklas Luhmann, a sociologist who has published hundreds of articles thanks to his note-taking system: [the Zettelkasten method](https://zettelkasten.de/posts/overview). 41 42 42 43 ### Creating the system 43 44 44 - Taking notes tends to mean “jotting down ideas on paper during meetings”. But we rarely use them afterwards. Notes used once or twice are no good, we can’t take advantage of them. Note-taking without structure is pointless. That’s why we have to create a system where each note helps the system snowball effect. 45 + Taking notes tends to mean "jotting down ideas on paper during meetings". But we rarely use them afterwards. Notes used once or twice are no good, we can’t take advantage of them. Note-taking without structure is pointless. That’s why we have to create a system where each note helps the system snowball effect. 45 46 46 47 We want a network of permanent notes. The goal is to write permanent notes and to densely connect them together. But to create notes you're proud of, you must iterate a few times with other kinds of notes. Overall, we can look at 3 kinds of notes: 47 48 ··· 87 88 88 89 ![Is it me or is a 10 year old child writing this?](https://lh3.googleusercontent.com/T3W3kwKhU1lHsTouBixHVWog1DPju6HMaPp_UrSvA6jgWh_Cuii1I-cYbajvYu_DNf4ZLOH0ZRygyhd1x87u8blVhFD9JtSa3IcF3_7zUAcbrjBHElEnPzSQG5XBqH1KcJdfFAMS) 89 90 90 - “Is it me or is a 10 year old child writing this?”. Still the more you iterate, the better your notes become, I promise. 😊 91 + "Is it me or is a 10 year old child writing this?". Still the more you iterate, the better your notes become, I promise. 😊 91 92 92 93 ### Smart notes are your first feedback loop 93 94
+77
src/pages/posts/make-your-environment-loopy.md
··· 1 + --- 2 + title: Developers, make your environment loopy 🔁 3 + illustration: https://res.cloudinary.com/practicaldev/image/fetch/s--ydCtwTyU--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ui6knf741v61hk66r9p.png 4 + layout: post 5 + date: 2022-03-13 6 + --- 7 + 8 + # Developers, make your environment loopy 🔁 9 + 10 + When we work, we want feedback: do we do the expected job? Does it fail? Where does it fail? Therefore, we want to receive feedback loops from our environment that gives us useful information about how well we're doing. This is what *loopy* means. 11 + 12 + Hi! My name is Julien and I'm a tech leader at [BAM](https://www.bam.tech/bam-agence-experte-design-et-d%C3%A9veloppement-mobile) where we design and develop mobile apps. A part of my job is to provide a healthy environment for my fellow developers to work at their best, improve quicker and then become tech leaders themselves. 13 + 14 + In a dynamic system we want to adapt from visible inputs to concrete actions. And to do that, we need standards. 15 + 16 + ## It starts with standards 17 + 18 + Standards are established rules in the team. They are our best guess about what a good job is. Writing and comparing with real life allow us to distinguish what is normal from what is not. 19 + 20 + Some tips when writing down a standard, make sure you have: 21 + 22 + 1. why it's important to write it down, 23 + 2. what are its key points, 24 + 3. what are the common mistakes we can avoid in the first place, 25 + 4. and what are the concrete examples to better understand it. 26 + 27 + With these key points in place, we'll be able to compare with the real world and adapt. In a nutshell, to be loopy. 28 + 29 + ## Loopy code 30 + 31 + Once we agree as a team to use a set of standards, we want our tools to know them. Take linters in your code for instance. Linters are scripts that find and sometimes can even fix problems automatically. They are great to provide warnings when a developer diverges from the expected code. It saves time on training, on reviewing and on debugging. 32 + 33 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssfn63tamuaxusylg5rc.png) 34 + 35 + The more we use a tool, the more reliant we want it to be. If in the previous paragraph you thought “Well, in my project linters are a pain in the butt, I hate how they force me to do additional work!”; this is a clear hint you are working for your tools and not the other way around. We don't want this. We want computers to execute repetitive tasks and humans to solve problems. So gather your team and update your linter rules so nobody complains. 🤔 36 + 37 + ## Loopy tests 38 + 39 + Talking about tests. If you want to rush, don't write tests. If you want to go fast and go far, write tests. 40 + 41 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijjbysabl79j3y1hu5aq.png) 42 + 43 + Mental loads are real and a heavy burden. When we start automating tests of some of our code, we can discharge that cognitive load. This will lead to a freer mind and easier and more effective days. 44 + 45 + ## Loopy production flow 46 + 47 + I wrote [an article](https://dev.to/jcalixte/how-does-visual-management-improve-team-efficiency-4kgd) about how useful it is to see the steps in the production flow. By showing the production flow, we know where we are and how good we are. We can then adapt our work/prioritization. 48 + 49 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywgpssrfv7oxeqa0s7fz.png) 50 + 51 + We then can spot and identify problems and solve them - they are called “red bins” in lean production. Displaying the problems in front of the whole team helps to highlight how they are slowing the whole process down. That way they can't be ignored and actions must be taken. 52 + 53 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d6w9oj12cxsr3n19z08r.png) 54 + 55 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82ao3k9i4zhq5py6vufq.png) 56 + 57 + ## Loopy user satisfaction 58 + 59 + The better we understand user needs, the clever we can work. There is no shame about being wrong in the first place. The most important thing is to acknowledge and adapt. 60 + 61 + ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/30uudql0ytaocdm5g8hc.png) 62 + 63 + ## Make your tools work for you not against you 64 + 65 + We tend to believe that a part of our job is to use specific tools and deal with its disadvantages because "we're used to it and it's always been that way". We tell ourselves: this is my job and if I fail, it'll be on me. Of course it's a bit more complex than that. In our day to day work, we all make mistakes: these ‘human errors’ are not a cause but a symptom of a deeper problem in your system. Understanding how and what causes a ‘human error’ to arise is the beginning of understanding a little bit about a complex system. And in an overly complex system, being able to adapt with feedback loops is better than being able to predict. 66 + 67 + ## Shorten the loops 68 + 69 + Your time is valuable, your focus is valuable, this is all about you and enhancing your work. The quicker you get feedback, the faster you can adapt. And the more feedback you get the more you work smarter. 70 + 71 + <center> 72 + *We shape our tools then the tools shape us.* 73 + </center> 74 + 75 + ___ 76 + 77 + This post was inspired by the [Loopy tool](https://ncase.me/loopy) from [Nicky Case](https://ncase.me), I can only suggest you take a look!