βοΈ customer engineer at google
π snowboarder
π carb addict
π real estate investor
ππ» dancer
βοΈ traveler
π learner
πΎ ex-gamer with semi-annual relapses
βοΈ fueled by caffeine
24 Nov 2021
I spent this morningβs deep work session working on the cryptozombies courses. I finished creating the app and Iβm currently on the last course which deals with creating a basic web page where users can interact with it! Here are my main takeaways so far:
uint8
= 2^8
= 256
= max valueuint8 var = 256;
var = var + 1 // 256 + 1 = 0 due to hitting max value
uint8 var = 0;
var = var - 1 // 0 - 1 = 256 due to hitting min value
pragma solidity ^0.5.6;
/// @title A simulator for trees
/// @author Larry A. Gardner
/// @notice You can use this contract for only the most basic simulation
/// @dev All function calls are currently implemented without side effects
contract Tree {
/// @author Mary A. Botanist
/// @notice Calculate tree age in years, rounded up, for live trees
/// @dev The Alexandr N. Tetearing algorithm could increase precision
/// @param rings The number of rings from dendrochronological sample
/// @return age in years, rounded up for partial years
function age(uint256 rings) external pure returns (uint256) {
return rings + 1;
}
}
I mostly worked on boring persistent volume replication documentation today. Iβm in desperate need of a change of pace at work. Thanksgiving is tomorrow! Iβm thankful for my career and my relationships. Maybe a four day weekend will be enough to reignite the flame that sizzled out. Have a great weekend!