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
ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Volmarias posted:

Based on what we've heard so far, no they don't.

No, but they could imagine what it would be like.

Adbot
ADBOT LOVES YOU

Che Delilas
Nov 23, 2009
FREE TIBET WEED

Pollyanna posted:

As far as I can tell, we are...not doing that? :shobon:

I guess what I meant to say is that I don’t like our approach to stored procedures and special tables. Cause yeah we’re also got entire product-critical tables that weren’t captured anywhere except a list of scripts listed by date and whoever ran it, detailing what the table looked like. I think.

:screaming internally and also externally:

Always version control the database, dear god. Version control the schema, sprocs, scheduled jobs, triggers, everything that has an effect on your live database, you version control it. You should propose this to your boss and get it started as soon as you can. I'm sure you don't need the benefits of version control enumerated; suffice it to say every last one of them applies to databases, and it's not hard to come up with a basic process for how you handle changes to your live system that start with source control.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
http://www.liquibase.org

Just use that to dump the current dB schemas and then start adding changesets from this point on using your PR and source control process.

Lord Of Texas
Dec 26, 2006

Hollow Talk posted:

I always genuinely want to believe that I can just hand things off and that it will be fine, but here I am, watching my co-worker fail at actually fixing a completely trivial problem that he supposedly fixed last week. Something on the database doesn't work because the user doesn't have permissions. I even copied the revelant error messages from the log to him. He "fixed" that problem, eventually. However, he didn't change permissions for any of the underlying tables, so while the error is somewhat different, the outcome is the same. He's sure he has fixed it.

I don't want to feel like I work with morons, but the combination of not asking questions, not investigating, and not being aware of one's shortcomings absolutely kills me.

I would love, love, love, to hand things off more regularly and then jump back in when I have more time, but I know for a fact that the only sensible way to hand something off is to never return to it, because it will absolutely suck. I mean, how do you inherit a decently tested codebase, change stuff, and never even run the loving tests ever, which would have loving told you exactly what you broke, what the fuuuuuuuuuck. This is a problem, because we are finally trying to get people to draw tasks more from a common pool, rather than just draw things preassigned to them, but I already know I'm going to curse when it actually happens more.

That last bit fits a bit more here, rather than that vaguely E/N bit, though. Basically we switched our board to be more of a Kanban board, and we have personalised lanes. On top of that, we have a general prioritised backlog with 3 priorities (must, should, nice to have) + fastlane, with some things assigned to specific people (we inherently live in a multi-project environment, so not everything is relevant for everybody), while the general assumption is that people draw the first thing they can do based on overall prioritisation. We have also (mostly) retired the idea of finishing tasks in a day, since that wasn't a great fit for many of the things we do. One thing I really like about the new board is that we now mark with an arrow if we move a task from one day to the next, which means you get to see how often something gets dragged along, or how often something hangs without getting finished, or how often other tickets leapfrog a task. I sincerely hope that this will help us get better at both splitting tasks, and at making sure we spend less time juggling different tasks. Our processes are very much a work in progress.

Pair programming. Try it.

Lord Of Texas
Dec 26, 2006

ultrafilter posted:

People don't read things. It's sad but true. Are you discussing your changes with people before you submit the PR? If not, try that out and see if it makes a difference.

Also, don't write essays inside PR's.

Use comments as conversation starters, not extensive documentation.

Giant walls of text obscure information, rather than convey it.

Boil your message down to the most important parts.

Wibla
Feb 16, 2011

"future you will hate yourself for this ugly hack"

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Wibla posted:

"future you will hate yourself for this ugly hack"

If every commit has the same message what's the point

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun

Wibla posted:

"future you will hate yourself for this ugly hack"
In my last commit at my last job I had to explain a really bad SQL hack in the commit because the reasons we had to do the SQL hack were bad, but also being the only adept hand at SQL meant that I needed to do it if someone wasn't gonna spend hours trying to coerce it to do the right thing.

Now, that being said, someone's gonna hate me for that hack in six months.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
That someone is, as always, you.

Ghost of Reagan Past
Oct 7, 2003

rock and roll fun

Volmarias posted:

That someone is, as always, you.
Well no, I don't work there anymore.

