A Humanist Chanukah

I am by no means an authority on Humanism, I’ve met a few inspirational people who have been working on it for a lot longer than myself. However I’ve found it hard to find drop in alternatives to some of my families usual traditions. Rather than reinvent the wheel every year, I’m going to start writing them down – and doing so publicly so that others can comment and improve on them and perhaps find easy god-free ways to mark the passing seasons with their friends and families too.

What is Chanukah all about?

The first thing we need to do is figure out what Chanukah is about, why do we get together every year to light candles eat particular food? Some of these traditions will be specific to my personal preferences, my family, my community, my country and my ancestors traditions. Yours will probably differ – but that’s the joy of variety.

On Chanukah we:

Light the Chanukiah:

  • To count the days/mark the passing of time.
  • For an excuse to get together every day for a week (especially now that most of my siblings are living in difference places)
  • Because lights are pretty
  • To cheer us up at what can be a down-trodden time of year (it’s getting colder, it’s getting wet – but we’re not quite remembering our coat every time we leave the house).

Decorate the house – especially with lights

By the time Chanukah comes around, it’s usually dark when we leave work. It’s also dark when we get out of bed. Humans like daytime, we’re not nocturnal creatures. Brightening up our house – especially on the outside – is almost like saying “It’s dark, we might have street lights to see the path – but lets add colour to make us happy too”. We’re turning the darkness into happiness.

Give Presents

Because the giving and receiving of gifts is nice. Gift giving on Chanukah has actually become less central to my family as we’ve got older.

Gambling

The playing of Deeidel traditionally stems from when the Jews were prohibited from teaching Torah under the Greeks they would hide out in the forest to study Torah – if the Greek patrols came around they’d hide the learning materials and pull out spinning tops – pretending they were just playing with them.

Later on the Dreidel was incorporated into the Chanukah traditions and the letter was added to relate it to the Miracle of the Oil. This is inherently problematic for a humanist Chanukah which is trying to avoid the supernatural.

The tradition of gambling on Chanukah seems to stem from the Dreidel – rather than anything else. Gambling always starts with hope – even though you know that hope is usually not going to come about. This could tie in nicely with an idea that the story of Chanukah is about fighting for what you believe in – and of being hopeful but realistic.

Humanist Chanukah Ceremony

With all that in mind, perhaps we’re ready to put some words down.

Welcome to Chanukah

Chanukah is the Jewish festival of light. As the nights get longer and the days get colder it can be easy to contrast this season with the warm and bright summer which suddenly seems so long ago.

Spring might be only a few months away, but those months will be filled with not-enough-jumpers, forgotten rain coats and slippery pavements.

Festival of Light

As an antidote to this downtrodden time of year we try to bring more light into the world. We decorate our homes – inside and out. We make an extra effort to see our friends and families – to bring light into our hearts, but also to connect with them in advance of the tough season ahead – a season when many people struggle with ill health, cold houses, tough transport and isolation. It’s a chance to remind us of who we have, and to remind others that they can call on us if they need any assistance.

A Story of Hope

The story of Chanukah tells of a small band of people fighting for what they believe in against a great and mighty foe.

The tale goes that King Antiochus destroyed the second temple and outlawed Judaism. The Jews fought for a couple of years to take back their temple – eventually winning! They rededicated the temple – the Hebrew word Chanukah means Dedication – and their culture survived.

The world today is full of so many rights, but also so many wrongs and we often feel helpless. Sometimes the biggest contributions we can make might still seem tiny in the grand scheme of things.

Even if I wasted nothing; travelled and ate responsibly; and considered the impact of my choices – would the world notice the impact?

No – it probably wouldn’t but if we were one of a thousand other people doing the same then the collective impact will all add up.

The Story of Chanukah is one of hope in the face of big issues, so whether you’re fighting to end animal cruelty, reduce environmental damage, to care for the needy or for a more just world – whatever your good fight is don’t give up on it.

Lighting the Lights

We’re now going to light the Chanukiah. We’ll be lighting all 8 branches because today is the 8th day of Chanukah. Once they’re lit, I’d like to invite you to spend some time enjoying their light and their warmth and to remember this moment when the whole world seems to be dark and cold.

