Programming Theory

Best practices, structuring of code, dissecting algorithms and talking about the “Why?”

Avoid Tying Classes to Your Forms

So you have a great class written and you want to integrate it into your project. Whether it be C#, Java, VB even C++ you may have asked yourself "How do I go about getting my class to update my form controls?" or "How do I get the class to change something on my interface or another class?" It is a common question asked on the board and the answer ...

Creating Graphical Clocks in VB.NET

Someone on the board the other day had me thinking about graphical clock displays. Displaying something like the current time or maybe the time remaining of a song or even a general counter. Sure we can create these things using standard text, but what about nifty pictures? With this example we are going to show below, we could theoretically make counters that show wingdings, clocks displaying the time in binary ...

Threads, ProgressBar, and File Processing in C#

We have had a few questions on the board in recent times asking about the best way to show the progress of a long running process; such as file reading of a HUGE file. If you have a file with tens or hundreds of thousands of lines, or datasets which may have millions of records, it is going to take some time to process. It is fine that it takes ...

Zippity Do Dah, Zipping with Java, Yay!

My oh my what a wonderful code day! Welcome to another entry of my blog and I hope you have enjoyed your stay. Before we cover todays topic of creating zip files in Java I wanted to thank everyone who has subscribed to my blog and added links through their websites. I appreciate the support and enjoy bringing you on a journey through this vast programming world. We have tamed ...

Find High / Low Value in Array (Definitive Series)

Welcome to another kick ass entry of the Programming Underground. On today's entry we explore a basic way to find the high and low values in an array as part of our Definitive Series. For those of you who are not familiar with my Definitive Series, it is the exploration of a concept and examples provided for 5 major languages (C++/C#/VB.NET/Java/PHP). Doing a search on my blog will also uncover ...

Train / Bus Reservation Example in Java

ALLLLLL ABOARD! Buy your tickets right here for the DIC train of love. In this episode we talk about a problem that pops up once in awhile on the boards, a seat reservation system. People have their preferences and the DIC train is no different. Some people like the windows, some people like the aisle seats and some even like to hang out there in the caboose (Yeah you know ...