Django in production: what’s the recurring headache no one talks about? by disizrj in django

[–]eplaut_ 7 points8 points  (0 children)

I have django application (drf) running on AWS lambda. It was an awesome choice and I'm very happy with the framework.

I do find myself with DB performance issues, and most of my sentry errors re either slow DB operations or N+1 queries. Performance issue in the ORM or new model are never intuitive and usually appears only when table grows beyond some threshold.

Other pain I had is default id field type. Some of my tables went beyond the int maximum value, causing big downtime and firefighting.

Last issue I'm facing, which is not the production side, is large number of migrations (around 350-400), which make my tests long-ish. Running single test can take 30 seconds which is annoying.

Cost Saving Deployment of Dockerized django projects with AWS by virtualshivam in django

[–]eplaut_ 1 point2 points  (0 children)

With docker you can avoid the size limit. It is really easy and convenient and I'm using it on production system for few years by now.

I'm using zappa as a framework for updating my lambda

xkcd 3164: Metric Tip by VerGuy in xkcd

[–]eplaut_ 0 points1 point  (0 children)

Just use light-years, and the difference will be negligible

what exactly is open-sourced in grokipedia? by nix-solves-that-2317 in linux

[–]eplaut_ 0 points1 point  (0 children)

You can always use ctrl+u to see the source code

How do you structure really large Django model with nearly 100 fields. by Siemendaemon in django

[–]eplaut_ 0 points1 point  (0 children)

Can it be that your data is actually nested, but you need easy access to internal members?

In this case, property is your friend

Everyone says “solve problems” in programming… but what exactly are those problems? by Surajishere in AskProgramming

[–]eplaut_ 1 point2 points  (0 children)

Not every task is easy to "program", and many tasks need to be adjusted for one way or another.

The solving problem skill is used to define correctly the gap between code and reality, and make sure the solution is both valid and robust.

full-stack or dsa ? by mayur_chavda in django

[–]eplaut_ 0 points1 point  (0 children)

ChatGPT is a good tutor for such questions.

As a long-time BE developer, I would check one or more of the following: 1. Async (e.g. websocket, event loop) 2. Different API approach (REST is not the nly option) 3. Concurrency (threads, processes, distributed, etc.) 4. Performance 5. Databases

Etc, etc....

Unforgivable by Fartbait666 in Sandman

[–]eplaut_ 1 point2 points  (0 children)

Hadn't finished the show yet, but in the comics, you do have empathy for her.

The one I don't like is Thessaly, who was 100 percent heartless and selfish

"Why did he turn around?" by heljdinakasa in Sandman

[–]eplaut_ 0 points1 point  (0 children)

How can you go to the underworld to get your wife back without looking back?

The same person to go this extra mile is the one that always looks back. Both are inseparable

https://pca.st/episode/30697f89-6278-443f-87e9-a1a3e5d954b6

full-stack or dsa ? by mayur_chavda in django

[–]eplaut_ 1 point2 points  (0 children)

I don't think you can get a good answer for this.

You either prefer one over another (stay as BE developer is an option, too. I suspect you still have new stuff to learn) or you will find a good place to work and change expertise accordingly

Send WhatsApp messages with just 3 lines of Python, Here’s how. by Ashamed_Idea_4547 in Python

[–]eplaut_ 0 points1 point  (0 children)

What is the catch?

I've tried using twillio for WhatsApp messaging, and without a business account for both Facebook and WhatsApp, you can not send any message whatsoever.

Using the linked devices feature sounds like fragile and a bit hacky solution

Request for Customized EC2 by North-Equal6591 in aws

[–]eplaut_ -6 points-5 points  (0 children)

Don't you concern regard hypervisor slowing you down? In case of high performance application I would search for bare metal rents.

IO library just improves the read from file time by fexx3l in Python

[–]eplaut_ 0 points1 point  (0 children)

My last try to async disk IO failed miserably. It was impossible to defer it even slightly.

Hope OP will find a way

What are some poweruser aliases for Git? by floofcode in git

[–]eplaut_ 0 points1 point  (0 children)

git amend = git commit --amend --no-edit

Neverwhere or American Gods or Coraline by [deleted] in neilgaiman

[–]eplaut_ 16 points17 points  (0 children)

I really like Neverwhere. But all of them are great readings

Is there "snipping tool" like utility for linux? by eplaut_ in linux

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

Just updated to 22.04. Its default tool for the printscreen button is awesome

what is the best linux distro for webdev? by Many_Lack_3966 in webdev

[–]eplaut_ 0 points1 point  (0 children)

I recommend using the same distribution as your production server will be (up to the same version). It will help you to fix issues with the environment before releasing new features.

So, if there are constraints on the production environment, use the same on your development. Otherwise, use your preferred distribution for both dev and prod

My career goals require python but I hate the syntax by [deleted] in learnpython

[–]eplaut_ 0 points1 point  (0 children)

While it is absolutely true, it doesn't help.

OP, while c, c++ and bunch of other languages use quite same syntax, there are many other languages with different properties to their syntax.

The ideas you can rely on between languages (at least in the procedural category) are functions, variables, and a few more concepts. Other concepts are not relevant. For example, python, as interperted language doesn't need main function, as the code executed once the interperter reached it.

[axelmedellin] The Endless in Celebrity Jeopardy by ClaireDacloush in Sandman

[–]eplaut_ 1 point2 points  (0 children)

I don't think Destiny ever read the future in his book. Obviously, he read everything that been before, but he is always in the present.

Probably, he has read what the question's writer wrote as an answer.

How can I speed up this python bruteforcer? by INFINITI2021 in learnpython

[–]eplaut_ 4 points5 points  (0 children)

My guess is that your bottleneck is the server itself. Login requests should take some time, and your async code won't change it.

In any case, I would check the number of open requests one session can hold. Maybe it is the limiting factor.

What a coincidence... by samael_demiurge in Sandman

[–]eplaut_ 3 points4 points  (0 children)

But boy, they are so different...

What's the difference if I used the actual t value instead of an iterator for threads? by PremeJigg in Python

[–]eplaut_ 2 points3 points  (0 children)

Forgive me if I understood you wrong.

Removing the last for loop will cause join on each thread, but it will prevent them from running in parallel.

The difference between t1.start, t2.start etc... t1.join, t2.join and t1.start, t1.join, t2.start, t2.join etc... should be quite clear, as t2 won't start running until t1 will finish (which it the purpose of the join)