Light the candles

Category:

Why turning the lights off matters

This article was making the rounds on Social Media this afternoon, and I felt the desire to respond. Why Jewish Environmentalism is Pretty Useless
I was once asked what difference I thought I was making on my own, it’s not like I’m out converting 1,000 people to veganism – now that would make a real difference.
 
But for every 1 person converting 1,000 – there are 1,000 people quietly getting on with being a vegan. I was one of them.
 
The article seems to say that our individual actions don’t make a real difference, what we need is a change in society. Yet he then suggests that a change in society starts by talking to our neighbours – who are individuals.
 
I don’t agree with the sentiment, if our Synagogues work on helping our congregates to live sustainable lives, and churches, mosques, councils, scout groups and drinking buddies work with their communities then we’ll soon have a change in society.
 
The change, as I see it, is not that we need to be “more environmentally friendly” it’s that we need to stop only considering the financial and personal value of something. The race to the lowest price is why people choose unsustainable over sustainable, shop in supermarkets, buy electricity from coal.
 
Humans are lazy and averse to change, our parents and peers grew up eating whatever they wanted, buying snazzy new gadget and recreationally shopping. None of those are sustainable, but they’re tasty and fun so what the heck?
Category:

Object to the Hasmoneon Development on Copthall Fields

The decision is now with the Mayor of London

If you’d like to object to the planning application to build on the Copthall Fields (please do!) this is what you need to do, since Barnet (narrowly) approved it – it’s now with the mayor.

Click here to open your email client with the below details pre-filled.

Send your email:

To: [email protected]

CC: Andrew Dismore <[email protected]>

Subject: Objection to planning application Ref: 16/6662/FUL Hasmonean High School 2-4 Page Street London NW7 2EU

Body: In the body explain why you’re against.

Email Body Tips

Format your email body like this:

  1. A nice formal greeting. “To whom it may concern” or “Dear All”
  2. A sentence or two about who you are and your connection to the field. (e.g. a local resident, someone who explores London’s green spaces etc).
  3. List your reasons for objecting (only some things can be considered – pick them from the document below).
  4. Thank them for their time, and perhaps say you’re looking forward to their decision.
  5. Sign off with your full name and address (required, without your name and address the objection can’t be used).

You can only object on certain grounds, use this easy guide to see what you can object based on. You don’t need to write much, just mention why you’re objecting.

http://www.rtpi.org.uk/media/686895/Material-Planning-Considerations.pdf

Do this soon! The mayor only has another week or so to respond.

Share

Share this page with anyone you know who would value keeping places like this available to the public. Talk to your friends and neighbours.

Contact the local group of residents to see how you can help further:

Contact

Category:

Draft: Coder requests for Graphic Designers / How to design for code

WORK IN PROGRESS – this is a work in progress, if you have anything to add let me know here:  contact me!

Design is important, really important. Making things look right has an incredible impact on how visitors use our creations.

But not all design is essential, and not all styles are fixed.

Over many years of coding designs from mockups I’ve come across many habits graphic designers have which are very complicated to code.

So in my quest to ease Designer/Develoepr relations I’m compiling here a list of tips for designers to help them create designs which are easy (or not very messy) to code.

Naturally, if a design is wanted it can be coded. The Internet is magical like that – but if it doesn’t really matter if the logo is 2% larger on tablets than mobiles, lets keep them the same and keep the code sane.

Do use Rows

Everything on the web is either a rectangle or sits inside a rectangle.

You cannot see the rectangles which are responsible for layouts, but they’re still there. Making them overlap is possible, but not easy to do right.

Keeping things aligned in these invisible rows and columns makes coding life much easier.

Don’t make small changes

Every tiny visual change requires code to make the change and define when or where to apply the change. Having a button be 3px taller on the newsletter signup form than on the contact form requires about an extra 6 lines of code.

Don’t mix percentage and fixed widths

