These are chat archives for FreeCodeCamp/HelpJavaScript

16th
Nov 2018
Jason Luboff
@JLuboff
Nov 16 2018 00:10
@coderkarma Reread the instructions, you're missing a part of it
Karma Drukpa
@coderkarma
Nov 16 2018 00:26
question to React pros
ReactDOM.render(
  "MyComponent ",
   document.getElementById('challenge-node')
);
while doing ReactDOM. render how come that test is passing even doing "MyCoponent" and <MyComponent />
Simon Cordova
@gbsimon87
Nov 16 2018 00:36
That may be the testing function being used in the challenge
Brad
@bradtaniguchi
Nov 16 2018 00:46
Finally was able to get the project to compile after all those merge conflicts, and adding 2 missing features/routes
Now gotta test the functionality to see if anything broke.... I'm pretty sure something has to be broken
Jason Luboff
@JLuboff
Nov 16 2018 00:48
I'm sure its all broke
I just finished committing all my changes to my branch.. still got a bit of work to do on it
Simon Cordova
@gbsimon87
Nov 16 2018 00:55
I've literally all day done nothing but refactoring
Brad
@bradtaniguchi
Nov 16 2018 00:56
@gbsimon87 This entire project is a refactor :{ but hot damn this code is nice now :sunny:
Simon Cordova
@gbsimon87
Nov 16 2018 00:56
I am about to push this to a new branch that's supposed to replace our main 'dev' branch atm -
I already know I'm getting 10 phone calls tomorrow from backend guys or project manager
I love what I'm doing with my code today as well, everything in its own world, changed folder structure everything
Still not 50% done with all I wanted to do
Jason Luboff
@JLuboff
Nov 16 2018 00:57
@gbsimon87 Thats the nice thing for me... I am the frontend, backend, and database guy! No one to yell at me :)
Brad
@bradtaniguchi
Nov 16 2018 00:57
I became the front-end, backend guy. Have to deal with stupid database decisions. But now I feel bad being the guy yelling at people :(
Jason Luboff
@JLuboff
Nov 16 2018 00:58
Be a one man team, then no problem
Brad
@bradtaniguchi
Nov 16 2018 00:59
I don't wanna be 1 man team :(
Jason Luboff
@JLuboff
Nov 16 2018 00:59
Fair enough
I'm out. See ya
Brad
@bradtaniguchi
Nov 16 2018 01:00
@JLuboff C ya
Simon Cordova
@gbsimon87
Nov 16 2018 01:02
night night
Pagnito
@Pagnito
Nov 16 2018 03:14
wow node under the hood is some awesome stuff
its actually not single threaded like ppl say
Aditya
@ezioda004
Nov 16 2018 03:16
Neither is browser..but event loop is single threaded
Adel
@AdelMahjoub
Nov 16 2018 06:25
Single thread that uses multiple thread to execute async code
the event loop is single threaded, forking process is another story
https://github.com/libuv/libuv is responsible for nodejs async code
Adel
@AdelMahjoub
Nov 16 2018 06:34
nodejs => event loop => libuv => OS (OS can uses multiple thread to execute) , but the event loop is single threaded
Aditya
@ezioda004
Nov 16 2018 06:40
Yup, OS handles I/O, network and then adds the callback back to the queue where event loop picks it up again to push it to stack frame to execute.
Simon Cordova
@gbsimon87
Nov 16 2018 15:36
knock knock
Christopher McCormack
@cmccormack
Nov 16 2018 15:39
@gbsimon87 who
Simon Cordova
@gbsimon87
Nov 16 2018 15:45
recursion
@cmccormack
Christopher McCormack
@cmccormack
Nov 16 2018 15:45
get that guy out of here!
Simon Cordova
@gbsimon87
Nov 16 2018 15:47
lolololol
I just learned that joke it's so good
Just said it on my team meeting I think I raised my nerd status up a level
Simon Cordova
@gbsimon87
Nov 16 2018 15:54
For those who don't know it...
Knock knock
Whos there?
Recursion
Recursion who?
Knock knock
Tom
@moT01
Nov 16 2018 15:55
whos there
Simon Cordova
@gbsimon87
Nov 16 2018 15:56
recursion
lolol
Tom
@moT01
Nov 16 2018 15:57
your recursion is missing an exit
now we're stuck in an infinite loop
Christopher McCormack
@cmccormack
Nov 16 2018 15:58
@gbsimon87 haha sorry I ruined the joke had my head in some config stuff
Tom
@moT01
Nov 16 2018 15:59
gonna have to force quit the conversation
Christopher McCormack
@cmccormack
Nov 16 2018 15:59
if interest == 0: return
Jason Luboff
@JLuboff
Nov 16 2018 16:06
morning
Simon Cordova
@gbsimon87
Nov 16 2018 16:06
Oh man, I just spent 5 hours wondering why I couldn't edit some data on the API, all I needed to do was change the word post to put
oh my god
Hey @JLuboff
Christopher McCormack
@cmccormack
Nov 16 2018 16:06
@JLuboff yo
@gbsimon87 ouch
Simon Cordova
@gbsimon87
Nov 16 2018 16:06
Hows that fire bro?
Jason Luboff
@JLuboff
Nov 16 2018 16:07
They got the one out near me fairly quickly I believe.. the other one near me is 69% contained...and the one up north is I think 40% contained but deaths and structure loss keeps going up
Whats everyone working on today?
Simon Cordova
@gbsimon87
Nov 16 2018 16:11

Damn, I never like hearing the deaths part, thats not cool.
I just feel in 2018 we shouldn't be having a fire problem, seems so archaic

I'm working on being less of an idiot/stooge and learning to remember to replace the word post with put

how about yourself?
Jason Luboff
@JLuboff
Nov 16 2018 16:12
I generally only use get and post :shrug:
Christopher McCormack
@cmccormack
Nov 16 2018 16:12
put is like an update right?
Jason Luboff
@JLuboff
Nov 16 2018 16:12
Going to try and focus on a single project today and get all the changes done.. than deploy the week of the 26 as I'm going to need to do some database modifications and what not
@cmccormack put is kind of like an upsert.. either create or replace/update existing
I see it as kind of a pointless method... as post can handle it the same but eh... semantics I guess
Simon Cordova
@gbsimon87
Nov 16 2018 16:16
I think post will create a new entry in the API, where as put you can reference the entry say by ID and amend it
Christopher McCormack
@cmccormack
Nov 16 2018 16:22
@JLuboff the last FCC API project I did used it to report a thread on a message board, used the same endpoint as post/get/delete so I guess like a utility when post for that endpoint is already used :)
Jason Luboff
@JLuboff
Nov 16 2018 16:23
Fair enough
Man...I have to restructure my app and my database for this requested feature..ugh..
Simon Cordova
@gbsimon87
Nov 16 2018 16:29
new branch, don't be that rook
i still get duplicates
function findChildren(santasList, children) {
  return [...new Set(children)].filter((e)=>santasList.includes(e)).sort((a,b)=> {
    return a < b ? -1 : a > b ? 1 : 0;
  });
}
@JLuboff @cmccormack try it out
Christopher McCormack
@cmccormack
Nov 16 2018 16:34
can't right now but maybe in a bit
Simon Cordova
@gbsimon87
Nov 16 2018 16:41
I've got to play with that set, its an array like obj right?
Aditya
@ezioda004
Nov 16 2018 16:42
@ke1echi The JS tests are broken (check comments)
@gbsimon87 Yeah, except it doesnt contain duplicates
Christopher McCormack
@cmccormack
Nov 16 2018 16:43
@gbsimon87 kind of, it has its own methods and all entries are unique
Aditya
@ezioda004
Nov 16 2018 16:43
And has some different methods names
Christopher McCormack
@cmccormack
Nov 16 2018 16:43
Sets are great for intersections and unions
Aditya
@ezioda004
Nov 16 2018 16:44
Yeah, too bad there is no Set.prototype.union
Christopher McCormack
@cmccormack
Nov 16 2018 16:44
does it not overload the + operator?
Python sets are fantastic
Aditya
@ezioda004
Nov 16 2018 16:44
JS doesnt have overload :(
Jason Luboff
@JLuboff
Nov 16 2018 16:46
@gbsimon87 It is a new branch but.. that doesn't help the database end of things heh
Simon Cordova
@gbsimon87
Nov 16 2018 16:53
Is that the main difference for a set, no duplicates?
Kelechi Chinaka
@ke1echi
Nov 16 2018 16:53
time wasting kata @ezioda004
Christopher McCormack
@cmccormack
Nov 16 2018 17:02
@gbsimon87 there's a whole set theory, but in programming it has some decent uses
Jason Luboff
@JLuboff
Nov 16 2018 17:14
Who else is having some fun?
May Kittens Devour Your Soul
@diomed
Nov 16 2018 17:49
Too bad there is no Set.prototype.unicorn @ezioda004
Christopher McCormack
@cmccormack
Nov 16 2018 18:13
@JLuboff fun? I wouldn't call it fun, but it's interesting. Sounds like you're having fun though :)
Jason Luboff
@JLuboff
Nov 16 2018 18:14
@cmccormack Working hard thats for sure... fun and frustrating at the same time lol;
Its going to be the first app update that I'll have to schedule downtime
Christopher McCormack
@cmccormack
Nov 16 2018 18:14
That's a sign of a programmer, someone that sees the frustrating stuff as a challenge and enjoys challenges
Jorge
@OrangeKulture
Nov 16 2018 18:15
hey whats up guys
Christopher McCormack
@cmccormack
Nov 16 2018 18:15
@OrangeKulture hello
Jason Luboff
@JLuboff
Nov 16 2018 18:15
Hi
Christopher McCormack
@cmccormack
Nov 16 2018 18:15
@JLuboff you have backups of backups just in case?
Also make sure you test restoring from backups
Jorge
@OrangeKulture
Nov 16 2018 18:15
hows it going today, all good ?
Jason Luboff
@JLuboff
Nov 16 2018 18:16
@cmccormack Daily backups of database, but ya I'll verify the backups work.. and as for the app.. I can always return to an earlier commit
Simon Cordova
@gbsimon87
Nov 16 2018 18:16

Hello @OrangeKulture

After completing that certificate for MongoDB I'm actually for the first time using it at work - good suggestion @cmccormack @JLuboff

Jason Luboff
@JLuboff
Nov 16 2018 18:16
@OrangeKulture So far...but that can always change hah
@gbsimon87 :thumbsup: I like mongo but I haven't done anything with it for months
I still love aggregrates in it...can get so complex but its fun
Christopher McCormack
@cmccormack
Nov 16 2018 18:17
@gbsimon87 glad you enjoyed it, or at least found it useful. I wish I had more reason to use it other than FCC projects, I always forget how to do stuff in it
Jason Luboff
@JLuboff
Nov 16 2018 18:17
I've used it in one project for work (Conference room signs) but otherwise.. haven't found a reason yet.
Christopher McCormack
@cmccormack
Nov 16 2018 18:19
well now that you don't need to study SQL anymore give it a try
Jason Luboff
@JLuboff
Nov 16 2018 18:20
When it comes to work, SQL will be the way to keep things, which I don't have an issue with
Christopher McCormack
@cmccormack
Nov 16 2018 18:22
makes sense
no reason to switch especially if your data is more structured I imagine
Jason Luboff
@JLuboff
Nov 16 2018 18:25
Ya everything is in SQL so eh.. and considering my position I should probably use it
Christopher McCormack
@cmccormack
Nov 16 2018 18:34
sql admin?
Jason Luboff
@JLuboff
Nov 16 2018 18:34
Well.. technically Systems Developer... but ya my job encomposses being the SQL Admin and Programmer
Christopher McCormack
@cmccormack
Nov 16 2018 18:36
Probably a lot more demand for SQL admins than MongoDB admins as well, for future job searches
Jason Luboff
@JLuboff
Nov 16 2018 18:37
I agree
I can't help but feel after getting much more familar with SQL.. that mongo is really only good for small to mid size projects
Christopher McCormack
@cmccormack
Nov 16 2018 18:38
I kind of feel like that's what it is for, it's small, easy to setup, matches the JSON you're already using for the most part
Jason Luboff
@JLuboff
Nov 16 2018 18:39
Ya but with latest versions of MS SQL, you can query for your result to be in JSON format
Christopher McCormack
@cmccormack
Nov 16 2018 18:40
sure but you don't have to worry about tables and keys and stuff, that's abstracted away
for the most part
Jason Luboff
@JLuboff
Nov 16 2018 18:41
True, mongodb is definitely easier to get up and running. No real setup or too much thought to table design, etc
Christopher McCormack
@cmccormack
Nov 16 2018 18:43
it's probably not much of a convenience long term especially with larger apps but for quick and dirty it does the job
Jason Luboff
@JLuboff
Nov 16 2018 18:44
I agree
Diego Mayer
@Chrono79
Nov 16 2018 18:45
Not so quick and dirty, who's talking about my programs? ;)
Jason Luboff
@JLuboff
Nov 16 2018 18:46
Diego my friend
Diego Mayer
@Chrono79
Nov 16 2018 18:46
:wave:
Christopher McCormack
@cmccormack
Nov 16 2018 18:46
@Chrono79 long time! Hello
Jason Luboff
@JLuboff
Nov 16 2018 18:47
Whats happening?
Diego Mayer
@Chrono79
Nov 16 2018 18:47
Mom's medical tour, she fell and broke her shoulder
She went to surgery yesterday and got an implant
Jason Luboff
@JLuboff
Nov 16 2018 18:48
Ooof, that does not sound like fun
Christopher McCormack
@cmccormack
Nov 16 2018 18:48
If it heals too tight will she be able to pitch for the Cubs?
Diego Mayer
@Chrono79
Nov 16 2018 18:49
lol, the doc said shoulder implants weren't so good, so we keep our hopes low
raising the arm 90º or so
at least it was the left one, she's right-handed
Jason Luboff
@JLuboff
Nov 16 2018 18:53
Thats at least some positive I guess lol
Diego Mayer
@Chrono79
Nov 16 2018 18:54
the glass half-full
Jason Luboff
@JLuboff
Nov 16 2018 18:54
true
Christopher McCormack
@cmccormack
Nov 16 2018 19:02
@Chrono79 whats new with you?
Diego Mayer
@Chrono79
Nov 16 2018 19:08
I'm a year older too
Developing a web for a university
and juggling with some other projects at the same time
Jason Luboff
@JLuboff
Nov 16 2018 19:12
Sounds busy
Christopher McCormack
@cmccormack
Nov 16 2018 19:14
@Chrono79 like the whole uni site?
that's awesome
Simon Cordova
@gbsimon87
Nov 16 2018 19:15
@Chrono79 whats happening long time
web for uni nice
@cmccormack @JLuboff its definitely been helpful to get a birds eye view of the code, along with postman you see everything really
Jason Luboff
@JLuboff
Nov 16 2018 19:18
I totally forget how to use postman now
Christopher McCormack
@cmccormack
Nov 16 2018 19:18
postman is great but I don't find myself using it that much for some reason
Diego Mayer
@Chrono79
Nov 16 2018 19:18
@cmccormack Nightmarish I'd say, we'll use Wordpress
Christopher McCormack
@cmccormack
Nov 16 2018 19:18
I thought wordpress was supposed to be super easy
Diego Mayer
@Chrono79
Nov 16 2018 19:18
But, somehow I'd hope I'll manage
When you use a template as it is, yes. But there are customizations, security concerns, etc.
Recently a plugin about GDPR had a security breach and a lot of webs got hacked
Christopher McCormack
@cmccormack
Nov 16 2018 19:23
Hey but at least we'll get quick disclosure because of GDPR!
Diego Mayer
@Chrono79
Nov 16 2018 19:24
I just can hope not one of those bombs explode in my face
Christopher McCormack
@cmccormack
Nov 16 2018 19:25
just do your due diligence and you should be OK
Diego Mayer
@Chrono79
Nov 16 2018 19:26
depending on third party code is a necessary evil
Christopher McCormack
@cmccormack
Nov 16 2018 19:27
internally we have a cache for third party packages - before we'll allow access to the package it's first ran through a lot of tests before it's permitted to be used
no idea what tests but I'm sure they are comprehensive
Jason Luboff
@JLuboff
Nov 16 2018 19:29
Testing is good. We don't do enough probably.
Christopher McCormack
@cmccormack
Nov 16 2018 19:31
we have hundreds, maybe thousands of developers so a lot more manpower to write those tests
Brad
@bradtaniguchi
Nov 16 2018 19:32
@cmccormack whoa you got 1k devs! daaammmnn
Diego Mayer
@Chrono79
Nov 16 2018 19:32
Here I'm all the manpower, not enough I guess
Christopher McCormack
@cmccormack
Nov 16 2018 19:32
probably, it's a big company
@Chrono79 will probably help a lot if you review your local CERT recommendations and have documentation that includes what you implement and all that. If you due that kind of due diligence if something were to happen you most likely wouldn't be liable, especially if your leadership signs off on it
Brad
@bradtaniguchi
Nov 16 2018 19:34
thats awesome :sunglasses:
Christopher McCormack
@cmccormack
Nov 16 2018 19:40
@bradtaniguchi how many devs does your org have?
I'm not sure if I'd rather be one of a few at a smaller shop or one of many at a bigger
Jason Luboff
@JLuboff
Nov 16 2018 19:41
Definitely pros and cons to both
Diego Mayer
@Chrono79
Nov 16 2018 19:41
I think the more the merrier (also not all depends on you)
Jason Luboff
@JLuboff
Nov 16 2018 19:41
One of few = hands on more tech , one of many = more specialized in one area
Brad
@bradtaniguchi
Nov 16 2018 19:42
Lets just say its a "small shop" that does custom application development as a secondary thing haha
@JLuboff Yes
Jason Luboff
@JLuboff
Nov 16 2018 19:42
I myself, am one of few (aka..myself) so I have my hands on everything
Diego Mayer
@Chrono79
Nov 16 2018 19:42
Sometimes I feel like a Victorinox knife
Jason Luboff
@JLuboff
Nov 16 2018 19:42
Which also gives me the freedom to develop however I like
Brad
@bradtaniguchi
Nov 16 2018 19:43
It's nice, but at the same time it's kinda a PITA
Diego Mayer
@Chrono79
Nov 16 2018 19:47
I think having someone with more knowledge near is a good thing
Jason Luboff
@JLuboff
Nov 16 2018 19:47
Ya gets a little tough when you have multiple projects and each one wants it done lol
Simon Cordova
@gbsimon87
Nov 16 2018 19:51
I've had such a productive week but today....damn
Brad
@bradtaniguchi
Nov 16 2018 19:51
I have a bunch of places where I'm logging to help me debug..... but if the logs don't print I can't debug :'(
Christopher McCormack
@cmccormack
Nov 16 2018 19:54
@bradtaniguchi bugs in your logging?
Brad
@bradtaniguchi
Nov 16 2018 19:54
oooohhh..... I'm not calling the route I thought I was :/
@cmccormack Like logs weren't printing at all and I was getting an error... but no stack trace/error logging (prolly forgot to print the error)
Christopher McCormack
@cmccormack
Nov 16 2018 19:57
spend half your day debugging your debugging :joy:
Jason Luboff
@JLuboff
Nov 16 2018 19:59
@gbsimon87 I've had a decently productive week...but today..today I'm killing it. Set a goal for myself to finish some stuff and getting closer by the minute
Jorge
@OrangeKulture
Nov 16 2018 20:00
Friday at last ...
imarite
Jason Luboff
@JLuboff
Nov 16 2018 20:01
Yup.. and a week off from work
Diego Mayer
@Chrono79
Nov 16 2018 20:02
I'm counting the minutes to go home
Einstein was right, time is relative
Jorge
@OrangeKulture
Nov 16 2018 20:02
a week off .. dam thats nice! im hoping to get the last two weeks of the year off
Christopher McCormack
@cmccormack
Nov 16 2018 20:02
He liked relative so much he married it!
Diego Mayer
@Chrono79
Nov 16 2018 20:02
Lol
Jason Luboff
@JLuboff
Nov 16 2018 20:03
:joy:
@OrangeKulture I took advantage of the 2 holiday paid days off so I only had to use 3 vacation days
Simon Cordova
@gbsimon87
Nov 16 2018 20:03
That's why I love working for a UK compnay
company**
Min 25 days a year holidays, plus the 'bank' holidays
Jorge
@OrangeKulture
Nov 16 2018 20:03
man, thats really nice .. i defo need some vacay
Christopher McCormack
@cmccormack
Nov 16 2018 20:03
I get close to a month off every year but I can never use it
Simon Cordova
@gbsimon87
Nov 16 2018 20:04
It's sweet
Jason Luboff
@JLuboff
Nov 16 2018 20:04
Damn 25 days? Do you also have sick days?
I have 10 days vacation (which will go to 15 days after the end of the year) and I forget how many days sick pay, they changed it this year to a shittier system
Brad
@bradtaniguchi
Nov 16 2018 20:05
damn 25 days? I get like 4 paid off automatically XD
Diego Mayer
@Chrono79
Nov 16 2018 20:05
@cmccormack I could take those days for you :P
Christopher McCormack
@cmccormack
Nov 16 2018 20:06
I work remote, maybe you can work for me while I take my days off :p
Simon Cordova
@gbsimon87
Nov 16 2018 20:07
Man, in the UK they've got it down compared to Canada and the States.
Christopher McCormack
@cmccormack
Nov 16 2018 20:07
Fortunately we have a network freeze starting next week where only emergency network changes can take place until beginning of January (You don't want to mess with a financial institutes network during the holidays)
@gbsimon87 it depends on the company
Simon Cordova
@gbsimon87
Nov 16 2018 20:08
It's 25 day paid holidays, and most companies let you buy 4 more days - tbh I don't know how the sick days work
@cmccormack yeah fair enough, but I mean in general I know it's sweeter than in Canada for sure, and things like maternity leave too
Christopher McCormack
@cmccormack
Nov 16 2018 20:09
I think within the last few years maternity and paternity leave were improved
at my company you can get something like 6 months paternity now
Simon Cordova
@gbsimon87
Nov 16 2018 20:09
Oh from what I know that's definitely an improvement nice
Jason Luboff
@JLuboff
Nov 16 2018 20:10
Maternity leave is awful. Most companies don't offer anything, or maybe 6 weeks. I took 3.5 weeks when my son was born but I used FMLA to do so (government paid me 55% of my wages..and taxed it)
Christopher McCormack
@cmccormack
Nov 16 2018 20:12

and taxed it

lol

Jason Luboff
@JLuboff
Nov 16 2018 20:12
right? lol
Christopher McCormack
@cmccormack
Nov 16 2018 20:12
had to add some extra paperwork I guess
Jason Luboff
@JLuboff
Nov 16 2018 20:13
Luckily...work used sick time to offset so ended up with normal pay (I didn't know they were going to do so..I probably would have taken more time)
Simon Cordova
@gbsimon87
Nov 16 2018 20:13
lolol
Nate Mallison
@NJM8
Nov 16 2018 20:15
How's everyone doing
Paternity leave? You mean the week I took off unpaid
Simon Cordova
@gbsimon87
Nov 16 2018 20:16
lol
Nate Mallison
@NJM8
Nov 16 2018 20:16
:laughing: :cry:
Simon Cordova
@gbsimon87
Nov 16 2018 20:16
Oh man - gotta love it
Tom
@moT01
Nov 16 2018 20:16
:chicken:
Jason Luboff
@JLuboff
Nov 16 2018 20:17
I lucked out a bit for my paternity leave.. We were scheduled for induction on the Tuesday of Thanksgiving week..so only had a to use I think 3 vacation days becuase I still got my holiday pay (FMLA takes a week to kick in for some retarded reason)
Nate Mallison
@NJM8
Nov 16 2018 20:17
First week back at work was ruuuuuuffff. I was so tired I probably could've been admitted somewhere I was so close to psychosis
I would get to work and not even remember leaving the house ahah
Tom
@moT01
Nov 16 2018 20:18
my brother and his wife are lucky - they're both professors at a university, got off from birth til the end of the semester
Jason Luboff
@JLuboff
Nov 16 2018 20:19
@NJM8 Man...the first couple nights home were sooooo tough..
Hell the first night at the hospital after he was born was tough.. Neither of us had really slept much for that previous several days
Simon Cordova
@gbsimon87
Nov 16 2018 20:24
It's such a good feeling when the code works oh man
Nate Mallison
@NJM8
Nov 16 2018 20:24
@JLuboff Yes they are. My first had trouble eating and so he didn't sleep, so neither did week. It was 3-4 weeks before either of got more than 1-2 hours of consecutive sleep, with a total of maybe 3-4 a night.
stressful
Brad
@bradtaniguchi
Nov 16 2018 20:50
Anyone who uses windows know how I can use my keyboard to select a folder to open in the "explorer window" that opens when I do like ctrl+o in an app?
Brad
@bradtaniguchi
Nov 16 2018 20:51
Like I can click on a folder then once an item is selected I can start using my keyboard arrows keys, but initially the window has focus on "select folder". I'd like to know if there's a way to select a folder using just the keyboard haha
Karma Drukpa
@coderkarma
Nov 16 2018 20:52
 Items.propTypes = {
    quantity: PropTypes.number.isRequired
  };
why this is not working?
Brad
@bradtaniguchi
Nov 16 2018 20:52
@coderkarma I think its Items.prototypes
Karma Drukpa
@coderkarma
Nov 16 2018 20:54
@bradtaniguchi why prototypes?
what does that mean prototypes?
Christopher McCormack
@cmccormack
Nov 16 2018 20:54
it's Items.propTypes
Karma Drukpa
@coderkarma
Nov 16 2018 20:56
@cmccormack
Christopher McCormack
@cmccormack
Nov 16 2018 20:56
@coderkarma yes?
Simon Cordova
@gbsimon87
Nov 16 2018 20:57
@coderkarma its proptypes, not prototypes, two rather different things
Read this: https://reactjs.org/docs/typechecking-with-proptypes.html
Karma Drukpa
@coderkarma
Nov 16 2018 20:58
on my portfolio page I am trying change background image frequently. I am having some trouble targetting those images
Simon Cordova
@gbsimon87
Nov 16 2018 20:58
its to ensure youre passing correct data in your props
Karma Drukpa
@coderkarma
Nov 16 2018 20:58
I need some help.
Christopher McCormack
@cmccormack
Nov 16 2018 20:59
targeting an image?
Karma Drukpa
@coderkarma
Nov 16 2018 21:00
yes, but I have that in different folder, let me share my css file
Brad
@bradtaniguchi
Nov 16 2018 21:01
shit sorry for making things more confusing :/ I gotta read better
Karma Drukpa
@coderkarma
Nov 16 2018 21:04
@gbsimon87 data type would be func right, Since Lists is a function .?
@cmccormack
#background-image {
  background-image: url('imgs/img3.jpg');
  height: 100vh;
  width: auto;
  background-position: center;
   background-attachment: fixed; 
  background-repeat: no-repeat;
  background-size: cover;
}
so how would I target this background image and make background images changes every few seconds.
Simon Cordova
@gbsimon87
Nov 16 2018 21:08

Data type would depend upon the prop you're checking...

When rendering the component, say you pass it a data prop which holds a string

<myComponent data={this.state.content} />

In the file where yo create myComponent, at the bottom you can declare the proptypes.
In this case, the proptype 'data' should expect a string
Therefore if it were to be something else, it would alert you.

@coderkarma To change the bg image can be quite tricky. You can look at setting the locations in an array then change the background-image url in a setInterval or something as it iterates through the array.
Sounds like a lot of work.
Karma Drukpa
@coderkarma
Nov 16 2018 21:15
@gbsimon87 I could do setInterval() function but I am having some trouble targeting and iterating through.
Diego Mayer
@Chrono79
Nov 16 2018 21:17
@coderkarma Why don't you create a codepen so someone else can poke at that?
It doesn't need to be the whole code, just the part you're having trouble with
Simon Cordova
@gbsimon87
Nov 16 2018 21:18
Yeah I'd do what @Chrono79 just said
Karma Drukpa
@coderkarma
Nov 16 2018 21:18
ok code pen coming.
@cmccormack @gbsimon87 @Chrono79
I want to change welcome background image frequently every few seconds
Diego Mayer
@Chrono79
Nov 16 2018 21:35
Would this work?
const backgroundImg = document.querySelector("body");

let i = 0;

setInterval(() => {
  backgroundImg.style.backgroundImage = `url(imgs/image${(++i % 6) + 1}.jpg)`
}, 3000)
Karma Drukpa
@coderkarma
Nov 16 2018 21:37
no
that is not working @Chrono79
how should i approach to target those images and loop through
Diego Mayer
@Chrono79
Nov 16 2018 21:40
image2.jpg:1 GET https://codepen.io/boomerang/iFrameKey-91856336-884c-2ae4-4dde-ce12ad00c214/imgs/image2.jpg 404
image3.jpg:1 GET https://codepen.io/boomerang/iFrameKey-91856336-884c-2ae4-4dde-ce12ad00c214/imgs/image3.jpg 404
image4.jpg:1 GET https://codepen.io/boomerang/iFrameKey-91856336-884c-2ae4-4dde-ce12ad00c214/imgs/image4.jpg 404
image5.jpg:1 GET https://codepen.io/boomerang/iFrameKey-91856336-884c-2ae4-4dde-ce12ad00c214/imgs/image5.jpg 404
image6.jpg:1 GET https://codepen.io/boomerang/iFrameKey-91856336-884c-2ae4-4dde-ce12ad00c214/imgs/image6.jpg 404
It's throwing some errors in the console, so it's trying to load those files at least
Diego Mayer
@Chrono79
Nov 16 2018 21:48
const backgroundArray = ['https://images.pexels.com/photos/34676/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', '', '', '', '', ''];

i = 0

setInterval(() => {
  document.body.style.backgroundImage = `url(${backgroundArray[++i % 6]})`
}, 3000)
Try that, fill different images
It seems to work for me
you can change the 6 for the array's length
Jason Luboff
@JLuboff
Nov 16 2018 21:50
Ah... that lovely feeling when you realize you can remove several lines of code becuase they no longer do anything including a now unnecessary database call :thumbsup:
alpox
@alpox
Nov 16 2018 21:50
@JLuboff :thumbsup:
Jason Luboff
@JLuboff
Nov 16 2018 21:51
@alpox I gotta say... I much prefer async/await over promises...been able to refactor and clean up a lot
alpox
@alpox
Nov 16 2018 21:51
Yep I prefer it too
ehutchllew
@ehutchllew
Nov 16 2018 21:52
Only issue I found with Async/await is it can lead you into try/catch hell
in some scenarios
alpox
@alpox
Nov 16 2018 21:52
Ofc. its still promises :d
Jason Luboff
@JLuboff
Nov 16 2018 21:52
Luckily I haven't fallen into that hah
alpox
@alpox
Nov 16 2018 21:52
@ehutchllew In such cases I often mix in a .catch to keep only one try/catch
Jason Luboff
@JLuboff
Nov 16 2018 22:00
How do you guys normally deal with a change in application flow to handle data that was created via the old flow? Essentially I'm having to break a certain section into two (with each being hold in a different table of my database), and the first section will have items that weren't/wont be part of the prior flow. My thought is to check to see if I have the data in my table exists, if not just display a message "Not applicable" or some shit on that section and than just automatically have the next section available (normally wouldn't be available until the prior was completed)
Christopher McCormack
@cmccormack
Nov 16 2018 22:02
@JLuboff I would delete it all and start over, but I don't work as a dev so...
Jason Luboff
@JLuboff
Nov 16 2018 22:02
Lol not an option
Well..the suggestion I made works..so will probably stick with it, but just curious on others methods if any
Christopher McCormack
@cmccormack
Nov 16 2018 22:05
seems ok to me
Jason Luboff
@JLuboff
Nov 16 2018 22:09
Thanks
Karma Drukpa
@coderkarma
Nov 16 2018 22:09
@Chrono79 put all images in array?
Dovydas Stirpeika
@Giveback007
Nov 16 2018 22:22
hey peeps
I am looking for a place where I can build something for a non profit to use my skills as a developer.
Dovydas Stirpeika
@Giveback007
Nov 16 2018 22:33
anyone knows of some resources to do that?
Jason Luboff
@JLuboff
Nov 16 2018 22:33
No sorry
Lia-Sue-Kim
@Lia-Sue-Kim
Nov 16 2018 22:56
What they mean by web designer?
is it creativity?
Simon Cordova
@gbsimon87
Nov 16 2018 23:04
I see it often as the person that does mainly page structure and solid CSS implementations
Brad
@bradtaniguchi
Nov 16 2018 23:12
Man I haven't touch normal javascript in a while... feels funny haha. Also functional programming FTW muhahaha
Simon Cordova
@gbsimon87
Nov 16 2018 23:15
what do you normally write @bradtaniguchi ?
Jason Luboff
@JLuboff
Nov 16 2018 23:15
Typescript I think
Brad
@bradtaniguchi
Nov 16 2018 23:15
Typescript all day every day
But I'm writing a CLI utility to bring our build process down to 1 command, and i was told todo it in nodejs scripts, instead of bash scripts due to the windows guy -___-
Jason Luboff
@JLuboff
Nov 16 2018 23:17
You're such a complainer :P
Brad
@bradtaniguchi
Nov 16 2018 23:18
Its whatever, the script I write COULD be used for other tasks, just have no idea how we could re-use them.
and I will admit nodejs code is more maintainable than a messy bash script
@JLuboff Now I do use windows every now and then....
AND I HATE IT :trollface:
Jason Luboff
@JLuboff
Nov 16 2018 23:23
Meh. Better than Linux... :)
Brad
@bradtaniguchi
Nov 16 2018 23:23
(╯°□°)╯︵ ┻━┻
Jason Luboff
@JLuboff
Nov 16 2018 23:27
Nice table bra
Oh man.... think I'm almost done with this update...
Simon Cordova
@gbsimon87
Nov 16 2018 23:31
@JLuboff you haven't seen where it's broken yet?
Brad
@bradtaniguchi
Nov 16 2018 23:35
I finished my script, just some minor refactoring then good to go :D
Jason Luboff
@JLuboff
Nov 16 2018 23:52
@gbsimon87 On a new request, it works fine. Did find a couple spots it was broken and fixed it. Still need to test against old requests that won't follow this format..
@bradtaniguchi See that wasn't so bad