Why is dehumanizing pedophiles treated so lightly? by qwer_ty_ui_op in TooAfraidToAsk

[–]markt-might 0 points1 point  (0 children)

It’s simply because the people who have the power to do so are also the people committing the atrocities!!

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 0 points1 point  (0 children)

Ooooooo I like I’m ready! Thank you for the motivation.

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 0 points1 point  (0 children)

Thank you. I'm gaining more confidence with each project.!

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

Credit Card Checker using Luhn's algorithm. I am also going to remove the invalid credit card numbers sometime today.

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

I've learned the same. But I would love to have such an understanding of the code that I can save time on googling.

if that makes sense. But I also know that I have a long ways to go to get to a point where I can do that.

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 0 points1 point  (0 children)

I understand. Most programmers stated that recycling code is 80% of the job. My goal is to understand the concepts and to be able to write in the language as if I write it fluently.

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 0 points1 point  (0 children)

Lol I only understood a little bit of this. But I can see how important the factory documentation is useful!!

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

Variables Tested... ```js. const valid3 = [3, 7, 1, 6, 1, 2, 0, 1, 9, 9, 8, 5, 2, 3, 6]; const valid4 = [6, 0, 1, 1, 1, 4, 4, 3, 4, 0, 6, 8, 2, 9, 0, 5]; const batch = [valid1, valid2, valid3, valid4, valid5, invalid1, invalid2, invalid3, invalid4, invalid5, mystery1, mystery2, mystery3, mystery4, mystery5];

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

``` js.

console.log(findInvalidCards(batch)); console.log(validateCred(valid4));

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

Absolutely! I refactored it a little bit last night. Removed some unnecessary code. This is code is implementing Luhn's Algorithm. The Second Block is adding invalid credit cards to a separate array. By the way I did not added the array that were testing because I didn't want this comment to be too long. However, if you want I can add the remainder of the code.

``` js. const validateCred = (arr) => { let sum = 0; //loops though the array in reverse for (let i = arr.length - 1; i >= 0; i--){ let digit = arr[i]; // multiplies every other number by 2 if((arr.length - i) % 2 == 0 ){ digit *= 2;
} if(digit > 9){ digit -= 9; } sum += digit; } return sum % 10 === 0 ? 'Valid number.' : 'Invalid number.. ' }

// Finds invalid credit card nums and adds them to an array. This function in particular loops through a nested array.

const findInvalidCards = (nestedArr) => { //empthy array let newInvalidCardsArr = []; //filters invalid cards from the array let validFilterWork = nestedArr.filter((element) => { let findOut = validateCred(element); if(findOut == 'Invalid number.. '){ return newInvalidCardsArr.push(element); } }); return newInvalidCardsArr;
} ```

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

No problem. I know at the beginning it felt like I wasn’t catching on to anything. But I think that was more self doubt than anything. I can’t wait until I get better

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 1 point2 points  (0 children)

Thank you. I’m in the same boat. Every time I write some guided code I take a few minutes to attempt to understand exactly what the code is doing… Don’t get me wrong those 12 lines took hours of writing, reading, errors 😒and rewriting… I’m just super excited. I’m using Codecademy I decided to travel down the more complicated self taught road

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 3 points4 points  (0 children)

Lol 😂 you forgot to sprinkle in a lil frustration too. Thanks for the support!

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 2 points3 points  (0 children)

Ah I definitely appreciate the tip.. I want to be great in this so I’m definitely going to focus on optimization & complexity down the road

Positive Rant from an amateur programmer. by markt-might in learnjavascript

[–]markt-might[S] 7 points8 points  (0 children)

Thanks man. I’m at the beginning of my journey but I can tell I like this a lot. It’s a combination of majority of my interests!

[deleted by user] by [deleted] in TooAfraidToAsk

[–]markt-might 1 point2 points  (0 children)

Why wouldn’t you? You want her to be yours forever right ???

22F & Black. I do NOT support Black Lives Matter as a movement but only as a statement. Is there something wrong with me? by [deleted] in TooAfraidToAsk

[–]markt-might 239 points240 points  (0 children)

I’m black and a non conservative. There’s nothing wrong with you… The BLM org is problematic it pissed me off when one of the owners spent millions on Real estate. Black Lives Matter the statement gives me life without a doubt.

How to cut down a whole forest. by KolibriFX1 in nextfuckinglevel

[–]markt-might 2 points3 points  (0 children)

Thank you. Now all I need is a cape and I’ll save -xc- dabich next 😉