These are chat archives for FreeCodeCamp/HelpJavaScript

31st
May 2018
Gulsvi
@gulsvi
May 31 2018 00:00
But yeah, they updated the main site with all the new course material
Richard
@rylew0925
May 31 2018 00:01
@gulsvi Thanks for confirming!
Rajat
@rajataudichya
May 31 2018 04:22
new course materials sounds good, but do I have to start from the very begining?
Donnie
@Donnie-D
May 31 2018 05:21

adding a method in an object

var obj={k:function(){}}

adding a method in an object from outside the object

obj.k=function(){};

adding a method in a function object

function myFunc(){myFunc.k=function(){} } //or using this

question is... why is adding method in case of function objects different? why adding it inside function as if we are doing it from outside? shouldnt it be function myFunc(){k:function(){}}? as ususal, just wondering :grin:

Pieter Stokkink
@forkerino
May 31 2018 11:30
@Donnie-D inside the { } of the function, you are just executing code, it is not an object but a function body. So the k:function() would not be valid syntax.
Yash Pratap Singh
@convexhull
May 31 2018 11:58
hello everyone ! freecodecamp seems to have changed a lot ? when did this happen ?
Nazar
@IsaakNazar
May 31 2018 12:45
hey everybody!
Donnie
@Donnie-D
May 31 2018 13:08
@forkerino Your answer may be to the point but sorry it doesnt yet convince a thicko like me . Why in this case do we use the syntax of a property being added outside an object to an object please? :worried:
Pieter Stokkink
@forkerino
May 31 2018 13:09
@Donnie-D because you are not inside an object. (i.e. not inside the myFunc function object, just inside its body)
so you would have to use the same syntax as when you would write it outside a function
Nazar
@IsaakNazar
May 31 2018 13:11
why I cant use filter method in node js?
Donnie
@Donnie-D
May 31 2018 13:12
@Donnie-D because you are not inside an object. (i.e. not inside the myFunc function object, just inside its body) not inside the myFunc function object, just inside its body?I am more confused than a mood ring on a bipolar person :neutral_face:
so being inside an object and inside its body are 2 different things?
I am trying to use the tiny brain cells in my head lol I think you meant that I am not inside the function prototype. Hence using this format? Is that correct?
Donnie
@Donnie-D
May 31 2018 13:20
@forkerino sorry to put you off :sparkles: didnt mean to. just trying to get things right :smile:
Pieter Stokkink
@forkerino
May 31 2018 13:22
@Donnie-D no worries, just working on a different screen too. The { } after function() is not an object, but a code block. The key: value syntax is only valid inside an object literal (as in your first example)
you could do:
myFunc.prototype = {
  k: function() {// whatevs }
}
but that would put it on the prototype, not directly on this function
Donnie
@Donnie-D
May 31 2018 13:27
so can we add a method to an array like this? (guess that would be to add an object.method to the index?)
var arr[index_number].k=function(){} //this might be terribly wrong
promise it was my last question for this :smile:
Pieter Stokkink
@forkerino
May 31 2018 13:29
no, that doesn't look right. You can only do .k on something that is an object. So we have to make sure that arr[index_number] is an object before you do that.
and it won't work with var before
Donnie
@Donnie-D
May 31 2018 13:30
so whats the correct syntax to achieve what we want to do here i.e. add a function to an array index as a method
Pieter Stokkink
@forkerino
May 31 2018 13:31

so if you have

var arr = []
arr[0] = {}

you could then do:

arr[0].k = function(){}
Donnie
@Donnie-D
May 31 2018 13:31
smashing
Pieter Stokkink
@forkerino
May 31 2018 13:31
which makes arr[0].k() possible
Donnie
@Donnie-D
May 31 2018 13:31
yep
Pieter Stokkink
@forkerino
May 31 2018 13:31
but this is all rather uncommon
Donnie
@Donnie-D
May 31 2018 13:31
my questions are uncommon :smile:
Pieter Stokkink
@forkerino
May 31 2018 13:31
Usually you don't store functions in objects in an array
Easier to just pass in an argument
Donnie
@Donnie-D
May 31 2018 13:32
thank you for bearing with :clap:
Pieter Stokkink
@forkerino
May 31 2018 13:32
you're welcome
Jason Luboff
@JLuboff
May 31 2018 15:23
Morning :wave:
Looks like FCC is finally out of Beta, great!
Pieter Stokkink
@forkerino
May 31 2018 15:27
:wave: I would've thought they would throw out an email to tell people about it, but :confetti_ball: :sparkles:
Jason Luboff
@JLuboff
May 31 2018 15:28
I agree, I only saw someone post late afternoon yesterday about it and just got logged in now (they got rid of OAuth authentication so can't use github any more) but looks like I got some new challenges to go through!
How's it going? @forkerino
Pieter Stokkink
@forkerino
May 31 2018 15:32
I'm ok, I also have some new challenges to go through ;) I might take a stab at the D3 stuff later, will come in handy. How are you? @JLuboff
Jason Luboff
@JLuboff
May 31 2018 15:33
I'm thinking of just running through all the curriculum...it'll be a good refresher.
Doing alright. Nearing completion of my first production Node app! So thats exciting
Christopher McCormack
@cmccormack
May 31 2018 15:38
You can use https://www.freecodecamp.org/deprecated-signin to log in with OAuth then attach an email address
Jason Luboff
@JLuboff
May 31 2018 15:38
@cmccormack Ya I did that :)
Christopher McCormack
@cmccormack
May 31 2018 15:39
and :wave:
ah ok cool
Mine was bugged but looks like they got it fixed!
They should add Prestige to FCC - if you finish everything you can reset but with some kind of bonus :D
Jason Luboff
@JLuboff
May 31 2018 15:42
Ya I think it was bugged yesterday afternoon but worked fine this morning
That'd be fun
Christopher McCormack
@cmccormack
May 31 2018 15:43
give you a reason to redo some of the earlier projects with all your added knowledge
But they add 3 user stories for each project
Jason Luboff
@JLuboff
May 31 2018 15:45
Do they recycle some of the projects? I haven't looked
Christopher McCormack
@cmccormack
May 31 2018 15:46
I haven't either
from what I saw a few months ago on the beta a few were removed
Jason Luboff
@JLuboff
May 31 2018 15:49
Ya. Fun! I'll have to run through their react course for sure. Started reading the React docs yesterday, seemed fairly straightforward (at least at first)
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 15:50
@JLuboff once you get to use your api's with react you will start to think why didnt I learned react before doing the backend projects :D
Christopher McCormack
@cmccormack
May 31 2018 15:51
@JLuboff it actually is pretty straight forward, but that's only after you learn the quirks :)
Jason Luboff
@JLuboff
May 31 2018 15:53
@tiagocorreiaalmeida Thats what everyone keeps telling me :smile:
Christopher McCormack
@cmccormack
May 31 2018 15:53
Setting up the dev environment is actually far more difficult than React unfortunately
and I think that's where a lot of people get stuck
Jason Luboff
@JLuboff
May 31 2018 15:53
@cmccormack Ya haven't gotten to that part
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 15:53
that's why I used create-react-app
Christopher McCormack
@cmccormack
May 31 2018 15:54
@tiagocorreiaalmeida good point
@JLuboff create-react-app really is a great way to get started, they provide all the dev tools you need, but it's a bit opinionated that's why I chose to wander off and waste tons of time building my own :D
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 15:55
btw congrats @cmccormack got a notification saying that today makes 10 years since you work on the same company
Christopher McCormack
@cmccormack
May 31 2018 15:55
@tiagocorreiaalmeida I don't recall - does CRA build your package.json for you?
@tiagocorreiaalmeida oh wow I didn't even know that! haha thank you!
Jason Luboff
@JLuboff
May 31 2018 15:56
Does React require node?
Christopher McCormack
@cmccormack
May 31 2018 15:56
@JLuboff no
you can use react as a script if you want
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 15:56
@cmccormack yeah it does and seems that there's some optimization built by them when you do the build
Christopher McCormack
@cmccormack
May 31 2018 15:57
@tiagocorreiaalmeida I may actually go back to using CRA at some point, now that I know how most of the stuff works under the hood, it would be nice to let someone else take care of all of that :D
Pieter Stokkink
@forkerino
May 31 2018 15:58
@JLuboff it doesn't but using something like webpack to build it will be helpful (this uses node, but it doesn't use a node server except while developing)
Christopher McCormack
@cmccormack
May 31 2018 15:58
@JLuboff I and many others use node/npm to install the packages that help though, webpack/babel/eslint/etc...
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 15:58
yeah :D atually its been a while since I builded something but I guess im gonna get back to it, yesterday saw a post about a thing called react fiber but I dont even know what's the differnces
Jason Luboff
@JLuboff
May 31 2018 15:59
Hmmm alright. Well regardless I'd more than likely be using React when building a Node app so I'll learn it that way
Christopher McCormack
@cmccormack
May 31 2018 16:00
doesn't hurt to have a toolchain that works for you :)
I think webpack was harder to learn than React lol
Jason Luboff
@JLuboff
May 31 2018 16:05
I think I'll focus on React when I get to it as opposed to learning webpack hah
Pieter Stokkink
@forkerino
May 31 2018 16:06
Go for it :rocket:
Nazar
@IsaakNazar
May 31 2018 16:07
anyone has experience with bitbucket?
Christopher McCormack
@cmccormack
May 31 2018 16:07
@IsaakNazar a little, not much different than github (which several of us do have experience with)
Jason Luboff
@JLuboff
May 31 2018 16:07
@IsaakNazar Yes
Christopher McCormack
@cmccormack
May 31 2018 16:09
@JLuboff one thing that's nice about CRA (iirc) is that it hides webpack deep in its node_modules so you don't even have to see it
lets you focus on React
Jason Luboff
@JLuboff
May 31 2018 16:09
Even better!
@cmccormack Is there a print option in VS Code?
Nazar
@IsaakNazar
May 31 2018 16:10
@JLuboff @cmccormack who can make me pull request, if, let's say, I have a public repo? I mean, to make me PRs from different users, should I just publish repo and anyone can make me PR? or I should create team and then team members can make PRs to me (public repo)?
Christopher McCormack
@cmccormack
May 31 2018 16:10
like to a print device?
Jason Luboff
@JLuboff
May 31 2018 16:10
@cmccormack Yes
@IsaakNazar I haven't dealt with using it in a team or even giving others access to private repos but everything is under the Settings of that particular repo. You have the "User and Group Access" tab
Christopher McCormack
@cmccormack
May 31 2018 16:11
@JLuboff I actually don't know - I don't see one when looking though
Nazar
@IsaakNazar
May 31 2018 16:11
PRs means pull requests
Jason Luboff
@JLuboff
May 31 2018 16:12
@cmccormack Ok thanks. I had to install a package in Atom to enable printing and don't really care for the limited options it gave me. Looks like VS Community does have the option to print so may just do that. Or print to PDF I guess.
Christopher McCormack
@cmccormack
May 31 2018 16:12
@JLuboff appears there is an extension
Someone also recommended printing from github as you would get the syntax highlighting as well
That's wild I would have assumed they all have print functionality
Jason Luboff
@JLuboff
May 31 2018 16:14
Ya...not sure why they don't. Its odd and annoying. I just want to print my code out so I can have it in front of me when talking in a meeting lol
Christopher McCormack
@cmccormack
May 31 2018 16:14
I bet they just don't want to support it
printers are always a pain, let some extension writer support it haha
Jason Luboff
@JLuboff
May 31 2018 16:16
Ya
Pieter Stokkink
@forkerino
May 31 2018 16:19
@IsaakNazar a public repo by definition allows PRs by anyone.
If you want to limit it, you should make it private
Nazar
@IsaakNazar
May 31 2018 16:20
@forkerino ok, thank u
Christopher McCormack
@cmccormack
May 31 2018 16:21
You still have to approve it though @IsaakNazar
Pieter Stokkink
@forkerino
May 31 2018 16:23
cbot
you dead?
oh well
Tiago Correia
@tiagocorreiaalmeida
May 31 2018 16:24
they dissabled it
unthol they release the new fcc version
Christopher McCormack
@cmccormack
May 31 2018 16:24
Streak info on the new FCC only shows me until August 2017
I wonder if they'll maintain that
Jason Luboff
@JLuboff
May 31 2018 16:26
Yup. Disabled until they make some changes I guess
I only saw Quincy post that in the backend room for some reason lol
Christopher McCormack
@cmccormack
May 31 2018 16:28
There's a backend room?
well look at that
Pieter Stokkink
@forkerino
May 31 2018 16:29
rooms.png
Jason Luboff
@JLuboff
May 31 2018 16:32
@cmccormack Lol you didn't know?
Christopher McCormack
@cmccormack
May 31 2018 16:32
I guess when I added all my rooms I hadn't been working on backend yet haha
ohh there is a python room now too!
Pieter Stokkink
@forkerino
May 31 2018 16:33
Yes, you can now multiply the number of dead rooms you follow.
I'm having a sarcastic mood.
Too much code reviewing earlier
Christopher McCormack
@cmccormack
May 31 2018 16:37
haha
dead but not forgotten!
All of the View Solutions for algorithm problems are borked, you all seeing the same?
Pieter Stokkink
@forkerino
May 31 2018 16:38
@cmccormack yes, some open an undefined page, others give a 404.
most are actually missing in my case
the links, I mean
Good that I saved all of them to my github.
Maybe they should implement a TDD and integration testing section.
And practice it.
Jason Luboff
@JLuboff
May 31 2018 16:40
I'd love it if they had that
Pieter Stokkink
@forkerino
May 31 2018 16:41
I wouldn't mind contributing to something like that.
Jason Luboff
@JLuboff
May 31 2018 16:42
Huh.. I'm signed in but it keeps showing me the Sign in button...
Pieter Stokkink
@forkerino
May 31 2018 16:43
weird
Do a bug report guys! :)
Kaz Baig
@kbaig
May 31 2018 16:43
@JLuboff same
(I'm signed in via github)
Jason Luboff
@JLuboff
May 31 2018 16:49
Actually.. I don't think its keeping me signed in? Not sure where to report a bug either!
Damn.. apparently console.log messages add quite a bit of time to a route. Cleaned out a bunch I had for debugging purposes and one of my routes that would take probably ~250 ms average to load... is now averaging around 20 ms
Pieter Stokkink
@forkerino
May 31 2018 17:01
You can probably file an issue on the github of fcc
Nazar
@IsaakNazar
May 31 2018 17:06
@cmccormack ok thank u
Christopher McCormack
@cmccormack
May 31 2018 17:19
@JLuboff that's good to know! I'll move all my log statements to my debug middleware
Pieter Stokkink
@forkerino
May 31 2018 17:31
That's why I have a linting rule that makes sure there are no console.logs
Brad
@bradtaniguchi
May 31 2018 17:31
I looked into the console log slowing stuff down. Its not console.logs fault technically, its the fact your looking at it. It depends on how console.log is implemented in the environment with stdout. If you deploy your code you should have it set to having an async stdout, thus its "non-blocking" thus it shouldn't slow ya down
Henry
@GitHub-Henry
May 31 2018 17:35
how do you make console.log async
Brad
@bradtaniguchi
May 31 2018 17:37
You don't you make stdout non-blocking
Gulsvi
@gulsvi
May 31 2018 17:40
@GitHub-Henry There's this example on MDN async/await if that gives an idea:
function resolveAfter2Seconds(x) { 
  return new Promise(resolve => {
    setTimeout(() => {
      resolve(x);
    }, 2000);
  });
}

async function f1() {
  var x = await resolveAfter2Seconds(10);
  console.log(x); // 10
}
f1();
Async doesn't always mean it's blocking @bradtaniguchi :)
Brad
@bradtaniguchi
May 31 2018 17:41
Your right, wrong words here. Main thing to get at tho is don't stop using console.log/logging in general because it "slows down the app"
Henry
@GitHub-Henry
May 31 2018 17:42
@gulsvi thanks for clarifying
Nate Mallison
@NJM8
May 31 2018 18:26
anyone know how to increase the text on the options elements for a select?
Brad
@bradtaniguchi
May 31 2018 18:37
Oh never mind this isn't right forget it haha
Pieter Stokkink
@forkerino
May 31 2018 18:39
@NJM8 a quick search said that it might be difficult in chrome on certain OSs and that the most common solution is to use ul/li instead.
Nate Mallison
@NJM8
May 31 2018 18:40
thanks anyways, I tried looking around a bit. I remember looking at it in the past, browsers don't give you many options
get it.... options.....
Pieter Stokkink
@forkerino
May 31 2018 18:40
:joy:
Nate Mallison
@NJM8
May 31 2018 18:41
I could try that...... v-model not supported on ul's. :worried:
I can work around that tho
ugh, it's probably doable, I don't want to just to make the text a bit larger. people can struggle. haha
Jason Luboff
@JLuboff
May 31 2018 19:07
@forkerino I turned that rule off only becuase I was using it for debugging. Still need to remove my err console.log messages...think I might handle that with either console.error or send me an email (or both)
Pieter Stokkink
@forkerino
May 31 2018 19:11
@JLuboff At work we use sentry (https://sentry.io/), which is great for error logging. It's free for hobby projects.
Jason Luboff
@JLuboff
May 31 2018 19:14
@forkerino Do you know if the "hobby" edition is full fledged?
Pieter Stokkink
@forkerino
May 31 2018 19:15
I'm not sure, I think so, pricing seems to be based on how much you use it.
Jason Luboff
@JLuboff
May 31 2018 19:18
I'll look into it more, thanks. Heading out for a bit. See ya
Dimitris Nik.
@dimitrissnk
May 31 2018 19:18
hello, is there any statement like this?
if (userInput==nothing) { alert("Please typer something") }
so if the user hasn't typed anything in the text input form
Gulsvi
@gulsvi
May 31 2018 19:24
@Dimitrios51 if(!userInput) or if(userInput.length === 0)
Dimitris Nik.
@dimitrissnk
May 31 2018 19:24
@gulsvi will if userinput="" work?
Pieter Stokkink
@forkerino
May 31 2018 19:24
@Dimitrios51 probably, yes
Gulsvi
@gulsvi
May 31 2018 19:25
Assuming your userInput variable refers to the value of the input field
Pieter Stokkink
@forkerino
May 31 2018 19:25
true
Gulsvi
@gulsvi
May 31 2018 19:25
You will need two = to compare @Dimitrios51
== or ===
Dimitris Nik.
@dimitrissnk
May 31 2018 19:25
Yeah right.
And something else, I am using the same name for ID's, functions and variables. Would there be any issue?
Gulsvi
@gulsvi
May 31 2018 19:26
That sounds confusing, try to mix it up :)
var userInput = document.getElementById("myInput");

