7 Disciplines

7.1 Keeping focus on results

Hacks to make one’s work effect-oriented and satisfying.

7.1.1 Qutebrowser

Configuration file of ~/.config/qutebrowser/config.py:

c.content.host_blocking.lists = [
  'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/social/hosts'
]

config.bind(',h', 'config-cycle -t -p content.host_blocking.enabled')

c.url.start_pages = ["about:blank"]

c.url.searchengines = {
  "DEFAULT": "https://google.com/search?q={}"
}

Setting the default search engine: :set url.searchengines '{"DEFAULT": "https://google.com/search?q={}"}'.

Save to Zotero with a press of the z key: bind the key z to the script using the following command called directly in Zotero:

bind z jseval javascript:var d=document,s=d.createElement('script');s.src='https://www.zotero.org/bookmarklet/loader.js';(d.body?d.body:d.documentElement).appendChild(s);void(0);.

7.1.2 Firefox

7.1.2.1 Clean browsing history and cache

Press: [Ctrl]+[Shift]+[Del].

7.1.2.2 Block obtrusive content

To block hot network questions, go to: uBlock Origin -> Open the dashboard -> Add a rule ###hot-network-questions -> click “Apply changes”.

More useful uBlock Origin filters:

! StackExchange Network
###hot-network-questions

! 4/27/2018, 1:08:35 PM https://medium.com/
! Medium Corporation subscription nag footer
##.js-stickyFooter

! 6/21/2018, 10:55:40 AM https://www.youtube.com/
! YouTube video related content
www.youtube.com###related

! 6/26/2018, 11:39:21 AM https://www.youtube.com/
! YouTube welcome page recommended rubbish
www.youtube.com###dismissable

You might find a network-wide ad-blocker useful. In such a case, see Why You Need a Network-Wide Ad-Blocker for the Pi-hole package.

7.1.2.3 Browsing

Browse tabs as a tree: https://github.com/piroor/treestyletab.

  • To toggle the sidebar, press [F1].

about:config settings for privacy and performance:

7.1.3 Fetch Web information through your terminal

7.1.3.1 Wikipedia

Search Wikipedia from terminal: wikit <query>; install with npm install -g wikit.

7.1.3.2 Google

Google quickly from command line

sudo add-apt-repository ppa:twodopeshaggy/jarun
sudo apt-get update
sudo apt-get install googler

$ googler <query>

7.1.3.3 Check your external IP

BLAZINGLY FAST, directly from your terminal emulator. We are ultra-grateful to Tomasz “Sztylet” for every minute we saved thanks to this.

$ curl ifconfig.co

7.1.3.4 Check weather via console

curl wttr.in/warsaw

7.1.3.5 Instant URLs

  • Google Feeling Lucky: http://google.com/search?btnI=1&q=<query>
  • Encyclopedia Britannica:
    • britannica.com/topic/<query>
    • https://www.britannica.com/search?query=<query>

7.1.4 Web browsers

7.1.4.1 Start in a private window

  • Firefox: firefox --private-window
  • Opera: opera --private

7.1.5 Filter copycat websites from search results

https://github.com/quenhus/uBlock-Origin-dev-filter

7.1.6 Smartphone SSH access

Connect to your phone via terminal with Termux:

ssh any_user_name@phone_ip -p 8022

7.2 Nature

Constraints we observe in nature.

7.2.1 Euler’s identity

“The most beautiful equation in mathematics”:

\[e^{i*pi} + 1 = 0\]

“like a Shakespearean sonnet that captures the very essence of love, or a painting that brings out the beauty of the human form that is far more than just skin deep, Euler’s equation reaches down into the very depths of existence

– Keith Devlin, Stanford, see Wikipedia

7.2.2 The Dirac Delta equation

\[(i * delta - m) * psi = 0\]

7.2.3 Gravity of a photon

\[R_{\mu\nu} - \frac{1}{2}Rg_{\mu\nu} + \Lambda g_{\mu\nu} = \frac{8\pi G}{c^4}T_{\mu\nu} \quad\quad\quad(1)\]

\[T^{\mu\nu} = \frac{1}{\mu_0}\left[F^{\mu\alpha}F^{\nu}{}_{\alpha} - \frac{1}{4} g^{\mu\nu}F_{\alpha\beta}F^{\alpha\beta} \right] \quad\quad\quad(2)\]

\[F^{\mu\nu} = \begin{bmatrix} 0 & -E^x & -E^y & -E^z \\ E^x & 0 & -B^z & B^y \\ E^y & B^z & 0 & -B^x \\ E^z & -B^y & B^x & 0 \\ \end{bmatrix} \quad\quad\quad(3)\]

Thus, equation (2) tells us how the electromagnetic fields we are familiar with, namely EE and BB, contribute to the energy density of a region of spacetime. Then equation (1) builds on that result to relate the electromagnetic fields to the curvature of spacetime, which as Einstein revealed, manifests as the gravitational field. So yes, the conventional electromagnetic fields, and the photons that constitute them, impact the gravitational field despite having no rest mass!

– James W. Kennington, “Gravity of a Photon”, https://jwkennington.com/blog/gravity-of-a-photon/

7.2.4 Weather forecasting

Meteo and awiacja.imgw are two places where pilots usually check the weather.

Info thanks to Dorota. Thank you, Dorota!

7.2.5 Greek alphabet

The twenty-four letters of the Greek alphabet are:

\[\alpha \beta \gamma\]

etc.

The full list is available here.

With their names:

Letter Spelling
A a

Source: https://en.wikipedia.org/wiki/Greek_alphabet

7.2.6 Calculus

The Toledan Tables, or Tables of Toledo, were astronomical tables which were used to predict the movements of the Sun, Moon and planets relative to the fixed stars. They were completed around year 1080 by a group of Arabic astronomers at Toledo, Spain.

https://en.wikipedia.org/wiki/Toledan_Tables

7.3 Mind: Develop better as a programmer

7.3.1 Retype instead of copy-pasting

I was able to quickly remember what I retyped before. Speeded up my work.

7.3.2 Assume responsibility

Take decisions fast and assume responsibility for yourself, your team and your client.

Stop worrying about future decisions and dive in. Make practice fun by treating new skills like toys. Find time to code by only making tiny commitments the way you would with sites like Facebook, YouTube, or Wikipedia. Slow down, take smaller steps, and you’ll learn faster.

More specifically:

  1. Don’t Let Future Decisions Stop You from Progressing Now,
  2. Don’t Let Confidence Trick You into Forgetting Things,
  3. Approach Practice with the Right Mindset,
  4. Find Time to Code Using the Facebook Trick,
  5. Think Slower and You’ll Learn Faster,
  6. Write Complex Code in Plain Language First.

– Yaphi Berhanu 20

7.3.3 Ignitory question

Am I inventing things to do to avoid the important?

– Tim Ferriss, “The 4-Hour Work Week”

7.3.4 Specify clear goals

Remember the SMART rule - a goal should basically be:

  1. Specific,
  2. Measurable,
  3. Ambitious,
  4. Relevant, and
  5. Time-bound.

7.3.5 Make growth a daily routine

  1. Start the day with 2-3 hours of deep work (see “Deep Work” by Cal Newport),
  2. Postpone checking your e-mail until near the end of the day.
  3. Conclude the day with a review of the day (see “Deep Work”) and a quick skim through the headlines on the Hacker News (optional; see “4-Hour Work Week” - news are not at all necessary to thrive, let alone to survive).

7.3.6 Understand what school is ‒ and what it isn’t

I always liked numbers, and patterns, and logic. Things are very black-and-white where there’s one right answer and everything else is wrong. I didn’t like subjective, shades-of-gray-type questions.

I would work on math workbooks for fun. If my parents wanted to shut me up, she would just give me a workbook and I’ll just go do sums and so forth.

I always liked mathematics competitions. Doing that was very different from doing research mathematics.

The type of problems that you’re given in a problem book are very canned problems, things you can do in five minutes, or ten minutes. They don’t prepare you completely for a research problem, where you have to spend six months, you have to read the literature, talk to people, try something: doesn’t work. Modify, try it again.

It’s a very different experience doing research, but I like it a lot better, actually, than all the puzzles I used to do as a kid. I don’t do these things very much anymore.

‒ Terry Tao 21

Terry Tao links to several articles from the menu on his website 22.

When you browse any article on that website, including the main page, you’ll see that list on the left.

