Giter VIP home page Giter VIP logo

fernandobasso / dev-how-to Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 11.85 MB

My notes, solutions, tips and ideas on many software development and engineering topics.

Shell 2.64% Python 0.54% CSS 7.98% Ruby 17.08% JavaScript 34.52% Haskell 6.10% Makefile 0.21% C 2.75% Vim Script 0.04% TypeScript 25.57% TeX 0.71% sed 0.01% Common Lisp 0.10% Java 0.19% PHP 0.20% Less 0.12% HTML 1.07% SCSS 0.03% Batchfile 0.08% Scheme 0.07%

dev-how-to's Introduction

Programming How To

My personal repository of tips, tutorials, ideas, code, solutions and whatever else I see fit to put in here 😅.

The idea is to collect everything I research and study in a single place (the exception to this is my math studies which I store somewhere else) so that I can open an editor or perform searches from a single place, instead of trying to remember in which directory I did something.

As of May 2022, I’m starting to use [Conventional Commits](https://www.conventionalcommits.org), always making sure to use a proper commit type and a scope (when a scope makes sense):

For programming languages, I use the programming language extension as the commit type:

  • c for the C language;

  • rb for Ruby;

  • js for JavaScript;

  • ts for TypeScript;

  • hs for Haskell;

  • purs for PureScript;

  • scm for Scheme;

  • rkt for Racket Scheme;

  • …​and so on and so forth…​

For libraries or frameworks I may use a mix of things, or reasonable abbreviations:

  • cmdline: general shell-related stuff;

  • vim: guess!

  • emacs: guess!

  • xfce: Xfce Linux Window Manager;

  • thunar: Xfce file manager;

For books or special “projects” I would have their initials or something minimally identifiable:

  • hffp: commits related to the book Haskell From First Principles;

  • ckr: for C K&R book;

  • codewars: Codewars challenges;

  • hackerrank: Hakcerrank challenges;

Examples of commits:

ts(ts50): Add l43 promisify example

hffp: Add solution for chapter 10 exercises

vim(fzf): Add fzf text search key binding

Make sure you properly set the githooks path:

$ git config --local core.hooksPath .githooks

One idea is to create a script that collects all “tags” I have used so far in git commits and try to reuse them consistently instead of making a mess. Hard to avoid the mess, though.

Here’s the script:

$ git log --format='%s' \
    | grep '^[a-z]\+:' \
    | sed 's/:.\+//' \
    | sort \
    | uniq
add
hffp
repo
wip

Don’t wrap text at a fixed column width. Instead, put each sentence on its own line, a technique called sentence per line. This technique is similar to how you write and organize source code. The result can be spectacular.

Here are some of the advantages of using the sentence per line style:

  • It prevents reflows (meaning a change early in the paragraph won’t cause the remaining lines in the paragraph to reposition).

  • You can easily swap sentences.

  • You can easily separate or join paragraphs.

  • You can comment out sentences or add commentary to them.

  • You can spot sentences which are too long or sentences that vary widely in length.

  • You can spot redundant (and thus mundane) patterns in your writing.

We picked up this idea from the writing guide in the Neo4j documentation. However, it seems like the idea dates back a discovery by Buckminster Fuller in the 1930s, who called it ventilated prose. The technique was also recommended in 2009 by Brandon Rhodes in a blog post about Semantic Linefeeds.

It’s important to note that this technique works because AsciiDoc doesn’t treat wrapped lines in prose as hard line breaks. At least, it doesn’t show up that way to the reader. The line breaks between contiguous lines of prose will not be visible in the rendered document (i.e., as the reader sees it). While a single line break doesn’t appear in the output, two consecutive line breaks starts a new paragraph (or other block).

dev-how-to's People

Contributors

fernandobasso avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.