|
That test isn't bad because of its horrible notion of object equality
|
# ? Aug 2, 2017 02:18 |
|
|
# ? Jun 5, 2024 15:22 |
|
code:
The fix checked in? code:
|
# ? Aug 2, 2017 14:49 |
|
Rebus posted:
|
# ? Aug 2, 2017 16:28 |
|
Colleague reinstalled Windows on his work computer today. He reports that he had to restart the machine zero times in the course of installing the operating system, and four times in the course of installing Oracle.
|
# ? Aug 2, 2017 16:44 |
|
Hammerite posted:Colleague reinstalled Windows on his work computer today. He reports that he had to restart the machine zero times in the course of installing the operating system, and four times in the course of installing Oracle. Installation wizards suck and the windows ecosystem should have left them behind years ago. If you have a ton of critical options to pick, ship a drat settings file so you only need to configure them once and can save that file with your documentation. And if you don't (which is usually the case), just install with defaults and let me change things later. It's particularity hilarious in that regard to compare installing sql server on windows (el camino de loving santiago) and calling up the sql server docker image (hit enter, done). I unironically enjoy abusing docker as a glorified, overgrown app store for services. Docker tagline: "because it's not on chocolatey and I have 300Mb to waste". edit: wrong thread. added caps and punctuation NihilCredo fucked around with this message at 18:59 on Aug 2, 2017 |
# ? Aug 2, 2017 18:56 |
|
Rubellavator posted:Today I broke a jasmine test that looked like this: Fun fact - comments are part of code in JS! quote:> (function(){ /* fffff */ }).toString(); (I guess you were highlighting that and not the comments that produce a syntax error )
|
# ? Aug 2, 2017 19:05 |
|
canis minor posted:Fun fact - comments are part of code in JS! That's implementation dependent! Though I imagine most implementations at this point just return the source text unmodified.
|
# ? Aug 2, 2017 20:04 |
|
NihilCredo posted:Installation wizards suck and the windows ecosystem should have left them behind years ago. I don't know about that, but the Oracle one sucks because they decided to make their own and did a poo poo job of it. The last time I installed MySQL they had made their own special snowflake installer for that too, and it was totally hopeless because it completely failed to set the services up correctly. This was several years ago mind you so I don't know if it's still a mess (but it probably is).
|
# ? Aug 2, 2017 20:13 |
|
Hammerite posted:I don't know about that, but the Oracle one sucks because they decided to make their own and did a poo poo job of it. Commit Status: Rejected Reviewer Comments: You've got an extraneous 'and did a poo poo job of it' in this post. Keep it DRY.
|
# ? Aug 2, 2017 21:16 |
|
NihilCredo posted:I unironically enjoy abusing docker as a glorified, overgrown app store for services. Pretty crappy app store with no quality control.
|
# ? Aug 2, 2017 22:16 |
|
Trying to integrate ten different web services into a dashboard reveals so many coding horrors. One wants you to pass your token as a request header, another wants it as the username, a third doesn't have any tokens and needs your real username and password. At least none of them are Oauth so far. One service literally says that the best way to find the ID value you need to pass is to log in to the web ui and copy it. And their "list all items" API call takes 20 seconds to return. You want the current item only? Good luck with that. Not to mention that another service has a perfectly fine REST API that they use internally but it's not public for *reasons*. Well, not quite fine, it doesn't actually respect the end date you pass, but I can work around that. At the end of the day, it will look pretty though.
|
# ? Aug 2, 2017 23:47 |
|
Dashboards came into vogue a while ago, and I always felt like they were kind of a fad. Surprised they're still a big thing.
|
# ? Aug 2, 2017 23:53 |
|
Pollyanna posted:Dashboards came into vogue a while ago, and I always felt like they were kind of a fad. Surprised they're still a big thing. Big corporations are like 2-4 years behind at any given time.
|
# ? Aug 3, 2017 00:00 |
|
Edison was a dick posted:Pretty crappy app store with no quality control. So exactly like every app store ever?
|
# ? Aug 3, 2017 01:45 |
|
It's me, I'm the horror. So we have this really expensive catalogue/index system which runs on Java, which runs a specific JDBC driver, which is also not MS-SQL cluster availability group aware. So instead of getting the primary SQL node address when it connects to build its catalogue; it'll get any one of 4 "random" IP addresses during the many thousands of operations it does, which could be the primary node, a read-only node, or the cold disconnected node. This makes Java have the mother of all hissy fits when nothing is making sense in terms of addressing or even connectivity. To make it aware would cost us thousands in consultancy time. Well, the .NET SQL client is cluster aware. So I've coded a tiny DNS proxy which forwards all non SQL address requests to our normal primary DNS servers, but if it's a magic SQL one it'll ask the .NET client to connect to the same cluster availability group and give back the primary nodes IP address, and cache it for a little bit to not hammer SQL thousands of time to get cluster state. We then override the catalogue machines primary DNS server to this tiny DNS server. Result: We have fixed the expensive catalogue system using about 8 lines of C# and made it failover tolerant, and all it cost was my sanity.
|
# ? Aug 4, 2017 10:40 |
|
[quote="“Cancelbot”" post="“475027504”"] It’s me, I’m the horror. So we have this really expensive catalogue/index system which runs on Java, which runs a specific JDBC driver, which is also not MS-SQL cluster availability group aware. So instead of getting the primary SQL node address when it connects to build its catalogue; it’ll get any one of 4 “random” IP addresses during the many thousands of operations it does, which could be the primary node, a read-only node, or the cold disconnected node. This makes Java have the mother of all hissy fits when nothing is making sense in terms of addressing or even connectivity. To make it aware would cost us thousands in consultancy time. Well, the .NET SQL client is cluster aware. So I’ve coded a tiny DNS proxy which forwards all non SQL address requests to our normal primary DNS servers, but if it’s a magic SQL one it’ll ask the .NET client to connect to the same cluster availability group and give back the primary nodes IP address, and cache it for a little bit to not hammer SQL thousands of time to get cluster state. We then override the catalogue machines primary DNS server to this tiny DNS server. Result: We have fixed the expensive catalogue system using about 8 lines of C# and made it failover tolerant, and all it cost was my sanity. [/quote] This reminds me of what someone else did, I think it was AirBNB where they put HA-Proxy on all their nodes and the app server would just talk localhost:MSSQL port. A separate app would monitor the connections needed, update the haproxy conf file and have it restart when changes were made. We were considering that before we just swapped to using a different JDBC driver that supported clustering and let’s us check if it’s read only or not.
|
# ? Aug 4, 2017 14:26 |
|
That sounds like Consul but with extra steps (for those who are curious: https://www.consul.io/) which acts as your DNS server through localhost and keeps everything up to date when a service goes "I'm over here now!" I'm hoping to get everyone on-board with Consul once this mess is over to make more sense of our scattered services and configurations.
|
# ? Aug 4, 2017 15:28 |
|
I once spent two hours troubleshooting broken https because I'd forgotten I set up Haproxy to terminate SSL for both nginx and my node websockets and was reloading/restarting only nginx after a certificate renew. It's still my favorite service.
|
# ? Aug 4, 2017 19:02 |
|
Cancelbot posted:That sounds like Consul but with extra steps (for those who are curious: https://www.consul.io/) which acts as your DNS server through localhost and keeps everything up to date when a service goes "I'm over here now!" The AirBNB one I mentioned is explained at https://medium.com/airbnb-engineering/smartstack-service-discovery-in-the-cloud-4b8a080de619 which even talks about why they rejected DNS.
|
# ? Aug 4, 2017 19:23 |
|
https://twitter.com/cabel/status/893572174153367552
|
# ? Aug 5, 2017 04:05 |
|
When you take form validation literally
|
# ? Aug 5, 2017 05:29 |
|
Sedro posted:When you take form validation literally Ironically, their response is full of typos.
|
# ? Aug 5, 2017 05:34 |
|
I just realized... I'm gettin' too old for this poo poo.
|
# ? Aug 5, 2017 08:41 |
|
Ok so did someone also review it to put the X and the circle in? No way no loving way I swear the machines have already won. dougdrums fucked around with this message at 17:08 on Aug 5, 2017 |
# ? Aug 5, 2017 17:00 |
|
Gotta keep parking officers employed in this crazy app future.
|
# ? Aug 5, 2017 17:29 |
|
Hughlander posted:The AirBNB one I mentioned is explained at https://medium.com/airbnb-engineering/smartstack-service-discovery-in-the-cloud-4b8a080de619 which even talks about why they rejected DNS. Interesting, Consul is "cacheless" in its DNS implementation but wouldn't fix the problems described with others caching responses. You do get the localhost HTTP endpoint as for address resolution but there's much more friction to that where I work
|
# ? Aug 5, 2017 20:31 |
|
So the Unity3D documentation has a little dropdown menu on the top-right corner to let you easily swap between different versions of the API. But for a little dropdown menu it sure takes a while to load, how complicated could it really be: Oh. code:
Full horror here: https://pastebin.com/dxnjb8HP (bonus: can you spot when Unity switched to yearly versioning?)
|
# ? Aug 5, 2017 23:49 |
|
SupSuper posted:So the Unity3D documentation has a little dropdown menu on the top-right corner to let you easily swap between different versions of the API. But for a little dropdown menu it sure takes a while to load, how complicated could it really be: The function even mutates one of the objects passed into it.
|
# ? Aug 6, 2017 00:12 |
|
dougdrums posted:Ok so did someone also review it to put the X and the circle in? No way no loving way I think the system isn't complex enough to identify what the problem is. It probably just catches an exception and then lets the humans figure out what the actual problem was. It's not printing the fliers or anything, someone sitting in an office somewhere just has a big box full of those lovely but yeah, it wasn't designed to be smart enough to identify what the problem is
|
# ? Aug 6, 2017 03:34 |
QuarkJets posted:I think the system isn't complex enough to identify what the problem is. It probably just catches an exception and then lets the humans figure out what the actual problem was. It's not printing the fliers or anything, someone sitting in an office somewhere just has a big box full of those Just something about an automated system that can't do really simple input validation so that they have to have meter maids ride around in their little metermaidmobiles with a box of windshield fliers to notify the driver of the error is... very backwards, I guess.
|
|
# ? Aug 6, 2017 03:40 |
|
I think that system still needs meter maids regardless, it just lets you pay digitally
|
# ? Aug 6, 2017 04:12 |
|
Sounds like that kitty needs to be put down
|
# ? Aug 6, 2017 15:24 |
|
Hammerite posted:Sounds like that kitty needs to be put down
|
# ? Aug 7, 2017 19:28 |
|
Today I started cleaning up a page that queries our db a few times and generates an HTML table with the results of that. This page queries the db per table cell.
|
# ? Aug 9, 2017 21:31 |
|
ChaosArgate posted:Today I started cleaning up a page that queries our db a few times and generates an HTML table with the results of that. This page queries the db per table cell. Is there an ORM behind this hilarity?
|
# ? Aug 9, 2017 23:47 |
|
lifg posted:Is there an ORM behind this hilarity? No, each cell was basically doing a count on a table where an ID matched. I cut that fucker down to one query, with a subquery for 6 of the columns.
|
# ? Aug 10, 2017 00:01 |
|
It's amazing how much consulting work for fixing bad webapps comes down to just two things: fixing bad database queries / caching and fixing database indexes (or lack thereof). Modern computers are just so stinkin' fast now and every other person is on a broadband connection even on mobile that what would have been unusable 10+ years ago is pretty standard now basically. Every other enterprise LOB application I've seen doesn't even have a cache server / daemon so everything is stateful to death and makes deployments extremely disruptive because user sessions will become invalidated by going through another frontend. Meanwhile, users will report pages taking 30s+ to load all the time while some poor SQL server is doing table scans for absolutely no good reason whenever someone logs in.
|
# ? Aug 10, 2017 02:49 |
|
lifg posted:Is there an ORM behind this hilarity? That's stupidly easy to do by accident in ORM. Forget a .select_related() in django? Hello 1500 DB hits per page. It's non-obvious on trivial test data either, since it will return so fast anyway. I make a point of examining the SQL per page/view/API hit to make sure it's not doing anything dumb. Coding horror: System calls are expensive, and you don't want a billion of them, so we get ioctl() fuckery. Libcurl doesn't understand why, but cargo-cults it. Welcome to curl_*_setopt(), where everything is a void * behind a macro because gently caress you c++ users and your "templates". Why would you go out of your way to bypass typechecking? There's like a hundred billion enums there, and dozens of them are related so they'd be a single call - CURL_EASY_WRITEFUNCTION, CURL_EASY_WRITEDATA go together, as do CURL_EASY_NOPROGRESS=0, CURL_EASY_PROGRESSFUNCTION, CURL_EASY_PROGRESSDATA That loving dispatch must be insane, and there's one for every Curl type. At some point you say "Goddamn, this was a loving mistake. Ok, making every setopt function it's own thing, the dispatcher casts & calls the right thing and is now depreciated so please stop using it." I'd use one of the already written c++ wrappers for it but I haven't found one that plays nice with "give me the socket FDs so I can use them in the existing event loop." Is there a less insane C/C++ http library that plays nice with modern TLS, does async DNS and supports using your native event loop to watch it's sockets?
|
# ? Aug 10, 2017 02:54 |
|
Perl 6 is a nightmare https://docs.perl6.org/language/unicode_texas.html
|
# ? Aug 10, 2017 14:34 |
|
|
# ? Jun 5, 2024 15:22 |
|
Perl 6 posted:The following Unicode symbols can be used in Perl 6 without needing to load any additional modules. Some of them have "Texas equivalents" which can be typed with ASCII-only characters. These variants are often composed of more characters than the Unicode versions and so they look bigger; hence the name "Texas" because everything is bigger in Texas I'm pretty sure Perl is entirely designed around being maximally clever.
|
# ? Aug 10, 2017 14:44 |