|
Shaggar posted:javascript is the worst thing there is. gently caress everyone who thinks it was ever a good idea. shaggar was RIGHT
|
# ¿ Jul 18, 2018 00:23 |
|
|
# ¿ Sep 13, 2024 19:04 |
|
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
|
# ¿ Jul 18, 2018 01:02 |
|
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
|
# ¿ Jul 26, 2018 17:50 |
|
CRIP EATIN BREAD posted:there's a very small number of companies these days that can justify running their own hardware. 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...
|
# ¿ Jul 30, 2018 19:03 |
|
Threads are for posting in
|
# ¿ Aug 2, 2018 07:04 |
|
materialized views: cool and also good
|
# ¿ Aug 9, 2018 04:55 |
|
prisoner of waffles posted:I still haven't used it but it sounds like sqitch exists for this purpose: this seems unnecessarily complicated compared to flyway imo, maybe it is solving additional problems that i'm not seeing?
|
# ¿ Sep 15, 2018 01:46 |
|
my taint is a canvas you can paint on with your tongue
|
# ¿ Sep 19, 2018 18:20 |
|
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
|
# ¿ Oct 20, 2018 00:57 |
|
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?
|
# ¿ Oct 31, 2018 23:49 |
|
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:
|
# ¿ Nov 1, 2018 01:22 |
|
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
|
# ¿ Nov 1, 2018 01:32 |
|
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
|
# ¿ Nov 1, 2018 22:01 |
|
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
|
# ¿ Nov 1, 2018 22:41 |
|
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? 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
|
# ¿ Nov 2, 2018 00:18 |
|
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
|
# ¿ Nov 2, 2018 00:37 |
|
but then i have to think about where the newlines go
|
# ¿ Nov 2, 2018 00:40 |
|
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 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?
|
# ¿ Nov 2, 2018 01:11 |
|
isn't a 12.2 earthquake like, impossible
|
# ¿ Nov 6, 2018 00:39 |
|
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
|
# ¿ Nov 13, 2018 07:48 |
|
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 |
# ¿ Nov 14, 2018 22:48 |
|
akadajet posted:xml ladies and gentlemen Better than json. The data is still garbage but at least I KNOW I can parse it
|
# ¿ Nov 23, 2018 06:22 |
|
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
|
# ¿ Nov 28, 2018 18:56 |
|
Boiled Water posted:why not make it a view dependent on a view dependent on even more views? i'll materialize some of the views but not others, for reasons that will be lost to time
|
# ¿ Nov 28, 2018 21:17 |
|
"scala is Haskell fanfic" read somewhere on twitter or these dead g*y forums and it's the best description I've seen yet
|
# ¿ Dec 4, 2018 06:45 |
|
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
|
# ¿ Dec 4, 2018 06:46 |
|
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
|
# ¿ Dec 4, 2018 06:48 |
|
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
|
# ¿ Dec 11, 2018 02:12 |
|
akadajet posted:lol stop stroking his ego so much seriously though VV o rly my bad
|
# ¿ Dec 11, 2018 02:16 |
|
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)
|
# ¿ Dec 13, 2018 23:49 |
|
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???
|
# ¿ Dec 22, 2018 02:01 |
|
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 sqs is ok as long as you understand it's not really a queue, because receiving a message doesn't dequeue it
|
# ¿ Dec 22, 2018 02:26 |
|
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
|
# ¿ Jan 10, 2019 22:03 |
|
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
|
# ¿ Jan 10, 2019 23:13 |
|
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
|
# ¿ Jan 11, 2019 01:20 |
|
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
|
# ¿ Jan 11, 2019 02:02 |
|
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
|
# ¿ Jan 11, 2019 02:13 |
|
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
|
# ¿ Jan 14, 2019 20:25 |
|
inheritance is not the problem, implied subtyping due to inheritance is the problem
|
# ¿ Jan 26, 2019 01:24 |
|
|
# ¿ Sep 13, 2024 19:04 |
|
there are languages which use structural subtyping instead of nominal, it's just pretty rare
|
# ¿ Jan 26, 2019 01:29 |