<?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: Taliesin</title>
    <description>The latest articles on DEV Community by Taliesin (@taliescript).</description>
    <link>https://dev.to/taliescript</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%2F576740%2F82cf7b74-7b7f-44b8-a914-0afef3a2d851.jpeg</url>
      <title>DEV Community: Taliesin</title>
      <link>https://dev.to/taliescript</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/taliescript"/>
    <language>en</language>
    <item>
      <title>Finding the job you want</title>
      <dc:creator>Taliesin</dc:creator>
      <pubDate>Fri, 01 Apr 2022 15:24:42 +0000</pubDate>
      <link>https://dev.to/taliescript/finding-the-job-you-want-13if</link>
      <guid>https://dev.to/taliescript/finding-the-job-you-want-13if</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4K1Vu7P_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjzmjgdx7u6sj1cro2je.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4K1Vu7P_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjzmjgdx7u6sj1cro2je.jpeg" alt="Image description" width="499" height="500"&gt;&lt;/a&gt;&lt;br&gt;
 ## Introduction&lt;/p&gt;

&lt;p&gt;Wow, you made it to part three! Or you just found this blog with no idea it's part of a series. If that is the case, allow me to enlighten you. &lt;br&gt;
As mentioned, this is part three of a three-part blog series. I am writing from my experience as a self-taught developer and giving some advice on what I consider are the main challenges of being a web developer. &lt;br&gt;
This part continues from part two, where I discuss working in your first job. Here I will discuss progressing in your career and finding the job you want to get.&lt;/p&gt;

&lt;h2&gt;
  
  
  Money vs Lifestyle
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i0jFo_2x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn5mytfyzfym4116a9i0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i0jFo_2x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn5mytfyzfym4116a9i0.jpeg" alt="200 Vietnamese Dong" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This question came to me fairly recently, and I think it’s a question most developers will have to ask themselves in their career. Do you choose work that will pay much better, or do you choose a job in which you will be more comfortable that has more benefits.&lt;/p&gt;

&lt;p&gt;As I mentioned in the first blog in this series, I got into web development for the freedom it could offer. Although, of course, money does play a part in that, I can now afford to travel more. But I still need to be free enough to travel.&lt;/p&gt;

&lt;p&gt;This question will have a different answer for you as your priorities in life could be much different e.d. you may have a family or a passion you wish to pursue other than coding. For example, I heard of someone recently that became a dev, only to fund their pilot training, and I have a friend who only wants to work 3 or 4 days a week to focus on their music.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ask yourself what you want from your work&lt;/li&gt;
&lt;li&gt;Consider your position in life&lt;/li&gt;
&lt;li&gt;Decided what you prioritise&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Learning new skills
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---9etBpyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcznvdn4okqnfbyqneur.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---9etBpyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcznvdn4okqnfbyqneur.jpeg" alt="Brighton peir" width="500" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this industry, I think it's always important to learn something new. Not only because tech is constantly changing but for your progression too.&lt;/p&gt;

&lt;p&gt;The decision to learn a particular skill should not be taken lightly. The worse thing would be to learn something to then never use it. This has happened to me early in my career, and now whenever I start to learn a  new skill, I make sure it's something I will be able to utilise, either for getting a new job or personal projects.&lt;/p&gt;

&lt;p&gt;I think you shouldn't worry about pushing back against doing work that will be required you to learn something new that is of no interest to you or you will not use in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Never get complacent in the indestry&lt;/li&gt;
&lt;li&gt;Think about it before you commit to learning a new skill&lt;/li&gt;
&lt;li&gt;Try to avoid learning things you don’t need or want to learn&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Job agencies / recruiters!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Shgvh1e3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebjtm5grkhe7yc2a9fqe.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Shgvh1e3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebjtm5grkhe7yc2a9fqe.jpeg" alt="First dev job computer" width="499" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Being a developer will mean you will probably get harassed by many recruiters (that's been my experience working in the UK anyway). I've had good, bad and annoying ones.&lt;/p&gt;

