<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joanna Otmianowska</title>
    <description>The latest articles on DEV Community by Joanna Otmianowska (@joannaotmianowska).</description>
    <link>https://dev.to/joannaotmianowska</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F483639%2F6c7d5c17-1f17-4651-ba63-6e504a786127.jpeg</url>
      <title>DEV Community: Joanna Otmianowska</title>
      <link>https://dev.to/joannaotmianowska</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joannaotmianowska"/>
    <language>en</language>
    <item>
      <title>I used AI for every task for two weeks</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Tue, 11 Nov 2025 12:48:14 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/i-used-ai-for-every-task-for-two-weeks-3pgi</link>
      <guid>https://dev.to/joannaotmianowska/i-used-ai-for-every-task-for-two-weeks-3pgi</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Reflections after using Claude Code for everything&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I’m a frontend developer, and for two weeks, I decided to use Claude Code for literally every task at work. What started as a simple test quickly turned into a full-on experiment. I wanted to see what would happen if I fully committed to AI-assisted coding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During those two weeks, I worked on all sorts of tasks. Some were purely technical: implementing new features, fixing bugs, planning projects, reviewing code. Others were more organizational: writing documentation, preparing presentations, setting up meetings, creating tickets in Jira.  &lt;/p&gt;

&lt;p&gt;No matter what it was, I tried to start with Claude Code.&lt;br&gt;&lt;br&gt;
(Quick clarification, because the world of AI tools is getting crowded: &lt;strong&gt;Claude Code&lt;/strong&gt; is an AI tool that works directly in your terminal, similar to Copilot or Cursor, but chat-based and fully terminal-driven.)&lt;/p&gt;




&lt;h3&gt;
  
  
  My notes in short
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AI speeds up your work.
&lt;/li&gt;
&lt;li&gt;AI slows you down.
&lt;/li&gt;
&lt;li&gt;AI makes me lazy and stops me from thinking.
&lt;/li&gt;
&lt;li&gt;AI helps me think on a higher level and learn faster.
&lt;/li&gt;
&lt;li&gt;AI smooths my daily flow.
&lt;/li&gt;
&lt;li&gt;AI breaks my focus and context.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Surprised? Yeah, me too.&lt;/p&gt;

&lt;p&gt;In short, the whole experiment can be summarized in one phrase:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;It depends.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Because it really does. It depends on &lt;em&gt;what&lt;/em&gt; you use AI for, &lt;em&gt;how&lt;/em&gt; you use it, and &lt;em&gt;what&lt;/em&gt; you expect to get out of it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Claude vs. the rest
&lt;/h2&gt;

&lt;p&gt;Overall, Claude Code outperformed Cursor and Copilot for me. Even though they all run similar models (in this case, I used Sonnet 4.5 most of the time), Claude handled searches better, understood project context faster, and produced solutions that worked right away.  &lt;/p&gt;

&lt;p&gt;So my first impressions were genuinely positive.&lt;br&gt;&lt;br&gt;
But like any tool, it shines in some cases and completely misses in others.&lt;/p&gt;




&lt;h2&gt;
  
  
  When AI works great
&lt;/h2&gt;

&lt;p&gt;Claude was incredibly helpful for &lt;strong&gt;repetitive coding tasks&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
If I already knew what needed to be done and could describe the steps clearly, it sped up my work massively.  &lt;/p&gt;

&lt;p&gt;It was especially powerful when working on tasks similar to ones I had done before. I could define requirements, give good examples, and let it handle the rest. Then I’d just review and polish the code.  &lt;/p&gt;

&lt;p&gt;There was something very satisfying about watching it run, test things (I also experimented with Playwright MCP, so Claude could open the browser, test flows, and fix errors by itself), and deliver results while I focused on the bigger picture.&lt;/p&gt;

&lt;p&gt;Another area where AI shined was &lt;strong&gt;refactoring&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
I was in the middle of a big “goodbye-Redux” refactor (hands up if you’re doing the same 🙋‍♀️). I had a clear plan and migration steps. Claude was a lifesaver for repetitive parts like copying, renaming, and updating imports. It handled it faster and more reliably than I could.  &lt;/p&gt;

&lt;p&gt;That freed me up to focus on architecture and structure instead of fighting with missing helper files or broken imports.&lt;/p&gt;

&lt;p&gt;And one more huge benefit: &lt;strong&gt;planning and brainstorming&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
When I had multiple possible approaches, Claude helped me quickly compare them, build small PoCs, and test ideas. Having that feedback loop right inside my project was awesome. Plus, the documentation generated along the way made code reviews and follow-up work smoother.&lt;/p&gt;




&lt;h2&gt;
  
  
  When AI gets in the way
&lt;/h2&gt;

&lt;p&gt;Of course, it wasn’t all sunshine and rainbows.&lt;br&gt;&lt;br&gt;
Because I decided to use Claude for &lt;em&gt;everything&lt;/em&gt;, I started… missing coding.  &lt;/p&gt;

&lt;p&gt;Sometimes I felt like I wasn’t really &lt;em&gt;thinking&lt;/em&gt; anymore, just typing prompts. I even caught myself scrolling Slack or reading random stuff while waiting for the AI to finish its job. And that completely killed my focus.&lt;/p&gt;

&lt;p&gt;Working with AI does make context-switching easier.&lt;br&gt;&lt;br&gt;
I can keep two or three threads running in parallel (as long as I don’t get lost in my Git worktrees 😅).&lt;br&gt;&lt;br&gt;
But once I let my mind wander outside of the task, answering messages or reading something, coming back is &lt;em&gt;hard&lt;/em&gt;.&lt;br&gt;&lt;br&gt;
I’ll probably dedicate a separate post to the topic of “context when coding with AI,” because it’s a big one.&lt;/p&gt;

&lt;p&gt;The scary part? Sometimes I caught myself delegating &lt;em&gt;tiny&lt;/em&gt; things, like asking Claude to change a color or font size, just because I didn’t feel like doing it manually. It would’ve taken seconds.&lt;br&gt;&lt;br&gt;
That’s when I realized: I don’t want this to become my normal.  &lt;/p&gt;

&lt;p&gt;I don’t want to show up, type a few prompts, wait for AI to spit out the result, and call it a day.  &lt;/p&gt;

&lt;p&gt;Sure, I still reviewed everything, made sure I understood the code, and didn’t commit anything blindly.&lt;br&gt;&lt;br&gt;
But sometimes I didn’t feel as &lt;em&gt;connected&lt;/em&gt; to what I built.&lt;/p&gt;




&lt;h2&gt;
  
  
  The “is it worth it?” dilemma
&lt;/h2&gt;

&lt;p&gt;Another big question that came up, one many devs probably face, is:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;When is writing a prompt actually worth the effort?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes I already &lt;em&gt;know&lt;/em&gt; exactly how to solve a problem.&lt;br&gt;&lt;br&gt;
But since I promised myself to do everything with Claude, I had to stop and write a full prompt, add examples, and provide context, and that took time.  &lt;/p&gt;

&lt;p&gt;Was it worth it? I’m still not sure.&lt;br&gt;&lt;br&gt;
If I already know how to do something, maybe it’s faster to just do it myself.&lt;br&gt;&lt;br&gt;
On the other hand, if I can hand it off to AI and move on to something else, maybe that’s still a win.&lt;br&gt;&lt;br&gt;
But do I really &lt;em&gt;need&lt;/em&gt; to move on?&lt;br&gt;&lt;br&gt;
That’s where the line starts to blur.&lt;/p&gt;

&lt;p&gt;One advantage here is that &lt;strong&gt;writing a good prompt helps organize your thoughts&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Often, when I started describing a problem, I realized I hadn’t considered something: “Oh wait, we didn’t think about X!”&lt;br&gt;&lt;br&gt;
I might’ve noticed it later while implementing, but AI forced me to spot it earlier. That’s a win.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup fatigue and the automation trap
&lt;/h2&gt;

&lt;p&gt;Another challenge: setup time.&lt;br&gt;&lt;br&gt;
Because it was a new tool, I was learning on the go, testing sub-agents, slash commands, and automation workflows.&lt;br&gt;&lt;br&gt;
Some of them worked beautifully. Others? Total flops.  &lt;/p&gt;

&lt;p&gt;I built two helpful sub-agents and two useless ones.  &lt;/p&gt;

&lt;p&gt;Finding the balance between “should I automate this?” and “should I just do it manually?” was tough, especially while handling real project work.&lt;br&gt;&lt;br&gt;
I couldn’t disappear for a week saying, “Sorry, I’m configuring AI agents.”  &lt;/p&gt;

&lt;p&gt;And with how fast the AI landscape evolves, sometimes investing time in setups feels pointless, because by the time you finish, a new and better version is already out.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Whew, that was a long one.&lt;br&gt;&lt;br&gt;
But maybe that’s fitting, because my feelings after this experiment are just as mixed.  &lt;/p&gt;

&lt;p&gt;Claude Code has become my &lt;strong&gt;main coding companion&lt;/strong&gt;, but not for every task.&lt;br&gt;&lt;br&gt;
I don’t think there’s a universal rule like &lt;em&gt;use AI for this, but never for that&lt;/em&gt;.&lt;br&gt;&lt;br&gt;
Everyone needs to find their own balance.&lt;/p&gt;

&lt;p&gt;For example, I love writing tests, so I don’t delegate them to AI.&lt;br&gt;&lt;br&gt;
But when it comes to setting up folder structures, I gladly hand that off.&lt;br&gt;&lt;br&gt;
Honestly, I enjoy watching the automation unfold.  &lt;/p&gt;

&lt;p&gt;Still, the bigger question remains:&lt;br&gt;&lt;br&gt;
How much should I give away to AI, and what should I keep for myself?  &lt;/p&gt;

&lt;p&gt;When does “AI writes my code” turn into “I’ve forgotten how to code”?&lt;br&gt;&lt;br&gt;
In the past, we talked about &lt;em&gt;tutorial hell&lt;/em&gt;, where you can follow examples but can’t build from scratch.&lt;br&gt;&lt;br&gt;
Now we might be entering &lt;em&gt;AI agents hell&lt;/em&gt;, where the code looks fine and feels like something you’d write, but would you, really?&lt;/p&gt;

&lt;p&gt;On the other hand, is writing from scratch even the true test of skill anymore?&lt;br&gt;&lt;br&gt;
Knowing docs by heart doesn’t make you a great developer.&lt;br&gt;&lt;br&gt;
Even AI knows the docs and still gets lost in real projects.  &lt;/p&gt;

&lt;p&gt;So maybe the question isn’t &lt;em&gt;whether&lt;/em&gt; to use AI, but &lt;em&gt;how consciously&lt;/em&gt; we do it.  &lt;/p&gt;

&lt;p&gt;Does offloading code generation free us up to focus on what really matters, or is it just an illusion of progress?&lt;/p&gt;




&lt;p&gt;💬 &lt;strong&gt;What do you think?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Have you tried a similar experiment yourself?&lt;br&gt;&lt;br&gt;
Or is there something you’d like to ask about the experience?  &lt;/p&gt;




&lt;p&gt;If you enjoyed this post, follow me here on &lt;a href="https://dev.to/joannaotmianowska"&gt;dev.to&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>coding</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>My Daily AI Boost: How I Supercharge My Frontend Workflow</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Wed, 12 Feb 2025 20:19:25 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/my-daily-ai-boost-how-i-supercharge-my-frontend-workflow-4d39</link>
      <guid>https://dev.to/joannaotmianowska/my-daily-ai-boost-how-i-supercharge-my-frontend-workflow-4d39</guid>
      <description>&lt;p&gt;&lt;strong&gt;How AI Is Transforming the World of Programming&lt;/strong&gt; 🤖&lt;/p&gt;

&lt;p&gt;The tech world today is buzzing with AI news—so much so that it's nearly impossible to spend a week without hearing something new about it. A question that keeps coming up is: &lt;strong&gt;"Will AI take our jobs?"&lt;/strong&gt; While this topic pops up in many industries, here I'll focus on what it means for programmers.&lt;/p&gt;

&lt;p&gt;Many folks are so worried that AI might steal their jobs that they avoid diving deep into what AI is all about. You often hear claims about the superiority of human work and that it’s pointless to try replacing it. But here’s the deal: &lt;strong&gt;AI will definitely transform the work we know today.&lt;/strong&gt; With the current pace of technological progress, the job of a programmer in a few decades will likely look completely different from what it is now.&lt;/p&gt;

&lt;p&gt;Just think about it—programming decades ago was nothing like it is today. Back then, there were no interactive solutions, no in-code suggestions, no step-by-step testing of our programs. So rather than demonizing AI for taking over parts of our work, it makes sense to see it as an evolution. &lt;strong&gt;AI is simply taking over some of our routine tasks, and that’s not necessarily a bad thing.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Embracing AI as a Tool
&lt;/h2&gt;

&lt;p&gt;The key is to stay open to these changes, experiment, and treat AI as a tool that can help you. Instead of clinging to the old ways just because they’re familiar, why not see what AI can do for you in different scenarios? Progress happens when we step outside our comfort zone and try something new.&lt;/p&gt;

&lt;p&gt;Let me share some examples of how I use AI in my everyday work:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autocomplete, code suggestions, test scenarios, and boilerplate generation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  I rely on &lt;strong&gt;GitHub Copilot&lt;/strong&gt; for these tasks. I used to think that writing every line myself was the best way to learn. Sure, that approach made sense when I was starting out. But now that I’ve written the same component a thousand times, having an autocomplete tool that guesses what I’m aiming for—and provides a template I can tweak—saves me a ton of time. I always review the AI-generated code carefully, though, to ensure everything is spot on. Next week, I’m also planning to try out a tool called Cursor for coding.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Assisting with pull request reviews&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  When I need a clearer picture of the changes in a pull request, I sometimes ask Copilot (directly in GitHub) to summarize the modifications or highlight specific fragments.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Answering documentation queries, comparing solutions, optimizing code, and debugging&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  I switch between &lt;strong&gt;Perplexity&lt;/strong&gt; and &lt;strong&gt;ChatGPT&lt;/strong&gt; for these tasks. I initially leaned towards Perplexity because it shows its sources, making it easy to verify the suggestions. Lately, I’ve also been using ChatGPT’s search feature (I have a paid subscription that unlocks various models and functionalities) and it’s been pretty effective.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Creating test data sets&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  For generating data sets for component or end-to-end tests, I use whichever tool is at hand—be it Perplexity, ChatGPT, or Copilot. The quality is similar enough across the board.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Improving writing: grammar, style, and conciseness&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  I often draft longer messages on Slack with a little help from ChatGPT. Since most of our communication is in English, and I tend to be a bit verbose, ChatGPT helps me condense my thoughts into clearer, shorter messages.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Summarizing long texts and extracting key insights&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  Again, ChatGPT comes in handy here, whether I need a quick summary or a list of the most important takeaways from a document.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Drafting texts, notes, and outlines&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  I’ve even used ChatGPT to build content like outlines for my projects or podcasts. For instance, a challenge I once developed—“Working with Purpose”—was entirely synthesized by ChatGPT using my own notes and ideas. The game changer for me was using the "custom instructions" feature in ChatGPT, which helped me maintain a consistent style across all my content.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Product research and comparing scientific studies&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  When I’m on the hunt for a new product or need to compare research findings, I rely on &lt;strong&gt;Perplexity&lt;/strong&gt;. It’s a great companion for in-depth research.&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Design assistance&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
  When it comes to picking color palettes or font sets for web and app projects, I use ChatGPT. I’m not a natural-born designer, so I lean on AI-generated suggestions to ensure my projects look visually appealing and consistent.&lt;/p&gt;




&lt;p&gt;All in all, these are just some ways I integrate AI into my daily workflow. I don’t use every tool all the time—it’s more about using AI to support my work rather than replace my creativity. &lt;strong&gt;Embrace AI as a tool, experiment with it, and let it inspire you to try new things.&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;I hope this article inspires you to explore AI in your own work and discover the benefits of experimenting with new tools. Happy coding! &lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Aha Moments I Had When Trying Next.js 14 for the First Time (as a React Dev) 🚀🤯✨</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Tue, 14 May 2024 08:54:24 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/aha-moments-i-had-when-trying-nextjs-14-for-the-first-time-as-a-react-dev-1mkk</link>
      <guid>https://dev.to/joannaotmianowska/aha-moments-i-had-when-trying-nextjs-14-for-the-first-time-as-a-react-dev-1mkk</guid>
      <description>&lt;p&gt;As a React dev, I recently dove into Next.js 14 and boy, did I have some interesting "Aha!" moments. I thought I'd share my journey and the lessons I learned, so you can benefit from my experiences and perhaps have a smoother transition.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Your Logs Are in the Terminal 📜
&lt;/h2&gt;

&lt;p&gt;First thing I noticed was that logs aren’t popping up in my browser console anymore. Instead, they’re all neatly organized in the terminal. This can be a bit of a surprise if you're used to debugging with &lt;code&gt;console.log&lt;/code&gt; in the browser. It turns out that because Next.js leans heavily on server-side rendering (SSR), many of the logs are generated on the server side. So, keep your terminal open and handy! 📺&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Logs for client-side code will still appear in the browser console. Only server-side logs will appear in the terminal. Ensure you're aware of where your code is running.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. No More &lt;code&gt;pages&lt;/code&gt; Directory 📂
&lt;/h2&gt;

&lt;p&gt;Remember all those tutorials telling you to put your components in the &lt;code&gt;pages&lt;/code&gt; directory? Well, Next.js 14 has moved away from that. Instead, it uses the &lt;code&gt;app&lt;/code&gt; directory for building routes and components. This new structure aligns with a more modular approach, making it easier to manage and scale large applications. So if you can't find &lt;code&gt;pages&lt;/code&gt;, don’t panic—just look for &lt;code&gt;app&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; As of Next.js 13, the &lt;code&gt;app&lt;/code&gt; directory was introduced but the &lt;code&gt;pages&lt;/code&gt; directory is still available for use. The &lt;code&gt;app&lt;/code&gt; directory follows the new file-based routing system, while &lt;code&gt;pages&lt;/code&gt; is part of the older system.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Components are Server Ones Unless Specified 🖥️
&lt;/h2&gt;

&lt;p&gt;By default, all components in Next.js 14 are server components. This means they are rendered on the server and sent to the client, which can improve performance and SEO. However, if you need client-side interactivity, you have to explicitly declare a component as a client component using the &lt;code&gt;use client&lt;/code&gt; directive. This separation helps optimize rendering and resource usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Hooks are for Client Components Only 🪝
&lt;/h2&gt;

&lt;p&gt;If you love using hooks like &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt;, here's a heads-up: you can only use them in client components. Server components don't have access to the hooks because they are rendered on the server, where hooks like &lt;code&gt;useEffect&lt;/code&gt; wouldn't make sense. This constraint encourages you to think about where your state and side effects should live, promoting cleaner and more efficient code.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Asynchronous Components are Server-Only 🔄
&lt;/h2&gt;

&lt;p&gt;Async components can only be used on the server side. This makes sense because server components can handle data fetching before sending the final HTML to the client. If you need to fetch data client-side, you'll need to use client components or hooks like &lt;code&gt;useEffect&lt;/code&gt; in your client components. This division ensures that the initial load is fast and the client does minimal work.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Routing is Super Cool and Intuitive 🗺️
&lt;/h2&gt;

&lt;p&gt;Next.js 14 has an amazing routing system that feels natural and intuitive. Routes are defined by the file structure in the &lt;code&gt;app&lt;/code&gt; directory, and dynamic routing is a breeze with file and folder naming conventions. You don't need to configure a router manually—Next.js handles it all for you. This approach reduces boilerplate code and makes navigation a lot simpler.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Automagical Features That Are Mind-Boggling 🤯
&lt;/h2&gt;

&lt;p&gt;There are many "automagical" features in Next.js 14 that can be hard to wrap your head around at first. Dynamic routes, for instance, are incredibly powerful but might seem confusing initially. These features automate a lot of the heavy lifting, letting you focus on building features rather than boilerplate code. Take the time to read the documentation and experiment—it’s worth it!&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Caching Galore 🚀
&lt;/h2&gt;

&lt;p&gt;One thing that caught me off guard was how aggressively Next.js caches components. This is great for performance but can be tricky when you need to update a component frequently. You'll need to use strategies like setting proper cache headers or using &lt;code&gt;revalidate&lt;/code&gt; to control when data should be refreshed. Understanding caching mechanisms in Next.js will save you a lot of headaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up 🎁
&lt;/h2&gt;

&lt;p&gt;Switching to Next.js 14 from React alone was a bit of a learning curve, but these "Aha!" moments were worth it. The framework offers a ton of features that can supercharge your apps, once you get the hang of them. I hope these insights help you on your Next.js journey. Happy coding! 👩‍💻👨‍💻&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Right Way of Programming 👩🏽‍💻</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Mon, 13 May 2024 10:06:38 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/the-right-way-of-programming-3jda</link>
      <guid>https://dev.to/joannaotmianowska/the-right-way-of-programming-3jda</guid>
      <description>&lt;p&gt;&lt;strong&gt;I recently read an episode of "Computer Things" newsletter by Hillel Wayne with advice for beginner programmers, and one remark made me pause for a while. Here it is:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"At some point you will discover the Right Way to program, the thing which makes this all make sense, and you’ll be convinced that the whole field would be so much better off if everybody else programmed the Right Way, too."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And the author continues:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"I’m not going to tell you to not get swept up in the Right Way, because that’s pretty much impossible. And honestly it feels really great to discover the Right Way and life’s too short to not feel good. Just be mindful of the fact you’re getting swept up and try not to make your identity the Right Way Guy. Eventually the honeymoon will end and you’ll learn that programming is frustrating and messy regardless of which Right Way people use, and that you can also make great software without doing it the Right Way. Over time you’ll learn fifty other Right Ways and learn to mix and match them to the problem at hand."&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  It was supposed to be so beautiful…
&lt;/h2&gt;

&lt;p&gt;It reminded me of the times when &lt;strong&gt;I discovered my Right Ways&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;💥 Number one: React is better than Angular. &lt;strong&gt;Why doesn’t EVERYONE write frontend in React?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;💥 Number two: tests. Why does part of the code NOT HAVE tests. &lt;strong&gt;Why doesn’t EVERYONE write tests for EVERYTHING?&lt;/strong&gt; (Well, I still think this one is right). &lt;/p&gt;

&lt;p&gt;💥 Number three: refactoring. Why did someone add new functionality in OLD code without REWRITING it the new way? It’s already known that this is NOT how it’s done, &lt;strong&gt;why do we keep such OLD code&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;💥 Number four: code coverage. &lt;strong&gt;How do others EVEN function WITHOUT IT?&lt;/strong&gt; It would be enough to CHECK code coverage by tests, add what’s missing, and that's it. &lt;/p&gt;

&lt;p&gt;💥 Number five: functional programming. The code is short, simple, pleasant. &lt;strong&gt;Why doesn’t EVERYONE code this way?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I could go on because there were many such things. You probably have a list of such Right Ways if you’ve been programming for a while. Over time, I learned that a &lt;strong&gt;programmer's life is not black and white&lt;/strong&gt;. It’s not always possible to use the Right Way. Heck, &lt;strong&gt;sometimes even others think that this way is not the only one&lt;/strong&gt;. Nor right. And you, heartbroken, agree with them. &lt;/p&gt;

&lt;p&gt;Because it depends on code's specifics, the project, the client's requirements. Because, primarily, the code has to work, a new feature needs to be added, and sometimes the Product Owner doesn’t really care about the fact that adding e2e tests to a particular section might take a week (oh, I was in such a project!).&lt;/p&gt;

&lt;p&gt;I'm not advocating writing bad code, not refactoring, or not writing tests. I'm more about the fact that not everything depends on us and &lt;strong&gt;knowing some new way of doing something cool and useful doesn't always mean it should be used everywhere&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  And then the ideal broke…
&lt;/h2&gt;

