These are chat archives for FreeCodeCamp/Help

10th
Jul 2018
Greg D
@mosaic-greg
Jul 10 2018 03:28
hi i just started a project with the link https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-express/ but the app view just says "Not Found". Is glitch down?
Kyle Holm
@thekholm80
Jul 10 2018 03:30
what were you expecting to see?
server.js isn't set up to serve anything, and you haven't updated myApp.js to serve content yet, correct?
Greg D
@mosaic-greg
Jul 10 2018 03:32
ah yep that makes sense thanks kyle. I've updated myApp.js with console.log("Hello World");
Kyle Holm
@thekholm80
Jul 10 2018 03:32
:+1:
Greg D
@mosaic-greg
Jul 10 2018 03:54
myApp.js is updated, but the test isn't passing. Any tips please? https://glitch.com/edit/#!/rhetorical-desert?path=myApp.js:12:24
Kyle Holm
@thekholm80
Jul 10 2018 03:56
make sure you're using the live view url for the testing
Greg D
@mosaic-greg
Jul 10 2018 04:18
nice one, thank you
Kyle Holm
@thekholm80
Jul 10 2018 04:21
you bet, it took me a long time to figure that one out.
Prakash Kumar
@ThePrakashKumar
Jul 10 2018 04:24
Can I add padding like: padding: 15px auto;?
Christopher McCormack
@cmccormack
Jul 10 2018 04:50
@ThePrakashKumar I do not believe padding has an option for auto
Prakash Kumar
@ThePrakashKumar
Jul 10 2018 04:52
@cmccormack Thanks.
Henry
@GitHub-Henry
Jul 10 2018 04:57
Here's the situation, I can import fonts into a React app with Google Fonts. And I'd like to do the same
with imported local fonts. I'm following these instructions but still get an error message saying I
need a loader to handle the font I'm trying to import. I installed file-loader and
configured my webpack.config.js file per these instructions,
however, I'm still getting the same error message. Anyone understand how to install local fonts to
a React app with Webpack, that is not CRA.
Christopher McCormack
@cmccormack
Jul 10 2018 04:58
@GitHub-Henry which version of webpack are you using?
Henry
@GitHub-Henry
Jul 10 2018 04:59
4.12.0
Christopher McCormack
@cmccormack
Jul 10 2018 05:00

@GitHub-Henry try using

{
      test: /\.(woff|woff2|eot|ttf|svg)$/i,
      loader: "file-loader?name=fonts/[name].[ext]",
},

in your modules.rules array

those instructions may be out of date for webpack 4
Henry
@GitHub-Henry
Jul 10 2018 05:04
Thanks I'll try it.
The config you sent didn't fix it, but I'll read the docs you sent. Appreciate the tip.
Christopher McCormack
@cmccormack
Jul 10 2018 05:05
What is the error you're getting? (I'm on a work pc and can't access the link you provided)
John
@taloloy18
Jul 10 2018 06:08
Hi guys!
Can you help me with this code
container class should have a grid-template-columns property that is set to repeat 3 columns with the minimum width of 90px and maximum width of 1fr.
John
@taloloy18
Jul 10 2018 06:19
Done!
Henry
@GitHub-Henry
Jul 10 2018 06:26
@cmccormack my dev machine is a VM and it decided to get quirky for a bit, so I took a break. Error msg "Module parse failed...You may need an appropriate loader to handle this file type...Source code omitted for this binary file." So, it sounds like it was trying to load the font but the loader or it's configuration wasn't correct.
Llldmiao
@Llldmiao
Jul 10 2018 07:41
image.png
why this go wrong?
waiting for help
Adish Jain
@Adishjain58
Jul 10 2018 07:55
@Llldmiao mine worked fine
Screenshot (48).png
May Kittens Devour Your Soul
@diomed
Jul 10 2018 07:59
@Llldmiao reset. try again
Llldmiao
@Llldmiao
Jul 10 2018 08:13
got it
Ene Catalin
@EneCatalin
Jul 10 2018 08:32
reset and hit it till it works, best advice

here is my code

