The Programmer Blog RSS

The Programmer Blog is here to help you, the programmer. We do our best to provide useful resources that offer explanations to popular programming problems, across a variety of programming languages. If you would like to suggest a blog topic or have a question, please leave us a message.

global, python, variables

A few of the most common Python questions revolve around global variables. How can I create or use a global variable in a function? If you create a global variable in one function, how can it be used as a global variable in another function?  Check out our example of using global variables in a function below.   testvar = 0 def set_testvar_to_one(): global...

Read more

bytes, python, python bytes to string, string

Converting bytes to a string in Python can be done by decoding the bytes into a unicode string. Below are a few examples of how to convert bytes to a string in both Python 2 and Python 3. We hope this quick guide helps the next time you are converting byte values in Python! If you need to convert int to string,...

Read more

Button, HTML

Learning how to create an HTML button that acts like a link is surprisingly difficult for those new to web programming. Let's create an HTML button that links to another page and explain what exactly is needed for this implementation. The tricky part is that an HTML button is typically nested within a form and its job is to either submit the form...

Read more

array, Javascript

Removing one or many elements from an array in JavaScript is pretty straightforward. Though with all things programming there is some nuances that you should be aware of and there's a million ways to do it. Let's take a quick look at a few different examples to manipulate elements in JavaScript arrays. Removing elements from the end of a JavaScript array...

Read more

for, for loop, loop, nested loop, python, python for loop

Python for loops are one of the one of the most commonly used methods for iterating over a sequence. The Python for loop is similar to that of a for loop in other programming languages. View our for loop examples below. Python for loop flowchart Before we dive into examples of how to use for loops in Python, let's take...

Read more