<?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: Gabriel</title>
    <description>The latest articles on DEV Community by Gabriel (@gabriel1).</description>
    <link>https://dev.to/gabriel1</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F126657%2F93802ca8-aea0-47f8-8aa3-0b49bde29410.png</url>
      <title>DEV Community: Gabriel</title>
      <link>https://dev.to/gabriel1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabriel1"/>
    <language>en</language>
    <item>
      <title>Your career doesn't have to stand still just because you're happy at work!</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Thu, 23 Jul 2026 08:00:33 +0000</pubDate>
      <link>https://dev.to/gabriel1/your-career-doesnt-have-to-stand-still-just-because-youre-happy-at-work-44nc</link>
      <guid>https://dev.to/gabriel1/your-career-doesnt-have-to-stand-still-just-because-youre-happy-at-work-44nc</guid>
      <description>&lt;p&gt;&lt;em&gt;Maybe you’re not looking for a new job.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is a strange gap in the way we talk about careers. You are either “looking” or you are not.&lt;/p&gt;

&lt;p&gt;When you're actively looking for a job, the path is familiar. You update your profile, browse job boards, send applications, talk to recruiters, prepare for interviews, and wait for replies—knowing that many of them will never come.&lt;/p&gt;

&lt;p&gt;But if you're not actively looking, you're expected to disappear from the market altogether (why is that?!). As if the only two states are &lt;em&gt;searching&lt;/em&gt; or &lt;em&gt;not interested&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Real life is rarely that simple. Many experienced professionals live somewhere between those two states.&lt;/p&gt;

&lt;p&gt;Maybe you're returning from maternity leave and work doesn't feel the same anymore. Maybe your company is changing and you're quietly wondering whether your role is next. Maybe you've started thinking about a different career, but you're not ready to commit to a full job search. Or maybe you're happy where you are — you'd just like to know what else is out there. Nothing wrong there!&lt;/p&gt;

&lt;p&gt;People don't become curious about their careers overnight. Long before they apply for a job, they often have questions, doubts, or simply a desire to explore. There should be space for that curiosity without requiring someone to become an active job seeker.&lt;/p&gt;

&lt;p&gt;They are not trying to escape their current job. They may like working with their colleagues, enjoy the work, and have no intention of resigning. At the same time, they know that the right team, problem, or environment could be worth a conversation. That is not indecision. Cannot stress this enough, this is healthy professional curiosity.&lt;/p&gt;

&lt;p&gt;The problem is that most hiring systems do not know what to do with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The traditional process asks for commitment too early
&lt;/h2&gt;

&lt;p&gt;An application is not a small signal of interest. It is the beginning of a process. From experience and a lot more people experiences', it's a &lt;em&gt;long&lt;/em&gt; process.&lt;/p&gt;

&lt;p&gt;It can mean rewriting a résumé, completing forms, preparing portfolios, doing home tests, coding with people watching you live, rearranging your personal schedule, and committing to several rounds of interviews. &lt;/p&gt;

&lt;p&gt;All of this often happens before a candidate learns the things that actually matter.&lt;/p&gt;

&lt;p&gt;Not the polished recruitment pitch about an amazing culture, a unique mission, or why you'd be lucky to work there. The real things: what the team is like, how decisions are made, whether you'll have room to grow, and whether you'll genuinely enjoy working &lt;em&gt;with&lt;/em&gt; the people you'll spend your days alongside. And sometimes, after investing hours into applications, interviews, and technical assessments, there's no answer at all. No feedback. No closure. Just silence.&lt;/p&gt;

&lt;p&gt;People deserve better than that. Career conversations should begin with honesty and mutual respect—not with a process that asks for commitment long before either side knows whether there's a real fit.&lt;/p&gt;

&lt;p&gt;What problem would they actually be solving? How does the team make decisions? What does the manager expect? Why is the role open? What happens when people disagree? Is the compensation even within range? etc.&lt;/p&gt;

&lt;p&gt;For someone who urgently needs a job, the investment may feel unavoidable. For someone already doing meaningful work, declining the process can be the most rational choice.&lt;/p&gt;

&lt;p&gt;This creates a frustrating paradox for companies: the people they would most like to meet may be the least willing to apply.&lt;/p&gt;

&lt;p&gt;Not because they believe they are above the process. Because they have learned to protect their time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Experience changes the calculation
&lt;/h2&gt;

&lt;p&gt;An hour spent interviewing is not simply an hour exchanged for the possibility of a new role.&lt;/p&gt;

&lt;p&gt;It may be an hour taken from leading a team, finishing difficult work, supporting a colleague, spending time with family, or recovering after a demanding week. A five-stage process creates a real cost long before either side knows whether there is a meaningful fit.&lt;/p&gt;

&lt;p&gt;Experienced professionals also understand that a job description reveals only a small part of the job.&lt;/p&gt;

&lt;p&gt;Words such as “collaborative,” “fast-paced,” and “people-first” appear everywhere. They say very little about the lived experience inside a company. Also, it could look like red flags.&lt;/p&gt;

&lt;p&gt;Culture becomes visible in harder moments. What happens when a deadline is missed? Can someone challenge a senior leader safely? Do managers develop their teams or simply push work through them? Are difficult decisions explained? Does the company close the loop when the answer is no?&lt;br&gt;
Those questions aren't answered by a polished careers page or another carefully rehearsed pitch.&lt;/p&gt;

&lt;p&gt;They are answered by people.&lt;/p&gt;

&lt;p&gt;By someone who knows what it's actually like to work there. Someone who can talk honestly about the team's challenges, the things that are going well, and the things that still need fixing.&lt;/p&gt;

&lt;p&gt;Ideally, it starts with an informal conversation, a coffee chat over video, at a time that works for both of you. No interview. No agenda. Just two professionals trying to understand whether there's something worth exploring together.&lt;/p&gt;

&lt;p&gt;The best career conversations don't feel like recruitment. They feel like two people sharing experiences, asking thoughtful questions, and leaving with a better understanding than they had before.&lt;/p&gt;

&lt;p&gt;Unfortunately, those conversations often happen late—after the candidate has already invested hours in the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  A career does not need to be managed through emergencies
&lt;/h2&gt;

