Desktop Programming

Desktop programming related articles not related to .NET (Java, Python, Ruby etc)

Function Pointer Basics in C++

Beginners to C++ programming find the concept of pointers foreign to them. Pointers, and code that manipulates pointers (aka pointer arithmetic), can even be daunting to some of the most seasoned programmers. Pointers in C++ account for a fair share of bugs in programs due to the lack of understanding. So why even use them? Well, besides being the most problematic, they are also some of the most powerful features ...

Small High-Low Game Example in Ruby

Well it has been awhile since I made an entry so I thought I would make one while also answering someone's question. The user named "Cunningham" asked about an example high-low number guessing game to get started with learning Ruby. The game is essentially guessing the random number generated by the computer to see how quick you can guess it. The computer picks a random number in a range of ...

Introduction to a SkipList Data Structure in Java

Hello everyone! The other day I was approached by macosxnerd101, a newly minted moderator at Dream.In.Code, and asked to contribute to a new thread coming up on Java data structures. Now most of the new programmers here know of the basic data structures like binary trees, arrays, heaps or stacks. Many of these topics I knew would be covered by other contributors to the thread. So I decided to introduce ...

Login to a Website from Java

Historically the question "How do I login to a website from X Language?" gets asked from time to time on Dream.In.Code. The answers to this question has not been the greatest and these questions tend to be largely ignored. I intend to put an end to this for the Java language with a simple example. The answer, while simple, does expect the reader to be at least familiar with how ...

Convert Infix to Postfix in C++

Remember those pesky equations that baffled you in like 1st grade? Addition and subtraction along with their friends multiplication and division. Hey, you wanted to go play kick ball or chase that girl around the playground... not to hook up with her but to put dirt in her hair. Well, you probably learned to write your equations in infix form like 3 + 4 or 2 * 7. This makes ...

Reflective N-bit Binary Gray Code Using Ruby

So what is behind the theory of binary gray code? It was named after Frank Gray and is a numerical system where each successive value differs from the one before it by one bit value. It is like counting in binary, but in binary counting a step may require changing two bits. For instance going from 1 (01) to 2 (10) would involve changing the most significant value 1 ...