feedback needed on c# data access library for mongodb

i just pushed out v3.1 of MongoDAL which is a simplified data access layer wrapped around the mongodb c# driver.

the api is quite easy to use compared to the official driver. an example query would look as simple as follows:

var author = (from a in DB.Collection<Author>()               where a.Name.Contains("Eckhart")               select a).FirstOrDefault(); 

could you possibly have a play with it and see if everything is as it should be or if there are any code smells or something i’ve gotten wrong with the functionality?

would be great if you could test with some large datasets to see if there are any performace issues, etc.

any and all feedback, suggestions, criticism are welcome 🙂

cheers!

Feedback on website: satistime.com

I launched my product Satistime and would love to hear your feedback on the website (satistime.com).

Satistime is an online to do list + calendar + goal planner/tracker all in one. My goal was to create a tool that streamlines the whole process from goal setting to daily routine – all the while being lightweight and easy to use.
I want to make sure the website communicates the features and the end benefit clearly to target market. Thank you!

here is my code! and it works but I’m not sure if it’s written right so I want some feedback

I wrote this code and it works but I’m really not sure if it’s written without any weird parts. So I want your feedbacks. I will really appreciate all your comments. thanks!

Operation description : the questions are being showed in the console tap with player’s score. it’s questioning by prompt continually until the prompt input gets ‘exit’. If the answer for each question is right then player’s scores are counting up. but if not then it shows the same question over and over until the answer is right.

var Question = function(question,answers,correctAnswer){   this.question = question;   this.answers = answers;   this.correctAnswer = correctAnswer; } Question.prototype.score = 0; Question.prototype.playersAnswer;  Question.prototype.logAll = function(){   console.log(this.question);   for(var i = 0; i < this.answers.length; i++){     console.log(i + " : " + this.answers[i]);   } } Question.prototype.askQuestions = function(){     Question.prototype.playersAnswer = prompt(this.question); } Question.prototype.checkIfRight = function (){   if(this.correctAnswer === Question.prototype.playersAnswer){     console.log("Correct Answer!");     Question.prototype.score++;     Question.prototype.logScore();   }   else if(Question.prototype.playersAnswer === "exit"){return 0;}   else {     console.log("Wrong! Try again :)");     Question.prototype.logScore();     return 'w';   } } Question.prototype.logScore = function(){   console.log("Your Score : " + Question.prototype.score   + "\n---------------------------------"); }  var q1 = new Question('What is the name of the course\'s teacher?',['John','Baek','Jonas'],'2'); var q2 = new Question('Is JavaScript the coolest language in the world?',['Yes','No'],'0'); var q3 = new Question('What language are you gonna learn about after?',                       ['C++','C','Java','Python','Node.js'],'4'); var questions = [q1,q2,q3]; function init(){   var n = Math.floor(Math.random() * 3);   questions[n].logAll();   questions[n].askQuestions();   questions[n].checkIfRight();  }  do {   var n = Math.floor(Math.random() * 3);   questions[n].logAll();   questions[n].askQuestions();   while(questions[n].checkIfRight() === 'w'){     questions[n].logAll();     questions[].askQuestions();   }; } while (q1.playersAnswer !== "exit"); 

Feedback on Object-Oriented ETL Class Structure for Computing Profit Summary Data

How can the structure of the class below be improved?

I am using Python3 and pandas 0.24.2 to do some data processing and ETL flows. I have followed this pattern a couple of times and it is really bothering me but I am not sure which direction to go to majorly improve it. Any advice for what to do differently is greatly appreciated. This is a toy example but the logic is the same. The main method is below.

import pandas as pd from collections import deque from collections import defaultdict from collections import namedtuple from src.query_helper import postgres_query_helper as pgqh  class ComputeNetProfitSummary():     def __init__(self, date=None, factory_id=None):         self.date = date         self.factory_id = factory_id         self.pg_query_helper = pgqh.PostgresQueryHelper()      def build_sql_query(self):         sql_query = f"""Select * FROM factory_table             WHERE date='{self.date}'              AND factory_id={self.factory_id}         """         return sql_query      def create_orders_df(self):         """Create orders Data Frame"""         if self.date and self.factory_id:               sql_query = self.build_sql_query()                    df = self.pg_query_helper.execute_sql_return_df(sql_query)             return df      def compute_complex_metrics_on_df(self):         """Some complicated logic using FIFO attribution"""         ComplexData = namedtuple('ComplexData', ['ColumnNamesA', ..., 'ColumnNamesZ'])               all_data = []            for row in self.orders_df.iterrows():             """Do complicated stuff"""             transform_row = # some computations on row             complex_output = ComplexData(transform_row)             all_data.append(complex_output)          complex_df = pd.DataFrame(all_data)         return complex_df       def compute_summary_statistics(self):         """Compute summary data"""         summary_data = defaultdict(dict)         # Create summary data, I am fine with this         return summary_data       def compute_summary_data(self):         self.orders_df = self.create_orders_df()         self.complex_df = compute_complex_metrics_on_df()         self.summary_statistics = compute_summary_statistics()  if __name__ == '__main__':     cnp = ComputeNetProfitSummary(date='2019-01-01', factory_id='A')      summary_data = cnp.compute_summary_data()      for key, value in summary_data.items():         print(key)         print(value)  

NOTE: I am one of the only Python developers on my team so I do not get a lot of feedback on this type of code very often. Any feedback or constructive criticism is welcome, from design patterns to PEP8.

Golang RESTful HTTP API – would appreciate feedback

Link to the repo on GitHub

// Server is a RESTful HTTP API server offering CRUD functionality to store Payments. type Server struct {     Router  *httprouter.Router     Storage storage.PaymentStorage } 

Documentation with more details is here.

My remaining TODO list looks like this, in no particular order:

  • Increase test coverage
    • Make sure the input/output JSON formatting aligns 100% with the docs
  • Implement Mongo PaymentStorage
  • Fuzz testing
  • Dockerise
    • Terraform a GCP deployment (using App Engine custom runtimes)
  • Versioning (prefix ‘/payments’ -> ‘/v1/payments’)

Would gladly welcome any feedback, thoughts, constructive criticism, etc that anyone is willing to volunteer!

Feedback on Sensitive Data Protection [on hold]

I’m a UX designer currently working on sensitive data protection. We’re looking for people to provide their experiences and opinions about sensitive data protection in various paid studies. Types of studies could include surveys, interviews, or other general feedback.

If you’re interested, visit the link below to sign up and I’ll be in touch when we get our studies going. https://docs.google.com/forms/d/e/1FAIpQLSckJ0BgK6V-Q4VRIs6z45pHEyhNLG6P2cuGdHkrUqKVZMPadw/viewform?usp=sf_link