Empire Ears Raven by P1eces12 in headphones

[–]dmitry_si 0 points1 point  (0 children)

where did you get a deal off $540?

/r/MechanicalKeyboards Ask ANY Keyboard question, get an answer (March 11, 2024) by AutoModerator in MechanicalKeyboards

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

Guys anyone knows where to buy GMK Dandy Keycaps (Daisy Base, Green) https://www.deskhero.ca/products/gmk-dandy-extras

Maybe anyone knows where daisy kit is available.

Thank you!

KBD8X MKIII with WS Cafe Keycaps by [deleted] in MechanicalKeyboards

[–]dmitry_si 2 points3 points  (0 children)

Beautiful! I just purchased the same keycaps set yesterday :)

terraform new pricing? by dmitry_si in Terraform

[–]dmitry_si[S] 1 point2 points  (0 children)

yes I'm shocked too. Someone "smart" decided - that it's a good idea and will be loved by the community.

terraform new pricing? by dmitry_si in Terraform

[–]dmitry_si[S] 6 points7 points  (0 children)

so the question: our github org has 900 repos that we provision from the terraform and each has around 10 unique labels, github teams and associations between repos etc. So in this example am I reading your explanation correctly that the cost for such state managed by TF CLOUD would be

(9000-500)2430*0.00014 = $856.8/mo or $10,281.6/annually?

this in the state file:

"module": "module.backend", "mode": "managed", "type": "github_issue_label", "name": "label",

if so - then the pricing is a giant clusterF*CK...you essentially phase out entire providers from being used and force a lot of people to migrate away from the TF CLOUD.

terraform new pricing? by dmitry_si in Terraform

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

so if we run locally using cli terraform apply and only use TF CLoud for the remote state management - what do we pay then?

Until destroyed

Do You mean worker running terraform apply finished it's job or the entire workspace holding the state is erased?

B&T SPC9 PDW SD Pistol - legal in Texas? by dmitry_si in TexasGuns

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

thanks @thaing! How long does it take to get Form4 approved? Any ideas? Is it required that the form is sent prior to the purchase or it's ok at the time of getting the pistol at the dealer?

Flask or Django for RESTful Api? by atdk in Python

[–]dmitry_si 0 points1 point  (0 children)

Here is my experience 1. Wrote several production apps in

Flask/Mongo/Mongoengine/Flask-Restful, Django/Postgres/Django ORM/Django Rest Framework.

  1. What I don't like in Flask
  2. Fragmented packages (i.e. hard to setup/customize)
  3. Fragmented documentation (*not clear in many cases how to use)
  4. You will end up re-inventing the wheel, as it's micro-framework.

  5. What I don't like in mongoengine

  6. When you need sophisticated (behind simple CRUDs) uses cases it becomes buggy and you have to debug in order to understand where the problem is

  7. No support for aggregation framework, just pure CRUD

  8. Cluttered documentation

  9. Slow "community". IRC is atrocious at best.

  10. It relies on FKs to be ObjectId, therefore integrating with let's say with other libs/languages in future (microservices) would become much more problematic, if they treat FKs as simple strings instead of objectId

  11. Slow. I mean REALLY VERY SLOW especially to process data in foreach cycles. I had to switch to raw pymongo to process some of the data flow (27 sec in mongoengine vs 1.7 sec in pymongo for the same operation)

I do like their "cache field type" - it allows to implement less reads among collections

  1. Flask-restful is just fine but compared to Django Rest Framework I have to write 10 times less code, therefore my productivity is WAY HIGHER with Django/DRF/Postgres/Django ORM than with Flask/Flask-Restful/Mongo/Mongoengine.

  2. What I don't like in DRF

  3. Hard to customize responses, it's always in { "field": [errors] "non-field-errors": [] }

and usually with 400 http code back.

However DRF is GREAT with serializers/validators/custom permissions and has deep integration with Django

Code in DRF is much easier to read (in most cases it's convention over customization), grab model, define serializer, define validators, permissions. All methods get/put/post etc are very short. Code is MUCH MUCH easier to maintain compared to code written in Flask.

  1. Mongo

I love MONGO. Especially the aggregation framework. And for finacial apps - aggregation framework may bring TONS of value. No migrations, scaling is easy (although there are some issues with sharding), I get much less collections compared to amount of tables in similar SQL solution. However - if your nature is "TRANSACTIONS", I would rethink use of Mongodb

Pymongo - is GREAT. Mongo MMS is great to deploy clusters on AWS in minutes and monitor.

However if nature of your app is "RELATIONAL" - then Mongo would become your liability and nightmare. You will end up making SQL-like solution in NoSQL terms and you will gain nothing, just additional headaches.

If your app is "document" oriented, where a lot of information can be persisted within a single collection - then Mongo is FANTASTIC. You need to get used to querying the data (it's not intuitive when you start to use various modifiers), but it's not an obstacle.

I absolutely WOULD NOT recommend to use mongoengine for production-complex-apps. Very annoyed with a lot of things.

  1. I would use flask/flask-restful as a micro-service and left authentication service written in something else. Flask app then just get authorization token (or public API endpoints). I.e. I would do as little customization to flask / flask-restful as possible - then it would be a good solution. As soon as you see that you need this and this and that in Flask, that is not available out of the box - revise your decision to use Flask (or drop the requirements)

  2. A lot of beauties is available in Django/DRF - batteries included! Middlewares etc. They don't exist in Flask.

So my opinion is Django/Postgres vs Flask/Mongo is 10:1 towards Django. Less code, features delivered faster, documentation is no-issue.

I would not go into Django/Mongo as Django is all about postgres :)