Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 10-11-2018, 01:26 PM   #35676
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 50,040
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
microbet is offline   Reply With Quote
Old 10-11-2018, 01:32 PM   #35677
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Victor View Post
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.
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 02:04 PM   #35678
Wolfram
Carpal \'Tunnel
 
Wolfram's Avatar
 
Join Date: Jan 2006
Location: You can be my wingman any time
Posts: 14,709
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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
Wolfram is offline   Reply With Quote
Old 10-11-2018, 02:11 PM   #35679
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 02:43 PM   #35680
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,754
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
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.
_dave_ is offline   Reply With Quote
Old 10-11-2018, 03:23 PM   #35681
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I guess it would have been like 1.5 years ago when I played with it.
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 04:02 PM   #35682
blackize5
old hand
 
Join Date: Sep 2012
Posts: 1,256
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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
blackize5 is online now   Reply With Quote
Old 10-11-2018, 05:06 PM   #35683
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 60,092
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Vscode improves every month and is much different than even 6 months ago.

I think the workspace thing is fairly new
Victor is offline   Reply With Quote
Old 10-11-2018, 08:26 PM   #35684
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 08:50 PM   #35685
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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?
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 09:26 PM   #35686
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,662
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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?
jmakin is offline   Reply With Quote
Old 10-11-2018, 09:40 PM   #35687
blackize5
old hand
 
Join Date: Sep 2012
Posts: 1,256
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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
blackize5 is online now   Reply With Quote
Old 10-11-2018, 09:55 PM   #35688
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
suzzer99 is offline   Reply With Quote
Old 10-11-2018, 10:01 PM   #35689
candybar
old hand
 
Join Date: Aug 2011
Posts: 1,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Craggoo View Post
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.
candybar is offline   Reply With Quote
Old 10-11-2018, 10:39 PM   #35690
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,651
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
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
PJo336 is offline   Reply With Quote
Old 10-11-2018, 11:02 PM   #35691
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,886
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
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.
RustyBrooks is offline   Reply With Quote
Old 10-11-2018, 11:03 PM   #35692
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

An AWS play in 2 acts:



Ok lets go do that.

suzzer99 is offline   Reply With Quote
Old 10-11-2018, 11:08 PM   #35693
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,754
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
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.
_dave_ is offline   Reply With Quote
Old 10-11-2018, 11:15 PM   #35694
KatoKrazy
Pooh-Bah
 
KatoKrazy's Avatar
 
Join Date: Jan 2009
Location: Orange County, CA
Posts: 3,601
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by jmakin View Post
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?
KatoKrazy is online now   Reply With Quote
Old 10-11-2018, 11:37 PM   #35695
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 50,040
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
microbet is offline   Reply With Quote
Old 10-12-2018, 12:20 AM   #35696
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 42,515
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Larry Legend is offline   Reply With Quote
Old 10-12-2018, 12:56 AM   #35697
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 87,649
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by _dave_ View Post
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
suzzer99 is offline   Reply With Quote
Old 10-12-2018, 07:33 AM   #35698
codeartisan
centurion
 
codeartisan's Avatar
 
Join Date: Jun 2008
Posts: 144
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by microbet View Post
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.
codeartisan is offline   Reply With Quote
Old 10-12-2018, 07:49 AM   #35699
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,754
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
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.
_dave_ is offline   Reply With Quote
Old 10-12-2018, 04:16 PM   #35700
Larry Legend
Celtic Pride
 
Larry Legend's Avatar
 
Join Date: Jul 2009
Location: Kyrie's earth
Posts: 42,515
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Larry Legend is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 12:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online