The Ladatto Code
Tags: beginners, javascript, codenewbie
Published: 2022-04-04 16:18:33

I've always taken great pride in building things. From Lincoln Logs and Tinkertoys to K'nex and Legos, to then countless hours of Minecraft, my life thus far has been full of creative construction. There is no greater feeling to me than to look upon a finished project and think with satisfaction, _I made that_.
 
Throughout high school and heading into my first two years of college, I thought I wanted to become an architect. After an introspective year off, I realized that while designing structures definitely interested me, it was really only half of the thrill. I wanted to _build_ as well, to see my designs come to fruition through the use of my own two hands. I needed to find a new calling, but in the meantime I took a job dealing table games at a casino. The meantime turned out to be a long time, and seven years had passed before I decided to delve into coding alongside some close friends of mine.

With code, I believe I have finally found what I've been looking for. I have the means to create anything within the scope of my imagination, using components spun from my fingertips. Learning new syntaxes is simultaneously daunting and exhilarating, but after each foray into new material I emerge with another tool to add to my repertoire. It's an incredibly rewarding and fulfilling experience, and I'm only just scratching the surface. 

Now, let's have some fun with my above ramblings:

```js
const ramble = `I've always taken great pride in building things. From Lincoln Logs and Tinkertoys to K'nex and Legos, to then countless hours of Minecraft, my life thus far has been full of creative construction. There is no greater feeling to me than to look upon a finished project and think with satisfaction, I made that. Throughout high school and heading into my first two years of college, I thought I wanted to become an architect. After an introspective year off, I realized that while designing structures definitely interested me, it was really only half of the thrill. I wanted to build as well, to see my designs come to fruition through the use of my own two hands. I needed to find a new calling, but in the meantime I took a job dealing table games at a casino. The meantime turned out to be a long time, and seven years had passed before I decided to delve into coding alongside some close friends of mine. With code, I believe I have finally found what I've been looking for. I have the means to create anything within the scope of my imagination, using components spun from my fingertips. Learning new syntaxes is simultaneously daunting and exhilarating, but after each foray into new material I emerge with another tool to add to my repertoire. It's an incredibly rewarding and fulfilling experience, and I'm only just scratching the surface.`
```
How many times did I say 'I'?

```js
const rambleArr = ramble.split(" ")

rambleArr.filter(word => word === "I").length
//12
```

Huh. That's fewer than I thought. And?

```js
rambleArr.filter(word => word === "and").length
//8
```

Longest word?

```js
rambleArr.reduce((a, b) => a.length < b.length ? b : a, "")
//'simultaneously'
```

Fun! But wait; I've now noticed that rambleArr contains words with punctuation attached to them. This really could have interfered with the methods I've been using. One quick Google search later and I've been introduced to the wonderful world of regex operators!

```js
const wordBoundaryArr = ramble.split(/\b/)
```

I've blown up my contractions, now how many times did I actually refer to myself...

```js
wordBoundaryArr.filter(word => word === "I").length
//15
```

Very cool, and an excellent example of why I love coding. I learned something new just by goofing around! Yes, I have indeed found what I've been searching for.