Having the form-labels be a fixed 150px wide and the form element take up the rest of the page is not fun to make happen in code. Either use percentage widths, or use fixed widths (which can be defined differently at different overall widths, but see “Don’t make small changes” above.

Category:

Pixel Density vs CSS

Pixel Density. This post is part sharing my research over the past few weeks, and part continuing it by requesting your feedback in the comments below.

Years ago everyone got excited for Retina and it’s high density pixels. Now every smart phone has it’s own configuration all the up to a Sony with 806ppi (a PC monitor usually has 72px).

The question is – how do we accommodate this so a phone can look awesome and a PC can still load fast and efficiently.

Vectors

The real answer, it seems, is to use vectors wherever possible. SVG support is here in all recent versions of all major browsers. Perfect for icons and fancy elements.

HTTP2 Push means we don’t even need to sprite them, but you still can if you wish.

Fonts are vectors, CSS is all vectors. Looking good.

Bitmaps

For bitmaps – photos and graphics – we have srcset so we can tell the browser which sizes of the image are available, and let the device pick the best size (based on pixel density, network speed, user preference – amazing!). Srcset works everywhere except IE (but srcset falls back to the old src way anyway, so no difference).

The PX Value in CSS

The big question is what do we do with “px” values in CSS – which are increasingly meaningless. They could just become an arbitrary CSS value which devices calculate against their Pixel-Ratio and that may well work forever.

Another possibility is do we use Viewport values for everything – one viewport value is 1% of the width or height of the viewport. It’s an exciting new value!

And guess what? Viewport Units are already widely supported!

Conclusion

In short: The situation is pretty great  🙂 The PX value is probably going to stick around for a bit (unless I’ve totally missed something) but devices know that and they’re happy to accommodate you for now.

Other Questions?

If you have other comments, or questions, leave them in the comments below.

 

Categories:

What Minimum Screen Size for Responsive Sites?

Until recently I’ve been testing responsive sites down to 320px out of habit but without really knowing whether it’s worth the effort. After all, Bootstrap 3 only has media queries down to 768px and Bootstrap 4 will be 34em (roughly/often 544px).

So should we bother optimising responsive websites for 320px, 480px, 768px or bring back the 1990s with Best Viewed in 800×600

I had a play with some stat from statcounter.com to find out.

My Process

  1. Show Screen Resolutions for the 12 months up to June 2016.
  2. Filters it for data for the UK (since most of my sites are mostly visited by people in the UK)
  3. Delete all screen resolutions wider than 1000px.
  4. Combine the matching widths – ignoring heights.
  5. Plot them on a graph

The Graph

The graph has two lines – one for individual market share and one for accumulative market share (i.e. how many people have 800px or smaller).

The aim was to find where the browser width jumps to a notable proportion.

responsive-webdesign-optimisation-width

The Results

The results are fascinating! 2.5% of visits come from a browser less than 720px wide but 15% have a screen bigger than that – and nearly double that have at least 800px.

The case for a minimum 720px Width

What to optimise for depends on your market – if you’re happy with 2.5% of your visitors getting frustrated that your site does not work – then don’t bother with less than 720px.

The case for a minimum 320px Wide Responsive Site

Optimising for 320px instead of 360px will only help 0.12% (one person in every thousand) use your site better – for a small business website getting 75 hits a day that’s one person every fortnight who’ll have a less than optimal time on your site.

Finding out who (or what, if they’re bots) are using very narrow screens would also be interesting. Are these bots, browser bugs or perhaps people just making a window smaller to get it out the way for a while? If they’re not your target audience, you can forget them and spend your time making the wider-screen experience excellent.

Raw Data

If you want to have a play yourself, here’s the data formatted as CSV:

Screen Width,Share %,Accumulative Share %
320px,0.121538461,0.121538461
360px,0.576923077,0.698461538
412px,0.049230769,0.747692307
480px,0.011538462,0.759230769
534px,0.244615385,1.003846154
540px,0.01,1.013846154
600px,0.947692308,1.961538462
601px,0.293846154,2.255384616
640px,0.063846154,2.31923077
720px,0.022307692,2.341538462
768px,12.76846154,15.11
800px,13.14846154,28.25846154
819px,0.019230769,28.27769231
854px,0.266153846,28.54384616
900px,0.016923077,28.56076923
911px,0.056153846,28.61692308
962px,0.011538462,28.62846154

Feedback

I’m not statistician and other interpretations of these results might be useful. If you have any feedback or other thoughts – let me know in the comments below.

Tags:
Categories:

WordPress Shortcodes for Website Editors

Overview of Shortcodes

WordPress Shortcodes are snippets of code which WordPress turns into more advanced things. For example the gallery shortcode is very simple in the editor, but turns into a complicated bunch of code for displaying many images.

A basic shortcode is a word wrapped in square brackets, like this:

[gallery]

Simple Shortcode

A shortcode to display the most recent posts might look like this:

[recent-posts]

you can put that anywhere you like in your post body and when you view it on the front-end of the website it’ll display a list of recent posts.

Closing Shortcodes

Some shortcodes can be wrapped around some text, for example a shortcode might make a paragraph stand out and flash. In this case you put the usual shortcode form above before the content, and a repeat of it but with a forward slash added after the first square bracked after the content.

[stand_out_and_flash]This is the content[/stand_out_and_flash]

The shortcode will then generate some code to go before and after the content – in this case to make it stand out and flash.

Shortcode Settings

A shortcode can also have settings – this lets you use the same shortcode in different places but with different results. Taking the example of the recent-posts shortcode above we might want to choose how many of the most recent posts to show. We do this by adding a space after the shortcode name, followed by the setting name, and equals and then the value – followed by the closing square bracket.

You can add as many settings as you like (as long as the shortcode supports them) by repeating the format.

If the value of the setting contains a space (or some other special characters) you need to put it in quotes (you can put all values in quotes if you prefer too).

You don’t repeat the settings in the closing shortcode (E.g. the [[/stand_out_and_flash]] – they are always just a forward slash followed by the shortcode name.

Here are some examples:

[recent-posts count=10 order="oldest first"]
[recent-posts count=5]
[stand_out_and_flash flash_speed=fast] This will flash really fast[/stand_out_and_flash]

Have any questions or tips about Shortcodes? Ask in the comments below.

Category:

Download MyDefrag-v4.3.1.exe

One of my favourite defragmentation tools MyDefrag (formerly known as JKDefrag) has long ago stopped development and recently the website has also gone down. However the software is still fully functional and as useful as the day the bread was baked.

MyDefrag was maintained for years as an excellent, free defragger. It’s essentially feature complete and just kept on ticking, but after a problem with the mydefrag.com hosting Jereon decided to let the site close.

In his final post on the former official MyDefrag forum he said he hopes that free software download sites keep serving it up for download – I’ve not found it terribly easy to find so I’m hosting my own mirror here for my own benefit and yours.

Download MyDefrag

MyDefrag Download Verification

You can pop the download URL into VirusTotal.com to do an online-virus scan for some reassurance: https://www.virustotal.com/en/

  • EXE: http://patabugen.co.uk/wp-content/uploads/MyDefrag-v4.3.1.exe
  • ZIP: http://patabugen.co.uk/wp-content/uploads/MyDefrag-v4.3.1.zip

Unfortunately I have no other way to prove that the exe is not the original and untouched download from the original site (I made the zip myself) – since there isn’t a checksum listed and available via archive.org. You’ll just have to take my word for it I’m afraid. I’m hosting a MyDefrag download because I love the software, use it frequently (and recommend it in my guide to cleaning your own computer)

Thanks Jereon!

This feels like an appropriate place to put a sincere thank you to Jereon for his years of time and effort to make MyDefrag! The donate button has died with the website, if you didn’t have a chance to donate before and find a way for people to donate now let me know in the comments so we can keep the money-sharing-love alive.

Tags:
Categories:

Kindu Klub Collection

At the end of this month I’ll be going to Ethiopia to spend a couple of weeks with a youth group who work with children in Gondar to support them through life and school.

It’s a super project, you can read more about them here: http://kindutrust.org/projects/kindu-klub/

I’m also in the process of trying to get in touch with some Scouts over there too!

Love Football?

One of the things the children love most is a passion shared by many here in the UK too. Football!

If you have any spare football related items in need of a very worthy new home please let me know! The club are trying to setup a football team and could really use some football shirts, boots or other clothes.

Not into Football?

If your wardrobe, like mine, isn’t packed full of old football stuff it would also be really useful for me to take any of your spare:

  • Laptops – help share the joys and opportunities of IT and the Internet
  • Shoes – Of any shape, size or colour
  • Hygine Stuff – New/Spare Tooth Brushes, toothpastes, flannels, towels etc

Already Decluttered?

Good for you for not keeping stuff you don’t need! If you’d still like to help, you can donate some cash which I’ll pool together to purchase the items most required!
Please get in touch if you have anything you can offer and we’ll work out drop offs or collections!

All the little things from all the good people will add up to make a difference 🙂

WordPress Command Line Script Boilerplate

Recently I had a client who wanted me to import their posts from BlogSpot on to the shiny new self hosted WordPress I’d built for them.

The official importer is OK, but it didn’t do everything we wanted. Specifically not all images had featured images, and those which did often had a copy of the image in the body as well as the featured image. What I needed was a script to go through all the posts, find an image, sideload it so it’s no longer hosted on Blog Spot and set it as the featured image then remove any other images from the post using a Composer package.

I’m not going to share all those tasks here, but below you’ll find a boilerplate script which should give you everything you need to run WordPress admin operations on a selection of posts. Getting access to the Admin functions is a little more complicated than not since it includes all the plugins/admin side things and their baggage.

This is a CLI script designed to be run from the command line, but you could probably adapt it to run through Apache if you had reason to do so.

If you saved this as ‘update_everything.php’ in a ‘scripts’ folder which lived next to your ‘public’ folder (which contains WordPress) you’d run `php scripts/update_everything.php` to use. No output from the script indicates success (unless you modify it to output something).

<?php
// DO NOT RUN THIS SCRIPT without a modifying it, backing up and testing it first.

// This script assumes it's saved in a folder called `script`s and you have
// the following directory layout:

// Soil plugin breaks on CLI, so hack these into place for it. You don't need
// these if you only have well written plugins installed.
$_SERVER['SERVER_NAME'] = '';
$_SERVER['SERVER_PORT'] = '80';

// Give us all the errors!
if (!defined('WP_DEBUG')) {
 define('WP_DEBUG', true);
}
// Include these so we can access all the wordpress bits.
// Change this path to point to wp-load.php, after that we can use ABSPATH
include_once __DIR__.'/../public/wp-load.php';

// These specific includes may vary depending on which bits of admin you need
// you could load admin.php to load everything, but then you'll need to work
// around every not-well-written plugin (see below).
// Look up the function you want in the WordPress docs and it will tell you which
// file it's located in - add that file here. If you then get a "fu
require_once(ABSPATH . 'wp-admin/includes/media.php');
require_once(ABSPATH . 'wp-admin/includes/file.php');
require_once(ABSPATH . 'wp-admin/includes/image.php');

// This SEO Recdirect plugin doesn't play well when you're updating but not
// including every field. You may need to add/remove from these remove_action
// calls or disable other bits of plugin if they're causing trouble.
remove_action( 'save_post', 'seo_redirect_save_current_slug' );
remove_action( 'save_post', 'seo_redirect_save_postdata' );

// Find the post types with a regular query, I wanted everything.
$query = new WP_Query([
	'post_type' => 'post',
	'nopaging' => true,
]);

// This sample script will replace all post content with "Hello, World!";
while ($query->have_posts()) {
	// We are now in the famous WordPress loop and can use functions like get_the_ID() to refer
	// to the post in the current iteration
	$query->the_post();

	// Get the content
	$the_content = get_the_content();

	// Do something with it - you want to change this bit, obviously
	$the_content = "Hello, World!";

	// Put together an array with the post details for updating
	$newPost = [
		// Include ID to tell WP to update this post
		'ID' => get_the_ID(),
		// Set any other fields we want to change
		'post_content' => $the_content,
		// One of the plugins I had installed got confused if I didn't include
		// this in the update too
		'post_type' => 'post',
	];

	// Perform the update
	$error = wp_update_post( $newPost, true );

	// Check if we got an error
	if (is_wp_error($error)) {
		// Output any errors to the console
		print_r($error);
	}
}
// Output a new line to clear the console in case anything was output above
echo "\n";

Let me know if this boilerplate was useful and what you’ve done with it in the comments below. Any tips for improving it are also welcome!

Tags:
Category: