So if you were to go through the Ultimate Rewards portal to one of those sites and then buy gift cards online with your Ink Bold or Plus, not only would you be earning 5X points per $1, but you’d also be earning an additional 2-3 points depending on the merchant for a total of up to 8 Ultimate Rewards points per dollar, which is an amazing value.
Beauty Is Only Chrome Deep (Visceral)
The Nest looks pretty on my wall, especially as opposed to its old, utilitarian-looking predecessor. The physical appearance may win every beauty contest, but
Beauty Is Only Chrome Deep (Visceral)
The Nest looks pretty on my wall, especially as opposed to its old, utilitarian-looking predecessor. The physical appearance may win every beauty contest, but if I can’t do what I want with it, then it’s art not design.
if I can’t do what I want with it, then it’s art not design
Rule of Thumb 1: Use Character Keys For Reference Tables
We can now see the surprising fact that the integer keys will slow us down in many situations. Not only do they have no performance advantage, but they actually hurt performance. The reason is because they require joins on almost every query. A 3-table query with two joins will always be much slower than a 1-table query with no joins. If you are using an ORM system that does not do JOIN's, but instead does separate fetches, then you have 3 round trips to the server instead of 1, and heaven forbid you have queries in a nested loop, the performance will simply crash and burn. All of this is kind of ironic since you so often hear people blindly repeat the dogmatic phrase "We will use integer keys for performance reasons..."
If you are following these rules of thumb closely in your project then it is important not to use the object id as a primary key, and therefore you may never use it as a foreign key either. If you use an object id as the primary key then you lose a lot of the benefits of the character keys listed above.
Absolute Rule 2: No Magic Values
Another rule that I follow is to absolutely never have magic values. A magic value is a value in a column that causes some non-obvious result. I have included this is in this essay because most programmers who break this rule do so by hard-coding special actions to occur based on values of keys in reference tables and master tables.
An example might be a table of teachers, where one of the teacher values is something like "SUBSTITUTE", and the program is hardcoded to do a lot of different things when it sees this value. Magic values are bad because the code is harder to debug. It may not be obvious to a programmer that some special value of the TEACHER column would cause special actions to occur. But if you have a column called FLAG_SUBSTITUTE then any programmer who must maintain code written by somebody else will have a much easier time of it.
Magic numbers also confuse end-users. It may seem obvious to us that the value "SUBSTITUTE" in the teacher column means substitute, but if this value causes other things to occur, and we are in the regular habit of having these values in lots of tables, then the compound effect can be lots and lots of phone calls from confused users, and big trouble for the software developer's bottom line.
Finally, magic numbers limit you. If you use the value "SUBSTITUTE" as a single teacher in the teachers file, then how do you keep track of the dozen-odd substitutes the school may hire in a year? The end-user is stuck here, they must use pen and paper. It is much better to allow them to enter the substitute as a regular faculty member with a FLAG_SUBSTITUE column to check off.
In a table definition I reference the primary key of another table. That > key is of datatype SERIAL. In the referencing table, do I define the column > as > > col_name INTEGER REFERENCES other-table (primary_key_field), > > or is the datatype SERIAL because that's what the referenced > primary_key_field is?
Serial is a psuedo type to integer/big (depending on the type of serial). What you have above should work fine.
pkeyfor a Primary Key constraint
keyfor a Unique constraint
exclfor an Exclusion constraint
idxfor any other kind of index
fkeyfor a Foreign key
checkfor a Check constraint
seqfor all sequences
The standard names for indexes in PostgreSQL are:
where the suffix is one of the following:
Standard suffix for sequences is
Values of type character are physically padded with spaces to the specified width n, and are stored and displayed that way.
The storage requirement for a short string (up to 126 bytes) is 1 byte plus the actual string, which includes the space padding in the case of character.
Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.
Unique Primary Key Names
As mentioned above use <tablename>_ID for numeric keys. By doing this, every primary key has a unique name. This has several advantages, but the main one is in foreign key referencing.
json.loads() -->Will take a JSON String & Turn it into a python dict
Alternatively, if you want to use different configuration files on a per project basis, you should know that if there is a file called
pylintrc(without a leading dot) in the current working directory, then Pylint will use this one. If there is a file called
__init__.pyin the current working directory, Pylint will look in the parent directory until there is no such file and then look for a
pylintrcconfiguration file. This is done so that you can maintain a per project config file together with you source code, and lauch Pylint from any directory in your source tree.
The codetags of interest are listed below, using the following format:recommended mnemonic (& synonym list)canonical name: semantics
- TODO (MILESTONE, MLSTN, DONE, YAGNI, TBD, TOBEDONE)
- To do: Informal tasks/features that are pending completion.
- FIXME (XXX, DEBUG, BROKEN, REFACTOR, REFACT, RFCTR, OOPS, SMELL, NEEDSWORK, INSPECT)
- Fix me: Areas of problematic or ugly code needing refactoring or cleanup.
- BUG (BUGFIX)
- Bugs: Reported defects tracked in bug database.
- NOBUG (NOFIX, WONTFIX, DONTFIX, NEVERFIX, UNFIXABLE, CANTFIX)
- Will Not Be Fixed: Problems that are well-known but will never be addressed due to design problems or domain limitations.
- REQ (REQUIREMENT, STORY)
- Requirements: Satisfactions of specific, formal requirements.
- RFE (FEETCH, NYI, FR, FTRQ, FTR)
- Requests For Enhancement: Roadmap items not yet implemented.
- Ideas: Possible RFE candidates, but less formal than RFE.
- ??? (QUESTION, QUEST, QSTN, WTF)
- Questions: Misunderstood details.
- !!! (ALERT)
- Alerts: In need of immediate attention.
- HACK (CLEVER, MAGIC)
- Hacks: Temporary code to force inflexible functionality, or simply a test change, or workaround a known problem.
- PORT (PORTABILITY, WKRD)
- Portability: Workarounds specific to OS, Python version, etc.
- CAVEAT (CAV, CAVT, WARNING, CAUTION)
- Caveats: Implementation details/gotchas that stand out as non-intuitive.
- NOTE (HELP)
- Notes: Sections where a code reviewer found something that needs discussion or further investigation.
- Frequently Asked Questions: Interesting areas that require external explanation.
- GLOSS (GLOSSARY)
- Glossary: Definitions for project glossary.
- SEE (REF, REFERENCE)
- See: Pointers to other code, web link, etc.
- TODOC (DOCDO, DODOC, NEEDSDOC, EXPLAIN, DOCUMENT)
- Needs Documentation: Areas of code that still need to be documented.
- CRED (CREDIT, THANKS)
- Credits: Accreditations for external provision of enlightenment.
- STAT (STATUS)
- Status: File-level statistical indicator of maturity of this file.
- RVD (REVIEWED, REVIEW)
- Reviewed: File-level indicator that review was conducted.
A natural person who exercises investment discretion over his or her own account is not an institutional investment manager.