&lt;p&gt;I remember at one job interview when asked what I would do if given a legacy project, I answered without hesitation &lt;strong&gt;"first I would rewrite it using newer technology."&lt;/strong&gt; Today I laugh at myself. And I laughed too, later adding lines of code in Backbone (if you know, you know). My approach to refactoring has changed over the years. Usually, I actually follow the rules I’ve gathered &lt;a href="https://dev.to/joannaotmianowska/to-refactor-or-not-to-refactor-501n"&gt;in this article&lt;/a&gt;. Will I ever change the rules I follow? Probably.&lt;/p&gt;

&lt;p&gt;What a few years of programming have taught me is mainly that &lt;strong&gt;there really are no universal ways&lt;/strong&gt;. Sure, we can apply certain principles, techniques. Yet, code involves many variables and when entering an existing project, &lt;strong&gt;we can't control many of these variables&lt;/strong&gt;. Getting frustrated then that something isn’t written "our way" makes no sense.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A pretext for reflection today is the Right Way. Got yours? Do you treat it like the bible? Or are there things you once believed in, but are no longer relevant today? I’m really curious how you approach this! Share your thoughts in the comment section below&lt;/strong&gt; ✨&lt;/p&gt;

</description>
      <category>programming</category>
      <category>wayofwork</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>To refactor or not to refactor?</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Wed, 09 Feb 2022 20:18:54 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/to-refactor-or-not-to-refactor-501n</link>
      <guid>https://dev.to/joannaotmianowska/to-refactor-or-not-to-refactor-501n</guid>
      <description>&lt;p&gt;While working with code (especially legacy one), you may often stumble upon parts of the code that needs refactoring. But... should you always refactor? &lt;/p&gt;

&lt;p&gt;You may say - where this question is coming form? Just refactor. There is a Scout rule! Always leave the code in the better shape.&lt;/p&gt;

&lt;p&gt;That's true. But...&lt;/p&gt;

&lt;p&gt;It's good to leave code in a better shape that it was before. However, refactoring (especially in complex, legacy projects) may be time consuming and may not add a clear benefit to your current work&lt;/p&gt;

&lt;h3&gt;
  
  
  Before refactoring, consider things below:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  How complex is the change I want to make?&lt;/li&gt;
&lt;li&gt;  Why I want to make this change? Will other devs benefit from it (or do I only want to rewrite the code in my way)?&lt;/li&gt;
&lt;li&gt;  Does current task benefit from this change? If so, how?&lt;/li&gt;
&lt;li&gt;  Would this change slow down the development?&lt;/li&gt;
&lt;li&gt;  What is testing scope for that? Is there any additional regression testing needed after this change is implemented?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  There are also small refactoring tasks you can usually do with no major impact, these are:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Code formatting so the code is more readable and follows current project standard&lt;/li&gt;
&lt;li&gt;  Change variables or functions names to be more descriptive&lt;/li&gt;
&lt;li&gt;  Extracting code to variables/functions if you see that code is being duplicated&lt;/li&gt;
&lt;li&gt;  Creating helper functions that can be reused&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;And do you always refactor?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>refactoring</category>
      <category>legacy</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to test current time with jest and react-testing-library</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Sat, 05 Feb 2022 19:34:40 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/how-to-test-current-time-with-jest-and-react-testing-library-a12</link>
      <guid>https://dev.to/joannaotmianowska/how-to-test-current-time-with-jest-and-react-testing-library-a12</guid>
      <description>&lt;p&gt;You have a frontend app that shows current time. I mean - you built a clock. Pretty simple, working fine. But how to test it properly?&lt;/p&gt;

&lt;p&gt;If you new to testing, you may not see the problem. What's the issue, right? You check what time is it in the system, then you check in test if UI shows the same thing. Not really...&lt;/p&gt;

&lt;p&gt;This approach won't work cause time may be different when you check it is the system and then (after a while) check it in your test. Your goal needs to be different - you need to control system time in tests and check things based on that.&lt;/p&gt;

&lt;p&gt;Let's assume we have really simple React component, the only thing it does is showing hours and minutes (we don't care if this shows '02' when it 2 o'clock, let's make if super simple). The component looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;styled-components&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Wrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="s2"&gt;`
    text-align: center;
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Wrapper&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Current time is: &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getHours&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;today&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getMinutes&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h2&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Wrapper&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's write a unit test for it. We will be using &lt;a href="https://jestjs.io/"&gt;jest&lt;/a&gt; and &lt;a href="https://testing-library.com/docs/react-testing-library/intro/"&gt;React Testing Library&lt;/a&gt;. If we want to test anything related to time, we shouldn't use real time methods (no &lt;code&gt;setTimeout&lt;/code&gt; and things like this) cause they rely on real time. We need fake time here. So first we want to tell &lt;code&gt;jest&lt;/code&gt; to do that before our test start executing. We can achieve it by using &lt;code&gt;jest.useFakeTimers()&lt;/code&gt; . Having that we can set system time we want. And now test the UI! Just don't forget to go back to real timers after all tests that needed fake ones.&lt;/p&gt;

&lt;p&gt;This is how the test may look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;screen&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@testing-library/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Time&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./Time&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Time component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;beforeAll&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useFakeTimers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSystemTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;20 Aug 2020 02:12:00 GMT&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="nf"&gt;afterAll&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useRealTimers&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;renders current time&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Time&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;);&lt;/span&gt;

        &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;screen&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/current time is/i&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeInTheDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;screen&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/2/i&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeInTheDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;screen&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/12/i&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeInTheDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you got the idea :) Happy coding and testing!&lt;/p&gt;

</description>
      <category>jest</category>
      <category>reacttestinglibrary</category>
      <category>react</category>
      <category>testing</category>
    </item>
    <item>
      <title>Dev mindset - how to really own the process?</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Sat, 05 Feb 2022 19:07:00 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/dev-mindset-how-to-really-own-the-process-243d</link>
      <guid>https://dev.to/joannaotmianowska/dev-mindset-how-to-really-own-the-process-243d</guid>
      <description>&lt;p&gt;"Ownership" and "owning the process" show up a lot in IT industry, especially when you read job offers. What does it really mean to own the process when you work as a software developer? For me a recipe for the ownership is pretty simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You care&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's not just about getting assigned task done and moving to another one. You don't take things as granted. You ask questions if something is not clear. You speak up if something doesn't feel right. Your goal is to understand the reason behind the things you are asked to do. It's not just about coding, it's more about contributing. Sometimes, after long (and painful) discussion this means dropping the feature or not coding things at all. &lt;/p&gt;

&lt;p&gt;It's not just about coding but also proper testing. You don't drop you task after it's merged. You check with QA, you check with Product owner, you check the metrics. You see how the thing you built behaves and you even may have some ideas how to improve it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You see things that are not strictly in your scope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you want to own what you do, you need to think of the product you build and people you work with. You consider how your task would impact the users. You think if your change may interfere with your or other team members work. You can see dots in various places and you know how to link them. &lt;/p&gt;

&lt;p&gt;You are proactive and jump in the different roles when needed. You take care of the tasks without your manager micro managing you and asking about the progress every two hours. You know how to handle problems that show up or you know who to ask for help. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You have knowledge or you know where to get it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You have not only technical knowledge but also domain knowledge. You know why things are built the way they are. You know how to go with the existing flow. While thinking of implementing a feature, you already have an idea on what changes in other places are required. Or you know who to ask to get these pieces of information. &lt;/p&gt;

&lt;p&gt;These things may sound simple but in reality they are hard. You need to change the way you think about the work to really get the ownership going. It's not like you ask one or two questions and - done - an ownership badge shows up. Owning something requires constant learning. You always have more to discover.&lt;/p&gt;

&lt;p&gt;So why you should care? Can't you just code the task based on 3 requirements you see in the ticket description? And if something it not clear, can't you just do it your way and hope that this doesn't comes back to you? Of course you can. But would it give you satisfaction, better salary and a promotion? That is a question you need to reply by yourself. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Photo from &lt;a href="https://kaboompics.com/"&gt;kaboompics&lt;/a&gt;&lt;/em&gt;  &lt;/p&gt;

</description>
      <category>career</category>
      <category>devmindset</category>
      <category>ownership</category>
      <category>mindset</category>
    </item>
    <item>
      <title>Do women need a special invitation to tech conferences?</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Thu, 07 Oct 2021 12:20:56 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/do-women-need-a-special-invitation-to-tech-conferences-2bbk</link>
      <guid>https://dev.to/joannaotmianowska/do-women-need-a-special-invitation-to-tech-conferences-2bbk</guid>
      <description>&lt;p&gt;Let me tell you a story. I got an email once from tech conference organisers. They asked me to be a speaker during their event. I had just started my programming job then, didn’t have much experience so I was quite surprised with their question. I was doing a lot for community via my blog and Facebook group so I guess this is how they found me. I replied to this email saying that I didn’t feel confident enough to speak on tech conf after few months of work. ‘You can speak on any topic. We don’t have female speaker so the topic isn’t so relevant’, they replied. This got me thinking: ‘Is my talk being selected for tech conf only to fill the diversity gap?’.&lt;/p&gt;

&lt;p&gt;I wanted to write about female speakers on tech conferences for a while. I while ago PHP Central Europe conf was cancelled because of lack of female speakers. If I recall this correctly, the same happened to GitHub’s Electron Conf few years ago. How canceling these events looks from female perspective?&lt;/p&gt;

&lt;p&gt;I had an opportunity to be a speaker on two JavaScript conferences. I was one of the few women that gave presentations. To be honest, I haven’t paid attention if there was anything about special demand for female speakers on conference website. I was genuinely interested in the events and decided to submit my subject and see if it will be selected.&lt;/p&gt;

&lt;p&gt;We all know and see that men are still the majority in tech industry. This won’t change by night. Despite having numerous women dedicated initiatives and organisations, there will be less women on IT events. Why? Because there are less women in the industry in general. In my team there are two female programmers (including me) and about twenty male programmers. For me it’s really simple — you can’t have many female speakers on tech conferences because there are not many women in industry in general.&lt;/p&gt;

&lt;p&gt;Don’t get me wrong — I do believe that there should be more women in IT industry. I have founded one of the biggest Polish Facebook group that encourages women to start coding and see if programming is something for them. Today my group gathers more than 20K of members! It’s amazing how many women are interested in IT.&lt;/p&gt;

&lt;p&gt;However, one word in a key here. This word is — ‘interested’. The industry is changing, the world is changing. Women can have every job they want and this includes tech related jobs. More and more women become programmers. But the industry has been growing for years. We need time to change proportions between male and female coders. Don’t expect to get 50% of female speakers on tech conferences when you can rarely find a company where 50% of programmers are women.&lt;/p&gt;

&lt;p&gt;In my opinion this is really tough job to be tech conf organiser nowadays. You have to think about diversity but need to create interesting presentations lineup at the same time. Blind review process is an option. As I mentioned in first paragraph, when I see ‘special invitation’ for female speakers on conferences site, I start having doubts if my subject will be evaluated as I wish it to be. So based on its technical value. Not on a fact that I am a woman.&lt;/p&gt;

&lt;p&gt;Is there any good solution here? To be honest — I have no idea. We have to show women that they are welcome in the industry. I believe that IT events dedicated for women help them to get to know the possibilities they can have. However, these events are meant for newbies. Women that are starting their careers or are thinking about changing their career paths. These women will be tech speakers one day. But they need time (and a lot of knowledge to get!).&lt;/p&gt;

&lt;p&gt;When it comes to experienced female programmers — they already are in the industry. They don’t need special treatment. If they will be interested in the event, they will submit their talks. As event organiser, just be sure that you have reached all possible groups and did everything to have diversified speakers. This doesn’t mean writing: ‘we need women speakers for our event’ in the email. This means e.g. posting info about your event on women-friendly FB group, not only on Slack channel where all members are male programmers. Believe me — this is a lot.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Multiple or one useEffect?</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Tue, 14 Sep 2021 11:57:25 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/multiple-or-one-useeffect-4oco</link>
      <guid>https://dev.to/joannaotmianowska/multiple-or-one-useeffect-4oco</guid>
      <description>&lt;p&gt;When I started working with React hooks, I had a tendency to put everything that was based on component change into one &lt;code&gt;useEffect&lt;/code&gt;. I was used to put it into lifecycle methods like &lt;code&gt;componentDidMount, componentDidUpdate&lt;/code&gt; or &lt;code&gt;componentWillUnmount&lt;/code&gt;. It was natural for me that I need to show my component what to do on the particular stage - so something happens with mounting, something with unmounting etc. I based the logic on the component lifecycle, not on what this logic does. Therefore I ended up having completely unrelated logic in one &lt;code&gt;useEffect&lt;/code&gt; just because I wanted all of that stuff to happen with component mount. Fortunately, I quickly realised that I was wrong.&lt;/p&gt;

&lt;p&gt;You can have multiple &lt;code&gt;useEffects&lt;/code&gt; in your code and this is completely fine! As &lt;a href="https://reactjs.org/docs/hooks-effect.html#tip-use-multiple-effects-to-separate-concerns"&gt;hooks docs&lt;/a&gt; say, you should separate concerns. Multiple hooks rule also applies to &lt;code&gt;useState&lt;/code&gt; - you can have multiple &lt;code&gt;useState&lt;/code&gt; in one component to separate different part of the state, you don't have to build one complicated state object. &lt;/p&gt;

&lt;p&gt;Going back to &lt;code&gt;useEffect&lt;/code&gt; - reading the docs I linked earlier made me change my approach to managing component behaviour using hooks. Right now I always ask myself first if things that I do in one &lt;code&gt;useEffect&lt;/code&gt; are really connected. If not, I try to extract the logic to another &lt;code&gt;useEffect&lt;/code&gt;. Thanks to that I can easily see what happens to the code and I can avoid running some code with no reason (e.g. maybe something is needed to be done only with component first mount). &lt;/p&gt;

&lt;p&gt;However, I try to be mindful and not simply put every single thing in a separate &lt;code&gt;useEffect&lt;/code&gt;. If one data relies on another, I would probably fetch it in one &lt;code&gt;useEffect&lt;/code&gt; to make sure that I have both things in place on time. The same goes with loading - I put changes related to loaders next to the things that caused them. This way I can see when the loader state is changing and what's causing that.&lt;/p&gt;

&lt;p&gt;Did you also have problems with using multiple &lt;code&gt;useEffect&lt;/code&gt; or did you find it easy from the beginning? Let's talk!&lt;/p&gt;

</description>
      <category>react</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>hooks</category>
    </item>
    <item>
      <title>How to code designs better - tips for FE devs</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Sun, 02 May 2021 10:11:01 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/tips-for-frontend-devs-on-how-to-better-approach-coding-designs-390i</link>
      <guid>https://dev.to/joannaotmianowska/tips-for-frontend-devs-on-how-to-better-approach-coding-designs-390i</guid>
      <description>&lt;p&gt;I am a frontend developer and a huge piece of my work is coding designs prepared by someone else. In the companies I worked in there was either a person or a team (or multiple teams) in charge of app design and user experience. Personally, I am not into designing. I find it really hard to build layout from scratch and think of possible user behaviours. I focus on translating a design into a code that will end up as an app or a website in front of users' eyes. Don't get me wrong - I think that designing user interfaces is a hard work, I'm just not "feeling" it (or I simply spent to little time on that). Anyway, I get a design and I code. However, before I get into coding I spent some time on reviewing the designs which often leads to some design changes. Why am I doing it? Didn't I just say that I am not into designing? Couldn't I simply sit and code? Not really. Let me tell you why. &lt;/p&gt;

&lt;p&gt;That's great that nowadays we have so many technologies to use. We have a plethora of choices, especially in frontend development when there is something new coming literally every minute. You can have the best and the newest tech stack in your app but you will go nowhere without one thing. The most important one - the users. They have to feel comfortable while using you an app or navigating on the website you built. They need to perceive your app as intuitive and consistent. Have you ever looked for a closing icon in really annoying modal? Have you scrolled the list of countries to select the proper one because there was no searching by typing? We need to avoid that.&lt;/p&gt;

&lt;p&gt;UX and UI designers know what they are doing. They try to build the best possible app. But.. they can miss something, this is completely normal. As a frontend developer, I look from a different angle. Imagine that a designer has worked on a feature for a month, he or she knows it really well now. When I get this design, first look really matters. There are few questions I always try to answer when opening the design for the first time. Here they are:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Do I understand what this feature does?
&lt;/h2&gt;

&lt;p&gt;If I have to get an explanation how the particular feature works, this is a red light for me. I should be able to figure out how to navigate, where to click and what to do. If something in not clear, I want to have instruction on the screen (as tooltip or something). Of course, I am not saying that literally everything should be on the design. However, with context I have as developer (assuming that e.g. product owner shared what we want to achieve) I expect designs to be self-explaining. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. If I saw this app for the first time, would it be clear for me what to do?
&lt;/h2&gt;

&lt;p&gt;This is linked to the first question.  If I keep asking myself questions like "So where I should click now?", "Why is submit button disabled on that screen?", "Where I can see that there is an error?", "How to close this thing?", I know that some changes may be needed. There is always a new user using your app. If you build for "every-day user", he or should shouldn't be forced to get few hours training on how to use particular feature. Image opening new website in the browser and spending 30 minutes figuring out how to navigate there. This is not how it works, you would probably leave the site after two minutes top. &lt;/p&gt;

&lt;h2&gt;
  
  
  3. Is it consistent with what we already have in the app?
&lt;/h2&gt;

&lt;p&gt;Web apps are complex. As developers, we touch different parts of an app, we may have one particular feature assigned to a team or a project. Same goes for designers. There is always a chance that someone hasn't been in all places in the app. While reviewing designs, I check for inconsistencies. Why this thing is opening as context menu on this screen and as pop-up modal on the other? Why we show error in a red container here and as grey text there? Inconsistencies can be intended, there might be reasons behind doing something differently in the particular place. I always look for the confirmation that a feature should work this way here. If there is similar thing in the current app, I also want to know if it is expected for it to be changed to match the new approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What edge cases do we cover and how we do it?
&lt;/h2&gt;

&lt;p&gt;An answer to this question comes when I start coding because it is hard to predict all possible edge cases. They usually come to my mind when I start to take care of handling error or stumble upon a problem with coding. When I encounter an edge case, I check if design is somehow ready for it. If not, I go back to product owner or a designer so we can decide what's the best way to handle it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Does it looks fine? Are there some misalignments, unexpected font or size changes? How this should look on a different screen size?
&lt;/h2&gt;

&lt;p&gt;This is pretty simple. I check for everything that seems to be off. &lt;/p&gt;

&lt;p&gt;Do you follow any rules while starting work with a new design? What would you add to the list above? Share in comments :)&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>design</category>
    </item>
    <item>
      <title>Status instead of isLoading boolean?</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Mon, 26 Apr 2021 19:13:34 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/status-instead-of-isloading-boolean-53im</link>
      <guid>https://dev.to/joannaotmianowska/status-instead-of-isloading-boolean-53im</guid>
      <description>&lt;p&gt;When I saw the article &lt;a href="https://kentcdodds.com/blog/stop-using-isloading-booleans"&gt;'Stop using isLoading boolean'&lt;/a&gt; written by Kent C. Dodds my first thought was - what's wrong with &lt;code&gt;isLoading&lt;/code&gt; boolean? Why shouldn't I use it? Then I read it. And saw his point.&lt;/p&gt;

&lt;p&gt;It is a common practice to use &lt;code&gt;isLoading&lt;/code&gt; boolean to show some placeholder or spinner when data in our app is loading. This is fine - you set &lt;code&gt;isLoading&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt;, change it to &lt;code&gt;true&lt;/code&gt; when data is loading and when data is here - put it back to &lt;code&gt;false&lt;/code&gt;. But what happens when error occurs? Data is not loading but there is no data to show either. We start to add more conditions - first not loading and no error, then for not loading but with error, another one for loading. Do you see the point?&lt;/p&gt;

&lt;p&gt;What Kent suggests in his approach is having status with different enum values for every case e.g. &lt;code&gt;'idle'&lt;/code&gt;, &lt;code&gt;'resolved'&lt;/code&gt;, &lt;code&gt;'rejected'&lt;/code&gt;. In the code then we can go like (examples based on the article that I mentioned earlier):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (status === 'idle') {
    return &amp;lt;div&amp;gt;Data is loading...&amp;lt;/div&amp;gt;
}

if (status === 'resolved') {
    return &amp;lt;div&amp;gt;{Fetched data}&amp;lt;/div&amp;gt;
}

if (status === 'rejected') {
    return &amp;lt;div&amp;gt;Something went wrong!&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to that we can set status for particular case after every activity and there is no need for double conditions (like is not loading and there is no errors etc). &lt;/p&gt;

&lt;p&gt;To get rid of equal signs we can put status info in variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const isLoading = status === 'idle';

if (isLoading) {
    return &amp;lt;div&amp;gt;Data is loading...&amp;lt;/div&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! I recommend reading &lt;a href="https://kentcdodds.com/blog/stop-using-isloading-booleans"&gt;Kent's article&lt;/a&gt; for deeper explanation and more examples. &lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The simplest way to validate file input type</title>
      <dc:creator>Joanna Otmianowska</dc:creator>
      <pubDate>Wed, 21 Apr 2021 06:14:18 +0000</pubDate>
      <link>https://dev.to/joannaotmianowska/the-simplest-way-to-validate-file-input-type-1dm9</link>
      <guid>https://dev.to/joannaotmianowska/the-simplest-way-to-validate-file-input-type-1dm9</guid>
      <description>&lt;p&gt;I've been working on a form lately and one day I got a task to add type validation to field input. My first thought was to simply check the file type after the file is being uploaded and, based on that, store this file in the list in my app or drop it. The idea was to have extensions whitelist and allow user to add only files that are on that whitelist to make sure that there is nothing insecure being introduced to our system.&lt;/p&gt;

&lt;p&gt;I wanted to make sure that I covered all needed extensions so I ended up checking what were possible types supported by input field. And then I found it - &lt;code&gt;accept&lt;/code&gt; attribute in file input itself. Thanks to that user experience is just great - files not listed in the &lt;code&gt;accept&lt;/code&gt; attribute are simply greyed out so user can't select them. It allows to avoid confusion, dedicated error message and clearly shows the user what he or she can and cannot add to the form.&lt;/p&gt;

&lt;p&gt;I recommend you to check the details in the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept"&gt;docs&lt;/a&gt;, I just want to emphasise that this attribute can accept both file extensions and unique file type specifier. See examples below (taken from &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept"&gt;here&lt;/a&gt;) &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;accept="image/png"&lt;/code&gt; or &lt;code&gt;accept=".png"&lt;/code&gt; — Accepts PNG files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;accept="image/png, image/jpeg"&lt;/code&gt; or &lt;code&gt;accept=".png, .jpg, .jpeg"&lt;/code&gt; — Accept PNG or JPEG files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;accept="image/*"&lt;/code&gt; — Accept any file with an &lt;code&gt;image/*&lt;/code&gt; MIME type. (Many mobile devices also let the user take a picture with the camera when this is used.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;accept=".doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"&lt;/code&gt; — accept anything that smells like an MS Word document.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using &lt;code&gt;accept&lt;/code&gt; attribute instead of checking every file manually and then adding it to the list speeded my work. I didn't have to throw an error every time wrong file is added and explain to the user what he or she should do now. However, I wanted to be 1000% sure that there is no way to attach wrong file in the form. That's true that &lt;code&gt;accept&lt;/code&gt; attribute doesn't allow user to select file with type I didn't specify but you know... the form can be always compromised with external script. This is why I decided to add one more step before adding files to the list and wrote the function checking if selected file type is included in the extensions whitelist I have in the app.  If it is not there - nothing happens (no error for the user is needed as this is edge case only if someone compromises the form). And the app is safe.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
