Stop future proofing software
This all seems very familiar and true to me.
future proofing is the favorite imaginary problem of most small companies
You don’t need to be Facebook to build a social-media platform that can support “Facebook scale”… but you’d be wasting your time building it. Facebook’s magic consisted in being able to acquire billions of users, scaling the system was the easy part.
When it comes to thinking about the future, less is often more ... Preparing for the future doesn’t involve tacking on complexity, but rather removing as much of it as possible. Making yourself adaptable. The simpler your codebase is, the easier it is to adjust to fulfill a different purpose. If you’ve designed something to work perfectly, you’ve made some sacrifices along the way. Those sacrifices are usually around flexibility.
Design for flexibility, not for perfection. Flexibility is what ultimately helps you adapt your software for the future. It allows you to more easily take on the real challenges that come up, rather than protecting you from imaginary ones.

See also the paragraph beginning "There is a third way to deal with evolving requirements" in this reply to the h-dev mailing list: https://groups.google.com/a/list.hypothes.is/d/msg/dev/20BuHh3CokM/pxq84hc4eKgJ
september 2018
The Left Hand of Equals
A paper on the concept of equality in object oriented languages historical and current. Object identity, reference equality, value equality, abstract equality, encapsulation.
august 2018
HTML Standard, Developer's Edition
A curated edition of the HTML spec focused on a more pleasant reading experience and ease of access for web developers, with information that only browser vendors need to know removed. Automatically produced from the full specification by build tooling, so always in sync with the latest.
december 2017
Make Gedit always open files in a new window
Gedit's default behavior of opening files in a new tab in an existing window doesn't play well with Gnome's workspaces. If I click on a file to open it in Gedit, but a Gedit window is already open _on another workspace_, then it just silently opens the file in a new tab in that Gedit window on the other workspace. Nothing happens on the workspace that I'm currently on.

An easy fix to this is to add `--new-window` to the command in `/usr/share/applications/gedit.desktop`.

I also set up an `abbr gedit gedit --new-window` fish shell abbreviation for the command line.
ubuntu  linux  gnome 
december 2017
How to stop Ubuntu's login screen from suspending on laptop lid close
How to stop Ubuntu from suspending when the laptop lid closes, even if no one is logged in to the desktop or if you're logged in to DWM and don't have unity-settings-daemon / gnome-settings-daemon running, etc, by editing the `/etc/systemd/logind.conf` file. This worked for me.
linux  ubuntu 
august 2017
How to get CPU and hard drive temperatures on Linux
This is a good Ask Ubuntu answer about getting CPU and HDD temperatures on Ubuntu using lmsensors and hddtemp.
ubuntu  linux 
august 2017
A nice Vim plugin that lets you give each tab a custom name to display on the tab instead of the name of the open file. I name each tab after the (multi-file) project that I'm working on in that tab (and using :lcd each tab can have a different working directory as well).

Also gives you new config settings for controlling Vim's tabline option (dynamically controlling the label of each tab based on its path, file, the number of windows in the tab, whether it has modifications).
march 2017
Temporal Dead Zone (TDZ) demystified - JS Rocks
Variables, let, const, var, hoisting and the temporal dead zone in JavaScript ES6.
es6  javascript 
january 2017
Browser support for HTML5 accessibility features
This site tests which new HTML5 features are accessibly supported by major browsers ... An accessibly supported feature means it is usable by people who rely on assistive technology, without developers having to supplement with ARIA or other additional workarounds.
html5  html  a11y 
december 2016
Fantasque Sans Mono
A programming font, designed with functionality in mind, and with some wibbly-wobbly handwriting-like fuzziness that makes it unassumingly cool.

Inspirations include Inconsolata, Monaco and Consolas. I've always been a big fan of Monaco. Includes proper bold and italic variants.

<img src="https://raw.githubusercontent.com/belluzj/fantasque-sans/master/Specimen/Specimen.png">
november 2016
Fix black inner border around gVim windows: set Vim's guiheadroom option to 0
I was seeing a thin, black inner border around my gVim windows that would appear, for example, after resizing the window and disappear again, for example, after setting the colorscheme. It was annoying to have to re-set the colorscheme to get rid of this border after every time I resized the window or opened a new split or tab etc.

Adding `set guiheadroom=0` to my vimrc fixed it.

