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
duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


akadajet posted:

i mean, python can do that too and isn't nearly as ugly

but some people get really upset about white space

Adbot
ADBOT LOVES YOU

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


cinci zoo sniper posted:

what do you even put in sql to get it to 92mb, 10 million entries hardcoded into where foo in (bar) clause? :staredog:

all the pngs used including some that arn't

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


we solved the time zone issue by just not storing the time zone anywhere
and by solved i mean made a nightmare to deal with as we have prisons in multiple time zones

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


aardvaard posted:

i'm less concerned about the choices made in 1994 and more about the 25 years since then where they've failed to undo them

some people are obsessed with never breaking backwards compatibility no matter how dumb that can be for certain things

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


DONT THREAD ON ME posted:

ctps: girlfriend wants to learn to program and i really hope it sticks because i think we'd be a good programming team

Krankenstyle posted:

i dont really care if its ugly as long as it works...

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Private Speech posted:

is PHP still horribly poo poo

a lot of our (externally-developed) customer web stuff runs on it and it at least -looks- relatively competent

they use like two dozen frameworks and typescript and react and stuff

but then its php

if its php7 that makes it better than it was by reducing the terribleness but its still there

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


cinci zoo sniper posted:

so today i was looking at some slowly generating report, coded in php


it has a for loop iterating over collection of 10^7 records that has an element-level “if a=7 and b=8” check that can be done on sql side, i.e. select * from report_table where a=7 and b=8

ah so thats where the programmers that originally wrote our code base ended up

did you know that if you call a second query in a loop over another querys results you dont need to figure out join syntax?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Soricidus posted:

i hope you're using a language where some automated tool can catch typos in the code itself before it runs

i tried that but it kept just deleting all the php files

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


depends on how the law is worded

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


floatman posted:

gently caress r.e. my previous story of using a logging library (monolog, PHP) to generate statefully held html to output back to page.

Today I found out that there was a monkey patched property being attached to the logger class, a property called "max_debug".
It was used something like this:

PHP code:
$this->logger->debug("Got html response!");
if ($this->logger->max_debug) {
     $this->logger->debug("Here is html body $body");
}
Putting aside the questionable sanity of having a logger collect html for output,
Basically everybody knows you can have various output levels for logger classes (i.e. warning, info, debug).
Instead of using info for info and debug for debug, this code uses debug for EVERYTHING and the monkey patched Boolean flag is there to represent a custom level lower than debug.

one of our guys does the same thing in his code except his max_debug equivalent is a define in one of his files somewhere
so logging level is controlled by something not in the file you are expecting and you have to edit code to change it

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Soricidus posted:

parse xml with regex, write xml with string concatenation, what could possibly go wrong

it’s just csv with angle brackets right?

hey, dont dox our corporate source code

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


you can build it without xml support but why would you

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


our company colors are shades of blue like most companies with no originality
i bring this up because our ba/pm just asked if we can make the visited links on our website bright red so customers can clearly tell they already went to that page

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


or blame the person that wouldn't let it be implemented the easy way

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


nginx is pronounced the same way trump pronounces china

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Sapozhnik posted:

if you think angular is bad imagine how bad angularjs (angular 1) was. i still have nightmares about that poo poo

ug, one of our products is in an early version of angular 1 and code was/is just sort of forced into it so an update would require tossing pretty much the entire thing out and starting over

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


welcome to the fetch api!

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Bloody posted:

the one that is checked by a schema and won't silently be wrong. also the one that will do auto-completing good

so both json and xml?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


DONT THREAD ON ME posted:

are you talking about json schema or is there something usable now?

im just pretending that .d.ts files are a workable solution

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


animist posted:

they're pushing this to the blockchain people for some godforsaken reason

so at least it will never be used by anyone who matters

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


animist posted:

my every keystroke is sent to the cloud for distributed AI processing! 17 TPUs strain to predict my next move!!!

real talk though how are they ever expecting to make money on this

glossy ads in magazines dumb ctos read

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


animist posted:

take a look at my serverless website:

[picture of a book]



also. i'm always infuriated by programmers who think "basic understanding of HCI" is just weakness. like no, i don't want to use deliberately awful interfaces if i can avoid it

you will never become a project manager with that attitude

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


the test is to act like a normal human being for five minutes

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


TheFluff posted:

well yes obviously the tests would have to run on a production-sized database, but that's not what i was trying to get at. i was more trying to ask if there's a better way of catching these regressions than just writing tests that assert that the runtime is less than some arbitrary number, because figuring out what that number should be doesn't sound so easy to me

sounds like you are going to have to start logging the time each test takes so you can eventually assert the test length

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost



you know, the week management is on vacation

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


thats what the judges keep telling me

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


NihilCredo posted:

i heard that as 'add a time unit, then double the number' (3 weeks -> 6 months)

https://www.youtube.com/watch?v=8xRqXYsksFg

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


so they are creating more usable designs than most?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


someone should tell him programmers aren't that kind of engineer

they really aren't the other kind either...

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


MononcQc posted:

where’s the step where we make sure the code works the right way

like "the right way" was ever defined or is known in any way

duz fucked around with this message at 17:38 on Jan 1, 2020

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


i like to sometimes delete code, as a treat

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Mr SuperAwesome posted:

does anyone have a good solution for CI/CD at scale or something?

we have ~10 - 20 microservices that all need to be unit tested, built, artifacts uploaded, and then blue-green deployed

currently we use "jenkins job builder"

the good:
it lets you write a templated job and then apply it to, for example, a list of your microservices (you can parameterize things too). this is great because you can get as many jobs as you have microservices, with basically zero overhead, and they are all identical, the only difference is the link to the repo in question that they build.

your jobs are all written as code, so updating all your identical jobs is as simple as merging an MR with your changes to the repo containing templated jobs.

the bad:
jobs are defined in YAML, which encloses a jinja2 template, which can contain groovy code, which can contain inline shell scripting. yes thats 4 goddamn languages in one single file.

from what i can tell all other CI/CD services at scale are poo poo but just in a different way. Ive used gitlab ci/cd which is nice and simple, but requires you to update each of your N projects manually. A guy at work that was also dealing with our jenkins job builder hell left to another company which used Circle CI, and he said it sucked too, just in different ways.

for gitlab, the ci yml definition can require ci yml from other repos so what we did is have the actual ci logic checked into a utils repo then all the projects have a yml that just includes the appropriate files from the utils repo so that repo is the only one that we need to update

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


whats it look like from the other side?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


MrMoo posted:

A darker version of the front side basically. The pixel resolution appears pretty low physically, you can see pixels when up close. It's allegedly supposed to be 4K, and slows the poo poo of my MacBook Air when mirroring display. It's more like 720p though. There's a gigantic box at the back which houses all the electronics, like this (not a sound bar):



so you need to be careful what you watch on it when its in front of a window like that?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


jesus WEP posted:

a good quick rule of thumb: will i ever need to perform arithmetic on this number? no? just store it as a string

can i cast to integer on demand? store as string

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


HappyHippo posted:

wait emailing you about spam you've received is a thing? :psyduck:

i used to get a daily email from the spam filter at work listing all the spam it filtered in case any were an accident and i want to whitelist the sender
it eventually stopped after i marked it as spam enough times

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Powerful Two-Hander posted:

at one point I thought typescript was worth persuing to to make things like the datatables.net grid library easier to interact with where it's used in mvc pages by adding typing but after all this, I think my takeaway is "don't bother, it's not worth it because even if you get it working the benefit is marginal for the amount of time you'll spend loving around trying to keep it working"

a while back, but if you are using vscode, just `npm install @types/datatables.net` and vscode will show the types in the ide. if you then want it to check the js file for type errors you can add `// @ts-check` to the top of the js file and it will run the file thru tsc. you can use the jsdoc @type notation to add types when using it this way. both of these are vscode features are don't actually do anything to enforce the typing but you also dont have to install a javascript toolchain to use them
this is what we've been doing until this month when i decided to finally get a toolchain going so we can switch to typescript and start enforcing types and boy you're right about there's a lot of loving around needed to get it going. luckily theres a lull in work so i can spend as much time as i want on it

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


abraham linksys posted:

to be clear you absolutely should do this if you don't already, unless you've got like Hbag's Filthy Porn Scraping Bot 7.0 there or something

what if i made a significant contribution and want to show it off?

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost


Carthag Tuek posted:

ugh, it falls to me to make a small change in an angular thing we have but i cant even run npm install, it just explodes with errors

might be cause im trying to do it in wsl but idk

that sounds familiar, like if you dont have npm installed inside wsl, it will try to use the one installed in windows and that wont work out well

Adbot
ADBOT LOVES YOU

duz
Jul 11, 2005

Come on Ilhan, lets go bag us a shitpost



that a&q at the top about top posting gave me a chuckle

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