Workaday Reading

Google Maps API links



"Using the Google Maps API v3 Links to examples of various useful things and documentation Using the Google Maps API V2 Links to examples of various useful things and documentation"

read »

Workaday Reading

"Most serious software development projects use coding guidelines. These guidelines are meant to state what the ground rules are for the software to be written: how it should be structured and which language features should and should not be used. Curiously, there is little consensus on what a good coding standard is. Among the many that have been written there are remarkable few patterns to discern, except that each new document tends to be longer than the one before it."
read »

Git’s update-index’s assume-unchanged vs skip-worktree

We have some config files on my companies app which I need to change for my local install to work. I was using git update-index --assume-unchanged to ignore my local changes. This allowed me to switch between branches and commit The downfall to this is that this file hasn’t been touched in months and I … Continued

Workaday Reading

Twitter



"If I am using icons that have more weight than the text, I typically make the icons slightly lighter than the text for inactive states ?? pic.twitter."

read »

Workaday Reading

About Nika



"At Mozilla I often end up building my changes in a patch stack, and used git rebase -i1 to make changes to commits in response to review comments etc. Unfortunately, with a repository as large as mozilla-central2, git rebase -i has some downsides:"

read »

Workaday Reading

What Every Developer Should Learn Early On



"As a developer, you’ll hear a lot of crazy, unbelievable theories about what “lines of code” signify. Believe none of them. Lines of code is a ridiculous metric to base decisions on. In very rare cases it tells you something, in all the other cases, it tells you nothing."

read »

Workaday Reading

Algebraic Effects for the Rest of Us



"Have you heard about algebraic effects? My first attempts to figure out what they are or why I should care about them were unsuccessful. I found a few pdfs but they only confused me more. (There’s something about academic pdfs that makes me sleepy.)"

read »

Workaday Reading

CSS flex box last space removed



"By setting the display of an item to flex I am finding the last space is removed from a text string so. Any text that is directly contained inside a block container element (not inside an inline element) must be treated as an anonymous inline element."

read »

Workaday Reading

General sibling combinator



"The general sibling combinator (~) separates two selectors and matches the second element only if it follows the first element (though not necessarily immediately), and both are children of the same parent element."

read »

Add a default value to Advanced Custom Fields hidden field

Advanced Custom Fields hidden field does not have a default value input.
Add one by implementing the code below. Personally I was using this to mark a registration form for a particular user type.

<?php
// add default value to hidden field
add_action('acf/render_field_settings/type=hidden', 'tb_hidden_default_render_field_settings');
add_filter('acf/prepare_field/type=hidden', 'tb_hidden_default_prepare_field');
      
function tb_hidden_default_render_field_settings($field){
acf_render_field_setting( $field, array(
    'label'			=> __('Default Value'),
    'instructions'	=> '',
    'name'			=> 'hidden_default',
    'type'			=> 'text',
    'ui'			=> 1,
  ), false);
}
function tb_hidden_default_prepare_field( $field ) {
  if( empty($field['hidden_default']) ) return $field;
  $field['value'] = $field["hidden_default"];
  $field['label'] = '';
  
  return $field;
}

Workaday Reading

When should you be using Web Workers?



"← Back to home When should you be using Web Workers? 2019-06-12 You should always use Web Workers. And in our current landscape of frameworks it’s virtually impossible. Did I get your attention with that? Good. Of course, as with any topic, there is nuance and I will lay that all out."

read »