These are chat archives for FreeCodeCamp/HelpJavaScript

21st
Jan 2019
tundeiness
@tundeiness
Jan 21 09:19
Hi guys I need a recommendation on where I can store sounds online and i can access them via a url for the sound?
Nate Mallison
@NJM8
Jan 21 10:36
@tundeiness I use https://cloud.google.com/storage/ for static images on some of my websites. Would probably work well for sounds as well.
tundeiness
@tundeiness
Jan 21 10:47
@NJM8 Thanks!!
Yashwardhan Pauranik
@yashwp
Jan 21 11:15

how can I write

const ModalPicker = require('nativescript-modal-datetimepicker').ModalDatetimepicker;

in ES6 syntax? import ...

Blauelf
@Blauelf
Jan 21 14:26
Nativescript? Consider that one: NativeScript/android-runtime#1135
At least a few months ago, they were not supporting ES6 on Android :(
Jason Luboff
@JLuboff
Jan 21 16:04
morning :wave:
Tom
@moT01
Jan 21 16:05
:penguin:
Jason Luboff
@JLuboff
Jan 21 16:07
Yes..indeed...a penquin
Tom
@moT01
Jan 21 16:07
yup
there it is
its head anyway
Jason Luboff
@JLuboff
Jan 21 16:08
....did you cut it off its body?
Tom
@moT01
Jan 21 16:09
no
it was like that when I found it
Jason Luboff
@JLuboff
Jan 21 16:09
Likely story
Tom
@moT01
Jan 21 16:09
I swear
Jason Luboff
@JLuboff
Jan 21 16:10
They always do..
Blauelf
@Blauelf
Jan 21 16:26
How to prepare a kiwi
Jason Luboff
@JLuboff
Jan 21 16:27
You know...some people eat kiwis with the hair
Blauelf
@Blauelf
Jan 21 16:27
(yeah, that's about as old as the internet)
Christopher McCormack
@cmccormack
Jan 21 17:00
morning
Jason Luboff
@JLuboff
Jan 21 17:32
@cmccormack Yo
Christopher McCormack
@cmccormack
Jan 21 17:33
@JLuboff what it is?
Have a good weekend?
Jason Luboff
@JLuboff
Jan 21 17:41
It was alright, went to Ikea to get some furniture ideas...yourself?
Christopher McCormack
@cmccormack
Jan 21 17:42
@JLuboff Cleaned on Saturday, tried to do some coding at the coffee shop on Sunday but still not quite ready to jump in I guess :)
Jason Luboff
@JLuboff
Jan 21 17:42
Oh I did some cleaning too... well...decluttering
Christopher McCormack
@cmccormack
Jan 21 17:43
Konmari'd you're place?
Jason Luboff
@JLuboff
Jan 21 17:43
Looking like we'll be moving next month so...trying to get rid of crap
Christopher McCormack
@cmccormack
Jan 21 17:43
isn't that short notice?
Jason Luboff
@JLuboff
Jan 21 17:43
typed faster than my brain was working
Our lease is up March 2
So would start moving the last week of Feb
Christopher McCormack
@cmccormack
Jan 21 17:50
going to get a house?
Jason Luboff
@JLuboff
Jan 21 17:51
no :( still going to be renting but it'll be a brand new apartment that'll be cheaper than our current one unless magically they want to renew us at a lower rate which is extremely doubtful
Nate Mallison
@NJM8
Jan 21 18:01
:wave:
How's it going fellas
Jason Luboff
@JLuboff
Jan 21 18:01
Its going..yourself?
enestatli
@enestatli
Jan 21 18:04
hello, anyone here using Google Voice?
Jason Luboff
@JLuboff
Jan 21 18:05
I do not
Nate Mallison
@NJM8
Jan 21 18:05
Good. Just tip tapping away. Waiting for the feeling in my fingers to come back. We got all the snow.
enestatli
@enestatli
Jan 21 18:07
I guess this thing only works USA only :(
Jason Luboff
@JLuboff
Jan 21 18:10
@NJM8 What is.. "snow"?
Christopher McCormack
@cmccormack
Jan 21 18:10
@JLuboff well that's cool man hope it's a nice place with great internet
It's snowing here right now too :/
Jason Luboff
@JLuboff
Jan 21 18:11
@cmccormack Ya its really nice... internet will bethe same as what I currently have (100/10)
Jason Luboff
@JLuboff
Jan 21 18:20
Huh...who knew
Jason Luboff
@JLuboff
Jan 21 18:28
Whats everyone working on today?
Nate Mallison
@NJM8
Jan 21 18:35
Kanban board for Subjects. Working on the subjects card specifically.
You?
Jason Luboff
@JLuboff
Jan 21 18:35
Work project.. fucking around with a modal
Nate Mallison
@NJM8
Jan 21 18:41
Ah yes. The old modal. What a PITA
Jason Luboff
@JLuboff
Jan 21 18:41
Nah..the modal isn't any problem...its whats inside the modal lol
Brad
@bradtaniguchi
Jan 21 18:58
Just helped out a co-worker debug a bug. (chrome debugger = beast)
Jason Luboff
@JLuboff
Jan 21 18:59
I bet you showed him!
Brad
@bradtaniguchi
Jan 21 18:59
Didn't get to the root cause tho, but isolated it down to some date issue (not suprising)
Nate Mallison
@NJM8
Jan 21 19:01
I prefer 10-120 console.logs myself. lol
Brad
@bradtaniguchi
Jan 21 19:01
But yea, my co-worker has been looking into it since late last night since the client found a funky critical bug
@NJM8 Me too, until you need to debug something in production heeh
Nate Mallison
@NJM8
Jan 21 19:02
That's why we have a script to copy the production data into my dev env
Probably not scaleable though.
Brad
@bradtaniguchi
Jan 21 19:14
I mentioned it was a date issue right? So the guy working on it tested it yesterday, but the bug was reported from a guy in China (who is in the "future") so testing today showed the "bug"
But we only figured out it was "date" related after a bunch of debugging calls to see WTF is going on
plus neither of us saw the code before
So had to get familiar
Jason Luboff
@JLuboff
Jan 21 19:15
Written before your time?
Brad
@bradtaniguchi
Jan 21 19:15
Just another dev did it, I asked him something basic, how does the find function from lodash work, cuse you used it, and he said he doesn't know...
Jason Luboff
@JLuboff
Jan 21 19:16
Thats a good sign
Brad
@bradtaniguchi
Jan 21 19:17
Yea I was like, uhhh yea
Wouldn't of mattered tho (again cuse it was a wack date bug)
Jason Luboff
@JLuboff
Jan 21 19:22
Ugh... I hate having to change my data structure becuase a requestor changes their mind about something
Brad
@bradtaniguchi
Jan 21 19:23
how bad of a change are we talking about?
Jason Luboff
@JLuboff
Jan 21 19:24
Eh...not horrible...I just need to add another object inside an object but I have to remind myself how all my prior logic is working lol
Brad
@bradtaniguchi
Jan 21 19:25
Ah yea.... testing can helped to :P
Jason Luboff
@JLuboff
Jan 21 19:27
I'm not even positive how I would setup testing. The logic manipulates the object/array (depending on whats going on) and then sets state
Jason Luboff
@JLuboff
Jan 21 19:32
Gah...I need to refactor the shit out of this logic too.. @bradtaniguchi you would hate it.. Got me some nested if/elses
Brad
@bradtaniguchi
Jan 21 19:32
I feel like tested code is better than non-tested code than "elegant" code without tests
if that makes any sense haha
But yea sounds like the perfect time for some unit-testing on some utility functions :D
Jason Luboff
@JLuboff
Jan 21 19:33
Ya I get it. I'll have to lookup how to test it
Brad
@bradtaniguchi
Jan 21 19:35
I can always help ya out if you got any questions, got all that unit-testing experience :P (non-unit-tests idk haha)
Jason Luboff
@JLuboff
Jan 21 19:36
I appreciate it. I'm thinking the best way to handle this...is to move all the logic out..and then whatever I return from it..will then be used to set state!
Then I can setup tests for it as well
Brad
@bradtaniguchi
Jan 21 19:40
This is for redux stuff right? (those are super easy to test, which is a main reason to use it)
Jason Luboff
@JLuboff
Jan 21 19:41
No redux, only react
Brad
@bradtaniguchi
Jan 21 19:42
Ah I see, darn
Jason Luboff
@JLuboff
Jan 21 19:43
From what minimal I know of redux...I probably do want to use it...but..trying to get through a better understanding of React first
Kaz Baig
@kbaig
Jan 21 19:44
@JLuboff I'm not sure it's needed anymore
post hooks especially
Nate Mallison
@NJM8
Jan 21 19:44
React? Definitely not needed anymore. Hahahaha
Jason Luboff
@JLuboff
Jan 21 19:44
Well... i'll have to learn hooks then!
Kaz Baig
@kbaig
Jan 21 19:45
def look into hooks
I'm counting down the days
Jason Luboff
@JLuboff
Jan 21 19:47
How many days then?
Kaz Baig
@kbaig
Jan 21 19:47
There's no exact release date but it's Q1
Jason Luboff
@JLuboff
Jan 21 19:48
Hmmmm
Brad
@bradtaniguchi
Jan 21 19:51
How does the hooks API make redux not necessary exactly? Does it just "wrap" up the main state or something?
Christopher McCormack
@cmccormack
Jan 21 20:03
you can make use functions that contain all your state if you wanted, although I think Context is still useful. Has reducers as well
Redux could still be useful for portability
It's long but I recommend watching
Kaz Baig
@kbaig
Jan 21 20:08
I've seen the 90% cleaner talk like 4 times already
so good
Christopher McCormack
@cmccormack
Jan 21 20:09
yeah it is
Jason Luboff
@JLuboff
Jan 21 20:09
Hour and a half? Damn.. but.. I'll do it! I'll watch
Christopher McCormack
@cmccormack
Jan 21 20:09
three different presenters going over different subjects
all relevant
Riadh
@KWFE
Jan 21 20:10
hi, guys who is ready to explain something to me?*
Jason Luboff
@JLuboff
Jan 21 20:11
Maybe we all are...maybe none of us...
Depends on the question :)
who would explain this example to me plz
Kaz Baig
@kbaig
Jan 21 20:12
it's so common to get tripped up on this problem damn
Christopher McCormack
@cmccormack
Jan 21 20:13
it was an end of section gate I believe
@KWFE what do you have so far?
Riadh
@KWFE
Jan 21 20:15
yes i am trying to complete what i'v done last year i think i was good but i don't remember anything lol
Christopher McCormack
@cmccormack
Jan 21 20:16
Might be good to break down the challenge and determine what you need to review/implement to make it work
Brad
@bradtaniguchi
Jan 21 20:19
I hardly remember what I've been doing yesterday haha
Christopher McCormack
@cmccormack
Jan 21 20:21
yeah if it's been a while and I don't remember the content I just do it again, I've done CSS a couple times now
Riadh
@KWFE
Jan 21 20:27
i tried to take a look on my previous
solutions
Brad
@bradtaniguchi
Jan 21 20:37
Id just re-do all of it. If you don't remember how to solve it, then you should do it again. Practice practice practice
Riadh
@KWFE
Jan 21 20:38
okay i'll reset everything
Christopher McCormack
@cmccormack
Jan 21 20:42
@KWFE while you're going through them, open a codepen or repl and play with some of it yourself, see what happens when you try different methods or whatever. Really helps to solidify understanding
Brad
@bradtaniguchi
Jan 21 20:48
Solving the challenges gets you further in FCC, but understanding the challenges and answers is the actual value. Even getting the certs don't mean anything if you didn't "learn" anything
Riadh
@KWFE
Jan 21 21:06
@cmccormack you mean errors and stuff like that, FCC integrated a new terminal i guess it shows everything while you are typing. @bradtaniguchi you're totally right most of time i look to pass the test but the major thing is i don't understand just try to solve
Christopher McCormack
@cmccormack
Jan 21 21:21
@KWFE no I mean write your own code somewhere outside FCC, play with it and see what you get when you do different things
Jason Luboff
@JLuboff
Jan 21 21:23
@bradtaniguchi Testing question. I have a function currently. I'm going to be modifying it to account for an additional usage case. I do not have tests for it currently. I would guess that I want to create the tests first before making changes right?
Riadh
@KWFE
Jan 21 21:36
@cmccormack aha got you sir thanks
Riadh
@KWFE
Jan 21 22:08
people here are busy i guess
Jason Luboff
@JLuboff
Jan 21 22:09
Always busy
Brad
@bradtaniguchi
Jan 21 22:12
I was busy stuffing my face with food :P
@JLuboff Yes, test out the existing functionality to verify it works (even if you tested it manually in the past)
Then write a test to test the new functionality (it will fail), then go out and write the code for the new functionality until the test(s) pass. This is TDD
@KWFE Yea, passing the test is 1 thing, and technically the only thing FCC cares about (its the only thing it can do), but its probably the least useful thing
Its more important to understand the solution/problem and code, and its also important to go back and refactor the code with better solutions over time (if possible)
This is why places like codewars is kinda better in learning, as they provide solutions to problems that are "up-voted". Its a great place to learn techniques, but not so much as a pathway to learning full stack (its just random challenges)
Jason Luboff
@JLuboff
Jan 21 22:16
@bradtaniguchi :thumbsup:
Rizwan Syed
@RizwanSyed357
Jan 21 22:22
hi guys, just in case anyone else is finding the above exchange a bit confusing, I do too :-D
Jason Luboff
@JLuboff
Jan 21 22:26
Its confusing now...but eventually it won't be ;)
Brad
@bradtaniguchi
Jan 21 22:27
Its good to be confused, means there's something new to learn :D
Jason Luboff
@JLuboff
Jan 21 22:32
I have to learn things daily..hehe
Brad
@bradtaniguchi
Jan 21 22:33
I try to learn things daily, even if its minor :)
Like I learned today that they don't turn on the airconditioning on MLK day here... so the office is a sauna
Christopher McCormack
@cmccormack
Jan 21 22:36
The wife and I had a long conversation about TDD and it basically ended with - "you have to try it to see the benefits"
Jason Luboff
@JLuboff
Jan 21 22:37
Who argued for it, who argued against it?
Christopher McCormack
@cmccormack
Jan 21 22:39
She hadn't used it but couldn't quite fit it in to her currently code flow in her head
Although I am in complete agreement with Dan Abramov about testing too soon https://twitter.com/dan_abramov/status/1086418722124906497
I've had very little motivation to make my current personal project because I like to play and writing tests first feels more like work
Jason Luboff
@JLuboff
Jan 21 22:40
I get where he is coming from...I have a hard time conceptualizing TDD, except in this case where I'm expanding a function and I know what I end the end value to be
Brad
@bradtaniguchi
Jan 21 22:42
I agree, you shouldn't be written tests if you don't know how your going to solve the problem first haha
But I do believe part of the initial "figuring out how to do this" should also think about "how will I test this later"
Christopher McCormack
@cmccormack
Jan 21 22:57
I feel like user stories go a long way into making TDD work, rearrange the stories into actual implementations you can test against, then write the tests first. has that been your experience?
Brad
@bradtaniguchi
Jan 21 22:57
I have no experience with the user-stories approach :/
Jason Luboff
@JLuboff
Jan 21 23:02
I would love for requestors to give me user stories...and I've tried to get them to do so..but.. they dont get it hehe
Brad
@bradtaniguchi
Jan 21 23:04
I kinda don't get it haha, I think I get the general idea but I have no idea how it works in practice.
Christopher McCormack
@cmccormack
Jan 21 23:05
I took an Agile class, they're pretty useful when used properly
Jason Luboff
@JLuboff
Jan 21 23:05
I took an IT project management class which touched on Agile approach to things
Christopher McCormack
@cmccormack
Jan 21 23:05
break the user stories into tasks, use those tasks to determine time required etc..
Jason Luboff
@JLuboff
Jan 21 23:21
Hmmm...think I just found some unneeded logic
Brad
@bradtaniguchi
Jan 21 23:27
Sigh Helped someone upgrade his Angular project, and they said "its too hard" Figured out there litterally was nothing wrong, and the "error" messages were actually telling them what todo :/
Jason Luboff
@JLuboff
Jan 21 23:28
lol
If you cant help yourself...you cant be helped by others
Brad
@bradtaniguchi
Jan 21 23:29
Like dude, the tool provided by the angular team is beast+ there is a migration site with step by step info, a built-in migration utility, and another migration utility. All of which tells you exactly what todo -_-
Oh well, at least it wasn't like their stuff was exploding XD
Jason Luboff
@JLuboff
Jan 21 23:32
I'm guessing this was some internet random?
Brad
@bradtaniguchi
Jan 21 23:33
Some one in the Angular room asking for a "reliable" guide so pretty much yea
Jason Luboff
@JLuboff
Jan 21 23:34
Ah
Brad
@bradtaniguchi
Jan 21 23:36
If there's one thing that is really good about angular, is the toolling is top notch. And that stuff isn't even the main-line stuff (google uses a custom compiler instead of webpack)
Jason Luboff
@JLuboff
Jan 21 23:38
I'll take your word for it\