<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gabriel Mendes on Medium]]></title>
        <description><![CDATA[Stories by Gabriel Mendes on Medium]]></description>
        <link>https://medium.com/@gabrielmendessc?source=rss-528ceffa8d26------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hHSsB4sVnuZ1SlVmmXYraQ.jpeg</url>
            <title>Stories by Gabriel Mendes on Medium</title>
            <link>https://medium.com/@gabrielmendessc?source=rss-528ceffa8d26------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:08:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gabrielmendessc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Journey on Spring Security 6 — Part I]]></title>
            <link>https://medium.com/@gabrielmendessc/my-journey-on-spring-security-6-part-i-606751c75bf0?source=rss-528ceffa8d26------2</link>
            <guid isPermaLink="false">https://medium.com/p/606751c75bf0</guid>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[spring-security]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Gabriel Mendes]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 01:39:17 GMT</pubDate>
            <atom:updated>2023-04-02T01:45:59.532Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*b4FC7XFxPZgSUys4rx9cSw.png" /></figure><h3>My Journey with Spring Security 6 — Part I</h3><p>I had already implemented some authentications in my projects with Spring Security and JWT, but I mostly followed some tutorials, not really understanding the complexities of Spring Security, while trying my best to implement what I consider the best practices.</p><p>With Spring 3 and Spring Security 6 a tried to migrate my project and dive into the official documentation of Spring Security, trying to understand the architecture of the vast valley of components that compose Spring Security. And this was my approach.</p><h3>Domains and UserDetails</h3><p>Firstly I started with the Domain for my User entity, it CRUDs operations and implementation of UserDetails. I used JPA and Lombook to simplify things. I’m also using an AbstractDomain class, it just implements the Serializable interface, you can directly implement it in your domains.</p><p>The User domain:</p><pre>@Getter<br>@Setter<br>@Entity<br>@Table(name = &quot;tb_user&quot;)<br>public class UserLoreKeeper extends AbstractDomain {<br><br>    @Id<br>    @GeneratedValue(strategy = GenerationType.IDENTITY)<br>    @Column(name = &quot;id_user&quot;)<br>    private Integer idUserLoreKeeper;<br>    @Column(name = &quot;username&quot;, unique = true, nullable = false)<br>    private String dsUsername;<br>    @Column(name = &quot;email&quot;, unique = true, nullable = false)<br>    private String dsEmail;<br>    @Column(name = &quot;password&quot;, nullable = false)<br>    private String dsPassword;<br>    @Enumerated(EnumType.STRING)<br>    @ElementCollection(targetClass = Role.class, fetch = FetchType.EAGER)<br>    @CollectionTable(name = &quot;tb_role&quot;)<br>    @Column(name = &quot;role&quot;, nullable = false)<br>    private List&lt;Role&gt; roleList;<br><br>}</pre><p>And the Role I created as an Enum:</p><pre>public enum Role {<br><br>    USER;<br><br>}</pre><p>For my implementation of UserDetails, I preferred to create the domain for my UserDetails and my Entity in two separate objects, to maintain everything related to the security module of my project separated from the other modules. For now, I’m ignoring the business logic of the remaining methods for later.</p><pre>@AllArgsConstructor<br>public class UserSecurity implements UserDetails {<br><br>    private UserLoreKeeper userLoreKeeper;<br><br>    @Override<br>    public Collection&lt;? extends GrantedAuthority&gt; getAuthorities() {<br><br>        return userLoreKeeper.getRoleList().stream()<br>                .map(role -&gt; new SimpleGrantedAuthority(role.name()))<br>                .toList();<br><br>    }<br><br>    @Override<br>    public String getPassword() {<br><br>        return userLoreKeeper.getDsPassword();<br><br>    }<br><br>    @Override<br>    public String getUsername() {<br><br>        return userLoreKeeper.getDsUsername();<br><br>    }<br><br>    @Override<br>    public boolean isAccountNonExpired() {<br><br>        return true;<br><br>    }<br><br>    @Override<br>    public boolean isAccountNonLocked() {<br><br>        return true;<br><br>    }<br><br>    @Override<br>    public boolean isCredentialsNonExpired() {<br><br>        return true;<br><br>    }<br><br>    @Override<br>    public boolean isEnabled() {<br><br>        return true;<br><br>    }<br><br>}</pre><p>In my CRUD Service of the User object, I created the JPA method to find the user with the username or email, to permit the login with any of these fields. I’m not sure if it’s the best approach for it but worked as I intended.</p><pre>@Service<br>public class UserDetailsServiceImpl implements UserDetailsService {<br><br>    @Autowired<br>    private UserLoreKeeperService userLoreKeeperService;<br><br>    @Override<br>    public UserDetails loadUserByUsername(String dsUsername) throws UsernameNotFoundException {<br><br>        return new UserSecurity(userLoreKeeperService.findByDsEmailOrDsUsername(dsUsername, dsUsername).orElseThrow(createException(dsUsername)));<br><br>    }<br><br>    private Supplier&lt;UsernameNotFoundException&gt; createException(String dsUsername) {<br><br>        return () -&gt; new UsernameNotFoundException(&quot;User &quot; + dsUsername + &quot; not found!&quot;);<br><br>    }<br><br>}</pre><p>For last, I also created a domain for returning the JWT tokens to the client.</p><pre>@Getter<br>@AllArgsConstructor<br>public class Token extends AbstractDomain {<br><br>    private String dsAccessToken;<br>    private String dsRefreshToken;<br><br>}</pre><h3>Filters and Dependencies</h3><p>That was the most stressful part, I’m not 100% satisfied with the way I did it but was a lot more organized than my previous projects.</p><p>I created two different filters. One for authenticating with the username and password and writing the access and refresh JWT token on the response to the client, and another for authenticating with the JWT token received from the client, i.e, one for login and another for authenticating remaining requests. I also created a service for manipulating the JWT token.</p><p>For the JWT Service, I used auth0 java-jwt library. The secret, for now, is hardcoded for test purposes.</p><pre>@Service<br>public class JWTService {<br><br>    private static final String SECRET_KEY = &quot;RandomKey&quot;;<br><br>    public String createAcessToken(UserDetails user, String dsIssuer, Integer nrMinutes) {<br><br>        return JWT.create()<br>                .withSubject(user.getUsername())<br>                .withIssuer(dsIssuer)<br>                .withClaim(&quot;roleList&quot;, user.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList()))<br>                .withExpiresAt(new Date(System.currentTimeMillis() + nrMinutes * 60 * 1000))<br>                .sign(Algorithm.HMAC256(SECRET_KEY));<br><br>    }<br><br>    public String createRefreshToken(UserDetails user, String dsIssuer, Integer nrMinutes) {<br><br>        return JWT.create()<br>                .withSubject(user.getUsername())<br>                .withIssuer(dsIssuer)<br>                .withExpiresAt(new Date(System.currentTimeMillis() + nrMinutes * 60 * 1000))<br>                .sign(Algorithm.HMAC256(SECRET_KEY));<br><br>    }<br><br>    public DecodedJWT decodeToken(String dsToken) {<br><br>        return JWT.require(Algorithm.HMAC256(SECRET_KEY)).build().verify(dsToken);<br><br>    }<br><br>}</pre><p>For the login filter, I retrieved the username and password from the request as a form and used the JWTService to write the access and refresh tokens on the response after successful authentication. I used a <em>RequestMatcher</em> to indicate what endpoints this Filter should apply. For all authentication filters, I preferred to extend <em>AbstractAuthenticationProcessingFilter </em>instead of a simple <em>OncePerRequestFilter</em>.</p><pre>public class LoginAuthenticationFilter extends AbstractAuthenticationProcessingFilter {<br><br>    @Autowired<br>    private JWTService jwtService;<br><br>    private static final RequestMatcher antPathLogin = new AntPathRequestMatcher(&quot;/auth/login&quot;, HttpMethod.POST.name());<br><br>    public LoginAuthenticationFilter(AuthenticationManager authenticationManager) {<br>        super(antPathLogin, authenticationManager);<br>    }<br><br>    @Override<br>    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {<br><br>        String username = request.getParameter(&quot;username&quot;);<br>        String password = request.getParameter(&quot;password&quot;);<br><br>        UsernamePasswordAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(username, password);<br><br>        return super.getAuthenticationManager().authenticate(authToken);<br><br>    }<br><br>    @Override<br>    protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException {<br><br>        UserDetails user = (UserDetails) authResult.getPrincipal();<br><br>        String accessToken = jwtService.createAcessToken(user, request.getRequestURI(), 10);<br>        String refreshToken = jwtService.createRefreshToken(user, request.getRequestURI(), 60);<br><br>        Token token = new Token(accessToken, refreshToken);<br><br>        response.setContentType(MediaType.APPLICATION_JSON_VALUE);<br><br>        new ObjectMapper().writeValue(response.getOutputStream(), token);<br><br>    }<br><br>}</pre><p>For the JWT Authentication, I needed to overwrite the <em>doFilter</em> method for it to work as I intended. I couldn’t use the <em>successfulAuthentication</em> method without needing to rewrite a bunch of things, so I preferred to save the authentication on the <em>doFilter</em> method. I also used a <em>NegatedRequestMatcher</em> to apply the filter to all endpoints except the authentication ones. For now, I’m not worrying about handling exceptions and writing appropriate error responses to the client, so I just threw <em>BadCredentialExceptions</em>.</p><pre>public class JWTAuthenticationFilter extends AbstractAuthenticationProcessingFilter {<br><br>    @Autowired<br>    private JWTService jwtService;<br><br>    private static final NegatedRequestMatcher antPathLogin = new NegatedRequestMatcher(new AntPathRequestMatcher(&quot;/auth/**&quot;, HttpMethod.POST.name()));<br>    public JWTAuthenticationFilter(AuthenticationManager authenticationManager) {<br>        super(antPathLogin, authenticationManager);<br>    }<br><br>    @Override<br>    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {<br><br>        try {<br><br>            if (!requiresAuthentication((HttpServletRequest) request, (HttpServletResponse) response)) {<br><br>                return;<br><br>            }<br><br>            SecurityContextHolder.getContext().setAuthentication(attemptAuthentication((HttpServletRequest) request, (HttpServletResponse) response));<br><br>        } catch (AuthenticationException e) {<br><br>            unsuccessfulAuthentication((HttpServletRequest) request, (HttpServletResponse) response, e);<br><br>        } catch (JWTVerificationException e) {<br><br>            unsuccessfulAuthentication((HttpServletRequest) request, (HttpServletResponse) response, parseException(e));<br><br>        } finally {<br><br>            chain.doFilter(request, response);<br><br>        }<br><br>    }<br><br>    @Override<br>    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {<br><br>        String authHeader = request.getHeader(HttpHeaders.AUTHORIZATION);<br>        if (Objects.nonNull(authHeader) &amp;&amp; authHeader.startsWith(&quot;Bearer &quot;)) {<br><br>            return createUsernamePasswordToken(jwtService.decodeToken(authHeader.substring(7)));<br><br>        }<br><br>        throw new BadCredentialsException(&quot;Test&quot;);<br><br>    }<br><br>    private AuthenticationException parseException(JWTVerificationException e) {<br><br>        return new BadCredentialsException(&quot;Test&quot;);<br><br>    }<br><br>    private UsernamePasswordAuthenticationToken createUsernamePasswordToken(DecodedJWT decodedJWT) {<br><br>        String dsUsername = decodedJWT.getSubject();<br>        List&lt;SimpleGrantedAuthority&gt; authorityList = Arrays.stream(decodedJWT.getClaim(&quot;roleList&quot;).asArray(String.class)).map(SimpleGrantedAuthority::new).collect(Collectors.toList());<br><br>        return new UsernamePasswordAuthenticationToken(dsUsername, null, authorityList);<br><br>    }<br><br>}</pre><h3>The WebSecurity Configuration</h3><p>This is where we had the most changes from Spring 3, using a bunch of beans and lambda expressions. I declared all of the necessary beans in one Configuration class, it is way more organized than my previous projects.</p><p>I added the two previous authorization filters on the <em>SecurityFilterChain </em>and excluded authorization from auth endpoints.</p><pre>@Configuration<br>@EnableWebSecurity<br>@RequiredArgsConstructor<br>public class SecurityConfiguration {<br><br>    private final UserDetailsService userDetailsService;<br><br>    @Bean<br>    @SneakyThrows<br>    public SecurityFilterChain securityFilterChain(HttpSecurity http) {<br><br>        http.csrf().disable()<br>            .authorizeHttpRequests((authorize) -&gt; {<br>                authorize.requestMatchers(HttpMethod.POST,&quot;/auth/**&quot;).permitAll()<br>                         .anyRequest().authenticated();<br>            })<br>            .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()<br>            .authenticationProvider(authenticationProvider())<br>            .addFilterAfter(loginAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)<br>            .addFilterAfter(jwtAuthenticationFilter(), LoginAuthenticationFilter.class);<br><br>        return http.build();<br><br>    }<br><br>    @Bean<br>    public LoginAuthenticationFilter loginAuthenticationFilter() {<br><br>        return new LoginAuthenticationFilter(authenticationManager());<br><br>    }<br><br>    @Bean<br>    public JWTAuthenticationFilter jwtAuthenticationFilter() {<br><br>        return new JWTAuthenticationFilter(authenticationManager());<br><br>    }<br><br>    @Bean<br>    public AuthenticationManager authenticationManager() {<br><br>        return new ProviderManager(authenticationProvider());<br><br>    }<br><br>    @Bean<br>    public AuthenticationProvider authenticationProvider() {<br><br>        DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();<br>        daoAuthenticationProvider.setUserDetailsService(userDetailsService);<br>        daoAuthenticationProvider.setPasswordEncoder(passwordEncoder());<br><br>        return daoAuthenticationProvider;<br><br>    }<br><br>    @Bean<br>    public PasswordEncoder passwordEncoder() {<br><br>        return new BCryptPasswordEncoder();<br><br>    }<br><br>}</pre><h3>Register and Refreshing Token</h3><p>That was a very simple part. First, I tried to make a filter to handle those requisitions, but I thought this was too much and demanded a lot of rewriting. I preferred to make a simple controller with services.</p><p>For the Controller, I autowired the needed services and used the <em>HttpServeletRequest</em> on the<em> refreshToken </em>method to get the servelet path to use as the issuer of the new tokens.</p><pre>@RestController<br>@RequestMapping(&quot;/auth&quot;)<br>public class AuthController {<br><br>    @Autowired<br>    private UserLoreKeeperService userLoreKeeperService;<br>    @Autowired<br>    private RefreshService refreshService;<br><br>    @PostMapping(&quot;/register&quot;)<br>    public ResponseEntity&lt;UserLoreKeeper&gt; saveUser(@RequestBody UserLoreKeeper userLoreKeeper) {<br><br>        return ResponseEntity.status(HttpStatus.CREATED).body(userLoreKeeperService.save(userLoreKeeper));<br><br>    }<br><br>    @PostMapping(&quot;/refresh&quot;)<br>    public ResponseEntity&lt;Token&gt; refreshToken(HttpServletRequest httpServletRequest, @RequestBody Token token) {<br><br>        return ResponseEntity.ok(refreshService.createTokenFromRefresh(token.getDsRefreshToken(), httpServletRequest.getRequestURI()));<br><br>    }<br><br>}</pre><p>The <em>RefreshService</em> just decodes the refresh token to get the user and creates new tokens with it.</p><pre>@Service<br>public class RefreshService {<br><br>    @Autowired<br>    private UserDetailsService userDetailsService;<br>    @Autowired<br>    private JWTService jwtService;<br><br>    public Token createTokenFromRefresh(String dsOldRefreshToken, String dsIssuer) {<br><br>        DecodedJWT decodedJWT = jwtService.decodeToken(dsOldRefreshToken);<br>        UserSecurity userSecurity = (UserSecurity) userDetailsService.loadUserByUsername(decodedJWT.getSubject());<br><br>        String dsAccessToken = jwtService.createAcessToken(userSecurity, dsIssuer, 10);<br>        String dsNewRefreshToken = jwtService.createRefreshToken(userSecurity, dsIssuer, 60);<br><br>        return new Token(dsAccessToken, dsNewRefreshToken);<br><br>    }<br><br>}</pre><h3>Conclusion</h3><p>I’m still learning Spring Security and I know that it has a lot of holes to fix, but with one day of coding and using purely what the Spring docs provided me this was what I achieve.</p><p>I’m still trying to learn the best way to write good error messages for the client, as I can’t use Spring <em>ExceptionHandlers</em> in the <em>FilterChain</em> context and it’s the next step I will take on my project.</p><p>I also had a few problems with <em>@EnabledGlobalAutheticatio </em>that I need to fix to use annotations on my controller to handle authorization, but all of this I will leave to part II.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=606751c75bf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Barco de Estevão]]></title>
            <link>https://medium.com/@gabrielmendessc/barco-de-estev%C3%A3o-b249d5e0c94e?source=rss-528ceffa8d26------2</link>
            <guid isPermaLink="false">https://medium.com/p/b249d5e0c94e</guid>
            <category><![CDATA[morte]]></category>
            <category><![CDATA[literatura]]></category>
            <category><![CDATA[família]]></category>
            <category><![CDATA[herança]]></category>
            <category><![CDATA[vida]]></category>
            <dc:creator><![CDATA[Gabriel Mendes]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 20:21:56 GMT</pubDate>
            <atom:updated>2020-07-11T20:21:56.490Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*94o6oos6BUK17D7QfTPL-Q.png" /></figure><p>Senhor Estevão resolvera vender-me seu barco. O velho era sozinho, beirava seus noventa anos e já estava com o pé na cova. Perdera a esposa e os filhos há alguns anos, tudo que lhe restara fora a herança reversa de uma chacra e seu, igualmente, velho barco. Há caminho da insólita chacra questionei-me por diversas vezes o motivo do velho se desfazer de tal barco. É verdade que o queria muito, ainda mais pelo preço insondável, independente do estado precário, mas comprar o barco daquele senhor soava-me como arrancar de seus braços o que lhe restava na vida. Por consequência seguia para residência movido mais pela curiosidade do que pela cobiça.</p><p>Estevão me recebeu faceiro, com os olhos miúdos e brilhantes por um contato. Sentei-me junto do mesmo na varanda e por horas ouvi suas prozas e como aquele barco envolvia-se nestas: as aventuras de pescas, as desventuras em família, a trágica despedida do que restara da mesma. Um amigo eterno inseparável, era isso que o barco parecia, e o olhar afetuoso de Estevão confirmava-me a teoria. O barco fora de seu pai e antes do pai de seu pai, um ajudante e silente ouvinte por gerações, o que continuava a intrigar-me o motivo da despedida. Arqueando uma sobrancelha questionei-o:</p><p>“Pois então, por que te livras do barco?”</p><p>Estevão sorriu. Permaneceu meio-minuto em silêncio e respondeu solene:</p><p>“Porque estou cansado”</p><p>No fim, acabei por comprar o barco, mais por insistência do velho do que por desejo.</p><p>No dia seguinte recebi a felicitada notícia. Velho Estevão havia falecido.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b249d5e0c94e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Fiction Works: The Gears of Fiction]]></title>
            <link>https://medium.com/@gabrielmendessc/how-fiction-works-the-gears-of-fiction-2d957ad624f0?source=rss-528ceffa8d26------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d957ad624f0</guid>
            <category><![CDATA[james-wood]]></category>
            <category><![CDATA[literature]]></category>
            <category><![CDATA[theory]]></category>
            <category><![CDATA[literature-review]]></category>
            <category><![CDATA[review]]></category>
            <dc:creator><![CDATA[Gabriel Mendes]]></dc:creator>
            <pubDate>Fri, 10 Jul 2020 15:12:53 GMT</pubDate>
            <atom:updated>2020-07-10T16:05:41.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*PfCMVCpJ7RkvP5XS4kqCKQ.jpeg" /></figure><p>How Fiction Works is the beginning of my journey in the literature theory and critics and I couldn’t have started better. How Fiction Works is the third book written by James Wood, which proposes a wide and functional analysis of the literature.</p><p>The book is made by ten chapters that deal with gears that make up fiction. Such as detail, character, language, dialog, etc… During all chapters, Wood uses examples and excerpts from books of the most renowned writers of world literature like Dostoyevski, Chekov, and Flaubert, removing the curtain in front of the gears that make their paragraphs, phrases, and words. Wood leads us to constantly question why the use of an adjective, verb, metaphor, or simile works or not. And in the course of those brilliant analyses, he can lead us with a flawless train of thought. Because of that, the book isn’t a compiled of academic prepositions of hard comprehension. How Fiction Works is a book valid to the writer and the reader, after this book you will never read like before.</p><p>Within the terms covered in the book two catch more of my attention, the free-indirect speech and the character consciousness. The entire first chapter of the book speaks about the free-indirect speech and praises him. Wood makes approaches in the proposal of separating the character from the writer in the speech and addresses the problematic of it, using writers like Jane Austen, Henry James, Chekov, and others. In this analysis, Wood shows how approaching abruptly or sweetly can modify the entire tone of the narrative. On the character consciousness, Wood analysis what is the character and how his consciousness(if it exists) manifests. He makes great interpretations of Dostoyevski’s narratives to show how the reader, and not the author, can become the passive god when spectating the progression of the characters.</p><p>All these themes are incredibly covered in just 288 pages, with all complexity demanded. Looks like you learned the content of one thousand pages.</p><p>How Fiction Works makes great reflection about the narrative and its mechanics, without looking like an objective manual. As Wood himself says: “There’s just one recipe: be careful when cooking”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d957ad624f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Como Funciona a Ficção: As Engrenagens da Narrativa]]></title>
            <link>https://medium.com/@gabrielmendessc/como-funciona-a-fic%C3%A7%C3%A3o-as-engrenagens-da-narrativa-694fd75135b8?source=rss-528ceffa8d26------2</link>
            <guid isPermaLink="false">https://medium.com/p/694fd75135b8</guid>
            <category><![CDATA[crítica-literária]]></category>
            <category><![CDATA[ficção]]></category>
            <category><![CDATA[resenha]]></category>
            <category><![CDATA[teoria-literária]]></category>
            <category><![CDATA[literatura]]></category>
            <dc:creator><![CDATA[Gabriel Mendes]]></dc:creator>
            <pubDate>Tue, 26 Mar 2019 20:03:20 GMT</pubDate>
            <atom:updated>2019-03-26T20:03:20.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*vWxPwJtjSmutuTPQd8iHuQ.jpeg" /></figure><p>Como Funciona a Ficção é o início da minha jornada pelos livros de Teoria e Crítica Literária e não poderia ter começado de melhor forma. Como Funciona Ficção é a terceira obra de James Wood, que propõe uma análise abrangente e funcional da literatura.</p><p>O livro é composto por dez capítulos que trata das mais variadas engrenagens que compõe a ficção. Entre elas: detalhe, personagem, linguagem, diálogo e etc… Durante o decorrer de todos os capítulos Wood se utiliza de exemplos e trechos dos mais renomados escritores da literatura mundial, como Dostoiévski, Tchekhóv e Flaubert, destrinchando-os e retirando a cortina à frente das engrenagens que compõe parágrafos, frases e palavras destes. Ele constantemente leva-nos a questionar o porquê de um adjetivo, verbo, metáfora ou símile funcionar ou não. E durante essas brilhantes analises consegue nos guiar em sua linha de raciocínio de forma fluída e clara, por esta forma de escrita que o livro não é um compilado de termos e preposições acadêmicos de difícil compreensão, Como Funciona a Ficção é tão válido para o escritor quanto o leitor, depois deste livro, suas leituras se alteraram por completo.</p><p>Dentro dos temas abordados em Como Funciona a Ficção, dois mais me chamaram a atenção, sendo eles o estilo indireto-livre e a consciência. O primeiro capítulo do livro faz questão de tratar deste estilo e enaltece-lo, Wood cria abordagens na tentativa de separar o narrador e o personagem dentro deste estilo e a problemática que disto convém, utilizando-se de autores como Henry James, Jane Austen, Tchekhóv e demais renomados escritores, Wood passa a analisar como essa simbiose entre o autor e o personagem pode recriar o melhor de dois mundos, como pode distanciar-se e aproximar-se do personagem suavemente ou bruscamente e com isto recriar por completo a forma como encaramos aquele personagem ou ficção. No demais, utilizando-se de reflexões já desenvolvidas quanto a plateia e o personagem, Wood passa a analisar o que é o personagem e como a consciência(se é que há uma consciência) deste manifesta-se, utilizando de grandiosas interpretações das obras de Dostoiévski, pessoalmente meu escritor favorito, de como o leitor pode tornar-se um deus passivo ao presenciar a progressão de um personagem, aonde o próprio leitor, e não o autor, pode tornar-se o verdadeiro ser onisciente daquela narrativa. Contudo o livro vai além, passando reflexões quando a “câmera”, a descrição e por consequência o detalhe, os códigos e convenções dentro do realismo, a realidade e a ficção, o próprio conceito ou intuito da ficção e demais temas. Toda essa magnitude de conteúdo é abordada em meras 232 páginas, sinceramente, parece-me incrível o quanto é possível absorver de poucos mais de 200 páginas.</p><p>Sem sombra de dúvidas Como Funciona a Ficção foi um dos melhores livros deste ano até o momento. Tece grandes reflexões quanto a narrativa e suas mecânicas, sem parecer um manual ou receita objetiva, como Wood mesmo diz: <strong><em>“Só existe uma receita: ter o maior cuidado na hora de cozinhar”</em></strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=694fd75135b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>