John kept wondering: is this list that important that Terry would like a visitor to any of his subpages to see it?

He read one article and he realized: yes, it seems so.

The title of the article was “What You’ll Wish You’d Known”.

Reading that around the time he was preparing his master thesis, he understood a number of things.

If you haven’t read it yet, he would highly recommend it, just like Terry does.

Afterwards, you will never look at education the same way.

I’ll start by telling you something you don’t have to know in high school: what you want to do with your life. People are always asking you this, so you think you’re supposed to have an answer. But adults ask this mainly as a conversation starter. They want to know what sort of person you are, and this question is just to get you talking. They ask it the way you might poke a hermit crab in a tide pool, to see what it does.

‒ Paul Graham, “What You’ll Wish You’d Known” 23

7.4 Software Engineering

7.4.1 Pragmatic Programmer’s Highlights

  1. Care About Your Craft Why spend your life developing software unless you care about doing it well?,
  2. Think! About Your Work Turn off the autopilot and take control. Constantly critique and appraise your work.,
  3. Provide Options, Don’t Make Lame Excuses Instead of excuses, provide options. Don’t say it can’t be done; explain what can be done.,
  4. Don’t Live with Broken Windows Fix bad designs, wrong decisions, and poor code when you see them.,
  5. Be a Catalyst for Change You can’t force change on people. Instead, show them how the future might be and help them participate in creating it.,
  6. Remember the Big Picture Don’t get so engrossed in the details that you forget to check what’s happening around you.,
  7. Make Quality a Requirements Issue Involve your users in determining the project’s real quality requirements.,
  8. Invest Regularly in Your Knowledge Portfolio Make learning a habit.,
  9. Critically Analyze What You Read and Hear Don’t be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project.,
  10. It’s Both What You Say and the Way You Say It There’s no point in having great ideas if you don’t communicate them effectively.,
  11. DRY – Don’t Repeat Yourself Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.,
  12. Make It Easy to Reuse If it’s easy to reuse, people will. Create an environment that supports reuse.
  13. Eliminate Effects Between Unrelated Things Design components that are self-contained. independent, and have a single, well-defined purpose.
  14. There Are No Final Decisions No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.
  15. Use Tracer Bullets to Find the Target Tracer bullets let you home in on your target by trying things and seeing how close they land.
  16. Prototype to Learn Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn.
  17. Program Close to the Problem Domain Design and code in your user’s language.
  18. Estimate to Avoid Surprises Estimate before you start. You’ll spot potential problems up front.
  19. Iterate the Schedule with the Code Use experience you gain as you implement to refine the project time scales.
  20. Keep Knowledge in Plain Text Plain text won’t become obsolete. It helps leverage your work and simplifies debugging and testing.
  21. Use the Power of Command Shells Use the shell when graphical user interfaces don’t cut it.
  22. Use a Single Editor Well The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.
  23. Always Use Source Code Control Source code control is a time machine for your work – you can go back.
  24. Fix the Problem, Not the Blame It doesn’t really matter whether the bug is your fault or someone else’s – it is still your problem, and it still needs to be fixed.
  25. Don’t Panic When Debugging Take a deep breath and THINK! about what could be causing the bug.
  26. “select” Isn’t Broken. It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.
  27. Don’t Assume It – Prove It Prove your assumptions in the actual environment – with real data and boundary conditions.
  28. Learn a Text Manipulation Language. You spend a large part of each day working with text. Why not have the computer do some of it for you?
  29. Write Code That Writes Code Code generators increase your productivity and help avoid duplication.
  30. You Can’t Write Perfect Software Software can’t be perfect. Protect your code and users from the inevitable errors.
  31. Design with Contracts Use contracts to document and verify that code does no more and no less than it claims to do.
  32. Crash Early A dead program normally does a lot less damage than a crippled one.
  33. Use Assertions to Prevent the Impossible Assertions validate your assumptions. Use them to protect your code from an uncertain world.
  34. Use Exceptions for Exceptional Problems Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.
  35. Finish What You Start Where possible, the routine or object that allocates a resource should be responsible for deallocating it.
  36. Minimize Coupling Between Modules Avoid coupling by writing “shy” code and applying the Law of Demeter.
  37. Configure, Don’t Integrate Implement technology choices for an application as configuration options, not through integration or engineering.
  38. Put Abstractions in Code, Details in Metadata Program for the general case, and put the specifics outside the compiled code base.
  39. Analyze Workflow to Improve Concurrency Exploit concurrency in your user’s workflow.
  40. Design Using Services Design in terms of services – independent, concurrent objects behind well-defined, consistent interfaces.
  41. Always Design for Concurrency Allow for concurrency, and you’ll design cleaner interfaces with fewer assumptions.
  42. Separate Views from Models Gain flexibility at low cost by designing your application in terms of models and views.
  43. Use Blackboards to Coordinate Workflow Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants.
  44. Don’t Program by Coincidence Rely only on reliable things. Beware of accidental complexity, and don’t confuse a happy coincidence with a purposeful plan.
  45. Estimate the Order of Your Algorithms Get a feel for how long things are likely to take before you write code.
  46. Test Your Estimates Mathematical analysis of algorithms doesn’t tell you everything. Try timing your code in its target environment.
  47. Refactor Early, Refactor Often Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.
  48. Design to Test Start thinking about testing before you write a line of code.
  49. Test Your Software, or Your Users Will Test ruthlessly. Don’t make your users find bugs for you.
  50. Don’t Use Wizard Code You Don’t Understand Wizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project.
  51. Don’t Gather Requirements – Dig for Them Requirements rarely lie on the surface. They’re buried deep beneath layers of assumptions, misconceptions, and politics.
  52. Work With a User to Think Like a User It’s the best way to gain insight into how the system will really be used.
  53. Abstractions Live Longer than Details Invest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies.
  54. Use a Project Glossary Create and maintain a single source of all the specific terms and vocabulary for a project.
  55. Don’t Think Outside the Box – Find the Box When faced with an impossible problem, identify the real constraints. Ask yourself: “Does it have to be done this way? Does it have to be done at all?”
  56. Start When You’re Ready. You’ve been building experience all your life. Don’t ignore niggling doubts.
  57. Some Things Are Better Done than Described Don’t fall into the specification spiral – at some point you need to start coding.
  58. Don’t Be a Slave to Formal Methods. Don’t blindly adopt any technique without putting it into the context of your development practices and capabilities.
  59. Costly Tools Don’t Produce Better Designs Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.
  60. Organize Teams Around Functionality Don’t separate designers from coders, testers from data modelers. Build teams the way you build code.
  61. Don’t Use Manual Procedures A shell script or batch file will execute the same instructions, in the same order, time after time.
  62. Test Early. Test Often. Test Automatically Tests that run with every build are much more effective than test plans that sit on a shelf.
  63. Coding Ain’t Done ’Til All the Tests Run ’Nuff said.
  64. Use Saboteurs to Test Your Testing Introduce bugs on purpose in a separate copy of the source to verify that testing will catch them.
  65. Test State Coverage, Not Code Coverage Identify and test significant program states. Just testing lines of code isn’t enough.
  66. Find Bugs Once Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.
  67. English is Just a Programming Language Write documents as you would write code: honor the DRY principle, use metadata, MVC, automatic generation, and so on.
  68. Build Documentation In, Don’t Bolt It On Documentation created separately from code is less likely to be correct and up to date.
  69. Gently Exceed Your Users’ Expectations Come to understand your users’ expectations, then deliver just that little bit more.
  70. Sign Your Work Craftsmen of an earlier age were proud to sign their work. You should be, too.