[Via ArchWiki](https://wiki.archlinux.org/index.php/Vim#Empty_space_at_the_bottom_of_gvim_windows).

Update: not a complete fix, the border still appears sometimes.
vim  gvim 
november 2016
Retro groove color scheme for Vim
This is a great vim color scheme.
The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes.
vim  colors 
november 2016
The Filesystem Hierarchy Standard
The standard that describes the filesystem directory structure and contents for UNIX-like operating systems. I think this is followed by Debian, RedHat, etc.
unix  linux  debian  redhat 
november 2016
Deep dive into the murky waters of script loading - HTML5 Rocks
## `<script>` tags

<script src="//other-domain.com/1.js"></script>
<script src="2.js"></script>

The browser will download the script files **in parallel** and execute them **in order**, `2.js` won't start executing until `1.js` has finished. The browser **blocks further rendering of the page** while the scripts are downloaded and executed (because it doesn't know whether one of the scripts might use `document.write()`, for example). The browser _may_ continue parsing the HTML for more js, images, CSS to start downloading, though. This is why you should **put `<script>`s at the end of your document**, so that they don't block page rendering, but then your scripts won't execute until the whole page has rendered.

## defer

<script src="//other-domain.com/1.js" defer></script>
<script src="2.js" defer></script>

The `defer` attribute is a way for a `<script>` tag to tell the browser that it promises not to use things like `document.write()`, so the browser can continue parsing the HTML in parallel while it downloads and executes the script. The browser will execute the scripts **after the document has parsed**, and **in order**. This _only_ works with external (`src="..."`) scripts that are in the HTML originally delivered from the server, doesn't work for inline or dynamically added scripts.

So `defer` seems to be the same as putting your scripts at the bottom of the HTML, except that the browser can already start downloading (and parsing or whatever, just not executing) the scripts while it's still parsing the HTML.

## async

HTML5 adds the `async` attribute:

<script src="//other-domain.com/1.js" async></script>
<script src="2.js" async></script>

Likef `defer`, `async` promises to the browser that the script isn't going to use `document.write()` or anything like it. The browser will download the scripts in parallel, continue parsing the HTML, and **execute the scripts as soon as possible**, and **out of order**.

## Dynamically added async=false scripts

