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
DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Shaggar posted:

javascript is the worst thing there is. gently caress everyone who thinks it was ever a good idea.

shaggar

















was
















RIGHT

Adbot
ADBOT LOVES YOU

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Blinkz0rz posted:

nah php is way worse

until recently i would have agreed with you, but consider the following counterpoint: php code runs on computers belonging to the company that created or purchased that garbage. javascript code runs on your computer

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

redleader posted:

the default latex font is so loving ugly, and instantly marks its users as being disgusting, aesthetically-inept goonlords

look how loving wrong this poster is, hooooly poo poo i have never seen anything so incorrect

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

CRIP EATIN BREAD posted:

there's a very small number of companies these days that can justify running their own hardware.

anyone who argues otherwise are people whose sole skill is running such hardware, and are terrified of becoming obsolete, despite the fact that it already happened.

idk, the company i work at only has around 100 people but has been around since 2000, so we run our own hardware in a local datacenter. we evaluated the cost to migrate everything to aws and found it would be significantly more expensive than to just keep doing what we're doing. if the company was founded today everything would be in the cloud and we'd design it with that in mind, but given that we already have the IT folks who know how the infrastructure works... :shrug:

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
Threads are for posting in :justpost:

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
materialized views: cool and also good

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

prisoner of waffles posted:

I still haven't used it but it sounds like sqitch exists for this purpose:


https://sqitch.org

this seems unnecessarily complicated compared to flyway imo, maybe it is solving additional problems that i'm not seeing?

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
my taint is a canvas you can paint on with your tongue

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
it doesn't have to be stateful, you're just unwilling to reload the drat page, because you're building poo poo that shouldn't exist

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

cinci zoo sniper posted:

so i have to at least check if anyone here can spill the beans on their postgres money storing