&lt;p&gt;Many people begin exploring options only when the current situation becomes unbearable.&lt;/p&gt;

&lt;p&gt;Urgency reduces choice. It makes imperfect opportunities appear more attractive and encourages both candidates and companies to compress important decisions into a few scheduled calls.&lt;/p&gt;

&lt;p&gt;There is a better time to understand what else might exist: before it becomes necessary.&lt;/p&gt;

&lt;p&gt;That does not mean constantly interviewing or treating every professional relationship as a transaction. It means leaving room for relevant conversations without turning each one into a formal job process.&lt;/p&gt;

&lt;p&gt;A conversation can provide context without creating an obligation.&lt;/p&gt;

&lt;p&gt;It can help a professional understand how another company works. It can help a company meet someone whose experience may become relevant later. Both sides can decide that there is no fit and still leave with something useful.&lt;/p&gt;

&lt;p&gt;When there is no immediate pressure to produce an offer or an acceptance, people can ask better questions—and give more honest answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first step should be smaller
&lt;/h2&gt;

&lt;p&gt;For years, we've treated hiring as if every good opportunity starts the same way: with an application.&lt;/p&gt;

&lt;p&gt;Update your résumé. Fill out the form. Complete the coding challenge. Meet the recruiter. Meet the hiring manager. Meet the team. Wait. Repeat.&lt;/p&gt;

&lt;p&gt;That might have made sense when applying for a job was the only way to discover one.&lt;/p&gt;

&lt;p&gt;It doesn't make as much sense anymore.&lt;/p&gt;

&lt;p&gt;Experienced professionals aren't usually waiting for another interview process to begin. They're building products, leading teams, solving difficult problems, raising families, or simply enjoying where they are. If you want their attention, asking for hours of commitment before they've even understood the opportunity isn't a great place to start.&lt;/p&gt;

&lt;p&gt;The first step should be much smaller. Give people enough context to decide whether a conversation is worth having.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Will I be respected here, or will I spend my first six months proving myself again?&lt;/li&gt;
&lt;li&gt;Will this role fit the life I've built outside of work?&lt;/li&gt;
&lt;li&gt;Can I trust the people making the decisions?&lt;/li&gt;
&lt;li&gt;Is this a place where experienced people are listened to—or just managed?&lt;/li&gt;
&lt;li&gt;If I leave a team I enjoy today, what am I really gaining?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If those questions spark genuine curiosity, &lt;em&gt;then&lt;/em&gt; a hiring process can begin. Also, the interview process &lt;em&gt;has to change&lt;/em&gt; soon, in so many cases it has become ridiculous.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quieter way to remain open
&lt;/h2&gt;

&lt;p&gt;Quietly Looking is being built for professionals who are not chasing job postings but would still listen when the right conversation appears.&lt;/p&gt;

&lt;p&gt;The idea is deliberately simple: allow experienced people to signal private openness without publicly declaring a job search or entering an application funnel.&lt;/p&gt;

&lt;p&gt;It is not about sending more recruiter messages. It is not a public résumé directory. It is not a promise that everyone who joins will immediately receive an opportunity.&lt;/p&gt;

&lt;p&gt;It is an attempt to create a calmer starting point—one based on discretion, relevance, and respect for people’s time.&lt;/p&gt;

&lt;p&gt;Quietly Looking is currently gathering its first group of professionals. This early stage matters because the quality of the community will shape everything that follows. The goal is not to collect the largest possible list. It is to bring together thoughtful, experienced people who share a particular view of career exploration: you should not have to become unhappy, urgent, or publicly available before keeping your options open.&lt;/p&gt;

&lt;p&gt;You can be committed to the work you are doing today and still be curious about tomorrow. You can decline applications and remain open to conversations. You can protect your time without closing every door.&lt;/p&gt;

&lt;p&gt;If that sounds like the way you would prefer to navigate your career, you can raise your hand quietly at &lt;a href="https://www.quietlylooking.io" rel="noopener noreferrer"&gt;www.quietlylooking.io&lt;/a&gt;. Also, it will help us a lot if you added your thoughts on where you are in your career: &lt;a href="https://tally.so/r/lb10gV" rel="noopener noreferrer"&gt;https://tally.so/r/lb10gV&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No dramatic announcement. No immediate application. Just the possibility of a worthwhile conversation, when the right one appears.&lt;/p&gt;

&lt;p&gt;This is a longer post from the initial post from LinkedIn: &lt;a href="https://tinyurl.com/ymz57xe3" rel="noopener noreferrer"&gt;https://tinyurl.com/ymz57xe3&lt;/a&gt;&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>Motion animations with an SVG</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Thu, 14 Jan 2021 19:48:30 +0000</pubDate>
      <link>https://dev.to/gabriel1/motion-animations-with-an-svg-53mc</link>
      <guid>https://dev.to/gabriel1/motion-animations-with-an-svg-53mc</guid>
      <description>&lt;p&gt;I personally think of CSS animations as something complex. While this is still true, I am making steps towards learning more about it, because that's the only way to fill knowledge gaps. I am going to teach you how to animate an SVG, using Figma and CSS. We are going to use Figma because it's so useful to ~see~ and ~group~ the elements that you will later want to animate. For the next steps, I will just assume you have a Figma account and a small project you can tinker with.&lt;/p&gt;

&lt;p&gt;Our demo SVG is one from &lt;a href="https://undraw.co/" rel="noopener noreferrer"&gt;https://undraw.co/&lt;/a&gt; (search for &lt;code&gt;reading&lt;/code&gt;) and after some minor modifications, I used it on the front page of my digital garden &lt;a href="https://gabriela.codes" rel="noopener noreferrer"&gt;https://gabriela.codes&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Open an SVG&lt;/h2&gt;

&lt;p&gt;Choose your image in SVG format and open it in Figma&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj2cxnsxnb65fm3h4aefd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj2cxnsxnb65fm3h4aefd.png" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the left side, you will see all the individual ids for all the constructed elements. You can hide them, group them, delete them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fblsu5xpddo1p47xpqwry.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fblsu5xpddo1p47xpqwry.PNG" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Group what you want to animate&lt;/h2&gt;

