The Future Belongs To Those Who Believe In The Beauty of Their Dreams

The Future Belongs To Those Who Believe In The Beauty Of Their Dreams

Here is a photo of the Lac de la Lande, a lake in France, in the Vosges Mountain Range 💖💖💖, that I went hiking to when I was about 15. I have mentioned it on here before.

It is a legit photo taken by my friend as I stood next to her. Can you see the dam on the end of the lake?

I stood on that dam aged 15 and felt more powerful than I had ever done in my life.

I can still feel that power that I felt standing on that dam 'til this day. 

As it is a hydroelectric dam, and I have been obsessed with electricity my whole life, this makes sense. I frequently return to that place in my mind when I need a feeling of power.
  • It takes power to balance learning to code with a Product role 
  • It takes power to believe passionately in your dreams
  • It takes power to have faith that your dreams will come true.
But, don't you know? That Eleanor Roosevelt said: "The future belongs to those who believe in the beauty of their dreams". 




And believe me when I say, that I believe that my dreams are beautiful. They are as beautiful as the sun and the rain and the wind and the moon and the earth and the stars. They are as beautiful as the trees and the grass and the lake that we see in this picture. They are as beautiful as the breath that lives inside of me. 

This precious, beautiful breath that sustains us all. And as long as I have it in me then I will believe that my dreams are beautiful - and yours - and anyone else's who dares to have dreams and believe that they are beautiful.

CodePen: Code a Rainbow

I built a new CodePen today. 

It was just straight out of my JavaScript book. I read about it on the bus this morning and then made it when I got in.

It was cool to see how it included some things I knew (functions, Math.random), and some things I'd heard of but never used (arrays, events, the document object model(?!)). 

Rock Paper Scissors: The Return

So I got massively stuck on a Rock Paper Scissors error today. 

It turns out - that if statement DID need to go inside of a function 😂 It was just the same one (and not a different one, which was what I had been stuck on). The reason that this threw an error was:

The parameter was only defined in the function. 

I tried to call an if statement outside of the function body... using a variable that only existed (at that point) within the function parameters.

So naturally, that variable was not recognised.

Mark to the Rescue: Part 2

Every time I get to work with one of the Engineers in my team, it automatically becomes the BEST DAY OF MY LIFE. Mark very very extremely kindly offered to help me out with my JavaScript error in RPS.

Of course it only took him about 2-3 minutes to fix it - he told me that the variable that was not being recognised needed to be inside of the function body, where it had been defined as a parameter. And we had a lovely and very long chat about how he would've built the RPS game himself and I learned so much from him. I don't have time to research them now but a few keywords that came up from this are:
In other thoughts: I can't believe that there are so many ways of building the same thing. 

Revising Arrow Functions

(When I originally wrote out the bullet points last night, I forgot about the arrows). 😂😂

Once again:

const funcName = () => {
    function body
};

So to break it down:
  • define the variable; I'm guessing let would work but I see const used more often (any thoughts on this anyone please?)?
  • put the function Name (i.e. like funcName)
  • put the = equals sign (or operator, if I can call it that?)
  • put the params
    • either () if there are none
    • or param or (param) if there is one 
      • parentheses are not required
    • or (paramA, paramB) if there are two
  • And then an arrow =>
    • Or a 'fat arrow' => as they are called
    • Or a 'body positive arrow' => as Artur and I like to call them
    • Can you believe that when I originally wrote this blog post I forgot about the arrows => ?
  • and then the curly braces { }
  • and the function body within those

Calling a Function Within A Function

Or, calling a function inside of another function.

I got started today on this but I have too much work so I will have to come back to this tomorrow maybe if I have time (or Friday).

You can put a function call inside of a console.log?

Well, I guess at least I know that now, I suppose?

As in you can call it inside of a console.log method. And so you can both call it - and get it printed to the console straight away at the same time.

And so it logs to the console automatically.

console.log(someFunction(paramA, paramB));

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing