Archive

You are currently browsing the Miles Per Hour blog archives for February, 2009.

Feb

26

The otherside of Web Development

By mike@mike-miles.com

I thought I would take a moment and talk about some of the other aspects of web development (and any development for that matter). management and clients. Not that I know a whole lot about these areas, but I feel that as a developer it’s important to have an understanding of these types of things.

Management

Unless you’re a freelance developer you most likely report to a PM (Project Manager) and/or Dev Lead (Sometimes these roles can be one in the same).  Some people I know regard their PM’s as strictly management, someone who just bosses you around.  That’s the wrong way to think.  A PM to a developer is like a handler to a spy. A handler is a spy’s contact, who then relates everything to the agency/government that spy works for, they are the spy’s go to guy.  That how you should think of your PM, he’s your contact to the other side of development.   If you have a problem with a clients demands, or with upper management your PM should be the guy (or gal) you talk to, its their job to make sure everything runs smoothly, and for that to happen they need to keep you (the developer) happy.  Thats not to say they wont kick your butt when they need to (stuff does need to get done after all).

Just as you’ll confuse your PM with programming terms and talk, they most likely will confuse you with management terms, like ‘agile practices’ or ‘gant chart’, ’serial requirements’, ’scope document’.  It’s important that you two meet on some level playing ground (especially for that last term, oh boy).  So I suggest as a developer you brush up on a bit of your management knowledge because it can make work less stressful, and easier for you to communicate your ideas and needs better.

I for example follow a blog by a Joshua Milane (http://mittechnical.com) he’s a PM with alot of experince, and seems to write about the topic in an easy to understand method.

Clients

They people who cause you all your headaches by demanding ridiculous ideas that they expect to be done ASAP.  No developer likes talking with clients (at least any that I’ve met) plus that’s one of the reasons why you have a PM (see above).  But sometimes the inevitable happens, and you have to deal with clients directly.  My approach for dealing with and talking to clients is the same as my programming method, K.I.S.S.  No not the band (thou, they do kick ass)  I’m talking about Keep It Simple Stupid.  If you start getting to technical with a client your going to confuse them, confused clients are unhappy clients and unhappy clients dont pay.  So Always try to explain things in a simple form (if you have to explain yourself) and be honest with clients.  If you cant build something for them, don’t lie about it. Sure you may lose the client, but they may come back to you in the future with other projects because of how you handled them.

Ok its time to go back to what I know, I have a few functions to build.

Bookmark and Share

Feb

23

Itunes like progress/capcity bar

By mike@mike-miles.com

Back in December I was working on a project that needed to show progress bars.  They progress bars had to show the progress of multiple items, and it was explained to me that they should resemble the percentage bars in iTunes that show how full your ipod / iphone is, like so;

Not a problem I thought to myself, all I needed was a few images and the ever useful PHP GD library .  If you’ve never used the PHP GD library before, a brief overview:  It’s a graphics library that allows you to create dynamic graphics.  (Told you it was brief).

Of course the great thing about PHP is that it is open source, so anything you need todo has already practaclly been done. After googling I found this percentage bar code created by netlobo.com, as well as this progress/percentage bar WebAppers (theirs was in javascript but it gave me a starting point). Both of these were close to what I wanted to do, I just needed to tweak and combine them.

I should note, that since I did use code from both those websites (which are covered under the Creative Commons license and GNU General Public License) this code covers the same licensing.

The Process

My thought process for creating this was pretty straight forward from the get-go.

  1. Get percents of the items that will be on the bar
  2. Create a “bucket” image
  3. for each percent, fill part of the bucket with a color
  4. Output the whole bar.

And that’s pretty much the route I followed.  It was pretty simple actually.

Sorry to say, this code has been removed for legal reasons

but, please check out the sources I used when developing my code (they are mentioned above)

Bookmark and Share

Feb

18

PointsWatcher

By mike@mike-miles.com

So this post is mainly just to gloat.

I’ve finished my iPhone app, PointsWatcher! (www.PointsWatcher.com) In case you havent checked out my projects page, here is a quick run down of the app for you.

Recently I started doing WeightWatchers with my girlfriend (moral support and what not), but being the technophile that I am I wanted to incorporate my iPhone with it.  The result was PointsWatcher.  PointsWatcher allows you to keep track of your daily ww Points and an inventory of the food you eat, it also features a points calculator!

So basically it takes alot of the effort out of figuring out point values for your food (and allows you to store point values for future use).

It’s web based, so you can access it from anywhere, but the interface is formatted for use on the iPhone.

You can read the full description about this project here , or check out pointwatcher at its site www.PointsWatcher.com

Bookmark and Share

Feb

17

How to Learn a new Language

By mike@mike-miles.com

Recently I started looking into learning some new programming languages (Like many programmers I know, I’m always looking for a new challenge).  The languages I’m interested in are Cocoa (Apple’s Objective-C based programming environment, for making an iPhone app) and Ruby (a language I’ve been wanting to pick up for a while).  Since I’m in the process of learning these languages, I’d thought I would share my practices for learning new languages.

First I always find it is important to  figure out why you want to learn that language. For example, I want to learn Cocoa so that I can build an actual, non-web based iPhone application.  Then read up on the language, learn the terminology, the structure, syntax, ect.  After that I believe in ‘learn by doing’, as in start developing with that language.  Here is the process of developing I usually follow for new languages.

Hello World

This is most likely the first piece of code you ever wrote, a simple piece of code that outputs the words ‘Hello World’ to the screen.  I like to keep up this tradition with every language I learn.  It’s basic, simple and produces something you can see.

Fibonacci Numbers

Next up, I try and output the fibonacci numbers (1,1,2,3,5,8,…).  It’s a simple sequence that involves using a for or while loop. Agan basic, simple yet a step up from ‘Hello World’.

FizzBuzz

Another classic programming example. If you dont know for fizzbuzz you output every number between 1-n (what ever you want your delimiter to be).  for every number that is a multiple of 3 you output ‘Fizz’, for every number that is a multiple of 5 you output ‘Buzz’, and every number that is a multiple of 3 and 5 you output ‘FizzBuzz’.  A more complex piece of code, that gives you practice with the languages if statments, loops and output, yet still simple enough to be easy to write.

Functions

Next up I take the last three examples and make them into functions.  First functions that have take no parameters (just to test function calls). Then into functions that take parameters (to test variable passing). And then finally functions that take user input.After those simple practices my methodoligy changes depending on the language, for example if it’s an object oriented language I’ll go ahead and try writing classes and objects. If not oo I’ll try writing more complex functions (recursive, sorting, ect).

Those practices usually give me enough practice with a language where I can start building simple programs, which I can then build upon and develop.  I also try to find online communities where I can find tutorial, examples and tips.

Bookmark and Share