These are chat archives for FreeCodeCamp/Help

24th
Jun 2018
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:00
Even an automated download script would hardly affect your server, lol
I mean, my servers have 750 Mbit up/down. Good luck trying to cap that by downloading >1kb files continuesly xD
anthonygallina1
@anthonygallina1
Jun 24 2018 00:03
@bjorno43 Nice
I bet compliance scripts are going to sell well on code canyon
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:05
Oh yes, definitely
I actually got a very interesting idea yesterday when I was talking with @thekholm80
Creating a WYSIWYG editor that creates websites with Materialize CSS or Bootstrap or other CSS frameworks
It would be a huge project that's pretty impossible to do alone, but I'm pretty sure there's a huge market right there
anthonygallina1
@anthonygallina1
Jun 24 2018 00:10
GoDaddy does theres with node
Lots of tv adds here on it
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:11
Ye that's the problem with those services. Lots of ads and other crap
anthonygallina1
@anthonygallina1
Jun 24 2018 00:11
i saw the node when I was out building some thing and looking up docs
Well tv is good pr
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:13
True
anthonygallina1
@anthonygallina1
Jun 24 2018 00:13
radio too
Sounds like a good project
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:14
Ye. But as I said, you're going to need a team for it. It's too much to do alone
anthonygallina1
@anthonygallina1
Jun 24 2018 00:15
I never saw godaddys templates or wix But seems a service with full-mail etc would be good.
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:15
You need at least 1 person that's (very) formilliar with each CSS framework you're implementing. And obviously a core team that puts it all together
anthonygallina1
@anthonygallina1
Jun 24 2018 00:16
They dont tell about the parts you will want And the user doesnt know till they need it probably
MAterial design is nice but last time I looked at the CSS it had lots of importants!
And bootstrap is easy but big
I would go scss or less and just compile the parts you need.
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:22
Agreed. Though I definitely prefer Material over Bootstrap
Bootstrap messes around with your structure. Pushing elements underneath eachother if the screen gets too small. Material doesn't do this
Also compared to Material, Bootstrap's mobile navigation menu is a joke, ghehe
anthonygallina1
@anthonygallina1
Jun 24 2018 00:25
I liked working with Material Have you seen Foundation?
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:25
No I haven't
anthonygallina1
@anthonygallina1
Jun 24 2018 00:25
The selector names are different though in Foundation
OR another I think it is called semantic
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:27
Semantic UI, ye I've heard of that one
anthonygallina1
@anthonygallina1
Jun 24 2018 00:28
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:33
Ye I've seen it. I like their approach, but for now I'm gonna stick with Material. I can't keep on switching, haha
anthonygallina1
@anthonygallina1
Jun 24 2018 00:41
:thumbsup:
I like the docs for Material
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:44
Ye so do I. But I kinda miss explanations on how to override something
Take for example a form input field. On focus, this changes the color of that input and the icons linked to it. You can try throwing in any color provided by Material all you want, but it won't work. You'll actually have to override the CSS yourself and it's not explained how
As in: There's no explanation of which classes affect those colors. And if you research it yourself, you'll see it's a pretty damn long list
anthonygallina1
@anthonygallina1
Jun 24 2018 00:48
Read the CSS
Use a editor to look up selectors in the CSS
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:49
Ye I know that. But imho, a CSS framework shouldn't provide default colors unless they're all easily overrided
anthonygallina1
@anthonygallina1
Jun 24 2018 00:49
I like it but there was alot of important! in it when i last looked
Makes good looking sites though
I agree
Bjorn van de Peut
@bjorno43
Jun 24 2018 00:50
Maybe. But not everyone likes ocean blue websites :P
anthonygallina1
@anthonygallina1
Jun 24 2018 00:50
yup
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:05
Interesting :)
anthonygallina1
@anthonygallina1
Jun 24 2018 01:06
:)
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:13
Hello guys, I'm working on the ES6 section of the curriculum, and I think I encounter a bug
Kyle Holm
@thekholm80
Jun 24 2018 01:14
@bjorno43 @anthonygallina1 :wave:
@Mixedbysalas_twitter which lesson?
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:14
@thekholm80 Hey m8 :wave:
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:14
Use Destructuring Assignment with the Rest Operator to Reassign Array Elements @thekholm80
Kyle Holm
@thekholm80
Jun 24 2018 01:15
can you share the link and your code?
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:15
@Mixedbysalas_twitter Please give us the link. We're way to lazy to search ourselves, ghehe
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:15
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
  "use strict";
  // change code below this line
  const [a, b, ...rest] = list;
  const arr = rest;
  // change code below this line
  return arr;
}
const arr = removeFirstTwo(source);
console.log(arr); // should be [3,4,5,6,7,8,9,10]
console.log(source); // should be [1,2,3,4,5,6,7,8,9,10];
Kyle Holm
@thekholm80
Jun 24 2018 01:18
you've got the right idea, but look at the first example
const [a, b, ...arr] = [1, 2, 3, 4, 5, 7]; this is similar to the solution, but using list instead of [1, 2, 3, 4, 5, 7]
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:19
@thekholm80 got it! thanks a lot!
Kyle Holm
@thekholm80
Jun 24 2018 01:19
:+1:
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:20
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
  "use strict";
  // change code below this line
  const [a, b, ...arr] = list;
  // change code below this line
  return arr;
}
const arr = removeFirstTwo(source);
console.log(arr); // should be [3,4,5,6,7,8,9,10]
console.log(source); // should be [1,2,3,4,5,6,7,8,9,10];
Kyle Holm
@thekholm80
Jun 24 2018 01:20
that was my solution as well
good job
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:20
Thank you!!! @thekholm80
anthonygallina1
@anthonygallina1
Jun 24 2018 01:20
:wave:
was afk
Kyle Holm
@thekholm80
Jun 24 2018 01:21
unacceptable
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:21
@thekholm80 I have another challenge that I think might be buggy
anthonygallina1
@anthonygallina1
Jun 24 2018 01:21
:smile:
Kyle Holm
@thekholm80
Jun 24 2018 01:21
@Mixedbysalas_twitter your code?
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:22
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
  "use strict";
  // change code below this line
  const [a, b, ...arr] = list;
  // change code below this line
  return arr;
}
const arr = removeFirstTwo(source);
console.log(arr); // should be [3,4,5,6,7,8,9,10]
console.log(source); // should be [1,2,3,4,5,6,7,8,9,10];
Kyle Holm
@thekholm80
Jun 24 2018 01:22
for the other challenge, i mean
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:22
wait wrong code
@thekholm80 my ba
bd
Kyle Holm
@thekholm80
Jun 24 2018 01:22
no worries
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:22
function printManyTimes(str) {
  "use strict";

  // change code below this line

  const SENTENCE = str + " is cool!";
  for(let i = 0; i < str.length; i+=2) {
    console.log(SENTENCE);
  }

  // change code above this line

}
printManyTimes("freeCodeCamp");
Kyle Holm
@thekholm80
Jun 24 2018 01:23
hmm, that should be right
try resetting your code and entering it again?
the button that says "Reset All Code"
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:23
@thekholm80 okay I'll try that
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:23
@Mixedbysalas_twitter Perhaps you should first verify if your code is correct by asking help here when you're unable to complete a challenge before calling it a bug ;)
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:25
@bjorno43 Okay I'll do that
I get this
// running test
Unexpected token ?
// tests completed
Kyle Holm
@thekholm80
Jun 24 2018 01:26
i'm getting the same thing
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:28
What you guys think? @bjorno43 @thekholm80
Kyle Holm
@thekholm80
Jun 24 2018 01:28
freeCodeCamp/freeCodeCamp#17679 looks like someone changed this test today
err 2 days ago lol i can't read
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:29
Okay so should I just skip it? @thekholm80
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:29
Yup. Seems like that's actually a bug
Kyle Holm
@thekholm80
Jun 24 2018 01:31
i added a comment to that issue
i'm sure they'll get it fixed
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:32
Thank you guys @thekholm80 @bjorno43
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:32
It's already submitted with a PR to the correct repo. Just have to wait till it's implemented
Kyle Holm
@thekholm80
Jun 24 2018 01:33
so it's all your fault, bob?
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:34
That's a given
Kyle Holm
@thekholm80
Jun 24 2018 01:34
:joy:
Carlos Alfaro
@Mixedbysalas_twitter
Jun 24 2018 01:34
Do you guys know how to change our handle?
Kyle Holm
@thekholm80
Jun 24 2018 01:34
create a new login?
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:35
I know how to change my door handle ye, but I'm sure that's not what you mean..
Kyle Holm
@thekholm80
Jun 24 2018 01:35
if you sign in with twitter you're stuck with your twitter id
Carlos Alfaro
@devbysalas
Jun 24 2018 01:35
Cool!
I see
Kyle Holm
@thekholm80
Jun 24 2018 01:36
logging in with github is definitely better
in my opinion
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:36
I haven't tried it, but can't you simply logout and revoke permission in Twitter?
Carlos Alfaro
@devbysalas
Jun 24 2018 01:36
I like it better
Kyle Holm
@thekholm80
Jun 24 2018 01:36
then i can snoop on all your github repos
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:37
Go ahead. Not much to see there :joy:
Carlos Alfaro
@devbysalas
Jun 24 2018 01:38
Hahaha same here lol
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:38
How I got all those followers? I have no idea..
Kyle Holm
@thekholm80
Jun 24 2018 01:38
@bjorno43 you're just a natural leader
Carlos Alfaro
@devbysalas
Jun 24 2018 01:38
I have 0
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:38
@thekholm80 Ye that must be it, lol
Though I'm honestly thinking about that idea from yesterday @thekholm80 I'm pretty sure I'll be presented with many more if I actually pull that of
Kyle Holm
@thekholm80
Jun 24 2018 01:40
lemme know what you need and i'll chip in. i don't do css though
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:41
That'd be awesome! First I'm gonna have to work it out on paper though. Get a good plan on how to go about it
Kyle Holm
@thekholm80
Jun 24 2018 01:42
there you go. pick your stack and an attack plan, then point me at it
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:45
Cool :) Perhaps some other members would be interested in joining as well. I think it would a great experience working on a large project like that and it looks good on your resume
Kyle Holm
@thekholm80
Jun 24 2018 01:46
i'd just like the experience of working on something with other people. the whole is greater than the sum of the parts or whatever
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:47
True that
I'm gonna do some research into it. See which stack would be the best approach and come up with an attack plan / roadmap after that. If it turns out to be needed, I'll also make sure the hosting etc is available
Kyle Holm
@thekholm80
Jun 24 2018 01:50
that's a good idea
if there's anything similar, see what they did right and what they did wrong
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:51
Ye. There are plenty out there, but afaik not a single one that implements css frameworks
Oh wait.. there actually are
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:57
Ye I found several. Most are based on Summernote JS, which is a wysiwyg editor for Bootstrap. But there are plenty of issues with them
Kyle Holm
@thekholm80
Jun 24 2018 01:58
don't have to be the first, just the best
Bjorn van de Peut
@bjorno43
Jun 24 2018 01:58
Ghehe true that
anthonygallina1
@anthonygallina1
Jun 24 2018 02:13
Oh no another follower
SO some thing like that but easy to use and smaller code
Maybe
Bjorn van de Peut
@bjorno43
Jun 24 2018 02:35
Ye something like that, but that's just a template editor. It's not rly a WYSIWYG editor. Ah well, I'll just think about it for a while and see if I can come with something
For now I'm going to bed. Gn8 guys!
anthonygallina1
@anthonygallina1
Jun 24 2018 02:36
~Rest well
Kyle Holm
@thekholm80
Jun 24 2018 02:38
@bjorno43 g'night
John
@taloloy18
Jun 24 2018 02:42
hi guys I need some help
Your img element should have the class smaller-image.
cant figure out this code
I already dont putting this on the code
smaller-image {
width: 100px;
}
Kyle Holm
@thekholm80
Jun 24 2018 02:43
you're missing the .
. means class
.smaller-image {
John
@taloloy18
Jun 24 2018 02:44
done already however it is not working
Kyle Holm
@thekholm80
Jun 24 2018 02:44
show the element
Kyle Holm
@thekholm80
Jun 24 2018 02:49
i know what the lesson is, i can't debug your code if i can't see your code
John
@taloloy18
Jun 24 2018 02:50
Aren't you seeing it on the link above?
Kyle Holm
@thekholm80
Jun 24 2018 02:51
nope
just copy/paste your code here
John
@taloloy18
Jun 24 2018 02:51

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}
.smaller-image {
width: 100px;
}
h2 {
font-family: Lobster, monospace;
}

p {
font-size: 16px;
font-family: monospace;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

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

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>

Kyle Holm
@thekholm80
Jun 24 2018 02:51
you never used your class in your image element
<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."> no class
Create a class called smaller-image and use it to resize the image so that it's only 100 pixels wide.
anthonygallina1
@anthonygallina1
Jun 24 2018 02:54
In the style then use the selector in img class
John
@taloloy18
Jun 24 2018 02:54
done! Thank you!!
Kyle Holm
@thekholm80
Jun 24 2018 02:54
:+1:
anthonygallina1
@anthonygallina1
Jun 24 2018 02:54
sry it is in style
John
@taloloy18
Jun 24 2018 04:31
Hello guys!
pls help

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, monospace;
}

p {
font-size: 16px;
font-family: monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
.silver-background {
background-color: silver;
}
.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<div class:"silver-backgound">

<div>
<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
</div>

<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
<label><input type="checkbox" name="personality" checked> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label><br>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</main>

Give your div element the class silver-background.
Smootimus
@Smootimus
Jun 24 2018 13:57
Ay :smile:
Amit Patel
@AmitP88
Jun 24 2018 14:05
hey guys, at what point in the FCC curriculum should I be applying for jobs?
Smootimus
@Smootimus
Jun 24 2018 14:42
Well I wouldn't base that on how far you are in the curriculum, I would base it on how comfortable you feel
Are you comfortable being on a team and handling a piece of a project?
May Kittens Devour Your Soul
@diomed
Jun 24 2018 14:47
@taloloy18 this line is wrong for multiple reasons
<div class:"silver-backgound">
spelling being 1 of them
aenkirch
@aenkirch
Jun 24 2018 15:22
Hello guys ! Do you know how to fix a frozen challenge, without even submitting my code for verification, just pressing "tabs" button, this challenge gets my browser frozing all the time : "Apply a Style Until a Condition is Met with @while"
I used Safari, Chrome, and even cleared my cache, I'm pretty sure it's the challenge
Jess Xuan
@jesskxuan
Jun 24 2018 16:19
hi pals, i haven't been on fcc in a few months and now can't seem to log in with the new gdpr popup? keep getting the "[my github email] is already associated with another account." :/ im nearly done with the front-end user part so would like to log back in…
i tried emailing but haven't gotten a reply in over a week
Kyle Holm
@thekholm80
Jun 24 2018 16:20
@jesskxuan you might try asking in https://gitter.im/FreeCodeCamp/Contributors
that's where the core dev team hangs out
Jess Xuan
@jesskxuan
Jun 24 2018 16:21
@thekholm80 thanks! will do :-)
T. Lanette
@TLanetteRose
Jun 24 2018 16:21
@jesskxuan I had the same message. I had to log in with the email/password associated with the account and not use my GitHub account. I don’t know if that helps. I was able to get into my account.
Jess Xuan
@jesskxuan
Jun 24 2018 16:23
ah @TLanetteRose did the email/pw account have all your previous challenge history? or was it a brand new account?
T. Lanette
@TLanetteRose
Jun 24 2018 16:24
It did. The only thing that was not up to date was the calendar part (the little squares). Odd. It was still on last year. But the Listings for the challenges I completed and the dates were accurate.
Muhammad Anas Qasmi
@m1anas
Jun 24 2018 16:25
Peace all!
Jess Xuan
@jesskxuan
Jun 24 2018 16:26
hmm mines all gone when i do that, but i was on the old curriculum… does that carry over? i was maybe 5 challenges away from finishing the front end cert :crying_cat_face:
Kyle Holm
@thekholm80
Jun 24 2018 16:26
@jesskxuan the old cert is still there, click Settings and scroll to the bottom under "Legacy Certifications"
T. Lanette
@TLanetteRose
Jun 24 2018 16:26
I carried over for me. The only challenges not complete were the new ones they added.
Kyle Holm
@thekholm80
Jun 24 2018 16:26
you just have to complete the projects to claim the cert
T. Lanette
@TLanetteRose
Jun 24 2018 16:27
That’s what I forgot the legacy certs.
Muhammad Anas Qasmi
@m1anas
Jun 24 2018 16:27
this code is doing fine at codepen. But when I copy and run it locally on any of my browsers it shows plain html only. Any thoughts?https://codepen.io/m1anas/pen/gKKJVL
I use Atom editor
In fact I am unable to execute any Bootstrap on my PC locally
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:29
Guys I didn't understand this challenge
Jess Xuan
@jesskxuan
Jun 24 2018 16:29
i think you're missing the full bootstrap css url @m1anas … it should start with a http:// ?
I mean what is fibonacci numbers?
Jess Xuan
@jesskxuan
Jun 24 2018 16:30
also re: my login issues; my whole account is blank :/ maybe i should delete this account and try sign in with my github account again? i guess theres no loss cause theres literally nothing on this account…
Kyle Holm
@thekholm80
Jun 24 2018 16:30
The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers.
so 1, 1, 2, 3, 5, 8, 13, 21
and on and on
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:31
Oh, ok then. Thank you!
T. Lanette
@TLanetteRose
Jun 24 2018 16:31
Did you try the Contributors Room yet @jesskxuan ?
Jess Xuan
@jesskxuan
Jun 24 2018 16:31
yeah no response haha i think they were last active 4 hours ago so not as lively as here
thanks for your help @TLanetteRose @thekholm80
Kyle Holm
@thekholm80
Jun 24 2018 16:32
@jesskxuan sorry i don't have any better ideas, hope you get it sorted
T. Lanette
@TLanetteRose
Jun 24 2018 16:32
@m1anas , @jesskxuan is correct. You need the http portion of the link for bootstrap. Same for your scripts for popper, jquery, and js above the body tag.
@jesskxuan You’re welcome!
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:36
I don't understand
why 4 returns 5 in the challenge?
Kyle Holm
@thekholm80
Jun 24 2018 16:37
because the odd fib numbers less than or equal to 4 are 1, 1, 3
1 + 1 + 3 = 5
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:39
Oh man, it seems a hard work to do.
Kyle Holm
@thekholm80
Jun 24 2018 16:39
it wouldn't be fun if it were easy
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:39
Right.
Generally, when you convert math to programming, all what you do is making it even harder twice.
Kyle Holm
@thekholm80
Jun 24 2018 16:40
especially if you're as bad at math as i am
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:40
I'm not bad at math but I'm noob at programming
So it's hard for me to do it.
):
Kyle Holm
@thekholm80
Jun 24 2018 16:40
you'll get it
just break the problem down into the steps needed to solve it
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:41
Yeah, thanks for the advice and explaination!
Kyle Holm
@thekholm80
Jun 24 2018 16:41
  1. calculate all fib numbers less than and equal to num
  2. add together the odd ones
  3. return the sum
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:43
Yeah I know this but the real problem is how you calculate Fibonacci Numbers at first place. It seems that I have to use some kind of ready algorithm for it.
Kyle Holm
@thekholm80
Jun 24 2018 16:43
the simple, least elegant solution would be a loop and array, i'd think
calculate the next number, push to an array, loop until you reach / exceed num
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 16:44
Yeah, I thought about it. First I think you should set up the algorithm then push to the array, then at the end, I think you should filter them.
Kyle Holm
@thekholm80
Jun 24 2018 16:45
filter is good
Muhammad Anas Qasmi
@m1anas
Jun 24 2018 17:06
@jesskxuan thanks
@TLanetteRose thank you
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 17:09
Yes
!!
I made the fabonacci numbers list, finally. Now all what I have to do is filtering it and everything is right, right?
Kyle Holm
@thekholm80
Jun 24 2018 17:09
sounds like a good attack plan
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 17:22
I solved it.
How much it took me?
Kyle Holm
@thekholm80
Jun 24 2018 17:22
:tada: good job
OGTechnoBoy
@OGTechnoBoy
Jun 24 2018 17:22
Thanks.
Weird. They all used while, while I used for loop, hmm I totally forgot about while but as long as it works then I guess it's ok.
T. Lanette
@TLanetteRose
Jun 24 2018 17:36
@m1anas You're welcome
Aita Kane
@aita-kane
Jun 24 2018 17:49
hello everybody, the default min-height of col-lg-8 and col-lg- 4 is 1px to make it more big should I put min-height : 512px or there is another way to that ?
Christopher McCormack
@cmccormack
Jun 24 2018 20:07
@aita-kane You should try to let the content of the column determine the height instead of attempting to set it manually.
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 20:34
I have a general question. When working (either on FCC or other projects), is there any drinks or music that can help with focusing on thinking and being productive?
simpleguy747
@simpleguy747
Jun 24 2018 21:36
Hi guys, I am working on a site here just to increase my skills, looking for some feedback on this page : http://simplecodes.hol.es/Ralph/Htmls-materialize/purple/dashboard.html
anthonygallina1
@anthonygallina1
Jun 24 2018 21:37
:wave:
simpleguy747
@simpleguy747
Jun 24 2018 21:38
@anthonygallina1 hello
@simpleguy747 Looks good Maybe make the menu closeable once opened in phone size
simpleguy747
@simpleguy747
Jun 24 2018 21:49
@anthonygallina1 click out/ swipe and it does close. pls let me know if it doesn't
@anthonygallina1 thanks for your comments
anthonygallina1
@anthonygallina1
Jun 24 2018 22:02
@simpleguy747 yup fire fox doesnt here. Maybe make the menu allways show a little of the page under it?
Kinda like this? https://www.fullstackwebdesign.net/sites.html looks good though Keep up the good work :tada:
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 22:24
@anthonygallina1 thanks!
anthonygallina1
@anthonygallina1
Jun 24 2018 22:26
@DavidJamesAustin :thumbsup:
Kyle Holm
@thekholm80
Jun 24 2018 22:28
@anthonygallina1 :wave:
anthonygallina1
@anthonygallina1
Jun 24 2018 22:29
@thekholm80 Hi :smile:
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 22:29
On the final set of things for Responsive Web Design.. then off to do 4 more projects!
anthonygallina1
@anthonygallina1
Jun 24 2018 22:29
:thumbsup:
@thekholm80 Have you done any chai tests?
Kyle Holm
@thekholm80
Jun 24 2018 22:31
hmm, my barista got me started on dirty chai lattes, they're delicious
anthonygallina1
@anthonygallina1
Jun 24 2018 22:31
:smile:
Kyle Holm
@thekholm80
Jun 24 2018 22:31
4 shots of espresso, some milk and chai
anthonygallina1
@anthonygallina1
Jun 24 2018 22:31
:thumbsup:
Kyle Holm
@thekholm80
Jun 24 2018 22:31
but no, not really. i get the basics of it but i've never actively written many tests
except on codewars
anthonygallina1
@anthonygallina1
Jun 24 2018 22:32
I tried the chai tests in our ciriculmn
I am not sure what they are for though
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 22:32
I have a noob question.
How can I get the test suite in something like Brackets so I can test with the live preview instead of doing everything inside of code pen?
anthonygallina1
@anthonygallina1
Jun 24 2018 22:33
Oh good I am a noob Maybe i can help
Uriel Guzmán
@Burinson
Jun 24 2018 22:33
Hey, guys, another noob question
Is there any way in Javascript to cycle between functions?
For example
anthonygallina1
@anthonygallina1
Jun 24 2018 22:33
I am a perpetual noob
anthonygallina1
@anthonygallina1
Jun 24 2018 22:34
@thekholm80 yes
Kyle Holm
@thekholm80
Jun 24 2018 22:35
there's a programming paradigm that focuses on test-driven development (TDD). you write the tests first to describe what you want to happen, then write the code so that it will pass all the tests
i've never got into it much, i played with Jest a bit
but for the simple things i make, i spent as much time writing tests as i did writing code
Uriel Guzmán
@Burinson
Jun 24 2018 22:36
Function function1() {
if this, call function2();
}
Function function2() {
if this, call function1();
}
anthonygallina1
@anthonygallina1
Jun 24 2018 22:36
Ah
Kyle Holm
@thekholm80
Jun 24 2018 22:36
i think it would be more useful if i were programming with a team
anthonygallina1
@anthonygallina1
Jun 24 2018 22:37
@thekholm80 So supposed to help in dev a algorythm
yikes cant speel
Kyle Holm
@thekholm80
Jun 24 2018 22:38
yeah, especially larger code bases. if tests stop passing after you update something, you know you have side-effects
Uriel Guzmán
@Burinson
Jun 24 2018 22:38
How can I toggle between functions?
Kyle Holm
@thekholm80
Jun 24 2018 22:38
@Burinson can't you do it the way you've got it written? just fix your if() statements
anthonygallina1
@anthonygallina1
Jun 24 2018 22:38
@thekholm80 Thank you. First time I tried them.
Uriel Guzmán
@Burinson
Jun 24 2018 22:39
@thekholm80 I'm not trying to make it work
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 22:39
@anthonygallina1 do you have any idea to a solution to what I want to do?
Uriel Guzmán
@Burinson
Jun 24 2018 22:39
I'm asking if there's a way to call functions that are out of bounds
Kyle Holm
@thekholm80
Jun 24 2018 22:39
i don't know what you mean by 'out of bounds'
in your example code, the function calls are all within scope since the functions have global scope
Uriel Guzmán
@Burinson
Jun 24 2018 22:41
That's weird, I thought it wasn't gonna work
Now I'm even more confused
._.
anthonygallina1
@anthonygallina1
Jun 24 2018 22:41
@DavidJamesAustin Sry I never tried. Not sure the connections on it Check the connections might be doable
Uriel Guzmán
@Burinson
Jun 24 2018 22:41
What if the functions are contained in another function (not global)
Kyle Holm
@thekholm80
Jun 24 2018 22:42
then you'd have scope issues
DavidJamesAustin
@DavidJamesAustin
Jun 24 2018 22:42
Okay.
Uriel Guzmán
@Burinson
Jun 24 2018 22:42
So I have to remove the parent function?
I'm asking because I have '$(document).ready(function() {'
And both functions are inside that function
So they can't call each other
Kyle Holm
@thekholm80
Jun 24 2018 22:43
generally it's suggested that you define functions before calling them, so calling function2 inside function1 isn't best practice, but if i understand hoisting correctly the function definitions will be hoisted at compile time so it shouldn't be an issue
Uriel Guzmán
@Burinson
Jun 24 2018 22:45
let counter = 1;
$("#switch").click(function() {
if (counter == 1) {
on_off("on");
counter = 0;
} else if (counter == 0) {
on_off("off");
counter = 1;
}
});
For example, there. Codepen writes "counter" in yellow but it still interacts with it
If I put it all inside a function, "counter" turns blue.
Kyle Holm
@thekholm80
Jun 24 2018 22:46
@Burinson https://repl.it/@thekholm80/SpryProudInstitution here functions one and two share scope so they can call each other
Uriel Guzmán
@Burinson
Jun 24 2018 22:46
And at the same time, on_off() is yellow
Christopher McCormack
@cmccormack
Jun 24 2018 22:47

if that's just a toggle then something like

let toggle = true;
$("#switch").click(function() {
    toggle = !toggle;
    on_off(toggle);
});

would be a lot easier

Uriel Guzmán
@Burinson
Jun 24 2018 22:48
@cmccormack Wow, that's cool
Thanks
Christopher McCormack
@cmccormack
Jun 24 2018 22:49
@Burinson np, updated to add your on_off but you can apply this logic in a lot of places to make the code more succinct
Uriel Guzmán
@Burinson
Jun 24 2018 22:49
Another question
Toggle inside the function is yellow
What does that mean? Is it bad?
Christopher McCormack
@cmccormack
Jun 24 2018 22:50
it may just mean it was defined in an outer scope