<?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>Forem: Princewhyte Dabotubo</title>
    <description>The latest articles on Forem by Princewhyte Dabotubo (@princewhyte2).</description>
    <link>https://forem.com/princewhyte2</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%2F315408%2F77454fc8-7984-4bc8-b612-3085b6a8ea31.jpg</url>
      <title>Forem: Princewhyte Dabotubo</title>
      <link>https://forem.com/princewhyte2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/princewhyte2"/>
    <language>en</language>
    <item>
      <title>What moment changed your programming mindset?</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Sun, 21 Aug 2022 21:19:26 +0000</pubDate>
      <link>https://forem.com/princewhyte2/what-moment-changed-your-programming-mindset-2l2f</link>
      <guid>https://forem.com/princewhyte2/what-moment-changed-your-programming-mindset-2l2f</guid>
      <description>&lt;p&gt;To end my questioning sessions for now, I would like to ask what changed things for you in your journey?&lt;/p&gt;

&lt;p&gt;Was it having your code finally merged?&lt;br&gt;
Was it a course you took?&lt;br&gt;
Was it an explanation you received?&lt;br&gt;
Hit us&lt;br&gt;
Thanks&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What's one mistake you've made in your career you can't forget?</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Sun, 14 Aug 2022 20:28:02 +0000</pubDate>
      <link>https://forem.com/princewhyte2/whats-one-mistake-youve-made-in-your-career-you-cant-forget-36f2</link>
      <guid>https://forem.com/princewhyte2/whats-one-mistake-youve-made-in-your-career-you-cant-forget-36f2</guid>
      <description>&lt;p&gt;In course of our journey as software developers,  we've encountered so many moments that'll forever stay in our hearts.&lt;/p&gt;

&lt;p&gt;And so for this week , I would like to ask what's that mistake you made that has a spot forever in your journey.&lt;/p&gt;

&lt;p&gt;Was is by deleting a database?&lt;br&gt;
Crashing a code in production?&lt;/p&gt;

&lt;p&gt;Let's hear you.&lt;br&gt;
Thanks .&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>What's that thing you despise so much in software development?</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Sun, 07 Aug 2022 19:42:58 +0000</pubDate>
      <link>https://forem.com/princewhyte2/whats-that-thing-you-despise-so-much-in-software-development-4if6</link>
      <guid>https://forem.com/princewhyte2/whats-that-thing-you-despise-so-much-in-software-development-4if6</guid>
      <description>&lt;p&gt;I was gonna try make a post today but instead I'll rather listen today.&lt;/p&gt;

&lt;p&gt;At various levels in our career we've come across some issues that pissed us of.&lt;/p&gt;

&lt;p&gt;It could be having to explain every single line of code to a junior?&lt;br&gt;
It could be dealing with version updates of dependencies,&lt;br&gt;
It could be having to learn a new framework every 6 months lol.&lt;/p&gt;

&lt;p&gt;So let's talk about it.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>A beginner guide switching from javasctipt to typescript.</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Sun, 31 Jul 2022 19:03:41 +0000</pubDate>
      <link>https://forem.com/princewhyte2/a-beginner-guide-switching-from-javasctipt-to-typescript-2471</link>
      <guid>https://forem.com/princewhyte2/a-beginner-guide-switching-from-javasctipt-to-typescript-2471</guid>
      <description>&lt;p&gt;One morning I woke up and the new technical wave is that I should use typescript instead of javascript.&lt;/p&gt;

&lt;p&gt;Okay, wait do you mean I have to start learning a new programming language?&lt;/p&gt;

&lt;p&gt;I took a quick peek at a typescript file, boy oh boy this is going to be difficult.&lt;/p&gt;

&lt;p&gt;Yeah yeah yeah I know that feeling. So here's a quick guide on how u can understand some basic concepts on switching from javascript to typescript.&lt;/p&gt;

&lt;p&gt;Now I'm not here to give you some definition and setup tutorial or why you should use typescript instead kinda lecture. you can find that with just a simple Google search. But trust me on this many developers didn't like the Idea of typescript initially but then when we finally did, we didn't want to go back to plain old javascript and guess what maybe you'll be one too.&lt;/p&gt;

&lt;p&gt;let dive in&lt;/p&gt;

&lt;p&gt;The whole idea of typescript is being intentional about each step you take in programming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declaring variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In plain javascript, we would do something like&lt;br&gt;
&lt;code&gt;let first variable = 0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;we all know this is a number variable yeah even typescript does(wouldn't want to go into that detail here) but here's the equivalent in typescript.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let firstVariable: number = 0
let firstString: string = 'My first string'
let firstBool:boolean = true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where Number, String, Boolean is a type. Yeah, why are we doing all this additional stuff? &lt;/p&gt;

&lt;p&gt;well, I believe the moment you start trying this out in your IDE you'll discover warnings saying you can't leave a variable of type Number null etc.&lt;br&gt;
Trust me this stuff would come in handy when things start getting complex. I wouldn't want to be talking about the benefits of typescript here as it is out of the scope of this post.&lt;/p&gt;

&lt;p&gt;Now we might ask what about variables such as arrays and objects&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let firstArrayOfNumbers: Array&amp;lt;number&amp;gt;
let secondArrayOfStrings: Array&amp;lt;string&amp;gt;
let thirdArrayOfBool:Array&amp;lt;boolean&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now at this point, I'm sure you're having some interesting questions here and that's great. Let then fire up your research you are on the right track&lt;/p&gt;

&lt;p&gt;what about objects?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface MyObject {
    name: string
    age: number
    address: string
    married: boolean
}

let myFirstObject: MyObject = {
    name: "Titus",
    age: 30,
    address: "Linux street",
    married: false
}

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

&lt;/div&gt;



&lt;p&gt;Here you are describing each field of the object. What would be the type of each field? This comes in handy when you would want to use the variable in some other place. &lt;br&gt;
Just simplly you created your own type for an object definition called MyObject.&lt;/p&gt;

&lt;p&gt;Lastly, how do I write functions&lt;/p&gt;

&lt;p&gt;Like I said the whole Idea of typescript is being intentional. Now when we want to write a function we ask what would this function take. , what would be the response of the function? would the parameters be strings and the returned value be a number?&lt;br&gt;
what if I'm not returning anything?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function myFirstAddFunction (a:number,b:number) : number {
    return a + b
}

