☁️ customer engineer at google
🏂 snowboarder
🍞 carb addict
🏘 real estate investor
💃🏻 dancer
✈️ traveler
📖 learner
👾 ex-gamer with semi-annual relapses
☕️ fueled by caffeine
12 Nov 2021
I spent this morning’s deep work session practicing Solidity. I’ve been following along to this freecodecamp youtube course and have created two basic smart contracts so far. I was able to connect the remix IDE with metamask by using the injected Web3 environment, deploy the smart contracts, and go through mock transactions.
int
instead of uint
(unsigned integer)public
, private
, internal
, external
)pure
and view
)contract
is like a classlocals {
people = [
{
lynn = 8
},
{
john = 5
},
]
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract SimpleStorage {
// this will get initialized to 0!
uint256 favoriteNumber;
struct People {
uint256 favoriteNumber;
string name;
}
People[] public people;
mapping(string => uint256) public nameToFavoriteNumber;
function store(uint256 _favoriteNumber) public {
favoriteNumber = _favoriteNumber;
}
function retrieve() public view returns(uint256) {
return favoriteNumber;
}
function addPerson(string memory _name, uint256 _favoriteNumber) public {
people.push(People(_favoriteNumber, _name));
nameToFavoriteNumber[_name] = _favoriteNumber;
}
}
import
and inheritance// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "./SimpleStorage.sol";
contract StorageFactory is SimpleStorage {
SimpleStorage[] public simpleStorageArray;
function createSimpleStorageContract() public {
SimpleStorage simpleStorage = new SimpleStorage(); // creating object of type SimpleStorage contract named simpleStorage and that it takes no imput parameters
simpleStorageArray.push(simpleStorage);
}
function sfStore(uint256 _simpleStorageIndex, uint256 _simpleStorageNumber) public {
// Address
// ABI
SimpleStorage(address(simpleStorageArray[_simpleStorageIndex])).store(_simpleStorageNumber);
}
function sfGet(uint256 _simpleStorageIndex) public view returns (uint256) {
return SimpleStorage(address(simpleStorageArray[_simpleStorageIndex])).retrieve();
}
}
Currently feeling … disarrayed. I don’t know what I want from my career. I simultaneously want a promotion while not wanting one. I know I love learning and want to continue moving upwards in my career but maybe I’m afraid that with a promotion, I’ll be moving away from an engineering role and moving closer to a customer facing and leadership role. While I think that’s a positive direction for most people, I don’t think it aligns well with my personality and my current passions. Or maybe it’s just my imposter syndrome telling me that I don’t deserve my current position LET ALONE a higher one! But this reminds me of a quote by Naval Ravikant:
If I always did what I was qualified to do, I’d be pushing a broom somewhere.
I’ve lived my life continuously putting myself in uncomfortable positions and pushing myself out of my comfort zone. It has served my very well up to this point but maybe there’s something to be said about being content and accepting with where and who you are now. Hmmm.. didn’t mean to be so introspective today.
I had a lot of fuck ups recently and I think I just need to power through this trough.