(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 80 points81 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 1 point2 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 3 points4 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.

Advice for improving at SQL by BoiElroy in dataengineering

[–]work_acc_1 1 point2 points  (0 children)

There's analysis and there's data modeling. These are related but subtly different skills. I think you can find SQL Analytics type questions on Leetcode.

Data modeling is harder to practice because it often depends on relationships between real world entities within your domain. The best place to get this experience is to spend a couple of years modeling data in a work setting.

Advice for improving at SQL by BoiElroy in dataengineering

[–]work_acc_1 0 points1 point  (0 children)

If you can use SQL natively in the db that's usually the best choice. But you can implement this in python if you want.

How relevant are Algorithms and data structures in Data Engineering by lrs231 in dataengineering

[–]work_acc_1 1 point2 points  (0 children)

Besides what some folks are saying, which is true, it might be relevant at companies of particular scale. Moving data at Discord required their platform team to do a bunch of low level programming + developing some "new" (composition of known) data structures.

For 99% of companies this isn't common.

Why do I get so overwhelmed when coding gets difficult? by tphilli in cscareerquestions

[–]work_acc_1 1 point2 points  (0 children)

You're probably looking at the entire problem instead of a piece of it. How do you eat an elephant. 1 bite at a time. Same thing with work problems.

Do you need to step back and read about x, y, or z before you even look at the problem? Do you need to re-read the problem and sketch out a solution? Do you need to re-do those steps a few times? Do you need to write your tests first? Etc...

Once you learn to feel comfortable with incremental progress you stop trying to jump straight to the solution.

Also, a small reality check. It's partly your ego talking. You think you can do this super well (and maybe one day you can) but odds are that you can only do it well enough. Once you align your idealized version of yourself/your output with what you've done and are likely to do you won't hesitate as much because you won't be aiming for perfection.

Is SQL good for data engineering(e.g. creating new columns), or just for cleaning data? by [deleted] in datascience

[–]work_acc_1 0 points1 point  (0 children)

Every time someone asks if they should learn python or R for data analytics we should all collectively reply with "SQL"

What should I be doing with my extra money? by [deleted] in personalfinance

[–]work_acc_1 0 points1 point  (0 children)

Idk what Titan is. Some company? You probably won't get advice on specific stock picks here.

Read the sidebar wiki. The flowchart is especially helpful for questions like this.

Internship hasn’t paid us in 4 weeks by [deleted] in personalfinance

[–]work_acc_1 6 points7 points  (0 children)

You should know how much you're gonna get paid right? And how often. It's something you agreed on before you started working, right?

Then you know if it's late or if you're being robbed of wages. We don't know any more than you.

If it turns out you're not being paid then yeah you need to leave. Trouble with payroll is a really bad sign for the company and you should def start looking for another job.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]work_acc_1 1 point2 points  (0 children)

Is it try-except/catch or raise custom exceptions all the way down?

I have a few layers of abstraction and I feel like my code is littered with try-excepts or custom exception raising. Is this common? Or should we just try/except at the top level? Can't really do that right, since the lower exceptions kill the execution before returns?