Showing posts with label Accountability Group. Show all posts
Showing posts with label Accountability Group. Show all posts

Sunday, June 23, 2019

Day 077: Finally Out of the Slump? Coding/Algorithm Challenges

As I eluded to in my tweet, I was still feeling some sort of way after the theft and invasion of privacy so much so that it affected me a lot more than I care to admit. It still really bothers me even now.


Like I really couldn't bring myself to do anything productive and only squeaked by with "coding" by watching (and sometimes coding along) with videos CSS, NodeJS and such. But thankfully a member from my Daily Accountability group suggested doing Codewars problems together which really helped get me out of the slump.

I really enjoyed it when I did the Lighthouse Labs 30 day challenge. But now that I am kind of having a go at it myself, I am finding the challenges on these types of sites really addicting. And I get to learn more about JS and practice to boot!

So far, I've signed up for:

I think I will stick with those 3 for now. 3 is even probably a bit much right now.

I like the Codewars set up the most, though it can get really slow at times. Edabit is a close second and is much faster. Hackerrank can be confusing at times with their instructions and set up (or maybe it's the issues with the particular set of challenges I've encountered), but so far so good. What is great about all of them is that they display other user solutions after you complete your own which also has been a great learning experience to see how more experienced folks do it. This sometimes leads me down a rabbit hole of learning about different methods and getting more exposure to them.

FreeCodeCamp Challenges

Even better was finding out that FCC had challenges in their JS Algorithms & Data Structures section. I mean, I probably peeked ahead at them when I started FCC way back when and thought to myself that it all looks like gibberish and that it will make sense to me in time... well, now's the time! I guess I want to save some of my answers that I was particularly pleased with.

Basic Algorithm Scripting: Return Largest Numbers in Arrays
Probably not the most efficient code in the world, but I was pretty happy with solving this one. It is close to the basic solution they presented.
function largestOfFour(arr) {
let answer = [];
  for (let i = 0 ; i < 4 ; i++) {
    let maxNum = arr[i][0];
    for (let j = 0 ; j < 4; j++){
      if (arr[i][j] > maxNum) {
        maxNum = arr[i][j];
      }
    }
    answer.push(maxNum);
  }
  console.log(answer);
return answer;
}


Basic Algorithm Scripting: Title Case a Sentence 
I solved a similar one to this particular challenge in Codewars (or was it Edabit?), but it was done with the basics length and iterating through the array with a for loop. I needed some practice with using map() and came up with the below. It's a bit of "code golf" (for me at least). I also got some use out of substring() as well!
function titleCase(str) {
  let arr = [];
  str.toLowerCase().split(" ").map(x => arr.push(x[0].toUpperCase() + x.substring(1)));
  return arr.join(" ");
}

titleCase("I'm a little tea pot");


Basic Algorithm Scripting: Chunky Monkey
Only because I wanted to get more practice out of a while loop, I came up with the following answer which is similar-ish to one of their advanced solutions. I also ended up using slice() and originally attempted to push it into an array assuming that it removes the items from the array, but slice doesn't work that way. After peeking at the rest of the solutions, what I wanted to use was splice() which does actually remove the elements from the array.
function chunkArrayInGroups(arr, size) {
  let answer = [];
  let add = 0;
 while (answer.length < arr.length/size) { 
     answer.push(arr.slice(0+add,size+add))
     add = add + size;
    }
  console.log(answer)
  return answer;
}


Basic Algorithm Scripting: Mutations
A tiny bit more code golfing.
function mutation(arr) {
  for (let i = 0 ; i < arr[1].length ; i++){
    if (arr[0].toLowerCase().indexOf(arr[1].toLowerCase()[i]) < 0) {
      return false;
    }
  }
  return true;
}


JavaScript Algorithms and Data Structures Projects: Telephone Number Validator
This one was a doozy. I was initially very scared of regular expressions, but after going through the RegEx section in the FCC, it's not so bad! Especially when you have a handy tool like Regex101 with you.

FCC's regex /^(1\s?)?(\(\d{3}\)|\d{3})[\s\-]?\d{3}[\s\-]?\d{4}$/ 
MY regex /^1?\-?\s?(\(\d{3}\)|\d{3})\-?\s?\d{3}\s?\-?\d{4}$/ 

I was surprised at how close I came to their basic solutions. My answers aren't a perfect match but it still works. That's what I love about programming.. there's more than one right answer!


Sunday, June 16, 2019

Day 070: In a Slump - Phone Stolen

So the day after the last post, my phone was stolen when I was at the grocery store. It was a first generation Pixel that was due to be replaced anyways so in terms of actual cost, at most I lost the $50 or so trade in value for the phone.

Originally the phone was connected to a case in which my car keys (with the keyless fob) was attached to, along with my IDs, and credit cards. I do not carry cash. Initially, with the car keys alone being gone, it could have been about $700 to reprogram and replace (which is freaking ridiculous, btw). As well as paying to replace the word ID and drivers license which would have cost $25 per ID. Cancelling the credit cards were easy enough. And $400 to replace the cell phone, which I was delaying another year since I was saving up for a vacation and the Pixel still worked just fine. There was also the worry that since my IDs had my address on it, the thieves would know where I live and had my house keys so the locks would need to be replaced.

Unfortunately, the store cameras were not facing the aisle my cart was in, so they were not able to confirm who took it. I also reported it to the police, but that didn't do much either. But I suppose the silver lining was that 2 hours later, everything else was returned with the exception of phone being ripped out of the case. I am still going to change my locks as a precaution.

Oh yeah, the feeling after realizing it was gone was one of panic and vulnerability. And the fact that I did not even know anyone's phone number to even call for help was even worse! The only number I knew was literally my own phone number! The grocery store was a 30 minute walk from home and that's what I had to do. It was not a good walk home.

The likeliest culprit was probably a pair of teens hovering around me before it was stolen since it was about 1 min between checking my phone and finding it missing. At least that is my hope because that phone connected to a whole lot of accounts: emails, work, medical, retirement and I am hoping that teenagers are less nefarious in terms of trying to break in and get my personal information. No, I am not the type of person to take compromising photos of myself or anyone (that's just stupid) so at least I don't have to worry about that. Everything was password protected and changing the login credentials would just about block everything out. I am not sure if I set it up so that the memory is wiped after multiple failed attempts of logging into the phone. I did try the Find My Device tool from Google and the phone never reconnected with the network after it was stolen. My hope is that if I did not set it so that the memory is wiped after X failed attempts, that they just did a reset and wiped everything.

There were lots of accounts I had 2 factor authentication to which essentially blocks out many of my accounts until the new phone arrived and the suspended number reactivated.

So I basically spent about 8 hours following the theft on the computer changing passwords and on the phone with various companies in regards to proving my identity to reset the 2 factor authentication. Then I spent the next few days worrying and dealing with follow up issues of not being able to access accounts (including my work accounts, since they require 2FA to access the network).

Not to mention finally getting my new phone, the Pixel 3a and then spending 3 hours in Verizon last Friday trying to get it reconnected to the network so I can get my phone number back and finally re-access some of the 2FA that required my phone number. /Sigh

The theft happened on a Saturday afternoon. That was the weekend I was feeling pretty damn good about the highs previously and was planning on doing another Personal Mini Bootcamp on Saturday and Sunday. The best possible outcome in terms of least $$ associated of having my car keys returned happened. But even a week later, I still feel like shit about it all and just thinking very poorly of humanity in general. Seriously, who the fuck does that? And there's basically nothing I can do about it either.. nothing!

I've basically been derailed since then and had been trying to make myself feel better and not worry about the what ifs. It has been a lot less productive in learning to code and I have been feeling pretty demotivated. Compare the previous week of 22 hours of very focused coding and learning to barely getting to 10 hours in. And that is only because I had to make myself watch some videos on foundational JS or CSS to at least keep it in my mind, not that I was actively coding or anything. It's been a week and I am not sure how to get myself motivated again. Ugh.

I was attempting to do another mini bootcamp at least one 8hr day of coding this weekend and not just watching videos. But I find myself procrastinating by cleaning the house or other menial chores, playing video games, or even using my family as an excuse to stay away from the computer and generally keeping my mind off things.

I know I need to give myself the permission to do what I need to do to feel better, but the fact that I am cognizant of how much the theft and invasion of privacy is affecting me makes me upset even more. /Sigh

I'll do what I have to do and hopefully my next post is back to normal.


Monday, May 20, 2019

Day 043: Accountability Group

A few weeks ago I created a "Daily Standup" group (a la Scrum) which was intended to be more like an accountability group of sorts. I invited random folks from FreeCodeCamp and Newbie Coder Warehouse (the first noob coder group I joined on FB) and got a decent amount of interest for the little group at the time.

The coding accountability group in slack. 
Currently there are 29 people (including yours truly) in the group. I do not believe anyone actually works as a developer right now as we are all currently learning the ropes and aspiring to become developers in the future. There is a variety of skill levels in various stages of learning and I appreciate the diversity.

About 10ish members are actually active and post at least a few times a week. Personally, I haven't missed a day since creating the group. I helps keep me motivated even though it was REALLY difficult to do much during work crunch time.

During those days, I will admit as much if the best thing I can do is put in 15 minutes of watching videos. It was also strangely reassuring to hear from others sheepishly admitting to taking it easy or taking a break too. That's OK by me! You don't want to get burnt out. There is a sense of camaraderie where we're are all in this together.

Some folks in the group also joined the coding challenge @ Lighthouse Labs and it has actually been great to work through the challenges together (or at the very least, checking in that each of us finished the daily challenge).

If you're thinking about starting an accountability group, I say go for it. If you don't know anyone personally who would join your group, I recommend starting an accountability group on Slack (or even Discord, Facebook, or even via email would work). Slack really is the perfect tool for this. A side benefit is simply getting used to using Slack since it is the tool of choice for many tech companies and teams. The extra bonus for me personally is learning how to manage/admin a group on Slack. It's pretty neat to see the digest emails it sends you as an admin!

Or if you don't want to start your own and would like to join the Daily Standup group feel free to email me at 4nnCanCode@gmail.com. It has a pretty low requirement of just posting to the daily checkin channel when you're working on a project or are learning something is all that you need to do to make use of it.

P.S. Today is my last crazy work day for the season! Just one more late night tonight and I am done (until the next crunch time in the winter). I put in a request to take this Friday off so I will have a 4 day weekend (with Memorial Day included, woo!). I am pumped to have a few full days of coding to look forward to soon. I have a lot of catching up to do and really want to get started on building something!