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

Python - Using global variables in a function

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

Python - Convert bytes to 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

HTML - Create button that acts like a link

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

JavaScript && Python - Removing a specific element from an array

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. How do I remove a specific value from an array...

Read more

Is Clothing An Identity Symbol For Nerds?

In May 2012, young 27-year-old Mark Zuckerberg wore a sweatshirt instead of a shirt and tie to meet with potential investors for Facebook's Initial Public Offering, to the dismay of well-dressed financial analysts around the world. With his casual wardrobe, Zuck entered the pantheon of great nerd technology entrepreneurs; famous in part for the "uniforms" they wear (or wore). Steve...

Read more