&lt;p&gt;I've heard a few stories of people getting miss-sold jobs, which has happened to me in the past. I've had recruiters call and message me 2 or 3 times a day and try and push me into new positions I'm not sure about taking. So now I err on the side of caution when dealing with them.&lt;/p&gt;

&lt;p&gt;But on the other hand, they can be instrumental in helping you get the position you want. Recruiters know what and what not to say. They can also save you time by communicating with the company, lining up interviews, and getting information.&lt;/p&gt;

&lt;p&gt;The thing to keep in mind is they want you to take the job even if it's not quite what you want, and they will try to sell it to you as much as they will sell you to the company. So it's probably better to find work by going directly to the company or through friends if you can or find a good recruiter you can trust.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Recruiters can be useful for saving yo time and selling you skills&lt;/li&gt;
&lt;li&gt;Be cautious if a recruiter is overly pushy&lt;/li&gt;
&lt;li&gt;always remember they are trying to sell you the job&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you have enjoyed my blog. I have been talking about things from my experience, which if you want to know more about me, check out my first blog in this series. If you have liked this, please check out the other blogs we have written on our company website, where we have tutorials and other bits talking about developer life.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>jobs</category>
      <category>jobhunting</category>
    </item>
    <item>
      <title>My experience being in your first dev job as a self-taught developer</title>
      <dc:creator>Taliesin</dc:creator>
      <pubDate>Mon, 31 Jan 2022 15:14:17 +0000</pubDate>
      <link>https://dev.to/taliescript/my-experience-being-in-your-first-dev-job-as-a-self-taught-developer-29b2</link>
      <guid>https://dev.to/taliescript/my-experience-being-in-your-first-dev-job-as-a-self-taught-developer-29b2</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This blog talks about my experience and advice on what I consider the main challenges in your first dev job.&lt;/p&gt;

&lt;p&gt;This is part two of a three-part blog series where I am talking about the main points of being a dev from my perspective of a self-taught web developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first two months
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1SglgEJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obwp1c1jf93f316vbxfx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1SglgEJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obwp1c1jf93f316vbxfx.jpeg" alt="A picture I share on instagram from my first day as a developer" width="880" height="882"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A picture I share on instagram from my first day as a developer&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My first job was working for a company that built browser-based software for the shipping industry. I started as a frontend only dev but ended up becoming full stacked. I was fortunate to have some lovely colleges that mentored me a lot in the first few months.&lt;/p&gt;

&lt;p&gt;From my experience, the first two months were just about learning the ropes. How to use git properly, get used to the code base, and interacting with other devs. It may be a different story working for an agency, where you would probably be expected to build things quicker and have less opportunity to learn new skills in your own time.&lt;/p&gt;

&lt;p&gt;At this point, you will want to get used to your working environment by learning the do and don’ts of working in this industry, learning about your company and learning the process of doing your job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The first two months is just about learning the basics&lt;/li&gt;
&lt;li&gt;No one will expect you to do an amazing job straight away&lt;/li&gt;
&lt;li&gt;Don’t worry about trying to impress at this point&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Imposter syndrome
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oLHc5hqX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwvwc6k17gnn1m9jux0p.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oLHc5hqX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwvwc6k17gnn1m9jux0p.jpeg" alt="A black sheep" width="880" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It’s a black sheep, get it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imposter syndrome is the feeling of self-doubt, and somehow you don’t deserve or belong in the position you find yourself in.&lt;/p&gt;

&lt;p&gt;I read about imposter syndrome before I even started as a developer. Being a self-taught dev who has never attended higher education gave me imposter syndrome as soon as I started.&lt;/p&gt;

&lt;p&gt;Getting used to working with other people was the main thing. Before I got my first job, the only time somebody else read my code was when I was showing it off in personal projects or code challenges. Now everything I wrote was getting reviewed. This would make me very nervous every time I would commit my work.&lt;/p&gt;

