May 2, 2024
Breaking News

How to code a weather app in React – IT PRO

npressfetimg-4795.png

Interviews are hard, and the technical interviewing process is famously unforgiving. While the specific process for technical interviews often varies, take-home assessments have become a solid staple of the early engagement between developers and employers. Software engineer and author Emma Bostian sums up the core problem with take-home projects excellently in her latest title, Decoding The Technical Interview Process stating that “while the intent behind coding projects may be innocent, they may put some candidates in a disadvantaged position”. Bostian attributes the issue to many candidates having families to care for and various commitments making their time a precious commodity. 

On the whole, take-home assessments fall into two main categories – short-form problem-solving assessments and small build projects. The former, usually issued through a platform or portal like LeetCode, Hacker Rank, or Coderbyte, will typically involve a series of bite-sized challenges revolving around building functions or algorithms to solve a series of straightforward logic-based challenges. The latter, however, is typically the most universally dreaded stage of the whole process. 

Your standard take-home build assessment will likely include the following rules:

  • Use a language that the role requires proficiency in 
  • Harness some form of external service or API in your finished build
  • Make at least one choice as to which libraries and frameworks your app employs

In order to put these conventions into action, we’ll take a look at the following real-world example challenge. We’ll be taking a step-by-step view of how to tackle the build in its entirety, along with highlighting some of the key considerations to keep in mind next time you’re faced with your own engineering bake-off scenario.  

The Challenge:

Create a simple weather app using Javascript/HTML/CSS that shows the current weather conditions in London, UK. Please use the API at Open Weather Map. Please use your choice Angular.js or React.

The Solution

The first thing we’ll need to decide is our framework of choice. This section of the challenge isn’t designed to catch you out but rather give you the opportunity to demonstrate your understanding of the wider web development ecosystem. Beyond providing an opportunity for you to make the case for your preferred choice, the decision will influence how you approach the project. 

AngularJS is structured on the MVC (Model View Controller) pattern, used in Java, C and C++. React, however, is based on the Virtual DOM (Document Object Model). There’s no wrong answer here, but going with the latter gives you …….

Source: https://www.itpro.co.uk/development/software-development/360077/how-to-code-a-weather-app-in-react