Pollyanna
Mar 5, 2005

Milk's on them.


Che Delilas posted:

:screaming internally and also externally:

Always version control the database, dear god. Version control the schema, sprocs, scheduled jobs, triggers, everything that has an effect on your live database, you version control it. You should propose this to your boss and get it started as soon as you can. I'm sure you don't need the benefits of version control enumerated; suffice it to say every last one of them applies to databases, and it's not hard to come up with a basic process for how you handle changes to your live system that start with source control.

Not my team, I’ve just been told to do here work in order to unblock ours. God, am I not surprised they can’t do much at a time - this codebase and database is a nightmare.

I’ll...let them know how bad it looks.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Pollyanna posted:

Not my team, I’ve just been told to do here work in order to unblock ours. God, am I not surprised they can’t do much at a time - this codebase and database is a nightmare.

I’ll...let them know how bad it looks.

Unless you can get political capital to have changes made, you're just going to get people upset at you. Tread lightly.

Pollyanna
Mar 5, 2005

Milk's on them.


Yeah, I figured. Just smile and nod.

Hollow Talk
Feb 2, 2014

PhantomOfTheCopier posted:

You're basically screwed anyway because MySQL cannot rollback changes that you make. It's therefore impossible to release a tested change onto the production database (and also ignoring replication issues). You can try to fake it against staging systems, but given the potential for data drift you can't be certain of the outcome.

Your workflow should be: Durr idea, prototyping, develop, code review. Release is: Begin, savepoint, apply inserts/updates/deletes, loop of savepoint+integration test+rollback, then either a (full) abort or commit of just the savepoint, followed by the next change in the release.

Lots of ORM was built because people needed a software workaround for a lack of database functionality. But it's 2019, you have better choices!

Quick reminder that Postgres lets you use DDLs in transactions, so you can roll those back (except sequences). :getin:

Xarn
Jun 26, 2015
Goddamn, where do you keep finding these terrible jobs?

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Hollow Talk posted:

Quick reminder that Postgres lets you use DDLs in transactions, so you can roll those back (except sequences). :getin:

Or VACUUM!

At a previous job someday gave me a cleanup job script to run in a massive database used for offline batch processing. This script ended with a VACUUM FULL. Our tooling automatically wrapped every SQL script run through it in a transaction block. This script ran for about 24 hours, hit the VACUUM FULL at the end, and rolled everything back, which took another 24 hours.

Pollyanna
Mar 5, 2005

Milk's on them.


Xarn posted:

Goddamn, where do you keep finding these terrible jobs?

Thankfully I’m not really the one that has to deal with that mess. I’m just taking over during the holiday week. But if they want to put me in that position permanently...hell naw.

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

Hollow Talk posted:

Quick reminder that Postgres lets you use DDLs in transactions, so you can roll those back (except sequences). :getin:
It's what I use, along with the aforementioned testing workflow. I was hoping that the strong hints would point people in the right direction. It may be that the continued existence of MySQL in any production environment is one of the best examples of agliefail, and it's probably the reason many businesses think they need nosql since "relational databases are so unreliable/painful/difficult".

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Pollyanna posted:

I’m glad that I have this job and all, but man is getting things done like pulling teeth. My fellow engineers absolutely hate doing code reviews and have to be goaded into looking at PRs, even though they put their own up and clamor for others to look at them. I’m pulling most of the weight on reviews and rarely get any attention in return until I ask for it.

They’re also extremely resistant to and scared of anything that’s even slightly odd to them. I have a PR up that removes several unused database fields (as in they are all nil in production and not referenced anywhere), and the response has mostly been “oh no we’re removing fields this is too much I can’t handle it, can we call a party to explain what’s happening here”. My PRs have like paragraphs of explanation in their descriptions! Read the drat descriptions!

Don’t even get me started on modern dev practices or doing anything more complicated than adding a field somewhere. Any PRs larger than 20 LOCs of changes are avoided like the plague.

I really feel like I’m working with morons sometimes. I get that it’s an awful thing to think and feel, but I feel held back by them sometimes.
I'm writing a fiveish-part blog series on implementing code reviews inside an org that's never done them effectively. Can we chat about your experiences at some point?

Xarn
Jun 26, 2015

Pollyanna posted:

Thankfully I’m not really the one that has to deal with that mess. I’m just taking over during the holiday week. But if they want to put me in that position permanently...hell naw.

I originally made that post as a response to your normal day job :v:

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

Xarn posted:

I originally made that post as a response to your normal day job :v:
"You were so inventive and effective during the holiday week, we'd like to schedule you half time with the database team for the rest of the year. :downs: This will be a great opportunity for you!"

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

PhantomOfTheCopier posted:

"You were so inventive and effective during the holiday week, we'd like to schedule you half time with the database team for the rest of the year. :downs: This will be a great opportunity for you!"

"Eh, no, I rather work on the stuff I was working before. Only when I feel like I truly mastered that would the time be right to move on."
Worked for me so far.

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!
"We need team players who are fungible and invested in our goals of agile product development. Priorities have shifted after a recent meeting with customers, so (oldwork) had been put on hold until next year. It would be great if you could help out with (newwork) or spend some time bringing that team up to speed."


Sorry I guess this is kinda bordering on a corporate thread post, but as a matter of fact I'm in a team that just used kanban to do this, namely setting everything to priority zero unless it's in the special list. This is both not agile, because it's not able to address incoming requests, nor is it good waterfall, because it refuses to acknowledge known limitations that must be addressed incrementally over the next 18mo.

No :snip: yet. They have until about August.

Pollyanna
Mar 5, 2005

Milk's on them.


So I’m a dipshit and what’s actually happening for queries is that they’re supposed to be saved to a directory and declared as query procedures by some homegrown SQL parser that does file scanning/loading magic to modularize them. Still weird, but not “we have no version control” weird. No idea about the tables tho.

Vulture Culture posted:

I'm writing a fiveish-part blog series on implementing code reviews inside an org that's never done them effectively. Can we chat about your experiences at some point?

If you’re prepared to hear about the magical world of PR parties, sure :v:

Keetron
Sep 26, 2008

Check out my enormous testicles in my TFLC log!

Pollyanna posted:

If you’re prepared to hear about the magical world of PR parties, sure :v:

:justpost:

smackfu
Jun 7, 2004

“It doesn’t matter what work you do, all that matters is that you finish the work you committed to.”

Because they figured out that was a metric that could easily be measured so now it is all that matters.

PhantomOfTheCopier
Aug 13, 2008

Pikabooze!

smackfu posted:

“It doesn’t matter what work you do, all that matters is that you finish the work we committed you to.”

Che Delilas
Nov 23, 2009
FREE TIBET WEED
This is why we don't commit, we estimate.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


If you have product owners who understand the difference between an estimate and a commitment, never leave your job.

Gildiss
Aug 24, 2010

Grimey Drawer

ultrafilter posted:

If you have product owners who understand the difference between an estimate and a commitment, never leave your job.

Also beg them to take you with them when they leave.

Hollow Talk
Feb 2, 2014

ultrafilter posted:

If you have product owners who understand the difference between an estimate and a commitment, never leave your job.

Commitment was "estimate - 1d6", right?!

Macichne Leainig
Jul 26, 2012

by VG
I am told by peers still employed at my old employer that PI planning was yesterday and today, and the team I left failed to meet any (with me staying on the team, still very unlikely) commitments.

God, I'm glad I got out before whatever "we're disappointed in your team's performance (and we won't admit it's because we gave you your project last-minute)" bullshit went on.

Le Saboteur
Dec 5, 2007

I hear you wish to ball, adventurer..
So we've got some unit tests that run that ensure we stick to naming standards on our entity properties on the DAL, I just noticed one of the devs checked in his recent DAL work circumventing these tests by altering the namespace on his entities so the unit tests wouldn't check them as they grab from a namespace where the entities are stored and it appears he deliberately altered the namespace on each of his newly added entities. Now I would have believed this was just a common error if he had been working on one new entity but his work involved 10. This just seems sneaky and I've never had to deal with a dev trying to do something deliberately like this, just looking for advice on how to deal with the situation.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Meet with them in private and let them know you noticed and that it's a nice trick :hfive:

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
Are you sure his IDE or something didn’t just give him a default namespace when he CTRL+N ‘ed and he didn’t know about the standards?

Le Saboteur
Dec 5, 2007

I hear you wish to ball, adventurer..

Eggnogium posted:

Are you sure his IDE or something didn’t just give him a default namespace when he CTRL+N ‘ed and he didn’t know about the standards?

The namespace difference is this

Normal Namespace: CompanyName.ProductName.Entities

His Namespaces: DataCompanyName.ProductName.Entities

If it was a completely different namespace in all of them I'd believe maybe a plug in might have named them all differently but this is just a word tacked onto the front of all the namespaces and we're all using Visual Studio any ways. And all the namespaces on classes outside of these entities are correctly named as well.

Le Saboteur fucked around with this message at 22:35 on Jul 11, 2019

Macichne Leainig
Jul 26, 2012

by VG
Your supervisor might have some good advice on how to handle it. I'd pull down the dev's changes and run the test manually with the corrected namespace names. If the tests fail afterwards, you'll know for sure that he was circumventing the tests, which is probably a no-no - and then your supervisor should definitely know.

Also, do you have a code review process, or do devs have free reign to check in? A PR would be a great place to implement auto-running of the tests, assuming it's possible and reasonable for your company. If nothing else, a PR would have given you a great platform to point out the namespace difference without it being awkward.

Le Saboteur
Dec 5, 2007

I hear you wish to ball, adventurer..

Protocol7 posted:

Your supervisor might have some good advice on how to handle it. I'd pull down the dev's changes and run the test manually with the corrected namespace names. If the tests fail afterwards, you'll know for sure that he was circumventing the tests, which is probably a no-no - and then your supervisor should definitely know.

Also, do you have a code review process, or do devs have free reign to check in? A PR would be a great place to implement auto-running of the tests, assuming it's possible and reasonable for your company. If nothing else, a PR would have given you a great platform to point out the namespace difference without it being awkward.

We do, this was just missed in what was quite a large PR and since the namespace being the way it is circumvented the unit test run that occurs before a PR is committed. I didn't realize the issue until I was doing some work with the entities and noticed the namespaces were off and was like oh just an innocent mistake and corrected them and then ran the tests and got a bunch of failing tests locally. And then I looked closer at what the namespaces were before I fixed them and realized something was fishy.

vonnegutt
Aug 7, 2006
Hobocamp.

Le Saboteur posted:

We do, this was just missed in what was quite a large PR and since the namespace being the way it is circumvented the unit test run that occurs before a PR is committed. I didn't realize the issue until I was doing some work with the entities and noticed the namespaces were off and was like oh just an innocent mistake and corrected them and then ran the tests and got a bunch of failing tests locally. And then I looked closer at what the namespaces were before I fixed them and realized something was fishy.

Sounds pretty sketchy but I've always found it best to go in with a fact-finding attitude first rather than a blame-y one. It could be that this dev didn't realize how the test suite used the namespace and didn't realize his tests weren't running. It's unlikely but it could happen.

I would probably explain to them what you found and see what they had to say - if you can truly keep your tone neutral and curious they are more likely to confess why they did it honestly. If it was an actual mistake they will probably be contrite and you can ask them to fix the failures or pair with you to fix them. If they meant to do it, they will probably have tons to say about how tests suck, etc, because every lovely dev I've ever met has not been able to keep it to themselves.

Either way, they know you noticed and are not willing to ignore it, which is enough to keep most people in line. But if they are stupid enough to admit it and take some kind of anti-test position, then you have an actual issue you can escalate.

Adbot
ADBOT LOVES YOU

Hughlander
May 11, 2005

Le Saboteur posted:

We do, this was just missed in what was quite a large PR and since the namespace being the way it is circumvented the unit test run that occurs before a PR is committed. I didn't realize the issue until I was doing some work with the entities and noticed the namespaces were off and was like oh just an innocent mistake and corrected them and then ran the tests and got a bunch of failing tests locally. And then I looked closer at what the namespaces were before I fixed them and realized something was fishy.

If you are using git do a reset author and commit a rename

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