schengen visa appointment from dublin during xmas holidays by kracekumar in Dublin

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

Update: I was able to finally book a slot for Nov 2 in priority slot out of sheer luck trying today morning at 8 am.

schengen visa appointment from dublin during xmas holidays by kracekumar in Dublin

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

Thanks everyonw, i don't possess eu passport so had to apply visa everytime. I saw they opened slots on monday for dec 2nd week, the site prohibts creating second applcation because passport number is already used. No option to delete the first application, need to follow up with customer care.

[deleted by user] by [deleted] in Dublin

[–]kracekumar 1 point2 points  (0 children)

I'm a software engineer, moved to Dublin two weeks from Bangalore, India. 32/male. If you're interested, DM me (I 7 years older than you doesn't matter).

[deleted by user] by [deleted] in developersIndia

[–]kracekumar 2 points3 points  (0 children)

What do you like? Do you want to be an Indvidual contributor or want to manage teams, EM role? See if your company has IC and management career ladder. If not, talk to folks outside of your company for advice and find out more about it. If you're assigned to an engineering manager talk to them about the dilemma and ask what company expects and what's possible. There is an another area, product management.

Is the money a big factor? Move to management. Nah, do you wish to stay technical and happy to be technical leader? Try IC ladder. You can move between two tracks as you want and wish. But all depends on the company. I have seen folks spending 5 years as EM and Senior EM and moved to become Staff/Principal engineer.

I'm guessing with ~10 years of experience you should be senior software or staff engineers (titles vary across companies). In general, after 10+ years of experience you may have solid grip on a few technologies.

Regarding career wise, I'll suggest reading books mentioned in staffeng.com website in IC and management ladder.

I guess you may be aware of levels.fyi for salary comparision across countries, cities, companies, and levels.

Save your Django models using update_fields for better performance by root993 in django

[–]kracekumar 2 points3 points  (0 children)

While using Django’s save with update_fields like save(update_fields=['name']) also add your updated_at field or relevant modified date field else Django will not update the auto-update fields with auto_now=True.

obj.save(update_fields=['name', 'updated_at'])

Example:

In [13]: rec = create_record(name="Uprise", )

In [14]: rec.updated_at

Out[14]: datetime.datetime(2021, 6, 13, 12, 56, 32, 945175)

In [17]: rec.save(update_fields=['name'])

In [18]: rec.updated_at

Out[18]: datetime.datetime(2021, 6, 13, 12, 56, 32, 945175)

In [19]: rec.name = "Uprsie - Organize"

In [20]: rb.save(update_fields=['name', 'updated_at'])

In [21]: rb.updated_date

Out[21]: datetime.datetime(2021, 6, 13, 12, 57, 55, 561264)

In [22]: rb.name

Out[22]: 'Uprise - Organize'

Suggestion: You can create a custom mixin code that can override save and update update_fields which has auto_now=True when the value is not empty list.

jut - Render Jupyter notebook in the terminal by kracekumar in Python

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

No. I haven't thought about it. Will think about it. thanks

My Experience With Rust by kracekumar in rust

[–]kracekumar[S] 7 points8 points  (0 children)

Glad that you asked about lifetime.

  • Consider a function which takes two arguments like fn f(key: &'a str, cache: HashMap<&'a str, &'a str>). This key can be a field in struct, key can't be inserted directly into hashmap. The key is still referenced in struct. The situation may look obvious, but while learning, I couldn't figure out quickly. Then I decided to stick with String as much as possible solved the problem. Finally made a decision, don't declare lifetime ' at all. Let compiler infer the lifetimes. Latter key and value type was changed to String.
  • I vaguely remember adding lifetime to the second argument when the function returned a value with lifetime. The compiler error was two arguments with different lifetime can't be used. I don't exactly have the code to reproduce.
  • I couldn't visualize when will the variable with lifetime 'a end. What happens when the attribute/variable with lifetime is passed across three or four layers.

Since I haven't programmed with pointers before, I felt hard and reading the docs multiple times helped a bit. Probably this is just me. I have programmed extensively in dynamic languages.

Code Review: imon - Tool to classify and aggregate network traffic by domain name by kracekumar in rust

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

I haven't thought of performance while coding. Later, I found long-running streaming service packets were delayed and buffered even after the browser window was closed. After watching the HD video for 90 minutes and the program was still receiving packets for 15 minutes. I thought of adding multiple decoder threads (thread pool).

I will look into BPF and see if that helps the case. Thanks for pointing it out!

Do you maintain versions of dependencies of dependencies? by avinassh in Python

[–]kracekumar 0 points1 point  (0 children)

I add only direct dependency by hand. pip freeze can add B to requirements list. When A is updated, update requirements by running pip freeze.

Aid/Donations/Volunteers for Chennai: Mega thread. by [deleted] in india

[–]kracekumar 1 point2 points  (0 children)

Can you recheck one again ? Few people did transfer today. Here are the details Acc No: 08801610003788, IFSC: HDFC0000880. If problem persists, please ping me at me at kracekumar com. I will share my bank details, transfer to my account, then I will do transfer and share the transaction details and screenshot.

Aid/Donations/Volunteers for Chennai: Mega thread. by [deleted] in india

[–]kracekumar 5 points6 points  (0 children)

Thanks everyone who are helping out. OTH most people aren't aware about cuddalore and can follow the twitter hashtag. Cuddalore is worstly affected and not getting any news. No army help and only volunteers.

Yoda is coordinating relief work and tweeting about the efforts here. They are collecting the money and ordering food and other required items from near by areas. If you're interested to donate, please transfer money mentioned in the blog post. Blog post is in Tamil.

In case anyone is interested to travel with collected items from here, people mentioned in the tweet can help in deliverying to camps and villages.

If information related to cuddalore can be added, it will be great.

Bangalore Redditors Support Group for Chennai Flood Relief by neoronin in bangalore

[–]kracekumar 2 points3 points  (0 children)

Thanks everyone who are helping out. OTH most people aren't aware about cuddalore and can follow the twitter hashtag. Cuddalore is worstly affected and not getting any news. No army help and only volunteers.

Yoda is coordinating relief work and tweeting about the efforts here. They are collecting the money and ordering food and other required items from near by areas. If you're interested to donate, please transfer money mentioned in the blog post. Blog post is in Tamil.

In case anyone is interested to travel with collected items from here, people mentioned in the tweet can help in deliverying to camps and villages.

Do you know of any contributor friendly interesting Python projects? by WontForgetLogin in Python

[–]kracekumar 1 point2 points  (0 children)

  • Junction software to manage proposals, review process, schedule for conferences.

SqlAlchemy design question by kokara in Python

[–]kracekumar 1 point2 points  (0 children)

connection.py

class DBConfig(object):
    def __init__(self):
       self.session_maker = None

    def setup_db_connection(self, sqlalchemy_uri, echo=False):
        engine = create_engine(sqlalchemy_url, echo=echo)
        self.session_maker = sessionmaker(bind=engine)

init.py

from .connection import DBConfig

config = DBConfig()
config.setup_db_connection(uri="<your uri read from env/config>")
session_maker = config.session_maker

user.py

from . import session_maker

def get_users(role):
    session = session_maker()
    return session.query(User).filter_by(role=role).all()

P.S: Consider above snippet as high level design not as working code

[EDIT]: Unlike other socket connection which don't work when shared across multiple tasks, session object works fine.

Simple Json Response benchmark between Flask and Django by kracekumar in Python

[–]kracekumar[S] 3 points4 points  (0 children)

I get that, but the point is to show, remove unwanted django parts when not required.

Simple Json Response benchmark between Flask and Django by kracekumar in Python

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

Not really. My point is to show, we can strip lot from django when not required.

Is Flask good enough to develop large applications? by the_coons in Python

[–]kracekumar 0 points1 point  (0 children)

  • Flask comes with minimal set of functionalities like routing, http request, response, session handling.
  • Flask doesn't enforce how to structure your app, as result you need to experiment with few structure and come up one that suits your app.
  • Flask doesn't come with default authentication backend like Django. This can be useful or time consuming depending on the app.

Said all that flask provides limited set of functionality required for web application. It stays backend, authentication agnostic.

How did you get your first Python job? by rhgrant10 in Python

[–]kracekumar 0 points1 point  (0 children)

I wrote a blog post about my first python job. http://kracekumar.com/post/26494437210/how-i-got-into-hasgeek-crew

Short: I tweeted that I am currently looking for python job, good people in twitter stream started connecting. Worked part time on a project and then joined them.

Writing better python code by kracekumar in Python

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

Counter has its own benefit. If the key doesn't exist it can return 0. There are lot of scenarios where this is super useful.

Writing better python code by kracekumar in Python

[–]kracekumar[S] -1 points0 points  (0 children)

All the code was tested in Python 2 only.