These are chat archives for FreeCodeCamp/HelpJavaScript

17th
Aug 2018
Brad
@bradtaniguchi
Aug 17 2018 00:39
@JLuboff more money => good product => adapt to requirements => code can be updated fast => readable, reliable code => clean code => refactoring code often => don't break anything => tests
Pagnito
@Pagnito
Aug 17 2018 01:12
god making routes is sooooooooo boring
Pagnito
@Pagnito
Aug 17 2018 01:33
Im lookin for javascript courses or tutorials
That are REALLY indepth
like i often see methods in some docs that nonone teaches...and i rly want to learn them
Tom
@moT01
Aug 17 2018 01:39
@Pagnito i listened to this on a road trip not too long ago - pretty good https://www.youtube.com/watch?v=Bv_5Zv5c-Ts - 3.5 hours, says there's a full 12 hour course on udemy
Brad
@bradtaniguchi
Aug 17 2018 01:41
@Pagnito like how in-depth you talking about XD
JJ Megma
@megma_jj_twitter
Aug 17 2018 02:24
hi
Christopher McCormack
@cmccormack
Aug 17 2018 02:28
@megma_jj_twitter heya
Pagnito
@Pagnito
Aug 17 2018 02:37
@bradtaniguchi max
Like i wanna know about the code you i see in webpack bundle
Brad
@bradtaniguchi
Aug 17 2018 03:15
@Pagnito
ah
Pagnito
@Pagnito
Aug 17 2018 03:47
im haivng a problem where i tihnk postman suddenly started splitting my strings into arrays by ','
i created a new tab in postman and now its workin fine
Blauelf
@Blauelf
Aug 17 2018 06:02
@moT01 How do you listen on a road trip, download the video or audio before leaving the network?
Oh, good morning btw :D
ATom M
@ATom-M
Aug 17 2018 08:12
You should check out, "You dont know JS" its a series of free books
Mohammed Boudad
@matrixersp
Aug 17 2018 13:01
Hey guys, I solved this in two ways, but I know that it could be solved with regex, who can tell me how?
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/mutations
function mutation(arr) {
  return arr[1].toLowerCase().split('').filter(word => arr[0].toLowerCase().indexOf(word) === -1).length === 0;
}

mutation(["hello", "hey"]);
Blauelf
@Blauelf
Aug 17 2018 13:11

@matrixersp RegExp on that one? Pretty dangerous, I think. You would have to create your regular expression from one of the input strings, which means you would have to trust the caller not to use any characters with special meaning in RegExp.

But something like

function mutation(arr) {
  return new RegExp('^[' + arr[0] + ']*$', 'i').test(arr[1]);
}

should work for simple alphabetic strings.

Uses arr[0] to create a regular expression like /^[hello]*$/i, and tests arr[1] on that one.
Mohammed Boudad
@matrixersp
Aug 17 2018 13:23
@Blauelf That was clear, thanks a ton
Suyog RK
@SuyogRK
Aug 17 2018 13:31
 return (num>=0) ?( (num>0) ? "positive": "zero") :"negative";
is this the correct use of multiple conditional(ternary) operator?
Marianissimus
@Marianissimus
Aug 17 2018 13:33
not really, you need an else after the first ?
@SuyogRK
Suyog RK
@SuyogRK
Aug 17 2018 13:38
what do you mean by else?
Marianissimus
@Marianissimus
Aug 17 2018 13:39
:
Marianissimus
@Marianissimus
Aug 17 2018 13:41
the logic is (condition) ? dothis : (another condition) ? do that : (another condition) etc
btw, does freecodecamp save your recent solutions?
Suyog RK
@SuyogRK
Aug 17 2018 13:46
function checkSign(num) {
  return (num>=0) ?( (num>0) ? "positive": "zero") :"negative";
}

checkSign(10);
i pass all tests except for first one
checkSign should use multiple conditional operators
Marianissimus
@Marianissimus
Aug 17 2018 13:49
 return (num > 0) ? "positive" : (num < 0) ? "negative" : "zero"
Moisés Man
@moigithub
Aug 17 2018 13:49
the code looks good.. probably fcc test want u to follow the same example pattern
Marianissimus
@Marianissimus
Aug 17 2018 13:50
this is the order ? : ? : ? :
return (condition)? : what returns ? (another condition): what returns then
Tom
@moT01
Aug 17 2018 13:53
@Blauelf i didnt leave the network
Simon Cordova
@gbsimon87
Aug 17 2018 14:07
hello!
Blauelf
@Blauelf
Aug 17 2018 14:25
@moT01 You have reliable mobile internet with enough speed for YouTube, and data plans that actually allow this? Which country do you live in?
This message was deleted
Nate Mallison
@NJM8
Aug 17 2018 14:32
git question, when using git diff how can I just show the diff and not enter diff mode or whatever it is
I having to type down or enter a million times to get to the bottom
I did something on my old computer so it just prints it but I have no idea what I did
alpox
@alpox
Aug 17 2018 14:35
@NJM8 you can use vim keybindings in that mode so you dont have to scroll down like that
@NJM8 with G you can go to the bottom instantly
With q you leave the mode
With Ctrl-D you skip down half a page
With j you scroll down normally
Line by line
With Ctrl-u you go up again half a page
Nate Mallison
@NJM8
Aug 17 2018 14:37
git config --global pager.diff false
also
alpox
@alpox
Aug 17 2018 14:38
Id hate it but its up to you :D
Nate Mallison
@NJM8
Aug 17 2018 14:38
What is the advantage of using a pager? edit in place?
alpox
@alpox
Aug 17 2018 14:38
No but fast skipping and going back up
Nate Mallison
@NJM8
Aug 17 2018 14:38
I did that a long time ago I think on my old computer.
alpox
@alpox
Aug 17 2018 14:38
Much better than scrolling through with the mouse imho
Nate Mallison
@NJM8
Aug 17 2018 14:38
ah, I just scroll
What's a mouse??
haha
alpox
@alpox
Aug 17 2018 14:38
Yea dunno
Dont need something weird like a mouse
Nate Mallison
@NJM8
Aug 17 2018 14:39
I'm a trackpad user that's why I prefer that way. closer to the keyboard than the mouse
alpox
@alpox
Aug 17 2018 14:40
Meh trackpad is even worse to me :D
Nate Mallison
@NJM8
Aug 17 2018 14:40
I tried to alias di to diff --color | cat so that I can still use the pager if I want but it doesn't like the pipe in there
Meh, to each their own
alpox
@alpox
Aug 17 2018 14:41
You can probably set your setting so it goes to normal output
And if you want the pager
git diff --color | more
Nate Mallison
@NJM8
Aug 17 2018 14:42
--no-pager diff
there we go, I'll alias di to that and keep the regular diff with the pager.
alpox
@alpox
Aug 17 2018 14:43
Alright
I thought though that you can keep it in one
If you alias git --no-pager diff --color to di
And then di | more should give you the pager
Nate Mallison
@NJM8
Aug 17 2018 14:44
ugh, it won't let me use --no-pager in an alias
alpox
@alpox
Aug 17 2018 14:44
Hmm?
It probably just goes after the diff keyword
git diff --no-pager
Nate Mallison
@NJM8
Aug 17 2018 14:45
NATHANs-MacBook-Pro:ctms-frontend nathanjmallison$ git config --global alias.di "--no-pager diff"
NATHANs-MacBook-Pro:ctms-frontend nathanjmallison$ git di
fatal: alias 'di' changes environment variables.
You can use '!git' in the alias to do this
NATHANs-MacBook-Pro:ctms-frontend nathanjmallison$
it doesn't like that either
alpox
@alpox
Aug 17 2018 14:46
Dont you want to just make an alias in your terminal emulator?
Nate Mallison
@NJM8
Aug 17 2018 14:46
git diff --exit-code
that's the one
alpox
@alpox
Aug 17 2018 14:46
I never made one in git
Alright ^^
Nate Mallison
@NJM8
Aug 17 2018 14:47
emulator? I'm using the terminal app
You on windows?
alpox
@alpox
Aug 17 2018 14:48
No i probably used the wrong word (im on all systems tho) i meant your terminal environment - bash, zsh, fish or whatever you have
Nate Mallison
@NJM8
Aug 17 2018 14:49
ah got it
used linux?
alpox
@alpox
Aug 17 2018 14:49
Sure
I mostly use linux
Sometimes windows/mac
Nate Mallison
@NJM8
Aug 17 2018 14:49
for dev work? what hardware?
alpox
@alpox
Aug 17 2018 14:50
Dev work yes, and others
Erm
Different hardware :D
Nate Mallison
@NJM8
Aug 17 2018 14:50
I just got a new computer, stuck to what I'm used to, a mac. I really wanted an Oryx Pro but I get nervous about having to deal with stuff not working
alpox
@alpox
Aug 17 2018 14:51
I have a macbook air, lenovo P51 Xeon and a normal computer with windoes for games. At work I have a lower lenovo with ubuntu running
Nate Mallison
@NJM8
Aug 17 2018 14:51
I gather their product is well designed to work with the software. but I hated struggling with stuff like drivers back in the day when I just wanted to write javascript
P51 ooooohhhhh
haha
Love the lenovo keyboards. Almost drew me away from mac, we will see how it lasts
alpox
@alpox
Aug 17 2018 14:52
Lenovo is best for business
I dont know about oryx, might be okay :D
But linux runs on any machine... ^^
Nate Mallison
@NJM8
Aug 17 2018 14:53
true
unless your trackpad drops out
I guess that's what mice are for
hahahah
alpox
@alpox
Aug 17 2018 14:55
Nah
No mice
Just i3 desktop, tmux and emacs. Vim integrarion in the browser
No need to ever touch a touchpad or mouse
XD
Nate Mallison
@NJM8
Aug 17 2018 15:03
nice
I've never tried that. I don't know if I can remember all the shortcuts and how to do things. I can barely remember 1/4 of VS Code's shortcuts
alpox
@alpox
Aug 17 2018 15:05
I dont know those either
The vim keybindings just grow on you when learning them over time though
Because when you use vim mode in things, you are more or less forced to use them
Remembering is not a problem because it goes into the muscles
It doesnt even enter my mind
Jason Luboff
@JLuboff
Aug 17 2018 15:08
Morning :wave:
alpox
@alpox
Aug 17 2018 15:08
@JLuboff :wave:
Jason Luboff
@JLuboff
Aug 17 2018 15:09
What up?
alpox
@alpox
Aug 17 2018 15:10
Not so much :D
Jason Luboff
@JLuboff
Aug 17 2018 15:11
Is it the weekend yet there?
alpox
@alpox
Aug 17 2018 15:13
Gladly
Next week ill be alone in the office. Writing tests all week long...
Jason Luboff
@JLuboff
Aug 17 2018 15:15
Alone eh? Everyone taking vacation?
alpox
@alpox
Aug 17 2018 15:17
Yea they all leave me ^^
Jason Luboff
@JLuboff
Aug 17 2018 15:19
You should have taken some time too]
alpox
@alpox
Aug 17 2018 15:21
Im not allowed to, its civil service work ^^
Jason Luboff
@JLuboff
Aug 17 2018 15:21
You're not allowed to take time off?
alpox
@alpox
Aug 17 2018 15:22
In civil service, no
Jason Luboff
@JLuboff
Aug 17 2018 15:24
Whats the reasoning? (I'm not very familar with civil service)
Simon Cordova
@gbsimon87
Aug 17 2018 15:24
whats up whats up
Jason Luboff
@JLuboff
Aug 17 2018 15:24
What up Simon
alpox
@alpox
Aug 17 2018 15:24
Its too little worktime there and you have to be there for an exact amount of days. The amount of days is bound to dates
So you cannot make holidays and extend the boundaries
Its only 2.4 months now though
Jason Luboff
@JLuboff
Aug 17 2018 15:28
Ah
Tom
@moT01
Aug 17 2018 15:40
@Blauelf USA
$45/month with 5gb of 4g that rolls over if I don't use it - there are spots where I lose service for a little bit
Jason Luboff
@JLuboff
Aug 17 2018 15:43
4g? Not even LTE?
Tom
@moT01
Aug 17 2018 15:44
yes LTE
Jason Luboff
@JLuboff
Aug 17 2018 15:44
Oh ok.
I pay way too much for AT&T... $115 for two lines with 5gb shared data
Tom
@moT01
Aug 17 2018 15:45
fast enough for you tube
yea, that's up there
Jason Luboff
@JLuboff
Aug 17 2018 15:47
but its fairly dependable
Tom
@moT01
Aug 17 2018 15:48
i do a no contract, pay as you go type thing with att - never had a problem
might want to look into it
it was funny last time I was in there...
after Im done talking with the guy he wants to ask me some stuff
"Are you satisfied with your att service?" or something like that
I go - "I don't get service at one of my fishing spots up north" - "so if you could go ahead, and just build a tower up there - that would be grrreeeaatt"
Jason Luboff
@JLuboff
Aug 17 2018 15:53
Heh
Tom
@moT01
Aug 17 2018 15:53
did ya get that memo
Simon Cordova
@gbsimon87
Aug 17 2018 15:56
@JLuboff what's good buddy, having a great Friday, such a roll today
Jason Luboff
@JLuboff
Aug 17 2018 15:57
@gbsimon87 Just working to pay them bills
Hafiz Mughees siddiqui
@Mughees605
Aug 17 2018 15:59
hello everyone
Christopher McCormack
@cmccormack
Aug 17 2018 15:59
@Mughees605 heya
@gbsimon87 yo
Hafiz Mughees siddiqui
@Mughees605
Aug 17 2018 16:00
Hi @cmccormack
@cmccormack I have a question
Jason Luboff
@JLuboff
Aug 17 2018 16:00
Hi
Hafiz Mughees siddiqui
@Mughees605
Aug 17 2018 16:02
there is anyone who used intercom?
Christopher McCormack
@cmccormack
Aug 17 2018 16:02
Not I
Jason Luboff
@JLuboff
Aug 17 2018 16:02
Nope.
Unless you're talking about using an intercom to talk to people. I've used those. MY neighbor had an intercom built throughout their house. That was kind of cool. Could play music.
Hafiz Mughees siddiqui
@Mughees605
Aug 17 2018 16:05
image.png
in intercom we have button on bottom right corner , when we click this button chatbot is open , so i have to implement that kind of Ui in react , is it possible?
Christopher McCormack
@cmccormack
Aug 17 2018 16:07
@JLuboff that must have been really popular in the 70s or something, seems a lot of older houses have those
I think its cool I want one
Jason Luboff
@JLuboff
Aug 17 2018 16:08
@Mughees605 I would think you would need something like web sockets for the interaction, and I don't see why you could do that in React, but I've never worked with React
@cmccormack House was built in the 90's, but ya it was actually kind of cool lol
Christopher McCormack
@cmccormack
Aug 17 2018 16:10
@Mughees605 you can build just about anything in React
Facebook does their chat box as a React component if you want to check out their site with the React dev tools
Jason Luboff
@JLuboff
Aug 17 2018 16:11
(should have said couldn't do that..)
Christopher McCormack
@cmccormack
Aug 17 2018 16:11
@JLuboff haha
if only you could edit
Jason Luboff
@JLuboff
Aug 17 2018 16:11
I was too lazy
Christopher McCormack
@cmccormack
Aug 17 2018 16:12
haha
Jason Luboff
@JLuboff
Aug 17 2018 16:12
So... user issue I didn't consider... just had someone call me saying they couldn't view a file on my app. I checked and could..so I said okay, lets see.. well not only does he have OS zoomed, but he had his browser zoomed to 150% which was cutting off the button
I just told him to get glasses and zoom out. Problem solved :thumbsup:
Christopher McCormack
@cmccormack
Aug 17 2018 16:13
@Mughees605 in the end React is just Javascript, JSX makes it look different but it's still all function calls and DOM manipulation
@JLuboff man that must have felt great!
were they not able to scroll?
Christopher McCormack
@cmccormack
Aug 17 2018 16:18
Zoom plays hell on the web
Jason Luboff
@JLuboff
Aug 17 2018 16:18
It was a two fold issue, one is they were using IE which was skewing things anyhow and second ws becuase it was zoomed, that no, there was no horizantal scroll
I think I might implement a browser check and alert users if they're using IE to switch to a different browser..
Christopher McCormack
@cmccormack
Aug 17 2018 16:20
Hah man that is probably one of the most common sayings of a web developer
if they're using IE to switch to a different browser..
Jason Luboff
@JLuboff
Aug 17 2018 16:22
I did develop it to work in IE. And it does. But some elements are skewed or do not look quite right.
Simon Cordova
@gbsimon87
Aug 17 2018 16:37
WHAT A BEAUTY OF A FRIDDAAAAYYYYY!
Everything went smooth - certainly jinxing for Monday but wtv
How's you guys morning?
Jason Luboff
@JLuboff
Aug 17 2018 16:38
Its going. Fixed a query that wasn't working as intended
Doing some studying right now
Christopher McCormack
@cmccormack
Aug 17 2018 16:43
@gbsimon87 I would forgo a good portion of my salary to spend just one day a year as happy as you appear to be every day :)
Simon Cordova
@gbsimon87
Aug 17 2018 16:50
lolololol
Brad
@bradtaniguchi
Aug 17 2018 16:59
freaken docker pains :/
Pagnito
@Pagnito
Aug 17 2018 17:08
Ahhhh finally done with the backend part of this project 🙏
Christopher McCormack
@cmccormack
Aug 17 2018 17:21
@bradtaniguchi take an Ibuprofen
@Pagnito nice job
@Pagnito Any lessons learned you'd like to share? :)
Brad
@bradtaniguchi
Aug 17 2018 17:21
I wish drugs would help this damn thing work -_-
Pagnito
@Pagnito
Aug 17 2018 17:25
@cmccormack well i learned how to run back end server and and front end server concurrently in dev...jason web token is used for any requests after login as like once paya fee to a park u get a stamp on ur hand catching errors helps alot to debugg async await is pretty sweet
Mongoose models
Validtor js
Brad
@bradtaniguchi
Aug 17 2018 17:26
hehe jason web tokens
Pagnito
@Pagnito
Aug 17 2018 17:27
Oh also the biggest thing that was botherin me body parser...nobody explains how it works
I think i kind od figured out after readin abunch of articles
Im ginna take mongo db mongoose course next to really just makin my back end queryin legit
Brad
@bradtaniguchi
Aug 17 2018 17:30
mongodb or mongoose class? I thought you don't really do queries with mongoose?
Pagnito
@Pagnito
Aug 17 2018 17:33
Well im still beginning ro touch onthese things but as far as i know mongoose is used to interact with mingodb
If u go on mongoose website ulp find a queries section
Brad
@bradtaniguchi
Aug 17 2018 17:34
Ah okey, and yea yea
Jason Luboff
@JLuboff
Aug 17 2018 17:38
body parser creates the body object (which will contain form data) in the request. Express used to have it built in, but they removed it for some reason.
Mongoose is a wrapper for the mongodb driver which enables it to function as an ORM (is my understanding at least)
Aditya
@ezioda004
Aug 17 2018 17:40
The reason I think (removed body-parser) is because they wanted to make express even more light weight, so its like start with no stuff and customize express by adding middlewares to make your own framework for your app.
Jason Luboff
@JLuboff
Aug 17 2018 17:42
That makes sense
Michael S
@Ohshi60
Aug 17 2018 17:56
Hi guys, i thought it was the other way around - that express added the body parser module :)
But i can see now that im wrong
Jason Luboff
@JLuboff
Aug 17 2018 18:17
Why do people add special characters to file names? erg
Christopher McCormack
@cmccormack
Aug 17 2018 18:18
@JLuboff because they are special
Brad
@bradtaniguchi
Aug 17 2018 18:18
^
Jason Luboff
@JLuboff
Aug 17 2018 18:19
:angry:
Had to reconfigure my view file button lol
had to first stop it... encode the file name..then use window.open(url)
as opposed to just letting it be a regular anchor link
Christopher McCormack
@cmccormack
Aug 17 2018 18:22
why window.open?
Jason Luboff
@JLuboff
Aug 17 2018 18:23
becuase ajax won't work with express' res.download
It'll send to the backend, but the browser won't show the download dialog
Brad
@bradtaniguchi
Aug 17 2018 18:27
Oh geezus, I have ike 159 commites being squashed!
Christopher McCormack
@cmccormack
Aug 17 2018 18:27
interesting, and I guess that makes sense
@bradtaniguchi good or bad thing?
I've never squashed commits but want to start
Brad
@bradtaniguchi
Aug 17 2018 18:28
I guess its a good thing, but its a lot to review. I was going and was like "hmm I should almost be done" and I'm only at like 10% thru the list
Christopher McCormack
@cmccormack
Aug 17 2018 18:29
don't know what it means to review them, are you just checking something off?
Brad
@bradtaniguchi
Aug 17 2018 18:30
So when I squash I got over all my previous commit messages and put them into one. I usually clean them up, throw out useless stuff that didn't "make it" and make it all readable.
Christopher McCormack
@cmccormack
Aug 17 2018 18:31
by throw out you mean just the messages?
Brad
@bradtaniguchi
Aug 17 2018 18:32
Yea, all the commit changes get "squashed" down to whatever it was on the last commit, so all the previous ones are "gone". Cleans up the history a lot
this feature exploded in terms of complexity tho, so it got out of hand :/
Jason Luboff
@JLuboff
Aug 17 2018 18:35
I probably need to squash my commits..
I currently have 284 on master :trollface:
Christopher McCormack
@cmccormack
Aug 17 2018 18:36
@bradtaniguchi so all the commit changes themselves stay in tact, just the messages get squashed? if you keep some but toss others does that make for a very long commit message?
@JLuboff I thought squashing was done when you merge a branch with master? Can you do it to a current branch instead?
Brad
@bradtaniguchi
Aug 17 2018 18:36
Yea, I mention I clean them up, so most messages go from like a few lines to just 1 small line like 'fixed issue X'
Jason Luboff
@JLuboff
Aug 17 2018 18:37
I dunno..this is the first I've heard of squashing
Brad
@bradtaniguchi
Aug 17 2018 18:37
Yea I do it when i merge a branch, I think if you squash master, your "removing history" XD
Christopher McCormack
@cmccormack
Aug 17 2018 18:37
@bradtaniguchi but would it still end up being a paragraph commit message?
or do you squash to more than 1 commit?
(I should really just go read up on this)
Brad
@bradtaniguchi
Aug 17 2018 18:38
Yea, it was like 50-60 commits? So its a pretty big message. I know you can squash to more than 1 commit, using the interactive mode, but I don't do that
Id prefer to make smaller "feature" branches and squash less stuff, but like I said earlier this feature go outa hand XD
Christopher McCormack
@cmccormack
Aug 17 2018 18:39
I guess doing it with branches makes the most sense since you're probably only working with a subsection of code or on a specific issue anyway
Jason Luboff
@JLuboff
Aug 17 2018 18:50
@cmccormack I see you sneaking around into other rooms ;)
Christopher McCormack
@cmccormack
Aug 17 2018 18:51
Hah am I only supposed to be in one?
Jason Luboff
@JLuboff
Aug 17 2018 18:51
Nah.. I just find it funny when I see someone from here posting in other non-FCC chats. I do it too
Christopher McCormack
@cmccormack
Aug 17 2018 18:54
I rarely do unless I find the question interesting
Don't want to be the only one to respond in a dead channel only to have every subsequent question directed towards me, you know?
Christopher McCormack
@cmccormack
Aug 17 2018 18:59
Sometimes I feel like I know how to code, then I spend over an hour on something that should only take a few minutes like a binary search and wonder if I'll ever be cut out for this
Brad
@bradtaniguchi
Aug 17 2018 19:06
hehe same here
Suyog RK
@SuyogRK
Aug 17 2018 19:37
function getMaxOfTmrw(forecast) {
  "use strict";
  // change code below this line
  const{ tomorrow: {max: maxOfTomorrow}} =LOCAL_FORECAST; // change this line
  // change code above this line
  return maxOfTomorrow;
}
is it correct?
Simon Cordova
@gbsimon87
Aug 17 2018 19:40
@JLuboff work to pay bills is all we can do, good thing we're programmers
Whatever that means
Aditya
@ezioda004
Aug 17 2018 19:45
@SuyogRK You should use the parameter passed ie forecast instead of LOCAL_FORECAST
Pagnito
@Pagnito
Aug 17 2018 19:46
how do i acces create-react-app webpack config
Aditya
@ezioda004
Aug 17 2018 19:46
I think you'll have to eject it
Christopher McCormack
@cmccormack
Aug 17 2018 19:48
I think you can view it in the react-script module or something, just follow the CRA package imports and you should be able to find it
Suyog RK
@SuyogRK
Aug 17 2018 19:48
const LOCAL_FORECAST = {
  today: { min: 72, max: 83 },
  tomorrow: { min: 73.3, max: 84.6 }
};

function getMaxOfTmrw(forecast) {
  "use strict";
  // change code below this line
  const{ tomorrow: {max: maxOfTomorrow}} =LOCAL_FORECAST; // change this line
  // change code above this line
  return maxOfTomorrow;
}
how to complete this challenge?
Simon Cordova
@gbsimon87
Aug 17 2018 19:49
@SuyogRK check the response you received
Suyog RK
@SuyogRK
Aug 17 2018 19:50
other test is passed but it 'nested destructuring was used' test does not pass
also there is nothing in the hint page
Pagnito
@Pagnito
Aug 17 2018 19:53
oh jeez lookin at the webpack config files and scripts makes my head spin
Aditya
@ezioda004
Aug 17 2018 19:53
@SuyogRK Use the forecast parameter..dont destructure the object.
Pagnito
@Pagnito
Aug 17 2018 19:53
the create-react-app ones
Simon Cordova
@gbsimon87
Aug 17 2018 19:54
@Pagnito yeah lol there's a whole world in there
Pagnito
@Pagnito
Aug 17 2018 19:54
yea even tho they explain like everythin in comments its still sooo much
i have my own boilerplate but i know its def not as optimal is theirs but i rly dont like using boilerplates that i dont know everything under the hood
i wish somebody did a course on dissecting create-react-app
Christopher McCormack
@cmccormack
Aug 17 2018 20:01
they can't it changes too often :)
Brad
@bradtaniguchi
Aug 17 2018 20:03
its all layers of abstraction, id only dig deep into lower layers if your curious or need to. Otherwise you'll find a pit that goes where you are all the way down to binary digits being transmitted on the motherboard haha
Pagnito
@Pagnito
Aug 17 2018 20:46
@bradtaniguchi lol
@bradtaniguchi u right, i think its my ego getting the better of me
Brad
@bradtaniguchi
Aug 17 2018 20:48
hehe, dont expect to know everything, just know enough, and know how to learn more if ya need to :D
Jason Luboff
@JLuboff
Aug 17 2018 21:08
@bradtaniguchi Do you work directly with clients?
Brad
@bradtaniguchi
Aug 17 2018 21:10
@JLuboff what do you mean?
Jason Luboff
@JLuboff
Aug 17 2018 21:10
The programs you work on, are they built for your own company or for others?
Christopher McCormack
@cmccormack
Aug 17 2018 21:11
f82c77c8fb318a2b9d77aaa0902d6e08--the-engineer-office-spaces.jpg
Jason Luboff
@JLuboff
Aug 17 2018 21:11
@cmccormack :thumbsup:
Brad
@bradtaniguchi
Aug 17 2018 21:14
Ah haha, yea we do some contractor work, but I've been mainly working on the product made for our company.
Jason Luboff
@JLuboff
Aug 17 2018 21:15
Ok, so do you have to directly interact with those who are requesting the program or does your boss just come to you and say "hey do this"
Tom
@moT01
Aug 17 2018 21:15
@cmccormack :thumbsup:
you missed my reference to that earlier
Christopher McCormack
@cmccormack
Aug 17 2018 21:19
Maybe there wasn't enough flair on it :p
Tom
@moT01
Aug 17 2018 21:21
if you wanted more flair - then just make the minimum, more flair
Christopher McCormack
@cmccormack
Aug 17 2018 21:23
wha....?
Brad
@bradtaniguchi
Aug 17 2018 21:23
Sometime's I was in the meetings, but most of the time it was my boss dealing with the clients
Jason Luboff
@JLuboff
Aug 17 2018 21:24
@cmccormack ...You can't meme Office Space than not know all the lines from it!
@bradtaniguchi Ah. I was going to ask how you deal with people coming to you after deployment with "Oh I could use this" "Oh this would be nice" etc etc
Brad
@bradtaniguchi
Aug 17 2018 21:24
man if I actually needed to know a reference to something, to use a meme from it, id have access to like 5 memes XD
Christopher McCormack
@cmccormack
Aug 17 2018 21:24
@JLuboff I know the line I just assumed they trailed off not understanding
don't remember every scene ahha
Brad
@bradtaniguchi
Aug 17 2018 21:25
@JLuboff Yea, so right now my boss is essentially the client, he comes to me with "new features" and ideas and what not, more or less the same thing, except I can tell him "yea, we can't do that right now" much easier haha
Christopher McCormack
@cmccormack
Aug 17 2018 21:25
which he kind of did
Jason Luboff
@JLuboff
Aug 17 2018 21:25
Office Space is a classic and deserves recognization (holy fuck I'm pretty sure I butchered that spelling)
@bradtaniguchi Ya I'm saying no to things but I don't have that middle person lol
Tom
@moT01
Aug 17 2018 21:27
i think its the word and not the spelling
Brad
@bradtaniguchi
Aug 17 2018 21:28
Yea, I mean right now part of the team is working with a client, and my boss having a tough time with them haah
lots of requirement changes, not wanting to pay, just the usual
Jason Luboff
@JLuboff
Aug 17 2018 21:35
Gah.. ya.. just had some more shit dropped on me "It'd be nice if the tabs changed colors" wtf.. thats going to make the UI look like shit
newmoon
@newmoon
Aug 17 2018 21:40
Time for some malicious compliance :laughing:
Brad
@bradtaniguchi
Aug 17 2018 21:40
Yea, the last project I worked on had so many bad UI decision cuse they "wanted it to look like the old version", but we changed the old version cuse it sucked XD
idk what was up with my update on my laptop, packages were failing due to not finding a package I have. I re-install the package, and now things work 0.o
Jason Luboff
@JLuboff
Aug 17 2018 21:42
@newmoon Perhaps... but I solely built this. I don't want it to look like shit becuase they can't keep track of things
newmoon
@newmoon
Aug 17 2018 21:43
Oh yeah, that's different for sure. Unless you can put "coded by: Jason, designed by: my manager" as a footnote at the bottom :)
Brad
@bradtaniguchi
Aug 17 2018 21:44
er nvm stillnot working...
Jason Luboff
@JLuboff
Aug 17 2018 21:44
HAHA
That'd be fun but ya I'd probably get a talking to
Jason Luboff
@JLuboff
Aug 17 2018 21:56
Any one dealt with adding an event listener for the back button? I have a page that lists all requests, and you can filter it by facility. So right now, you can filter, select a request and it takes you into that request. For all browsers (except FF) if you hit the back button, it takes you bac k to the list of requests and the drop down for filter still shows the facility but the list is not actually filtered. So I need to set an event listener that or use sessions
Pagnito
@Pagnito
Aug 17 2018 21:56
hey anyone know a package in atom like in Vs
where i type rcc: tab
and i can just print a component template instantly
Christopher McCormack
@cmccormack
Aug 17 2018 21:56
snippets?
Pagnito
@Pagnito
Aug 17 2018 21:56
yea i think so
like emmet but for react
Christopher McCormack
@cmccormack
Aug 17 2018 21:58
did you search for snippets?
Brad
@bradtaniguchi
Aug 17 2018 21:58
I'm pretty sure id be under react-snippets or something. But then I'm no react guy so idk
I also know you can create/save your own somehow, but idk how todo that since I don't use snippets either haha
Pagnito
@Pagnito
Aug 17 2018 21:59
oh i tihnk i found one
Brad
@bradtaniguchi
Aug 17 2018 21:59
Yay I refactor code and a buncha tests fail :D
Pagnito
@Pagnito
Aug 17 2018 22:01
oof
what are react propTypes?
Christopher McCormack
@cmccormack
Aug 17 2018 22:03
a validation tool to ensure what's passed matches a certain type
they provide useful errors if you have a prop passed that isn't what you expect
I think it's good to use them
Pagnito
@Pagnito
Aug 17 2018 22:04
hmm interesing
sweet
Simon Cordova
@gbsimon87
Aug 17 2018 23:04
@cmccormack what's the big Friday plan tonight?
Christopher McCormack
@cmccormack
Aug 17 2018 23:05
Bust out some moonshine, take a Lyft to dinner, enjoy good conversation with the wife, come home play with the dogs, watch a movie or something
@gbsimon87 you?
Normal Friday night, tried and true
Jason Luboff
@JLuboff
Aug 17 2018 23:10
I hate this work project now. :joy:
Christopher McCormack
@cmccormack
Aug 17 2018 23:11
@JLuboff joy and hate??
Jason Luboff
@JLuboff
Aug 17 2018 23:12
Ya..I'm just a bit frustrated with how some people keep coming up with random shit for it that either doesn't make senses, only works to their advantage, or really isn't needed
Christopher McCormack
@cmccormack
Aug 17 2018 23:13
I'm telling you, you need a leader in your group that can act as your Product Owner and filter requests into user stories and determine what is needed, what isn't and priorities based on your time allowance
Brad
@bradtaniguchi
Aug 17 2018 23:14
man I wish I knew what you were talking about so I could tell my manager todo it to deal with "those certain people" hehe
Jason Luboff
@JLuboff
Aug 17 2018 23:14
We just don't have anything like that here.
I'm going to talk to my Boss on Monday morning to find out what exactly I can and can't say no to
Becuase the person who is in charge of watching over all the requests and what not is the main one coming to me with stupid shit
Like showing the same information on multiple tabs (there are only 5 tabs...on a SPA...so you can click back and forth without losinganything..)
He has no sense of UI
Brad
@bradtaniguchi
Aug 17 2018 23:17
On one project they wanted to see like 90% of the information in the dashboard, instead of "clicking on a records" to get the detailed information. But to show 90% of the information means getting like half the database on each view of the table. It would take like 3 seconds to load 50 records since it was getting EVERYTHING for each record
bad architecture, but we weren't expecting to get everything upfront :/
Jason Luboff
@JLuboff
Aug 17 2018 23:18
Ya, and then I'm sure if you provided that they would have had you changed it
Brad
@bradtaniguchi
Aug 17 2018 23:19
hehe would I suprise you if I said they did :P
Jason Luboff
@JLuboff
Aug 17 2018 23:20
Nope
There are some things that I understand and say sure no problem
But it's like changing the fucking color of the tabs...dude...theres a status for a reason. A status that you told me
Simon Cordova
@gbsimon87
Aug 17 2018 23:26

@cmccormack Lyft is bigger than Uber out there?

The lady is already asleep beside me, I'm on the laptop working on my app

Good Friday as well I'd say
Jason Luboff
@JLuboff
Aug 17 2018 23:26
I think Uber is bigger
Christopher McCormack
@cmccormack
Aug 17 2018 23:26
What I've learned from a long and distinguished career around people that change their minds constantly is that about 75% of the time if you just ignore a request they either forget about it or didn't care about it in the first place
Jason Luboff
@JLuboff
Aug 17 2018 23:26
But then again..I rarely use either
@cmccormack Problem is they come directly to my office! lol
Christopher McCormack
@cmccormack
Aug 17 2018 23:27
@gbsimon87 I use Lyft for moral reasons, although I think the company is getting better now. Out here Lyft and Uber might as well be the same thing as it's all the same drivers
Jason Luboff
@JLuboff
Aug 17 2018 23:28
What moral reasons if I may ask?
Christopher McCormack
@cmccormack
Aug 17 2018 23:28
@JLuboff Let them come, if they don't come back, then don't implement it
Simon Cordova
@gbsimon87
Aug 17 2018 23:28
@cmccormack same drivers, I suppose that makes total sense actually
I know the companies implement a ban on consecutive driving, I wonder how many drivers just switch apps when that happens
Christopher McCormack
@cmccormack
Aug 17 2018 23:29
Dang it started explaining while upgrading my router firmware, what was I thinking??
I think as contractors it may be harder to enforce that, especially in certain states
@JLuboff Uber was a big boys club, behaved improperly to many of their staff and leadership consistently covered it up
Their new CEO Dara Khosrowshahi seems to be pretty good though so I may try Uber again soon, maybe Uber eats as that seems pretty good
Simon Cordova
@gbsimon87
Aug 17 2018 23:33
@cmccormack that's a fair enough reason
Christopher McCormack
@cmccormack
Aug 17 2018 23:33

The old CEO Travis Kalanick

resigned from Uber in 2017 after controversy over the company's unethical culture, including allegations that he ignored reports of sexual harassment at the company. He remains a shareholder and board-member

When there are other options, go with the most ethical
Simon Cordova
@gbsimon87
Aug 17 2018 23:33
What's with all the sexual harassment claims all the time, what form are they in?
Jason Luboff
@JLuboff
Aug 17 2018 23:35
The sexual form
duh
Christopher McCormack
@cmccormack
Aug 17 2018 23:35
I'm not in HR so I'm not sure what form, but there are a lot of people out there, men and women alike, that don't know how to behave around other people
Especially at the workplace
I've been very fortunate to be on respectful and professional teams for the last 10 years, but I've walked into some other teams areas and it's like going back to middle school
keep that stuff at home with your friends
@JLuboff you do the FCC Information Security stuff yet?
Jason Luboff
@JLuboff
Aug 17 2018 23:45
No, this morning I was thinking "today should be kind of slow...I'll work on some FCC stuff"...ya...thats not how the day turned out
Christopher McCormack
@cmccormack
Aug 17 2018 23:48
@JLuboff hah sorry man
Helmet seems pretty neat, easy security for your backend
Jason Luboff
@JLuboff
Aug 17 2018 23:50
Does the curriculm seem pretty good?
Christopher McCormack
@cmccormack
Aug 17 2018 23:50
eh
it's kind of simple stuff, test out different methods of a module and see how to configure them
Personally I prefer just reading the official docs
but exposure is exposure
Simon Cordova
@gbsimon87
Aug 17 2018 23:53
Like middle school, like that?
I suppose I'm ignorant to it because I haven't quite been exposed to it
But that sounds so far out there - how can there be so much immaturity at this age?
Jason Luboff
@JLuboff
Aug 17 2018 23:55
@cmccormack Well simple stuff to kick you into high gear for the advanced stuff
Christopher McCormack
@cmccormack
Aug 17 2018 23:56
@gbsimon87 that's a real problem - lack of exposure just makes it seem like it's made up, but people have to deal with inappropriate to downright hostile coworkers every day
@gbsimon87 best we can do is call out our colleagues and not allow it to be seen as permissible
Jason Luboff
@JLuboff
Aug 17 2018 23:58
Alright..I'm out. Have a good weekend all
Simon Cordova
@gbsimon87
Aug 17 2018 23:59
@cmccormack Fair enough, it's a shame it happens though
Brad
@bradtaniguchi
Aug 17 2018 23:59
@JLuboff See ya have a good weekend!
Simon Cordova
@gbsimon87
Aug 17 2018 23:59
@JLuboff enjoy buds, have a nice one enjoy a cold one well deserved
Jason Luboff
@JLuboff
Aug 17 2018 23:59
:wave: