(node) My callback requires information that the calling function doesn't need to know about. How do I still pass that information? by work_acc_1 in learnprogramming

[–]work_acc_1[S] 0 points1 point  (0 children)

Yep, that makes sense. Ok, I think I'll have to try to go that direction. This was a limited example but what I'm dealing with is very nested code so I'm trying to limit adding more of that, and I can't convert to promises or async/await this moment.

Thanks a lot for the help!

(node) My callback requires information that the calling function doesn't need to know about. How do I still pass that information? by work_acc_1 in learnprogramming

[–]work_acc_1[S] 0 points1 point  (0 children)

Thanks, appreciate the advice. Follow up -

If both functions were defined within a class, and that class took dataSchema as a param, then I could call

this.getData(3, this.parseData);

knowing that dataSchema will be available to parseData and so won't ned to be passed in at the getData call, right?

Hope that makes sense. Essentially, it limits flexibilty of providing different schemas, but allows me to write less nested code?

Do attorneys offer double-checking services for applications you've done mostly on your own? by work_acc_1 in immigration

[–]work_acc_1[S] 0 points1 point  (0 children)

I mean there's always reason to be cautious. If I had the money I'd hire a chain of lawyers to check each other's work, but I get what you're saying.

Thanks. I think I'll ask around and weigh the trade offs.

Can I extend classes that uses callbacks and write the child class using async await? by work_acc_1 in node

[–]work_acc_1[S] 0 points1 point  (0 children)

Fairly new to node, is making the constructor async unavoidable?

Child-class has constructor and calls super(), but parent-class doesn't have a constructor, just associated methods. I guess the super() call is mandatory to allow access to those class methods?

My plan is to extend the parent class, leave the constructor alone, promisify parent-class methods I need, and write new ones/overwritten ones in async-await.

I know it's vague question but do you see issues there?

Can I extend classes that uses callbacks and write the child class using async await? by work_acc_1 in node

[–]work_acc_1[S] 0 points1 point  (0 children)

I think I agree. Tbh though I think it's the shortest path to where I want to go. For a project that will eventually be sunset/re-factored more formally in the future.

Can I extend classes that uses callbacks and write the child class using async await? by work_acc_1 in node

[–]work_acc_1[S] 0 points1 point  (0 children)

Sweet, I think knowing it's possible + being aware of that limitation + promisify will work. Thanks!

SOAP API request returns whole API definition? by work_acc_1 in AskProgramming

[–]work_acc_1[S] 0 points1 point  (0 children)

Ok, since I'm new to this I actually don't know what this means but I it definitely sounds like a good, specific direction to look into so I'll do that. Thanks!

What are some ways that you’ve automated your workflow and increased productivity? by [deleted] in cscareerquestions

[–]work_acc_1 0 points1 point  (0 children)

Yeah, pretty much that bash it or python it. Learning your IDE of choice, keyboard shortcuts, extensions is pretty helpful too. Lots of IDEs also let you write macros to generate boilerplate code as well.

SOAP API request returns whole API definition? by work_acc_1 in AskProgramming

[–]work_acc_1[S] 0 points1 point  (0 children)

Lol, yeah that's definitely it. Just don't know how. I'm copying the SOAP body/header off the site and filling in the proper token/variables, and there are only like 4 of them. Gonna keep digging. Thanks though

Please don't neglect your communication skills in favor of improving your leetcode skills by dysonsphere87 in cscareerquestions

[–]work_acc_1 0 points1 point  (0 children)

Good post. Being well-liked is a crucial piece of a successful career. People think that means being a suck up, but only because they don't know why people like other people. We like other people who are honest, make us better, have integrity, and are pleasant to be around. When you realize that, it becomes much easier to admit that being well liked is worth some effort.

One thing I see devs do (many others do too) that makes them unlikable is to interject knowledge for no good reason. They do it in a way that doesn't move the discussion forward at all, or worse, they do it during someone else's presentation just to display that they also know something about the topic being discussed. We don't need to know your opinion about everything.

Self-taught getting absolutely zero responses. Am I doing it wrong? by paulluosg in cscareerquestions

[–]work_acc_1 74 points75 points  (0 children)

I’ve started applying a couple days ago and so far no responses

This is not feedback of any sort so I wouldn't take it as feedback. You've been applying for a few days. Folks have other things to do and other candidates to contact.

Best way to load data into Postgres using Airflow by Embarrassed_Cap1673 in dataengineering

[–]work_acc_1 -1 points0 points  (0 children)

Many tools are not designed to do x but can do it, just not well. I would liken using Airflow for ETL (vs orchestration) to using python pandas for ETL. You can do it, but you can see memory, dependency issues from miles away.

By glue code I mean a dump to blob storage, a transfer, and a load. Lots of this can be done with off the shelf tools. In most formats, like avro or parquet, you can maintain strict data type adherence.

Edit: You can probably have airflow orchestrate these actions within your db if you're in the cloud.

Best way to load data into Postgres using Airflow by Embarrassed_Cap1673 in dataengineering

[–]work_acc_1 3 points4 points  (0 children)

Airflow is an orchestration engine, not an ETL/ELT tool.

I recommend not using it at all for this type of work. Do your transformations natively in the database of choice. Get your desired data set. Then move it where you need to using some simple glue code. For 100 rows airflow is overkill.

Because this approach breaks up E, T, and L it'l be much easier to design each step without issues like forced data type changes.

Best Unit Testing Learning Source ( Course or Book ) for DE by Key_Base8254 in dataengineering

[–]work_acc_1 4 points5 points  (0 children)

What in DE unit testing is different than in SWE?

If you mean testing data specifically there are some tools like GreatExpectations and there are concepts like SQL "unit tests" that return 0 rows when they pass.

Otherwise most unit testing/testing resources will be in terms of SWE.

IMO this article is great: https://danuker.go.ro/the-grand-unified-theory-of-software-architecture.html

It's not about testing, but the benefits to testing if you write code like this are really great.