Python “private” function coding convention

From Python’s Class module documentation: Private” instance variables that cannot be accessed except from inside an object don’t exist in Python. However, there is a convention that is followed by most Python code: a name prefixed with an underscore (e.g. _spam) should be treated as a non-public part of the API (whether it is a … Read more

Java Queues – why “poll” and “offer”?

Because these methods have different semantics explained in the JavaDoc. add/remove are unconditional while offer/poll return special value: offer only offers a new value, but it might not be accepted, e.g. if the queue is full poll only polls for the value, but we accept the fact the value might not be there. To complicate … Read more

Source control vs. Revision Control?

Revision Control is the more generic term, used for source-control tools but also for other tools (Word, OpenOffice, …). It references a version. Source Control offers revision control with branching and merging which are not always available in all revision tools (Word is not a Source Control, but offer revision control features) Version Control is … Read more

Folder naming convention for python projects

There are three conventions, which you might find confusing. The standard PEP8 defines a standard for how to name packages and modules: Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)