Author: tygas

  • Algorithm books front end interview

    • De-Coding The Technical Interview Process — This is a brand new book by Emma Bastion about technical interviews that is tailored for front-end engineers. The content is very approachable. It’s a great place to start.
    • The Impostor’s Handbook (#1 and #2) — This book helped me become familiar with a bunch of algorithms and concepts I didn’t know much about before. Not enough to nail an FEE interview, but enough to learn what I was missing.
    • The Algorithm Design Manual — A popular CS textbook, I read a few parts to better understand some algorithms in detail.
    • Cracking the Coding Interview — Ignore the code examples, but the intro chapters help cover some key technical concepts.
    • Grokking Algorithms — Covers a lot of algorithms with cute pictures. I preferred the way these algorithms were covered by the Impostor’s Handbook, but this might work better for some people.

    https://egghead.io/lessons/javascript-build-lodash-merge-from-scratch

    https://epicreact.dev/

    https://eloquentjavascript.net/code/#8

  • React design patterns

    Provider Pattern – when using react createContext and passing data

    Presentational and Container Component Pattern – components vs containers

    Compound Components – parent components sharing state with multiple child components

    export default function App() {
      return (
          <Menu defaultSelected="My account">
            <MenuItem value="Profile">Profile</MenuItem>
            <MenuItem value="My account">My account</MenuItem>
            <MenuItem value="Logout">Logout</MenuItem>
          </Menu>
      );
    }
  • 8 figures ethereum wallets

    6 wallets held a combined $102m in crypto. 

    All had at least 55% of their portfolio in Ethereum assetsAll were putting their crypto “to work” in borrowing & lending protocolsThe most common protocols we saw used were Convex, Aura Finance, and Aave2 of the wallets had at least 10% of their portfolio in Arbitrum
    Here’s a breakdown of 3 of the wallets (they had some cool names too) –
    1/ Ethereum ($25.4m in assets)
    $13.9m on Ethereum (55%)$5.7m on Avalanche (22%)$4.1m on Arbitrum (16%)$1m on BSC (4%)
    Main protocols used to get yields were Convex and Aura Finance.
    This was the most diverse wallet we saw. And ironically it had the least % allocated to Ethereum, even though the name of the wallet is Ethereum. 
    2/ EverydayWhale ($17.6m in assets)
    $17.6m on Ethereum (100%)
    This wallet had ~90% of its money in lending & liquidity pools. All of it is held in 2 protocols: Maker and Uniswap. 
    3/ PennilessWassie ($22m in assets)
    $19.3m on Ethereum (88%)$2.4m on Arbitrum (11%)$300k on Optimism (1%)
    Main protocols used to get yields were Frax, Convex, and Liquity.

  • React 2022 recordings

    Build a Headless WordPress App with Next.js and WPGraphQL 
     LINK.

    Build a knowledge base with Gatsby, Contentful and AWS.  LINK.

    How To Design A Sustainable Freelance/Contracting Career + Speedcoding Challenge’ on June 7.  LINK.

  • Call and Apply

    Call and apply is that call requires the arguments to be passed in one-by-one, and apply takes the arguments as an array.

    A for array and C for comma.”

    function longerSummary(genre, year) {
      console.log(
        `${this.title} was written by ${this.author}. It is a ${genre} novel written in ${year}.`
      )
    }
    longerSummary.call(book, 'dystopian', 1932)
    longerSummary.apply(book, ['dystopian', 1932])
    Functions vs arrow

    Arrow functions do not have their own this binding. Instead, they go up to the next level of execution.

    const whoAmI = {
      name: 'Leslie Knope',
      regularFunction: function () {
        console.log(this.name)
      },
      arrowFunction: () => {
        console.log(this.name)
      },
    }
    
    whoAmI.regularFunction() // "Leslie Knope"
    whoAmI.arrowFunction() // undefined
    
    
    https://www.taniarascia.com/this-bind-call-apply-javascript/
  • Kas gi tas aš?>

    • Kas bus kai rasite save?
      – laimės
      – krypties
      – malonumo
    • Ar aš esu aš, ar tai ką kiti sukūrė apie mane?
    • Kokį įspūdį apie santykį ir gyvenimą padarė/primetė buvusios?
    • Panaudoji reflexija suprast, kaip aš jaučiuosi vienoj ar kitoj, ypatingai naujoje ar sudėtingoje situacijoje.
      – ko aš bijau
      – ko aš nepradedu

      Laimė yra tai ką mes turime ir jaučiame, o ne tai ką bandom sunkiai ir daug ką aukodami pasiekti

      Galbūt laimė yra proto ramybė?

      Stebėkite savo neigiamas mintis ir jas užsirašyti. Analizuoti. #Kontraargumentuoti


      Psichologo fun story:
      Man tai Jūsų problemos ir vidiniai kritikai problemų nesudaro. Kuo liūdnesni ir didesni pesimistai būsit – tuo daugiau darbo turėsiu
  • Crypto valiutų deklaravimas VMI

    Stake’inimui yra 500eur lengvata.

    Jei pirkai BTC – pasikeitei i ETH vistiek sanderio pliusa turi deklaruot, nesvarbu, kad nebuvo vertimo i FIAT.

    Šachas ir matas


    Jei išlaidos didelės ( tarkim iš binance card) gali apmokęstint išlaidas, jei pliuso ir nerodai.

  • Ukraine has legalized the crypto sector – komentarai

    Crypto friendly yra labai neapibreztas terminas. Lithuania yra crypto As a result of the adoption of the Virtual Assets Law:
    – the activities of foreign and Ukrainian crypto exchanges will be legalised;
    – banks will be able to open accounts for market participants;
    – Ukrainian residents who own virtual assets will be able to make transactions with them in accordance with the law; and
    – Ukraine will guarantee judicial protection of all rights to virtual assets.

    Ukraine ir Russia esant nestabiliom valiutom ieško kuo laikyt pinigus. Be baksu ir euru BTC yra kaip viena alternatyvu. Overall po sito karo gali keistis dollerio, kaip rezervinės valiutos statusas – bet cia jau atskira tema. Per ilga savaitgali, kas nematet paziurekit sita Ray Dalio:

    Tokiems perversmams vykstant crypto turi unikalų laiką įsitvirtint savo pozicijas. Aš nesu maxi, bet kol kas fundai, korporacijos žemiau BTC nežiūri. Tradininimui ir spekuliavimui ar new gem gaudymams gerai ir low marketcap coinai. Smart contract L1 blockchainai overall technologiskai industrijai gerai, bet at the end vis tiek viskas followina BTC ir kaip store of value dažniausiai tik jis yra renkamasis.

  • Senior Front end Interview questions you may fail

    What are 3 main components of typescript?
    A large feline inhabiting Bodmin Moor.
    Object Oriented Programming with TypeScript
    Encapsulation. The implementation and state of each object are privately held inside a defined boundary, or class. Other objects do not have access to this class or the authority to make changes but are only able to call a list of public functions, or methods. This characteristic of data hiding provides greater program security and avoids unintended data corruption.

    Abstraction.

    Objects only reveal internal mechanisms that are relevant for the use of other objects, hiding any unnecessary implementation code. This concept helps developers more easily make changes and additions over time.

    Inheritance.

    Relationships and subclasses between objects can be assigned, allowing developers to reuse a common logic while still maintaining a unique hierarchy. This property of OOP forces a more thorough data analysis, reduces development time and ensures a higher level of accuracy.

    Polymorphism.

    Objects can take on more than one form depending on the context. The program will determine which meaning or usage is necessary for each execution of that object, cutting down the need to duplicate code.

    What are TypeScript Getters and Setters
    A getter method returns the value of the property’s value. A getter is also called an accessor.
    A setter method updates the property’s value. A setter is also known as a mutator.

    As you can see from the code, the setters are useful when you want to validate the data before assigning it to the properties. In addition, you can perform complex logic.

    The following shows how to create the fullname getter and setter.


    class Person {
    // ... other code
    public get fullName() {
    return `${this.firstName} ${this.lastName}`;
    }


    public set fullName(name: string) {
    let parts = name.split(' ');
    if (parts.length != 2) {
    throw new Error('Invalid name format: first last');
    }
    this.firstName = parts[0];
    this.lastName = parts[1];
    }
    }

    Principles of Functional Programming

    1. Pure functions: 
    – Given the same inputs, always returns the same output
    – Has no side-effects

    2. Immutability
    3. Referential transparency
    – Referential transparency is a fancy way of saying that if you were to replace a function call with its return value, the behaviour of the programme would be as predictable as before.
    4. Functions as first-class entities
    – This just means that functions are able to be passed as arguments to other functions, returned as values from other functions, stored in data structures and assigned to variables.
    5.Higher order functions
    – Takes one or more functions as arguments
    – Returns a function as its result

    Paterns:
    Factory patter –  deal with the problem of creating objects without having to specify the exact class of the object that will be created

    // Empty vocabulary of actual object
    public interface IPerson
    {
    string GetName();
    }

    public class Villager : IPerson
    {
    public string GetName()
    {
    return "Village Person";
    }
    }

    public class CityPerson : IPerson
    {
    public string GetName()
    {
    return "City Person";
    }
    }

    public enum PersonType
    {
    Rural,
    Urban
    }

    ///

    /// Implementation of Factory - Used to create objects.
    ///

    public class Factory
    {
    public IPerson GetPerson(PersonType type)
    {
    switch (type)
    {
    case PersonType.Rural:
    return new Villager();
    case PersonType.Urban:
    return new CityPerson();
    default:
    throw new NotSupportedException();
    }
    }
    }

  • How to build strength and muscle

    1. raumenu auginimui bent 15-20 setu per savaite, nelabai svarbu ar per pora kartu, ar per karta
    2. auginimui repsai nuo 8-30 sitam range, esme iki failure. pertrauka 2-3min
    3. karscio exposure yra gerai po jegos/mases treniruotes. Salcio exposure NERA gerai (saltas dusas nesiskaito)
    4. BENT karta i sav reikalingas HIIT, t.y. bent 180 sirdies duziu per minute. idealiai 4-8 kartai tam kartui. Jei neiseina, bent VIENA karta per trefke. Jei neiseina vieno karto vienoj trefkej per savaite, bent karta per dvi savaites. Begau ant takelio, blyn slyksti treniruote 🙂 sunku pushinti tiek
    5. salcio exposure t.y. submerge yra labai gerai rytais ir bent 4 val iki treniruotes. saltas dusas nelabai tokio rez duoda
    6. mindfull ramus kvepavimas po kiekvienos treniruotes duoda didziuliu benefitu i recovery