var userInputValue = userInput.value;

function handleUserInput() {
  // do something 
}
Jefferson
@jeffersonnnn
May 31 2018 19:32

hi guys, i need a bit of help please. So i am trying to populate a contacts field with json from a rails API and i can't seem to get it to work. Here is my code.

$('#mnu_contact').on('click', function () {
    curSelPage = "contacts";
    $('#nav_title').text('Contacts');
    showMainMenu(false);
    $.get( SERVER_URL+'/contacts.json', function(r_data) {
        var contacts = r_data;
        for (i in contacts) {
           $('#ul_sub_menu').append('<li><a href="#" class="item-link" onclick="selContact('+contacts[i]['id']+')"><div class="item-content">'+contacts[i]['name']+'</div></a></li>');
        } 
    });    

});

Help, pleaseee

Christopher McCormack
@cmccormack
May 31 2018 19:33
@jeffersonnnn my advice is to log each value to see if you are actually getting what you expect
$('#mnu_contact').on('click', function () {
    console.log("#mnu_contact clicked!")
    curSelPage = "contacts";
    $('#nav_title').text('Contacts');
    showMainMenu(false);
    $.get( SERVER_URL+'/contacts.json', function(r_data) {
        console.log(r_data)
        var contacts = r_data;
        for (i in contacts) {
           console.log($("#ul_sub_menu")
           $('#ul_sub_menu').append('<li><a href="#" class="item-link" onclick="selContact('+contacts[i]['id']+')"><div class="item-content">'+contacts[i]['name']+'</div></a></li>');
        } 
    });    

});
etc...
You may also want to tell us what exactly isn't working
Jefferson
@jeffersonnnn
May 31 2018 19:36

Okay, i shall look in that right away. @cmccormack

Also, i am trying to have a html field dynamically populated with information from the api call

Christopher McCormack
@cmccormack
May 31 2018 19:37
@jeffersonnnn sure but what exactly isn't working? Is the field not populating?
Jefferson
@jeffersonnnn
May 31 2018 19:37

Thank you for the ideas too :D ; should have thought of that @cmccormack

The fields are not populating. Here they are

<div class="page" data-page="page-contact">
    <div class="page-content">
        <div style="text-align: right;padding:20px;">
            <a href="#" onclick="onClickContactEdit({{contact['id']}})">Edit</a>  &nbsp;
            <a href="#" onclick="onDeleteContact({{contact['id']}})">Delete</a>                  
        </div>
        <div>
            <div class="row center"><h2>{{contact['name']}}</h2></div>
            <div class="center">{{contact['company']}}</div>
            <div class="">Phones</div>
            <div class="">{{contact['phones']}}</div>
            <div class="">Emails</div>
            <div class="">{{contact['emails']}}</div>
            <div class="">Addresses</div>
            <div class="">{{contact['physical_addresses']}}</div>
        </div>        

    </div>
</div>
Christopher McCormack
@cmccormack
May 31 2018 19:38
@jeffersonnnn are you using a template?
Jefferson
@jeffersonnnn
May 31 2018 19:41
oh yes i am. The framework7 template for making mobile looking interfaces
@cmccormack are the fields the reason why i can't get it working?
Christopher McCormack
@cmccormack
May 31 2018 19:47
@jeffersonnnn I see you targeting elements with ids in your jquery but you don't appear to have any elements with ids
Jefferson
@jeffersonnnn
May 31 2018 19:50
@cmccormack christ how did i miss this lool
thank you, i can't belive i missed that. Okay, lemme deal with that right away
Christopher McCormack
@cmccormack
May 31 2018 19:52
@jeffersonnnn :thumbsup: good luck
Dimitris Nik.
@dimitrissnk
May 31 2018 20:40
Do I have to place something specifically in the search's function argument? Because I can't get it to work right.
https://codepen.io/dimitris51/pen/bMPjqd?editors=1010
Christopher McCormack
@cmccormack
May 31 2018 20:44
@Dimitrios51 you have to get the value of your input within your callback, not globally, else it will always have a length of 0
maybe get the value in search and only then pass it to userInput
Dimitris Nik.
@dimitrissnk
May 31 2018 20:46
@cmccormack Ohh I see...I changed it and it does its job. But why this? I assigned that variable globally because I will probably want to use it again with the wiki API
Christopher McCormack
@cmccormack
May 31 2018 20:47
@Dimitrios51 that variable will only have the value of your input when the page loads, which is empty. You have to get the value that's in the input at the moment your action happens
You can use an onchange event on your input that updates your global variable everytime you update input, but may be better to just grab that value at the time you need it

or maybe change it to something like

var storedInput = () => document.getElementById("input").value;

and invoke it as a function instead

Jason Luboff
@JLuboff
May 31 2018 20:59
@cmccormack May want to show it using non-arrow function too (or explain it) :smile:
Christopher McCormack
@cmccormack
May 31 2018 20:59
@JLuboff NO
arrow functions forever
Jason Luboff
@JLuboff
May 31 2018 21:00
Oh, I agree. But they can be quite confusing to a new individual :smile:
Christopher McCormack
@cmccormack
May 31 2018 21:05
The only time I really have to use the function statement anymore these days is when using a mongoose model and I need access to this, but that's about it. I'm wondering if soon we won't need it at all
I think you could probably use .bind to get around that as well
Jason Luboff
@JLuboff
May 31 2018 21:06
Possibly.
Christopher McCormack
@cmccormack
May 31 2018 21:07
I hadn't really thought about it until now :D
@Dimitrios51
function storedInput() { document.getElementById("input").value; }
Dimitris Nik.
@dimitrissnk
May 31 2018 21:10
@cmccormack but why do such a thing? what's the difference of just having it in my search(event) function?
Brad
@bradtaniguchi
May 31 2018 21:10
Functions are good for when you need a function still yo.
myFunction();

function myFunction() {
  console.log("can't do this with an arrow function without re-ordering!");
}
Christopher McCormack
@cmccormack
May 31 2018 21:11
@Dimitrios51 you can put it anywhere you want
@Dimitrios51 if you wanted to keep it global I was providing suggestions
@bradtaniguchi why do you still need a function in that example?
oh I see because of hoisting
Brad
@bradtaniguchi
May 31 2018 21:11
Yes, no hoisting with arrow functions
Now if they made another "const/var/let" like variable like host or something that hosts a variable declaration then yea functions can be workedaround/obsolute but till then, hoisting for the win
Christopher McCormack
@cmccormack
May 31 2018 21:15
or just declare them at the top :)
I'll be honest I've been working a lot with React lately and haven't had to worry much about hoisting as my methods are all class properties
(I think that's the correct term)
Brad
@bradtaniguchi
May 31 2018 21:17
Yea you can in simple cases, but sometimes its nice to shove all the functions to the bottom
class methods (?)
Dimitris Nik.
@dimitrissnk
May 31 2018 21:22
I finally made it work! :D
Christopher McCormack
@cmccormack
May 31 2018 21:22
@Dimitrios51 :cheers:
Jason Luboff
@JLuboff
May 31 2018 21:25
I gotta say...it can be a little frustrating showing off your application only to need to make a bunch of changes even though you built it off of what they told you, hah. But.. that is the life of a programmer
Christopher McCormack
@cmccormack
May 31 2018 21:26
@JLuboff you should adopt the agile methodology - get yourself a product owner that's responsible for providing the user stories and updating leadership with the current product
@JLuboff is this your MVP?
Jason Luboff
@JLuboff
May 31 2018 21:27
@cmccormack Most Valuable Player?
Christopher McCormack
@cmccormack
May 31 2018 21:27
hah Minimum Viable Product
Jason Luboff
@JLuboff
May 31 2018 21:27
I know I've heard that term, but you'll have to describe it a bit. And I've also learned a bit about agile in the past but would have to look at it again.
Christopher McCormack
@cmccormack
May 31 2018 21:32
basically make the app as simple as possible, based on user stories ordered in priority by your project owner
get the app up and running with some functionality but not necessarily implementing all user stories, just the priority
that way you don't waste time building something they no longer want or no longer need some features of
Jason Luboff
@JLuboff
May 31 2018 21:33
Ah.
Majority of the changes are small. Nothing really that will break the current build
Dimitris Nik.
@dimitrissnk
May 31 2018 21:33
@cmccormack thanks for the help :)
Christopher McCormack
@cmccormack
May 31 2018 21:35
@Dimitrios51 np
@JLuboff that's awesome, so you may almost be done!
Jason Luboff
@JLuboff
May 31 2018 21:39
Yup! Hopefully knock out these changes within the next few working days and then polish things up.
Then I'll have to move and test everything in dev... which will be a little more work (switching from Windows to Linux) mainly due to how I store and access files but shouldn't take too long to figure that out.
Working with a different git branch right now figured good way to practice with those
Brad
@bradtaniguchi
May 31 2018 21:41
Your solution: use linux :trollface:
Jason Luboff
@JLuboff
May 31 2018 21:44
Meant move and test everything in prod lol but ya I'm hosting Node on linux, no point in paying for a Windows Server license nor putting it on one of our current servers
Christopher McCormack
@cmccormack
May 31 2018 21:44
@JLuboff yeah that's smart using a diff branch
Well I'm off to Seattle for a few days, ttyl!
Jason Luboff
@JLuboff
May 31 2018 21:44
@cmccormack another conferencde?
Christopher McCormack
@cmccormack
May 31 2018 21:44
Nope
Personal this time
Jason Luboff
@JLuboff
May 31 2018 21:45
Cool, have fun!
Christopher McCormack
@cmccormack
May 31 2018 21:45
Thanks man!
Brad
@bradtaniguchi
May 31 2018 21:58
Nice, another office mate was selling monitors, got one with 1080, speakers and usb ports for 40$ hehe
Smootimus
@Smootimus
May 31 2018 22:14
:D
Jason Luboff
@JLuboff
May 31 2018 23:41
Lol. I was able to claim my JS Algorithm and Data Structures cert! Apparently I had already done the challenges ( I really should go back and refactor them though)
Brad
@bradtaniguchi
May 31 2018 23:45
:+1: