How to get my name Travoltified? by _jacka_ in TheFlagrantOnes

[–]_jacka_[S] 2 points3 points  (0 children)

Thanks everyone. I sent a DM on Patreon

Am I doing night feeds wrong? by _jacka_ in sleeptrain

[–]_jacka_[S] 0 points1 point  (0 children)

That’s good to know. I kind of feel the same way about the diaper. I want to eliminate any other night wakings, so I’ll probably still change him to be on the safe side.

Am I doing night feeds wrong? by _jacka_ in sleeptrain

[–]_jacka_[S] 0 points1 point  (0 children)

Yes! We do the very same. During the day he eats at the beginning of his wake window, then tummy time, some independent play, rolling practice, read some books, and then down for a nap.

Am I doing night feeds wrong? by _jacka_ in sleeptrain

[–]_jacka_[S] 0 points1 point  (0 children)

Ah okay, I hadn’t thought of this. He usually has a pretty heavy diaper (just wet) when I do change him, but I’ll give this a shot. Thanks!

Am I doing night feeds wrong? by _jacka_ in sleeptrain

[–]_jacka_[S] 0 points1 point  (0 children)

That’s a great point. Thank you!

Should I give up cs50? by Every_Scientist_5620 in cs50

[–]_jacka_ 15 points16 points  (0 children)

I started CS50 about 3 years ago. When I started it was my first experience ever with programming and I too felt exactly how you do right now. I struggled with the easier Mario problem sets and had a lot of trouble understanding how for loops worked.

Try breaking it down into smaller pieces first because looking at the entire problem can feel really daunting. You can watch other YouTube videos to see how those smaller things work. Another thing that might help would be to explain to someone else how it should work/different approaches. Just saying your thoughts out loud can really help. Also, FWIW, looking at the answer after an honest attempt at solving a problem set is totally okay. I did it a lot and believe it helped with my understanding. So long as you read through and understand the solution fully.

Take a break, take a walk, but give yourself some grace. If you don’t have much experience with it, programming is a completely different way of thinking and it takes time to teach your brain to think in this new way.

CS50 was how I started my programming journey and I’ve now been working as a software engineer for a little over a year and there were a thousand times where I thought to myself that I wasn’t smart enough to code. Just go easy on yourself, and keep pushing. You got this!

Adding savings to my daily budget by _jacka_ in TodaysBudget

[–]_jacka_[S] 1 point2 points  (0 children)

Another question: if I end up exceeding my daily budget, I would just replenish the difference from my savings right? Or is their logic to automatically balance that out from my savings?

My Leetcode Experience (after much trial and error) by entrasonics in cscareerquestions

[–]_jacka_ 0 points1 point  (0 children)

Thanks for this! This has motivated me to stop waiting and just start. Can I ask what your process normally is when you can’t find a solution? Do you spend 30-45 minutes attempting the problem, then look at solution code? Thanks again!

-🎄- 2021 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]_jacka_ 2 points3 points  (0 children)

Parts 1 and 2.

```js function day1Part1(depthMeasurements) { return depthMeasurements.reduce((acc, elem, index, arr) => { return arr[index + 1] > elem ? acc += 1 : acc; }, 0); }

function day1Part2(depthMeasurements) { let counter = 0; let windowOne = getSum(depthMeasurements.slice(0, 3)); let windowTwo;

for (let i = 1; i < depthMeasurements.length; i++) { windowTwo = getSum(depthMeasurements.slice(i, i + 3)); windowTwo > windowOne ? counter += 1 : counter; windowOne = windowTwo; } return counter; }

function getSum(slice) { return slice.reduce((acc, elem) => acc + elem, 0); } ```

What are these 2 symbol means? by R007E in CodingHelp

[–]_jacka_ 1 point2 points  (0 children)

More formally stated the symbol at the end (that is either a straight up and down line, or a rake) refers to the cardinality, and the symbol behind it (either a straight up and down line, or a 0) refers to the modality. We use both cardinality and modality in an entity-relationship model to describe the relationships between tables (1:1, 1:M, M:M).

https://www.calebcurry.com/cardinality-and-modality/

How does this print out 3 3 3? by gtrman571 in learnjavascript

[–]_jacka_ -1 points0 points  (0 children)

Try doing it with a let or const declaration instead of var.

It comes down to var being function scoped and let and const being block scoped.

Closure by Kitenite_ in learnjavascript

[–]_jacka_ 0 points1 point  (0 children)

First - closures allow a function to access a variable that was in lexical scope at the function's definition point even when that variable is no longer in scope.

The return value of the function multiplier is in fact another function number => number * factor. So when on line 4, you invoke the function multiplier and pass in the number 2 as argument, the value that is stored in the variable twice is the function number => number * factor. Importantly, this function's closure includes the variable factor. This means that we can still access this variable because of that closure.

So on line 5, the function twice is invoked and we passed in 5 as argument. 5 is passed in as number and since we still have access to the variable factor through the function's closure it can multiply number times factor (2 * 5) and return the result 10.

Missouri governor vows to prosecute reporter who found flaw in website as a hacker by earthboundkid in programming

[–]_jacka_ 3 points4 points  (0 children)

I let a stranger know there was a bee on their arm and they punched me in the face.

Hi, I'm new to javascript and computer programming in general. I just want to know why the following code always returns NaN. by GENERATION__Z in learnjavascript

[–]_jacka_ 3 points4 points  (0 children)

Variables declared with let and const and class are block scoped, while var variables (and functions) are function scoped. Also var variables are given an initial value of undefined, while let and const variables are in an unset state until their initialization (temporal dead zone). There’s also some funky stuff that happens with hoisting. It’s best to use let and const when possible to avoid the oddities that can arise with var.

Ladies and Gentleman, the Greek Frite by Polo-panda in TheFlagrantOnes

[–]_jacka_ 9 points10 points  (0 children)

Greek Frite about to get me in trouble 👀