Software engineering facts, information, and skills from July, 2019

Defining and sending django signals

Priya Philip 1 day, 1 hour ago

Defining signals

class Signal(providing_args=list)

All signals are  django.dispatch.Signal instances. The providing_args is a list of the names of arguments the signal will provide to listeners. This is purely documentational, however, as there is nothing that checks that the signal actually provides these arguments to its listeners.

Django Signals

Priya Philip 5 days, 2 hours ago

Django Signals allows decoupled (independent) applications get notified when certain events occur elsewhere in the framework with the help of 'signal dispatcher'.  The 'signal dispatcher' is  Django's mechanism used  to send and receive messages between different parts of an application which are instances of Signal, via the connect method.


HttpRequest methods

Priya Philip 2 weeks ago
HttpRequest represents an incoming HTTP request, including all HTTP headers and user-submitted data

HttpRequest attributes

Priya Philip 2 weeks, 1 day ago

Django uses request and response objects to pass state through the system. When a page is requested, Django creates an HttpRequest object that contains metadata about the request. Then Django loads the appropriate view, passing the HttpRequest as the first argument to the view function. Each view is responsible for returning an HttpResponse object.

Merging two Dictionaries- Python

Priya Philip 2 weeks, 4 days ago

There are various ways in python to merge Dictionaries. Few of them are shown below.


Git aliases

Priya Philip 2 weeks, 6 days ago

The term 'alias' is synonymous with a shortcut. Alias creation is a common pattern found in other popular utilities like `bash` shell. Aliases are used to create shorter commands that map to longer commands. Aliases enable more efficient workflows by requiring fewer keystrokes to execute a command. 

Get a file's size with C++17

Priya Philip 2 weeks, 6 days ago

std:: experimental:: filesystem:: file_size

<filesystem> (added in C++17) makes this straightforward.

The as-if rule

Priya Philip 2 weeks, 6 days ago

Allows any and all code transformations that do not change the observable behavior of the program.

Wish to hire us?

We take the vision which comes from dreams and apply the magic of science and mathematics, adding the heritage of our profession and our knowledge to create a design.