Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Use RegEx To Test Password Strength In JavaScript

Recently one of my Twitter followers asked me how they might validate password strength using regular expressions (RegEx) in their code.

Regular expressions via Wikipedia:

A sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching.

RegEx is nice because you can accomplish a whole lot with very little. In this case we are going to check various aspects of a string and see if it meets our requirements, being a strong or medium strength password.

Read More

All About Java Modifier Keywords

I’ve been a Java programmer for a while now, however, recently someone asked me a question regarding one of Java modifier keywords and I had no clue what it was. This made it obvious to me that I needed to brush up on some Java that goes beyond actual coding and algorithms.

After a few Google searches, I got bits and pieces on the topic, but never really the full story, so I’m using this post as a way to document the subject. This is a great interview question to test your computer science book-smarts.

Read More

Sort An Integer Array Using Bubble Sort With Java

Previously you saw an implementation of Quicksort, one of the better sorting algorithms. This time we’re going to look at a much inferior sorting algorithm which generally makes its appearance in introduction to computer science type courses. I’m talking about the Bubble Sort algorithm.

Bubble Sort via Wikipedia:

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order.

The Bubble Sort algorithm is sub-par because of the outrageous time-complexity that it has for all sorting calls and we’re going to see why.

Read More

Create A Minesweeper Game With Native Android

So recently I was presented with a challenge. Make a Minesweeper game using native Android with no additional frameworks such as Unity3D or similar.

Minesweeper via Wikipedia:

A single-player puzzle video game. The objective of the game is to clear a rectangular board containing hidden “mines” without detonating any of them, with help from clues about the number of neighboring mines in each field.

This task can be accomplished many ways. For example we could choose to use OpenGL, a 2D canvas, or something else. In this particular tutorial we’re going to be using a 2D canvas because it is simple and acceptable for a game with minimal to no animations.;

Read More

Create A Couchbase Lite Todo List With Native Android

By now, if you’ve been keeping up with my tutorials, you can probably put two-and-two together and determine that I’m really trying to get into the NoSQL world. Up until now I’ve brushed upon Google Firebase, Facebook Parse, and Apache CouchDB, most of which I’ve done some kind of todo list type application. Now of course, many of my previous tutorials were based on hybrid app development instead of native.

This time we’re going to take a look at Couchbase’s version of NoSQL in a mobile Android application. In particular a native Android application.

Read More

Sort An Integer Array With the Quicksort Algorithm And Java

Circling back to data structures and algorithms, we’re now going to take a look at the efficient sorting algorithm known as Quicksort.

Quicksort via Wikipedia:

Sometimes called partition-exchange sort, is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.

The idea behind Quicksort is to take a large array of values and divide it into two smaller arrays, doing this recursively, and swapping elements.

This is one of the fundamental algorithms you’ll learn in any computer science course. It is also a very good question that could be asked in a job interview for an engineering type position. I’m going to help you through it using Java.

Read More

Using Gradle In Your Command Line Android Project

I’ve been developing mobile Android applications since 2011 and up until now I’ve been using nothing but Apache Ant for building them.

Now you’re probably like, it is 2015, why aren’t you using Gradle like the rest of the world? Well, I like Apache Ant, and I had no real reason to switch. However, I’ve decided this is the year I jump ship.

If you’re like me, a no IDE rebel coming from an Apache Ant world for Android development, this might help you out in making the switch to Gradle.

Read More