Desktop Programming

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

5 Quick and Easy Refactoring Tips

You wouldn't believe how many programming questions I run across, on a daily basis, asking for help with programs that contain repetition, duplication and enough spaghetti code to feed half of Italy. Often times the person asking the question has a particular problem but they don't know exactly where the problem originates. So they plop down a bunch of code and say "It is somewhere in there... I think". Usually ...

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 ...