Best practices, structuring of code, dissecting algorithms and talking about the “Why?”
Today I give my take on a blog article I stumbled across today called "Computer Algorithms: Linear Search in Sorted Lists" which gives a look at applying the linear search model to something sorted. I will offer a suggestion to perhaps make this a bit better for implementation and perhaps performance reasons. So buckle up and we will take another spin around the Programming Underground! Ok, so if you are a ...
Hello once again! Today I want to talk to you about a design decision which involves validating data. Often times newbies build error prone code. This is because they are just learning and lack the experience of proper validation... and lack the experience of being smacked in the face when the code fails on the input of "a" when an integer is expected. As we become more experienced we learn ...
Once in awhile you may want to check if a file has changed its contents in some way. Perhaps you are monitoring a log file or checking to see if an exe has had a virus mess with it. One way you could do this is by hooking up a FileSystemWatcher object and monitor the file. This might be a good approach for more elaborate programs where you also want ...
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 ...
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 ...
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 ...