Arrow Functions Are Not Always Needed

I wanted to start off my first post of 2020 with a personal concept that I have seen recently and that is although JavaScript is ever evolving and fun new ways of getting the job done get people excited. This does not mean it is the only way in my opinion and why I am writing this. As I am learning to code you come across other’s syntax, and if you are posting to the world to see why not make it read like a story. Instead you can get people who are “Arrow Funciton Happy” and can make things hard to understand.

What are Arrow Functions

“An arrow function expression is a syntactically compact alternative to a regular function expression” – taken from https://developer.mozilla.org/

I think that this states its a COMPACT ALTERNATIVE which means at times this is the way to go and others not so much. In a section below I will speak of the pros and cons of using arrow functions all the time.

Arrow Function Example
Basic Example To get the point across

Now the example above is perfect and yes that could have been a let or a const but still. In this case, it is on a single line and easy peasy to read. That is the thing for me I am getting used to using them and really like it but when reading other code it can get intense.

When to use Arrow Functions

With what is stated above it is important to know that things are created for a reason. Arrow Functions can create clean code and some codebases may even enforce you to use them at times. If a function is being applied over and over again then the use of an arrow function is going to be your way to go.

For example, if you have an array of values that you want to transform using a map, an arrow function is ideal:

const stuff = ['bike', 'bread', 'shoes'];
const downcasedStuff = stuff.map(stuff => stuff.toLowerCase());

Another place arrow functions make for cleaner and more intuitive code is in managing asynchronous code. To manage this you will need to have promises which will need to functions defined which is an ideal location for an arrow function.

These are just a few of the places where some arrow functions can come in handy. Don’t get me wrong my frustration is not being able to read them……A personal problem yes.

Cons of Too Many Arrow Functions

Not using them is going to come into play with objects and methods because if you do not have the entire thing mapped out then you will run into problems with testing and readability as well. Also if you are chaining function calls. For example, if you have anonymous functions that are repeated called finding them with no definition can turn into a nightmare.

Rant Over!

Well, the reality is that Arrow Functions are actually pretty awesome and useful it done right. My examples of when not to use them may not even be 100% on. I think that using them wisely to save time is smart, and the better I get at reading them and writing them I will be a bigger fan. All in all, as I wrote this I learned why to use them and when not to.

All Things Open 2019 Raleigh

Exciting Times and People To See

I posted a blog last year of my experience at the All Things Open event in Raleigh NC and it was amazing. You can read about that here (shameless blog post plug). Last year I was one of the first people in the door and to no shame to make sure I grabbed all the tech merch I could and STICKERS! It seems that this year is going to be even more amazing too.

Plan for 2019 All Things Open

So this year I have a goal which is to come with a plan. Last year was more of a fanboy moment where I just wanted to hop around to hear some very talented people speak. Well, honestly this year will maybe be the same in a good way.

  • Database Learning
  • Front-End Engineering
  • Gamifying
  • 101 / Introductory

You can find the schedule here

The list above is not set in stone for me but last year I literally learned so much and really felt the sense of community in tech for the Raleigh NC area. Last year the Vue.js talk from Jen Looper, David Neal on Node and other awesomeness, and watching the Start-Up Pitch that Triggermesh did was beyond worth the entire conference. I am looking for some gems like this again and know they will be there.

As a front-end developer, I am looking especially forward to Chris Coyier from CodePen.io along with so many other talented people that will be there this year. I did realize that it is not about coming out of the three days with a new way of doing something but instead insight on how to complete certain things easier or explore new areas of tech that have been on my todo list.

On that note, if someone reads this and is wondering if they should attend the answer is YES! and if you see a dude name Timm it’s going to be me don’t be shy and say hello.

A Front-End Developers Birthday

Today marked about 6 years in front-end development and somewhere in the mid 30’s as a human that walks the earth. The real reason for this post is not some reason to give myself a shout out and dive into a giant cupcake while I rage to my favorite song. Instead, it is for a reflection that I had as I woke up today. As a developer, this “Impostor Syndrome” which I first read about from David Walsh who is also a really cool human I like to keep up with, really is a thing and something I relate too.

The Journey

This is not a life story just what I accomplished this year and feel pretty awesome about it. No, I did not create an app, get a new job, or even have that much to show off. I DID though learn a lot on my own time and in a fun way about JavaScript with especially just feeling more confident in the code I write. It all started with an online learning course I snagged from Udemy that was led by Angela Yu , and if you are new to development this is normal but then you move on to your own projects. I deployed some sweet action through GitHub, became kinda superhero-like on the command line, and helped a lot of my friends with just doing stuff on the internet.

Learning Is Not Always The Same

I found that as I came into this year that instead of focusing on a specific item to learn just enhancing me a person has allowed me to 10X my brainpower. What I mean is that I have wanted to learn guitar, draw better digitally and on paper, read more books, and those items that so many people would normally put off I put in focus. The result is I was using all different parts of my mental capacity kinda like a workout.

The Result

I put a little effort into each item every day and really just a little. By my birthday this year, I can say that I have a nice drawing journal, can navigate and use both Photoshop and Illustrator much better, have a pretty big comic selection, and can play some jazzy tunes. The caveat is I also have exploded in my front-end development skills. The little effort I also put into (deploying a signup form using the MailChimp API with Heroku, found the beauty of EJS for templating, Node.js, and polished up my overall JS skills, and became a master of the command line). Where I am going with this is if I just tried to focus on learning a new framework and that was it yes a project would have been done but that is where it would stop. Instead, I have leveled up all my skills in my personal life and ready to rock this next year the same.

Personal Growth Through Online Learning

I started this blog to showcase some of my path during learning new technologies like Node.js, SEO, Web Development and also highlight some of my talents along the way. So personal growth through online learning…… I have recently reflected on this and how my path of getting a high education took me down this path to start with almost a decade ago. I get asked from time to time if it was worth it. My answer is kinda and because what it really did was teach me how to teach myself. As a web developer knowing how to google or search anything you need is a skill all alone, but you can literally learn anything with that same concept.

What Am I Learning

So when asked this I freaking love to answer with pride and no its not all code.

  1. Photoshop
  2. Adobe Illustrator
  3. Drawing comics
  4. Playing Guitar
  5. Investing
  6. Italian
  7. ….more to come

These are all hobbies for sure but the reality is they bring me joy and at almost 35 joy is important. When I learn my family learns because I cannot wait to share that info with everyone around me.

What Is The Reason?

What is the reason I am seeking personal growth through online learning? Really there is none I find that if there is time to burn at any moment making yourself a better human should be the goal. This can be from physical to mental activities. It amazes me how I can just about hold a conversation with anyone about some random topics due to this. Sometimes I think man I am never going to finish what I started and you know that’s totally okay in my opinion. I know way too many people that during the downtime it is spent grinding out a {insert streaming choice} or let’s say its work related they are so focused on that new startup no joy comes of it.

No I Am Not Special

The joy from personal growth from online learning can be contagious. I used to get so annoyed from articles about people half my age that become awesome at something because they had nothing to do all summer. Then I thought wait they are just choosing how to use the time they have and so can I. More and more studies come out that “hey life is hard and you should try to be happy as much as possible” because one day we are all gone and that time spent better of been on something pretty cool.

Be Thankful For Hard Days In Life and In Code

We have all heard the term be thankful for what you ask for, and with that said I have recently been not so happy with lack of coding challenges I have had with my daily work. What I mean is doing the same mundane thing can get boring but sometimes you want to have that challenge.

The Task

I have been wanting to re-build the basic blog layout for my work and they had some caveats. Did not want blog posts but wanted the blog like effect with timed posts, like the idea of auto posting but did not want individual posts to be indexed, and last was they did not want a pinterest style grid but instead wanted a basic three row with a hard break in between.

Now this is not how to build it but to work with what you have. I had to take the theme they built the site on and dismantle it in terms of the blog section. Removed what did not need to be there and then came the fun.

Challenges

I noticed that getting all the CSS in place was the easiest part but the PHP was my biggest challenge. First I needed the posts to repeat which normally comes in the basic theme #done, and then I wanted to have them just simply use the built-in bootstrap grid…..I know about flexbox and css grid but this was already there. I could not get the rows to repeat, so I reached out to a wonderful person who has assisted me when I get into a pinch and she directed me to this:

First off the simple comments in the code made it for me, and my take away was that I first need to practice PHP more 🙂 and also see the beauty of the counter and how it allowed me to get exactly what I was looking for. Another fun learning part of this was simply adding a class using PHP. I really never realized how easy it is. My problem was I needed to add a class to only the first post on the page:

And Boom there we go!

I walked away from this understanding how to successfully implement code to give me the 3 rows I needed and also how to add a class to PHP. Funny thing is I have been racking my brain to learn JS and all the freaking new libraries but sometimes a problem will pop out that is not even on your radar. This was not to show off my coding skills but instead to just highlight that it is important to be happy as a developer when you run into challenging things, and appreciate your network for assistance and learn from the guidance around you.

Thanks LIZ!

Learning Quest For a Front End Developer

It seems that the term “on the job experience” is so true for quality learning. For a front-end developer by not having this, the motivation can wean to easily especially if you already have a job that is not challenging new front-end technologies. I current am a “corporate developer”, and what that means in my own terms is that I manage a few sites for the company I work at keeping them up to date and add new features as needed. This is great but I can’t seem to find the time to practice some of the other areas I want to grow in. The first thought would well just rebuild the current site not using a framework, or take a page and see if you can template it out with the new CSS grid, but with the red tape working on those projects are not always able to be done.

How to keep learning

Finding a good site like Plurasight or even the infamous Freecodecamp which is not only amazing but also it is a great cause. By going through these I think it is important to use tools like Codepen.io to in some way have a playground or portfolio of some kind you can look back on.

Just going through tutorials is only going to get you so far, but not having a plan to practice with will also get you stuck quick. One new tip is, I started a document where I literally just jot down code challenges for myself that I would like to complete. I have found that this is rewarding for sure, and gives me that motivation that can lack when you are just trying to learn for fun. There are so many cool neat new ways to learn code in general like codewars and also codecombat which gamify the experience. As a developer in his mid 30’s those are great to practice but that real world scenario is just not there.

Benefits

What this does is also give you an opportunity to have new skills if you decide to change jobs or start a new direction in your career. For example, you may be a front-end dev like me and really just work in HTML, Vanilla JS, and CSS, but have a passion for Python. If so then having projects on the side that help defines those skills will give you an opportunity to grow. Once again you may have to make those projects yourself and staying motivated could come from just being a little more intelligent than you were the day before.

Essentially this was a rant for me to continuing to attempt to grow. I have the goal of one day having the opportunity to do more software engineering using languages such as Python or even Java. With that said keeping up with newer JS tech (VUE, React, Angular) has seemed to be just as challenging. If anyone does read this and shares the same struggle, I guess it’s safe to say keep charging forward and sometimes write about it.

 

Welcome to TaterDev Land

My name is Timm and well they have called me tater for a long time now, but not like that guy who talks about tater salad. I just simply took a childhood name and rolled with it, so hello from tater timm.

You may or may not have fun reading my material which is fine, but there is a good chance I will make you laugh, learn a little, and enjoy my ramblings.