<style type='text/sass'>

   @each $color in blue,black,red{
 .#{$color}-bg{background-color:$color;} 
}  
  div {
    height: 200px;
    width: 200px;
  }
</style>

<div class="blue-bg"></div>
<div class="black-bg"></div>
<div class="red-bg"></div>

i don't understand why the test cases are not getting passed

Manaf
@manafn
Jul 10 2018 13:27
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:29
@Adishjain58 u didnt set colors?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:35
@Adishjain58 the colors should be separated by a space not a comma
@diomed been a while kitten 😼
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:36
that's not stylus, Ahmed. all lies
:smirk_cat:
so what brings you back here, again?
didnt u outgrow FCC? :yum:
@ahmedtarek2134 teach me how to saber.js
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:43
@diomed i came back here because im too bored lmao
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:43
too hot in the desert, ey?
hue hue hue
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:44
oh man its boiling hot
also saber.js, its SSR for vue huh
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:45
SSR? IDK what that is
isn't saber some kind of content generator?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:48
@diomed server side rendering
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:49
@ahmedtarek2134 is that opposite of RSS?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:52
SSR is basically a framework like react or vue rendering the markup on the backend
that's what saber.js, next.js and all these others do
that's why you don't see an html file using saber.js or next.js
May Kittens Devour Your Soul
@diomed
Jul 10 2018 13:55
I'm beginning to think that's not for me after all
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 13:56
hahaha no it's not different at all its just another method to display your content on the browser
so @diomed
teach me GraphQL :cat:
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:02
@ahmedtarek2134 u need that for react, right?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:03
@diomed nope you can use it anywhere
not even specifically in javascript
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:04
stop lying . we both know you want it for Gatsby
:yum:
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:04
@diomed i actually don't use gatsby
i use graphql on my backend
i know backend stuff now
it's actually pretty cool
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:08
@ahmedtarek2134
c
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:09
hahaha i also bought myself a raspberry pi just for the lols
didn't have any ideas so i made it blink an led when my server is up and running :smile:
diomed @diomed sighs
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:12
@ahmedtarek2134 buy me iMac pro just for the lols :yum:
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:14
@diomed you have the money?
if you give me the money ill happily buy it for you :smile:
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:15
I have like 3 fidy
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:16
well then we can't buy it :cry:
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:18
@ahmedtarek2134 make me vue cms
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:18
@diomed make me a mongoDB database about types of cats
1LifeLess
@1LifeLess
Jul 10 2018 14:19

On FreeCodeCame there is the follow example:

function Bird(name) {
  this.name = name;
  this.numLegs = 2;
}

let duck = new Bird("Donald");
let ownProps = [];
for (let property in duck) {
  if(duck.hasOwnProperty(property)) {
    ownProps.push(property);
  }
}

Why there is an if() in that loop?! isn't it redundant?!?

