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
AWWNAW
Dec 30, 2008

ThePeavstenator posted:

Every single one of our automated UI tests are now failing because they can't create test accounts and users. Turns out the tests are somehow coupled to the implementation details of our Users API and broke when a change was made to it :suicide:

i have inherited a project in hwich someone thought good testing required reproducing the state of the whole loving company. every little change breaks multiple tests that each implicitly test all sorts of magical horeshit. the tests are way more complicated, and poo poo probably more lines of code than the actual system

gently caress these people

Adbot
ADBOT LOVES YOU

AWWNAW
Dec 30, 2008

gonadic io posted:

https://cloud.google.com/knative/

Looks pretty sweet, server less functions but 1) run via docker so not limited to js and 2) runs in your own cluster so you don't pay per request or anything. im for sure going to find some way to squeeze it into my current jerk-off hobby project

how’s this related to serverless functions? I can’t tell what the gently caress this does from reading that page and I’ve used Kubernetes for a couple years

never mind I had to look at the GitHub repos to see what it does....

AWWNAW
Dec 30, 2008

they already have that and it’s called GKE

seems like this is tooling for rolling your own functions as a service type of thing with event/request plumbing but also some other vague buzz wordy poo poo

AWWNAW
Dec 30, 2008

czech out this example https://github.com/knative/docs/tree/master/eventing/samples/event-flow

AWWNAW
Dec 30, 2008

Luigi Thirty posted:

how the hell do I make a window full screen in win9x

if you haven’t already figured it out I’m pretty sure it’s just a send message call with the window handle and some constant telling it to get big. at least that’s what I recall from like 20 years ago

AWWNAW
Dec 30, 2008

I use Fira code

with ligatures

AWWNAW
Dec 30, 2008

HoboMan posted:

my code as it stands

C# code:
public IHttpActionResult SubmitForm([FromBody]string json)
{
    var purchaseOrder = JsonConvert.DeserializeObject<PurchaseOrder>(json, defaultSettings);
    using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["myDatabase"].ConnectionString))
    {
        try
        {
            // submit the info into the database
        }
        catch(SqlException e)
        {
            logger.error(connection , "Exception saving purchase order", e);
            return InternalServerError();
        }
    }
    Task.Run( () =>
        {
            using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["myDatabase"].ConnectionString))
            {
                try
                {
                    // send email
                    logger.debug(connection , "Sent email");
                }
                catch(Exception e)
                {
                    logger.error(connection , "Exception sending email", e);
                }
            }
        });
    return Ok();
}
"Sent email" will get logged, but if i hard code an exception in the try block "Exception sending email" will not get logged.

e: i literally just added the using and Task.Run blocks around the existing try-catch that was there.

e2: i forgot to include the try-catch for the json parsing, but you get the idea

you should look to use HostingEnvironment.QueueBackgroundWorkItem
as described in this lovely blog post https://blogs.msdn.microsoft.com/webdev/2014/06/04/queuebackgroundworkitem-to-reliably-schedule-and-run-background-processes-in-asp-net/ which just happens to be about sending email too

any time you're doing "long running" work in ASP.NET (you never should) you're subject to the AppPool being recycled and all that poo poo. MS realized people were not going to figure out this is a bad idea so they added this

AWWNAW
Dec 30, 2008

people that don’t appreciate functional programming are bad people

AWWNAW
Dec 30, 2008

I used to get codeine syrup for sore throats from urgent care clinics but I’ve noticed in the past few years they just write me some antibiotics and tell me to take ibuprofen then I say “excuse me did you just tell me to go gently caress my self?”

AWWNAW
Dec 30, 2008

gonadic io posted:

Ctps: teaching somebody at work scala and I have to keep apologising. Why do I work in this poo poo lang again?

I mean the main issues are just that type inference is so completely broken you have to have type annotations all over the place and any error messages are useless unless you do, since the error is rarely generated when you define something incorrectly only when you use it

drat. I’m talking to a Scala company soon and all I keep hearing is bad things :mrwhite:

AWWNAW
Dec 30, 2008

I heard bad things about ruby and found out they were all true

AWWNAW
Dec 30, 2008

SQL? yeah. it’s good

AWWNAW
Dec 30, 2008

floatman posted:

I am so sick of bikeshedding.
Just because the software is poo poo and riddled with legacy problems that nobody wants to solve, all pull requests devolve into:
"WHY NOT MAKE THIS A ONE LINER INSTEAD?"
"WHY IS THIS A FUNCTION?"
"WHY IS THIS NOT A FUNCTION?"
"PLEASE ADD SPACES/ REMOVE SPACES/ PUNCTUATION"

meanwhile, nobody seems to care that all this poo poo code is going into a giant god abstract class. Seems that the pioneers of this software decided that if they're using a MVC framework, that means the only classes you can have HAVE to be models, views or controllers only. We got really fat controllers, which actually inherit some god base "abstract controller" which contains everything. EVERYTHING.

welcome to the team!

AWWNAW
Dec 30, 2008

Symbolic Butt posted:

I did everything in python with the exceptions of day 11 which I decided it was pretty fitting to my current Q skills and day 16 which I did part of it in prolog.

could you post some prolog for day 16? been thinking of trying it in miniKanren

AWWNAW
Dec 30, 2008

Corla Plankun posted:

is there a 'nice' way to do AoC day six? i've been thinking about it for days and i can't think of any better ideas than "make the board real big and ignore anything that touches the board edge", which is not a very elegant solution
part 1 or 2?
I just found the nearest marker coordinates to each point around the bounding box and that gave me the set of markers that made infinite regions

AWWNAW
Dec 30, 2008

jit bull transpile posted:

your track record is more than enough at this point. I don't have a bs cs either and look where im at as a filthy :females:. if you find the right companies they'll respect your self starting attitude and everything you've taught yourself

I submitted a resume and application for an Apple job and never got a reply

AWWNAW
Dec 30, 2008

when he’s right he’s right

AWWNAW
Dec 30, 2008

javascript is bad

AWWNAW
Dec 30, 2008

I cannot imagine what it must be like to work somewhere that forces you to use JavaScript and you just have to make the best of a bad situation. nobody should have to live like that

AWWNAW
Dec 30, 2008

it’s huge fun writing dynamically typed programs and it fuckin sucks to maintain them

AWWNAW
Dec 30, 2008

Blinkz0rz posted:

i'm the NullPointerException at runtime

whose stack trace has been elided as a performance optimization

AWWNAW
Dec 30, 2008

eschaton posted:

scheme was also an option, seriously considered

if only jwz had done the scripting instead of eich; jwz could actually look at and integrate scheme48, but eich threw up his hands at figuring out how to integrate anything and wrote his own babbys first C-like with lex & yacc instead

what could’ve been :(

AWWNAW
Dec 30, 2008

I just did a side project that uses headless chome to scrape a very poorly made asp web forms site of public records. it had a cheap captcha component that I solved by downloading the audio sample and transcribing it with some AWS speech to text service

AWWNAW
Dec 30, 2008

Skyl3lazer posted:

So I've been learning AWS for the new gig, and I'm going for one if the certs. The dude teaching the course talks about how he fuckin loves Lambda, but when I was messing around with it it was a pain in the dick to debug. Is there a way to make it more tolerable? Does anyone even use it in the real world?

using lambda without some helper framework is a pain in the rear end. but yes people use it in the real world. it’s great for small event driven functions and it’s super cheap

AWWNAW
Dec 30, 2008

Symbolic Butt posted:

is it like lisp/scheme/racket?

s expressions and macros. name a more homoiconic duo. go ahead, I’ll wait

AWWNAW
Dec 30, 2008

more than once I’ve installed docker on a machine only so I could install node in a container. as to not sully my development environment

AWWNAW
Dec 30, 2008

Blinkz0rz posted:

i'd use List<T>.Add because we're talking about c#

which is most commonly backed by arrays

AWWNAW
Dec 30, 2008

Shinku ABOOKEN posted:

tell about prolog variants/competitors.

try minikanren

there's a good book on it called the reasoned schemer, in the same style as the little schemer

AWWNAW
Dec 30, 2008

I sigh as I polish my monad

AWWNAW
Dec 30, 2008

I worked for a place that did the double CTO thing but said one of them was transferring to chief product officer. both of them were gone in under a year and 90% of the org turned over leaving only the people that couldn’t find new jobs

AWWNAW
Dec 30, 2008

Share Bear posted:

i simply write a series of functions that pass around data and maintain no state besides that data op

this guy gets it

AWWNAW
Dec 30, 2008

there’s another statement mapper for clojure like the one mentioned for Erlanger above too, where you define all your paramterized queries in a file : https://www.hugsql.org

AWWNAW
Dec 30, 2008

python package managers are dog poo poo

AWWNAW
Dec 30, 2008

angular SUCKS

AWWNAW
Dec 30, 2008

Ed; lovely story

AWWNAW fucked around with this message at 04:58 on Apr 13, 2022

AWWNAW
Dec 30, 2008

Product people are the loving worst, they all think they’re little Steves. my current ceo fancies himself a product designer and fawns over Elon musk. he also thinks web sites should only use one font size for all text, headers, everything

AWWNAW
Dec 30, 2008

One time instead of fixing a memory leak, I added a condition to the health check endpoint to fail if available memory was low. Then the pod/instance got replaced whenever it got low haha. Works great

Also I think k8s added a third type of probe specifically for startup, but I stopped using k8s before I got to use it. Would’ve been useful for the slow start Java craps

AWWNAW
Dec 30, 2008

the thing about indexing into JSON in Postgres is that it doesn’t/can’t keep statistics on values inside the blob, which can bite you in the rear end much later if the DB gets bigger

AWWNAW
Dec 30, 2008

f# (good) and scala (bad) too

Adbot
ADBOT LOVES YOU

AWWNAW
Dec 30, 2008

Corla Plankun posted:

speaking of learning python poo poo, can any of y'all recommend a crash course/tutorial on pyspark?

i used it like 8 years ago on an on-premise hadoop cluster and it was real bad, but i am seeing it in a lot of data eng job postings lately so i need to refresh my memory and catch up to what its doing now

I had to pick it up for work this year and enjoyed using it, Spark 3.3 I think. don’t remember any specific resources but I do know the Python APIs are basically mirrors of the Scala version, so don’t search only for “PySpark” docs

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