Code Monkey home page Code Monkey logo

maciejkuran / unitconverted Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 184 KB

UnitConverted is a unit converter where you can easily convert all common types of units: length, temperature, area, volume, weight, time and speed. It is a super helpful tool if you expect to have some units converted fast.

Home Page: https://unitconverted.netlify.app/

License: Other

HTML 45.68% JavaScript 48.24% CSS 3.43% SCSS 2.65%
html5 sass css converter javascript unitconverter vanilla-javascript unit-conversion unit-converter web-application

unitconverted's Introduction

UnitConverted

UnitConverted.com is a free unit converter where you can easily convert all common types of units: length, temperature, area, volume, weight, time, and speed. It is a super helpful tool if you expect to have some units converted fast. In addition, you can read the definitions of each unit with direct reference to scientific sources.

Live app โžก๏ธ https://unitconverted.netlify.app/

Case Study

The goal of this project was to design and build an application. I chose to develop a Unit Converter from scratch. I wanted to challenge myself and try to build a scalable application, a size, and complexity which would be difficult for any novice programmer.

I did my best and worked diligently to accomplish this project. I am aware that this app could have been done better however, this is my first project ever done completely by myself - being a total JS beginner ๐Ÿ˜‰ My goal in developing this app was to challenge myself, design a modern interface, and develop it from scratch. All suggestions are welcome.

Project Timeline

I was excited to develop my first web application after just 1 month of learning JavaScript - actually my first programming language. The entire application development process went successfully as intended. However, this was a constant work, around 8 hours/day, 6 days/week.

Programming problems to solve

  • program the category search filter
  • write functions that will convert a user input value and return converted value when the "convert" button is clicked
  • program select options so a user can change units easily in the app's interface
  • access DOM elements to display dynamically a calculation result and formula of calculation on the screen

General designing concepts

  • dark color scheme
  • modern and clean UI
  • easy to navigate interface
  • design that is memorable and stands out from competing applications

Problems I encountered during the development process

Honestly, I didn't encounter many problems while coding. To a surprise, with a little bit of analyzing I was actually able to match javascript concepts very fast to solve any problems. However, I got stuck for a while styling website ...

SCSS and nested classes
What I love about SCSS are nested classes. I just find it comfortable to create some sort of "class trees". I say it's comfortable because anytime I am back to a specific class to add some extra styling, someway I can easily locate this class, without using the built VS Code 'search' tool. Certainly, there are other advantages of nesting classes such as clean code and not having to repeat code. For example, if div with a class of 'flex' is inside a div with a class of 'wrapper', and there's a <p> tag inside that div 'flex', you may write it that way.

.wrapper {

            .flex {

            p { }

            }

            }

            //instead of

            .wrapper {}

            .flex p {}

            .flex {}

However, nested classes can be tricky especially when you want to override some styles. That's what I experienced.

I tried to override some styles, especially doing media queries, and even though I added styles to a certain HTML element with a class of 'x', the styles were not overridden.

Well, it's all because I ignored initially declared nested classes. What I mean, based on the random example given above is if you declared initially div with a class of 'flex' to be nested inside the 'wrapper', the compiled result of this nesting in the style.css sheet will be:

.wrapper .flex {}

 .wrapper .flex p {}

So in fact if you want to override any styles doing for example media queries, you should use previously declared nested classes - otherwise it's not going to work.

Overall feelings

I am happy that I was able to write my first application. It is not something innovative, but it is mine, from A to Z designed and coded by me.

I am aware that this could be coded way better so I hope to come back to this project one day and refactor this long code.

unitconverted's People

Contributors

maciejkuran avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.