Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

10-11-2018 , 01:32 PM
Quote:
Originally Posted by Victor
you can open as many folders (and run/build them concurrently) as you want with a Workspace in vsCode.
a) I didn't realize Visual Studio for Mac and VS Code for Mac were two different things - lol.

b) Is this new? I do seem to remember trying to open multiple folders a few years back (pretty sure it was VS Code then) and not being able to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 02:04 PM
JavaScript makes me want to flip the table and say “f*ck this sh*t”, but I can never be sure what “this” refers to.


-stolen from twitter
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 02:11 PM
console.log(this); // a big mess of ****

Also that tweeter better not quit their job. Knowing this off the top of your head w/o console.logging is probably the most essential developer skill to have in today's job market. 2nd of course is being able to speak for hours and having strong passionate opinions about the half dozen possible ways to do inheritance in Javascript.

Because there is nothing better than a massive Javascript architecture that makes heavy use of inheritance and this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 02:43 PM
Quote:
Originally Posted by suzzer99
a) I didn't realize Visual Studio for Mac and VS Code for Mac were two different things - lol.

b) Is this new? I do seem to remember trying to open multiple folders a few years back (pretty sure it was VS Code then) and not being able to.
I doubt you used VS Code seriously a few years back, and if you did it was brand new and a lot has changed in it's 3 years of development.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 03:23 PM
I guess it would have been like 1.5 years ago when I played with it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 04:02 PM
Micro, I have some Gunnar glasses that I've found helpful. I suspect they're just reading glasses with more attractive styling and a tint. And of course they're far more expensive as a result but they've definitely helped me with reduced eye strain
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 05:06 PM
Vscode improves every month and is much different than even 6 months ago.

I think the workspace thing is fairly new
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 08:26 PM
Yeah I gotta say it handles all my gotchas. I still feel more comfy with Sublime since i know everything about it. And now I feel invested after spending 3 hours yesterday finally getting linting to work the way I want. But I know I should probably switch.

Also holy crap are JWT tokens a pain in the ass.

Cognito has two flows:

1) Log in through the api with your own custom pages. Lots of examples, everything works - you never see the tokens but you can pull them from the user data if you really want.

2) Log in through the built-in cognito hosted pages. Here's a JWT token in the location.hash - now go eff yourself. No documentation, just vague references that you need to create a lambda to unpack the jwt token, then apparently write all your own user libs to match what already exists for the API flow.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 08:50 PM
I guess you always have to go to a server to verify the JWT signature right? So you can never trust a token until you’ve verified the signature against your keys stored on the server side?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 09:26 PM
I think I may start looking for a new job soon. Does it look bad if I only have ~6 months at a company after just graduating? should I try to wait a year?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 09:40 PM
Nah. Just be prepared to answer why you're looking so soon in a way that is professional and not badmouthing your employer.

And then just keep in mind that you can't make it a habit to jump this quickly. Once or twice with some decent stuff in between and nobody cares but a string of short stints starts looking iffy
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 09:55 PM
1. Build react app using npx create-react-app .
2. Run npm start.
3. Computer goes crazy, browser windows pop up.
4. Fan is now running full blast to support my hello world react app.
5. Kill silly tiny little react demo server, fan calms down.

You crazy kids and your tools and scripts. There's gonna be tools bootcamps where you have to spend a year before you can even start to code.

Learning webpack will be like the old-school blacksmith apprentice phase. You work the bellows for 2 years, then maybe I'll let you pound some iron.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 10:01 PM
Quote:
Originally Posted by Craggoo
Arrow functions "inherit" context without you having to pass it through via bind.
This is called lexical scoping and that's how practically all modern programming languages work. Even in JavaScript, for everything except "this", this is how scoping works. What JavaScript does with "this" outside of arrow functions is essentially akin to dynamic scoping and used to be more widespread but lexical scoping more or less won the war and no serious programming language designer would consider anything other than lexical scoping as the default choice in 2018.

Quote:
1) If you plan on passing in a this value when you call a function, the function should not be an arrow function because the context you pass in will be ignored.
Caller being able to set context as to the called function's scope isn't something that should still be happening in 2018. This was only ever necessary to emulate class-based OO in JavaScript when methods were indistinguishable from functions and isn't necessary except where class methods (which are by definition not arrow functions) being passed as callbacks.

Quote:
2) In the AWS example, the context will be undefined therefore rendering an arrow function in that example really pointless
This is only true if you accept the old JS function to be some kind of sacred default way and have internalized its idiosyncratic behavior as the right way. Among modern JS programmers, outside of methods and constructors, arrow functions are increasingly seen as the default because that's how all other languages work.

Quote:
I would generally argue against using arrow functions entirely. Imagine a scenario where you have a bunch of nested arrow functions. You would need to track down which context is actually being used (implicit) instead of explicitly binding the context you want (explicit).
How them do you track down how other named variables are resolved? All arrow functions do is that they treat "this" the same way that they treat other variables. There's nothing confusing about "implicit context" - this is just standard lexical scoping, now applied to all variables instead of all variables except "this" for which a weird set of rules is applied. As you can see from the responses here and what not, lexical scoping isn't confusing, "this" is confusing - arrow functions dramatically reduce the confusion and reliance on the special behavior of "this" and bring JS to parity with other modern languages.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 10:39 PM
Quote:
Originally Posted by suzzer99
I guess you always have to go to a server to verify the JWT signature right? So you can never trust a token until you’ve verified the signature against your keys stored on the server side?
Eh kind of. We expose the public key by an api, the client caches this for 24 hours, and uses the pub key to verify the signer. Only have to reach out to the server once a day in this pattern
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 11:02 PM
Quote:
Originally Posted by suzzer99
I guess you always have to go to a server to verify the JWT signature right? So you can never trust a token until you’ve verified the signature against your keys stored on the server side?
No. JWTs are signed with a secret key. You can decode them without the key, but with the key you can verify that they were properly encoded, i.e. they haven't been tampered with. You can decode or verify them anywhere, as long as that place has access to the key.

This is a little bit of a simplication - there are multiple ways to encode keys, from HMAC (shared secret) to RSA (public/private keys) but in either case, you still can decode and verify them anywhere.

There's a basic description here:
https://jwt.io/introduction/

The same site has tools to verify and decode tokens.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 11:03 PM
An AWS play in 2 acts:



Ok lets go do that.

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 11:08 PM
Quote:
Originally Posted by suzzer99
1. Build react app using npx create-react-app .
2. Run npm start.
3. Computer goes crazy, browser windows pop up.
4. Fan is now running full blast to support my hello world react app.
5. Kill silly tiny little react demo server, fan calms down.

You crazy kids and your tools and scripts. There's gonna be tools bootcamps where you have to spend a year before you can even start to code.

Learning webpack will be like the old-school blacksmith apprentice phase. You work the bellows for 2 years, then maybe I'll let you pound some iron.
It's very likely the animated spinning SVG on the demo page and nothing to do with Node, React, Webpack etc.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 11:15 PM
Quote:
Originally Posted by jmakin
I think I may start looking for a new job soon. Does it look bad if I only have ~6 months at a company after just graduating? should I try to wait a year?


What do you enjoy doing the most? What type of job will you be looking for?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-11-2018 , 11:37 PM
I've been creating react apps on a 7 year old laptop that was only $325 new and it's been going fine as far as not blowing up or even freezing. It's slow, sure, but nothing especially bad.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 12:20 AM
I use atom for some stuff and vim for others. I actually find atom pretty fine performance wise. I was using pycharm for a bit with vim bindings but it just made me want to use vim.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 12:56 AM
Quote:
Originally Posted by _dave_
It's very likely the animated spinning SVG on the demo page and nothing to do with Node, React, Webpack etc.
The whole app is just the App.js from this issue: https://github.com/aws-amplify/amplify-js/issues/1386
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 07:33 AM
Quote:
Originally Posted by microbet
Does anyone have glasses specifically for computer use?

I'm mildly/moderately near-sighted and have been since my 20s. I can get by at distance sorta, but really need glasses or contacts to drive. And now that I'm getting old, I can read fine w/o glasses or contacts, but if I am wearing my contacts I need reading glasses. But...nothing really works at the intermediate distance of a computer screen. I need to either get too close w/o contacts or too far with them.
Yes. I use glasses for distance, but up until recently, was fine with my computer monitor. I noticed I was struggling a little, so last time I had my eye exam, my optometrist gave me a prescription to use on my computer.

Basically, just had me sit in front of a screen at a distance I regularly use my computer and found a good lens for that distance. I also took the option to graduate the lens so I could easily look down to documents on my desk and be able to read them.

Made a big difference in reducing my eye strain at the end of a work day.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 07:49 AM
Quote:
Originally Posted by suzzer99
The whole app is just the App.js from this issue: https://github.com/aws-amplify/amplify-js/issues/1386
Fair enough, in that case I don't have any guesses - take a look at what's going on with top or whatever command shows cpu usage on your system. With the default output of create-react-app, I have experienced very high cpu usage from the mentioned spinning SVG animation, likely because Firefox default was/is GPU acceleration disabled IIRC.

I think "replaced all the application code with different code that does something else" is a kind of important "step 1.5" to not mention when listing the sequence of events leading up to a problem, tbh.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 04:16 PM
Anyone have a brand new macbook pro?

My personal 2012 macbook pro I bought itt from kerowo has been dropped probably a hundred times and while it probably shouldn't be working anymore (and the hdmi port just died) it's still incredibly reliable.

My 2018 macbookpro at work has a spacebar that double spaces and now my GPU is causing my screen colors to flash from being loose or something. Basically thing is deteriorating, but it has a media bar so I got that going for me, which is nice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-12-2018 , 05:47 PM
Mine is a few years old and if I do anything intensive at all it sounds like it's preparing for takeoff. The new ones seem worse if anything. I have a personal one from an old job that is at least 8 years old and doing OK.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m