There's one way to have multiple scripts download immediately, without blocking rendering, and execute as soon as possible _and in order_. This can actually be achieved by having some JavaScript (inline, in the `<head>`) that inserts multiple `<script>`s with `async = false` into the DOM. Dynamically-added scripts don't block rendering, and `async=false` scripts are executed in order:

].forEach(function(src) {
var script = document.createElement('script');
script.src = src;
script.async = false;

Unfortunately since the script files are added by JavaScript and not present in the original HTML, preload scanners will miss them. To fix that you can add this into the HTML:

<link rel="subresource" href="//other-domain.com/1.js">
<link rel="subresource" href="2.js">

This is where I stopped reading, it continues...
javascript  html  DOM 
october 2016
Exploring CLI Best Practices
A good list of best practices for designing intuitive command line interfaces:

* Provide default options
* Have both long and short names for each option
* Use common, familiar command line option names (see this table of long option names used by GNU programs: <https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table>)
* When a CLI performs some action over files or directories, have an option for which files to process (rather than using the current working directory)
* Don't use positional arguments, options that can be given in any order are better
* Provide a -h, --help option. Bigger CLIs with subcommands should have a help command for each subcommand as well.
* If a CLI is going to be distributed, have a -v, --version command and use semantic versioning
* Provide a --dry-run option
* Support restarting where it left off, if the script crashes
* Use non-zero exit codes for errors, useful for using your CLI from scripts
* Write useful information to stdout, warnings and errors to stderr
command-line-interfaces  unix 
october 2016
Should you call out code style issues in a code review?
Code formatting issues should almost never come up during a code review ... Remember that the best code reviews should provoke discussions — and spending time on basic formatting issues won’t help with that goal.
september 2016
7 ways to avoid aggravation in code reviews
blunt and unfiltered communication also carries a long-term cost
Instead of pointing out obvious issues with the code (or what you feel are obvious issues with the code), it’s usually smoother to ask for clarification instead.
Ask questions; don’t make demands
september 2016
Effective Code Reviews Without the Pain - Developer.com
This is one of the most useful articles that I found about code review.
september 2016
How to Use a Code Review to Execute Someone's Soul
Nitpick and bikeshed:
I think most of us would agree that there’s nothing like spending an hour or two arguing about whether to use implicit typing or not or whether it’s better to trap a null parameter and throw ArgumentNullException or to just let the NullReferenceException happen organically. So, why not make all of your code reviews like that? You can forget about big picture concerns or pragmatic but philosophical discussions such as code readability and ease of maintenance and opt instead to have heated arguments about the little things. Anyone who had previously viewed code reviews as opportunities for learning and collaboration will quickly come to realize that they’re the place for heated disagreements about subjective opinions on details.

Be condescending and derisive.

Pass your opinions off as facts:
Is it your opinion that static methods are better than instance methods? No, of course not. It’s just a fact. At least, that’s how you should approach code reviews. Think of all of your personal tastes in design patterns, coding approaches, style, etc, and then remove qualifying phrases like “I think that,” “I prefer,” or “In my opinion.” So, “I like pre-pending field names with underscores” becomes “you should pre-pend your field names with underscores” and “I find out parameters confusing” becomes “out parameters are bad.”

Cover things for which checks could be easily automated.

Focus only on the negative.

Examples of what you _should_ do:

Ask questions instead of making statements:
"What do you think would happen if I passed null into this method?"
Allowing them to solve the problem and propose the improvement is empowering and so, so much better than giving them orders to fix their deficient code.
september 2016
Effective Code Reviews · Code Ahoy
the reviewers must show respect for the author’s talent and hard work ...

Saying, “I didn’t see where these variables were initialized” is likely to elicit a constructive response, whereas “You didn’t initialize these variables” might get the author’s hackles up.


It is easy to become fixated on the code, but remember, there’s a human at the other end of the table (or computer). A human who has opinions. A human who is entitled to have an ‘ego’. Remember that there are many ways to solve a problem.


The developer isn’t there to be sitting duck.


People often forget how far a simple “great job” or “it looks great” could go.


You are listening to another person and should genuinely seek to understand their perspective. Offer suggestions and tips when they are necessary.
september 2016
11 proven practices for more effective, efficient peer code review
4. Be sure that authors annotate source code before the review begins
september 2016
How to Facilitate Friendlier Code Reviews

Instead of improving the product and solving a problem, feedback that is purely critical can offend the team member that authored the code and cause additional problems.

Giving good feedback is a skill that you have to learn.

Make a conscious effort to be friendly in your feedback.

september 2016
How To Do Positive Code Reviews // Speaker Deck

The rule of surprises: set measurable expectations up front, then provide evidence for and against agreed, defined expectations and standards. Refusal must be evidence based against documented standards and requirements. Evidence based, not opinion based.

Ask. Don't tell.
september 2016
Clean Code Cheat Sheet (V 2.4)
This is a very dense cheat sheet for clean code design, should be a great checklist to use when evaluating things.
september 2016
Modules should never raise core Python exceptions
When you make up your own exceptions, you insure that they cover exactly and only the errors they should cover, not your errors plus some random set of other ones.
september 2016
Rico Sta. Cruz's web development cheatsheets
Some of these are pretty good, love the idea of a personal cheatsheets collection.
september 2016
The Elegance of Deflate
The Elegance of Deflate August 21st, 2016 A little while back I found need of a PNG loader for a small project of mine . Being a complete tool I of course…
from instapaper
august 2016
Large web apps in Python: A good architecture
This is a really excellent article about Model, External services (e.g. Celery), Action (the services/logic/business layer), Template, View architecture in web apps using Python, Pyramid, SQLAlchemy and Celery.
june 2016
Computer says NO to HTML5 document outline
The HTML 5.1 spec now requires developers to use h1-h6 to convey document structure (instead of allowing for example multiple h1's inside nested sections to indicate nested headings).
june 2016
"The Timeless Way of Building" quote from the dedication of Roy Fielding's dissertation
Almost everybody feels at peace with nature: listening to the ocean waves against the shore, by a still lake, in a field of grass, on a windblown heath. One day, when we have learned the timeless way again, we shall feel the same about our towns, and we shall feel as much at peace in them, as we do today walking by the ocean, or stretched out in the long grass of a meadow.

-- Christopher Alexander, The Timeless Way of Building (1979)
june 2016
How to split a single commit into two with git rebase
How to split a single commit into two, when rebasing:

1. Mark the commit as edit in the rebase
2. When you stop on the commit, do `git reset HEAD^`
3. Add changes, commit.
4. Add changes, commit.
5. Once everything's committed and the working tree is clean: git rebase --continue
march 2016
The origins of the class Meta idiom in python
The inner class named `Meta` pattern in Python. Just a conventional place to store metadata about a class, as class-level attributes of an inner class named Meta (this inner Meta class contains nothing except some class level attrs).
march 2016
Is group chat making you sweat?
This is a very good article about the bad effects of "persistent group chat" tools like Slack, and what to do instead.
march 2016
Inbox Zero, Everything Zero
A command-line todo script that's just `touch ~/Desktop/"$*"`, i.e. `todo water the plants` creates a file called `water the plants` on your desktop. When it's done you just delete the file.

(If you want to keep a record of done items, you could make a `~/Desktop/.done` folder and move files into it instead of deleting them.)
march 2016
Are We Finally Ready To Annotate The Entire Internet? | Fast Company | Business + Innovation
By installing a plugin onto your web browser, you can create a layer of text on top of whatever it is you are reading or watching—a YouTube video, a news article, a recipe, or your friend's blog. You can choose whether you want your notes to be publicly available to all Hypothes.is users, a select group of people, or just yourself. These days, Hanley finds himself taking notes online, much like he used to write things down in the margins of books or magazines. "It's a really valuable way to curate the web," he says.
march 2016
Bart's Blog: Understanding the power of isolated object testing
Collaboration tests prove that a client interacts with its collaborators correctly (e.g. calling the right functions with the right arguments, doing the right things with return values). Use mock objects for the collaborators.

Contract tests test that an implementation of an interface implements that interface correctly. One set of contract tests can be run against multiple implementations of the same contract. Inheritance of test classes can be used here.
february 2016
Stub your data access layer; it won't hurt - The Code Whisperer
If I'm not mistaken the idea here is that you write a set of "contract tests" that test how your DAO (Data Access Object?) behaves from the point of view of some outside code using it. You then make sure that both your real DAO and your mock DAO pass those contract tests. Then you can safely go ahead and use the mock DAO in tests for other layers of code that use the DAO.
february 2016
Don’t create a sense of urgency, foster a sense of purpose. — Medium
For experienced software engineers and designers (the folks you most need wisdom from), it comes off as amateur and doesn’t inspire long term loyalty.
february 2016
Why I Am Not a Maker - The Atlantic
Making is not a rebel movement, scrappy individuals going up against the system. While the shift might be from the corporate to the individual (supported, mind, by a different set of companies selling a different set of things), it mostly re-inscribes familiar values, in slightly different form: that artifacts are important, and people are not.
february 2016
Testing API requests from window.fetch
Sinon.js's `fakeServer` works for `XMLHttpRequest` but not for `window.fetch()`. Instead, `window.fetch()` is really easy to stub with `sinon.stub()`.
february 2016
The definitive guide to cookie domains and why a www-prefix makes your website safer — Erik Romijn
This is why you should have your website on www.seanh.cc not just seanh.cc: so you can have cookies that are only sent to www.seanh.cc and not to foo.seanh.cc.
february 2016
Introducing Operator | News, Notes & Observations | Hoefler & Co.
But if Operator took the unusual step of looking not only to serifs and sans serifs, but to script typefaces for inspiration, it could do a lot more. It could render the easily-confused I, l, and 1 far less ambiguous. It could help “color” syntax in a way that transcends the actual use of color, ensuring that different parts of a program are easier to identify ... an especially meaningful gesture to me, as someone who, like three hundred million others, is red-green colorblind.
fonts  programming  typography 
february 2016
« earlier      
a11y agile amazon angular apple apps audio-books backup bash blogging bookmarking bookmarks books books-to-read bzr c chat chrome ckan climate code-reviews colors command-line-interfaces coworking cryptography css d3 debian decorators definitions design design-patterns developer documentation dom dotfiles duckduckgo dwarf-fortress dwm ebooks email encryption es6 es6-in-depth exercise facebook fairytales firefox fish fishshell flashbake font fonts games gif git github gmail gnome google grammar gvim hackernews hard_drives howto html html5 http hypothesis icons idioms inspiration interfaces ipad iphone irc java javascript keyboards kubrick life linux macos markdown markup mars math mercurial microsoft minecraft music mutt node.js nokia-770 notes notetaking nuclear objective-c olpc onethingwell oop open_knowledge_foundation opendata pancakes performance plugins podcasts postgresql powerline privacy productivity programming propertires pyblosxom pygame python quotes radiohead recipes redhat regex rest ruby scaling scifi scrapbook sdf search security server shell shell_providers shells singletons siri skype slack sleep-is-death software solarized spam sql sqlalchemy stackoverflow stephen_fry style sugar svn technical_debt teck testing time_tracking tmux tutorial twitter txt typeface typography ubuntu ui unicode unix user vagrant vcs vegan video videos vim virtualenv visualization vlc wallpaper web-development web_development webdev weblogs wikipedia writing xo youtube zsh zui

Copy this bookmark: