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 03-18-2019, 02:01 PM   #37976
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

They've already fallen out of my ear 20 times.
suzzer99 is offline   Reply With Quote
Old 03-18-2019, 03:29 PM   #37977
just_grindin
Pooh-Bah
 
Join Date: Dec 2007
Posts: 4,877
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
FWIW - to expound this spoof code really captures some of my biggest pet peeves well. Factories to create factories - and (n, null, null, 0, null) as arguments is perfect.

But maybe the biggest one is including the most important input (the previous/seed fibonacci number) in the first method call, then obscuring it with two other method calls later, especially one that takes *this* as an argument.

The important inputs should always be front and center, and not require a cognitive-debt code trace to ultimately figure it out imo. I'm always going to ignore the cruft and scroll straight to accessNextFibonacciNumber. But of course then I will be confused as to how it knows what the previous next fibonacci number was. Oh it's in the builder factory. Duh.
Yea this is pretty ugly. I generally hate the verbosity of C#, C++ (if coded poorly), and java in general and add on the antipatterns it's so much worse.

Btw you could probably find honey with floral notes to flavor your drink and just use regular vodka. Or buy regular vodka and then put petals or honey in it to sit and pick up the flavor.
just_grindin is offline   Reply With Quote
Old 03-18-2019, 05:24 PM   #37978
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 21,497
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
https://skillprogramming.com/top-rat...b9byhJXJRGYrfQ



This one pretty well encapsulates how I feel about Java these days.
Serious question, you are tasked with writing a unit test for this code, how would you go abou it?
adios is offline   Reply With Quote
Old 03-18-2019, 06:02 PM   #37979
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,354
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by adios View Post
Serious question, you are tasked with writing a unit test for this code, how would you go abou it?
Find that guy from China who wanted someone to set up a contracting account for him

But jokes aside, the same as any other function? It takes an integer as an input and returns an integer as a result, should be a piece of cake to write tests for
RustyBrooks is offline   Reply With Quote
Old 03-18-2019, 06:32 PM   #37980
well named
poorly undertitled
 
well named's Avatar
 
Join Date: Jun 2007
Location: esse est coesse
Posts: 75,947
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I think the point is it's not properly a unit test if you don't mock the builderfactorydataviewwhatever.

But I would just unit test those methods instead of this one.

(I mean, assuming that "rewrite everything" is off the table)
well named is offline   Reply With Quote
Old 03-18-2019, 09:25 PM   #37981
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,506
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

So I have this situation I don't really know how to deal with - I have a guy that keeps relying on me heavily to get his stuff done, isn't really willing to take much initiative on his own to do stuff. Like if he doesn't want to do something it straight up isn't gonna get done without my boss intervening.

This is usually fine because I have a good relationship with the guy but lately he's been driving me up a ****ing wall. I had this assignment I was supposed to do with his help - but it quickly devolved into him passing most of the work to me, basically directing him step by step for his portion of the assignment because he didnt read the documentation and didnt familiarize himself with basically anything in the project (he was asked to do this).

So, assignment time comes and we completely disagree with how to go about it. He wants to do it "his" way but have me basically direct the entire thing. I gave in and just did it. He usually will sit next to me and interrupt whatever other thing I am doing so we can "finish this" but it's usually just me debugging his stuff and then saying what the next step is because he was usually the bottleneck. Tried as much as possible to give him stuff to do completely on his own while I worked on other things but it inevitably ends up with me doing most of it.

So I feel like even though he wrote like 1000 lines of code I really own practically 90% of this thing and he's kind of passing it off like it's his work - which I don't really care about, I just don't want to do all of HIS work. Today for instance - we had an email exchange with a tech guy at a place that's hosting our server. It got into some really technical hardware spec stuff which I didn't know so I asked this guy to reply to it because I would use the wrong words/terminology even though I had an extremely rough idea of what was going on.

He emails me the ****ing response to send and it isn't even correct looking. So ofc I send it and it's completely the wrong info.

Luckily he's going on vacation for a few weeks but this guy just seems to aggressively try to get out of work and will pass it onto me if he thinks I can do it and it's kind of interrupting my project management stuff, which is becoming increasingly laden with busy work.

He wants to be told like to the exact detail what he needs to do, and if you can't articulate it perfectly to the last tiny detail, he'll declare it not worth doing. Due to the nature of this place it usually takes a fair amount of tenacity to get things done, everyone here is really good at being a self starter.

meh. starting to think it's time for me to move on but I have only a year at this place.

Last edited by jmakin; 03-18-2019 at 09:31 PM.
jmakin is offline   Reply With Quote
Old 03-18-2019, 09:35 PM   #37982
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,506
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

The thing we finished is pretty cool though. We have an enormously complicated stack that is a frankenstein-ish monster of software with dependencies all over the place. It's supposed to be a demo that utilizes programmable accelerator cards to speed up queries on a spark cluster, which interfaces with our software. Super complicated install and everyone we delivered it to could never get it to run and it's just generally fraught with problems. It's not an easy install, it took me like 2 straight days to learn.

So, I simplified this 100+ step install to exactly 3 steps using my container and those steps are basically just how to install and start a docker daemon and then how to use my runner script. Pretty proud of it
jmakin is offline   Reply With Quote
Old 03-18-2019, 09:45 PM   #37983
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code:
const [installments, schedules] = await Promise.all([
    getInstallment(original.RevenueLookupID), 
    getSchedule(original.RevenueLookupID)
]);
That's a pretty damn cool way to do parallel calls with async/await. Let me guess - it only works on Chrome?
suzzer99 is offline   Reply With Quote
Old 03-18-2019, 10:04 PM   #37984
well named
poorly undertitled
 
well named's Avatar
 
Join Date: Jun 2007
Location: esse est coesse
Posts: 75,947
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

There must be ways to make stuff like that work across browsers because angular 1 had similar functionality with pure ES5
well named is offline   Reply With Quote
Old 03-18-2019, 10:06 PM   #37985
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Code:
  render() {
    return (
      <div>
        <AdvancedExpandReactTable data={this.props.data} columns={this.mainTableColumns} {...this.tableProps} expanded={this.state.expanded}
          SubComponent={({original}) => {
            return (
              <ReactTable data={original.subsection} columns={this.pledgeOrPlannedColumns} {...this.subectionTableProps} />
            );
          }}
        />
      </div>
    );
  }
I'm getting pretty crazy with ReactTable up in here. I got a bunch of ReactTables inside my AdvancedExpandReactTable - dawg.
suzzer99 is offline   Reply With Quote
Old 03-19-2019, 01:26 PM   #37986
OmgGlutten!
Pooh-Bah
 
OmgGlutten!'s Avatar
 
Join Date: Aug 2016
Posts: 4,996
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I’m trying to use a docket container in dev and it’s a tortoise.. any tips on how I can speed it up?
OmgGlutten! is offline   Reply With Quote
Old 03-19-2019, 01:36 PM   #37987
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,354
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by OmgGlutten! View Post
Iím trying to use a docket container in dev and itís a tortoise.. any tips on how I can speed it up?
I don't typically have a speed problem. What's your OS? What are you trying to run in the container?
RustyBrooks is offline   Reply With Quote
Old 03-19-2019, 03:00 PM   #37988
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Since Apple quit making the iPod Nano - I got my buddy one of the knockoffs to put some songs on to share with him. I plugged it in, expecting to have to download software. Weird - it just shows up as a drive, even on a mac, and you just copy songs to it.

What? You mean I don't have to have a giant bloated app auto-launch and bug me about updating the device software, and app software, and then give me all kinds of cryptic scary messages about syncing things - where either decision seems to be fraught with peril? Also I don't have to poke around forever and sometimes even google to figure out how to make a playlist or get songs into a playlist or get the playlist onto the device? Amazing.

I feel like the sun has come out on a whole new day. And best of all - if the several consecutive miracles it takes to get bluetooth to work right don't all pan out and the thing doesn't work as an mp3 player - it still is a perfectly working thumb drive that he can grab the songs off of.



I feel like we've come full circle and Apple is the grey droning figure on the screen, telling us things have to be this way because they've always been this way, which someone else needs to come along and shatter with a hammer.
suzzer99 is offline   Reply With Quote
Old 03-19-2019, 03:02 PM   #37989
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,506
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Yea the itunes interface has gotten hopelessly bloated. I donít even try to manage the music on my phone anymore and am always mystified by what happens to be on it or not be on it at any given time.

It used to be so easy, somewhere along the way they went too far
jmakin is offline   Reply With Quote
Old 03-19-2019, 03:06 PM   #37990
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I remember struggling for like 30 minutes trying to figure out how to get songs from my HD into a playlist. I finally figured out the only way is to drag from a Finder window. There is no menu item like "add songs". Crazy.

My Mom wanted me to get a custom ring tone onto her iPhone - which she used to have some on pervious version of iOS. I get hives just thinking about the googling. It was as much confusion as you'd expect and more - along with a ton of crapware/spyware sites that claim to be able to create a custom ring tone.

I finally got it but not until my parents watched me curse at the internet for an hour and started to become concerned for my mental health.
suzzer99 is offline   Reply With Quote
Old 03-19-2019, 03:11 PM   #37991
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,063
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Apple sucks. They can make good hardware and software all they want, but they've always gone to extraordinary lengths to lock you in and make you pay. I've never owned anything Apple, but sharing computers with people who do sucks
microbet is offline   Reply With Quote
Old 03-19-2019, 03:15 PM   #37992
microbet
Solar Powered
 
microbet's Avatar
 
Join Date: Jan 2005
Location: SoCal
Posts: 53,063
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

In a similar vein Atlassian also sucks. The contract I'm working on uses Atlassian/Confluence/Jira and wanted to put stuff and manage an email acct on my phone, but like half way through installation it was like giving them ownership of my phone and I stopped. Later I mentioned this to the guy I'm working with and he said he also would not let them own his phone, made them buy him one and said I should do the same. I'm not on call at all or anything, so I just let it be and no one has cared.
microbet is offline   Reply With Quote
Old 03-19-2019, 04:31 PM   #37993
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,354
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by suzzer99 View Post
What? You mean I don't have to have a giant bloated app auto-launch and bug me about updating the device software, and app software, and then give me all kinds of cryptic scary messages about syncing things - where either decision seems to be fraught with peril? Also I don't have to poke around forever and sometimes even google to figure out how to make a playlist or get songs into a playlist or get the playlist onto the device? Amazing.
Every other media player I've ever had has been like this literally forever. The first one I bought was in like 2000 or 2001. You plugged a laptop hard drive into it and mounted it like a USB drive.

The ones I've used for the last decade have internal storage and also take SD cards. You can either mount it as a USB drive, or copy files to the SD card yourself. I also like these because they have clicky buttons so I can operate them by feel without looking at them. They don't make the one I like any more, I've been buying NOS for the last few years. The newer models are "OK" but the old ones had flashable firmware so I could put the software I preferred on it.
RustyBrooks is offline   Reply With Quote
Old 03-20-2019, 01:57 PM   #37994
jmakin
 
jmakin's Avatar
 
Join Date: Jan 2008
Location: Streaming
Posts: 28,506
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

god the linux related answers on SO are soooooo bad

usually a mix of completely wrong/system dependent info that won't always work, or "yum install this software and run this command" which is not even a linux solution but it'll be the top voted answer. Usually what I'm looking for is buried in a comment section that has barely any upvotes.
jmakin is offline   Reply With Quote
Old 03-20-2019, 01:59 PM   #37995
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,354
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

So if you have a decoupled FE/BE and are serving your FE through something like cloudfront. Do you:
* proxy all your BE api calls through cloudfront also?
* "hard code" a domain name for the api, like your site is www.foo.com and your api is api.foo.com?
RustyBrooks is offline   Reply With Quote
Old 03-20-2019, 04:06 PM   #37996
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by jmakin View Post
god the linux related answers on SO are soooooo bad

usually a mix of completely wrong/system dependent info that won't always work, or "yum install this software and run this command" which is not even a linux solution but it'll be the top voted answer. Usually what I'm looking for is buried in a comment section that has barely any upvotes.
Same experience here on a lot of stuff. Getting the right answer is way way down on their list of priorities after all the rules WHICH MUST BE FOLLOWED or ANARCHY REIGNS.

SO is as gamed as Trip Advisor or Yelp these days. There's definitely a thing where these types of sites sites get too influential - and it ends up hurting their content. Any other mid-level site or source of advice is usually pretty good - because no one's gaming it.
suzzer99 is offline   Reply With Quote
Old 03-20-2019, 04:10 PM   #37997
suzzer99
Save the Cheerleader, Save the World
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 92,116
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by RustyBrooks View Post
So if you have a decoupled FE/BE and are serving your FE through something like cloudfront. Do you:
* proxy all your BE api calls through cloudfront also?
* "hard code" a domain name for the api, like your site is www.foo.com and your api is api.foo.com?
The latter is usually a ton easier to administer.

Even if you have a proxy you still have to have some kind of URL or other rule to where the proxy knows which calls go through to the API (not sure how fancy cloudfront can get with that). Unless you use two different cloudfronts and the front end just points to #2 for API calls.

We're still in development, so the react app is going straight to API Gateway. But I plan to put that behind cloudfront and then probably attach an api.x.com domain to it.

I'm using the create react app paradigm for environment files - so that each environment knows what API end point to point to (and whatever other env-specific settings we want to add). The downside is the app has to know what environment it's going to live in at build time (not boot time or run time). So there's no build once - then push around the artifact. Also I had to add env-cmd to handle more environments than just dev, stage, test, prod.

Code:
    "env-cmd": "^8.0.2",

...

    "build-dev": "node generate-build.js && env-cmd .env.development react-scripts build",
    "build-stage": "node generate-build.js && env-cmd .env.stage react-scripts build",
    "build-foo": "node generate-build.js && env-cmd .env.foo react-scripts build",
etc

Last edited by suzzer99; 03-20-2019 at 04:17 PM.
suzzer99 is offline   Reply With Quote
Old 03-21-2019, 11:36 AM   #37998
OmgGlutten!
Pooh-Bah
 
OmgGlutten!'s Avatar
 
Join Date: Aug 2016
Posts: 4,996
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

This is from docker stats. I have 3 containers running: database/memcache/ror app



MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
8 GB 2133 MHz LPDDR3
2.3 GHz Intel Core i5

It's taking 3 seconds to load a page. I haven't done any of my own research yet, but any ideas? it seems like i should find a way to raise the mem limit for the first container and lower the others?
OmgGlutten! is offline   Reply With Quote
Old 03-21-2019, 02:07 PM   #37999
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 24,354
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I've never messed with the memory limits, but I've never had to. I checked my docker stats - I'm running my dev setup, which is mysql, redis, a web stack, a "worker" process (like a background SQS queue thing), and a docker image that builds the UI on demand, and the *total* memory usage for all of them combined is about 500MB

If your CPU is always low but it's really slow then I would suspect you're maybe dealing with virtual memory / memory swapping issue. But it's hard to say.
RustyBrooks is offline   Reply With Quote
Old 03-22-2019, 02:05 AM   #38000
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,878
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Are engineer managers supposed to be technical? We hired an engineer manager back in December and he has been playing more of a product manager role. Heís really far removed from the technical details.

He spends no time with the code and provides no insight in our design decisions. The team often has to explain to him the technical details so he could parrot those to our partners and stakeholders.

I thought maybe thatís because THAT is how his role is supposed to be but then one of my teammates brought up a good point... my teammate is considered a ďjuniorĒ engineer but he performs well and perform beyond his role right now. I would say heís technically more savvy than 90% of the team. He took lead in redesigning our service and made it much more performant. Heís a super star but I donít think heís getting the recognition he deserves because our managers donít know whatís going on technically.

So he said to me ďHow am I going to get a promotion, if managers are not technical?Ē

I didnít have an answer for that. Was hoping he get promoted this quarter but it *might* be next quarter now. I told him personally that he should look into switching teams, because heís not getting any good mentorship and the work we do is not that challenging. The only counterpoint to his promotion I have is that he only has been here 6 months and most people I have seen, they get promoted between 9-12 months from that ďjuniorĒ position. BUT then again he is doing really good work even if he was at my level.
Barrin6 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 02:00 AM.


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