Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
lol, spent 3 hours in our dumbest and most simple API that literally just does CRUD operations trying to figure out why a consumer storing an ISO date string "2018-07-23T16:20:00Z" was getting back "7/23/2018 4:20:00 PM". The API isn't supposed to parse the string at all and the only transformation any data undergoes involves mapping the API data model to a DB data model before storing it in Cosmos DB. Weirdly, the string was actually correctly stored as an ISO string in Cosmos DB as well.

Turns out that Newtonsoft.Json, dependency of several Microsoft packages, including the Cosmos DB one has a really cool feature: It parses ISO date strings from JSON as DateTimes by default even though JSON has no concept of a Date type. :suicide:

Adbot
ADBOT LOVES YOU

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
best part of that 2 y/o (and still recently active) github issue:

thomaslevesque posted:

@JamesNK could you explain the reasons behind this design? It seems pretty strange to me that a string value should arbitrarily be interpreted as a date just because it looks like a date...

JamesNK posted:

Because JSON doesn't have a date format.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

jit bull transpile posted:

I have an actual product idea but it would be subscription based and I'd want to HQ in Milwaukee instead of the stupid sf bay so it's doomed from the start probably.

if you did this I'd legit be interested depending on the idea and/or timing

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
Every single one of our automated UI tests are now failing because they can't create test accounts and users. Turns out the tests are somehow coupled to the implementation details of our Users API and broke when a change was made to it :suicide:

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Doom Mathematic posted:

Sounds to me like the tests are working correctly? You almost shipped a breaking API change, well caught.

The UI hits an orchestration/gateway layer, so the tests shouldn't have needed to be updated when changes underneath that layer were made. Also when I say "coupled to implementation details" I'm saying I was treated to discovering that the tests literally insert records into the user DB and fire the same events as the Users API.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
The good news is that I'm not the person that has to fix this.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

CPColin posted:

I recently discovered the joy of injecting mock services into other services for the purposes of testing. I was all groaning about setting up a user just right so the call to PermissionService.hasBoner() would return true when ButtService.getAvailableButtTypes() called it. Then I just mocked PermissionService so hasBoner() would return what I wanted and injected that into ButtService. It was good poo poo.

My controllers still have too much stuff going on, though, with little coverage.

This is why you make an orchestrator layer that you have your controller make one call to. It makes your controllers a lot cleaner and easier to test because you just need to mock one service and make sure the controller returns the right response type. It also makes it easier to test all the stuff injected into your orchestration layer because you're just testing plain old methods now.

Our UI tests are a completely separate code repo that are basically supposed to be more robust smoke tests. They use Selenium to actually run a browser and click through the app, which is why it's all the more :psyduck: that the tests were ever coupled to any APIs, especially ones under the gateway layer, and especially especially the database implementation of those APIs.

ThePeavstenator fucked around with this message at 06:17 on Aug 1, 2018

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Finster Dexter posted:

That has almost nothing to do with why this is horrible.

IDK what you're talking about, a good test is one that passes when I run it and makes the code coverage metric go up.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
Hell yes, the ETL contractor that shot down every attempt of mine to teach him git just blew away 2-3 weeks of his own work.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Finster Dexter posted:

Was he using SCM at all?

When he started here the first thing he worked on was an older VS solution that we have in a git repo. He then made new projects in this solution for everything he did because he didn't know how to create a new repo for a new solution (we use VSTS so this is easy as hell from Visual Studio even if you don't know git). He'd periodically (like once every week or so :stare:) ask me to help him get his stuff "checked in" and every time I'd have to remind him that committing doesn't also push to remote. I'd also try to use this as an opportunity to teach him stuff about git but once he got his stuff committed, he brushed it off as a thing he'd worry about later.

I made a change to the original code that belongs in this repo. He tried to merge my changes locally but instead of committing, or stashing, or branching, he did a reset. Since he has like 10 other unrelated projects in this repo with uncommitted changes, he lost all of it.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Shaggar posted:

git is trash.

Yeah this sounds like a problem with git and not that the guy was keeping multiple projects in one repo and almost never committing.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Shaggar posted:

gits branching model is using the interns computer to store the backups

The problem you're describing with git is "the computer doesn't force people at gunpoint to properly push their changes" which isn't a problem that has anything to do with git.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

prisoner of waffles posted:

git: ensuring your work is stored somewhere other than your machine takes at least one extra step compared to most old-rear end vcses

contractor who lost all his poo poo didn't listen to someone trying to ensure that his work would be retained (and person trying to help took "no" for an answer, allowing the work to be lost)

I had an intern this summer, the contractor's work involves interfacing with the software my team writes, and he reports to a different manager at the same level as mine. I had a person that I was actually being paid to mentor and me offering help was a courtesy in the first place.

ThePeavstenator fucked around with this message at 20:00 on Sep 4, 2018

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

prisoner of waffles posted:

I don't doubt that you have helped others learn stuff and that you offered help to this guy. e: also I get it-- organizationally speaking, this person is Not Your Responsibility and you are a good teammate for looking out for them, period

Perhaps not at all relevant to your experience, but my tactic when leaning on people to do the right thing (and not leave work in a losable state) re: version control is basically just to keep on repeating, "the way it is right now, we could lose this work that you have done" between talking about how easy it will be to actually keep the work and/or how it's okay if not everything is perfect or complete, "this is just a branch"

I did this exact thing every time he asked for help.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Doom Mathematic posted:

I'm more interested in how this person was allowed to work for two or three straight weeks in a row, by himself, with nothing to show for it. Every morning, "Nope, still haven't done any work"?

His job is to move customer data from our old software to the new software. His manager only cares that the customers can get migrated and that the data is in a state they're happy with. The code he lost was for tools he wrote for himself.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

CRIP EATIN BREAD posted:

windows is a fine OS if you are chronically poor or incapable of using a computer that's connected to the internet. it works well if you treat it like a video game console, its a toy for novel purposes, and the people who spend the majority of using it are pathetic and useless.

there are only good OSs and the OSs that you use

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
more like windows cum lol

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Luigi Thirty posted:

they tried using all of azure but find->replace on every racial slur would have taken until the heat death of the universe

Azure backlog:

-Add the ability to use Group By in Cosmos DB queries
-Release .NET Framework 4.7.2 to Azure App Services
-Remove racial slurs from Minecraft source code

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

toiletbrush posted:

I don't know if it's still the case, but the commonly suggested JSON library for .NET used to spot 'date like' strings in JSON requests and reformat them into it's own format, even if the field being deserialised is a string, making validation that a date was provided in a certain format a massive pain in the rear end/impossible. The author still insists this is the correct behaviour.

Yeah I think I posted about this a while ago. I still pop into that GitHub issue to see it still be updated :allears:

e: yup lol

ThePeavstenator posted:

lol, spent 3 hours in our dumbest and most simple API that literally just does CRUD operations trying to figure out why a consumer storing an ISO date string "2018-07-23T16:20:00Z" was getting back "7/23/2018 4:20:00 PM". The API isn't supposed to parse the string at all and the only transformation any data undergoes involves mapping the API data model to a DB data model before storing it in Cosmos DB. Weirdly, the string was actually correctly stored as an ISO string in Cosmos DB as well.

Turns out that Newtonsoft.Json, dependency of several Microsoft packages, including the Cosmos DB one has a really cool feature: It parses ISO date strings from JSON as DateTimes by default even though JSON has no concept of a Date type. :suicide:

ThePeavstenator posted:

best part of that 2 y/o (and still recently active) github issue:

thomaslevesque posted:

@JamesNK could you explain the reasons behind this design? It seems pretty strange to me that a string value should arbitrarily be interpreted as a date just because it looks like a date...

JamesNK posted:

Because JSON doesn't have a date format.

ThePeavstenator fucked around with this message at 05:23 on Oct 30, 2018

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

ratbert90 posted:

Heh, so my ex-co-worker was asked to ask me if I would be willing to talk to the CEO for some potential work.

I was thinking some 1099 stuff that I could sub-contract so I said sure.

I got an SMS a few hours ago with a "Hey, ex-coworker said you were curious about the embedded position opening up on our Design team in 2019. We are open to considering you as a candidate based on your history with ${product you made by yourself}. So I have to ask - after your first experience with ${company}, and your satisfaction with your current position, why would you be interested in re-joining us?"

To which I replied "I'm not, I am happy with my current position, but I have noticed that ${company} has had my old job posted since I left 6 months ago. If you are interested in me doing some 1099 work, I will gladly consider it! My rate is $150/hr 10 hours minimum."

No response back.

The loving hubris of these jackwagons is astonishing. :allears:

Why are you giving these guys a 50% discount on your usual rate????

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

floatman posted:

Oh yeahhhhh
first, imagine a class called Result. You can create a new result, and the constructor has an argument where you can shove in a constant. So you can do:
new Result(TypeFailed), new Result(TypePassed).
This result has a getType function to retrieve the result as well.
Now, imagine someone creates a class called ResultPassed, which inherits from Result. It also has a constructor where you can specify the constant. So although it is meant to represent a passed result, nobody is stopping you from doing new ResultPassed(TypeFailed).

In the codebase, sometimes a passed result is checked by calling ResultPassed.getType(). Other times, a passed result is check by checking if the result object is of type ResultPassed. There is no consistency, and I've lost my will to live.

this is why discriminated unions are good

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
the discriminated union I'm talking about is between programmers and computers

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

toiletbrush posted:

He also banned UI chat from demos for the same reason.

My boss effectively did this for us almost right away after he started 9 months ago and it owns. Now if we could just get search on the chopping block as well.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
Taking about anything related to sorting, paging, UI appearance, etc of search/query results is a huge waste of time that could have been better spent on important topics, like which of 200 or 404 is the real RESTful response code for a webservice to respond with for a valid, successfully processed request that contains no results for the query parameters supplied. :suicide:

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
One of my coworkers merged a branch of his into master for one of our web services today with about a month's worth of commits. It built but didn't work once deployed. Instead of swapping the slots back or just deploying the previous working build, he tried to undo the merge. He did this by using rebase on his commits instead of revert. He did this multiple times. He did this in master and pushed directly to master.

Our git history now looks like a piece of modern art, with things like commits dated 9/17/18, 4 Hours Ago, and 9/18/18 in that order all over the drat place.

Oh and the web service is still sitting there deployed in a broken state.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Oneiros posted:

if you are using github or gitlab or some other managed git service i highly recommend using their protected branches features to prevent this sort of thing from happening in the future.

We do that, but the team I'm on manages our system and devops infrastructure so he's one of the 3 people other than me with the elevated privileges to do what he did.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

gonadic io posted:

it's right though, any enforcing of protected branches immediately causes a dozen issues/emails/whatever to be raised complaining about not being able to push to master to enforce an urgent hotfix right now now now

RAPID DEPLOYMENT BABY

RIDE OR DIE

CI/CD MORE LIKE CAN'T INTERCEPT CRAPPY DEVELOPMENT

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
BORN TO DEPLOY

REPO IS A gently caress

PUSH EM ALL 1989

I AM DEVOPS MAN

410,757,864,530 STALE BRANCHES

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
Yes this incident happened to fall on the Friday afternoon of the weekend I'm on call why do you ask?

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
To get something deployed to production for us you need to:

1) Merge your branch to master via a Pull Request (master is protected in all repos*)
2) Master branch leads to auto build w/ tests -> auto deploy to Dev
3) Manual deploy to QA runs more tests
4) Deploy to Prod after review and requires approval from my team*, Prod deploys are tested on a separate slot and then swapped in*

*unless you're a member of my team, in which case you get special privileges to circumvent all of this

We're still hammering out a lot of our infrastructure so we need to be able to just push stuff sometimes but that's with the caveat that everyone knows WTF they're doing and the impact that circumventing this can have.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

I do not give a poo poo about merge conflicts because that's the devs problem. I have a problem when I go in to a repo and see 100 stale branches with names like "feature/[Deleted Jira Issue Number]" or "test/[Tech Time Project that lasted 6 hours]" that are months old

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

gonadic io posted:

lol branch names that reliably have ticket numbers? must be nice

I said "names like"

other examples include:

long-name-separated-by-hyphens-representing-a-single-commit-branch-that-was-pulled-in-to-master-long-ago-and-this-name-really-should-have-just-been-that-commit-message
tempBranch
[devname]sBranch
bug/bug-fix
bug/fix-search-bug (stand-in for things that aren't actually bugs and never made it into the backlog. Just some manager, salesperson, or internal user went over to a dev that has issues saying "no" and convinced them that something they didn't like about how the product works needed to be fixed by them NOW without talking to the product owner or any of the people who actually are supposed to make decisions on what goes in the software)

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

DONT THREAD ON ME posted:

why do you care?

i mean i delete my branches because it's nice to keep things clean but there are few actually compelling reasons to delete a branch and plenty of reasons not to so I don't see why it's worth being bothered by.

Really it's just the clutter issue vs the amount of effort it takes to delete a branch when you're done or at least remove it from the remote repo.

I'm in the Repos/Builds/Releases a lot and I want to keep that poo poo organized.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

Chalks posted:

there's a guy on our team who runs a script to list branches each time we do a release and asks anyone who's got a branch wtf is going on with it. the idea is to avoid accidentally missing features that are meant to be in the release but didn't get merged, but it also means we have very few stale branches

kinda gotta do that from the start though!

We're stopping the bleeding right now. The rot is mostly confined to our old services/repos and new repos look nice so people are motivated to keep them clean, so while we have some clean up to do it's not getting worse.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

ratbert90 posted:

Versions are: YYYY.MM-Release

It took around eight months to get everything into an excellent order like that, but in the end, it makes everything much more comfortable.

I don't know if this is all gold practice, but it seems to work well for is. :unsmith:

This all sounds real good. Versions are coming up on my list. We have a microservice architecture but talk internally about versions according to what marketing tags our customer release updates with. We're pretty good about being able to deploy rapidly and other remote teams in our company working on other software products consume our services, so being able to version services either based on API updates or even just builds would be a huge improvement.

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
they're called unit tests because you test everything at the same time as one unit

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
dont worry guys webasm will save us

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

ratbert90 posted:

Ex coworker hit me up on hangouts yesterday. The marketing director was put in charge of engineering.
When that happened, he quit so hard he didnít just quit, he quit, packed his bags, and moved to Seattle with his wife without even telling anybody he quit. He doesnít even have a job yet in Seattle. :allears:

This leaves the Ex company without any programmers and nobody to pass documentation on to. I expect the company to not last more than a year.

I got him an interview with my current company.

more like a month, unless the company is selling something other than the work you and the other engineers were doing

how big was this company?

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
also after his company folds, contact the CEO with openings you have available

Adbot
ADBOT LOVES YOU

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:
terraform is pretty cool but the fact that any custom providers need to be written in Go is a significant black mark on it

double that mark for me since I taught myself Go in order to write a custom provider for it

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply