Skip to content

Posts from the ‘Tutorials’ Category

30
Mar

An Intro To Ruby

For today’s post I wanted to discuss something a little different from my previous topics: The Ruby Programming Language (Cue the trumpets). I plan to cover a bunch of different programming languages as time goes on.   Ruby just happens to be where I will start.  Why Ruby? Because its a consistent language, has a lot of power, a nice interpreter, has been increasing in use since the creation of Ruby on Rails, and I love it.  Let me make sure to stress this first though.  Ruby is NOT Ruby on Rails.  Ruby is a programming language, Ruby on Rails in a web framework.  While I may cover MVC frameworks in the future, actually, that’s not a bad idea, this post won’t cover it.  First I’ll go into a brief explanation of the language, and then we’ll dig into the fun guts of things.

Read moreRead more

14
Mar

How To Write Clean Code or How Not To Become The Most Hated Coder In The Office

Recently I have been working with a new coworker/old friend.  And I must say there are a lot of things about writing code that I thought went without saying for any quality programmer.  But I suppose “quality” is the key word there.  In any case I have decided to start writing some posts about how to write clean code, how to design databases, and perhaps some ways tweak performance and other things.  We’ll see how it goes.  Today we start with code clarity.

So what makes me such an expert on code clarity? Well, in order to put myself through grad school I worked as a teaching assistant for many different classes.  I worked with everything including intro to programming with java, databases, computer graphics, even compiler design.  I think anyone who has to grade programming assignments will tell you two things, copied code is really easy to spot (REALLY easy) and writing clear code is extremely important.  When you are writing code for coursework only one or two people will read it; but when it is for a job, that code could stay around for a long time after you have left the company.  People will need to review it, maintain it, improve on it.  It could be looked at by a lot of people and it is fairly ridiculous to expect people to have to sit and decipher how your brain worked each time they want to make a change.  So I have created a few rules to make it simple to remember.  I’ll try to hold my tongue on speed and quality improvements for a later post.
Read moreRead more

24
Sep

[How To] Install Mountain Lion in VirtualBox

With the amount of people who were interested in whether or not Mountain Lion’s latest update was working in virtual box or not, as well as the number of people who wanted to learn how to install Mountain Lion in virtual box I decided to make a video walk through.  This is my first tutorial like this so I apologize that it is not the greatest however I am going to try to do more stuff like this.  If you want to see the videos jump past the break. Read moreRead more

3
Sep

My current project: Ka-ching

Out of the need to over complicate things I have begun a new project, it is called Ka-ching.  Ka-ching will be a way to keep track of your spare change, the initial implementation will be an interface where users can type in the change they put in their favorite storage however I will try to make an internet ready accessory which can be used to automatically have coins put in your account (aka you put the coins in the container holding it through the accessory it will automatically track it on the site).  This project is currently in pre-alpha, with my setting up a proof of concept for myself and currently expanding to be a multi-user system which is intuitive for everyone and looks good as well.  I know this will likely not get used by many (if it gets used by anyone besides myself) but it seems like a fun project.  Keep an eye on the blog for more info on the project.

18
Aug

Code Academy

Recently there has been a-lot of talk about code academy, and their mission, to build a better way for anyone to teach and learn others how to code.  Although I have read about them a-lot I decided today to finally give them a try, and I am glad I did.  This is partially a review, and partially a suggestions post.  Without further adieu, let’s begin. Read moreRead more

4
Jun

How To: Deploy Awesome New Tab Page

As part of my job, I had to figure out a way to automate deploying the chrome plugin Awesome New Tab Page to computers we sold.  Now although this seems like a straightforward task, it really is not, at the time of writing this, there is no way to export your settings as far as how the layout and what each tile has.  However after much pain and suffering (and a few expletives) I was able to find a way to do it which works quite well, and I was able to write a quick script to do it.  However here are the steps I took to solve the problem (I will let you write a script on your own as mine is very system dependent). Read moreRead more

15
May

How To: Build a Custom Toolchain Using Crosstool-ng

This was originally posted at dodgejcr.com, however with the site going down and because of how useful I found it, I felt I should repost it as well as walk you through some of the problems I had creating my toolchain. Please note that this is setup around building a toolchain for the HTC Evo Shift which is on the ARMv7 processor.  If you wanted to build a toolchain for something else you would change a few small things, however the underlying process would be the same. Read moreRead more

29
Apr

Advanced Garage Door Controls Part 2

So this is part 2 for my advanced garage door controls.  In this part I am making it so that the garage door can autoclose, there were some minor changes to the design when it comes to the features as well as the implementation.  First off I had to change over to an arduino mega because there was not quite enough space on the arduinio uno to hold the program data (I was about 5kb off from fitting).  As a reminder here are the features that it will include. Read moreRead more

7
Mar

Programming 101 – Lesson Three: Catching exceptions and implementing loops

Introduction and recap:

To recap lesson 2, we went over how to read input from the console, and then convert it to an integer.  We then used an if statement in order to parse that input and display whether the number given is even or odd.  In this lesson I will be teaching you how to use the try/catch block in order to catch exceptions that can occur, as well as teach you how to implement loops. Let’s get started

5
Mar

Programming 101 – Lesson Two: Some basic IO and if statements

Almost any program that is at all advanced takes some sort of input, whether it be a file, or a command from the user.  In this lesson we will be learning how to do some basic input and output (generally called IO) as well as using if statements in order to determine if the input is what we want in order to make a more advanced programs.  If you continue with this series, IO will be quite important while working with bukkit plugins, as they have multiple parts to their IO.  In a bukkit plugin you have commands, events being triggered, and configuration files for example.  So in this project we will be asking the user to give us a value, then we will tell them if that value is even or odd. Let’s get started