&lt;p&gt;The best way to get over this, I believe, is to remember no one is perfect, and everyone you are working with are in the same boat as you. Talk to your colleagues and be honest about what you do and don’t know. For sure, they will understand because they have been in the same position, whether it was at uni or their first dev job. However, you must overcome this feeling to help with your personal development, for reasons I will talk about in the next section.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Be honest about your skill level.&lt;/li&gt;
&lt;li&gt;Everyone is in the same boat.&lt;/li&gt;
&lt;li&gt;Your colleges have been in your situation before.&lt;/li&gt;
&lt;li&gt;Don’t let imposter syndrome hinder you from reaching your goals.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Personal development is key
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bfDblDNS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m7634tui15xdkhx89ety.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bfDblDNS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m7634tui15xdkhx89ety.jpeg" alt="Bruce lee quote" width="620" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Replace "dangerous person" with most "best-tist developer". &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my opinion, the main focus in your first job should be your personal development as a developer. You are essentially going from a junior or intern skill level to a mid-weight level because when you get to that point, you will have so many more options in your career (This I will talk about in part three).&lt;/p&gt;

&lt;p&gt;The best way to do this is by learning from your peers. This is why it is essential, to be honest about your skill level and overcome that imposter syndrome I mentioned in the last section. If you don't know something, say it to your colleagues or ask for help directly. There will always be someone willing to show you or help you.&lt;/p&gt;

&lt;p&gt;Another thing you can do; when another more senior dev is reviewing your pull request, ask them to be as brutal as possible, don't let anything slide. This might be frustrating at first, but it will help you become a better developer. And people respect someone willing to learn from them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Your focus should be personal development&lt;/li&gt;
&lt;li&gt;Always ask for help and ask colleges to be brutal on pull requests&lt;/li&gt;
&lt;li&gt;People respect someone willing to learn and not overly cocky and proud&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you have enjoyed this blog. Please check out the other two blogs in this three-part series. Much of what I said is from my personal experience, and I know it is just my opinion. My goal here is to give some advice and hopefully help someone going through what I went through.&lt;/p&gt;

</description>
      <category>100daysofcode</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>From a self taught developer to first web dev job</title>
      <dc:creator>Taliesin</dc:creator>
      <pubDate>Mon, 24 Jan 2022 14:32:54 +0000</pubDate>
      <link>https://dev.to/taliescript/from-a-self-taught-developer-to-first-web-dev-job-49gi</link>
      <guid>https://dev.to/taliescript/from-a-self-taught-developer-to-first-web-dev-job-49gi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This is a three-part blog series where I would like to talk about what I consider to be the essential points when being a self-taught developer. I will talk about some positives, negatives and some advice from my experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  My personal experience
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QvFYaMHK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ml3zos5fjc50d5l8a7s9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QvFYaMHK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ml3zos5fjc50d5l8a7s9.jpeg" alt="I couldn’t find a picture of me when I started learning, so heres me in Vietnam the year before" width="720" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I couldn’t find a picture of me when I started learning, so heres me in Vietnam the year before &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;This blog is part one, where I will be talking about self-teaching yourself code to getting your first job.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Firstly let me introduce myself. My name's Talie and I work at Pixelhop. I have been a full-stacked web developer for 3 years and have worked for 3 different companies.&lt;/p&gt;

&lt;p&gt;I started learning to code when I was 23. When I wasn’t sure what to do with my life. I was staying in Bangkok and messing around on my second hand computer, learning a bit of HTML. I found it quite satisfying, and decided to go back to England and focus on learning it properly. Not knowing if I would ever really be able to get a job. Four years later and I believe that was the best decision of my life.&lt;/p&gt;

&lt;p&gt;The reason I decided to start coding, was mainly for the freedom I thought could be achieved from working in this industry. I had no interest in working in an office and initially wanted to live a nomadic life as freelancer.&lt;/p&gt;

