Programming

S.O.L.I.D. Principles of Object Oriented Design

In a previous article, we talked about objects and classes, and how they can help you better organize your code.  The SOLID principles of Object Oriented Design are a set of principles you can follow to make better use of objects and classes.  These principles are not rules.  They are more guidelines to try to stick to while developing your applications. As you become more familiar with these principles, you will find that there are times when it makes sense to follow these principles. And Read more […]

Read More

Python Switch Statements

In languages like C, you have Switch statements allowing you to evaluate the input, then have a few options for the output.  Switch statements are used in place of a series of if/else statements in order to make your code more readable.  Case statements can also have better performance than a traditional if/else setup.  This is because if you have a bunch of if statements, the system will have to evaluate all of the if statements at the time of execution.  However, with a case statement, it is Read more […]


backlit keyboard

Manually create TCP Printer Port using Powershell

Adding Network printers to a print server can be cumbersome when doing it through the GUI. For that reason, you may want to attempt to do it via a CLI interface. In this article I describe the Powershell commands for adding a TCP port for a TCP printer. As well as how to bulk create the TCP printer ports using a Powershell For loop.SyntaxThe syntax for adding the TCP print port via powershell is as follows:Add-PrinterPort -Name “ip_IPAddress” -PrinterHostAddress IPAddressExamplesHere is an example Read more […]


purple code

Reading and Writing Files in Java

A common task in any programming language is Reading and Writing files. Below are a couple of functions that can be used for these purposes, along with descriptions of their use. Be sure to import java.io for these functions to work.


code in dark text editor

Sending an email Programmatically using Java

This article will describe how you can send emails pragmatically using the Java programming language. The example below includes a function you can use for easily sending emails from your Java application. Prerequisites If you have not already, be sure you download and install the latest Java Development Kit (JDK). You can find the download here. unfortunately the javax.mail libraries are not included in the Java JDK, so you will have to download them separately. The java mail library can Read more […]


glasses in front of computer screen

Scripting Basics

Scripting is a very useful skill which will save any Sysadmin a lot of time. Who wants to go to every device in their environment and perform the same task over and over again? In this posting I will cover a few basics for those getting started in scripting.