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.


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

Python - For Loop

The Python for loop is used to iterate a sequence. The for keyword acts very similarly to that of C++ and Java. Let's have a look at some for loop examples below. For loop flowchart Before we dive into code examples, let's take a quick look at the flowchart below. First we execute the body and then we check a condition. If it's true we...

Read more

gift guide, programmer gift, programmer mugs, programmer shirts, programmer stickers

5 Gift Ideas for Programmers, Developers and Coders

We know finding for the perfect gift for a programmer, developer or coder in your life can be tricky. But that's why we're here! Below we’ve put together a list of top programmer gift ideas to give you some ideas and hopefully secure the perfect programmer gift. If you’re a programmer, developer or coder and have any  suggestions, don't hesitate to...

Read more

c#, c# int to string, int, string

C# - Convert int to string

C# int to string conversion is actually one of the less painful conversions to do. Converting int to string in C# is easy because everything we need is built right into the library. Keep reading to learn the many ways to convert integers to strings in C#. Why convert int to string? Converting an integer to a string is a quite...

Read more

c#, switch, type

C# - Switch on Type

Prior to C# 7 switching on data types was fairly tricky. Luckily with the latest update we can do a C# switch on type very easily. Let's have a look below at why type switching is useful. We will also go over some code examples for both legacy C# and C# 7+. Why switch on types? Switching on an objects type is...

Read more

PHP, PHP Redirect, Redirect

PHP - How to Redirect

Creating a PHP redirect allows you to redirect a user to a different page on your site. PHP redirection typically is used when you are attempting to permanently redirect the page, therefore it should return a 301 Moved Permanently response. If you are only temporarily redirecting you should use a 302 Found response. Check below for a examples of each implementation. ...

Read more