---
# System prepended metadata

title: Programming Languages

---

# Programming Languages

- Datetime in C, C++, JS, Python, Go
- SQL, CQL
- CodeQL

---
[TOC]

# C++

- [Self-Study Plan for Becoming a Quantitative Developer](https://www.quantstart.com/articles/Self-Study-Plan-for-Becoming-a-Quantitative-Developer/)
- [QuantLib](https://quantlib-python-docs.readthedocs.io/en/latest/)
- std::function
- inheritence
- template meta programming
- raw string
- utf-8
- datetime
- gsl, e.g., `gsl::narrow_cast`
- [Prefer uniform initialization](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es23-prefer-the--initializer-syntax)
- type erasure
- https://stlab.cc/

## Computer Science impact on other Sciences

[*Ten computer codes that transformed science*, Nature](https://www.nature.com/articles/d41586-021-00075-2)

Linux is free and performant that are run atop of most number-crunching servers.
C/C++/Fortran underpins almost all software implementations.
Then, Matlab/Python/R/Mathematica exposes the underlying implementations in the face of domain-specific languages.

[*Four tools that help researchers working in collaborations to see the big picture*, Nature](https://www.nature.com/articles/d41586-020-01918-0)

> The social connection between the tool and the team is a person who consistently makes that connection.

> Jira is more accessible for people who do not have experience in developing software.
> What is found most useful is the ability to create personal filters allowing one to see only the tickets that are most relevant to one.

1. Trello
2. Jira
3. Asana
4. GitHub projects (plus ZenHub for GitHub issues)
- [Kanban board explained by Atlassian](https://www.atlassian.com/agile/kanban/boards)

[*GitHub Projects or Trello? What is your thing?*, dev.to](https://dev.to/room_js/github-projects-or-trello-what-is-your-thing-2hbj)

1. [Quire](https://quire.io/)
2. [Things](https://culturedcode.com/things/)
3. [Clubhouse](https://clubhouse.io/)
4. [GitKraken](https://www.gitkraken.com/boards)
5. [MeisterTask](https://www.meistertask.com/), **beautiful website**


## Effective Modern C++

*Effective Modern C\++: 42 Specific Ways to Improve Your Use of C\++11 and C\++14*, Scott Mayers -- Recommended by Herb Sutter and Andrei Alexandrescu!

- braced initialization
- noexcept
- perfect forwarding
- smart pointer
- std::move, std::forward, rvalue, references, universal references
- std::atomic v.s. volatile
- reinterpret_cast
- inheritance lattice
- std::regex

[Modern C++ Design Patterns](https://cppcon.org/class-2020-modern-cpp-design/)

[The Definitive C++ Book Guide and List, StackOverflow](https://stackoverflow.com/a/388282)

## Types

- [Type](https://en.cppreference.com/w/cpp/language/type)
- [Value categories](https://en.cppreference.com/w/cpp/language/value_category)

## Problems

- https://developers.google.com/edu/c++
- https://cppquiz.org/quiz/question/52
- https://cppquiz.org/quiz/question/41
- https://cppquiz.org/quiz/question/233
- https://cppquiz.org/quiz/question/230
- https://cppquiz.org/quiz/question/284
- https://cppquiz.org/quiz/question/157

## Caveats

- nested class data access
    > standard $11.7.1
    > 
    > "A nested class is a member and as such has the same access rights as any other member.
    > The members of an enclosing class have no special access to members of a nested class; the usual access rules shall be obeyed"
    >
    > and the usual access rules specify that:
    > 
    > "A member of a class can also access all the names to which the class has access..."
    -    More [details](https://stackoverflow.com/a/5013735) regarding history.
    -    ++What about a twice nested inner class?++
- A union can't store a reference. A union also doesn’t support inheritance. That means you can't use a union as a base class, or inherit from another class, or have virtual functions.  
    [source](https://docs.microsoft.com/en-us/cpp/cpp/unions?view=msvc-160#:~:text=a%20union%20can't%20store%20a%20reference.%20a%20union%20also%20doesn%E2%80%99t%20support%20inheritance.%20that%20means%20you%20can't%20use%20a%20union%20as%20a%20base%20class%2C%20or%20inherit%20from%20another%20class%2C%20or%20have%20virtual%20functions.)
- The access control applied to virtual functions is determined by the type used to make the function call.  
    [source](https://docs.microsoft.com/en-us/cpp/cpp/member-access-control-cpp?view=msvc-160#:~:text=the%20access%20control%20applied%20to%20virtual%20functions%20is%20determined%20by%20the%20type%20used%20to%20make%20the%20function%20call.)
- Conversion to a private base class type is acceptable only for pointers to immediate derived classes.  
    [source](https://docs.microsoft.com/en-us/cpp/cpp/member-access-control-cpp?view=msvc-160#:~:text=conversion%20to%20a%20private%20base%20class%20type%20is%20acceptable%20only%20for%20pointers%20to%20immediate%20derived%20classes.)
    - Also, members and friends of a derived class `T` can convert a pointer to `T` to a pointer to a private direct base class of `T`.
    - ++Is there a way to sidestep this?++
- https://isocpp.org/wiki/faq/strange-inheritance
- [object slicing](https://stackoverflow.com/questions/59311771/pass-by-value-an-object-in-context-of-inheritance-in-c)
- https://docs.microsoft.com/en-us/cpp/cpp/member-access-control-cpp?view=msvc-160#:~:text=the%20allocation%20of%20storage%20for%20objects%20of%20class%20types%20is%20implementation%20dependent%2C%20but%20members%20are%20guaranteed%20to%20be%20assigned%20successively%20higher%20memory%20addresses%20between%20access%20specifiers.