These are chat archives for FreeCodeCamp/Help

22nd
Jun 2018
koder3
@koder3
Jun 22 2018 00:00
Hey guys if my code is ugly (as in uses too many loops, non-best practices, too many ifs)
but still solves the algorithm challenge is it fine?
I thought as a beginner it shouldnt matter because I can comeback and optimize it once im experienced or something
Kyle Holm
@thekholm80
Jun 22 2018 00:01
@koder3 my priority is usually: 1. make it work 2. make it pretty (if there's time) you don't get extra points for pretty code
that being said, you will naturally start writing prettier code as you learn
and if you ever work on a shared code base you will have to get used to conforming to someone else's idea of 'pretty code'
Henry
@GitHub-Henry
Jun 22 2018 02:15
@koder3 or you can use a tool to make your code prettier
Kyle Holm
@thekholm80
Jun 22 2018 02:19
i don't think that will run in the fCC lessons lol
Henry
@GitHub-Henry
Jun 22 2018 02:19
you are right. i usually do my code outside fcc and paste the results in fcc for testing
i prefer my editor to theirs
but not for the super simple stuff
but for the more complex stuff like the algos
Kyle Holm
@thekholm80
Jun 22 2018 02:22
i use repl.it for just writing algos
Henry
@GitHub-Henry
Jun 22 2018 02:22
that is a good tool
Kyle Holm
@thekholm80
Jun 22 2018 02:23
i love it
and i saw they're adding a react environment, too
or maybe already have
oh wow they have React, Gatsby, Next.js, RoR, Django, Express
way to go repl.it
Henry
@GitHub-Henry
Jun 22 2018 02:24
that sounds like good news
kinda like plunker
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:05
:wave:
Kyle Holm
@thekholm80
Jun 22 2018 03:05
@bjorno43 you're up late
like a nordic vampire
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:06
Ye I've had a "healthy" discussion with an online company about Europe's GDPR privacy law and how they thought I wouldn't call them out on it xD
Kyle Holm
@thekholm80
Jun 22 2018 03:06
lol
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:07
They were offering some indie game for free. But as usual, if something is for free, you're the product
Kyle Holm
@thekholm80
Jun 22 2018 03:07
they should teach that in schools
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:08
So before doing anything stupid, I reviewed the privacy statement which basicly said: We'll sell your private info to anyone willing to pay for it
Kyle Holm
@thekholm80
Jun 22 2018 03:08
oh, you mean the facebook privacy policy
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:08
Ghehe something like that. But even worse :P
Facebook at least gives you some control over your data. They didn't. There was no option to delete your account or anything
There was no clear statement about what they were collecting from you. Nothing. So ye, that's where I contacted them
Kyle Holm
@thekholm80
Jun 22 2018 03:11
i'd never make it in business. I'd be that sucker thinking "hey, let's just make something cool people will like to use" instead of "how can we squeeze one extra penny out of these idiots?
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:12
That's not needed. With a good business model you can earn quite a lot of money without treating your customers like that. But it's not easy money. And that's where the problem lies
Kyle Holm
@thekholm80
Jun 22 2018 03:13
i wish i could go back and do the dot com boom all over again.
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:13
Ghehe
If I only I could go back 20 years in time while keeping the knowledge I have right now..
Kyle Holm
@thekholm80
Jun 22 2018 03:14
but there again, i'd end up being Tom from MySpace instead of Zuck from FB
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:15
I'd just invest a bunch of money in Google and leave it at that. Oh and obviously, just for fun, get a bunch of bitcoins :P
Kyle Holm
@thekholm80
Jun 22 2018 03:16
oh yeah can you imagine? mining back when you could get a few coins a day?
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:16
Yup, lol. Imagine taking one of the best miners today with you and being there as soon as it launches xD
Though you'll probably mess it up so bad that it never gets of the ground, lol
Kyle Holm
@thekholm80
Jun 22 2018 03:17
i'd need to take a copy of The Big Short with me too, those guys were brilliant
it's all so easy in hindsight lol
Bjorn van de Peut
@bjorno43
Jun 22 2018 03:18
Ghehe true
I recently saw a story about a secretary that worked for a big law firm. She always had to do the investments for her bosses and everytime she was ordered to do so, she invested a bit of her own money in the same stocks. She ended up as a multi miljonair, haha
The beauty of the story was: She didn't want any of it. She simply gave it away to charity
Kyle Holm
@thekholm80
Jun 22 2018 03:31
oh wow
that's pretty awesome
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 12:43
ok i need help
Danny Chan
@chandanny
Jun 22 2018 12:45
Hello
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 12:45
what is the photo "URL"
Danny Chan
@chandanny
Jun 22 2018 12:46
URL is the link of image address
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 12:51
ok so why i can't solve the question that say Set the value of your placeholder attribute to "cat photo URL".
i tried so hard
Kyle Holm
@thekholm80
Jun 22 2018 13:13
@Davidgueeta3_twitter you should have an attribute in your element that says placeholder="cat photo URL"
Prakash Kumar
@ThePrakashKumar
Jun 22 2018 13:39
grid-template-columns: auto 50px 10% 2fr 1fr; How will auto and fr manage themselves if we use them together?
Prakash Kumar
@ThePrakashKumar
Jun 22 2018 13:53
My above problem got cleared. Thanks.
lmilliken
@lmilliken
Jun 22 2018 16:06
hey, does anyone know why the "Ask for Help" button isn't doing anything on some of the lessons? Like the one here: https://learn.freecodecamp.org/apis-and-microservices/mongodb-and-mongoose/create-and-save-a-record-of-a-model
Mehdi Amlal
@mehdiamlal
Jun 22 2018 17:49
Hey guys! What is a module in mongoose?
model*
koder3
@koder3
Jun 22 2018 18:12
@thekholm80 @GitHub-Henry Thanks
Kyle Holm
@thekholm80
Jun 22 2018 21:30
so quiet
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 21:33
guys i have a question
Set the value of your placeholder attribute to "cat photo URL".?
Kyle Holm
@thekholm80
Jun 22 2018 21:34
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 21:35
awesome
thanks bro
Kyle Holm
@thekholm80
Jun 22 2018 21:39
:+1:
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 21:48
Master Kyle Holm Please what amount of knowledge that i will gain through this program
Kyle Holm
@thekholm80
Jun 22 2018 21:49
hard to say, really. there's a lot of information available - you'll have to decide if you want it or not
theoretically i would think anyone doing the full course would be ahead of a lot of jr devs i've spoken with
Brian Marquis
@brimarq
Jun 22 2018 21:51
@thekholm80 Well, that’s encouraging!
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 21:53
This is exactly what I look for and you understand me because I am a beginner. I am not sure that this program is suitable for me or not. If so, is it the best start?
Kyle Holm
@thekholm80
Jun 22 2018 21:54
i've been really happy with what i've learned from freeCodeCamp
i think they explain concepts well and the curriculum is well paced and structured
the challenge with self-learning is you are responsible for motivating yourself and finding help if/when you get stuck. your success is entirely in your own hands
but freeCodeCamp is a great way to get going
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 21:56
@thekholm80 Well this answer is enough to answer my question
Kyle Holm
@thekholm80
Jun 22 2018 21:58
If you're serious about learning, I'd suggest finding some kind of support network. there are tons of newbies on twitter that encourage/support each other, there are learning groups that use freeCodeCamp and work through the curriculum together, and a lot of communities have local meetup groups & facebook groups to help motivate/encourage/support each other
or go it alone if you feel more comfortable that way
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 22:01
In fact, I am really looking forward to joining a group of professionals in this field so I need to learn first
Kyle Holm
@thekholm80
Jun 22 2018 22:01
i wish you well, and there's almost always someone here to help if you need it
mohamednabawy
@Davidgueeta3_twitter
Jun 22 2018 22:02
thank you
Mehdi Amlal
@mehdiamlal
Jun 22 2018 22:09
Hey guys. Should I use postgreSQL or MongoDB?
Kyle Holm
@thekholm80
Jun 22 2018 22:09
@mehdiamlal which do you like better?
Mehdi Amlal
@mehdiamlal
Jun 22 2018 22:10
For a chat app
I mainly use mongodb/mongoose because I can manipulate data using js syntax
Do you think I should stick with it or learn a relational db too?
koder3
@koder3
Jun 22 2018 22:12
@koder3
image.png
isnt the array variable global to the secondFunc function?
why do i get undefined?
Kyle Holm
@thekholm80
Jun 22 2018 22:12
i'm a big fan of mongodb for exactly that reason. I've installed postgresql but never used it. i think you should use what you're most comfortable with
@koder3 your console.log() statement can't be reached because execution of that function stops when it reaches return
Mehdi Amlal
@mehdiamlal
Jun 22 2018 22:13
As my app scales, which one performs better on the long term?
koder3
@koder3
Jun 22 2018 22:14
@thekholm80 Thanks! that seemed to get the logging correct but how do i return the array from secondFunc
Kyle Holm
@thekholm80
Jun 22 2018 22:14
i've not really looked into large scale performance because i've never tried making anything anyone would actually use. I know both db platforms have enterprise-level releases that are used by large companies
@koder3 it is returned, you're just not catching it
var caughtReturn = secondFunc(); now the returned value is stored in a variable called caughtReturn
koder3
@koder3
Jun 22 2018 22:17
@thekholm80 genius xD thanks
but why am i not catching it?
Kyle Holm
@thekholm80
Jun 22 2018 22:17
because you're just calling secondFunc() without using the returned value
koder3
@koder3
Jun 22 2018 22:18
Ah i see
Thanks!
Aditya
@ezioda004
Jun 22 2018 22:19
Functions implicitly returns undefined if you dont explicitly return anything.
koder3
@koder3
Jun 22 2018 22:21
I used return secondFunc and that seemed to get it working
is that fine or is it better to store it in a variable in the way @thekholm80 described
Kyle Holm
@thekholm80
Jun 22 2018 22:21
it depends on what you're trying to accomplish
koder3
@koder3
Jun 22 2018 22:22
Alright
Bye
Aditya
@ezioda004
Jun 22 2018 22:22
If its just being used once then return secondFunc seems fine.
Kyle Holm
@thekholm80
Jun 22 2018 22:22
if your secondFunc is only returning the value of an out-of-scope variable, it seems the entire function can be avoided
koder3
@koder3
Jun 22 2018 22:23
No i was just testing around and did seem to find a flaw in my knowledge of scopes and functions. Thats all, thanks!
Aditya
@ezioda004
Jun 22 2018 22:26
Closures
Kyle Holm
@thekholm80
Jun 22 2018 22:26
eww that's a bad word
Aditya
@ezioda004
Jun 22 2018 22:27
Yes, Clojure is a bad word :trollface:
Kyle Holm
@thekholm80
Jun 22 2018 22:28
lol if the main room still existed they'd be sharpening their pitchforks right now
Aditya
@ezioda004
Jun 22 2018 22:30
Ah yes, I miss my daily dose of JS bashing
Kyle Holm
@thekholm80
Jun 22 2018 22:30
JS isn't perfect, but it's extremely useful
Aditya
@ezioda004
Jun 22 2018 22:31
How dare you! I take that as a personal attack /s
Kyle Holm
@thekholm80
Jun 22 2018 22:31
lol
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:29
:wave:
Kyle Holm
@thekholm80
Jun 22 2018 23:30
@bjorno43 hi bob
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:31
Yo
Kyle Holm
@thekholm80
Jun 22 2018 23:31
how's your bot coming along?
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:32
Didn't have any time for it. Too busy with projects I'm getting paid to do, haha
Kyle Holm
@thekholm80
Jun 22 2018 23:32
pfft showoff
mr "i get paid to code"
:smile:
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:32
lol
Honestly though, I just realised I love my country :P
Our government released an online form where you provide certain data regarding your website and it'll generate a fully complaint GDPR Privacy Statement for you :D
Kyle Holm
@thekholm80
Jun 22 2018 23:34
oh nice
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:35
Ye definitely! I really wasn't looking forward to dig into it. But this made it like a walk in the park
Kyle Holm
@thekholm80
Jun 22 2018 23:36
now if they could just make your site compliant for you lol
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:36
Whahaha
I think it's coming around quite nicely though. This is the project I'm working on: https://xgn-gaming.com/
Kyle Holm
@thekholm80
Jun 22 2018 23:37
i don't know how to tell you this but someone took all the words and made them not-english
that will never work
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:38
:laughing:
It's a Dutch website. I can't help it :P
Kyle Holm
@thekholm80
Jun 22 2018 23:38
i like the colors
i'm all about some grayscale & monochrome
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:39
Ye I'm as well
Though I'm probably required te implement some other themes as well
Kyle Holm
@thekholm80
Jun 22 2018 23:40
i like that even better. any site i spend a lot of time on should be somewhat customizable as far as appearance
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:41
Ye I agree. I don't mind. As long as it's just colors it's easy
Kyle Holm
@thekholm80
Jun 22 2018 23:41
yeah
even just a day/night option is better than nothing
or light/dark if you prefer
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:41
True
Though I'll probably implement some kind of color-picker for a theme at some point
Kyle Holm
@thekholm80
Jun 22 2018 23:42
that would be cool
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:43
First all the functionality needs to be done. Extra themes are a bonus
Gonna be fun. They want to be able to edit the page contents through a WYSIWYG editor, but there's no CMS in the background, haha
Implementing such an editor isn't the issue. That's pretty easy. But combining it with Materilize.. that's gonna be challenging.. to say the least
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:48
Though honestly, I think there's a freaking huge market for a WYSIWYG editor that creates HTML / CSS with Materilize
Kyle Holm
@thekholm80
Jun 22 2018 23:49
sounds interesting
i'm always jealous of people who can think up good project ideas
Bjorn van de Peut
@bjorno43
Jun 22 2018 23:52
Well, I mean, once you get the hang of it, you could support multiple CSS frameworks. Though you're definitely gonna need a team for it. It's too big of a project to do alone