postgres has a money type but you should avoid it due to locale dependence and generally being ignored by everyone. it works by storing the result as an integer number of cents, but displaying with a decimal point. if you know you will never have fractions of a cent, that's an option: make your money columns bigints of cents. if that doesn't work, use numeric, never a floating point type. you can use numeric(x,y) if you know that your numbers will be max x digits long with y of those digits after the decimal point, and postgres will enforce those constraints, rounding the decimal part as necessary (but not the max digits; try to put in a number that's too big and you get an error). note that these (x,y) constraints on numeric have no impact on storage or performance by themselves. the actual internal storage of a numeric is a variable length bcd-like format. if you make a column with bare numeric type and insert only numbers like 123.45 into it, that uses the same disk space as a numeric(5,2), so use those constraints only to enforce desired behavior, not as an optimization. but keep in mind that with a bare numeric, something can insert a number like 1287364512783641283465.697364957629374561928375 into your column and postgres won't complain, it'll just use however much storage is necessary to represent that number, so like, don't do that. clear as mud, yes?

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Kevin Mitnick P.E. posted:

"it will round for you" raises a red flag. otoh making clients do the scaling means they will gently caress it up sooner or later

this rounding behavior is dictated by the sql standard afaik. you can just use bare numeric and it'll never round unless you hit the max decimal places (which you won't because it's 16383). if you want "numeric(x,y) except if the number of decimal places is > y then you get an error instead of rounding or truncating" then i guess you have to use a check constraint like this:

code:
postgres=# create table demo (rounds numeric(6,2), errors numeric, check (scale(errors) <= 2));
CREATE TABLE
postgres=# insert into demo values (1234.56, 2345.67);
INSERT 0 1
postgres=# insert into demo values (3456.789, 4567.89);
INSERT 0 1
postgres=# select * from demo;
 rounds  | errors  
---------+---------
 1234.56 | 2345.67
 3456.79 | 4567.89
(2 rows)

postgres=# insert into demo values (5678.910, 6789.1011);
ERROR:  new row for relation "demo" violates check constraint "demo_errors_check"
DETAIL:  Failing row contains (5678.91, 6789.1011).

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
postgres isn't perfect but for the price it's drat good, and i've found its features to be "composable", in the sense that when one feature doesn't behave how you want, there is probably another feature that you can use in combination to accomplish your goal, even if that goal was never specifically envisioned by the designers of either feature. contrast with, say, loving oracle, where there is certainly a way to do what you want, but you'll absolutely never figure it out yourself

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
did you know: the original postgres research project from 1986 had versioned tables! but they got rid of them around the time they added sql support i think :sigh:

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Finster Dexter posted:

What did you do with a postgres table before sql support?

you used postquel, a descendant of the ingres query language quel

this was before sql took over as the de facto query language for every rdbms

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Powerful Two-Hander posted:

wait wait, in what sane world are people able to make changes to the db schema outside of the control/input of the app team?

you don't let your dbas actually change your database do you?

uh i'm pretty sure the sane world is the exact opposite of this. the app doesn't own the database, and the data in it is far more important than whatever stupid hack the app team wants this sprint

besides, the app team devs are probably not sql design/optimization experts

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

redleader posted:

so is jooq good? it sounds ok and the maintainer sounds like the reasonable sort of crazy

i haven't used jooq extensively but i like the middle ground it provides. i don't think the so-called "object-relational impedance mismatch" that orms are supposed to solve is really a thing. it is almost always pretty obvious how to map; oh, this field of my class x is a list of ys, so i'll have a y table with x.id as a foreign key, loving duh. oh you have inheritance, whatever, fill the unused columns with nulls. the actual "problem" people are encountering is that the language for working with your rdbms is sql, you have no other choice, that is the only query interface to the database. if you hate sql then you will be inclined to use an orm like hibernate that hides it all behind the scenes for you. this is bad because it just hides the translation to sql under its hood, so when the abstraction breaks and you need to debug it, you get to struggle with some auto-generated sql that is even more worthy of your hate than the hand-written sql you were trying to avoid. on the other hand, if you love sql, you will want to write your whole app in the database as much as possible. this is bad because you ultimately can't do that, you will need some java code or whatever for the frontend, and that code isn't sql, so now you are embedding the actual logic of your app as (probably dynamically constructed) sql strings in java. shaggar would tell you here to use stored procs and he's kinda right, but are you gonna put every single simple sql query into an sproc? probably not, so it'd be nice if your java code had a way to write some sql queries in a safer way than embedded strings of another language. jooq provides this without going completely overboard into xml mapping files and other orm bullshit

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
but then i have to think about where the newlines go

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Powerful Two-Hander posted:

i am perhaps severely institutionalised but as an organisation we have thousands of applications and their databases are all managed by those applications because it is wildly unfeasible to have adba on point that knows the specifics of that business area to do poo poo so app teams effectively control their own dbs

i work in the financial industry though so I'm maybe dealing with a slightly different scenario where we have lots of small single purpose applications rather than one big one. like I'm directly the owner of three databases and indirectly linked to maybe 10 more and that's in one small area of what we deal with

you're probably not the only one, i mean technically if you're doing a strict "microservices architecture" then you get a database per service, right? my question in that case would be the same: how do you join across them? even if your "database" is really just a schema or set of tables in a centralized server or cluster, if your team's ids don't match any other team's because everything was developed in isolation, unless you have id mapping tables all over the place, how do you combine information from the backends of separate applications? do you just not ever need to do that?

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
isn't a 12.2 earthquake like, impossible

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

CPColin posted:

Experts Exchange for a while had a class called FemaleCache because it was simpler to just hold in memory the entire set of member ID's who set their gender to Female in their profile than it would have been to query the database for this information. The class hung around for several years beyond the point when anything was reading from it.

Was this cache primarily used to fulfill search requests for Females to harass

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
have any of you folks used apache isis?

e: or i guess naked objects in .net is a similar idea

DELETE CASCADE fucked around with this message at 22:54 on Nov 14, 2018

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

akadajet posted:

xml ladies and gentlemen

Better than json. The data is still garbage but at least I KNOW I can parse it

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
For that 12 column join I would just create a view that does the union all into a single column like it should be and then just do all my queries on that view forever. Until someday seven years later that becomes a performance problem and it takes some sucker hours to figure out :getin:

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Boiled Water posted:

why not make it a view dependent on a view dependent on even more views?

a viewchain if you will

i'll materialize some of the views but not others, for reasons that will be lost to time

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
"scala is Haskell fanfic" read somewhere on twitter or these dead g*y forums and it's the best description I've seen yet

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
ruby is a language for building dsls with lots of colons in them. and when they don't work, you get an error message in a language nobody understands or wants to: ruby

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
if calling a method on an object so that it dynamically adds more methods for you to then call on the same object seems like a sensible workflow to you, I bet you'll love ruby

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

hackbunny posted:

if anyone thinks I've been insulting them, their work or their tools, they should stop being insecure little fucklets and maybe try to learn something from my posts, starting from the idea that if your job requires programming you should get better at programming

nobody thinks you're insulting them or their tools, your posts are very interesting, and i almost always learn something from them. i think people are confusing your obviously superior technical knowledge on topics such as the windows api and c++ with recommendations to learn those specific technologies, which i would not wish on my worst enemy

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

akadajet posted:

lol stop stroking his ego so much

seriously though he she does legitimately know what he's she's talking about, and i enjoy his her posts from a perspective of "wow ughghghg better you than me i guess"

VV o rly my bad

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
if you're working in java check out jooq, it has what you want (and also other orm-ish stuff you don't have to use)

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
well guys we better separate the queue from the database because what if the database server goes down? then how will the workers fetch jobs from the queue to process?? what do you mean the work of those jobs requires further queries to the database, i don't see your point???

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Kevin Mitnick P.E. posted:

SQS is super robust. job has been relying on SQS for about five years now and had 0 problems. billions of messages per month, 1000x traffic spikes, once 300 misconfigured workers short polling in a loop, never had a problem

probably helps that the features you get are put message, receive message, and delete received message

sqs is ok as long as you understand it's not really a queue, because receiving a message doesn't dequeue it

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
if you mock the db or use an ad hoc db containing only the minimum required to test, then you are going to have all sorts of problems when you move to production where the tables have actual data volume in them and the query planner behaves completely different. for real qa you need a sanitized copy of your prod db, updated regularly, on a server with similar performance to your actual production db server

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

TheFluff posted:

sure, but that kind of performance testing is a whole different category of testing. a good test tests one thing. testing that a query does the intended thing logically is an entirely different question from whether it performs sufficiently well in a production-like environment, or whether it plays nice transactionally for that matter.

ya of course you can do the unit testing with mocks, but that's like a minimum requirement. it seems like a lot of people stop there and pat themselves on the back for their code coverage metrics. not sure why they do that, since unit testing is drudgery while performance testing is challenging and interesting

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
I’m always surprised to see so much emphasis on unit tests over other types, when in my experience they are useful for catching regressions and absolutely nothing else. It’s like the least interesting, least difficult type of testing

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

jit bull transpile posted:

unit test where I work means "thing kicked off by junit that is a convoluted check for a bug we just fixed and probably won't run into again". we want to just do continuous stress tests of the whole product but it's hard to get the resources behind that.

yeah we have those too. but we also have unit tests written by the original developer of a class, so that it passes code coverage. if one such test fails due to a programming error, ie an error in translation from concept to code, the programmer will fix it before submitting their code+tests. if a test fails because of a misunderstanding of the intended behavior, the programmer will align the code and the test to the same misunderstanding. therefore the test always passes, unless a regression occurs which now violates the programmer's tested assumptions. in no case have we verified that the code delivers as expected when deployed in an actual production environment, which is where 99% of the bugs appear in my experience, and more unit tests won't ever fix this

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003

Shaggar posted:

if you want unit tests to also verify design functionality you need to have someone (preferably another team) write the tests.

if i have a team of people capable of understanding another team's codebase well enough to write tests within it that meaningfully exercise design corner cases of a spec they also had no hand in writing, then i'd better give them something more interesting to do than writing unit tests all day, or they'll quit

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
C# would be cool except lol if you develop on Windows or deploy to windows or have to work with people who willingly do either

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
inheritance is not the problem, implied subtyping due to inheritance is the problem

Adbot
ADBOT LOVES YOU

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
there are languages which use structural subtyping instead of nominal, it's just pretty rare

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