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

03-18-2019 , 03:29 PM
Quote:
Originally Posted by suzzer99
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 05:24 PM
Quote:
Originally Posted by suzzer99
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 06:02 PM
Quote:
Originally Posted by adios
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 06:32 PM
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)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 09:25 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 09:35 PM
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 09:45 PM
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 10:04 PM
There must be ways to make stuff like that work across browsers because angular 1 had similar functionality with pure ES5
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-18-2019 , 10:06 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 01:26 PM
I’m trying to use a docket container in dev and it’s a tortoise.. any tips on how I can speed it up?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 01:36 PM
Quote:
Originally Posted by OmgGlutten!
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 03:00 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 03:02 PM
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 03:06 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 03:11 PM
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
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 03:15 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-19-2019 , 04:31 PM
Quote:
Originally Posted by suzzer99
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-20-2019 , 01:57 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-20-2019 , 01:59 PM
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-20-2019 , 04:06 PM
Quote:
Originally Posted by jmakin
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-20-2019 , 04:10 PM
Quote:
Originally Posted by RustyBrooks
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-21-2019 , 11:36 AM
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?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-21-2019 , 02:07 PM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-22-2019 , 02:05 AM
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.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-22-2019 , 03:33 AM
Almost all the engineering managers I've ever worked with are former devs. The few exceptions sounded like the above - product managers in another name.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m