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
Bongo Bill
Jan 17, 2012

Suppose you tell it to run all the tests in the solution. Naturally, you'll have tests in the test projects but not the implementation projects. Should it fail because there are no tests in the assemblies that aren't meant to have tests?

They've elected to go with the interpretation that an absence of tests is not a test failure.

The horror is that it lacks a way to designate that there should be tests.

Adbot
ADBOT LOVES YOU

EssOEss
Oct 23, 2006
128-bit approved
It can definitely do better than the bare minimum effort solution.

It should at least fail if you tell it "run tests" and it finds 0 tests.

It should at least fail if you explicitly say "run tests in xyzz.dll" and it finds 0 tests.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


Bongo Bill posted:

Suppose you tell it to run all the tests in the solution. Naturally, you'll have tests in the test projects but not the implementation projects. Should it fail because there are no tests in the assemblies that aren't meant to have tests?

I think junit does this. At least, I've seen tests named things like `jUnitWillFailUnlessItFindsAtLeastOneTest`.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Bongo Bill posted:

Suppose you tell it to run all the tests in the solution. Naturally, you'll have tests in the test projects but not the implementation projects. Should it fail because there are no tests in the assemblies that aren't meant to have tests?

The workflow being used here is that you point it at specific DLLs (i.e. build artifacts for specific projects), not at the project or solution files. There might be a way to point it at project or solution files, but that's not what we're doing.

The downside of doing it like this is that when we add a new unit test project, we have to remember to add a step to the build script that runs those tests. IMO that inconvenience ought to buy an assurance that the tests will run.

YanniRotten
Apr 3, 2010

We're so pretty,
oh so pretty
Ugggh offshore team now suggesting as a fix for slow query performance that instead of applying a where clause (serviced by an index, which is very selective) that they scroll through 50MM rows in the application. I have suggested some light database tweaking (reducing random page cost since we're on SSDs, bumping up statistics targets to get the query planner to understand that the cardinality is very high and it won't have to fetch a lot of data, and therefore should use index scans only) which has been ignored

I honestly don't even know why they'd think this would be better, absolute best case is it produces the same performance but due to us operating in reality I expect it to be noticeably worse.

I do not understand why we're so down with this false economy of handing these contractors work they are not capable of doing - I just end up being the de facto owner and have to micromanage someone nine timezones away into producing something sane.

EssOEss
Oct 23, 2006
128-bit approved
I have been on the other side and it can be just as retarded from behind the fence. My former employer was contracted out the development and maintenance of a government employee time/vacation tracking portal.

It took a year for it to get into active use after deployment and the original authors (having since left) had never tested it with real data sets. The system crawled to a stop immediately! It was written as a postgres database making heavy use of pg-specific features and nobody remaining knew anything about postgres (we were mostly an Oracle shop those days).

I was handed the problem as part of the duty rotation and I had no idea wtf was going on. However, as we had sold ourselves as an expert shop we of course had to pretend we were on top of things or we'd face potentially business-fatal penalties (being disbarred from future government contracts). The project managers smiled at each other in two calls per day and avoided doing anything constructive, while I tried to quickly learn postgres concurrency and database design, with little luck.

The day was saved by the customer's DBA who understood the situation perfectly and wrote up some face-saving "I assume you will shortly ask me to apply such and such changes to the database, so I tried it out on a copy deployment and achieved 20000% speedup." style email. We of course said "yes exactly what we had in mind please deploy this" and crisis averted.

Goddamn that was a dumb company to work for.

PS. Yes, I said written as a postgres database. Not used a postgres database. The app consisted of stored procedures executed via CGI, returning HTML strings.

EssOEss fucked around with this message at 21:19 on Dec 20, 2018

McGlockenshire
Dec 16, 2005

GOLLOCKS!

EssOEss posted:

PS. Yes, I said written as a postgres database. Not used a postgres database. The app consisted of stored procedures executed via CGI, returning HTML strings.

What the gently caress.

They didn't even use PostgREST!?

ChickenWing
Jul 22, 2010

:v:

McGlockenshire posted:

What the gently caress.

They didn't even use PostgREST!?

:yikes:

spiritual bypass
Feb 19, 2008

Grimey Drawer

This looks cool as hell and extremely convenient

nielsm
Jun 1, 2009



rt4 posted:

This looks cool as hell and extremely convenient

The problem is that now your whole application lives inside a datastore black box and you need to do version control on database objects instead of flat program text. At least I don't think I have seen tools to perform diff and patch operations on database schemas.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Deploy a small application that just has database migrations. At deploy time, stop postgrest, run the migrations, and start postgrest again

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


rt4 posted:

At deploy time, stop

I'll assume you aren't being disingenuous and say that this would also be a problem for a few of us.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

nielsm posted:

At least I don't think I have seen tools to perform diff and patch operations on database schemas.

Microsoft's SQL Server Data Tools and Red Gate SQL Compare work on MS SQL. I'm sure there are equivalents for other platforms.

spiritual bypass
Feb 19, 2008

Grimey Drawer

Doc Hawkins posted:

I'll assume you aren't being disingenuous and say that this would also be a problem for a few of us.

Naturally that's not ideal. If you have a proxy that's capable of it, you can hold the client connections on the line while the it runs.

Volte
Oct 4, 2004

woosh woosh
I have no opinion of PostgREST in particular but since it's just a REST client I can't see how it would present any deployment issues that wouldn't otherwise exist.

EssOEss
Oct 23, 2006
128-bit approved

nielsm posted:

you need to do version control on database objects instead of flat program text. At least I don't think I have seen tools to perform diff and patch operations on database schemas.

That's pretty much a given for any proper software project. How else do you manage your database? It is a part of the app like code is. There are even expensive tools for this (although you should not need them if you have your DB modeling workflows set up right). This is not where the horrors are.

boo_radley
Dec 30, 2005

Politeness costs nothing

New Yorp New Yorp posted:

Microsoft's SQL Server Data Tools and Red Gate SQL Compare work on MS SQL. I'm sure there are equivalents for other platforms.

SSDT is pretty rad! We used it for our databases and it's been relatively easy to integrate into our build and release processes.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

nielsm posted:

The problem is that now your whole application lives inside a datastore black box and you need to do version control on database objects instead of flat program text. At least I don't think I have seen tools to perform diff and patch operations on database schemas.

Database schemas are just scripts. CREATE for the initial deployment, ALTER for subsequent upgrades. Version control those script files, and write down your installed schema version in the database (a schema_version(schema_version int, deployment_date date) table suits the needs).

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

NihilCredo posted:

Database schemas are just scripts. CREATE for the initial deployment, ALTER for subsequent upgrades. Version control those script files, and write down your installed schema version in the database (a schema_version(schema_version int, deployment_date date) table suits the needs).

That approach becomes completely untenable almost immediately with any reasonably sized project.

Using a tool that takes a canonical schema version and generates an update script to bring a database schema in line with the canonical schema is way easier.

Xik
Mar 10, 2011

Dinosaur Gum
Visual Studio Database projects + dacpacs for deployment was what I was doing for any MS SQL databases I would touch at my old place and it was infinitely better then any previous solution we had.

EssOEss
Oct 23, 2006
128-bit approved

New Yorp New Yorp posted:

Using a tool that takes a canonical schema version and generates an update script to bring a database schema in line with the canonical schema is way easier.

Can you recommend something here for SQL Server in a .NET app? We have a project that is using EF migrations and is a real bitch to handle whenever different people need to work concurrently on the database schema. I would be very interested in evaluating alternatives.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

EssOEss posted:

Can you recommend something here for SQL Server in a .NET app? We have a project that is using EF migrations and is a real bitch to handle whenever different people need to work concurrently on the database schema. I would be very interested in evaluating alternatives.

I mentioned two tools a few posts up. SSDT works well in my experience.

EssOEss
Oct 23, 2006
128-bit approved
What, as in manually apply changes? What is this, the dark ages? Or is there some way to automate it that I do not know of?

xtal
Jan 9, 2011

by Fluffdaddy
bad post

xtal fucked around with this message at 00:11 on Dec 29, 2018

spiritual bypass
Feb 19, 2008

Grimey Drawer
The more I think about user management and authentication, the more I want something like postgrest that I can add to my existing application as a library instead of a standalone thing

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

EssOEss posted:

What, as in manually apply changes? What is this, the dark ages? Or is there some way to automate it that I do not know of?

No:

New Yorp New Yorp posted:

Microsoft's SQL Server Data Tools and Red Gate SQL Compare work on MS SQL. I'm sure there are equivalents for other platforms.

The flow for deploying an SSDT project is:

- SSDT project builds during your build process and generates a .dacpac file. SSDT is an optional install in the Visual Studio installer, so it's installed on most build environments that have Visual Studio. The dacpac file represents the "canonical" database.
- in your deployment pipeline, use SQLPackage (part of SSDT, included in Visual Studio) to point the dacpac to your target database for that environment. SSDT generates a change script and applies it. There are probably tools for your deployment pipeline software of choice to handle this part. SSDT is highly configurable in terms of telling it what is safe to do and what isn't safe to do (things like "block on possible data loss", etc). You'll eventually have to write some of your own idempotent post-deployment scripts to handle edge cases that can't be guaranteed safely handled by the SSDT engine, but SSDT also manages those and will run them as part of its generated migration scripts. SSDT is pretty solid, overall.

