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

10-03-2018 , 10:40 PM
Sounds like a great opportunity for your career regardless of managerial vs technical track. Leadership practice is always a positive IMO. Are there more reasons you're not really interested?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-03-2018 , 10:49 PM
Disconnecting and then reconnecting monitors on my MBP sometimes makes my IDE lock up.

I wrote a little applescript thing once that managed screen affinity for some programs I cared about. But it stopped working at one point and I stopped caring.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-03-2018 , 10:54 PM
Anyone know a good way to distribute a private (company only) cli? I compile a binary in go, so I was just going to have them curl the github api and download it / add it to their path, but that sounds like versioning would be annoying?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-03-2018 , 10:59 PM
Just another person who deals with mac disconnect/reconnect display issues literally every. single. ****ing. day.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-03-2018 , 11:44 PM
Quote:
Originally Posted by PJo336
Sounds like a great opportunity for your career regardless of managerial vs technical track. Leadership practice is always a positive IMO. Are there more reasons you're not really interested?


Part of it is the happiest engineers I know are the good ones that never aimed too high and get to come to work and work on their own things everyday doing development work and not leadership work.

The other part of it is that this is my first leadership role (I’ve developed important features solo and worked on teams on very large and important features but never as the team lead). It seems like having that first experience be with remote contractors working from a foreign country is setting me up for failure. They do good work but I am worried about the time difference, not being there in person, communication issues, etc
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 12:02 AM
FWIW - DisplayMaid helps a lot with Mac Monitor issues. I just keep moving mine around like crazy because I'm watching a million videos and doing tons of research. So I don't have the saved window positions I want to go back to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 12:26 AM
Quote:
Originally Posted by PJo336
Anyone know a good way to distribute a private (company only) cli? I compile a binary in go, so I was just going to have them curl the github api and download it / add it to their path, but that sounds like versioning would be annoying?
Does versioning matter a lot? Like, will people need to frequently upgrade or will it be backwards-incompatible?

The best option is probably posting some kind of install script online, then telling people to execute it via curl and putting whatever they need in there. If everyone already has Go then you could just `go install` it. We have some stuff like this where the maintainer of the CLI tool posts a download link in Confluence which is THE WORST way to do this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 02:27 AM
Quote:
Originally Posted by goofyballer
Does versioning matter a lot? Like, will people need to frequently upgrade or will it be backwards-incompatible?

The best option is probably posting some kind of install script online, then telling people to execute it via curl and putting whatever they need in there. If everyone already has Go then you could just `go install` it. We have some stuff like this where the maintainer of the CLI tool posts a download link in Confluence which is THE WORST way to do this.
Versioning is mostly important bc I'm sure there will be much nitpicking if I don't.

People explicitly do NOT have go, so I need to stick to binary. My plan was a install.sh that runs a curl and puts it into usr/local/bin so its on your path already (i dont know if that's considered intrusive).

I was going to use GoReleaser which seems to say it builds the binaries in CI and "deploys the artifacts to github". So maybe that is literally all I need, assuming I can mix into the install script to always grab the latest release.

As an aside, really enjoying Go right now. Trying to slowly force it on everyone at work

Last edited by PJo336; 10-04-2018 at 02:28 AM. Reason: Confluence is the worst at everything
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 04:37 AM
That must mean you haven't worked in or seen the resulting work from a serious go project yet. It's not pretty.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 10:21 AM
Quote:
Originally Posted by Craggoo
That must mean you haven't worked in or seen the resulting work from a serious go project yet. It's not pretty.
Haha, I could definitely see it getting out of hand rather quick
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 11:57 AM
I've worked with remote developers in nearly every continent (I dont think Africa or it would be all) and generally all over the world.

Of all the cultural differences I've seen, people from Belarus should be a pleasure to work with. Very smart people, very direct, and will give you some great experience in dealing with communication and logistics across the world, which is a great thing to learn.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 01:57 PM
Quote:
Originally Posted by PJo336
People explicitly do NOT have go, so I need to stick to binary. My plan was a install.sh that runs a curl and puts it into usr/local/bin so its on your path already (i dont know if that's considered intrusive).
What I tend to do is something like
bash -c "$(curl https://path/to/some/script.sh)"
where the script does the install. "How" is of minor important - the nice thing about doing it this way is that you can change your mind in the future.

Are all the consumers on the same OS? Then what I'd do is make an apt or rpm package as appropriate, probably. There are good tools for this, like "fpm" which can make either apt or deb packages from a tarfile or directory on disk, etc. There are tools which set up repos for you, I use a tool that sets up an RPM and APT repo on s3.

So my shell script basically sets up the users computer to access my repo, installs the package, then does anything else it needs to do (in my case it creates some custom config files and some cleanup)

This is overkill if you're talking about just a few people. I think I'd still do the website-that-has-a-bash-script route, but I'd have it just download the binary and put it in the right place. /usr/local/bin/ is OK. This is not optimal but it's not the end of the world.

Another thing I have done is distribute the tool as a docker repo, and people run it like
docker run myrepo/myimage:latest
this is fine if everyone already uses docker for everything (we do) and your program can run under the restrictions docker imposes. It has the advantage of mostly working regardless of the users' OS (mac, linux and depending on the program, windows too)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 02:35 PM
Quote:
Originally Posted by Larry Legend
I've worked with remote developers in nearly every continent (I dont think Africa or it would be all) and generally all over the world.

Of all the cultural differences I've seen, people from Belarus should be a pleasure to work with. Very smart people, very direct, and will give you some great experience in dealing with communication and logistics across the world, which is a great thing to learn.


Thanks for that, it helps a lot.

Having worked alongside them I agree.

What the hell, I’m gonna give it a shot and do my best.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 03:21 PM
Don't get me wrong. I think it is possible to do good work in go. I believe its possible to do good work in basically any programming language actually. In the case of go, the language design just doesn't encourage it imo.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 04:43 PM
Does anyone have any experience developing in Apex in Salesforce? I’m having a really weird issue with an email handler I’m trying to create and I’m absolutely at my wit’s end. Figured I’d ask first before typing out a long and consulted post about what my problem is. Thanks! Also I hate Salesforce!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-04-2018 , 04:59 PM
Quote:
Originally Posted by RustyBrooks
What I tend to do is something like
bash -c "$(curl https://path/to/some/script.sh)"
where the script does the install. "How" is of minor important - the nice thing about doing it this way is that you can change your mind in the future.

Are all the consumers on the same OS? Then what I'd do is make an apt or rpm package as appropriate, probably. There are good tools for this, like "fpm" which can make either apt or deb packages from a tarfile or directory on disk, etc. There are tools which set up repos for you, I use a tool that sets up an RPM and APT repo on s3.

So my shell script basically sets up the users computer to access my repo, installs the package, then does anything else it needs to do (in my case it creates some custom config files and some cleanup)

This is overkill if you're talking about just a few people. I think I'd still do the website-that-has-a-bash-script route, but I'd have it just download the binary and put it in the right place. /usr/local/bin/ is OK. This is not optimal but it's not the end of the world.

Another thing I have done is distribute the tool as a docker repo, and people run it like
docker run myrepo/myimage:latest
this is fine if everyone already uses docker for everything (we do) and your program can run under the restrictions docker imposes. It has the advantage of mostly working regardless of the users' OS (mac, linux and depending on the program, windows too)
Docker image might be a good way to go, esp since we all have access to a private repo already. Hmm thanks lots to think about
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2018 , 07:18 PM
Quote:
Originally Posted by goofyballer
Random rant: I have this coworker who's unable to articulate an opinion or argument without being a righteous douche. As an example, here he is in a public and widely used Slack channel, learning about how Go imports work (they're URL-based and the go tool downloads them to your hard drive, kinda like npm except you point to github URLs or whatever instead of a package name that a web package manager knows about):
Click back to the quote if you forget the first one, but HEEEEEE'S BACK

Release coming up, some last minute changes going in, let's see how he reacts!

Quote:
dbag: Changes for PROJ-1234 haven't passed testing on master?

other eng: 1234 was never on master
that's the changes I did directly on the release branch
and I forgot to update the ticket, thanks for reminding me

dbag: If it wasn't tested on master, it doesn't go in the release branch

release manager: This was all discussed in the meeting today.

dbag: I missed the first ten minutes, and I did not agree to merge untested code into release branch
Cuz that's how you screw up your release branch


other eng: ok, I just marked it "test ready" for now with some notes on where it could be tested

QA guy: Based on previous discussion, from test side, we will do our testing on release as we don't have time to test this on a pull request build
my understanding is if it screws stuff up, we could revert

dbag: Please test on the pull request before we put this into release.

Senior producer (been around the company a long time, someone you listen to when he talks if you're not an idiot): <QA guy> is correct - we're increasing risk, in order to move faster.

dbag: OK, good luck with that! I have my own standards so please find somebody else to do the merge.

<5 minutes of silence pass>

Senior producer: I'll follow up offline.
I'm pretty sure "offline" is this dude's least favorite word, he is the ultimate keyboard warrior

idk how to even react, it's so hilarious

edit: <VP of software engineering> has joined <#this-slack-channel> by invitation from <Senior producer>
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2018 , 07:51 PM
holy ****, talk about signing your own death warrant.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-05-2018 , 08:20 PM
Senior Producer dont play
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 01:02 AM
I think it's because expandable console.log is being called asynchronously in your context. So you're seeing the final state of childArr, not the state at the time you call console.log.

childArrlen however is a primitive, not a reference. So you get the value at the time you initialized console.log.

Instead of console.log(childArr), try console.log(childArr.slice(0))

This will make a clone of the array at the time that code is called.

https://stackoverflow.com/questions/...-async-or-sync

Quote:
The console will need to store the logged values somewhere, and it will display them on the screen. The rendering will happen asynchronously for sure (being throttled to rate-limit updates), as will future interactions with the logged objects in the console (like expanding object properties).

So the console might either clone (serialize) the mutable objects that you did log, or it will store references to them. The first one doesn't work well with deep objects. Also, at least the initial rendering in the console will probably show the "current" state of the object, i.e. the one when it got logged - in your example you see Object {}.

However, when you expand the object to inspect its properties further, it is likely that the console will have only stored a reference to your object and its properties, and displaying them now will then show their current (already mutated) state. If you click on the +, you should be able to see the bar property in your example.
I seem to remember going through a long hair-pulling-out session on this in the past. Basically i never trust console.log objects in browsers when output mid-stream while there are more changes to come.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 01:10 AM
Ok, I deleted that post and now your reply is orphaned. I'll repost below. I changed something else which affected this behavior and I have to think about it - as well as read your reply and think about that for a while now.

Btw, thanks very much for you and everyone else's help.

So this is a weird bug and I can only think that it means fundamentally I don't understand something about React. Too long to show everything, but I have a class that does not extend Components. A method in it is called from a Component. Inside this method I declare an array and have a loop that pushes elements (also arrays) onto that array. But this happens inside that method:

Code:
	
var childArrlen = childArr.length;
console.log('right before weird childarrlog childarrlen is')
console.log(childArrlen) // output is 0 as it should be
console.log(childArr) // output shown below
The output of the childArr is:
Code:
[]
0: (2) [2, "./img/1_1.jpg"]
1: (2) [3, "./img/1_2.jpg"]
2: (2) [4, "./img/1_3.jpg"]
length: 3
Immedately after that is the loop that loads the array.

The output above is what the fully loaded array should be after the loop, but it's before the loop starts. Inside the loop I can log "i" looping over it and childArr.length and they behave as expected - iterated from 0 onward. I don't know how anything can happen in between the length of the array being 0 and outputting that array that has length 3. Like somehow can it happen that childArr is built in compile/transpile time before anything could ever go to console, yet childArr.length just acts as if this didn't happen?

If I comment out the childArr.push inside the loop, the console.log(childArr) correctly shows an empty array. But that push should never happen before the console.log(childArr). This is like the double-slit experiment in quantum mechanics.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 01:10 AM
What you're describing sounds similar to some gotchas of asynchronous behavior.

https://stackoverflow.com/questions/...-async-or-sync

But it seems likely that there's some weirdness with lazy evaluation

https://stackoverflow.com/questions/...luating-arrays
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 01:15 AM
Ok, I still have more to ponder, but the slice(0) thing totally worked and that post was pure gold.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 02:20 AM
Pro tip: slice() == slice(0)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-06-2018 , 08:36 AM
India is the craziest place in the world.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m