This week in Firefox: Testing Graphics

On Friday February 17 2017, the Firefox Beta community tested Firefox 52 Beta 7. The focus of this test day was on WebGL. WebGL is a JavaScript API for rendering¬† graphics in the browser without the use of plugins such as Flash or Silverlight. Graphics testing involves testing how Firefox renders websites that use WebGL … 

 

How To Read and Write Files Using Python.

Reading and writing to files using Python is easy to do. In this post, I will go over how to read and write to text files.

 

How To Download Entire Websites Using wget.

An invaluable tool that I use a lot is wget. wget is a free terminal utility for downloading files from the Internet. I do not have a reliable Internet connection and when I do get online, I am usually on a metered network. Not being able to connect to the Internet when I want to … 

 

Python: Storing Objects Using Shelve

The shelve is used to store Python objects to a file in a dictionary like format.shelve is used where using a relational database would create too much overhead or is unnecessary for example to persist data between program runs. Shelve is part of the Python Standard Library so getting it to work in your programs … 

 

These weeks in Firefox: Testing WebRTC and Responsive Design Mode

On Friday 3 February Mozilla held a test day for Firefox 52 Beta 3. The new features under test were WebRTC components; DTMF and screen sharing. WebRTC is a collection of communication protocols and APIs that enable browsers to provide real time communication services such as desktop sharing, video calling, file sharing and more without … 

 

Python: How To Generate a List Of Letters In The Alphabet

In today’s post I show you how to use three python built in functions to populate a list with letters of the alphabet. To achieve our goal we will the chr() and ord() built-in functions. I will also explain how to use the map() function to make your code look cleaner. To the code: Take … 

 

Debugging Python Code

The Python programs I have written from the time I started learning Python up to now are very simple scripts. I still consider myself a beginner, but I have started to write not so simple code that is usually very brittle and buggy. I have a Github repo of scripts that automate common tasks on … 

 

A Summary of PEP 8: Style Guide for Python Code and PEP 257: Docstring Conventions.

Most programming languages follow a basic style or formatting standard to make it easy for others to read your code. In Python, we have the PEP 8 and the PEP 257 conventions. PEP stands for “Python Enhancement Proposal”. “PEP 8: Style Guide for Python Code” and “PEP 257: Docstring Conventions” are documents that contain conventions … 

 

Set Comprehension in Python

In a previous article I discussed list comprehensions. Today I will talk about set comprehensions. Set comprehensions were added to Python in version 2.7 and they are similir to List Comprehensions, the only difference is that we use curly braces instead of square brackets when making them. A set is an un-ordered collection in which … 

 

Python List Comprehensions

A special syntax form in the Python language is the list comprehension. List comprehensions allow programmers to make their code more compact and (sometimes) harder to read if they push the comprehensions too far! The syntax consists of an expression in square brackets to create a new list. In order to show the beauty of …