As usual, before starting on a new programming language, we need to set up the environment for development. Here is the list of required tools: NodeJS (https://nodejs.org/en/) Visual Studio Code (https://code.visualstudio.com/) Solidity extension (https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity) Truffle (https://www.trufflesuite.com/truffle) And now let start writing: First, we need to install Truffle, this is DApp development framework. 1 npm install -g truffle Let’s create the first application
Let solve the classic programming challenge called “Fizzbuzz”. I get the problem statement from wiki.c2.com. Problem “Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.” Then let break it down: Given X from 1 -> 100 If X multiple of 3 return Fizz If X multiple of 5 return Buzz If X multiple of 3 and 5 return FizzBuzz Otherwise return the number Above all, make sure we understand the problem correctly.
In this post, I will share how to integrate StyleLint with a Phoenix project. It’s quite useful for automation validating your CSS code and avoid some common errors. The main idea is to install the stylelint using package.json, but we don’t use it in Webpack. We use mix command instead. Let start the first step, by adding the stylelint and its related packages to devDependencies section of the package.json file: