These are chat archives for FreeCodeCamp/Help

9th
Aug 2018
Xarri Jorge
@xarrijorge
Aug 09 2018 00:04
Hey @thekholm80 , wanna lend a hand?
Kyle Holm
@thekholm80
Aug 09 2018 00:05
what with?
Xarri Jorge
@xarrijorge
Aug 09 2018 00:06
THIS. I'm trying to assing the returned object to data variable on the state but I'm hitting a wall.
Kyle Holm
@thekholm80
Aug 09 2018 00:07
i don't see anything that would return object data
Smootimus
@Smootimus
Aug 09 2018 00:07
Me neither >.>
I was lookin'
Xarri Jorge
@xarrijorge
Aug 09 2018 00:07
the fetch method in getData()
Smootimus
@Smootimus
Aug 09 2018 00:08
Thought I was goin' crayz for a min
Kyle Holm
@thekholm80
Aug 09 2018 00:08
image.png
my dude we're not seeing what you're seeing
Xarri Jorge
@xarrijorge
Aug 09 2018 00:08
lemme save and see
Try now
Kyle Holm
@thekholm80
Aug 09 2018 00:11
hmm i've never used fetch
that looks really convoluted
Christopher McCormack
@cmccormack
Aug 09 2018 00:12
@thekholm80 res.json() is about the only convoluted part
Kyle Holm
@thekholm80
Aug 09 2018 00:12
looks like it's working
Xarri Jorge
@xarrijorge
Aug 09 2018 00:13
Just the getData() method. I have a setState method but when I console log outside fetch, I get an empty object.
Kyle Holm
@thekholm80
Aug 09 2018 00:13
  getData = () => {
    let dataObj = {};
    fetch(this.url)
      .then(res => res.json())
      .then(json => {
        this.setState(
          {
            data: json
          },
          () => console.log(this.state.data)
        );
      });
  };
this is logging the correct state
Xarri Jorge
@xarrijorge
Aug 09 2018 00:13
yeah, but its not working outside the fetch call.
Smootimus
@Smootimus
Aug 09 2018 00:13
Hmm
Kyle Holm
@thekholm80
Aug 09 2018 00:13
i'm guessing you've forgotten setState() is asynchronous so you're logging before it resolves
Smootimus
@Smootimus
Aug 09 2018 00:13
^
Kyle Holm
@thekholm80
Aug 09 2018 00:14
that's why i'm passing the log statement as a callback, so i can be sure the update has taken place
Smootimus
@Smootimus
Aug 09 2018 00:17
I'm thinking Fetch might be async tho >.> I don't remember
I haven't really went down that path very far yet I've been in lower level programming land for so long u.u
Kyle Holm
@thekholm80
Aug 09 2018 00:18
see, the data is there
@Smootimus it is, but he's promise chaining with .catch()
to handle the async part
Christopher McCormack
@cmccormack
Aug 09 2018 00:19
fetch is definitely async
Smootimus
@Smootimus
Aug 09 2018 00:19
Oh I seeeeeee
Kyle Holm
@thekholm80
Aug 09 2018 00:19
err then() not catch() lol
Smootimus
@Smootimus
Aug 09 2018 00:19
Yeah I got ya
Kyle Holm
@thekholm80
Aug 09 2018 00:19
well, both really
i quit
i'm going home
Smootimus
@Smootimus
Aug 09 2018 00:20
Hahaha
Xarri Jorge
@xarrijorge
Aug 09 2018 00:21
Okay, I've been looking at it and it is still logging. I'll work through it a little more. @Smootimus @thekholm80
Smootimus
@Smootimus
Aug 09 2018 00:21
Yeah I"m seeing results with the solution Kyle posted
I see the data being presented there
Xarri Jorge
@xarrijorge
Aug 09 2018 00:22
So as you said @thekholm80, I think the call was made too early thats why.
Smootimus
@Smootimus
Aug 09 2018 00:22
Yeah probably
... I know I'm not yawning after I just slept xD
andreb17
@andreb17
Aug 09 2018 00:43

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<main>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

i need some help on this ..the main element should have two paragraph elements as children.
Smootimus
@Smootimus
Aug 09 2018 00:48
That means BOTH the <p> should be inside the <main> element
Instead, one is above and one is in it where it should be
MOve the top one INTO main
Xarri Jorge
@xarrijorge
Aug 09 2018 00:57
@thekholm80 @Smootimus I can't assign object values to variables. I keep getting cannot read property of undefined
Smootimus
@Smootimus
Aug 09 2018 00:58
HOw are you attempt to do this
Christopher McCormack
@cmccormack
Aug 09 2018 00:58
@xarrijorge not knowing what you're doing, I'm assuming you're trying to do something with an async function but assigning values outside of the async callback?
Smootimus
@Smootimus
Aug 09 2018 00:59
Yeah I think that's what he's doin'
Lets see what you're attempting to do, code wise
Xarri Jorge
@xarrijorge
Aug 09 2018 00:59
yep, you got it. I really need to read up on async don't I? @cmccormack
Christopher McCormack
@cmccormack
Aug 09 2018 00:59
@xarrijorge yessir
andreb17
@andreb17
Aug 09 2018 01:00

@Smootimus its not working..<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<main>
<p>purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Christopher McCormack
@cmccormack
Aug 09 2018 01:00
here's how I think about it (you don't have to read)
Xarri Jorge
@xarrijorge
Aug 09 2018 01:01
I just feel so fustrated as this was so simple when I did it with JQuery and now I'm sitting here for six hours trying to assign a damn object
Kyle Holm
@thekholm80
Aug 09 2018 01:01
@andreb17
<h2>...</h2>
<main>
  <p>...</p>
  <p>...</p>
</main>
Smootimus
@Smootimus
Aug 09 2018 01:01
It's cool, don't get frustrated
Christopher McCormack
@cmccormack
Aug 09 2018 01:01
Your code is what you are doing, in order, like a task list. When you add an async function to the mix, what you're actually doing is handing that work off to your buddy Rob to do some other work. You don't stop working because you gave work to Rob though, you keep on going. When Rob finishes the work you gave him, he returns back to you at some point in the future with all the stuff you needed
Smootimus
@Smootimus
Aug 09 2018 01:01
When you start to get frustrated, it's time to stand up and walk around maybe take your mind off it for a bit
@andreb17 Kyle gave ya the hookup
Kyle Holm
@thekholm80
Aug 09 2018 01:02
poor rob, having to do all the grunt work
Christopher McCormack
@cmccormack
Aug 09 2018 01:02
So if you want something to be done that depends on that async function, add that to the instructions you give to Rob so when he returns it's done, and don't expect anything from him until he is done.
andreb17
@andreb17
Aug 09 2018 01:03
ok i just got it thanks guys
Xarri Jorge
@xarrijorge
Aug 09 2018 01:03
Yeah, I took a short nap earlier and it helped.
Smootimus
@Smootimus
Aug 09 2018 01:04
That's what I tend to do :)
lol
Xarri Jorge
@xarrijorge
Aug 09 2018 01:05
You know it is even more frustrating when you know what to do but can't write the write code. Semantics error are the worse.
Kyle Holm
@thekholm80
Aug 09 2018 01:06
once i discovered async / await my life got so much better

i should become some kind of missionary

excuse me sir, have you heard the good news about async & await?

Xarri Jorge
@xarrijorge
Aug 09 2018 01:07
No sir I haven't. Please enlighten me
Christopher McCormack
@cmccormack
Aug 09 2018 01:08
wait man start with promises!
Kyle Holm
@thekholm80
Aug 09 2018 01:08
okay, one sec
Smootimus
@Smootimus
Aug 09 2018 01:09
Ahahaha
Xarri Jorge
@xarrijorge
Aug 09 2018 01:09
I'm waiting sire!
Kyle Holm
@thekholm80
Aug 09 2018 01:10
quick gimme a simple api url
Christopher McCormack
@cmccormack
Aug 09 2018 01:10
wait man start with callback hell!
Smootimus
@Smootimus
Aug 09 2018 01:10
LOL
don't use openweathermap it doesn't support json without a key last I checked
Smootimus
@Smootimus
Aug 09 2018 01:11
That's good to know
Gonna put that knowledge in my back pocket
Christopher McCormack
@cmccormack
Aug 09 2018 01:12
darksky is same actually but I prefer their api
Amit Patel
@AmitP88
Aug 09 2018 01:15
hey guys, in React, is it possible to transfer state between two Child components? I know that it's possible to do so from a Parent to Child component, but I was wondering about siblings sharing state data. Or, would I need Redux to do this?
there you go, click run
basically await means don't do anything further until this promise resolves
Christopher McCormack
@cmccormack
Aug 09 2018 01:17
an extra library when you could have used
const getData = async url => {
    const { data } = await fetch(url).then(res => res.json());
    console.log(data);
}
Kyle Holm
@thekholm80
Aug 09 2018 01:18
chaining with then() is what await is supposed to avoid
fetch is ugly and gross and makes me feel dirty
Christopher McCormack
@cmccormack
Aug 09 2018 01:18
when you actually have to use it though you won't feel that way
I make util functions with fetch that handle all that other stuff too, then it feels great!
Kyle Holm
@thekholm80
Aug 09 2018 01:19
lol
Christopher McCormack
@cmccormack
Aug 09 2018 01:19
@AmitP88 nope
@AmitP88 state is ONLY local to a component
Kyle Holm
@thekholm80
Aug 09 2018 01:19
anyway, headed to dinner. good luck folks
Christopher McCormack
@cmccormack
Aug 09 2018 01:19
you can keep it in a parent and share as props to both children
@thekholm80 I didn't know you ate! see ya
Amit Patel
@AmitP88
Aug 09 2018 01:19
@cmccormack ah ok. Thank you :)
@cmccormack looks like I'm going to need Redux
SylviaCheung
@SylviaCheung
Aug 09 2018 01:20
what's mean "lol"? i'm just curious.
Christopher McCormack
@cmccormack
Aug 09 2018 01:20
Or just put the state in a parent and pass it down
@SylviaCheung laughing out loud
SylviaCheung
@SylviaCheung
Aug 09 2018 01:20
oh,i see
Christopher McCormack
@cmccormack
Aug 09 2018 01:20
or the sweet grandma interpretation of "lots of love"
@AmitP88 Context API is also quite useful before busting out Redux
Amit Patel
@AmitP88
Aug 09 2018 01:21
@cmccormack ah ok. I'll look into it
Smootimus
@Smootimus
Aug 09 2018 01:27
You should feel dirty
Dirty boi
andreb17
@andreb17
Aug 09 2018 01:46
ok guys i need some help

h2>CatPhotoApp</h2>

<main>

<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
<a href=//"freecatphotoapp.com">"catphotos.com"</a>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

<p>

</p>
Your a element should have the anchor text of "cat photos".

You need an a element that links to http://freecatphotoapp.com
@thekholm80 can you help me out
Christopher McCormack
@cmccormack
Aug 09 2018 02:02
@andreb17 <a href=//...?
why did you add the // after the =?
SylviaCheung
@SylviaCheung
Aug 09 2018 02:03
you shoud md
you shoud use md
andreb17
@andreb17
Aug 09 2018 02:04
@cmccormack a href=//"freecatphotoapp.com">"catphotos.com"</a>
Christopher McCormack
@cmccormack
Aug 09 2018 02:04
@andreb17 check out the example <a href="https://freecodecamp.org">this links to freecodecamp.org</a>
how is yours different?
andreb17
@andreb17
Aug 09 2018 02:09
@cmccormack .. <a href=//"freecatphotoapp.com">catphotoapp.com</a>
Christopher McCormack
@cmccormack
Aug 09 2018 02:10
That still isn't the same, compare the href attribute values
andreb17
@andreb17
Aug 09 2018 02:12
@cmccormack . i dont get it
Christopher McCormack
@cmccormack
Aug 09 2018 02:13
You have two // outside the quotes and no http:
andreb17
@andreb17
Aug 09 2018 02:16
<a href=https://"freecatphotoapp.com">catphotoapp.com</a>
not working
SylviaCheung
@SylviaCheung
Aug 09 2018 02:17
'<a href="https://freecatphotoapp.com">catphotoapp.com</a>'
Christopher McCormack
@cmccormack
Aug 09 2018 02:18
@andreb17 check your quotes, compare with example
SylviaCheung
@SylviaCheung
Aug 09 2018 02:20
<a href="https://freecatphotoapp.com">catphotoapp.com</a> , Your double quotation marks are incorrectly placed
why is yourhttps:// outside of ""
andreb17
@andreb17
Aug 09 2018 02:24
<a href="https://freecatphotoapp.com">catphotos.com</a>
not working
dam man i want this bad
Manish Giri
@Manish-Giri
Aug 09 2018 02:27
Your a element should have the anchor text of "cat photos".
you have catphotos.com instead
andreb17
@andreb17
Aug 09 2018 02:29
<a href="https://freecatphotoapp.com">catphotos</a>
not working
Kyle Holm
@thekholm80
Aug 09 2018 02:30
sometimes, you just got to pay attention to the details
take a deep breath, look at your code and see what's different

<a href="https://freecatphotoapp.com">catphotos</a>

Your a element should have the anchor text of "cat photos".

andreb17
@andreb17
Aug 09 2018 02:31

<h2>CatPhotoApp</h2>

<main>

<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
<a href="https://freecatphotoapp.com">catphotos</a>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main

Claudio Restifo
@Marmiz
Aug 09 2018 02:32

@thekholm80 the yoga instructor

take a deep breath

Kyle Holm
@thekholm80
Aug 09 2018 02:32
@Marmiz we'll start today with a sun salutation
SylviaCheung
@SylviaCheung
Aug 09 2018 02:32
You can add it at both ends of the code ``
Claudio Restifo
@Marmiz
Aug 09 2018 02:32
yes, sensei @thekholm80
Kyle Holm
@thekholm80
Aug 09 2018 02:32
namaste
Xarri Jorge
@xarrijorge
Aug 09 2018 02:33
Thought you were going to sleep? @thekholm80
SylviaCheung
@SylviaCheung
Aug 09 2018 02:33
图片.png
andreb17
@andreb17
Aug 09 2018 02:33
thanks guys i just dont see it ??/
Kyle Holm
@thekholm80
Aug 09 2018 02:33
@xarrijorge close, i went to dinner
SylviaCheung
@SylviaCheung
Aug 09 2018 02:33
@andreb17
Claudio Restifo
@Marmiz
Aug 09 2018 02:34

@andreb17 as other pointed out you coded

<a href="https://freecatphotoapp.com">catphotos</a>

a link with the text: catphotos (no space)
But the test wants cat photos (space)

Xarri Jorge
@xarrijorge
Aug 09 2018 02:34
Anyways, I'm reading the chapter on Asynchronous programming from Eloquent JS
Claudio Restifo
@Marmiz
Aug 09 2018 02:35
does it talks about callback hell and why people hate nodeJS? @xarrijorge :smile:
andreb17
@andreb17
Aug 09 2018 02:35
wow thanks
Claudio Restifo
@Marmiz
Aug 09 2018 02:36

@andreb17 you know it's a pretty big difference.
The same that goes from 1 0 (one and zero)
to 10 (ten)
and it's just a space.

Enter in the mindset that programming is 99% being precise

Xarri Jorge
@xarrijorge
Aug 09 2018 02:36
I may not be to that part yet but I'm sure it does @Marmiz
Kyle Holm
@thekholm80
Aug 09 2018 02:37
nobody hates node, that's just silly
SylviaCheung
@SylviaCheung
Aug 09 2018 02:37
It's evening over there and I'm in the morning
Xarri Jorge
@xarrijorge
Aug 09 2018 02:37
The dev community is pretty unanimous in their mocking of flawed technology.
Kyle Holm
@thekholm80
Aug 09 2018 02:37
node is like Mr Rogers or Bob Ross, you just can't hate it
Xarri Jorge
@xarrijorge
Aug 09 2018 02:38
Who are they? @thekholm80
Claudio Restifo
@Marmiz
Aug 09 2018 02:38
@SylviaCheung same timezone as me I see :smiley:
so we can :wave: @thekholm80 ( and @Manish-Giri if he's still up)
Kyle Holm
@thekholm80
Aug 09 2018 02:38
the best people
Xarri Jorge
@xarrijorge
Aug 09 2018 02:38
@Marmiz whats that? I want in!
Manish Giri
@Manish-Giri
Aug 09 2018 02:40
@Marmiz :wave:
Claudio Restifo
@Marmiz
Aug 09 2018 02:40
:sparkles: :confetti_ball:

node is like Mr Rogers or Bob Ross, you just can't hate it

I'll save this for later @thekholm80

Xarri Jorge
@xarrijorge
Aug 09 2018 02:41
Who the hell is Mr. Rogers?
Kyle Holm
@thekholm80
Aug 09 2018 02:41
if only there were some kind of app you could use to find answers to questions
i should invent it
i'll call it ... gaggle. or goggle
guggle?
Claudio Restifo
@Marmiz
Aug 09 2018 02:42
@thekholm80 quack quack go?
Kyle Holm
@thekholm80
Aug 09 2018 02:42
oh dang, that's a good one
i should try that one, i've heard good things actually
Xarri Jorge
@xarrijorge
Aug 09 2018 02:42
or FireWolf
Claudio Restifo
@Marmiz
Aug 09 2018 02:44
@thekholm80 same. One day I'll be brave enough to let the big G go :smile:
Henry
@GitHub-Henry
Aug 09 2018 02:51
I don't know about you, but it's been a beautiful day in my neighborhood
Kyle Holm
@thekholm80
Aug 09 2018 02:51
ah, my neighbor
Henry
@GitHub-Henry
Aug 09 2018 02:51
good to see you
making home made pizza soon
trying out my baking skillls
pizza crust
Kyle Holm
@thekholm80
Aug 09 2018 02:52
baking is more science than art. i really enjoy it
Henry
@GitHub-Henry
Aug 09 2018 02:53
sausage, pepperoni, mushroom and olive today
yes can't be sloppy with baking
Claudio Restifo
@Marmiz
Aug 09 2018 02:53

sausage, pepperoni, mushroom and olive today

I'm italian and I'm ding a little

Henry
@GitHub-Henry
Aug 09 2018 02:55
yes it's italian tonight
or my version of it
ttyl off to make dough
Claudio Restifo
@Marmiz
Aug 09 2018 02:56
don't forget to make it rest! and don't work it too much! :smile:

yes it's italian tonight

I'm in for a big surprise, but there's no such things as a sausage,pepperoni,mushroom,olive pizza in italy.
That's a lifetime jail sentence :smile:

btw sounds good, may I have a slice? <3
Kyle Holm
@thekholm80
Aug 09 2018 02:58
i like the traditional margherita, but i think america perfected the pizza
except chicago. dunno what they were thinking
Claudio Restifo
@Marmiz
Aug 09 2018 03:02
the thing is, if you have fine ingredient... the simplest the better. (like the one you may find in small rural areas)
But for todays industrialised world, I'm not even sure the mozzarella you buy at the store is made with actual milk
Kyle Holm
@thekholm80
Aug 09 2018 03:03
i saw something about how strict italy was on sourcing ingredients for their official pizza. i admire such commitment to tradition, but sometimes you gotta just march in another direction once in a while
Claudio Restifo
@Marmiz
Aug 09 2018 03:07

@thekholm80 just to give you context, a LOT of alimentary product (made in the US) are banned in Italy :)
Just to give you context on how much we actually care about what we eat.

Hell In my family we still don't shop for salami. We go the the nearest farm and by straight from the guy. (same with cheese)

Kyle Holm
@thekholm80
Aug 09 2018 03:11
i made my own mcdonalds once
Manish Giri
@Manish-Giri
Aug 09 2018 03:11
@Marmiz do you watch soccer
If I were in Italy, I'd have prolly gone to the Allianz or San Siro every other weekend
lol
Claudio Restifo
@Marmiz
Aug 09 2018 03:12
@Manish-Giri since I'm abroad not anymore. Timezone is just too much. Was never into much tho. Only watched the "main" one :)

San Siro

been there tons of times. I used to live in Milan :heart:

Manish Giri
@Manish-Giri
Aug 09 2018 03:12
oh man i'm jealous
AC Milan vs Inter
stuff of dreams
andreb17
@andreb17
Aug 09 2018 03:31

<h2>CatPhotoApp</h2>

<main>

<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
<a href="https://freecatphotoapp.com">cat photos</a>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main

You need an a element that links to http://freecatphotoapp.com
Rahul
@Rahul59738571_twitter
Aug 09 2018 03:52
what is ur que exactly?
u want to link it?
andreb17
@andreb17
Aug 09 2018 04:01
a element that links to http://freecatphotoapp.com..its not letting me pass
Claudio Restifo
@Marmiz
Aug 09 2018 04:08
@andreb17 again... you NEEED to be 100% precise. Look at the request, and what you wrote.
They differ
KOFW
@KOFW
Aug 09 2018 05:51
<P>Hello Paragraph
</p> why it show that there is no the end mark
陈达
@dacychen
Aug 09 2018 05:53
P not suit for p ?
KOFW
@KOFW
Aug 09 2018 05:53
thanks
陈达
@dacychen
Aug 09 2018 05:54
aha
Fay Vor
@phavor
Aug 09 2018 09:14

Hi guys. I have a webpack.config file that looks like this

const path = require("path");

module.exports = {
  entry: ["babel-polyfill", "./src/components/index.js"],
  output: {
    path: path.resolve(__dirname, "public/scripts"),
    filename: "bundle.js"
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: {
          loader: "babel-loader",
          options: {
            presets: ["env"],
            plugin: ['transform-object-rest-spread']
          }
        }
      }
    ]
  },
  devServer: {
    contentBase: path.resolve(__dirname, "public"),
    publicPath: "/scripts/"
  },
  devtool: "source-map"
};

but when I run npm run dev-server which is my script that starts webpack I get an error. I'll share the screenshot

babel-loader-error.png

This is the error I get

babel-loader-error.png

