ComputerScientist
For every unformalized general problem there is a set of informal specific problems that if they become formalized, sufficiently lead to said generalization.
“By a small sample we may judge of the whole piece.”
— Miguel de Cervantes
— Miguel de Cervantes
“Using case-insensitive filenames and commands is an act of evil and the sinners must be punished with deprecation.”
— the semicolon
— the semicolon
“Chuck's greatest contribution was teaching that understanding and simplifying the problem was far more effective than adding complexity to a solution.”
— massung, GitHub comment
— massung, GitHub comment
How to keep your code clean
• Modularize: break it down to pieces that make sense alone and may be reused elsewhere
• Have general conventions for naming files, modules, functions, variables, etc.
• Document everything: write comments, docstrings and function helplines
• Keep performance in mind: free files, resources and dynamic memory
• Abstain from repeated code: use procedures and functions instead
• Keep your code readable using indentation and alignment
• Keep global variables to a minimum by using singletons
• No surprises: handle exceptional cases
• Modularize: break it down to pieces that make sense alone and may be reused elsewhere
• Have general conventions for naming files, modules, functions, variables, etc.
• Document everything: write comments, docstrings and function helplines
• Keep performance in mind: free files, resources and dynamic memory
• Abstain from repeated code: use procedures and functions instead
• Keep your code readable using indentation and alignment
• Keep global variables to a minimum by using singletons
• No surprises: handle exceptional cases
A worthy abstraction is one which is achieved through introducing little indirection.
Following standards while fixing a bug prevents future bugs and a messy codebase.
“I don't think in any language. I think in images. I don't believe that people think in languages. They don't move their lips when they think. It is only a certain type of illiterate person who moves his lips as he reads or ruminates. No, I think in images, and now and then a Russian phrase or an English phrase will form with the foam of the brainwave, but that’s about all. ”
— Vladimir Nabokov, Strong Opinions (1973)
— Vladimir Nabokov, Strong Opinions (1973)
Mathematics is often an inappropriate approach for solutions, but almost always the one used.
ODBC
Open Database Connectivity is an API for DBMSs which achieves DBMS-independence by using drivers that encapsulate the logic of translation. An application connects to an ODBC driver through
the ODBC driver manager, then sends ODBC functions which the driver translates and passes to the DBMS. An ODBC driver enables an ODBC-compliant application to access a data source,
normally a DBMS.
Drivers exist for major DBMSs:
• Oracle
• PostgreSQL
• MySQL
• Microsoft SQL Server
• Sybase ASE
• SAP HANA
• DB2
and various other non-DBMS data sources:
• Microsoft Excel
• plain text
• CSV
Drivers
ODBC drivers encapsulate 3 broad categories of functions:
1. finding, connecting to and disconnecting from the DBMS that the driver talks to
2. send SQL commands from the ODBC system to the DBMS, converting or interpreting any commands that are not supported internally.
3. convertion of data from the DBMS's internal formats to a set of standardized ODBC formats, which are based on the C language formats.
Drivers of different technologies may implement either more or less than all functionalities defined in the ODBC standard.
Open Database Connectivity is an API for DBMSs which achieves DBMS-independence by using drivers that encapsulate the logic of translation. An application connects to an ODBC driver through
the ODBC driver manager, then sends ODBC functions which the driver translates and passes to the DBMS. An ODBC driver enables an ODBC-compliant application to access a data source,
normally a DBMS.
Drivers exist for major DBMSs:
• Oracle
• PostgreSQL
• MySQL
• Microsoft SQL Server
• Sybase ASE
• SAP HANA
• DB2
and various other non-DBMS data sources:
• Microsoft Excel
• plain text
• CSV
Drivers
ODBC drivers encapsulate 3 broad categories of functions:
1. finding, connecting to and disconnecting from the DBMS that the driver talks to
2. send SQL commands from the ODBC system to the DBMS, converting or interpreting any commands that are not supported internally.
3. convertion of data from the DBMS's internal formats to a set of standardized ODBC formats, which are based on the C language formats.
Drivers of different technologies may implement either more or less than all functionalities defined in the ODBC standard.
Which loop do you find the most useful?
Anonymous Poll
21%
while condition
17%
classic for, ranged for
13%
for each element in collection
21%
apply (Haskell's fmap, Python's map)
8%
while true, loop forever
8%
do until condition
12%
repeat n