Monday, October 26, 2009

Frugal Programming

I was reading the article on msn here
It goes on to talk about wants vs needs, if you want something now what are the chances you'll want it in a year.
I was suddenly struck with the thought, what about "frugal programming" what i mean is, how do you decide what you NEED programs for and what you WANT programs for.

Lets break it down, sometimes I'm doing something repetitive and think I need a program, but in order to write this program it'll take say 4 hours to write and 2 hours to run, but just doing the actual work would take 4 hours.

Which is more valuable? Being able to complete the repetitive task in an efficient manner makes it more of a benefit. In addition getting more practice will definitely make you a better employee.

The problem is you look at it as a "right now" situation. The fact is you need to finish this task as quickly as possible, and you just get something working for this situation and forget about it.

What often happens is you write a program (such as the one above) for a one time task, but you never label it and stick it somewhere that you KNOW you'll find it in the future. Now that time you spent was more in the direction of wasted. Because if the task comes up again you'll either have to spend an hour searching for the program, or you'll have to spend the time re-writing it.

So what I'm trying to say is being a frugal programmer is being a programmer who can reuse what they do in as many way's as possible as to get as much value out of the "item" as you can.

If you don't have some sort of organization you'll forever be repeating work and doings over and over again until you finally sit down and say I'M GOING TO GET ORGANIZED and literally do it.

So far I've been working on a form of organization, it's tough though, because I might write one thing in C, one in perl and another in visual basic, but I have no means of correlating what they are to it. All my programs are stuffed in a folder called programs, and sorted by language.

I just recently came up with a plan (literally about 12 seconds ago), if I put a list of keywords that this particular program could be used for, or describing it in the header, I can write a script that will find all keywords and programs, so if I do a search I might be able to find things quicker.

Until I literally implement it, let me know how you organize your information/programs/data.

First Hosting

Where was your first webpage ever hosted?

With the news that Yahoo has finally killed off GEOCITIES, I immediately recalled 8th grade and sitting in front of the old macintosh's in the library at school using the blink tag and animated gifs.

I still use angelfire, but that's for the time being.

Let me know what you use(ed), and your best gif!!

Wednesday, October 21, 2009

Arcade Challenge: Max RPM Pt I

So I was going to garage sales last saturday and I picked up this beauty.

Its called Max RPM, by Bally Midway, it appears to have been released in 1986.

What I was told by the previous owner is that he received it as part of payment of a debt from someone. He was told it worked, and it turns out it didn't work.

I decided this would be my "car" Man Project. You know how guys have that car or woodworking project in the garage to work on when they need some time alone, this will be mine.

The Arcade came with the schematics needed to get all the wires hooked up right and working.

First I powered it up just to see if it worked, the screen powered up but no video, so I needed to investigate.

When I opened it up I found a few things.

This board wasn't hooked up whatsoever and it looked important.

When I looked around a bit I found this mess, looks like someone cut off the connector. It's ok I have the schematics, I decided that rather then wait around for a connector (Ok, too impatient because I thought this might be the only problem) I soldered them on to the male pins of the board above.

Well I have power going to the boards and I can even hear feedback on the speakers.

Next I wanted to tackle the lights in the front, I really like the $.25 lights because they just remind me of playing in the arcade when I was growing up, once i got power going from the above work, I measured and it looked like there was 14V across the bulbs, thinking that most cars were similar I found some car light bulbs that looked pretty close and plugged them in and Voila we were in business.

So what it looks like I have left for this project is outlined below:
  1. Coin return has cut wires
  2. Credit button has cut wires
  3. Florescent tube doesn't appear to be operational
  4. CRT doesn't display anything or appear to power up.

I also found some tokens in there as well as the key and lock to the back of the unit, the guy i bought it from lost the key to the front so I had to remove it from the inside, I can get it replaced when I finish up, but no sense in doing it until I'm ready.

Total Costs involved:
Purchased for....$10.00

I'll keep updating costs and detailing what I find out as I go along, keep following as I finish this project.

If you know anyone who has an Arcade that doesn't work that would like to get rid of it, maybe I'll be able to feature it here!

Thursday, October 15, 2009

Google Contacts

How can google make their contact manager more useful for their users (especially Google Voice users)? I have some ideas. Here they go:
  1. Shareable groups (I.E. business and spam numbers for example)
  2. Lookup of your number to see who has your number in their contact list.
  3. Blockability of your number from any and all contacts in Google.
  4. For Phone Type it should be labeled Landline and Mobile.
  5. If you want to list the Attributes/keywords of a number allow that, (kinda already the "groups thing"
  6. Reverse Phone number lookup across the board, you know google has all that data (most likely) already, why not make it easier. I don't mind a couple ads while I'm trying to find out who just called me.

Let me know what you think. Do you have any better ideas for Google to use for their contacts manager?

Thursday, October 8, 2009

Programming Club

So I read a comment on Jeff Atwoods blog someone made that said
First rule of programming is you DO NOT TALK ABOUT PROGRAMMING.

I got to thinking sometimes working quick on your feet can help you improve your skills
so I looked up the "rules of fight club" which I found here: Rules of Fight Club

So I'm thinking heck why not start a "programming club", you come in and program against one other person. So I'm rewriting the rules for programming club here they are:

1st rule: You do not talk about programming club.
2nd rule: You DO NOT talk about programming club.
3rd rule: If someone says "I can't solve it" or passes out, the match is over.
4th rule: Only two people code at a time.
5th rule: Only one match at a time.
6th rule: No books, No internet.
7th rule: Matches will go on as long as they have to
8th rule: If this is your first night at Programming Club, you HAVE to program.

So the question is Who's in? I'm in the Albuquerque NewMexico area, lets get this started.

Go to my Contact Me Page and lets get started! Contact Me

Coding Frustration

First, the reason I posted this is because I can't actually comment on the post by Jeff Atwood here:
Coding Horror

What I would like to comment on as well is finding your bugs, or not even so much as bugs as problems in your pseudocode. I'll be the first to admit that more often then not I would rather sit down with the idea in my head and just code it up, and to be honest at this point in my programming career I have been able to do that quite easily. The problem comes when you start hitting harder and harder blocks of code that you need to build and generate.

I know there's been a few times I've been banging my head on a wall trying to get a particular piece of code to work. When I finally have "given up" and go to another engineer to explain the problem, MID SENTENCE I stop and say "wow I'm retarded" followed by, there is the problem, and most of the time the other engineer didn't even get a chance to say something.

What does that tell you? Recall that sometimes learning things requires more then once sense? I have found that occasionally hearing the pseudo code that I've written can often times improve my understanding of the problem I'm trying to solve, or even the implementation I'm using to solve it.

In fact, sometimes even attempting to blog about the problem brings about different ways of looking at the problem, take a look at my problem where I wanted to grab filenames from selected files!

Windows Selected File Names pt I Posted: Thursday May 28th
Here my solution was to take any particular selected file and simply append it to the clipboard. The problem with this one is it ran the script the same number of times that there were files, this isn't a very efficient way to solve this.

Windows Selected File Names pt II Posted: June 8th
Here my solution required a "copy" to the clipboard, then right clicking on one file and running the script. I still believe there are too many steps, but it's more efficient (I suppose for smaller files but larger sets) to simply copy the file to the clipboard then using the clipboard contents extract the filenames from the path.

Windows Selected File Names pt III
Someday I would like to have a pt III that shows how to use the "currently selected items" that I KNOW has to exist in windows and simply right click and that will determine the filenames, in my opinion that will be the best way to do it.

I had been mulling part 1 over for a while, and finally when I got a working solution, I wrote it up, and not 11 days later I managed to find another (and better IMHO) solution and get it working.

Give it a try next time youre having problems debugging or finding a good algorithm, use another sense.

Let me know how it works out!

Wednesday, October 7, 2009

Microprocessors 10/1/09 -> 10/7/2009

Here are the in class examples that we've covered in class since the 28th

Revised Blink LED's

Branch And Link

Fibonacci using Stacks

Good luck and let me know if you have any questions!