function myFirstVoidFunction (a: number): void{
    console.log(a)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I believe this isn't the finest of tutorials but the aim of this post is just to awaken your curiosity. Now you have questions make research and take various tutorials online without being scared and trust me you'll love the benefits that typescript comes with. &lt;/p&gt;

&lt;p&gt;Thanks for reading&lt;/p&gt;

&lt;p&gt;you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://twitter.com/princewhyte02"&gt;twitter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Learn Software development</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Thu, 21 Jul 2022 17:08:40 +0000</pubDate>
      <link>https://forem.com/princewhyte2/how-to-learn-software-development-3ki8</link>
      <guid>https://forem.com/princewhyte2/how-to-learn-software-development-3ki8</guid>
      <description>&lt;p&gt;What if I could start this journey from the beginning? How will I study differently? Based on what I know now what's important?&lt;/p&gt;

&lt;p&gt;Now here's it I've seen and heard people talk about this with their different opinion, but from my own experience, this is the flow. And I'll try to make them simply brief.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch a lecture or video about how computers work&lt;/strong&gt;&lt;br&gt;
I know you wanted to see HTML and then CSS but Nah. Ignites your desire and passion for computers and their wonders. You can find any good video on youtube or as I always recommend just calm down and watch the first lecture of cs50.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn Basic command line codes&lt;/strong&gt;&lt;br&gt;
There's no way you'll want to code without interacting with the shell. learning the basic ones will be enough and always remember Google is your friend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take a programming course from a University not Youtube&lt;/strong&gt;&lt;br&gt;
Yeah, there are a whole lot of programming videos on youtube and I get it. But you see the issue I see with them all is that they teach you a programming language like you know how to program already. my recommendation would be Mix introduction to programming with python. If you know a course equally as powerful in Javascript please comment below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn SQL and start building console interactive apps&lt;/strong&gt;&lt;br&gt;
After learning to program, I'll suggest you learn SQL and start interacting with databases. Udacity has good free courses on SQL but feels free to find better options. After learning SQL seek the knowledge to combine your SQL skills with your programming language and then build command line apps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch Videos on how the web works&lt;/strong&gt;&lt;br&gt;
Take your time to watch various videos and tutorials on how the web works. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn HTML And CSS&lt;/strong&gt;&lt;br&gt;
learn the markup and style language for the web. You can always see beautiful resources online on various platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build lots of projects with just HTML and CSS&lt;/strong&gt;&lt;br&gt;
hey, don't be in a hurry. Master those skills and build projects until you need minimal or no supervision to get things right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn the Javascript Programming Language&lt;/strong&gt;&lt;br&gt;
if you could find a suitable lecture in javascript to replace the one in the learn programming part it will be a huge advantage for you at this stage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn the Javascript Dom and its manipulations&lt;/strong&gt;&lt;br&gt;
Great now you've learned javascript. It's time to learn how the dom works and how to manipulate it. I'll suggest building interactive projects with it to familiarise yourself with the most used commands. always remember google is your friend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now build lots of projects&lt;/strong&gt;&lt;br&gt;
A good way to start is by recreating your console apps with HTML CSS and javascript. In cases where you've used SQL, it would be a great opportunity to practice various browser storage APIs.&lt;br&gt;
keep building projects until you can work with minimal or no supervision.&lt;/p&gt;

&lt;p&gt;I'll just be here for now. This is in no way a comprehensive list. But this guide will give you a solid foundation to learn various aspects of this field easily. I'm not teaching you to be a frontend or backend. Everything lies in your experience going forward.&lt;/p&gt;

&lt;p&gt;One huge point I would want you to note is don't study silently. Find peers also studying as this will push you to new heights.&lt;br&gt;
Seek advice on where next to turn in your career from proven Engineers/Developers.&lt;/p&gt;

&lt;p&gt;Don't be scared to make mistakes in this profession it seems that's how we will learn.&lt;/p&gt;

&lt;p&gt;Stop processing just do it.&lt;/p&gt;

&lt;p&gt;SO tell me what's your approach towards this field?&lt;/p&gt;

&lt;p&gt;you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://twitter.com/princewhyte02"&gt;twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanks for reading&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>discuss</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to escape the impostor syndrome</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Wed, 13 Jul 2022 12:19:48 +0000</pubDate>
      <link>https://forem.com/princewhyte2/how-to-escape-the-impostor-syndrome-9c9</link>
      <guid>https://forem.com/princewhyte2/how-to-escape-the-impostor-syndrome-9c9</guid>
      <description>&lt;p&gt;So I got this job and boom everyone in the company is superman/superwoman. And I'm here feeling useless. Woah great, wait how did I get here in the first place. I mean I used to think I'm an exceptional developer now what's going on here?.&lt;/p&gt;

&lt;p&gt;Hmm, lemme see aha there's a name for this the &lt;strong&gt;impostor syndrome&lt;/strong&gt;.&lt;br&gt;
According to some definitions on google &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Imposer syndrome is loosely defined as doubting your abilities and feeling like a fraud. It disproportionately affects high-achieving people, who find it difficult to accept their accomplishments...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Great so I wouldn't want to be saying much here. So the question how can I escape the impostor syndrome?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take jobs/roles that match your skill level&lt;/strong&gt;&lt;br&gt;
yeah, I said that. I've read posts on social media encouraging people to take up roles and then study later to fulfill them and I'm like our we being real right now.&lt;br&gt;
The complexity of tasks differs and while it can be relatively easy to switch from one java-script package to another it might be extremely difficult for you to switch to a new language (not the same for everyone though).&lt;br&gt;
You must understand and acknowledge your strengths and weakness before jumping into a role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Earn your way into a job/role&lt;/strong&gt;&lt;br&gt;
Skipping corners can be dangerous yeah. But if you take the necessary steps to earn a Job then yeah you can be confident that you're surely good enough for the organization otherwise the organization needs to a total restructure its hiring process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Talk with new teammates&lt;/strong&gt;&lt;br&gt;
When you find yourself in a new organization talk to people around you. create a friendly atmosphere for yourself. ask them how they felt during their first few months working in the company, what challenges they faced and how did they overcome them. You can also ask for new entry advice from them. simple Love your HR as well lol.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Talk with other professionals&lt;/strong&gt;&lt;br&gt;
The beautiful thing about being a software developer is there's a big pool of connections. simple it's open-source lol. Talk to others about your situation and hear them out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always study and stay updated on the latest in your space&lt;/strong&gt;&lt;br&gt;
Software development is an ever-increasing space. Something can easily be obsolete or deprecated. It is your responsibility to always follow up on the latest trends and make adjustments to your knowledge as deemed fit. &lt;/p&gt;

&lt;p&gt;There'll be moments in your career where you'll feel low. Especially when taking a new role. Everyone has been there at some point. Take a deep breath you are smart and you are surely good enough to be where you are. It takes time to settle into a new environment and you are just going through a phase. You earned it and you deserve it. Shine superstar&lt;/p&gt;

&lt;p&gt;SO tell me what's your advice and contribution toward the impostor syndrome?&lt;/p&gt;

&lt;p&gt;you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://twitter.com/princewhyte02"&gt;twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanks for reading&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>How is Software Development difficult ?</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Wed, 06 Jul 2022 14:38:26 +0000</pubDate>
      <link>https://forem.com/princewhyte2/how-is-software-development-difficult--2pap</link>
      <guid>https://forem.com/princewhyte2/how-is-software-development-difficult--2pap</guid>
      <description>&lt;p&gt;I've learned HTML and CSS, I've built a landing page, I've gone on to learn Javascript, and now I'm building amazing things.&lt;/p&gt;

&lt;p&gt;Oh there's a new framework in town it's React that's not an issue, I've learned that as well.&lt;br&gt;
Now I've built a to-do application. I'm on fire.&lt;/p&gt;

&lt;p&gt;I don't need to learn a new language, javascript runs on the server side too, welcome Node.js. I've learned to use the express framework. Now I've built a Url shortener.&lt;/p&gt;

&lt;p&gt;I've gone on the learn some concepts. I'm using sockets now. I'm a genius. I've built a chat application and an e-commerce app that's running on Heroku. I should be good enough to work at Facebook and Amazon now right?&lt;/p&gt;

&lt;p&gt;Now the interview comes and I'm hearing things like Algorithms, data structures, design patterns, system designs, performance optimization, what's the event loop, and bubbling?  have you worked on micro-services architecture? &lt;/p&gt;

&lt;p&gt;Wait a minute I'm lost now. But I've been building stuff. where's all this frightening stuff coming from ?. &lt;/p&gt;

&lt;p&gt;so maybe it's time I change the question to &lt;strong&gt;&lt;em&gt;why is software development difficult?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's my take. I've not been into software development for a very long time but I can boldly say &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;that your code runs doesn't mean it's good enough.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To be honest, after writing code there's one question in my head. Is this the best approach?&lt;/p&gt;

&lt;p&gt;one thing I have discovered in software development is that we ain't just writing codes to solve a problem but we are writing codes to solve a problem while managing available resources.&lt;/p&gt;

&lt;p&gt;If you've worked with a low-level language like C you'll surely understand the danger of not freeing up memory right? I can barely remember anything about C (lol) let's continue.&lt;/p&gt;

&lt;p&gt;When it has come to managing resources you and I know that it ain't always gonna be easy. Think of it as someone in marriage. You have to make a lot of decisions based on situations while paying great attention to what you can afford.&lt;/p&gt;

&lt;p&gt;What's the best school for my kids that I can afford? , should we have another child? , Do I need to get more groceries? ,  do we need to pay bills for this service? , are my family members happy? , how do I make a decision that's suitable for all parties. sounds crazy and terrifying right?&lt;/p&gt;

&lt;p&gt;Wait let's go back to software now lol.&lt;br&gt;
As a software developer, you don't just write code. You write code efficiently to get the best out of available resources.&lt;br&gt;
A bad piece of code let's say a bug here can cause an organization needless expenses. &lt;br&gt;
I've heard a lot of testimonies from cloud users lol, especially the one with auto-scaling approved. Honestly, I sometimes revert to using the traditional shared hosting option.&lt;/p&gt;

&lt;p&gt;We are constantly asking ourselves questions, why should I make three calls to get this information? can't it happen in just one call? will it slow the response time? , should I be using this framework for this solution? , How can we get the best performance from our server while going for what we can afford? , why don't we break the application into the smaller piece so we can Identify areas to scale while leaving the rest( this way we can save cost). Should we go with a PWA rather than a mobile application?&lt;br&gt;
Are there funds to hire platform-specific developers or should we go with cross platforms?&lt;/p&gt;

&lt;p&gt;Wait a minute, how did we go from a simple landing page to all of these?&lt;br&gt;
Welcome to software development the bigger picture. Is that why these guys say a software engineer is different from a developer? well, I don't know let's leave that for the experts to answer.&lt;/p&gt;

&lt;p&gt;Do I have to learn all these things before I can say I'm a software developer? NO.&lt;br&gt;
I understand all these concepts can be frightening and intimidating but that's the beauty of development, we wake up and learn new things. We'll not learn all these things in six months (do not fall for all those cheap adverts) but maybe in 10 years, we&lt;br&gt;&lt;br&gt;
can say we've covered and understood some great concepts.&lt;/p&gt;

&lt;p&gt;Don't give up, celebrate your landing page, be proud of yourself, share your progress with others, give tutorials, and write an article but always remember there's still a whole lot for you to learn. Keep challenging yourself and keep growing.&lt;/p&gt;

&lt;p&gt;what's software development like for you?&lt;/p&gt;

&lt;p&gt;you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/princewhyte2"&gt;github &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanks for reading &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>A practical approach to creating graphql APIs in node.js - part two(How to setup Apollo Server)</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Tue, 05 Jul 2022 10:31:31 +0000</pubDate>
      <link>https://forem.com/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-twohow-to-setup-apollo-server-30on</link>
      <guid>https://forem.com/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-twohow-to-setup-apollo-server-30on</guid>
      <description>&lt;p&gt;In our previous post &lt;a href="https://dev.to/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-one-schemas-and-queries-26e4"&gt;here&lt;/a&gt; we looked at the foundational concept of graphql (schemas and queries).&lt;/p&gt;

&lt;p&gt;Let's take it a step further and implement a node.js graphql server.&lt;/p&gt;

&lt;p&gt;We'll be implementing our server by using the leading library Apollo server.&lt;/p&gt;

&lt;p&gt;To begin use the command &lt;strong&gt;&lt;em&gt;npm init&lt;/em&gt;&lt;/strong&gt; to create a new node.js project and install dependencies.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install apollo-server graphql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;let's create an index.js file with initial content as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { ApolloServer, gql } = require("apollo-server")

let contacts = [
  {
    name: "Della charles",
    phoneNo: "234-4567-890",
    address: "Eleme street 34",
    id: "3d594650-3436-8b80ba54c431",
  },
  {
    name: "Awurum mikel",
    phoneNo: "234-4567-560",
    street: "Tombia town 7",
    id: "3d599470-3436-8b80ba54c431",
  },
]

const typeDefs = gql`
  type Contact {
    name: String!
    phoneNo: String
    address: String!
    id: ID!
  }

  type Query {
    countContact: Int!
    allContacts: [Contact!]!
    findContact(name: String!): Contact
  }
`

const resolvers = {
  Query: {
    countContact: () =&amp;gt; contacts.length,
    allContacts: () =&amp;gt; contacts,
    findContact: (root, args) =&amp;gt; contacts.find((p) =&amp;gt; p.name === args.name),
  },
}

const server = new ApolloServer({
  typeDefs,
  resolvers,
})

server.listen().then(({ url }) =&amp;gt; {
  console.log(`Server running at ${url}`)
})

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

&lt;/div&gt;



&lt;p&gt;For our server to be running here the most important weapon is this block of code :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const server = new ApolloServer({&lt;br&gt;
  typeDefs,&lt;br&gt;
  resolvers,&lt;br&gt;
})&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The ApolloServer takes in an object with two properties as an argument. The first is the typeDefs (our schemas and queries definition), and the second is resolvers.&lt;/p&gt;

&lt;p&gt;Resolvers are the code, which defines how GraphQL queries are responded to.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const resolvers = {&lt;br&gt;
  Query: {&lt;br&gt;
    countContact: () =&amp;gt; contacts.length,&lt;br&gt;
    allContacts: () =&amp;gt; contacts,&lt;br&gt;
    findContact: (root, args) =&amp;gt; contacts.find((p) =&amp;gt; p.name === args.name),&lt;br&gt;
  },&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;the resolver above responds to the query definition below &lt;/p&gt;

&lt;p&gt;&lt;code&gt;type Query {&lt;br&gt;
    countContact: Int!&lt;br&gt;
    allContacts: [Contact!]!&lt;br&gt;
    findContact(name: String!): Contact&lt;br&gt;
  }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As you can see each query has an equivalent resolver.&lt;/p&gt;

&lt;p&gt;we can now start our server by running the command&lt;br&gt;
&lt;code&gt;node index.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Our server can now listen for queries and the apollo server comes with a default explorer to try out the queries.&lt;/p&gt;

&lt;p&gt;see you in the next post.&lt;br&gt;
you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/princewhyte2"&gt;github &lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>graphql</category>
    </item>
    <item>
      <title>A practical approach to creating graphql APIs in node.js - part one (Schemas and Queries)</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Thu, 30 Jun 2022 13:33:16 +0000</pubDate>
      <link>https://forem.com/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-one-schemas-and-queries-26e4</link>
      <guid>https://forem.com/princewhyte2/a-practical-approach-to-creating-graphql-apis-in-nodejs-part-one-schemas-and-queries-26e4</guid>
      <description>&lt;p&gt;For a very long time, REST APIs have been the most popular interface for communication between the client and the server.&lt;/p&gt;

&lt;p&gt;However, in recent years, Graphql which is developed by Facebook has increasingly come into the limelight.&lt;/p&gt;

&lt;p&gt;In this post, I won't be dwelling much regarding the whys and all those theoretical stuff instead, we'll be creating a contact list API for us to get an understanding of the implementation. so here we go&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Queries and Schemas&lt;/strong&gt;&lt;br&gt;
Schemas are the base of every graphql application. They define and describe each data being transferred between the client and the server.&lt;br&gt;
here's the schema for the contact list below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type Contact {
  name: String!
  phoneNo: String
  address: String!
  id: ID! 
}

type Query {
  countContact: Int!
  allContacts: [Contact!]!
  findContact(name: String!): Contact
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above Schema defines two types. The first one being the Contact type with properties name , phoneNo and the rest.&lt;/p&gt;

&lt;p&gt;Every property is associated with a type. The name property is a String type which is one of the Scalar types in graphql.&lt;/p&gt;

&lt;p&gt;The id field is of type ID which is also a scalar type in graphql that represents a unique Identifier. For simplicity, the ID type is a unique string type.&lt;/p&gt;

&lt;p&gt;It is however important to note that all fields but phoneNo in the Contact type must be given a value.This is marked by the exclamation (!) mark on the schema.&lt;/p&gt;

&lt;p&gt;The second type defined in the schema is the Query. Every graphql schema contains a Query schema which describes the actions(queries) that can be performed.&lt;/p&gt;

&lt;p&gt;The schema defines three queries. countContact return an integer, allContacts returns an array(list) of contact object and findContact takes in a name parameter and returns a contact object.&lt;/p&gt;

&lt;p&gt;It is also important to take note of the exclamation(non-null) marks in each query. countContact will surely return an integer field, allContacts will return a list of Contact objects, and the list does not contain any null values, findContact must be given a string parameter and would return a contact object or null.&lt;/p&gt;

&lt;p&gt;So the schema describes what queries the client can send to the server, what kind of parameters the queries can have, and what kind of data the queries return.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query Samples&lt;/strong&gt;&lt;br&gt;
Assuming we have some data saved already. let's look at some queries we can run and their response.&lt;/p&gt;

&lt;p&gt;Of the queries defined in the Query schema the simplest happen to be the countContact&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query {
  countContact
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which will return something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "data": {
    "countContact": 1
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next would be the allContacts query. While the countContact query was quite simple and straight-forward the allContacts is a bit complicated. This is because it returns a list of Contact objects and in graphql we have to define which fields of the object we want to be returned. There's a huge benefit in this but I won't be going into the details.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query {
  allContacts{
    name
    address
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Note that you can add or remove any field you want to be returned from the contact object for this sample I'm only selecting the name and address fields&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;the response would look like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "data": {
    "allContacts": [
      {
        "name": "Prince Whyte",
        "address": "Portharcourt Nigeria"
      }
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last query findContact receives a name parameter and returns the details .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;query {
  findContact (name: "Prince Whyte") {
    address
    phoneNo
    id
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;_Note that you can add or remove any field you want to be returned from the contact object _&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a record is found the response would be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "data": {
    "findContact ": {
      "address": "Portharcourt Nigeria",
      "phoneNo": "018267368",
      "id": "4c431436-4650-bc57-11e9-8b80ba53d593"
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember the return value was marked as nullable, so if we search for the details of an unknown&lt;/p&gt;

&lt;p&gt;the response would be :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "data": {
    "findContact": null
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in conclusion here's something i found online concerning Graphql:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As you can see, there is a direct link between a GraphQL query and the returned JSON object. One can think that the query describes what kind of data it wants as a response. The difference to REST queries is stark. With REST, the URL and the type of the request have nothing to do with the form of the returned data.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;GraphQL query describes only the data moving between a server and the client. On the server, the data can be organized and saved any way we like.&lt;/p&gt;

&lt;p&gt;Despite its name, GraphQL does not actually have anything to do with databases. It does not care how the data is saved. The data a GraphQL API uses can be saved into a relational database, document database, or to other servers which a GraphQL server can access with for example REST.&lt;/p&gt;

&lt;p&gt;Next we'll be looking at the apollo-server&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>graphql</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What every newbie developer should know</title>
      <dc:creator>Princewhyte Dabotubo</dc:creator>
      <pubDate>Wed, 29 Jun 2022 12:16:25 +0000</pubDate>
      <link>https://forem.com/princewhyte2/what-every-newbie-developer-should-know-mic</link>
      <guid>https://forem.com/princewhyte2/what-every-newbie-developer-should-know-mic</guid>
      <description>&lt;p&gt;At some point in our career, we've had to look back at how we started and how we are progressing and then we ask that important question, what would have been beneficial to a less experienced me? &lt;/p&gt;

&lt;p&gt;And so I decided to write to other new developers. In no particular order here are a few things I think you should know:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not waste your time getting into language wars&lt;/strong&gt;:&lt;br&gt;
Yeah, you read that right, don't. Every language has something someone would have an issue with and that person is likely not going to be you. Pick one and start learning. When you get more experienced you'll decide for yourself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not every solution marked good on stack-overflow applies to your case&lt;/strong&gt;&lt;br&gt;
I know at some point you'll be told or rather intuitively you'll only be looking out for ticked answers on stack-overflow, but that's not always the case. Some answers for your situation might be somewhere unmarked. Also do not forget to read the comments, there you'll understand certain things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before copying and pasting a code ask yourself Do I understand how it's working?&lt;/strong&gt;&lt;br&gt;
Every challenge you can't solve is an opportunity for you to learn something new. Do not throw the opportunity away by just pasting the solution. At some point, you might need a similar solution or to even maintain it. Try to understand why it's working.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Any Tutorial without practice exercises is a waste of time&lt;/strong&gt;&lt;br&gt;
I'm sure you might have heard about the tutorial hell, well it's closer than you think. Before you jump into any tutorial (unless you are an experienced dev just seeking to improve knowledge) check if it has practice exercises because that's where the real learning is, and do not just stop there let your mind travel and ask yourself where can this knowledge be applied.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;College Matters&lt;/strong&gt;&lt;br&gt;
As painful as it may sound there's an advantage in the Job market and also intellectually a college graduate has over the opposite. Yeah everyone is saying college doesn't matter this and that trust me behind the scene they do the opposite. Sorry, your background doesn't fit the requirement (lol). Keep studying and Improving always no matter the challenge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That your Code works don't mean its good enough&lt;/strong&gt;&lt;br&gt;
Hmm, the painful truth. Always try to get feedback and code reviews from seniors. This act can speed up your learning process a whole lot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Software Developer Interview process is a frustrating one&lt;/strong&gt;&lt;br&gt;
Get ready to be rejected a lot for the road is very narrow. First, no one wants to hire a junior unless you are a senior that's a junior for a lesser pay you get the gist. You'll pass 3 rounds of interviews only to be told we are sorry you won't be moving on to the next round without compensation like who invented this system. The interview and the Job sometimes do not match like all you'll likely need is an ORM but they'll still test extreme SQL skills, You'll just need to write basic rest API and they'll still ask you how node.js was created.&lt;br&gt;
Be strong and be ready.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand the Framework/Language&lt;/strong&gt;&lt;br&gt;
Yeah that you can create a CRUD application with your framework or library isn't enough. Try to get an understanding of the system for as you grow into more advanced roles, you'll likely be building tools for others to also use and the knowledge acquired would go a long way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The curse of Knowledge is real&lt;/strong&gt;&lt;br&gt;
As you become better try to remember you also had a starting place. Don't get too extreme with newbies. Try to remember the tutorials and steps you took to understand a concept and share them. You already know the curse of knowledge and I must say it's so much in software development teams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You are only as good as the challenges you've faced&lt;/strong&gt;&lt;br&gt;
The simple difference between a senior and a junior is experience. There's so much you need to learn. It starts by you asking yourself what should I be building. When you encounter obstacles you'll learn something new.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start writing, documenting, blogging&lt;/strong&gt;&lt;br&gt;
Take us on a journey. Share your experience with the world. You do not have to be a good writer. You also do not always have to be right about a concept. I can boldly say I've learned a whole lot from the comment sections of an article and then I wonder what if the author didn't post in the first place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start connecting and Build your brand&lt;/strong&gt;&lt;br&gt;
Meet developers, attend events, join forums, and have interactions. At some stage, you'll get stuck and these things will open doors for you.&lt;br&gt;
LinkedIn is a great tool I hope you are using it? don't be shy to showcase yourself and your skills.&lt;/p&gt;

&lt;p&gt;And so that's it for me what would you also wish your less-experienced self knew. drop in the comment section.&lt;br&gt;
you can connect with me on &lt;a href="https://www.linkedin.com/in/princewhyte2"&gt;linkedin &lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/princewhyte2"&gt;github &lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
  </channel>
</rss>
