lynnux

Logo

☁️ customer engineer at google
🏂 snowboarder
🍞 carb addict
🏘 real estate investor
💃🏻 dancer
✈️ traveler
📖 learner
👾 ex-gamer with semi-annual relapses
☕️ fueled by caffeine


linkedin github

Journal

18 Nov 2021


Cryptozombies!

I created a smart contract that generates different looking zombies based on the name using this cryptozombies course. I decided to switch up the method of learning because following along to youtube courses was no longer doing it for me. This was pretty fun! It provided me with hands-on learning and visual feedback on what I was doing. The best part was it required me to problem solve and write Solidity on my own.

My Zombie - probably the worst zombie ever generated... is this a metaphor?


Here’s the smart contract:

pragma solidity >=0.5.0 <0.6.0;

contract ZombieFactory {

    event NewZombie(uint zombieId, string name, uint dna);

    uint dnaDigits = 16;
    uint dnaModulus = 10 ** dnaDigits;

    struct Zombie {
        string name;
        uint dna;
    }

    Zombie[] public zombies;

    function _createZombie(string _name, uint _dna) private {
        uint id = zombies.push(Zombie(_name, _dna)) - 1;
        emit NewZombie(id, _name, _dna);
    }

    function _generateRandomDna(string _str) private view returns (uint) {
        uint rand = uint(keccak256(abi.encodePacked(_str)));
        return rand % dnaModulus;
    }

    function createRandomZombie(string _name) public {
        uint randDna = _generateRandomDna(_name);
        _createZombie(_name, randDna);
    }

}

In Lesson 2, I’ll learn “how to multiply your zombie army by feeding on other lifeforms.” Interesting.


General

Cloud engineering things I’ll be working on today:

  1. Figure out how to asynchronously replicate GCP persistent volumes to different regions
  2. Test out security policies with GCP’s Blueprint Controller and Config Controller (both in preview)

I was messaged by a recruiter who was curious if I’d be interested in Chainlink Labs’ release engineer position. It had me thinking about the last time I was trying to figure out what I wanted in my career. At the time, I was happy in my current role and was still learning at a rapid clip. An ex-colleague reached out to me about a role at his company and before I knew it, I was struggling to decide between four amazing organizations. I ruminated over what made me happy, what role I wanted to play, and which company could best get me to where I wanted to be. The qualities I weighed were growth, impact, prestige, compensation, and diversity (in no particular order). These are still the qualities I strive for today; but the distribution in each of them have transformed over the last year. There really is nothing wrong with where I’m at today. In fact, if me a couple years ago knew where she would be now; she’d tell me that I’ve reached the absolute pinnacle of life and to stop wasting my time trying to make sense of the chaos.

Am I just bored? implacable? unstable? … a chronic misfit?