&lt;p&gt;I have never been to university, and taught myself how to code over the course of a year before I got my first job. One of the great things about this industry is, in my experience, companies and colleagues don't care about whether or not you have attended higher education.&lt;/p&gt;

&lt;h2&gt;
  
  
  The importance of notes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IJKqdtPJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9lyr94olpkyyzp3gi2g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IJKqdtPJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9lyr94olpkyyzp3gi2g.png" alt="My old notes" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;My old notes from when i first started learning JavaScript&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notes notes notes! For me, this is the most crucial part when learning to code. It's the basis of all your learning and will help you when studying to get that first job and even after you have started.&lt;/p&gt;

&lt;p&gt;If I could go back to when I first started learning, I would start with focusing on taking notes well. The ability to note something down in your own words, quickly and clearly, is really powerful.&lt;/p&gt;

&lt;p&gt;Trying to memorise things you don't fully understand will lead to frustration. Something I know from experience.&lt;/p&gt;

&lt;p&gt;When you start out, noting everything you learn will really help you. No matter how basic it may seem and you will find yourself referring back to those notes every time you forget something until you start memorising it.&lt;/p&gt;

&lt;p&gt;This is also massive help if you ever take a break from learning. You can continue from where you left off and refer to your notes when you come back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sum up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Note as much as possible (literally, everything when you are first starting out).&lt;/li&gt;
&lt;li&gt;Don't try memorising anything. That will come naturally.&lt;/li&gt;
&lt;li&gt;Use some noting software to make it easier, for example; Notion or OneNote.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your path
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sryBw-hE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ed65t5zxunrts7gejgb9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sryBw-hE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ed65t5zxunrts7gejgb9.jpeg" alt="Path picture" width="880" height="494"&gt;&lt;/a&gt;&lt;br&gt;
As I was learning, I didn’t spend enough time to fully understand what I needed to learn and to what level. If I had really planned out a path before getting stuck in, I think I would have saved a lot of time and energy.&lt;/p&gt;

&lt;p&gt;So what do I mean by finding your path? I mean the things you learn, i.e. Javascript, PHP, design. Should be in line with your end goal.&lt;/p&gt;

&lt;p&gt;I know what you're thinking, "well, duh", but I believe this is too often overlooked.&lt;/p&gt;

&lt;p&gt;We should remember, as self-taught developers, we don't have anyone to keep us disciplined and tell us what to learn and in what order. I had found myself learning something that I later found out was out of date, Cough cough.. jQuery or something that could be done by a language that I already know Cough cough.. PHP.&lt;/p&gt;

&lt;p&gt;Before learning anything new, I recommend really thinking about what you want your goal to be, i.e. becoming a backend dev or full stacked dev. Research what your desired goal requires by looking at job descriptions or finding out what the most common and up to date tech is being used for a specific job.&lt;/p&gt;

&lt;p&gt;Having a fixed path will save you a lot of time (trust me) and keep you motivated because you will be sure you are going in the right direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stick with your choice and follow your path to the end.&lt;/li&gt;
&lt;li&gt;Consider your strengths and weaknesses, i.e. Are you more visual or technical?&lt;/li&gt;
&lt;li&gt;Stick with what you already know and go deep with it, e.g. Don't go and learn Python to build an API if you already know Nodejs.&lt;/li&gt;
&lt;li&gt;Spend time planning and don't jump into anything without being sure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your goal
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D82ChQg9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1skiqb4iwswrd3bqmv8z.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D82ChQg9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1skiqb4iwswrd3bqmv8z.jpeg" alt="Image description" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A picture I posted online when I first got a second screen, I remember feeling so chuffed that i had got to this position.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we have spoken about choosing your path; the natural next thing should be what your end goal should be?&lt;/p&gt;

&lt;p&gt;I want to say that this will probably not be apparent right from the beginning. It will take some time and research.&lt;/p&gt;

&lt;p&gt;I decided to start coding mainly for the freedom I believed could be achieved from working in this industry. I had no interest in working in an office and just wanted to live a nomadic life as a freelancer.&lt;/p&gt;

&lt;p&gt;It wasn't until I did my research and found out getting clients was not as easy as I thought and the best way to learn from people is to work next to them in an office. So after that, my goal changed and getting an office job actually became my main focus.&lt;/p&gt;

&lt;p&gt;It would also help to consider your position in life, i.e. when you should start working? For example, starting at a junior position, intern or getting clients. Of course, this will depend on what position you are in personally. Ask yourself; if you have the time to work towards a junior role rather than wasting time trying to apply for intern positions. Or would it be better to try and find some work on the weekends as you are busy most of the week?&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Think about what you want to get out of learning to code, i.e. become freelance, get a stable office job or maybe just for a personal project.&lt;/li&gt;
&lt;li&gt;Keep in mind that your goal will not be the end, e.g. getting a job. Maybe don't think 'what do i need to do to get this specific junior role' instead think 'How would i get to a mid-weight position as so &amp;amp; so dev'—making your initial goal to get a junior position.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Personal Projects
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DvSxzLSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3ub12d03o32ocmr3ofa.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DvSxzLSI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3ub12d03o32ocmr3ofa.gif" alt="Image description" width="600" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One of my first personal projects&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Personal projects are the best tool for you as a self-taught dev.&lt;/p&gt;

&lt;p&gt;It's the most meaningful way to show off your skills. You can put any old guff on a CV or complete a code challenge where you print out a sequence of numbers. It might seem impressive. But it's nothing compared to an actual functioning app with a purpose and more realistic to what you will actually be doing.&lt;/p&gt;

&lt;p&gt;They are also the only way to show your non-dev friends and family something cool that you can do with your skills. Perhaps even convince them, all this wacky computer stuff you have been working on does have a purpose after all.&lt;/p&gt;

&lt;p&gt;For me, that's what really got me hooked on development. Instead of thinking, "there should be an app for that" or "someone should make a website like this", I consider that an idea and start to think of ways I can make it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sum up
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Try to be original. It's easy to follow a tutorial on making a to-do app or whatever. But its a lot more impressive if you come up with a functional or fun idea yourself.&lt;/li&gt;
&lt;li&gt;Start small.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading part one of my three part bog series. I hope you gain something from this, I have made a lot of mistakes in the past and I hope to passed on some of my knowledge.&lt;/p&gt;

&lt;p&gt;Please check out the other blogs in this series when they are out and check out some of our other blogs on our website.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>selfteaching</category>
      <category>career</category>
    </item>
    <item>
      <title>Mouse tracking eye using Vue 3, VueUse and CSS</title>
      <dc:creator>Taliesin</dc:creator>
      <pubDate>Thu, 28 Oct 2021 13:41:21 +0000</pubDate>
      <link>https://dev.to/taliescript/mouse-tracking-eye-using-vue-3-vueuse-and-css-44of</link>
      <guid>https://dev.to/taliescript/mouse-tracking-eye-using-vue-3-vueuse-and-css-44of</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In this blog, I will be showing you have to make a mouse-tracking eye component using Vue 3, VueUse and a sprinkle of CSS. This eye-catching component will make a quirky addition to your future projects.&lt;/p&gt;

&lt;p&gt;Firstly let's break the eyes, my name is Taliesin, and I work at &lt;a href="https://www.pixelhop.io/" rel="noopener noreferrer"&gt;Pixelhop&lt;/a&gt;. I made this for our Halloween special project we at Pixelhop made called &lt;a href="https://trick-or-treat.pixelhop.io/" rel="noopener noreferrer"&gt;trick-or-treat&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;If you would like to get your eyes on the whole code example, please find it &lt;a href="https://codesandbox.io/s/mouse-tracking-eye-rpzyt?file=/src/App.vue" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Readers are recommended to have a basic understanding of Vue 3 using the composition API, also not recommended for anyone with Ommetaphobia or if you have anything against terrible eye puns. So if we see eye to eye, let's crack on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;So, to summer-eyes, for this to work, we will need to have an SVG of an eye with the pupil to one side. We are then just going to set the transform rotate property to point the pupil in the direction of the mouse as it moves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project setup
&lt;/h3&gt;

&lt;p&gt;If you already have a project and an eye SVG ready, you can roll your eyes on to the next section. But if you're like the alien called Alen and missing an eye, here I will just be setting up a basic Vue 3 project and setting the foundation of what we are making.&lt;br&gt;
So first, we want to set up a basic Vue 3 project. The easiest way to do this is using npx and the Vue CLI by running the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @vue/cli create mouse-tracking-eye
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the default vue 3 preset &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2qwz07rdcnoo7zsbrbaf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2qwz07rdcnoo7zsbrbaf.jpeg" alt="Selecting the default vue 3 preset"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose your dependancies manager (I'm using npm)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvi55hx9kg8eqkw6jgyu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmvi55hx9kg8eqkw6jgyu.jpeg" alt="Selecting npm"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd&lt;/code&gt; into the folder and install the dependancies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;mouse-tracking-eye/ &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm i
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can now remove all the bits the vue cli gives us that we don't need. First, remove the components and assets folders. Then in the &lt;code&gt;App.vue&lt;/code&gt;, we should remove all the base stuff it gives us. You are just left with the template, script and style tag.&lt;/p&gt;

&lt;p&gt;I am using the &lt;code&gt;&amp;lt;script setup&amp;gt;&lt;/code&gt; syntax, which you can read about &lt;a href="https://v3.vuejs.org/api/sfc-script-setup.html#basic-syntax" rel="noopener noreferrer"&gt;here&lt;/a&gt; and typescript because why not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- App.js --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"ts"&lt;/span&gt; &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to eye up the template, I'm using the SVG I used for our Halloween project. Add a div and give it a class of &lt;code&gt;container&lt;/code&gt;, then paste the SVG inside the container div.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- App.ts &amp;gt; temaplate --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt;
    &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 33 33"&lt;/span&gt;
    &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      ...
  &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Centre the eye and add a black background, so the eye stands out with a bit of CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* App.js &amp;gt; style */&lt;/span&gt;

&lt;span class="nc"&gt;.conatainer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vw&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.eye&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100vh&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;Spec-tacular! Now, if you run your project, you should have an eye in the middle of your screen and a black background.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mouse tracking functionality
&lt;/h3&gt;

&lt;p&gt;This section will focus on getting the eye to follow the mouse.&lt;/p&gt;

&lt;p&gt;As previously mentioned, we will be using the vueuse library. Vueuse is a super helpful function library for Vue 3 with a few functions that will simplify this. So let's install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i @vueuse/core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import the functions we need into our app and we might as well import the function we need from Vue as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;!--&lt;/span&gt; &lt;span class="na"&gt;App&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="na"&gt;vue&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; script --&amp;gt;
import &lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;useMouse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useWindowSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;debouncedWatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;throttledWatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt; from '@vueuse/core';
import &lt;span class="si"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onMounted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="si"&gt;}&lt;/span&gt; from 'vue';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Eye eye, now we got those imported, we can start using them. The first two we will use are &lt;code&gt;useMouse&lt;/code&gt; and &lt;code&gt;useWindowSize&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;useMouse&lt;/code&gt; returns the x and y of the mouse position, and &lt;code&gt;useWindowSize&lt;/code&gt; returns... You guessed it, the window size width and height.&lt;br&gt;
So just under the import, add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mouseX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;mouseY&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useMouse&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useWindowSize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next we need to get the eye location on the screen, to do this add a ref to the SVG in the template. So it will be something like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- App.vue &amp;gt; template --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt;
  &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"eye"&lt;/span&gt;
  &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 33 33"&lt;/span&gt;
  &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and now we can reference it in the script, we just need to add a ref variable with null as its starting value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eye&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Element&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Side note:&lt;/strong&gt; If you are using a setup function inside a regular script tag, make sure you add the ref to the return object, or it will not work.&lt;/p&gt;

&lt;p&gt;Now define the eye location reference&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;eyeLocation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DOMRect&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I am setting the eye location inside the &lt;code&gt;onMounted&lt;/code&gt; function we import from vue earlier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="nf"&gt;onMounted&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;eyeLocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;eye&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;getBoundingClientRect&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;We also want to set the eye's location when the screen size is changed because depending on where it is this might move the eye. To achieve this we can use the &lt;code&gt;debounceWatch&lt;/code&gt;&lt;br&gt;
To summarise what happening here; we are watching for a change in the window height and width and for a change and running a debounce function when it does.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="nf"&gt;debouncedWatch&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&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="nx"&gt;eyeLocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;eye&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;getBoundingClientRect&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;span class="na"&gt;debounce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, now we've now we've got an eye on its location, let's get the ball rolling and actually make the eye move.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// App.vue &amp;gt; script&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rotationDegrees&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;throttledWatch&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;mouseX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;mouseY&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;eyeLocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&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;radianDegrees&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;atan2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;eyeLocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;eyeLocation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;top&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;rotationDegrees&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;radianDegrees&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;180&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;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;throttle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So if you got an eye for this sort of thing, then you'll be able to understand it, but if you're like a blind Bambi and have no-eye-deer. Don't worry; I'll give a quick summary of what's happening;&lt;/p&gt;

&lt;p&gt;Firstly, we define the ref &lt;code&gt;rotationDegrees&lt;/code&gt; which will be the number of degrees we need to rotate our eye. Next, we are using the &lt;code&gt;throttledWatch&lt;/code&gt; function to watch the mouse location, then set the &lt;code&gt;rotationDegrees&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First, it gets the &lt;code&gt;radianDegrees&lt;/code&gt; using the &lt;code&gt;Math.atan2&lt;/code&gt; function; read more &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Basically, it receives the radian between the eye location and the mouse. I am using the top and right locations of the eye, but depending on where your eye's pupil is pointing, you may need to use a different location. Then we convert the radian into degrees we can use to rotate the eye.&lt;/p&gt;

&lt;p&gt;This function is then throttled to 60 times per second as we don't need to run this more than that as most screens only run a 60 hertz anyway.&lt;/p&gt;

&lt;p&gt;Now all we need to do is set the transform rotate property to the SVG and you'll really be turning some eyes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- App.vue &amp;gt; temaplate --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt;
  &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"eye"&lt;/span&gt;
  &lt;span class="na"&gt;:style=&lt;/span&gt;&lt;span class="s"&gt;"`transform: rotate(${rotationDegrees - 40}deg) translateZ(0)`"&lt;/span&gt;
  &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 33 33"&lt;/span&gt;
  &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Side note:&lt;/strong&gt; You may need to do what I did by adding or subtracting a few degrees if your eye is not pointing precisely left or right.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Because we are getting the eye location on mounted and screen size change, you can place your eye anywhere on the screen, and it will still work.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this mini tutorial, and it helps you create some fun projects. Feel free to send us your creations. I would love to eye them up. You can find our contact details at &lt;a href="https://www.pixelhop.io/contact/" rel="noopener noreferrer"&gt;https://www.pixelhop.io/contact/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are interested to see the original eye, I made and our Halloween special project, check it out here: &lt;a href="https://trick-or-treat.pixelhop.io/" rel="noopener noreferrer"&gt;https://trick-or-treat.pixelhop.io/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please keep your eyes peeled for our new blogs at &lt;a href="https://www.pixelhop.io/writing/" rel="noopener noreferrer"&gt;https://www.pixelhop.io/writing/&lt;/a&gt; or sign up for our newsletter.&lt;/p&gt;

&lt;p&gt;See you later 👋&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vue</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
