Skip to content

Posts from the ‘Programming’ 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

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

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

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

21
Feb

Programming 101 – Lesson One: Hello World

So I got a request to do a basic programming guide.  This will be the first in a multi-part series of programming guides based off of java.  In later tutorials I will move onto how to make plugins for bukkit, however first you must know the basics of java.  This lesson will consist of setting up your development environment and writing your first program (a hello world  program).  I will be starting from the ground up, so if you have any previous programming experience a-lot of this may be review. Getting started