May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:20
@ahmedtarek2134 catsuomahe daihatsu! ⛩️
@ahmedtarek2134 u should join
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:23
@1LifeLess i don't know if it is redundant or not but what i know is that a forEach is a better alternative...
@diomed what's that???
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:25
check it out & u'll know
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:26
@diomed there ain't any clubs where i live
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:27
mejk1
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:27
when im the #1 on css on javascript you know there is a lack of coders where i live
mejk1
what?
github*
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:28
make one
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:29
i don't have the proper time, next academic year will be my last before college and i have to do well
alpox
@alpox
Jul 10 2018 14:31
@1LifeLess Looks pretty redundant to me :D
1LifeLess
@1LifeLess
Jul 10 2018 14:31
@alpox Thanks
alpox
@alpox
Jul 10 2018 14:32
@1LifeLess Ah actually its not redundant
When I look a bit closer.
1LifeLess
@1LifeLess
Jul 10 2018 14:32
@alpox Can u explain
alpox
@alpox
Jul 10 2018 14:33
for... in loops over ALL properties of an object (including properties inherited through the prototype chain) hasOwnProperty goes sure that only the properties are considered that are defined on the object itself and are not inherited
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:33
1LifeLess
@1LifeLess
Jul 10 2018 14:34
@alpox huu Tricky...nice one... Thanks
alpox
@alpox
Jul 10 2018 14:34
@diomed Well, who programmed the world like that, did something pretty wrong anyway so it doesn't matter if you delete that block or not :D
@diomed I mean... who makes a bush that is static to the x/y plane and hangs the world on it
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:35
pretty sure someone like me
hue hue hue :smiling_imp:
//When I wrote this, only God and I understood what I was doing
//Now, God only knows
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:49
Hello to all, i need a bit of help about design question
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:49
@phiratio what's up
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:50
The case is as follows:
I want to make dashboard, connected to DB and make CRUD operations, but it will be nothing fancy
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:50
how to hack @ahmedtarek2134 ?
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:50
i need to make clients, to assign some ID's to them and add notes
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:51
@phiratio which DB are you using?
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:51
and search fastly and filter all that info.For example John comes, he shows me his ID and i found his record in the db and i can check his past check-ups.
This is design question
I am not using nothing in particular
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:51
@diomed I actually have a book about hacking
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:51
I am trying to decide what stack to use on this type of app
firstly i thought of wordpress plugins, but they dont have goon ones
balakrishna222111
@balakrishna222111
Jul 10 2018 14:52
@/all what is the use of "justify-content "
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:52
@phiratio these types of apps you can use anything you want as a stack but I am a node guy so i would use node and express
for the database a mongodb one that is controlled using mongoose
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:52
@balakrishna222111 it justifies content y'all
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:52
or maybe the google firebase
DBasService?
it's a design question you see
do i really need a backend for that simple task
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:53
@balakrishna222111 see this pen
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:53
@phiratio you could use firebase or from what i have been using recently mlab, a mongodb database as a service
@phiratio it doesn't sound like a design question to me haha
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:54
@ahmedtarek2134 make me a CRUD
balakrishna222111
@balakrishna222111
Jul 10 2018 14:54
@diomed thank u
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:54
@phiratio but if it has CRUD operations and a database then that requires a backend
@diomed I did many actually
I created one with graphql
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:55
@ahmedtarek2134 It is about the design of the app(not visual part)
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:55
one with express
and one with react and express
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:55
@ahmedtarek2134 is there any crud out of the box?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:56
@diomed not that i know of :smile:
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:56
is that what CMS is?
crud out of the box?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:56
@diomed CMS is content management system
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:56
@ahmedtarek2134 yes basically i want to do "client diary" for a small business car repair shop.If it was you what would you use to do that?(don't forget about the hosting part of the whole deal)
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:56
surely u can CRUD with it
Dear Diary
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:57
@phiratio i always go with node and express lets start with that
hosting is heroku
then database would be mongodb atlas or mlab, i like having the database as a service
but for me i would use graphql for the crud operations and that
May Kittens Devour Your Soul
@diomed
Jul 10 2018 14:58
what is database as a service
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:58
i don't know if you know it
@diomed mlab.com
because graphql only sends back what you want and it is more pleasant to work with
that's for the backend
for the frontend i would use react and have the requests made with axios
Bozhidar Dimitrov
@phiratio
Jul 10 2018 14:59
@diomed This is DataBase as a Service, your database is hosted somewhere, someone takes care for all the hardware/software part and you only access it through control panel/api
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 14:59
but you could use good old template engines with express and normal css and javascript
it depends really on what you like
and what you know
balakrishna222111
@balakrishna222111
Jul 10 2018 15:02
flex is usefull?
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:02
@balakrishna222111 flexbox and css grid are one of the most useful parts of css
balakrishna222111
@balakrishna222111
Jul 10 2018 15:03
ok
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:03
@ahmedtarek2134 solve my bulma problem
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:03
@diomed which is...
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:04
@ahmedtarek2134 wanna have 3 columns per row
but everything is dynamic coz it's in a loop
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:05
@diomed so you want to render something from an array into three columns?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:05
kinda. sort of. probably
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:06
@diomed using a js framework?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:07
no
it's twig
Christopher McCormack
@cmccormack
Jul 10 2018 15:07
@diomed does bulma not wrap when the columns are greater than the row width? In bootstrap you can just keep adding col-4 to the same row for however many you need and it will wrap after it hits the max width of 12, creating three columns in each row
You can add 100 items to the same row and it will look like 100/3 rows
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:09
I've had this experience that when I add bootstrap 3 it is good. not so good with bulma, however
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:09
@diomed what's twig?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:09
u know, a branch :D
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:09
ohhh lol
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:09
php template engine
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 15:09
well anyway i have to go have lunch
gtg
ttyl
bye
lol
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:10
bye. bon appetit
balakrishna222111
@balakrishna222111
Jul 10 2018 15:19
@diomed what is the meaning of bon appetit?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:24
@balakrishna222111 means smth like : enjoy your meal.
b492ouba
@b492ouba
Jul 10 2018 15:26

a should have a value of 7
b should have a value of 7
a should be assigned to b with =
1
2
3
4
5
6
7
8
// Setup
var a;
var b = 2;

// Only change code below this line
var a = 7
var b = 7
a + b = 9
No Results
// running test
a should be assigned to b with =
// tests completed
No Results
hi
can u help me

Ene Catalin
@EneCatalin
Jul 10 2018 15:27
link ?
b492ouba
@b492ouba
Jul 10 2018 15:27
what?
Ene Catalin
@EneCatalin
Jul 10 2018 15:27
link to the problem
ima take a look
also the syntax seems old style, use let :P
it's the new "way" of declaring variables from what I've heard
Christopher McCormack
@cmccormack
Jul 10 2018 15:28

@b492ouba

a should be assigned to b with =

jack123
@lb7332
Jul 10 2018 15:29
指定图片的边框宽度为 10px.
b492ouba
@b492ouba
Jul 10 2018 15:29
i tried this var a = b but doesn't work
Ene Catalin
@EneCatalin
Jul 10 2018 15:29
give me the link to the problem
and ima help
Christopher McCormack
@cmccormack
Jul 10 2018 15:29
@b492ouba don't redeclare your variable
only declare once
Christopher McCormack
@cmccormack
Jul 10 2018 15:30
I think you may have a and b swapped actually
Ene Catalin
@EneCatalin
Jul 10 2018 15:31
NOT FOUND
found it
b492ouba
@b492ouba
Jul 10 2018 15:31

Assign the value 7 to variable a.

Assign the contents of a to variable b.

Ene Catalin
@EneCatalin
Jul 10 2018 15:32
easy peasy
ok ima explain
can you paste the code you wrote as a solution again so we can take it line by line ?
the exercise is meant to show you the basics of variable assignment
b492ouba
@b492ouba
Jul 10 2018 15:33

// Setup
var a;
var b = 2;

// Only change code below this line
var a = 7
var b = 7
var b = a

Ene Catalin
@EneCatalin
Jul 10 2018 15:33

Assign the value 7 to variable a.

Assign the contents of a to variable b.

read the 2nd line
you wrote a line of code that you didn't need to
also
you declared the variables again
ima rephrase
when you declare a variable (var a for example) you only need to declare it once
b492ouba
@b492ouba
Jul 10 2018 15:34
assign mean = right
Ene Catalin
@EneCatalin
Jul 10 2018 15:35
after that the compiler remembers that the variable exists and you can assign values to it without the var part
in some languages doing var a = x; then later var a=y; will result in an error
b492ouba
@b492ouba
Jul 10 2018 15:35
ok
Ene Catalin
@EneCatalin
Jul 10 2018 15:35
since when it sees var a again it sees there's already a variable declared with that name
in general you should avoid declaring a variable twice even if the language allows it (at least in the same class) or at best you'll make life harder for yourself. At worst you'll run into compilation errors
b492ouba
@b492ouba
Jul 10 2018 15:36
i took the var but not working
Ene Catalin
@EneCatalin
Jul 10 2018 15:36

var a = 7
var b = 7
var b = a

Assign the value 7 to variable a.

Assign the contents of a to variable b.

ok so the first line is correct
you give a the value of 7
(without the var part, you don't need that)
but then you give b the value of 7
b492ouba
@b492ouba
Jul 10 2018 15:37
yes
Ene Catalin
@EneCatalin
Jul 10 2018 15:37
it doesn't ask you to do that, it tells you to give it the value of a (which yes is 7 but the script is very literal)
so you need to cut that
and just use your third line, b=a
it's just an unneeded line
anyway, yeah, the scripts are very literal
Christopher McCormack
@cmccormack
Jul 10 2018 15:39
@EneCatalin are you able to pass all the tests?
Ene Catalin
@EneCatalin
Jul 10 2018 15:39
but don't worry, you'll reach projects where you don't need to worry about the scripts at all and can write the code however you wish
yes
there's no bug
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:39
emu is here to help
Ene Catalin
@EneCatalin
Jul 10 2018 15:39
you effing stray
@b492ouba did it work ?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:40
:cat2:
b492ouba
@b492ouba
Jul 10 2018 15:42
Do not change code above the line
a should have a value of 7
b should have a value of 7
a should be assigned to b with = Ene catalin this is the question
Ene Catalin
@EneCatalin
Jul 10 2018 15:43
yeah I know I found it
ohhhhhhhhhh
my bad
b492ouba
@b492ouba
Jul 10 2018 15:44
what's wrong
Ene Catalin
@EneCatalin
Jul 10 2018 15:44
that's probs the error message
this is the requirement

Assign the value 7 to variable a.

Assign the contents of a to variable b.

so again
give a the value of 7
and give b the value a
(not of a)
and remember the variables are already declared above
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:46
birds should swim , not fly!
:penguin:
Ene Catalin
@EneCatalin
Jul 10 2018 15:46
I think we need to give him an article about what variables are
pretty fundamental notion
Smootimus
@Smootimus
Jul 10 2018 15:47
MPJ
Ene Catalin
@EneCatalin
Jul 10 2018 15:47
"In computer programming, a variable or scalar is a storage location (identified by a memory address) paired with an associated symbolic name (an identifier), which contains some known or unknown quantity of information referred to as a value. The variable name is the usual way to reference the stored value, in addition to referring to the variable itself, depending on the context. This separation of name and content allows the name to be used independently of the exact information it represents. The identifier in computer source code can be bound to a value during run time, and the value of the variable may thus change during the course of program execution.[1][2]"
wikipedia
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:48
TL;DR: won't read that
Ene Catalin
@EneCatalin
Jul 10 2018 15:49
not everyone is a vue expert that already knows all that stuff cat
we can only aspire to that
b492ouba
@b492ouba
Jul 10 2018 15:50
yes i'm biggner but don't worry
Ene Catalin
@EneCatalin
Jul 10 2018 15:50
cat is actually a world renowned vue js expert (cat being @diomed )
we're all newbies compared to him and he likes to shove it in our face sometimes
May Kittens Devour Your Soul
@diomed
Jul 10 2018 15:52
gosh, I wish
Christopher McCormack
@cmccormack
Jul 10 2018 15:57
@b492ouba I just confirmed you must also use a semicolon at the end of your assignment statement or it will not pass
b492ouba
@b492ouba
Jul 10 2018 15:57
ok thanks
b492ouba
@b492ouba
Jul 10 2018 16:03
anyone know someone who teach Java Script on youtube very well
Kyle Holm
@thekholm80
Jul 10 2018 16:07
@b492ouba Traversy Media does pretty good videos
Ene Catalin
@EneCatalin
Jul 10 2018 16:07
Kyle Holm
@thekholm80
Jul 10 2018 16:07
@EneCatalin oh lordy
Ene Catalin
@EneCatalin
Jul 10 2018 16:07
what ?
it's probs a bit too advanced but the guy is fun
something wrong with it ?
Kyle Holm
@thekholm80
Jul 10 2018 16:08
he's got too much personality lol
Ene Catalin
@EneCatalin
Jul 10 2018 16:08
I love the guy
Kyle Holm
@thekholm80
Jul 10 2018 16:08
i feel like he's going to start singing any minute
maybe with puppets
Ene Catalin
@EneCatalin
Jul 10 2018 16:09
guy has the best intro
ever
Kyle Holm
@thekholm80
Jul 10 2018 16:09
i'm sure his videos are awesome, but just not for me
Ene Catalin
@EneCatalin
Jul 10 2018 16:10
May Kittens Devour Your Soul
@diomed
Jul 10 2018 16:10
who here knows css grid?
Kyle Holm
@thekholm80
Jul 10 2018 16:12
why have i never heard of using ? in object property? i feel like this should be taught on day one
Ene Catalin
@EneCatalin
Jul 10 2018 16:13
is that from the video ?
Kyle Holm
@thekholm80
Jul 10 2018 16:13
yeah lol
Ene Catalin
@EneCatalin
Jul 10 2018 16:13
lol, you decided to grind trough
Kyle Holm
@thekholm80
Jul 10 2018 16:13
so many times i've done something like if (obj.hasOwnProperty('foo')) { obj.foo }
so annoying
Ene Catalin
@EneCatalin
Jul 10 2018 16:14
that's how I write code too lol
is ? the ternary operator ?
I mean in most langauges it is
Kyle Holm
@thekholm80
Jul 10 2018 16:14
his video says you can do obj?.foo
Ene Catalin
@EneCatalin
Jul 10 2018 16:14
cat trying to get banned by using bad words
wtf
you can ?
Kyle Holm
@thekholm80
Jul 10 2018 16:14
and if foo is there you're good, if it's not it will be undefined
May Kittens Devour Your Soul
@diomed
Jul 10 2018 16:15
livin on teh edge
Ene Catalin
@EneCatalin
Jul 10 2018 16:15
weren't you already banned once ? lawl
Kyle Holm
@thekholm80
Jul 10 2018 16:15
once lol
Ene Catalin
@EneCatalin
Jul 10 2018 16:15
more than once ?
Kyle Holm
@thekholm80
Jul 10 2018 16:15
i believe so
Ene Catalin
@EneCatalin
Jul 10 2018 16:16
how is cat the mean one ?
Kyle Holm
@thekholm80
Jul 10 2018 16:18
oh, that's why i've never heard of it ... it's a Stage 1 proposal, hasn't been implemented yet lol
Ene Catalin
@EneCatalin
Jul 10 2018 16:18
lol
again, from the vid ?
why does he talk about it then ?
Kyle Holm
@thekholm80
Jul 10 2018 16:20
revenue
Ene Catalin
@EneCatalin
Jul 10 2018 16:21
isn't that counter productive ? I would be pretty pissed if I had to google 30 mins about why it doesn't work
Kyle Holm
@thekholm80
Jul 10 2018 16:23
i think he figures people will watch more than the first 2 minutes of the video before trying to implement his opening statement in their code
he was wrong, i went right to repl.it to try it out lol
Ene Catalin
@EneCatalin
Jul 10 2018 16:25
I mean just due to presentation I'd probably watch most of his vids
I am just not into JS anymore but the content seems fun
Aditya
@ezioda004
Jul 10 2018 16:27

I think there was another proposal of making private fields in class with #

class Animal{
  #legs = 4;
}

Looks ugly.

Kyle Holm
@thekholm80
Jul 10 2018 16:27
i like decorators in py
Aditya
@ezioda004
Jul 10 2018 16:28
Lol, tc39/proposal-private-methods#10.
@thekholm80 Ye, decorators are also proposed, but meanwhile theres an object called Proxy in JS which works like decorators for objects.
Kyle Holm
@thekholm80
Jul 10 2018 16:31
i feel like i've used Proxy before
oh it was Proxy()
return new Proxy(this, {
Aditya
@ezioda004
Jul 10 2018 16:32
Yeah, thats the one!
Kyle Holm
@thekholm80
Jul 10 2018 16:32
inside a class constructor
pretty handy, but i've forgotten why it was necessary
i think i used it so i could monkey-patch the getter method
Aditya
@ezioda004
Jul 10 2018 16:35
I guess its used to make stuff more readable, or in more general sense "decorate" that object.
Kyle Holm
@thekholm80
Jul 10 2018 16:41
i know in py they make things more readable - i'm not sure how the class decorators work, but for functions the decorator is a function that takes a function as an argument, then adds a wrapper around the arg function
so
def decorator_function(other_function):
  def wrapper():
    other_function()

  return wrapper

# instead of this
def my_function():
  print('yay, i'm a function')

my_function = decorator_function(my_function)

my_function()

# i can do this
@decorator_function
def my_function():
  print('yay, i'm a function')
Mehdi Amlal
@mehdiamlal
Jul 10 2018 17:06
What is a pure component in react?
If your React component’s render() function renders the same result given the same props and state, you can use React.PureComponent for a performance boost in some cases.
Mehdi Amlal
@mehdiamlal
Jul 10 2018 17:10
So basically a pure component is a static/stateless one, that is created using a function?
Christopher McCormack
@cmccormack
Jul 10 2018 17:11
I don't believe that is correct, I believe it is used to prevent a render if the state and props are the same. I believe not PureCompnents will always re-render when there is a state change
But I'm a little unsure myself
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 17:26
a pure component is a component that does not require a state or any lifecycle methods but can take props meaning it does not need to be a class component and can be written like this:
const component = () => <h1>Hello World</h1>
its basically a function that returns jsx
pure components do re-render if any props do change though
thats why they are always used with redux
Christopher McCormack
@cmccormack
Jul 10 2018 17:29
@ahmedtarek2134 I believe that is a stateless functional component (or just "functional" component"), not a PureComponent
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 17:34
oh right sorry for the misconception
Christopher McCormack
@cmccormack
Jul 10 2018 17:35
@ahmedtarek2134 I would agreed with you until I read the React docs on PureComponent :)
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 17:35
tbh i never used them before
but from what im searching it says that it changes the way shouldComponentUpdate lifecycle method works
Christopher McCormack
@cmccormack
Jul 10 2018 17:41
I'm going to play with it this afternoon to see how it really works :)
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 17:43
update me on how it works when you do 😀
Christopher McCormack
@cmccormack
Jul 10 2018 17:47
:thumbsup: will do
May Kittens Devour Your Soul
@diomed
Jul 10 2018 18:17
pen
how can I move 'finicky' box to upper left area?
Mehdi Amlal
@mehdiamlal
Jul 10 2018 18:19
Hey guys! In the las four months I’ve been learning web development, and I’m currently learning React. I’m also considering applying to a job as a junior developer, and I was wondering whether this course is good to prepare for a coding interview or not
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 18:22
what's your skill set as of now?
@diomed after the match kitten im on my phone :smile:
Mehdi Amlal
@mehdiamlal
Jul 10 2018 18:23
I know HTML/CSS/Bootstrap/JavaScript(es6)/Node.js/Express/MongoDB/Mongoose/Mocha
And I’m learning React
May Kittens Devour Your Soul
@diomed
Jul 10 2018 18:24
@ahmedtarek2134 who are you cheering for?
Borussia Dortmund or Dinamo Kiev?
who's playing anyway :D
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 18:32
im cheering for france
its france vs belgium semi final
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 18:37
your skillset should comfortably land you a job but a 10$ course is definitely worth it imo
my internet is about to finish ugh
May Kittens Devour Your Soul
@diomed
Jul 10 2018 18:37
no more internet for you, Tarek
lol, everybody watching football - no1 coding.
shame on you people
Kyle Holm
@thekholm80
Jul 10 2018 18:53
football season doesn't start for a few more weeks
you must mean soccer
May Kittens Devour Your Soul
@diomed
Jul 10 2018 19:01
@thekholm80 soccer is just American world for what football is in Europe
Kyle Holm
@thekholm80
Jul 10 2018 19:02
soccer as a word started in England, which is kind of in Europe
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 19:13
its called football not soccer
debate started
May Kittens Devour Your Soul
@diomed
Jul 10 2018 19:15
only USA speaking people call it soccer coz they stole word football
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 19:16
how's american football called football when they can hold the ball with their hands???
Kaz Baig
@kbaig
Jul 10 2018 19:22
@ahmedtarek2134 @diomed there used to be a bunch of sports known is ___ football, including association football and rugby football
association football is what we call football today, and it got its alternative name from "association"
And in America, rugby football became football
ta da
Christopher McCormack
@cmccormack
Jul 10 2018 19:26
I'm still cool with them changing it to Hand Egg
Kaz Baig
@kbaig
Jul 10 2018 19:26
Same tbh
Christopher McCormack
@cmccormack
Jul 10 2018 19:28
2dr806.jpg
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 19:32
sounds about right to me 🤷‍♂️
Ahmed Tarek
@ahmedtarek2134
Jul 10 2018 19:38
france is winning till now and im happy, 10 minutes to go
May Kittens Devour Your Soul
@diomed
Jul 10 2018 19:54
@thekholm80 mmm yes, what a babyskin :cat:
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:10
hi
can anybody help me with the nav bar?
i i am using css grid, but my nav is still kinda too far left and close to the "logo"
especially when u expand it
i don't want to use left nor right float
Moisés Man
@moigithub
Jul 10 2018 20:25
did u used bootstrap before ?? @Mahdi0123
u could create a "container" class to reduce the width
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:26
no its just css
@moigithub
and i don't want to make a mediaquery when there is enough space on the screen
float is also just to stiff to use
css grid is fluid, but i just gotta get it more to the right
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:33
@Mahdi0123 flex is the answer here
  display:flex;
  justify-content: flex-end;
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:38
@diomed it keeps going farther too the "logo"/left
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:43
@Mahdi0123 wait do u want it closer to logo or what?
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:46
@diomed i want it to be closer to the right and further from the logo
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:52
@Mahdi0123 but it was fine when I put it there, then u changed something :(
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:53
@diomed lol, i took out the css grid
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:54
:/
I thought you wanted it in grid
grid and flex are good friends
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:55
really? lol
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:55
yes, really
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:55
let me try to add it back
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:55
they complement each other
Kyle Holm
@thekholm80
Jul 10 2018 20:56
grid: flexbox you're so nice
flexbox: aww thanks
compliment like that?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:57
>.<
Christopher McCormack
@cmccormack
Jul 10 2018 20:57
While grumpy old display: table cries outside the window
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:57
I spelled that right, and you know it!
Kyle Holm
@thekholm80
Jul 10 2018 20:57
so did i lol
@cmccormack i still see some <tr>s every now and then, kinda makes me shudder
May Kittens Devour Your Soul
@diomed
Jul 10 2018 20:58
It's time to shoot old Yeller...
i mean old table
Mahdi Burhan
@Mahdi0123
Jul 10 2018 20:59
@diomed finally got it - thank you. appreaciate the help
Christopher McCormack
@cmccormack
Jul 10 2018 20:59
Table's still ok when you don't want it to wrap
but not display: table no sir
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:00
table is ok when doing tables
Kyle Holm
@thekholm80
Jul 10 2018 21:00
i thought grid made tables obsolete?
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:00
it did but who knows grid? lol
Kyle Holm
@thekholm80
Jul 10 2018 21:00
i know grid, we went to school together
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:00
it'll take a while
whaaat? then solve me my grid problem Kyle
Kyle Holm
@thekholm80
Jul 10 2018 21:01

have you tried

display: flex;

?

May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:02
align-self does not mean what I think it means
Christopher McCormack
@cmccormack
Jul 10 2018 21:03
@diomed I'm guessing yours would be chaotic evil?
Kyle Holm
@thekholm80
Jul 10 2018 21:03
he's not evil, he's indifferent
so chaotic neutral
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:03
I don't know and I don't care
Kyle Holm
@thekholm80
Jul 10 2018 21:04
ignorant/indifferent then
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:09
@thekholm80 what is this
Kyle Holm
@thekholm80
Jul 10 2018 21:10
antelope on the cantaloupe
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:11
@EneCatalin
Ene Catalin
@EneCatalin
Jul 10 2018 21:11
what about ostrich ?
also sorry ostrich has to go soon
oh the elk on a shell thingy
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:13
yeah
Ene Catalin
@EneCatalin
Jul 10 2018 21:16
well nite
May Kittens Devour Your Soul
@diomed
Jul 10 2018 21:18
good night ostrich