|
Messyass posted:Also, there's no reason that deploying a new version of the code should be harder than changing the database, but you probably know that already. I got my first look at the release document a little while ago. It's a giant Excel spreadsheet full of vague step-by-step instructions that people keep adding to. I was told that I need to put any necessary SQL statements in there, so whoever does the release can run them before deploying the code. There's no automated build, no automated testing, no automated deployment. I want to try to chip away at this stuff and the very first thing I proposed was shot down. Good times! At least, 2.5 months in, I'm finally actually writing some code, even if I can't write any unit tests for it because, of course, the current architecture doesn't support such a thing. Oh by the way, they do use NUnit here and there. I's so they have a way to call specific functionality in the rest of the code. Say, if they want to run a piece of code to fix some data in Production, they'll write it, slap a [TestMethod] attribute on it, and use NUnit to execute it. They do have to remember to point the database code at Production, of course, but, fortunately, all the credentials for all environments are right there in the configuration files! Also, I miss @Nullable annotations from Java. Why couldn't C# have added Nullable<> for reference types?
|
# ? Oct 13, 2017 15:39 |
|
|
# ? May 25, 2024 13:16 |
|
CPColin posted:Also, I miss @Nullable annotations from Java. Why couldn't C# have added Nullable<> for reference types? Because that'd be redundant?
|
# ? Oct 13, 2017 16:23 |
|
Munkeymon posted:Because that'd be redundant? Are not being added in 8.x? Proposal
|
# ? Oct 13, 2017 16:44 |
|
I meant why couldn't reference types in C# imply non-null and have the question mark make them nullable. (I know why not; it would've broken the poo poo out of existing code.) Edit: Opting in and out of the above proposal could be a serviceable solution to the problem. CPColin fucked around with this message at 16:48 on Oct 13, 2017 |
# ? Oct 13, 2017 16:45 |
|
Bruegels Fuckbooks posted:The application can then just communicate with the DAL by passing command name and args, and the database can decide what actual SQL to execute should be. Are you serious? How do you deploy and version control this clown car of a development strategy? How do you even pass arguments and receive results in your code if you have to assume the database code can change at any time? I mean, I'm all for DBAs being able to write decent queries but this seems...unideal.
|
# ? Oct 13, 2017 16:51 |
|
CPColin posted:I meant why couldn't reference types in C# imply non-null and have the question mark make them nullable. (I know why not; it would've broken the poo poo out of existing code.) If you must know Null References: The Billion Dollar Mistake What C# 7.0 bring is C# 7 Non-nullable reference types. IMHO it can be used real well to protect your own coder against your code base and to design more robust and standardised API/Framework/Librairies.
|
# ? Oct 13, 2017 16:57 |
|
Alan G posted:Are not being added in 8.x? Oh, sure, that makes more sense than a Nullable<object>
|
# ? Oct 13, 2017 17:30 |
|
Sagacity posted:
I've seen something similar in some legacy code I worked in before. The stored procedure would get a serialized object (in SQL Server's XML datatype) and a whole mess of logic would do the CRUD to the correct table. It looked like some DBA's idea of what an ORM should be. "Look guys! All you have to do is implement a GetObjectTypeID property on your object, and my awesome pseudo-ORM will handle all the SQL for you!" Luckily, that guy was fired (or committed suicide due to his crippling insanity) before this innovative technique could spread through the codebase. It was only actually used for a few objects, and unsurprisingly, they were slow and painful to debug.
|
# ? Oct 13, 2017 19:40 |
|
That kind of logic is the kind of thing I’d expect from people that read through SQL for Smarties. I mean seriously, a goddamn btree implementation using SQL? Aren’t we supposed to let SQL query planners do these optimization’s behind the scenes?
|
# ? Oct 13, 2017 20:47 |
|
SQL For Smarties is a really cool book by a certified crazy person
|
# ? Oct 13, 2017 21:24 |
|
Sagacity posted:
Welcome to enterprise software. It makes perfect sense when you have customers that run 15 year old versions of the database and refuse to upgrade but still want to use the new client and have it be compatible with the old system.
|
# ? Oct 13, 2017 23:52 |
|
CPColin posted:Say, if they want to run a piece of code to fix some data in Production, they'll write it, slap a [TestMethod] attribute on it, and use NUnit to execute it. Jesus Christ. I assume you're looking for a new job?
|
# ? Oct 14, 2017 01:39 |
|
AskYourself posted:What C# 7.0 bring is C# 7 Non-nullable reference types. IMHO it can be used real well to protect your own coder against your code base and to design more robust and standardised API/Framework/Librairies. I have some bad news for you about which features actually ended up in C# 7. redleader posted:Jesus Christ. I assume you're looking for a new job? That "technique" is absurd enough that it almost loops back around to being impressive!
|
# ? Oct 14, 2017 02:31 |
|
I know I've definitely seen some db columns at work that contain sql queries, but I tried not to think about what they were used for.
|
# ? Oct 14, 2017 02:47 |
|
Rubellavator posted:I know I've definitely seen some db columns at work that contain sql queries, but I tried not to think about what they were used for. Probably used to query a different database with code snippets in it that can be used to generate fully-formed desktop applications.
|
# ? Oct 14, 2017 07:00 |
|
Bruegels Fuckbooks posted:Welcome to enterprise software. It makes perfect sense when you have customers that run 15 year old versions of the database and refuse to upgrade but still want to use the new client and have it be compatible with the old system.
|
# ? Oct 14, 2017 10:44 |
|
Bruegels Fuckbooks posted:Welcome to enterprise software. It makes perfect sense when you have customers that run 15 year old versions of the database and refuse to upgrade but still want to use the new client and have it be compatible with the old system. Maintaining old stuff is a horrifically expensive line of business and the question is who gets stuck with the bill, and being in that line of business is low rent, low margins, and low rewards.
|
# ? Oct 14, 2017 14:47 |
|
Bruegels Fuckbooks posted:It doesn't even really have to be multiple stored procs, you can soft code your DB logic by having, say, one stored proc that's a command name and arguments, and then having a table in the database with the command name, and the corresponding SQL that should be executed (don't sperg about this, you probably shouldn't do exactly this in your architecture but i'm using this example as a pedogogical tool.) The application can then just communicate with the DAL by passing command name and args, and the database can decide what actual SQL to execute should be. The disadvantaes of doing that are a) The fulltime DBA's have other things to do than to coddle your application b) The fulltime DBA's don't give a poo poo about your application and begrudgingly work on it as last priority c) It's a pain in the rear end for everyone to develop, deploy and debug
|
# ? Oct 14, 2017 15:40 |
|
Rubellavator posted:I know I've definitely seen some db columns at work that contain sql queries, but I tried not to think about what they were used for. Magento2 generates SQL dynamically, then caches the generated SQL in the database for later retrieval. It's like PyPy for your database.
|
# ? Oct 16, 2017 02:25 |
|
rt4 posted:Magento2 generates SQL dynamically, then caches the generated SQL in the database for later retrieval. It's like PyPy for your database. That just makes me wonder what's wrong with Magento that it's slower to generate SQL than it is to cache it in a database. I guess if cache retrieval is in the form of sending the DB exec (select query from QueryCache where QueryHash = whatever it could be faster?
|
# ? Oct 16, 2017 15:43 |
|
Our lovely Restaurant: My Experience With Agile, Bureaucracy and Unnecessary Complication https://steemit.com/food/@walden/our-lovely-restaurant-my-experience-with-agile-bureaucracy-and-unnecessary-complication This story is like a fine book. Every time I return to it i appreciate it on a new level.
|
# ? Oct 16, 2017 16:58 |
|
lifg posted:Our lovely Restaurant: My Experience With Agile, Bureaucracy and Unnecessary Complication
|
# ? Oct 16, 2017 17:05 |
|
Munkeymon posted:That just makes me wonder what's wrong with Magento Just the tip of the iceberg, really
|
# ? Oct 16, 2017 19:34 |
|
rt4 posted:Just the tip of the iceberg, really Is this a salad pun
|
# ? Oct 16, 2017 20:05 |
|
Munkeymon posted:That just makes me wonder what's wrong with Magento that it's slower to generate SQL than it is to cache it in a database. https://github.com/magento/magento2/blob/develop/app/code/Magento/Catalog/Model/Product.php#L386 is my favorite example of Magento madness. Mage1 used a static service locator for dependencies, Mage2 read somewhere that that's Bad and dependency injection is Good, so converted over to this kind of constructor because Good is better than Bad. I appreciate the @SuppressWarnings(PHPMD.ExcessiveParameterList) in particular
|
# ? Oct 16, 2017 23:49 |
|
So I have a function that queries a database, and the whole thing needs to run quickly. It already has unit tests. But I want to make sure that future maintainers understand performance requirements. Is it appropriate to add a performance unit test? Like “benchmark sub, fail if > 10 seconds”? One problem is that unit tests run on a shared server, against a shared database. Normally whenever I fix a bug I add a unit test. I don’t know what the right thing to do when the bug is “slow performance.”
|
# ? Oct 18, 2017 19:51 |
|
I feel bad for the new engineers trying to work with our stuff. They’re trying to bring our core module into their project to use it, and they can’t actually do that - they have to extract it from the Docker images or something. Our poo poo is over engineered and over architected and I won’t miss it when I leave. Since I’m leaving and my work is blocked by our team lead (the only person who can explain what we’re looking at) loving off to a conference for the rest of the day, I’m going home early. Pollyanna fucked around with this message at 20:03 on Oct 18, 2017 |
# ? Oct 18, 2017 19:54 |
|
lifg posted:So I have a function that queries a database, and the whole thing needs to run quickly. It already has unit tests. But I want to make sure that future maintainers understand performance requirements. I'd be cool with that. If it fails then it highlights the issue.
|
# ? Oct 18, 2017 20:02 |
|
Ive been asked to make a barcode label with some text that prints from the browser and is supposed to work appropriately on a bunch of different kinds of 1inch label printers I cant quite express actually how frustrating this has been
|
# ? Oct 18, 2017 20:45 |
|
lifg posted:So I have a function that queries a database, and the whole thing needs to run quickly. It already has unit tests. But I want to make sure that future maintainers understand performance requirements. Maybe add some comments to the header as well, explaining why performance matters. A mystery test will be wiped out when no one can answer "why 10s matters", but a big "// DO NOT CHANGE THIS FUNCTION EVER! PERFORMANCE MATTERS! IT MUST RUN IN UNDER 10 SECONDS OR A WARP PORTAL WILL OPEN SWALLOWING THE EARTH!
|
# ? Oct 18, 2017 20:45 |
|
Pollyanna posted:I feel bad for the new engineers trying to work with our stuff. They’re trying to bring our core module into their project to use it, and they can’t actually do that - they have to extract it from the Docker images or something. Our poo poo is over engineered and over architected and I won’t miss it when I leave. Is this finally a confirmation of ?
|
# ? Oct 18, 2017 20:48 |
|
Murrah posted:Ive been asked to make a barcode label with some text that prints from the browser and is supposed to work appropriately on a bunch of different kinds of 1inch label printers The most sane way to do this is by generating a pdf, then the user prints the pdf. I say most sane, but it is still quite rage inducing. E: when I did this I needed to generate label sheets and I generated the pdf of the sheet in python on the server using reportlab The Fool fucked around with this message at 20:56 on Oct 18, 2017 |
# ? Oct 18, 2017 20:53 |
|
Munkeymon posted:Is this finally a confirmation of ? Imminent - the other company decided to pass, so I’ll be doing one last review of my current offer and signing tonight.
|
# ? Oct 18, 2017 20:56 |
|
Pollyanna posted:Imminent - the other company decided to pass, so I’ll be doing one last review of my current offer and signing tonight. I expect an epic quitting story.
|
# ? Oct 18, 2017 22:08 |
|
Skandranon posted:I expect an epic quitting story. I'm really tempted, but I don't like to burn bridges. I have considered passing out a bunch of DSA fliers and pamphlets before I leave though
|
# ? Oct 18, 2017 22:16 |
|
I still wish that, when I went back to pick up my stuff, after my last company gave me a "Technology Leadership" award a week before laying me off because they "didn't need an architect," I had taken the time to super-glue the award to my desk.
|
# ? Oct 18, 2017 22:20 |
|
lifg posted:So I have a function that queries a database, and the whole thing needs to run quickly. It already has unit tests. But I want to make sure that future maintainers understand performance requirements. That's not a unit test. Testing performance is fine and good, but since it has dependencies on that shared server and doesn't need to be run as often as regression tests, I probably wouldn't put something like this it in the default integration test suite either. There's nothing prohibiting you from commenting the code or writing whatever docs or messages to ensure the future maintainers understand these performance requirements. Whatever it takes.
|
# ? Oct 18, 2017 22:57 |
|
CPColin posted:I still wish that, when I went back to pick up my stuff, after my last company gave me a "Technology Leadership" award a week before laying me off because they "didn't need an architect," I had taken the time to super-glue the award to my desk. Superglue is too brittle. Use 5 minute epoxy.
|
# ? Oct 18, 2017 22:58 |
|
Murrah posted:Ive been asked to make a barcode label with some text that prints from the browser and is supposed to work appropriately on a bunch of different kinds of 1inch label printers We only have to target one type of label printer. We just went out and bought one and put it right next to the guy working on the labels.
|
# ? Oct 19, 2017 00:49 |
|
|
# ? May 25, 2024 13:16 |
|
Pollyanna posted:I'm really tempted, but I don't like to burn bridges. I have considered passing out a bunch of DSA fliers and pamphlets before I leave though Buy a cake and have them write "I Quit" on it. Send an email summoning everyone to the break room for free cake.
|
# ? Oct 19, 2017 02:24 |