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.

API, Javascript

One of the key ingredients to an AJAX driven website is the ability to reliably get query string parameters. We will run through an example using the new URLSearchParams API and also a Javascript only implementation for legacy browsers. Using the URLSearchParams Web API Consider the url http://www.systemoutofmemory.com?id=1&firstName=Bob&hobby=Baseball&hobby=Basketball Get the query string params var queryParams = new URLSearchParams(window.location.search); Iterate &...

Read more

c#, list, random

Randomizing a list<T> can be done using the Random and a simple LINQ query. Check out our card shuffling example below: Randomizing a list of objects Given a Card class public class Card { public string Name { get; set; } public int Value { get; set; } } Initialize a new list of cards var cards = new List<Card>()...

Read more

c#, cast, enum, int, string

Casting enums can get tricky in C# so we wanted to provide a few examples to help clarify the situation. Below we are using a simple enum to demonstrate how to cast an int to a enum, enum to an int. We will also go over how to check if an enum exists given an integer or string and how to...

Read more

Welcome! While we get setup, please feel free to browse our catalog of shirts. If you have any ideas or feedback, login to your favorite social media platform and give use a shout. Our blog will strive to provide useful insight into the latest and greatest in web development and design. Stay tuned for more.  

Read more