These are chat archives for MontCode/GeneralChat

1st
Aug 2016
David Castner
@davidjcastner
Aug 01 2016 13:03
Sorry was busy over the weekend, let me know if you need any help with command line
Owen Winkler
@ringmaster
Aug 01 2016 13:47
rm -rf /
Lily Romano
@Lilyheart
Aug 01 2016 13:47
any time you use rm you have to quintuple check your command matches your intent. ALWAYS
David Castner
@davidjcastner
Aug 01 2016 13:48
@ringmaster I get that that is funny but I wouldn't post that here where people are looking for help
Owen Winkler
@ringmaster
Aug 01 2016 13:48
rm -rf / This deletes your entire filesystem. Don’t do it.
David Castner
@davidjcastner
Aug 01 2016 13:48
okay that's better
Owen Winkler
@ringmaster
Aug 01 2016 13:48
@davidjcastner Sorry, that was a poor introduction into your community on my part.
Lily Romano
@Lilyheart
Aug 01 2016 13:50
:thumbsup:
Owen Winkler
@ringmaster
Aug 01 2016 13:51
I got an email from Meetup this morning saying I might be interested in your group. I poked around the page and ended up here somehow. My main question is this: Everyone here seems to be writing javascript; is that a focus or just coincidence?
Lily Romano
@Lilyheart
Aug 01 2016 13:51
just coincidence
David Castner
@davidjcastner
Aug 01 2016 13:52
We focus on the MEAN stack which means (no pun intended) that we use javscript
Lily Romano
@Lilyheart
Aug 01 2016 13:52
Any coding is okay. Web development is the primary trend however.
David Castner
@davidjcastner
Aug 01 2016 13:52
but you are welcome to discuss any programming, we mainly are encouraging people to learn coding
Owen Winkler
@ringmaster
Aug 01 2016 13:52
Mongo, Elixir, Ansible,... Netflix?
My acronyms re getting rusty, I think.
David Castner
@davidjcastner
Aug 01 2016 13:53
haha mongo, express, angular, node
Owen Winkler
@ringmaster
Aug 01 2016 13:53
Ah, Express, yeah. I forgot about that one.
Lily Romano
@Lilyheart
Aug 01 2016 13:54
Come September I'll be doing a lot of Java.
Right now I'll waist deep in the linux CLI + bash + python
Owen Winkler
@ringmaster
Aug 01 2016 13:55
Currently, I’m an Elixir dev, and Ruby/Rails. Before that, PHP. Before that, Delphi. All for $. With smatterings of everything everyone’s mentioned so far either for $ or for fun.
Well, that’s nifty.
Lily Romano
@Lilyheart
Aug 01 2016 13:55
@SimplyPhy for CLI, the best recommendation I have is to just keep using it. May eventually you end up crazy like me and have a secure shell app on your phone so you can connect to your house via the command line xD
Also, this is a great book/PDF http://linuxcommand.org/tlcl.php
I have three different CLI screens I can see right now @_@ gonna be a crazy day
Eric Phy
@SimplyPhy
Aug 01 2016 13:58
cool, and I’m glad @owen winkler wasn’t here to answer my question in real time
i might have been foolish enough to go ahead with his recommendation
Owen Winkler
@ringmaster
Aug 01 2016 13:59
Oh, I wouldn’t have done that to you. :worried:
David Castner
@davidjcastner
Aug 01 2016 14:00
I once saw someone leave that command with sudo in front of it on a whiteboard. They said "run this command to make your program faster, uses less memory"
Owen Winkler
@ringmaster
Aug 01 2016 14:00
Certainly true...
Can’t npm upgrade node directly?
It’s hard to imagine getting by in node without having npminstalled already, and if it can do the job, that seems useful.
David Castner
@davidjcastner
Aug 01 2016 14:03
@ringmaster I believe that it can, but this is the easiest way Install Node. Npm is included in the node install starting with version 4
Lily Romano
@Lilyheart
Aug 01 2016 14:04
ha, David beat me to it again!
Owen Winkler
@ringmaster
Aug 01 2016 14:04
Running bash scripts from remote sources make me a little… something.
Lily Romano
@Lilyheart
Aug 01 2016 14:05
wanna take the world out with a shabang?
Owen Winkler
@ringmaster
Aug 01 2016 14:05
In spite of prior postings, not really. :wink:
Lily Romano
@Lilyheart
Aug 01 2016 14:05
I know I'm the only person in the world that finds shabang jokes funny xD but they amuse me everytime. #!
David Castner
@davidjcastner
Aug 01 2016 14:08
you can always go to the url to see the bash script https://deb.nodesource.com/setup_6.x
Owen Winkler
@ringmaster
Aug 01 2016 14:08
Yeah, I was looking at that.
I’m sure it’s fine, but healthy fear is healthy.
Lily Romano
@Lilyheart
Aug 01 2016 14:09
mmmmm bash :yum:
David Castner
@davidjcastner
Aug 01 2016 14:09
I agree running bash scripts without knowing what they do is generally not a good practice
however, I'm seeing more software tools being installed this way nowadays, rather than the deb package manager
Owen Winkler
@ringmaster
Aug 01 2016 14:13
This is a no-fly in my company, since we use RedHat Software Collections. If there’s something that needs installed that isn’t in SCL, we have to hand-roll a package and commit to maintaining it, which is usually more trouble than just using some other pre-existing package. Suffice to say, installing things we intend to have on a server via 3rd party shell script is a big no-no. Obviously, YMMV, since we’re definitely purposefully strict.
David Castner
@davidjcastner
Aug 01 2016 14:14
They also have binaries as well for those cases https://nodejs.org/en/download/
Owen Winkler
@ringmaster
Aug 01 2016 14:15
The SCL package for node is old. It’s a point of contention, since the devs want new and shiny, and the ops guys want our servers not to asplode.
David Castner
@davidjcastner
Aug 01 2016 14:16
lol understandable. I'm a one man full stack dev, so i get the luxury of upgrading when I'm ready to
Eric Phy
@SimplyPhy
Aug 01 2016 14:17
so if i download nodejs from the site, via the installer, and i already have node.js installed, will it successfully overwrite without jacking anything up, to your knowledge?
Lily Romano
@Lilyheart
Aug 01 2016 14:17
It's a crazy world. When I was younger never thought I'd be able to pull a computer out of a drawer the size of a deck of cards, stick a piece of plastic in smaller than my smallest fingernail and boot up a full fledged computer.
Eric Phy
@SimplyPhy
Aug 01 2016 14:17
osx 10.11
David Castner
@davidjcastner
Aug 01 2016 14:18
@SimplyPhy correct
Eric Phy
@SimplyPhy
Aug 01 2016 14:18
Cool :D
that’s how i like to dl things for now, generally speaking
yay! and npm-debug.log is back :D
I’m happy
David Castner
@davidjcastner
Aug 01 2016 14:19
@SimplyPhy if you have issues let me know, but I change/overwrite versions using those scripts all the time
Eric Phy
@SimplyPhy
Aug 01 2016 14:19
so I just began the senior web dev nanodegree
Lily Romano
@Lilyheart
Aug 01 2016 14:19
wooooooooo!
Eric Phy
@SimplyPhy
Aug 01 2016 14:21
even though I’m using macOS, i still always feel like i’m going to do something akin to messing up the registry in windows using the terminal
Lily Romano
@Lilyheart
Aug 01 2016 14:21
Anything dire should require a sudo/password
Eric Phy
@SimplyPhy
Aug 01 2016 14:21
i’m good with using it for version control and github stuff, but once the real codes starts buzzing in there i’m scared
This message was deleted
Lily Romano
@Lilyheart
Aug 01 2016 14:22
I totally recommend getting a raspberry pi (I have old ones you can have if you want an old one) and just doin' stuff with it on command line. If you screw it up, you just reinstall the os and keep truckin' along.
Eric Phy
@SimplyPhy
Aug 01 2016 14:23
hmm, not a bad idea
Owen Winkler
@ringmaster
Aug 01 2016 14:23
A cheaper and potentially future-useful alternative is to use Virtualbox.
Eric Phy
@SimplyPhy
Aug 01 2016 14:24
yeah i used fedora inside virtualbox for cs50
so for example: npm install -g typescript
Lily Romano
@Lilyheart
Aug 01 2016 14:24
I use VirtualBox on my win machine. It's nice. But a pi is more fun!
Owen Winkler
@ringmaster
Aug 01 2016 14:24
Take snapshots before you do anything crazy.
Eric Phy
@SimplyPhy
Aug 01 2016 14:24
where do you put that? or does it matter? does it just go wherever it’s supposed to within your path>
Owen Winkler
@ringmaster
Aug 01 2016 14:24
@Lilyheart Full disclosure: There is a stack of EeeBoxes to my left. :wink:
Lily Romano
@Lilyheart
Aug 01 2016 14:25
@SimplyPhy come to blue bell/east norriton/Plymouth meeting for lunch one day and I'll hand one off to you.
Eric Phy
@SimplyPhy
Aug 01 2016 14:25
lol, hand me a pi? xD
Lilyheart @Lilyheart nods yes.
Eric Phy
@SimplyPhy
Aug 01 2016 14:25
regardless, it sounds like a good plan
so again, does it make any difference what your active directory is when you runs npm installs, like npm install -g typescript ?
Lily Romano
@Lilyheart
Aug 01 2016 14:27
-g are global installs so it shouldn't
Eric Phy
@SimplyPhy
Aug 01 2016 14:27
cool
giving it a go now..
Lily Romano
@Lilyheart
Aug 01 2016 14:27
are you on el capitan?
David Castner
@davidjcastner
Aug 01 2016 14:27
@SimplyPhy it matters for using npm install without the global flag
Eric Phy
@SimplyPhy
Aug 01 2016 14:28
ugh
i thoguht i was an admin on the terminal
David Castner
@davidjcastner
Aug 01 2016 14:29
global installs for npm require sudo
Eric Phy
@SimplyPhy
Aug 01 2016 14:31
oh, so should i use a different command?
i’m researching how to make myself an admin now
Lily Romano
@Lilyheart
Aug 01 2016 14:32
put sudo in front of the command for a quick boot in privlige. You are not always admin, that is locked down.
Super User DO!
Eric Phy
@SimplyPhy
Aug 01 2016 14:33
cool, it worked :D
Owen Winkler
@ringmaster
Aug 01 2016 14:33
Tip: If you run a command that requires SU privileges but forget to use sudo, you can just type sudo !! at the next prompt and it’ll run the last command again with SU privs.
Lily Romano
@Lilyheart
Aug 01 2016 14:33
when using sudo is when you should be scared
Eric Phy
@SimplyPhy
Aug 01 2016 14:33
oh ha
well it worked, and doesn’t appear to be a frightening outcome, so i’m pleased
Lily Romano
@Lilyheart
Aug 01 2016 14:34
link
Jus' sayin' don't using it willy nilly
Eric Phy
@SimplyPhy
Aug 01 2016 14:34
i think i used it once without much thought
doesn’t seemed to have hurt anything though, so yay
hmm, typescript looks kind of like javascript coupled with c# (to noob me)
which makes me think it’s probably like unityscript
Lily Romano
@Lilyheart
Aug 01 2016 14:38
I need a light sensor to put outside so the lights turn on in here when it's so dreary out.
Eric Phy
@SimplyPhy
Aug 01 2016 16:16
sometimes just figuring out “what something is”, both functionally and structurally is really annoying
Lily Romano
@Lilyheart
Aug 01 2016 16:16
agreed. you have to know what it is to know what it is.
Eric Phy
@SimplyPhy
Aug 01 2016 16:16
example: right now i’m reading about JSON $schemas, and answering the question “what comprises a JSON $schema” is a big pain in the ass
it’s like the devs/doc writers secretly want to waste peoples’ time
@Lilyheart i like that adage xD
David Castner
@davidjcastner
Aug 01 2016 17:05
@SimplyPhy you need help with schema's in json?
Eric Phy
@SimplyPhy
Aug 01 2016 17:06
probably, but unfortunately getting offline right now
are they authentication, or just documentation specs?
David Castner
@davidjcastner
Aug 01 2016 17:06
okay the short version is a schema is how you structure your data (in case JSON format)
Eric Phy
@SimplyPhy
Aug 01 2016 17:07
and then your data is authenticated via the schema?
or validated, rather
David Castner
@davidjcastner
Aug 01 2016 17:08
yes, so as an example: you might have a user collection, the schema would check thigns like each user object has a username field, an email field, etc
Eric Phy
@SimplyPhy
Aug 01 2016 17:09
and if one of them didn’t..?
David Castner
@davidjcastner
Aug 01 2016 17:10
it would fail any tests that is associated with the schema (the schema is an abstraction, and you can find libraries that provide validation for you). You can say each username is a string and must be between 8 and 50 characters
here is an example:
UserSchema = new SimpleSchema({
    "email": {
        type: String,
        label: "Email",
        regEx: SimpleSchema.RegEx.Email,
        max: LIMIT_PARAGRAPH_CHAR
    },
    "confirmEmail": {
        type: String,
        label: "Confirm Email",
        optional: true
    },
    "username": {
        type: String,
        label: "Username",
        regEx: new RegExp(PATTERN_USERNAME),
        min: LIMIT_USERNAME_CHAR_MIN,
        max: LIMIT_USERNAME_CHAR_MAX
    },
    "password": {
        type: String,
        label: "Password",
        regEx: new RegExp(PATTERN_PASSWORD),
        min: LIMIT_PASSWORD_CHAR_MIN,
        max: LIMIT_PASSWORD_CHAR_MAX
    },
    "confirmPassword": {
        type: String,
        label: "Confirm Password",
        optional: true
    }
});
Eric Phy
@SimplyPhy
Aug 01 2016 17:13
hmm
David Castner
@davidjcastner
Aug 01 2016 17:13
then my simpleSchema library has a validation function I can call that will throw an error if a user object doesn't pass
Eric Phy
@SimplyPhy
Aug 01 2016 17:13
okay cool, I think i have the gist of it
i have to go unfortunately, i’ll be back before 5
thanks @davidjcastner
MontBot
@MontBot
Aug 01 2016 17:14
:cookie: 353 | @davidjcastner |http://www.freecodecamp.com/davidjcastner
simplyphy sends brownie points to @davidjcastner :sparkles: :thumbsup: :sparkles:
David Castner
@davidjcastner
Aug 01 2016 17:14
okay feel free to ask me more questions about it later