I have less experience with automating red gate tooling, but I know it can be done.

New Yorp New Yorp fucked around with this message at 00:39 on Dec 27, 2018

xtal
Jan 9, 2011

by Fluffdaddy

rt4 posted:

The more I think about user management and authentication, the more I want something like postgrest that I can add to my existing application as a library instead of a standalone thing

You can do this as long as your application is Haskell :nerd:

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

EssOEss posted:

Can you recommend something here for SQL Server in a .NET app? We have a project that is using EF migrations and is a real bitch to handle whenever different people need to work concurrently on the database schema. I would be very interested in evaluating alternatives.

I've never seen any such thing. Most SQL schema systems assume linear versions.

Many years ago I wrote one that would keep a history of applied updates and go back to insert any that had been missed, so at least we could email the team to "claim" version 1.9.0 without blocking all forward progress. A coworker could claim 1.9.1 and it wouldn't break the world if we merged "out of order". This mostly worked by accident because we rarely needed to muck around with the same database objects but when that happened by accident it was a lot of fun to merge SQL update scripts let me tell you.

IIRC I switched to a git-like branching model after that where an update simply specified one or more parent updates that had to be applied first. This eliminated the "email the team to claim v1.9.0" step but had the same unavoidable problem of two people mutating the same database object by accident. Still not sure this one was worth it TBH.

NtotheTC
Dec 31, 2007


https://github.com/dylanbeattie/rockstar

Actually this isn't a horror it is unbelievably cool and good.

quote:

Comments

The use of comments in Rockstar programs is strongly discouraged. This is rock'n'roll; it's up to the audience to find their own meaning.
If you absolutely insist on commenting your Rockstar programs, comments should be contained in parentheses ().
Yes, this means you can't use brackets in arithmetic expressions and may need to decompose complex expressions into multiple evaluations and assignments.

Rockstar developers are not into that whole brevity thing.

code:
Tommy was a lean mean wrecking machine.  (initialises Tommy with the value 14487) 

Xyven
Jun 4, 2005

Check to induce a ban

Junior developer: "what is grep?" :aaaaa:

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
then teach them, don't mock them for not knowing about something smh

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Xyven posted:

Junior developer: "what is grep?" :aaaaa:

Not everyone has used *NIX systems extensively. Or at all.

Like, I've spent my entire career working in Windows. That's not to say that I've never used Linux, but if we made a pie chart of "hours spent using OS", I don't even think the *NIX slice would be visible. I know what grep is but don't think I've ever used the command.

[edit]
If this person claims to know the platform really well and doesn't know grep, well, that's a different story. Then they're either lying or just vastly overestimating how much they know.

New Yorp New Yorp fucked around with this message at 22:14 on Jan 4, 2019

Doom Mathematic
Sep 2, 2008
I mean, a senior developer, sure.

The Fool
Oct 16, 2003


New Yorp New Yorp posted:

Not everyone has used *NIX systems extensively. Or at all.

Like, I've spent my entire career working in Windows. That's not to say that I've never used Linux, but if we made a pie chart of "hours spent using OS", I don't even think the *NIX slice would be visible. I know what grep is but don't think I've ever used the command.

[edit]
If this person claims to know the platform really well and doesn't know grep, well, that's a different story. Then they're either lying or just vastly overestimating how much they know.

sudo find / | grep bar

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Xyven posted:

Junior developer: "what is grep?" :aaaaa:

You should have told them to... get a grep :smugdog:

CPColin
Sep 9, 2003

Big ol' smile.
"What is grep?"
Maybe don't hurt them.
Don't hurt them;
just teach.

xtal
Jan 9, 2011

by Fluffdaddy

New Yorp New Yorp posted:

Not everyone has used *NIX systems extensively. Or at all.

Like, I've spent my entire career working in Windows.

Yes, but we're not talking about interns.

mod saas
May 4, 2004

Grimey Drawer

The Fool posted:

sudo find / | grep bar

Is there a joke in here or are you one of those people who adds sudo in front of a command because you really mean it

The Fool
Oct 16, 2003


The joke is because that is the worst way I can think of to search for files in Linux.

The sudo is because you get a ton of access denied messages if you do find / without it

Adbot
ADBOT LOVES YOU

Votlook
Aug 20, 2005
I once heard a system administrator say "Does that /dev/null directory even exist?" while inspecting a bash script we delivered.
Supposedly this was their top guy for Linux.

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