KOFW
@KOFW
Aug 09 2018 09:56
Maybe,you could ues Google
Smootimus
@Smootimus
Aug 09 2018 11:44
Hello everyone :D
Kyle Holm
@thekholm80
Aug 09 2018 13:11
@Smootimus :wave:
Smootimus
@Smootimus
Aug 09 2018 13:11
:wave:
How's it goin'
Kyle Holm
@thekholm80
Aug 09 2018 13:13
chugged my first cup of coffee, so things are looking up
you?
Smootimus
@Smootimus
Aug 09 2018 13:13
Nice, nice
I'm still trying to get my coffee in as well
LoL half way through a medium one from Dunkies
Sitting in my Windows Networking class this morning :)
Got out at 11:15 I'm pretty sure
Kyle Holm
@thekholm80
Aug 09 2018 13:15
i keep thinking how great it would be to go to college, then I think of all the 18-19 year olds i'd be in class with. I'm not sure I could handle that
Smootimus
@Smootimus
Aug 09 2018 13:15
That's honestly
The biggest pain point lol
Straight up
I mean it's not SO bad
Sometimes :eyes:
Kyle Holm
@thekholm80
Aug 09 2018 13:16
oh man, yesterday's xkcd is awesome
Smootimus
@Smootimus
Aug 09 2018 13:17
What was it, enlighten me
Kyle Holm
@thekholm80
Aug 09 2018 13:17
Smootimus
@Smootimus
Aug 09 2018 13:18
LMAO
Wear gloves
Xarri Jorge
@xarrijorge
Aug 09 2018 13:54
:wave:
@thekholm80 I had that same problem for years. I finally decided to change the method and do an try college. Starting in September
Ene Catalin
@EneCatalin
Aug 09 2018 15:02
18-19 year olds are great, except they don't have manly beards, don't discriminate
@xarrijorge that's cool, i hope you enjoy it
Xarri Jorge
@xarrijorge
Aug 09 2018 15:16
:laughing: :laughing: that is gold! @thekholm80
The need for state management has just become real apparent. I'll have to brave the redux/mobx storm.
Kyle Holm
@thekholm80
Aug 09 2018 15:19
this is how i learned redux
Christopher McCormack
@cmccormack
Aug 09 2018 15:33
@phavor heya not sure if you solved your issue already but it should be plugins not plugin
Kyle Holm
@thekholm80
Aug 09 2018 15:34
@EneCatalin it's not that i dislike 18-19 year olds, it's just tough to be 20 years older than everyone else, especially when everyone else can't even imagine what it's like to be 20 years older than someone
Smootimus
@Smootimus
Aug 09 2018 15:37
Yeah it makes it tough to relate
Like I only really relate to one other student in a class with maybe 25 people
:eyes:
Cause he was in the military too, and he's a little older
Kyle Holm
@thekholm80
Aug 09 2018 15:37
and i really dislike the thought of being older than my teacher
Smootimus
@Smootimus
Aug 09 2018 15:37
So, the rest of them it's almost impossible to even communicate with them
Yeah I think I'm older than my C++ teacher
:eyes:
Christopher McCormack
@cmccormack
Aug 09 2018 15:38
I'm friends with a few of my uni teachers because we were the same age when I was in
Smootimus
@Smootimus
Aug 09 2018 15:38
lol
I'm like that with Sal, my windows networking professor
Cause we're pretty much on the same page, tho I think he's a little older than me. Not by much
KOFW
@KOFW
Aug 09 2018 15:38
lol is a game??
Smootimus
@Smootimus
Aug 09 2018 15:38
League of Legends?
Kyle Holm
@thekholm80
Aug 09 2018 15:39
yes lol
it also means 'laugh out loud'
Smootimus
@Smootimus
Aug 09 2018 15:39
heh
Yeah, both
Kyle Holm
@thekholm80
Aug 09 2018 15:39
generally, here, we're not referring to the game
Christopher McCormack
@cmccormack
Aug 09 2018 15:42
My grandma thinks its "lots of love" which I think is very sweet but does lead to some issues of context
"Grandpa passed, lol"
Kyle Holm
@thekholm80
Aug 09 2018 15:42
haha
i'd like to think maybe she just has a great sense of humor
Smootimus
@Smootimus
Aug 09 2018 15:43
Hahahaa
Christopher McCormack
@cmccormack
Aug 09 2018 15:43
haha
KOFW
@KOFW
Aug 09 2018 15:43
emm
Smootimus
@Smootimus
Aug 09 2018 15:43
Emm?
Kyle Holm
@thekholm80
Aug 09 2018 15:43
electricity makes money
elephants model mumus
Smootimus
@Smootimus
Aug 09 2018 15:44
For certain
It does
lol
KOFW
@KOFW
Aug 09 2018 15:45
maybe I need a translator,because I am not good in English.
Smootimus
@Smootimus
Aug 09 2018 15:45
Ah, sorry
Kyle Holm
@thekholm80
Aug 09 2018 15:46
we just type bad english, it's not your fault
Smootimus
@Smootimus
Aug 09 2018 15:46
^ so true
We're using slang expressions most the time lol
Kyle Holm
@thekholm80
Aug 09 2018 15:46
fo shizzle
Smootimus
@Smootimus
Aug 09 2018 15:46
My nizzle!
Ene Catalin
@EneCatalin
Aug 09 2018 15:46
@thekholm80 they'll just envy the beard and move on
as is life
Smootimus
@Smootimus
Aug 09 2018 15:47
Fo sho
I'm about to start reading the bible...
The Bjarne bible
The word of Stroustrup
Ene Catalin
@EneCatalin
Aug 09 2018 15:48
the 2k pages bible ?
Smootimus
@Smootimus
Aug 09 2018 15:48
Yeah
About that lol
Give or take a few pages from appendices
Ene Catalin
@EneCatalin
Aug 09 2018 15:49
ostrich tried reading that as his first programming book
you can guess how that went
Smootimus
@Smootimus
Aug 09 2018 15:49
Was a tough bit to chew through, huh?
KOFW
@KOFW
Aug 09 2018 15:49
I cannot understand "Fo shu"what does that mean?
Ene Catalin
@EneCatalin
Aug 09 2018 15:49
dropped it
Smootimus
@Smootimus
Aug 09 2018 15:49
Yeah I bet lol
Ene Catalin
@EneCatalin
Aug 09 2018 15:49
didn't understand much
3 years later it would probably still be over my head
Smootimus
@Smootimus
Aug 09 2018 15:49
There's some topics he covers that I'm just like "Whoa bro, you threw that in there way too fast"
@KOFW It's just us joking
KOFW
@KOFW
Aug 09 2018 15:50
o.o
Smootimus
@Smootimus
Aug 09 2018 15:50
O.o
Kyle Holm
@thekholm80
Aug 09 2018 15:50
This message was deleted
Ene Catalin
@EneCatalin
Aug 09 2018 15:51
also @thekholm80 think about all the 18 year old women. Insufferable ? Sure, but hawt af
Smootimus
@Smootimus
Aug 09 2018 15:52
Yeah there's quite a bit of that
Ene Catalin
@EneCatalin
Aug 09 2018 15:52
except you'll study cs so that's the 18 yaer old woman
Smootimus
@Smootimus
Aug 09 2018 15:52
There was some dressed to kill yesterday
:|
I was like :O
Ene Catalin
@EneCatalin
Aug 09 2018 15:52
may god bless the mighty cleavage
Smootimus
@Smootimus
Aug 09 2018 15:52
Haha
Kyle Holm
@thekholm80
Aug 09 2018 15:52
that would be a good thing before the internet, but now ... meh
Smootimus
@Smootimus
Aug 09 2018 15:52
Meeeeh
Ene Catalin
@EneCatalin
Aug 09 2018 15:53
IRL beats video
Smootimus
@Smootimus
Aug 09 2018 15:53
I try and just look at the floor lol
Kyle Holm
@thekholm80
Aug 09 2018 15:53
the interwebs are full of 18-19 year old women that don't want anything to do with me, i don't need to go seek them out
Smootimus
@Smootimus
Aug 09 2018 15:53
Keep my eyes where my feet are traveling
Make it to the door!
SAFE!
shooo
Ene Catalin
@EneCatalin
Aug 09 2018 15:53
me too, but a bit above it
just a meter or so
or at the trees if they look at me
walls are very interesting
Smootimus
@Smootimus
Aug 09 2018 15:54
Very lol
Christopher McCormack
@cmccormack
Aug 09 2018 15:54
@thekholm80 lol
Ene Catalin
@EneCatalin
Aug 09 2018 15:55
@thekholm80 use the beard, one is bound to have a fetish
Kyle Holm
@thekholm80
Aug 09 2018 15:55
maybe someone who loved Dumbledore?
or Gandolf
Ene Catalin
@EneCatalin
Aug 09 2018 15:55
also use the alchool college parties bring
Kyle Holm
@thekholm80
Aug 09 2018 15:55
oh no, not going to jail for that lol
KOFW
@KOFW
Aug 09 2018 15:55
You are all playing lol,I wan to kown that if you play thr King Glory???
Ene Catalin
@EneCatalin
Aug 09 2018 15:56
what jail ?
Smootimus
@Smootimus
Aug 09 2018 15:56
I not actually play LoL in a very long time
I play Skyrim now u.u
Ene Catalin
@EneCatalin
Aug 09 2018 15:56
DOTES
Smootimus
@Smootimus
Aug 09 2018 15:56
Or IO games, pretty much exclusively
And GTA 5 >.>
Kyle Holm
@thekholm80
Aug 09 2018 15:56
LoL community was too toxic. shame really because i thought the game was fun
Ene Catalin
@EneCatalin
Aug 09 2018 15:56
managed to drop that after 3 years and 1-2k hours
Smootimus
@Smootimus
Aug 09 2018 15:56
Yeah
It really was toxic
I agree
Ene Catalin
@EneCatalin
Aug 09 2018 15:56
can't touch it again, legit afraid
never seen something that addictive
Smootimus
@Smootimus
Aug 09 2018 15:56
I was into DOTA when it was on WC
But Dota 2
I couldn't get into
I couldn't get into Heroes of the Storm either
Ene Catalin
@EneCatalin
Aug 09 2018 15:57
been updated a lot, it's legit great
Smootimus
@Smootimus
Aug 09 2018 15:57
Cause LoL was so
Great to me
Over them
Ene Catalin
@EneCatalin
Aug 09 2018 15:57
too damn addictive
Smootimus
@Smootimus
Aug 09 2018 15:57
I don't really play many games any more
Instead, I watch people play them on Youtube xD
Ene Catalin
@EneCatalin
Aug 09 2018 15:58
I play HS sometimes
Smootimus
@Smootimus
Aug 09 2018 15:58
Cause they're much better at them than I
ANd I don't have to do all the grinding
Cause I really just wanna see the storyline :D
Ene Catalin
@EneCatalin
Aug 09 2018 15:58
I love story games, no grind
Smootimus
@Smootimus
Aug 09 2018 15:58
I code and read, while watching some NES and SNES play throughs lol
Ene Catalin
@EneCatalin
Aug 09 2018 15:58
the batman series rocked btw, def recommend
Kyle Holm
@thekholm80
Aug 09 2018 15:58
i'm just waiting for diablo 4
Smootimus
@Smootimus
Aug 09 2018 15:58
Yeah I maxed out D3
Bring on the D4!
Kyle Holm
@thekholm80
Aug 09 2018 15:58
i loved D3 soooo much
Smootimus
@Smootimus
Aug 09 2018 15:59
I enjoyed it when it first came out
I played religiously
Ene Catalin
@EneCatalin
Aug 09 2018 15:59
they won't, they still need to milk the cashcow
Smootimus
@Smootimus
Aug 09 2018 15:59
It was great
Kyle Holm
@thekholm80
Aug 09 2018 15:59
and i play some path of exile sometimes to scratch the itch
Smootimus
@Smootimus
Aug 09 2018 15:59
I picked it up about a year ago too
And played hard core
But I haven't in a bit
I played that only once
WHen I was in the military
I saw it right at the end of my career
Didn't really get too into it
Ene Catalin
@EneCatalin
Aug 09 2018 15:59
btw is overwatch good ?
Smootimus
@Smootimus
Aug 09 2018 15:59
NEver played it
Ene Catalin
@EneCatalin
Aug 09 2018 15:59
it's either that or the new BF game, whatever they release
Kyle Holm
@thekholm80
Aug 09 2018 15:59
it looks so good, but multi-player is cancer
Aditya
@ezioda004
Aug 09 2018 16:00
Its fun, game takes < 10 mins
Ene Catalin
@EneCatalin
Aug 09 2018 16:00
multi player is great, just be a griefer
Aditya
@ezioda004
Aug 09 2018 16:00
Its barely cancerous, unless competitive
Ene Catalin
@EneCatalin
Aug 09 2018 16:00
bf2 had MP done right, squads of 4 or 6
or you could go solo
Aditya
@ezioda004
Aug 09 2018 16:00
They award loot boxes if you behave, so its nice lol
Kyle Holm
@thekholm80
Aug 09 2018 16:01
i play for fun, i can't stand playing with/against people who feel their entire life is riding on the outcome of a single match
Ene Catalin
@EneCatalin
Aug 09 2018 16:01
that sounds like a great system
that's why you mute
Smootimus
@Smootimus
Aug 09 2018 16:01
Yeah I agree
Aditya
@ezioda004
Aug 09 2018 16:01
Yeah "endorsements"
Ene Catalin
@EneCatalin
Aug 09 2018 16:01
and report
Smootimus
@Smootimus
Aug 09 2018 16:01
That's why I got away from Destiny
Cause wtf man
I don't even wanna play Crucible
Kyle Holm
@thekholm80
Aug 09 2018 16:01
destiny looked like a ton of fun too
Smootimus
@Smootimus
Aug 09 2018 16:01
ANd it forces me to
I was getting alright at it
AH man, I got so into Destiny
Ene Catalin
@EneCatalin
Aug 09 2018 16:01
if you let that shit get to you you become toxic too
Smootimus
@Smootimus
Aug 09 2018 16:01
I spent 100 on Destiny 2 the night it came out
It's a grinding game, tho
Like Diablo
Gear grind
IT can be fun
BUt it gets so repetitive
Cause they don't have tons of content
Ene Catalin
@EneCatalin
Aug 09 2018 16:02
I hate grinding unless there's a lot of story there
Smootimus
@Smootimus
Aug 09 2018 16:02
And the stories are SHORT
Very
Like an expansion
Ene Catalin
@EneCatalin
Aug 09 2018 16:02
in SP games I use cheat engine for ANYTHING grind related
Smootimus
@Smootimus
Aug 09 2018 16:02
I can run through in a night probably
And they rely on that
Ene Catalin
@EneCatalin
Aug 09 2018 16:02
takes about 30 seconds instead of 30 hours
Aditya
@ezioda004
Aug 09 2018 16:02
Diablo have new stuff coming, heard they'll announce in the blizzcon
Smootimus
@Smootimus
Aug 09 2018 16:02
BUt it can be wicked fun
Ene Catalin
@EneCatalin
Aug 09 2018 16:03
oh if you guys like LOTR there's a series
REALLY great series
Kyle Holm
@thekholm80
Aug 09 2018 16:03
diablo has been hiring a full new dev team, i'm sure it's going to be D4 they announce
Smootimus
@Smootimus
Aug 09 2018 16:03
Yeah I saw postings about that as well
Somewhere, not too long ago
Kyle Holm
@thekholm80
Aug 09 2018 16:04
@EneCatalin i got shadows of mordor, but only played a few minutes in
Aditya
@ezioda004
Aug 09 2018 16:04
Diablo the mobile game
Kyle Holm
@thekholm80
Aug 09 2018 16:04
seemed fun though
Ene Catalin
@EneCatalin
Aug 09 2018 16:04
yeah it really rocks
batman like combat system
Smootimus
@Smootimus
Aug 09 2018 16:04
Yeah that game does rock
Felt Assasin Creed ish
Alright reading/study time
Ene Catalin
@EneCatalin
Aug 09 2018 16:05
Deus ex (haven't played the last one in the series, people hated it) also rules
stealth oriented though
Kyle Holm
@thekholm80
Aug 09 2018 16:05
i like stealth games. i loved dishonered
i have the second one but haven't tried it yet
Ene Catalin
@EneCatalin
Aug 09 2018 16:06
then maybe deus would work
I don't have the cash but I'd buy a PS4 and play the UFC games
that sport is fun af to watch
seen a guy with a broken ankle win a whole round (and finally the match)
Kyle Holm
@thekholm80
Aug 09 2018 16:08
dang
Ene Catalin
@EneCatalin
Aug 09 2018 16:08
can't remmeber the fight but it was def this year
his opponent got hit in the head really bad the previous round and had no idea so when the guy fell he went to the ground after him lol
(I mean he was disoriented af when the round started)
Kyle Holm
@thekholm80
Aug 09 2018 16:09
the only sport i watch is disc golf
Aditya
@ezioda004
Aug 09 2018 16:10
Same, except I watch mini golf
Ene Catalin
@EneCatalin
Aug 09 2018 16:11
how is that engaging, at all ?
Aditya
@ezioda004
Aug 09 2018 16:12
Its not, I was trying to be funny
May Kittens Devour Your Soul
@diomed
Aug 09 2018 16:27
:sunny:
Deus ex
pfft.
I'm more like
Deus Vult
Yashwardhan Pauranik
@yashwp
Aug 09 2018 18:02
@yashwp
image.png
I want to know how can I achieve to generate this automatic preview of the link I have just pasted in compose post block of FB in Angular. Or what it is called. Is there some library for angular which do this same functionality?
Josh Queen
@josh-queen
Aug 09 2018 18:20
Hey guys
Working on the survey form
How do I get the inputs (radio, checkboxes) to appear to the right of their selections?
Nevermind, figured it out!
Xarri Jorge
@xarrijorge
Aug 09 2018 18:38
just got a new lease on my Chromebook with termux.
Aita Kane
@aita-kane
Aug 09 2018 20:53
hello everybody i was wondering what language can allow a group of people to do their homework online ? For instance, the teacher will post an exercise and the students will be able to do it after they logged in ? Thank you for your help
Kyle Holm
@thekholm80
Aug 09 2018 20:58
i only really know english, but i'd imagine all languages could?
Saksham-Bhardwaj
@Saksham-Bhardwaj
Aug 09 2018 21:06
🤣
Lee Arnold
@nsanity1
Aug 09 2018 22:30
hi all :wave:
Christopher McCormack
@cmccormack
Aug 09 2018 22:44
@nsanity1 hi
Lee Arnold
@nsanity1
Aug 09 2018 22:46
How goes it?
Christopher McCormack
@cmccormack
Aug 09 2018 22:57
@nsanity1 good good almost done with work for the day I hope
yourself?
Smootimus
@Smootimus
Aug 09 2018 23:01
Just ordered food :D
Lee Arnold
@nsanity1
Aug 09 2018 23:01
doing ok...trying to figure out issues with my last html/css challenge....have 10/12
Smootimus
@Smootimus
Aug 09 2018 23:01
What's up, let's see what ya got
Kyle Holm
@thekholm80
Aug 09 2018 23:01
@nsanity1 :wave:
Lee Arnold
@nsanity1
Aug 09 2018 23:04
one sec...roommate was sharing some interesting news
and hey @thekholm80
the pen
the challenge
i'm stuck on the last section, #2
and i am trying to figure out how to do the links for projects and my social media
Christopher McCormack
@cmccormack
Aug 09 2018 23:07
@nsanity1 there's no anchor tag around your social media
Lee Arnold
@nsanity1
Aug 09 2018 23:07
i'm building that
trying to make the box itself the think you click
not the word
Christopher McCormack
@cmccormack
Aug 09 2018 23:08
gotcha
you would still use an anchor tag
Lee Arnold
@nsanity1
Aug 09 2018 23:08
how would I work it in? i tried it before and it didnt seem to work
Smootimus
@Smootimus
Aug 09 2018 23:09
<a
Is anchor tag
There's some attributes you need to set inside it tho
Lee Arnold
@nsanity1
Aug 09 2018 23:09
yea, know that part
Smootimus
@Smootimus
Aug 09 2018 23:09
life hyperlink reference
Lee Arnold
@nsanity1
Aug 09 2018 23:09
trying to set it up to where the box gains the <a> attributes
What box
Lee Arnold
@nsanity1
Aug 09 2018 23:11
i'm trying to do what FCC did in their example
the boxes at the bottom in the social media section
Christopher McCormack
@cmccormack
Aug 09 2018 23:12
@nsanity1 for the last problem, you can use something like height: 100vh;
Lee Arnold
@nsanity1
Aug 09 2018 23:12
ok....do i assign that to the nav or another element?
Smootimus
@Smootimus
Aug 09 2018 23:13
YOu have them as spans instead of anchors
Christopher McCormack
@cmccormack
Aug 09 2018 23:13

My portfolio should have a Welcome section with an id of "welcome-section".

...

The height of the welcome section should be equal to the height of the viewport.

Lee Arnold
@nsanity1
Aug 09 2018 23:13
backtrack....vh = viewport?
Christopher McCormack
@cmccormack
Aug 09 2018 23:13
viewport height
Lee Arnold
@nsanity1
Aug 09 2018 23:14
@Smootimus yea, i want the box to be there and then like you see in FCC's example, when you hover it shifts color and you click it to go to the page/target
@cmccormack gotcha
Smootimus
@Smootimus
Aug 09 2018 23:15
Yeah you use CSS to do that
But you want it to be a link so it needs to be an a
element
So make it an <a with a class="name it here"
Then you'll style the class
in CSS
.class:hover {
background-color: change it;
}
Something like that
Lee Arnold
@nsanity1
Aug 09 2018 23:16
will that allow for the box?
Smootimus
@Smootimus
Aug 09 2018 23:16

And style the .class {

}

Yeah you can keep the box in css
when you style just the .class
give it a border, change it's color, make it whatever you want
Lee Arnold
@nsanity1
Aug 09 2018 23:17
ok
Smootimus
@Smootimus
Aug 09 2018 23:17
and just have .class:hover change it's background color
They gave theirs a class of "contact-details
Lee Arnold
@nsanity1
Aug 09 2018 23:17
how do you see their code?
Smootimus
@Smootimus
Aug 09 2018 23:18
I'll go ahead and tell you, just so you can see the example
But try not and look at their code as much as possible ;)
On the codepen editor, click on change view
And click on Editor
Lee Arnold
@nsanity1
Aug 09 2018 23:18
ok
that makes sense...ol
lol*
Christopher McCormack
@cmccormack
Aug 09 2018 23:19
What's the old parable? " Never look into someone else's code and ask why they have better code than you; instead, look into their code to ensure their code is good enough"?
Smootimus
@Smootimus
Aug 09 2018 23:19
LOL
Christopher McCormack
@cmccormack
Aug 09 2018 23:20
--watermark
Lee Arnold
@nsanity1
Aug 09 2018 23:20
@cmccormack interesting statement
Kyle Holm
@thekholm80
Aug 09 2018 23:26
@cmccormack sounds pretty judgy to me
i like to look at people's code and try to figure out what/if they were thinking when the wrote it
Christopher McCormack
@cmccormack
Aug 09 2018 23:26
But what if they dumb?
Smootimus
@Smootimus
Aug 09 2018 23:27
If
lol
Kyle Holm
@thekholm80
Aug 09 2018 23:27
i generally start with that assumption lol
Smootimus
@Smootimus
Aug 09 2018 23:27
Hahaha
Kyle Holm
@thekholm80
Aug 09 2018 23:27
"did you open your editor and let the cat walk on the keyboard for 20 min?"
Christopher McCormack
@cmccormack
Aug 09 2018 23:28
A million cats and a million keyboards still can't figure out a good state solution for React
Lee Arnold
@nsanity1
Aug 09 2018 23:28
lol....the things you learn in the gitter chat
Kyle Holm
@thekholm80
Aug 09 2018 23:28
for all you folks lurking: I'm joking. I don't judge you or your code, I'm just here to help if you have questions
Smoot totally judges though
Christopher McCormack
@cmccormack
Aug 09 2018 23:29
All code is beautiful in its own way
Lee Arnold
@nsanity1
Aug 09 2018 23:29
i feel judged
Kyle Holm
@thekholm80
Aug 09 2018 23:30

sounds like something a mother would say to an ugly kid

All code is beautiful in its own way

Lee Arnold
@nsanity1
Aug 09 2018 23:30
wow
Kyle Holm
@thekholm80
Aug 09 2018 23:30
your code is beautiful on the inside
it has great personality
Lee Arnold
@nsanity1
Aug 09 2018 23:30
does code have an inside?
Karma Drukpa
@coderkarma
Aug 09 2018 23:31
@thekholm80
@cmccormack
need little guidance on this one
not able to push the output that i wanted of this question
Christopher McCormack
@cmccormack
Aug 09 2018 23:35
@coderkarma I would help but I'm about to go smoke some steaks - I'll see you all later!
Karma Drukpa
@coderkarma
Aug 09 2018 23:35
function scoreboard(string) {
  // declare score obj
   let scoreObj = {
     nill :  0,
     two  :  2,
     three : 3,
     four : 4,
     five : 5,
     six : 6,
     seven : 7,
     eight : 8,
     nine : 9
   };

  // declare empty array
   let result = [];
  // convert string into arr
  let newArr = string.split(' ');

  //loop through converted arr
    for (let i = 0; i < newArr.length; i += 1){
  // replace the element and push last and secondlast ele in to empty arry
      let ele = newArr[i];
      // I Definately want to push these last and secondLast last value after replacing stirng to value
    //   let last = newArr[newArr.length -1];
    //   let secondLast = newArr[newArr.length - 2];
      if(scoreObj[ele] !== undefined){
         result.push(scoreObj[ele]);
     }
  // return element;
  }
  return result;
}
scoreboard("The score is four nil"); //, [4,0], "Should return: [4,0]"
Kyle Holm
@thekholm80
Aug 09 2018 23:35
@cmccormack have fun
Karma Drukpa
@coderkarma
Aug 09 2018 23:36
@cmccormack have fun
Christopher McCormack
@cmccormack
Aug 09 2018 23:36
Thanks!
Kyle Holm
@thekholm80
Aug 09 2018 23:37
man you're all about some loops
not quite sure why though
oh wait, i get what you're doing
nm i see you used it
okay, so what output are you getting?
Karma Drukpa
@coderkarma
Aug 09 2018 23:40
that would be the element of the arr
just 4
[4]
i am suppose to get [4, 0]
Kyle Holm
@thekholm80
Aug 09 2018 23:40
how did they spell nil, and how did you spell it?
Karma Drukpa
@coderkarma
Aug 09 2018 23:42
hahaha
sorry
thank you
it was just a l
Kyle Holm
@thekholm80
Aug 09 2018 23:42
:+1:
Karma Drukpa
@coderkarma
Aug 09 2018 23:42
thing
how would you do it in your way @thekholm80
any map or filter working in this scenario?
Kyle Holm
@thekholm80
Aug 09 2018 23:43
hmm
probably fairly similar
Karma Drukpa
@coderkarma
Aug 09 2018 23:46
oh ok
Kyle Holm
@thekholm80
Aug 09 2018 23:46
function scoreboard(string) {
  const lookup = ["nil", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"];
  return string.split(' ').reduce((a, b) => lookup.includes(b) ? [...a, lookup.indexOf(b)] : a, []);
}
there you go
Karma Drukpa
@coderkarma
Aug 09 2018 23:47
dmann...
that is good one
I like it
Kyle Holm
@thekholm80
Aug 09 2018 23:47
it's not very optimal, but it looks flashy
that's some poor performing code
i like this guy's solution:
function scoreboard(string) {
  var arr=string.split(' ');
  var a=['nil','one','two','three','four','five','six','seven','eight','nine']
  return [a.indexOf(arr[arr.length-2]),a.indexOf(arr[arr.length-1])];
}
no loops
Karma Drukpa
@coderkarma
Aug 09 2018 23:49
i still get confuse with reduce, filter and maping, while using arrow function even though i know what the value or callbacks they accepts
yees
yes
Smootimus
@Smootimus
Aug 09 2018 23:49
funfunfunction
That's who ya need
Karma Drukpa
@coderkarma
Aug 09 2018 23:49
second one is good
Karma Drukpa
@coderkarma
Aug 09 2018 23:52
@Smootimus I am trying to use these higher order functions most of time but I am get stuck while using these but i felt these things are very powerful and makes things easy and better .
Kyle Holm
@thekholm80
Aug 09 2018 23:52
@coderkarma they're not always the best choice
Karma Drukpa
@coderkarma
Aug 09 2018 23:52
thanks for the link . this video looks very good
Smootimus
@Smootimus
Aug 09 2018 23:52
They can
Np man he does a really good job
Of breaking it down and actually explaining what's going on
Yeah it's all about how/what you're trying to apply
Kyle Holm
@thekholm80
Aug 09 2018 23:53
i'm not even clicking that link, i remember the last time you said some guy explained code good on youtube. it was like watching jack's septic eye or markiplier explain code
Smootimus
@Smootimus
Aug 09 2018 23:53
LOL MPJ
It's probably the same dude xD
He's had his ups and downs
Kyle Holm
@thekholm80
Aug 09 2018 23:54
like bi-polar?
Smootimus
@Smootimus
Aug 09 2018 23:54
Nah, nah lol
Like he did some good content then became all about monies
Patreon typa dude now
Kyle Holm
@thekholm80
Aug 09 2018 23:55
oh yeah. i hate that quality goes down once youtubers think they're gonna get rich
Smootimus
@Smootimus
Aug 09 2018 23:55
Yep
And then he started getting like... really opinionated
And changed. :\
Kyle Holm
@thekholm80
Aug 09 2018 23:56
worse than all us?
Smootimus
@Smootimus
Aug 09 2018 23:56
Way lol
Karma Drukpa
@coderkarma
Aug 09 2018 23:56
@thekholm80 but most programmer uses these higher order function most of the time. and I have seen it, it applies in majority i guess.
Kyle Holm
@thekholm80
Aug 09 2018 23:57
@coderkarma just because a lot of people do something, it doesn't mean it's always the best thing to do
popularity !== quality
i don't write anything that has to be optimized so i can be lazy and write things that look pretty
or fancy, at least
Karma Drukpa
@coderkarma
Aug 09 2018 23:58
make sense