The Pragmatic Programmer Quick Reference Guide

From the book “The Pragmatic Programmer”, copy here

7.4.2 Tools - greatest version from all modules


# Highest version from submodules.

file_version() {
    path="$1"

    cat "$path" | grep version | awk '{print($2)}' | sed s/\"//g | sed s/,//g
}

function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }

top_version() {
    a=`file_version package.json`
    b=`file_version submodule/package.json`
    c=`file_version submodule_2/package.json`

    printf '%s\n' $a $b $c | sort -V | tail -n 1
}

top_version

7.4.3 Languages

Programming languages connected via compilers

akr.am, discussed on YC News

7.4.3.1 JavaScript

Portable GUIs: Node Web Kit

7.4.3.2 ReasonML

I’ve been using ReasonML for building complex ReasonReact (React.js binding for ReasonML) apps. With the strict type system, I can code for hours without constantly looking at the browser and it just works on first try. I never feel so happy with coding like that before with Javascript. I would recommend ReasonML for all Javascript developers.

https://news.ycombinator.com/item?id=18414084

7.4.3.3 Lisp

1958 - John McCarthy and Paul Graham invent LISP. Due to high costs caused by a post-war depletion of the strategic parentheses reserve LISP never becomes popular[1]. In spite of its lack of popularity, LISP (now “Lisp” or sometimes “Arc”) remains an influential language in “key algorithmic techniques such as recursion and condescension”[2].

https://news.ycombinator.com/item?id=3503896

7.4.3.4 C/C++

1972 - Dennis Ritchie invents a powerful gun that shoots both forward and backward simultaneously. Not satisfied with the number of deaths and permanent maimings from that invention he invents C and Unix.

https://news.ycombinator.com/item?id=3503896

7.4.3.5 Dart

Created by Google, optimized for UI.

More: https://dart.dev/

7.4.4 Design patterns

Design patterns are listed further after Wikipedia at https://en.wikipedia.org/wiki/Design_Patterns#Document_Structure.

7.4.4.1 Swift

Offers an addition to enable first-class differentiable programming to Swift.

More: https://github.com/apple/swift/blob/master/docs/DifferentiableProgramming.md

7.4.4.2 Creational

Creational patterns are ones that create objects for you, rather than having you instantiate objects directly. This gives your program more flexibility in deciding which objects need to be created for a given case.

  • Abstract factory groups object factories that have a common theme.
  • Builder constructs complex objects by separating construction and representation.
  • Factory method creates objects without specifying the exact class to create.
  • Prototype creates objects by cloning an existing object.
  • Singleton restricts object creation for a class to only one instance.

7.4.4.3 Structural

These concern class and object composition. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.

  • Adapter allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.
  • Bridge decouples an abstraction from its implementation so that the two can vary independently.
  • Composite composes zero-or-more similar objects so that they can be manipulated as one object.
  • Decorator dynamically adds/overrides behaviour in an existing method of an object.
  • Facade provides a simplified interface to a large body of code.
  • Flyweight reduces the cost of creating and manipulating a large number of similar objects.
  • Proxy provides a placeholder for another object to control access, reduce cost, and reduce complexity.

7.4.4.4 Behavioral

Most of these design patterns are specifically concerned with communication between objects.

  • Chain of responsibility delegates commands to a chain of processing objects.
  • Command creates objects which encapsulate actions and parameters.
  • Interpreter implements a specialized language.
  • Iterator accesses the elements of an object sequentially without exposing its underlying representation.
  • Mediator allows loose coupling between classes by being the only class that has detailed knowledge of their methods.
  • Memento provides the ability to restore an object to its previous state (undo).
  • Observer is a publish/subscribe pattern which allows a number of observer objects to see an event.
  • State allows an object to alter its behavior when its internal state changes.
  • Strategy allows one of a family of algorithms to be selected on-the-fly at runtime.
  • Template method defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior.
  • Visitor separates an algorithm from an object structure by moving the hierarchy of methods into one object.

7.4.5 Architectural patterns

An architectural style defines: a family of systems in terms of a pattern of structural organization; a vocabulary of components and connectors, with constraints on how they can be combined.

– Wikipedia, https://en.wikipedia.org/wiki/Architectural_pattern

7.4.5.1 Microservices

A microservice is a single self-contained unit which, together with many others, makes up a large application. By splitting your app into small units every part of it is independently deployable and scalable, can be written by different teams and in different programming languages and can be tested individually.

– Max Stoiber

A microservice architecture means that your app is made up of lots of smaller, independent applications capable of running in their own memory space and scaling independently from each other across potentially many separate machines.

– Eric Elliot

Sources:

  1. https://medium.com/@cramirez92/build-a-nodejs-cinema-microservice-and-deploying-it-with-docker-part-1-7e28e25bfa8b

7.5 Development Operations (DevOps)

7.5.1 The Joel Test

A quick test to rate the quality of a software team, by Joel Spolsky:

  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?

Source: https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/

7.5.2 Testing configuration

Configuration can be tested with BATS which is general, portable and written entirely in Bash. Sometimes however, it is convenient to be able to execute a test suite without installing anything on the target machine and BATS needs to be installed locally to work.

A handy tool to use then is called Chef InSpec. It can be run via SSH.

Chef InSpec defines security and compliance rules as executable code for testing and auditing applications and infrastructure. Chef InSpec compares the actual state of a system with the desired state that is expressed in easy-to-read and easy-to-write code.

Source: https://blog.chef.io/5-things-you-can-do-with-chef-inspec-input/

7.6 Data analysis

Drake is your friend here with Drakefiles: https://www.datascienceatthecommandline.com/chapter-6-managing-your-data-workflow.html.

7.6.1 Habits of highly effective data scientists

Never start with a hypothesis

– Cassie Kozyrkov, Head of Decision Intelligence, Google, Hackernoon

Steps:

Step 1: Write down the default action.

  • “What do you commit to doing if you stay ignorant?”
  • “Getting started is about actions, not beliefs.”

Step 2: Write down the alternative action.

Nothing. You beliefe in Nothing. Say it with me.

Picking a default action requires busines savy and is the duty of the team’s decision-maker.

Statistics is the science of changing your mind.

– Cassie Kozyrkov, Head of Decision Intelligence, Google Towards Data Science

Hypotheses are descriptions of what the world might look like.

– Cassie Kozyrkov, Head of Decision Intelligence, Google Towards Data Science

The p-value says, “If I’m living in a world where I should be taking that default action, how unsurprising is my evidence?” The lower the p-value, the more the data are yelling, “Whoa, that’s surprising, maybe you should change your mind!”

– Cassie Kozyrkov, Head of Decision Intelligence, Google Towards Data Science

Did we do our homework to make sure that we actually collected enough evidence to gie ourselves a fair shot at changing our minds? That’s what the concept of power mesaures.

– Cassie Kozyrkov, Head of Decision Intelligence, Google Towards Data Science

Uncertainty means you can come to the wrong conclusion, even if you have the best math in the world.

– Cassie Kozyrkov, Head of Decision Intelligence, Google Towards Data Science

7.7 Team work

7.7.1 Communication

7.7.1.1 Find a person’s e-mail

If they have a GitHub repository, you can try the link below, replacing xxxxxx with their username: https://api.github.com/users/xxxxxxx/events/public.

In the received response, search for the string “email”.

The tip comes from here.

7.7.1.2 Send an e-mail message through your terminal

  1. Place your e-mail configuration in the file ~/.mailrc,
  2. Send your e-mail using the command: mail <addressee> < <message_file.eml>.

7.7.1.3 Pocket software engineer’s lexicon

  • nonce - (ang.) identyfikator jednorazowy, (przymiotnik) okazjonalizm

7.7.2 Satellite telecommunications

satbeams.com - a catalog of satellites

LNB - Low noise block

7.7.3 Licensing

I want people to reuse this text in their own work: in presentations, articles, and even other books. However, the deal is that if they remix my work, others can remix theirs. I’d like credit, and have no argument against others making money from their remixes. Thus, the text is licensed under cc-by-sa.

For the examples, we started with GPL, but it rapidly became clear this wasn’t workable. The point of examples is to give people reusable code fragments so they will use ZeroMQ more widely, and if these are GPL, that won’t happen. We switched to MIT/X11, even for the larger and more complex examples that conceivably would work as LGPL.

However, when we started turning the examples into standalone projects (as with Majordomo), we used the LGPL. Again, remixability trumps dissemination. Licenses are tools; use them with intent, not ideology.

ZeroMQ authors

7.7.3.1 ISC License

Licencja ISC – licencja wolnego oprogramowania autorstwa Internet Systems Consortium. Zezwala na korzystanie z programu i jego kodu źródłowego w dowolnym celu, pod warunkiem zachowania informacji o autorze wraz z treścią licencji. Ponadto autor nie udziela żadnych gwarancji związanych z programem. Tym samym licencja ISC odpowiada warunkom korzystania na jakie zezwalają licencje 2-klauzulowa BSD i MIT, jest jednak od nich krótsza i napisana prostszym językiem, z pominięciem słownictwa uznanego przez Konwencję berneńską za zbędne.

Z licencji ISC korzysta między innymi projekt OpenBSD[1].

See Wikipedia

License content:

Copyright © 2004-2013 by Internet Systems Consortium, Inc. (“ISC”)

Copyright © 1995-2003 by Internet Software Consortium
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

7.7.4 Documentation

7.7.4.1 Sources of graphics

Repositories of free-to-use-commercially branding content

7.7.4.1.1 Icons

Open-source icons:

Public-domain icons:

Creative Commons icons:

Custom logos in seconds:

7.7.4.1.2 Photographs
  • Unsplash.com

7.7.4.2 Drawing schematics

7.7.4.3 Retain and manage knowledge

I developed my own system where I’d have a text file on my desktop with a file name of let’s say 2016-12 for December 2016. Then I would jot down everything worth saving in that file. (…) It’s productive because there’s no complex application to get situated with. You open up a text editor, jot down your note and save it. That’s it. There’s no thought process required for figuring out tags or context.

– Nick Janetakis, Plain Text and Google keep Is a Killer Combo for Notes and Organization

7.7.4.4 Text editing

7.7.4.4.1 Markdown

See atom.io, with a plug-in: document-outline.

Or vim with plug-in Voom.

Or GhostWriter which even played a linked animated GIF correctly.

To convert from OneNote to Markdown you can follow this tip.

7.7.4.4.2 Vim
7.7.4.4.2.1 Enter the internal Vim terminal

:shell. Enter a new terminal: :term.

7.7.4.4.2.2 Save with sudo

:w !sudo tee %

About it

7.7.4.4.2.3 Join lines

To remove unneeded newlines in Vim, press J or gJ (to avoid adding spaces instead). To remove only from a part of the text, select the text with v or V and then press J or gJ respectively.

source: here

If afterwards multiple consecutive spaces occur, you can use the RegEx pattern of s/ \{2,}/ /g to remove them, possibly selecting a specific block of text to operate on beforehand. This tip came from mikerobi.

7.7.4.4.2.4 Insert 8 spaces quickly

<C-o>:norm 8i <CR>

<C-o> stands for [Control]+[o] - commanding without leaving insert mode.

7.7.4.4.2.5 Retab a file
:set expandtab
:retab

To change the number of spaces substituted for a tab, issue: :set shiftwidth=<number> with <number> of 4 for example.

7.7.4.4.2.6 Use 4 spaces for TAB in ViM

Put the below into .vimrc.

filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab

To quickly type the above to a file with cat, use cat >> ~/.vimrc << EOF.

7.7.4.4.2.7 Check spelling

Use :set spell spelllang=en_us to enable spell checking for the current document.

Use :set nospell to turn spell checking off.

Source: Linux.com.

7.7.4.4.2.8 .vimrc collected personal configuration
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab

" Assign Paste Mode toggle to [F3].
set pastetoggle=<F3>

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
7.7.4.4.3 Managing references

Track references locally with Zotero: To install Zotero, you can use the instructions herein.

7.7.4.4.4 Preview Markdown in console

Isssue: pip install mdv --user, mdv README.md.

7.7.4.4.5 Viewing EPUB in Linux

Using fbreader for that - faster and lighter than popular alternatives like Okular or Calibre. May be more buggy, some warn.

And it is buggy - scrollbar behavior is inconsistent. The icons are bad style. But the e-book is displayed correctly.

7.7.4.4.5.0.1 Publishing documentation

See ReadTheDocs.io.

Here is a step by step guide on how to install Read the Docs. It will get you to a point of having a local running instance.

– Installing ReadTheDocs locally, Installation

7.7.4.4.6 Typesetting
7.7.4.4.6.1 Converting to PDF

Pass your defaults.yaml file containing your defaults as the last argument like so:

pandoc -f markdown -s your-input-file.md defaults.yaml

Metadata definitions seen first are kept and left unchanged, even if conflicting data is parsed at a later point.

Source: issues

When a value is set multiple times in the same document, the earlier one takes priority.

John MacFarlane

7.7.4.4.6.2 PS.GZ

Consider the size difference between the same document in PDF and in PS.GZ format:

7.7.4.4.6.3 Makefile: IDE for Pandoc
in=operations_manual.md
out=man.pdf

all: pdf

pdf:
    @pandoc $(additional_opts) \
        $(in) \
        -o $(out)

verbose: additional_opts=--verbose
verbose: pdf

show:
    xdg-open $(out)
ed:
    vim $(in)

Parallelization of Make:

make -j src

7.7.4.5 Dynamic demonstrations

7.7.4.5.1 Desktop recording

Main solution: Peek - a simple, one-window screen recording application, supports GIF output.

Other options follow.

Byzantz looks promising, mentioned in this answer.

Install:

sudo add-apt-repository ppa:fossfreedom/byzanz
sudo apt-get update && sudo apt-get install byzanz

Run:

# Install Cairo (One of those may suffice):
sudo apt install libcairo2-dev libcairo2-doc
libcairomm-dev libcairo2

# Install GTK+ 3.0:
sudo apt-get install build-essential libgtk-3-dev

# Run install:
./autogen.sh
7.7.4.5.2 Terminal recording

Packages: ASCIINema + ASCIICast2GIF

See what the output looks like: here.

7.8 Crop video losslessly

The h264_metadata and hevc_metadata bitstream filters can set crop dimensions without modifying the video itself.

ffmpeg -i input.mp4 -c copy -bsf:v h264_metadata=crop_left=100:crop_right=20:crop_top=10:crop_bottom=10 output.mp4

Source: llogan, https://stackoverflow.com/a/33422359/

7.9 Habits of highly effective learners

On an average only 6 out of every 100 people who enroll in a course actually complete it.

https://towardsdatascience.com/https-medium-com-nityeshagarwal-difficulties-with-self-learning-and-3-systems-to-solve-them-a14f4c9a64c6

Make serious efforts to fall in love with <X> before you try to learn it.

https://towardsdatascience.com/https-medium-com-nityeshagarwal-difficulties-with-self-learning-and-3-systems-to-solve-them-a14f4c9a64c6

7.10 UI design

Rules:

  1. Light comes from the sky
  2. Black and white first
  3. Double your whitespace
  4. Learn the methods of overlaying text on images (see Part 2)
  5. Make text pop — and un-pop (see Part 2)
  6. Only use good fonts (see Part 2)
  7. Steal like an artist (see Part 2)

– Erik D. Kennedy, medium.com

7.11 First year of studies

Key ideas to help you survive - and even enjoy - the first year of your studies in Computer Science.

7.11.1 Notes

7.11.2 Git

7.11.3 Markdown

7.11.4 Deep work

Value your time - restrict it, and make it count.

7.11.5 How this relates to work

7.11.6 Contribute before you feel ready

7.11.7 Don’t let studies interfere with your development

7.12 Publishing

Story of a paper:

You can withdraw a submission at any point until it has been accepted and you have signed the publishing agreement. You might upset the editor, but there’s absolutely no way they will try to forbid you from withdrawing the paper. The worst case scenario is that they will remember you as a flake who wasted their time with an inappropriate submission.

Recently, I circulated a manuscript for comments, did get some, incorporated these, submitted… and one day after submission, I got comments from one guru that pretty much blew the paper away, but suggested a way forward.

I immediately withdrew the submission, spent a few more weeks on the paper, submitted a new version (to the same journal), getting a major revision and finally acceptance two days ago. (I’m pretty certain the guru was one reviewer, which made perfect sense.)

Source:

Excellent – surprising and precise – title for a publication, example:

No PTSD-related differences in diurnal cortisol profiles of genocide survivors

Source: Google Scholar

Learn how to tell the story of your projects in your portfolio. Know, what projects you should NOT share there.

Source: https://medium.com/@erikdkennedy/how-to-create-your-ux-ui-portfolio-without-much-experience-ca55c5928c97

When we look at any kind of cognitively complex field — for example, playing chess, writing fiction or being a neurosurgeon — we find that you are unlikely to master it unless you have practiced for 10,000 hours. That’s 20 hours a week for 10 years.

https://www.calnewport.com/blog/2010/01/06/the-grandmaster-in-the-corner-office-what-the-study-of-chess-experts-teaches-us-about-building-a-remarkable-life/

7.12.1 English language

Preclude: verb (used with object), pre·clud·ed, pre·clud·ing.

  1. to prevent the presence, existence, or occurrence of; make impossible: “The insufficiency of the evidence precludes a conviction.”
  2. to exclude or debar from something: “His physical disability precludes an athletic career for him.”

– Dictionary.com