&lt;p&gt;We are going to select the character's left leg and group it into one element. Click on one part of the leg, hold &lt;code&gt;SHIFT&lt;/code&gt; down and continue clicking on the rest of the items. You will get to a situation similar to this. After that &lt;code&gt;CTRL+G&lt;/code&gt; and it will group it. Rename the default name to something that is representative of what you selected, for example: &lt;code&gt;leftleg&lt;/code&gt;. Do the same to anything else you think it will be nice to animate, like the clouds, flowers, hands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffx74lxuuhfow9j92prr9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffx74lxuuhfow9j92prr9.PNG" alt="Alt Text" width="799" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you are done grouping, it's time to export the .svg file &lt;code&gt;with the id attributes&lt;/code&gt; like in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe525a32fy2la4w7nz312.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe525a32fy2la4w7nz312.PNG" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Back to code&lt;/h2&gt;

&lt;p&gt;The first important part is completed and now we just need to write some CSS to animate our image.&lt;/p&gt;

&lt;p&gt;We place our SVG inside a container:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div class="svg-animation-container"&amp;gt;..&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;And we start adding animations for each group that we are interested into.&lt;/p&gt;

&lt;h3&gt;Right Leg&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#rightleg {
  animation: rotateHand 5s alternate;
  transform-origin: top left;
  transform-box: fill-box;
  animation-duration: 16s;
}

@keyframes rotateHand {
  0% {
    transform: rotate(-5deg);
  }

  50% {
    transform: rotate(5deg);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use CSS rotate() function to rotate in the opposite direction using a negative degree value &lt;code&gt;-5deg&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Both hands&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#bothhands {
  animation: rotateLHand 2s alternate;
  transform-origin: top left;
  transform-box: fill-box;
  animation-delay: 1.25s;
}

@keyframes rotateLHand {
  0% {
    transform: rotate(5deg);
  }

  50% {
    transform: rotate(0deg);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;Clouds going up&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#clouds {
  animation: rotateLHand 2s alternate;
  animation-duration: 16s;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can continue to add motion to other ids that you have in your SVG and just play around to see what goes good together. Don’t forget, some people can get motion sickness from too many animations on the screen. Trust me. :)&lt;/p&gt;

</description>
      <category>animations</category>
      <category>css</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Trying out Criteria Builder in a Java project</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Wed, 09 Sep 2020 11:01:49 +0000</pubDate>
      <link>https://dev.to/gabriel1/how-to-use-criteria-builder-in-your-java-project-4ag0</link>
      <guid>https://dev.to/gabriel1/how-to-use-criteria-builder-in-your-java-project-4ag0</guid>
      <description>&lt;p&gt;Initially published on my blog: &lt;a href="https://documentingiscool.netlify.app/blog/2020/08/how-to-use-criteria-builder-in-your-java-project/" rel="noopener noreferrer"&gt;https://documentingiscool.netlify.app/blog/2020/08/how-to-use-criteria-builder-in-your-java-project/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Java, SpringBoot
&lt;/h1&gt;

&lt;p&gt;If you are writing a REST API in Java and SpringBoot for your side projects or at work, I am guessing you have used JPA by now. You probably heard of CriteriaBuilder, but if not, don't worry. I personally have only heard of it a couple of years ago. Looking online on the timeline of this, it appears to be available since Java Persistence 2.0 (&lt;a href="https://tinyurl.com/y2f4srv5" rel="noopener noreferrer"&gt;Source&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;So it's about time I learn the power of writing complex queries in a way that, for example, in a refactoring situation I don't need to change strings in my queries. This is part one of using Criteria Builder (package &lt;code&gt;javax.persistence&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;How I used to write queries (long time ago). Do not do this now. It's 2020:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String query = "Select usr.username from PlatformUser usr where usr.companyId = " + companyId;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How I am writing queries using positional parameters in queries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Repository
public interface PlatformUserRepository extends JpaRepository&amp;lt;PlatformUser, Long&amp;gt; {
@Query("SELECT item FROM PlatformUser usr where usr.companyId = ?1")
    List&amp;lt;String&amp;gt; findAllCompanyUsernames (Long companyId);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What I could do with Criteria Builder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery&amp;lt;String&amp;gt; criteriaQuery = criteriaBuilder.createQuery(String.class);
Root&amp;lt;PlatformUser&amp;gt; root = criteriaQuery.from(PlatformUser.class);
criteriaQuery.select(root);
Query query = entityManager.createQuery(criteriaQuery);
List&amp;lt;String&amp;gt; results = query.getResultList();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In order to have access to the entity manager your need to inject it in your repository class.&lt;br&gt;
&lt;code&gt;@PersistenceContext&lt;br&gt;
    private EntityManager entityManager;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Documentation for Criteria Builder is lacking from my point of view, so I am trying my best to explain line by line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example from the demo project:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Using Lombok plugin for getters and setters
@Getter
@Setter
public class CompanyHandyPersonDto {

    private Long id;
    private String fullName;
    private Long companyId;
    private Long tradeId;
    private String comment;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A simple select from a table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Repository
public class CompanyHandyPersonRepository implements CompanyHandyPersonRepositoryInterface {

    @PersistenceContext
    private EntityManager entityManager;

    @Override
    public List&amp;lt;CompanyHandyPerson&amp;gt; findAllHandyPersons() {
        // Get instance of criteria builder from an entity manager
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();

        // Create a query object
        CriteriaQuery&amp;lt;CompanyHandyPerson&amp;gt; criteriaQuery = criteriaBuilder.createQuery(CompanyHandyPerson.class);

        // Root of this query (I have no better idea of how to explain this)
        Root&amp;lt;CompanyHandyPerson&amp;gt; root = criteriaQuery.from(CompanyHandyPerson.class);

        // Choosing what data the query returns
        criteriaQuery.select(root);

        Query query = entityManager.createQuery(criteriaQuery);

        // Run the query constructed above and extract the result
        List&amp;lt;CompanyHandyPerson&amp;gt; results = query.getResultList();

        return results;
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find a list of objects that satisfy a condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
    public List&amp;lt;CompanyHandyPerson&amp;gt; findCompanyHandyPeopleThatAreSoftwareDevelopers() {
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
        CriteriaQuery&amp;lt;CompanyHandyPerson&amp;gt; criteriaQuery = criteriaBuilder.createQuery(CompanyHandyPerson.class);
        Root&amp;lt;CompanyHandyPerson&amp;gt; root = criteriaQuery.from(CompanyHandyPerson.class);

        // Check against the tradeId representing a specific one
criteriaQuery.select(root).where(criteriaBuilder.equal(root.get("tradeId"), 1L));

        Query query = entityManager.createQuery(criteriaQuery);
        List&amp;lt;CompanyHandyPerson&amp;gt; results = query.getResultList();

        return results;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find a list of objects with a LIKE condition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
    public List&amp;lt;Trade&amp;gt; findAllTradesWithNameSimilarTo(String tradeName) {
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
        CriteriaQuery&amp;lt;Trade&amp;gt; criteriaQuery = criteriaBuilder.createQuery(Trade.class);
        Root&amp;lt;Trade&amp;gt; root = criteriaQuery.from(Trade.class);
        criteriaQuery.select(root).where(criteriaBuilder.like(root.get("name"), "%" + tradeName + "%"));

// Or without taking into consideration lower or upper cases
/**
* Predicate likePredicate = *criteriaBuilder.like(criteriaBuilder.lower(pantryItemRoot.get("name")), "%" + input.toLowerCase() + "%");
        *pantryItemCriteriaQuery.select(pantryItemRoot).where(likePredicat*e);
*/

        Query query = entityManager.createQuery(criteriaQuery);
        List&amp;lt;Trade&amp;gt; results = query.getResultList();

        return results;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find a list of objects that have an Id in a given array of Ids:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
    public List&amp;lt;CompanyHandyPerson&amp;gt; findCompanyHandyPeopleThatHaveOneOfTheGivenTradeId(Long[] tradeIds) {
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
        CriteriaQuery&amp;lt;CompanyHandyPerson&amp;gt; criteriaQuery = criteriaBuilder.createQuery(CompanyHandyPerson.class);
        Root&amp;lt;CompanyHandyPerson&amp;gt; root = criteriaQuery.from(CompanyHandyPerson.class);

        // Check tradeId is part of the given tradeIds
        criteriaQuery.select(root)
                .where(root.get("tradeId")
                        .in(tradeIds));

        Query query = entityManager.createQuery(criteriaQuery);
        List&amp;lt;CompanyHandyPerson&amp;gt; results = query.getResultList();

        return results;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Return a list of non-empty strings for &lt;em&gt;userFeedbackTitle&lt;/em&gt; or &lt;em&gt;userFeedbackDescription&lt;/em&gt; (coalesce expression)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: a job has &lt;code&gt;userFeedbackTitle&lt;/code&gt; and &lt;code&gt;userFeedbackDescription&lt;/code&gt;. None of these are forced to have values. Both can be null, both or only one can have values.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Override
    public List&amp;lt;String&amp;gt; findAllFeedbackThatExists() {
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
        CriteriaQuery&amp;lt;Job&amp;gt; criteriaQuery = criteriaBuilder.createQuery(Job.class);
        Root&amp;lt;Job&amp;gt; root = criteriaQuery.from(Job.class);

        // Check title and description and return when one of them is not null
        CriteriaBuilder.Coalesce&amp;lt;Job&amp;gt; coalesceExpression = criteriaBuilder.coalesce();
        coalesceExpression.value(root.get("userFeedbackTitle"));
    coalesceExpression.value(root.get("userFeedbackDescription"));

        criteriaQuery.select(coalesceExpression);

        Query query = entityManager.createQuery(criteriaQuery);
        List&amp;lt;String&amp;gt; results = query.getResultList();

        return results;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to remove all null values from the above example, you can do so by using a Predicate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Predicate&amp;lt;String&amp;gt; nullFilter = PojoPredicates.isValueNull();
        results.removeIf(nullFilter);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Find all users that have jobs requests that have the job status- In Progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @Override
    public List&amp;lt;PlatformUser&amp;gt; findUsersThatHaveJobsInProgress() {
        CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();

        CriteriaQuery&amp;lt;PlatformUser&amp;gt; userCriteriaQuery = criteriaBuilder.createQuery(PlatformUser.class);
        Root&amp;lt;PlatformUser&amp;gt; userRoot = userCriteriaQuery.from(PlatformUser.class);

        // Select user and job by user_id
        Subquery&amp;lt;Job&amp;gt; jobSubQuery = userCriteriaQuery.subquery(Job.class);
        Root&amp;lt;Job&amp;gt; jobRoot = jobSubQuery.from(Job.class);
        jobSubQuery.select(jobRoot).where(criteriaBuilder.equal(jobRoot.get("userId"), userRoot.get("id")));
        userCriteriaQuery.select(userRoot).where(criteriaBuilder.exists(jobSubQuery));

        TypedQuery&amp;lt;PlatformUser&amp;gt; typedQuery = entityManager.createQuery(userCriteriaQuery);
        List&amp;lt;PlatformUser&amp;gt; resultList = typedQuery.getResultList();

        return resultList;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's great so far. Next, I will think of more complex situations where CriteriaBuilder is a better choice.&lt;/p&gt;

&lt;p&gt;Here is the GitHub project demo for this: &lt;a href="https://tinyurl.com/y4guow7v" rel="noopener noreferrer"&gt;Demo Project Source Code&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>java</category>
      <category>webdev</category>
    </item>
    <item>
      <title>From design to code</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Fri, 29 May 2020 15:39:18 +0000</pubDate>
      <link>https://dev.to/gabriel1/from-design-to-code-3eag</link>
      <guid>https://dev.to/gabriel1/from-design-to-code-3eag</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3nj6sze8iwjc0o5gwt91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3nj6sze8iwjc0o5gwt91.png" alt="Alt Text" width="799" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to learn how to transform a design/photo into a CSS and Html5 project. That was the starting point at least. Very quickly after I decided to transform them into React.js projects because I use React.js often and wanted a nice theme. Translating a photo into code has always made me uncomfortable because I couldn't do it. In OOP Java world I didn't have to.&lt;/p&gt;

&lt;p&gt;Here is the gist:&lt;br&gt;
Project 1: &lt;a href="https://blog-react-theme.netlify.app/" rel="noopener noreferrer"&gt;https://blog-react-theme.netlify.app/&lt;/a&gt;&lt;br&gt;
Code on GitHub: &lt;a href="https://github.com/gabrielaradu/blogreactheme" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/blogreactheme&lt;/a&gt; MIT Licence&lt;/p&gt;

&lt;p&gt;Lighthouse audit results:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkf83uv1fjcw5lytnl5w7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkf83uv1fjcw5lytnl5w7.PNG" alt="Alt Text" width="800" height="438"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frme1es5lf3vnt6hlukp5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frme1es5lf3vnt6hlukp5.PNG" alt="Alt Text" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Project 2: &lt;a href="https://story-react-theme.netlify.app/" rel="noopener noreferrer"&gt;https://story-react-theme.netlify.app/&lt;/a&gt;&lt;br&gt;
Code on GitHub: &lt;a href="https://github.com/gabrielaradu/storyreacttheme" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/storyreacttheme&lt;/a&gt; MIT Licence&lt;/p&gt;

&lt;p&gt;Lighthouse audit results:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6p2ti6wyp1f5fgcybbgw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6p2ti6wyp1f5fgcybbgw.PNG" alt="Alt Text" width="800" height="385"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Facsko7ewylgu3ilctlsk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Facsko7ewylgu3ilctlsk.PNG" alt="Alt Text" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The projects are free to use, and I will try to iterate on the code with better practices on the long but without a precise schedule.&lt;/p&gt;

&lt;p&gt;Happy coding.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>react</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>Enhance your technical job opportunity description</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Wed, 29 Apr 2020 10:05:52 +0000</pubDate>
      <link>https://dev.to/gabriel1/enhance-your-technical-job-opportunity-description-1m52</link>
      <guid>https://dev.to/gabriel1/enhance-your-technical-job-opportunity-description-1m52</guid>
      <description>&lt;p&gt;Initially posted here: &lt;a href="https://documentingiscool.netlify.app/" rel="noopener noreferrer"&gt;https://documentingiscool.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are all experiencing a change in our daily life (choices as well) because of Covid-19 (worldwide pandemic, not-a-flu). As job seekers, some of us were caught during job searching, others were furlough or let go and need to find a new job. As companies, some are hiring now and some have frozen hiring. &lt;br&gt;
It is more important than ever now, as a company, to put more work into your job opportunity descriptions. Turn around the question "what can you do for us" from interviews, to "what can we as a company do for you". &lt;/p&gt;

&lt;p&gt;Why? Here is some motivation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's a business collaboration. Letting aside passion, you need people to work for you as much as people need jobs: for money.&lt;/li&gt;
&lt;li&gt;You can fire people if business dictates it and people can leave if their needs dictate that. (Stop blaming people for leaving, you would do the same if the table turns)&lt;/li&gt;
&lt;li&gt;You actually want diversity in your team and company. I mean, actually not just for marketing. More details of the interview process translate into more people that are reluctant to apply to actually apply. There is such a thing as an anxiety-inducing interview. It's like you go to a potential client meeting but have 0 information to prepare before.&lt;/li&gt;
&lt;li&gt;There are companies that have hundreds/thousands of applicants when a job is made public. Why? because they explain clearly what are the steps for the interview process, they add real-work-description for the job, they pitch their company because they want and need people to help them continue their business.&lt;/li&gt;
&lt;li&gt;Time is money, right? You want an appropriate pool of candidates so you don't waste your time and don't waste the candidates time. Yes, there is such a thing as wasting a candidate's time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have bundled together some examples (in no particular order) that I found by searching online and with the help from other nice people:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazee Labs:
&lt;a href="https://www.amazeelabs.com/en/careers-amazee-labs" rel="noopener noreferrer"&gt;https://www.amazeelabs.com/en/careers-amazee-labs&lt;/a&gt;
Their technical interview is found if you scroll down the page. They don't do "whiteboard" interviews by the way ;)&lt;/li&gt;
&lt;li&gt;Basecamp:
&lt;a href="https://basecamp.com/about/jobs" rel="noopener noreferrer"&gt;https://basecamp.com/about/jobs&lt;/a&gt;
They currently don't have openings, but when they did, the description was soo thorough. Not only for the interview process (technical interview) but for what technologies they use and how. For the last job opening, on the technical side, they asked that you code review together (I hope I didn't remember this wrong)&lt;/li&gt;
&lt;li&gt;Automattic:
&lt;a href="https://automattic.com/work-with-us/how-we-hire-developers/" rel="noopener noreferrer"&gt;https://automattic.com/work-with-us/how-we-hire-developers/&lt;/a&gt;
They have a separate page for jobs, but this one is for describing the technical interview. Everything you need to know as a candidate is written down.&lt;/li&gt;
&lt;li&gt;Aula:
&lt;a href="https://www.notion.so/Engineering-interviews-Aula-bce436a4230c4f0d8b19bc717232d289" rel="noopener noreferrer"&gt;https://www.notion.so/Engineering-interviews-Aula-bce436a4230c4f0d8b19bc717232d289&lt;/a&gt;
This is about async interview which is awesome. They understand a bit of psychology not only tech. Read it, it's comprehensive and clear.&lt;/li&gt;
&lt;li&gt;Doist:
&lt;a href="https://doist.com/blog/remote-job-application-advice/" rel="noopener noreferrer"&gt;https://doist.com/blog/remote-job-application-advice/&lt;/a&gt;
There is no active technical position but they have blog posts explaining how they hire.&lt;/li&gt;
&lt;li&gt;Auth0: &lt;a href="https://auth0.com/blog/how-we-hire-engineers/" rel="noopener noreferrer"&gt;https://auth0.com/blog/how-we-hire-engineers/&lt;/a&gt;
The post explains very clearly how they are hiring and after reading it, I had the impulse to check out job openings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more examples, I have started to add the companies that do the work in this Notion page: &lt;a href="https://www.notion.so/Technical-Interview-Process-Explained-Well-f52511e9a32f439a811930703210507a" rel="noopener noreferrer"&gt;https://www.notion.so/Technical-Interview-Process-Explained-Well-f52511e9a32f439a811930703210507a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Knowing that tech interviews &lt;em&gt;can be&lt;/em&gt; very toxic and gatekeeping, I am sure that these companies that take the time and make their pitch to potential collaborators will continue to thrive, get traction and thousands of applicants.&lt;br&gt;
Feel free to add to the comments your own examples of companies that hire with a similar approach. I will do my best to add them to the Notion list page. Good news must be shared, especially during these times.&lt;/p&gt;

&lt;p&gt;By taking more time to create a meaningful job description, you show much clearer what you are looking for, and more people from the right-for-your-company category will apply. It's very important to acknowledge that not every developer thrives in the same type of interviews. Some like whiteboard questions, some definitely don't. Others like pair programming others appreciate more home tests in their own time and not 'on the spot'. I am going on a limb here, but I have doubts that anybody likes dictating code by phone.&lt;/p&gt;

&lt;p&gt;While hiring, it's logic that you get what you ask for. For instance, if you don't mention you do pair programming in the company and in the interview, you might get candidates that never worked like that and they won't pass. This entire process of hiring needs a bit of introspective on your part as well (company part), what you take for granted, what is easy for you is not easy for &lt;em&gt;everyone&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Not fitting your mould doesn't make other people less good. They are probably really good, they just don't shine in your hiring process.&lt;br&gt;
So, empathy is crucial as well as &lt;del&gt;communicating&lt;/del&gt; writing your process. Remember, you work with people for people.&lt;/p&gt;

</description>
      <category>career</category>
      <category>hiring</category>
      <category>interview</category>
      <category>culture</category>
    </item>
    <item>
      <title>New Rest API Endpoint: from start to test in Java and SpringBoot</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Thu, 16 Apr 2020 10:33:57 +0000</pubDate>
      <link>https://dev.to/gabriel1/new-endpoint-from-start-to-test-3n9f</link>
      <guid>https://dev.to/gabriel1/new-endpoint-from-start-to-test-3n9f</guid>
      <description>&lt;p&gt;I want to detail the steps that &lt;em&gt;I try&lt;/em&gt; to take when creating a new endpoint in a backend project (Java, SpringBoot, Mockito). Definitely this is not the same all the time, but that's not the topic for this post.&lt;/p&gt;

&lt;p&gt;The task is: implement a new endpoint that retrieves all the products that exist at the moment.&lt;/p&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;create a new method in the service class that retrieves using persistence layer (no queries allowed here) all the products available&lt;/li&gt;
&lt;li&gt;create endpoint that calls the above service method and returns data&lt;/li&gt;
&lt;li&gt;create unit test for service method&lt;/li&gt;
&lt;li&gt;create integration test for the new endpoint.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is my way of testing, you can mix the points as you like.&lt;/p&gt;

&lt;p&gt;We are decoupling the persistence (VendorProductRepository) and business(VendorProductService) layers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public List&amp;lt;VendorProduct&amp;gt; findAllProducts() {
        return getVendorProductsRepository().findAll();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the actual endpoint, which has one liner in this case. It simply returns the result of the service call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@GetMapping("/")
public ResponseEntity&amp;lt;?&amp;gt; getAllProducts() {
   return ResponseEntity.ok(vendorProductsService.findAllProducts());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This unit test describes the 'given' - 'when' - 'then'. We create a dummy object which we add to a list. The given part is when we describe(stub) what code will do when the repository is asked to return all products. The when part is when we call the service method, and the then part is when we verify the mocked service call returns the initially given list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Test
public void findAllProducts_always_returns_all_existing_products() {
        List&amp;lt;VendorProduct&amp;gt; productList = new ArrayList&amp;lt;&amp;gt;();
        productList.add(EntityHelper.convertToAbstractEntity(vendorProductDto, VendorProduct.class));
        when(repository.findAll()).thenReturn(productList);

        List&amp;lt;VendorProduct&amp;gt; foundProducts = subject.findAllProducts();

        assertNotNull(foundProducts);
        assertEquals(foundProducts.size(), productList.size());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This integration test, describes the happy path for retrieving a list of all available products. It hits the database so it's best to be made on a developer version of it. We make the Http call and check against the HttpStatus response and body.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Test
public void testGetAllProducts_shouldReturn_list_of_existing_products() {
        VendorProduct vendorProduct = new VendorProduct();
        vendorProduct.setId(1L);
        vendorProduct.setName("Mint Plants will be deleted");
        vendorProduct.setMinQuantityPerOrder(3d);
        vendorProduct.setMaxQuantityPerOrder(100d);
        vendorProduct.setQuantityType(QuantityType.ITEM.getIndex());
        List&amp;lt;VendorProduct&amp;gt; existingProducts = new ArrayList&amp;lt;&amp;gt;();
        existingProducts.add(vendorProduct);

        ResponseEntity&amp;lt;List&amp;gt; getResponse =  getRestTemplate().getForEntity(getRootUrl() + "/products/", List.class);
        assertEquals(HttpStatus.OK, getResponse.getStatusCode());
        assertEquals(existingProducts, getResponse.getBody());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is when I feel more confident that adding a new endpoint to do something will actually work. This code is actually part of my #twiliohackathon project, so the code is public here &lt;a href="https://github.com/gabrielaradu/BuyLocalServerSide" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/BuyLocalServerSide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>java</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Unit Testing static classes and methods in Java</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Tue, 14 Apr 2020 13:55:52 +0000</pubDate>
      <link>https://dev.to/gabriel1/how-to-unit-test-static-classes-and-methods-50nd</link>
      <guid>https://dev.to/gabriel1/how-to-unit-test-static-classes-and-methods-50nd</guid>
      <description>&lt;p&gt;Hello, I wanted to share a situation I found a couple of days ago, whilst working for my project for Twilio April Hackathon. I was working on the server-side project and creating endpoints for my product roadmap. What I insist on is testing my code, especially the logic. It's a habit I am actively trying to make.&lt;/p&gt;

&lt;p&gt;Let's take this service method that validates a phone number using Twilio API. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhgd4nn5723yfncklwo0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhgd4nn5723yfncklwo0o.png" alt="Alt Text" width="799" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We invoke 'fetch' method on com.twilio.rest.lookups.v1.PhoneNumber to receive an instance of PhoneNumberFetcher.class which will later get all the information on the provided phone number if it exists. Great!&lt;br&gt;
Now, how do we test this? We cannot. We cannot mock static classes. So, we need a way to 'inject' our Twilio API call into our logic and test our code as is without worrying about the response from the external API. &lt;/p&gt;

&lt;p&gt;Check the wrapper below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fea631fmsd7blbfsz7f2z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fea631fmsd7blbfsz7f2z.png" alt="Alt Text" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we can update our service method:&lt;br&gt;
*Create getter and setter for TwilioSmsApiWrapper class&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe3h0yiakueimv5k6yyku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe3h0yiakueimv5k6yyku.png" alt="Alt Text" width="799" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can happily create a unit test for our service method:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu20uu1i5cpq4zcow7eqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu20uu1i5cpq4zcow7eqr.png" alt="Alt Text" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. Now you have decoupled you ThirdParty Logic from your service and you can unit test your logic without relying on real API calls.&lt;br&gt;
Happy coding.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>twiliohackathon</category>
      <category>testing</category>
    </item>
    <item>
      <title>Send SMS with Twilio Question</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Fri, 10 Apr 2020 15:20:06 +0000</pubDate>
      <link>https://dev.to/gabriel1/send-sms-with-twilio-question-1hhk</link>
      <guid>https://dev.to/gabriel1/send-sms-with-twilio-question-1hhk</guid>
      <description>&lt;p&gt;Hello, I am trying to use SMS Api to send a message to a real Romanian phone number and the request fails with this error:&lt;br&gt;
"[o-auto-1-exec-1] c.g.l.c.TwilioMessageCreator             : An exception occurred trying to send a message to +40******&lt;strong&gt;&lt;em&gt;, exception: The 'To' number +40&lt;/em&gt;&lt;/strong&gt;****** is not a valid phone number."&lt;/p&gt;

&lt;p&gt;My question is this, can I use SMS API with a Romanian phone number or not? Thanks for the answer.&lt;/p&gt;

&lt;p&gt;Update: I figured it out, I created a new project for a hackathon and I could get a phone number to play with.&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Twilio hackathon: Buy Food Locally</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Thu, 09 Apr 2020 17:58:46 +0000</pubDate>
      <link>https://dev.to/gabriel1/twilio-hackathon-buy-food-locally-g44</link>
      <guid>https://dev.to/gabriel1/twilio-hackathon-buy-food-locally-g44</guid>
      <description>&lt;p&gt;[Comment]: # Buy food from local vendors. I am trying to bring more features to a situation I found locally, and add the possibility to vendors to create an account and add their products and to safely order food, with a phone number as an identifier. This is a demo project only.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I am building
&lt;/h2&gt;

&lt;p&gt;Buy food from local vendors. I am trying to bring more features to a situation I found locally, and add the possibility to vendors to create an account and add their products and to safely order food, with phone number and email as an identifier. This means: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a web application for vendors to register themselves, and for customers to order food.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo Link
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://buyfoodlocallyfrontend.herokuapp.com/" rel="noopener noreferrer"&gt;https://buyfoodlocallyfrontend.herokuapp.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Link to Code
&lt;/h2&gt;

&lt;p&gt;Backend: &lt;a href="https://github.com/gabrielaradu/BuyLocalServerSide" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/BuyLocalServerSide&lt;/a&gt;&lt;br&gt;
Frontend: &lt;a href="https://github.com/gabrielaradu/BuyLocalFrontend" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/BuyLocalFrontend&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it (what's the stack? did I run into issues or discover something new along the way?)
&lt;/h2&gt;

&lt;p&gt;Backend: Java 11, SpringBoot, Flyway, Hibernate, Postgresql, Twilio APIs: ServerSide, SMS, Phone Number Validation &lt;br&gt;
JavaScript, ES6, React.js, CSS, Html&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources/Info
&lt;/h2&gt;

&lt;p&gt;Progress Gists:&lt;br&gt;
9.04.2020 -&amp;gt;&lt;br&gt;
Working on my idea for #twiliohackathon hackathon (from home clearly).&lt;br&gt;
Today: new vendor account v1. No password yet, need to update db structure in next ticket. This is the code if you want to take a look: &lt;a href="https://tinyurl.com/untyhz8" rel="noopener noreferrer"&gt;https://tinyurl.com/untyhz8&lt;/a&gt;&lt;br&gt;
Must create test profile to stop mucking my db.&lt;/p&gt;

&lt;p&gt;10.04.2020 -&amp;gt; 1.Created CRUD endpoints for products.&lt;br&gt;
PR here &lt;a href="https://tinyurl.com/uo553tu" rel="noopener noreferrer"&gt;https://tinyurl.com/uo553tu&lt;/a&gt;&lt;br&gt;
Code coverage 100%. I do wonder how long I can keep it this high.&lt;br&gt;
WIP to validate a vendor account phone nr using Twilio SDK.&lt;/p&gt;

&lt;p&gt;11.04.2020 -&amp;gt; Verify Vendor Account.&lt;br&gt;
Added possibility to verify a number, send an SMS with a code to that number and create endpoint which checks if the message code matches what is in the database.&lt;br&gt;
PR: &lt;a href="https://tinyurl.com/uy5y9a6" rel="noopener noreferrer"&gt;https://tinyurl.com/uy5y9a6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;13.04.2020 -&amp;gt; Added possibility to create a password after vendor verified their account. Working on security still.&lt;br&gt;
Difficult to concentrate today.&lt;/p&gt;

&lt;p&gt;14.04.2020 -&amp;gt; Finished adding JWT, attach a password to a vendor account and login endpoint. Fixed existing failing tests and add some more unit and integration. Two tests that use Test Twilio Creds fail.&lt;br&gt;
PR: &lt;a href="https://tinyurl.com/rl4tzah" rel="noopener noreferrer"&gt;https://tinyurl.com/rl4tzah&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Need to move to create Frontend client now.&lt;br&gt;
17.04.2020 -&amp;gt; Show list of products&lt;br&gt;
PR: &lt;a href="https://github.com/gabrielaradu/BuyLocalFrontend/pull/1" rel="noopener noreferrer"&gt;https://github.com/gabrielaradu/BuyLocalFrontend/pull/1&lt;/a&gt;&lt;br&gt;
No tests, and weird-looking UI. Need to fix this.&lt;/p&gt;

&lt;p&gt;24.04.2020 -&amp;gt;&lt;br&gt;
Finally did the user story for ordering products from two vendors.&lt;br&gt;
Step 1: add your customer phone number. That's how you will get payment link and info about order.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8rmyylrz1tx49wsq1vwr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8rmyylrz1tx49wsq1vwr.PNG" alt="Alt Text" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, choose what you want to buy. Dummy data (flyway migrations on backend) has two vendors.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzch1y1kxphokksskqi17.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzch1y1kxphokksskqi17.PNG" alt="Alt Text" width="754" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Vendor clicks the accept or denies order and customer will receive an automatic SMS with the final response.&lt;/p&gt;

&lt;p&gt;A confirmation dialogue will appear if all is good on the server side. By this time, vendors received SMS messages with #twilio API with the customer order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frf29u0vv4wqwzsncw2sj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frf29u0vv4wqwzsncw2sj.PNG" alt="Alt Text" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7ll4q41vzz8jjy5g7rcp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7ll4q41vzz8jjy5g7rcp.PNG" alt="Alt Text" width="750" height="1334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the server-side I have implemented logic to create a vendor account and verify it (by SMS of course) using #twilio API, for this demo #twiliohackathon project I think it's enough. I need to redo and add more tests now.&lt;/p&gt;

&lt;p&gt;I enjoyed this challenge a lot, reminded that I want to do better on Frontend and enjoy tests more.&lt;/p&gt;

&lt;p&gt;Happy Coding.&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>devjournal</category>
      <category>java</category>
      <category>react</category>
    </item>
    <item>
      <title>Remote Jobs for Romania (Europe Timezones) Linkedin Group</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Fri, 27 Mar 2020 13:35:08 +0000</pubDate>
      <link>https://dev.to/gabriel1/remote-jobs-for-europe-timezones-linkedin-group-1ef9</link>
      <guid>https://dev.to/gabriel1/remote-jobs-for-europe-timezones-linkedin-group-1ef9</guid>
      <description>&lt;p&gt;Because of our global pandemic with #covid-19, a lot of jobs moved remote, no office, no wasting time on commuting. Better productivity with fewer distractions, spending more time with family and most importantly staying indoors, to flatten the curve. We want to gather specific job opportunities for Europe Timezone, especially for UTC+2 - UTC+4.&lt;/p&gt;

&lt;p&gt;If you are a company that hires Remote (Europe timezones), please share the good news and your job opportunities. Going remote (if you are in IT, Marketing, Sales, Teaching, Therapists and other office jobs) is crucial at this time. It can make the difference between 'keeping the doors opened' or not.&lt;/p&gt;

&lt;p&gt;You can join us here &lt;a href="https://www.linkedin.com/groups/13841181/" rel="noopener noreferrer"&gt;https://www.linkedin.com/groups/13841181/&lt;/a&gt; and present your job openings in your company.&lt;/p&gt;

&lt;p&gt;This group is for ~Romania~ mostly (for now). We are trying to start small and make connections between remote companies and remote workers for trusted long term connections, not gig economy.&lt;/p&gt;

&lt;p&gt;It shows that you trust your employees, that you are responsible in society and leave space for the people that cannot work from home. In #Romania, we have a lot of #highlyskilled people that already work either in #outsourcing (a form of #remote) or on internal tools and applications. &lt;/p&gt;

&lt;p&gt;Let's give life back to the countryside and local communities. &lt;/p&gt;

</description>
      <category>whoishiring</category>
      <category>remote</category>
      <category>jobs</category>
      <category>career</category>
    </item>
    <item>
      <title>Remote work as a software company</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Thu, 12 Mar 2020 10:17:05 +0000</pubDate>
      <link>https://dev.to/gabriel1/remote-work-as-a-software-company-2nkh</link>
      <guid>https://dev.to/gabriel1/remote-work-as-a-software-company-2nkh</guid>
      <description>&lt;p&gt;For the 'not yet believers', if you want you can try learning from people that already are remote and profitable. Remote doesn't mean bombarding your colleagues with videos all day, it's about learning how to write more and not expect an instant response and give time for productive work. A very special note is that if you don't work on your own product, you are already remote for some other company :) Extend the curtsy to the people that chose to work with you.&lt;/p&gt;

&lt;p&gt;I like @Basecamp a lot and they extended this offer of buying their book on remote work with full refund. If you are curious, take it!&lt;/p&gt;


&lt;blockquote&gt;
&lt;p&gt;For the foreseeable future, we’ll be refunding the purchase price of our book “REMOTE: Office Not Required”. Buy a copy, tweet me a picture of you holding the book w/ a sales receipt dated 3/10/20 or later, and we’ll PayPal you a complete refund (DM your email, please).&lt;/p&gt;— Jason Fried (@jasonfried) &lt;a href="https://twitter.com/jasonfried/status/1237773562322259970?ref_src=twsrc%5Etfw" rel="noopener noreferrer"&gt;March 11, 2020&lt;/a&gt;
&lt;/blockquote&gt; 

&lt;p&gt;While you are here, I need your help to make (even more) known the companies that create software remote. Big plus for Europe zones, as they are less talked about. Are you working for a remote company that allows remote or is remote from the get-go? Share the name with the world :)&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>hiring</category>
      <category>remote</category>
    </item>
    <item>
      <title>Hire Full Time Remote Software Developers - Project</title>
      <dc:creator>Gabriel</dc:creator>
      <pubDate>Fri, 28 Feb 2020 09:28:20 +0000</pubDate>
      <link>https://dev.to/gabriel1/hire-full-time-remote-software-developers-project-46fn</link>
      <guid>https://dev.to/gabriel1/hire-full-time-remote-software-developers-project-46fn</guid>
      <description>&lt;p&gt;Hey, me and my partner have been working on a new platform for hiring full time remote technical people (Developers, UX, Writers...) in Europe time zones.&lt;br&gt;
We are working hard to create a decent MVP.&lt;br&gt;
If you are looking for a full time job and want to be notified when we launch, or just find the idea interesting and are curious - please sign up. Thank you very much :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mailchi.mp/ff651b09cbc2/hireremote" rel="noopener noreferrer"&gt;https://mailchi.mp/ff651b09cbc2/hireremote&lt;/a&gt;&lt;/p&gt;

</description>
      <category>remote</category>
      <category>hiring</category>
      <category>career</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
