Thursday, July 30, 2009

All Things Google: Google Business Cards

Well I logged into my Google Voice account yesterday and saw a bit of an advertisement about something to do with "Now you need Buisness cards" apparently the company iPrint is giving out 25 free business cards to Google voice customers, not sure how many customers will get this,

Anyone know what the wait time from requesting an invitation to getting an invite is at this point?

Let me know how you use Google Voice in your daily life!

EDIT: I got them and they're pretty cool looking, I'll post pics of the card when I get a chance!

Class Search

I have been mulling over the idea of trying to improve the class search process where I go to school, I currently work a full time job, and am trying to go to school. Needless to say trying to schedule classes and work hours can be a bit of a bear.

Along came the idea of "class search", I'll give you a bit of a hint of what it's got, and as I continue working on it I'll bring it up a little more.

Right now my goal is to have a particular user login, and once they're logged in it will display classes that are relevant to their particular declared degree. The basic site I've currently made is an Comp Engineering Major related list of classes.

There are alot of "enhancements" that I am working on and have ideas for quite a few more.

You can check out the "mobile" version (updated most recently) here

If anyone knows any good "how to's" on using Google Calendar on their site, let me know!

Hope you like it.

Tuesday, July 28, 2009

Circuit Analysis II Lecture 22

Disclaimer: This series of posts is to serve as notes for myself as well as any others interested in the subject of Circuit Analysis II. This is the course ECE 213 at UNM.
The course will follow the book:
Electric Circuits (8th Edition)

Final Review:
Solve for power across the resistor.
You are given the equation:
ak = (vm/k(pi))sin(k(pi)/2) and bk = (vm/k(pi))(1-cos(k(pi)/2))

When looking at k = 3 (Third harmonic) we find that the a3 and b3 will come out to -vm/3(pi) and positive

So for example when vm = 1 and RL = 15ohms

We can get An by just taking the co-efficients of the cos and sin from above and solve the equation .5 * An2/RL

We can plug into the equation:
(((1/3(pi)2 + 1/3(pi)2).5)2)/30

Solving that equation we get .75mW (since we're looking for power)

Now this method only works if we're looking for the power across a resistor on our output.

Also from the last quiz we were trying to decide what to do with 21.99 well converting to s domain and whatnot we basically get A from A|H(jw)|cos(wt+phi)
so plugging in 0 (where w = 0) into H(0j) we get 4/5 so since cos(0) = 1 we get A*4/5 which ends up being around 17.something

Good luck on the final!

Start at the beginning Lecture 1 6/8/09

Learning Ada

I'm getting the opportunity to do some work in ada so I'll note some things I've learned as I go along, they may be common knowledge to some people, but they're new to me as I am learning.

Yesterday I learned how to declare a record and how to assign values to the items in the record, there are 2 ways (that I currently know of).

Pertaining to a record that contains the items animal and fish:

1. Assign individually:
     Albuquerque.animal := ("cow"); := ("trout");

2. Assign them as a group:
      Albuquerque := (animal => "cow", fish => "trout");

Circuit Analysis II

I'll will be adding a small synopsis in the future.

Electronic Circuits 8th Edition

Lecture 1 6/8/09

Lecture 2 6/09/09

Lecture 3 6/10/09

Lecture 4 6/11/09

Lecture 5 6/22/09

Lecture 6 6/23/09

Lecture 7 6/24/09

Lecture 8 6/29/09

Lecture 9 6/30/09

Lecture 10 7/1/2009

Lecture 14 7/9/2009

Lecture 15 7/13/2009

Lecture 22 7/28/2009

Tuesday, July 21, 2009

Digging into New Code

One of the biggest challenges in learning a new system is trying to get a picture of that new system as a whole.

Right now I'm trying to learn a pretty complex system, one of the big challenges is that there are so many SLOC that simply opening a file and poking around won't do you any good.

So the question becomes this:
How does one become knowledgeable on a particular system and how do they find that starting point?
I think this question applies to projects big and small. If you don't know where to start, you will continually find yourself asking the more experienced programmers where to begin.You might even be able to modify small portions of code to do what you want and that works as long as those developers are there to point you in the direction, but when the time comes (and it will) that they aren't there, you have to be able to figure it out yourself.

So back to our question, HOW do you do that.

Of course the simple answer is start at the beginning and READ the code as it progresses, and that is an acceptable answer in a lot of situations.

In other situations it's not so easy, some systems are real time embedded systems, so you'll then have to figure out when you enter your frame again, do you start at the beginning, where you left off, or in a predetermined location?

Here's some questions to ask yourself when you are just starting to look at an entire system:
  1. Where do you start and can your program be interrupted,
    • If your program can be interrupted, how is it handled, like I mention above where does it start again when it's given control again.

  2. What is your program trying to accomplish in this section of code that you're reading
    • How does it pertain to the project as a whole.

  3. Can you break the code into groups, I.E.
    • If your project is a car, can you break it into sections such as brakes, engine, steering?

  4. Create a list of all pieces (if possible) that make up each group.
    • Look at how they each contribute to the whole.

  5. Does each group interact with another group directly or is there a common group that handles all requests to each group?
    • Make a web chart that connects each group and primary methods of communication between each of them.
Let me know if you have any suggestions as to how to learn and understand large projects that you didn't code yourself.

All Things Google: Google Voice

I got a Google Voice Invite over the weekend, so I setup my google number and whatnot, it was pretty easy, I did have some problems, I tried calling my mom through the interface, what was supposed to happen is it was supposed to call my cell phone (I had selected), then from there it was supposed to connect me to a call ringing to my mom.

Unfortunately, I ended up with a voicemail of a phone ringing, and my mom didn't recognize the number so she didn't answer....

It did have my google contacts which is nice, I tried SMS'ing my cell from their interface and it appeared to work fine.

I'm not sure how I feel about calling into a phone number then having that phone dial out to another number, if there was a way to make it more seamless as far as the outgoing calls I might like it more.

For now I'm going to stick to YouMail for my voicemail provider (at the moment). The nice thing about YouMail is that I don't have to change my number.

Once Google integrates things better I could see myself using this more, I know they have an app out there for the G1 that will use your default contacts list, and then from there you can just make calls directly, but I am currently without a google phone, so unless they find a way to make this app work more seamlessly with more phones it's in the "Its cool and I might poke at it a bit but I probably won't use it steadily until it's got more usability"

Let me know if you got an invite and what you think of Google Voice!

Once you've got your one phone number for "life" might be a good idea to get some Google Business Cards

Wednesday, July 15, 2009

Open Forum

Anyone have any questions or topics they'd like to hear about?

I'm all ears, I would definately like to keep it Tech oriented but if you have any questions, now's the time to ask, I'll try to do at least one of these a week (or possibly one every other week, we'll see the response to this one).

Leave your questions in the comments.

Thank you,

Tuesday, July 14, 2009

Circuit Analysis II Lecture 15

Disclaimer: This series of posts is to serve as notes for myself as well as any others interested in the subject of Circuit Analysis II. This is the course ECE 213 at UNM.
The course will follow the book:
Electric Circuits (8th Edition)

Ch 14
Low pass filters
High pass filters
Band pass filters

A simple circuit with a resistor and inductor in series across a voltage source.

HL(s) = VoL/V(s) = sL/r+sL

re-writing it with some manipulation we get:

Something to note is that wc = R/L (wc is the cutoff frequency)

so for HR(s) = VoR/V(s) = R/R+SL = (R/L)/(s+(R/L))

So what does this mean?
Substituting in wc in the equations we'll get:
HR(s) = wc/s+wc
HL(s) = s/s+wc

Looking at the graph for HR(s) we have a graph that starts at 1 at w/wc and it slopes down acting similar to a 1/x graph.

Turns out this is a low pass filter.

wc is our cutoff, and for wc>x it's passed through

So it turns out if you look at HL(s) it's a High pass filter.

Now if you look at a RC circuit it turns out that the values flip, what that means is that the filter across the capacitor would be a low pass filter, and across the resistor is a high pass.

Problem 14.3

So in order to find this we just need to know R and L, since we do we can determine that it's 5k/3.5*10-3 = 1.43Mrads/s

Finally we took a RLC circuit and determined that because of the L and the C in series we were able to determine that it was a bandpass filter because there was more or less a range of frequencies that were aloud to pass through or block.

Finally we went over the solution for 13.71, I plan to post the answers to 13.71, 9.30a and 9.31 once I've solved them so stay tuned.

AP 14.1, 14.2a,b
Ex 14.1-5, 14.8
p 14.1a, 2, 5, 10-12, 14,19, 20

Good luck

Continue on to Lecture 22 7/28/2009

All Things Google: Gmail

Ok so I was going to tell one of my buddies to check out gmail because he's using a email provided with his ISP. If you get an email account with another non ISP affiliated account you have one email....and that's it.

The interesting thing to note is that I sent him an "invite" and now I show one less invite left.

Which brings me to my question...Do you have to have an invite to sign up for GMAIL, and if not what is the point of having the invites still or at least having the counter? what happens if you run out, you can't tell anyone about Gmail anymore?

Let me know if you signed up for Gmail without an invite, or if you have any clue why they do this?

After going to Gmail and searching a bit I found this comment:
If you run out of invitations, they'll be replenished over time.

Still not sure why they even have a counter anymore if that's the case, maybe someone knows...if I figure it out, I'll let you guys know.

Sunday, July 12, 2009

Circuit Analysis II Lecture 14

Disclaimer: This series of posts is to serve as notes for myself as well as any others interested in the subject of Circuit Analysis II. This is the course ECE 213 at UNM.
The course will follow the book:
Electric Circuits (8th Edition)

Requested to make sure we ABSOLUTELY DID (or at least tried):
Problems 13.7, 9.30a, 9.31

We also got our test back.

That's all!

Continue on to Lecture 15 7/13/2009

Circuit Analysis II Lecture 10

Disclaimer: This series of posts is to serve as notes for myself as well as any others interested in the subject of Circuit Analysis II. This is the course ECE 213 at UNM.
The course will follow the book:
Electric Circuits (8th Edition)

1. Complex Numbers
2. Repeated Roots

The test was moved to Monday (a little late notice I know)

Looking at this equation (13.59 from page 520):

Il = 6s/(s+5000)2

using Partial Fraction Decomposition we were able to obtain k1
k1 = 6s/(s+5000)2 evaluating s at -5000
we treat this equation pretty much like this:
k1 = 6s/((s+5000)2)*1
so when we evaluate we would use the equation:
k1 = 6s/1
so subbing s=-5000 we get:
k1 = -30,000

Then we take the derivative of k2
k2 = d/ds 6s/1 = 6

this gives us
-30000/(s+5000)2 + 6/(s+5000)

converting back to time domain we get:
(-30000te-5000t + 6e-5000)u(t) A

Next up is problem 13.49

We are trying to find the vo/vi combo of the circuits.

a) First up we manage to get the equation:
vo = vi/((1.25*106/s) + 25000) * 1.25*106/s

a little algebra we get:
vo = 1.25*106vi/s((1.25*106/s) + 25000)

a little more we get:
vo = 1.25*106vi/(1.25*106 + 25000s)

pulling out the 25000 we get:
vo = 50vi/(s+50)

finally we get:

vo/vi = 50/(s+50)

b) Combining things we get the equation:
vo = vi/((1.25*106/s) + 25000) * 25000

A tad more algebra we get:
vo = svi/(s+50)

and finally we get:
vo/vi = s/(s+50)

e) This one requires using an additional technique the teacher used node voltage:
(vo - vi / 25k) + (vo/100k) + (vo/2.5*106/s) = 0

A little algebra later (multiplying by 2.5*106) we get:
100(vo - vi) + 25vo + svo = 0

Re-arranging and whatnot we get:
(125+s)vo = 100vi

Finally we end up with:
vo/vi =100/(s+125)

Last we worked with ap 13.11a&b

using the equation from 13.11a that's our transfer function:
H(s) = 9600s/s2 + 140s + 62500

For part b we are supposed to look at the unit step (which is 1/s):
so subbing that in we get the equation:
vo/(1/s) = 9600s/s2+140s+62500

moving things around a bit we get:
vo = 9600s/s(s2+140s+62500)

cancelling things we get:
vo = 9600/s2+140s+62500

and finally breaking it up by completing the square:
vo = 9600/(s+70)2-4.9*103+62500

combining the rest and separating the top to look like something from the table we get:
vo = 240 * 40/(s+70)2+2402

And lastly converting to the time domain we get:

Continue on to Lecture 14 7/9/2009

Friday, July 10, 2009

Live Android CD

I'm working on learning the java language so I can develop apps for the G1, so far I have only managed to run the hello world, from a tutorial (not much time for learning the java language yet), so far its an interesting project. I hope to build some posts around what I learn.

I came across the below link talking about some users of the Google Code Community porting a version of the Android OS to a Live CD that you can run to on your desktop.

It looks quite interesting and I'm going to give it a try, now it looks like there are 3 options for downloading,
1. Torrent
2. 2 Part ISO (Not sure how that works)
3. 3 Part Rar file.

(download page link: download)

I'm probably going to give the torrent one a whirl and I'll give it a review in the near future.

Check out the main site link here:
Live Android

Thursday, July 9, 2009

Browsing History

Sometimes I'll navigate through a search, and a couple pages then jump to another search. In the meantime I've found a couple good sites along the way, there may have been more sites I liked but once I've closed my browser I've lost my timeline.

I think that we need to update the back-forward system to a timeline type system, and keep that data embedded within a bookmark. For example, I bookmark something in January thinking that it has some use. June I go back to use that bookmark, and the link is dead for example, I do some light searching but can't seem to find similar subjects. If my bookmark had a history associated with the item then, I can go back and forth, now of course it's possible that some of the "in between" sites are dead now, but I should be able to "recreate" the process that lead me to this particular site, and now I might be able to find the "new" site, or find a completely different site that contains the same type of information that I've managed to find in the past.

How we can do this:
Keep a rolling history list, when pages branch you just branch, kinda like a tree data structure, when you bookmark that particular page, you embed a document with the bookmarks that has a 1 to 1 correlation to an individual bookmarked item, then when you want to see how you got to that page, there is a simple parser that could just bring up a flow chart that contains a screenshot along with link of each page that got you to that page.

I honestly don't see how that could possibly be that hard.

Let me know what you think about bookmarks, how they are used how they should be used, if bookmarks SHOULD even exist anymore.

My opinion is if you feel that a site was worthy of a bookmark it should be worthy of knowing how you found it.

Let me know what you think!!!

Wednesday, July 8, 2009

File Organization

With the recent announcement of Google Chrome OS, I thought it fitting talk about one particular topic that I have had problems with.

Computer organization is a tough topic, everyone has their own way and alot of times they work for them, but there is a good majority of people that just can't seem to keep their computers organized, files everywhere, just a plain old mess.

Last night I was thinking about Google and their quest to change email, I avoided the Gmail labels for the longest time because I didn't understand them, finally after reading the reason behind them I understood, it just plain makes sense. Now that I understand them I question why we don't use them for more things. Heck why not use them to organize your computer.

(Their theory is that emails can have more then one purpose so sticking them in ONE folder limits them, by allowing multiple labels on files then it's kinda like having that email in 4 folders but only one copy, easier to deal with and handle)

Here's my theory,
1. ALL files go into a single folder.
2. Keyword Label ALL files, when you create a file, simply add "keyword" options, in the dialog box.
3. Now setup that or another folder to look at all files, but give the option to sort on keywords or even search on keywords, you can have more then one file named the same and behind the scenes the system will handle which file correlates to what kind of data, based on the keywords.

This way as you get files you keyword them and can find them later.

Even better ALL your files are in one place (much like the *nix way of doing things and keeping everything in the home folder).

So lets say you search on the keyword "Cars"

Now you may have photos that have been tagged cars, you may have documents tagged cars and videos...etc, and now you see things as a group, so finding what you need as well as related material would be a breeze.

Now I have tried organizing my files in a couple manners, one was saying ALL files were either Text, Music, Movies, Pictures.

That can sort of work but I had problems having numerous files in the text folder and without creating sub folders it was hard to keep track.

Plus finding documents that correlate to the pictures/videos/etc. makes it tough.

What are some better ways to organize files/folders?

Should folders exists anymore?

What do you think? Let me know in the comments.

Tuesday, July 7, 2009

Perl scripting

So I was checking out Daniweb and trying to answer some questions, and I came across this one:
Sort Files by Date

Since I'm slowly learning perl, I thought why not try:
@someData = `command`;

I tried ls -t which happens to be the unix command to list the directory contents in time order.
After some searching for information for a bit about dir so we can see if this works on windows, I found out you can use the dir /od command instead.

Here's the tidbit of code:

@x = `ls -t`;

foreach $x (@x)
print $x;
$asdf = <>;

The @x holds the return output from the command and the ls -t can be substituted for dir /od on a windows computer.

I then printed each line, which of course can be redirected to a file, or however you wish to use it for handling.

The $asdf = <>; serves as a "pause" in the script so the script doesn't start run and close before you can see anything.

Let me know in the comments if you can run ls -t from your windows computer standard using perl...

Monday, July 6, 2009

Steering Wheel Control

Originally I posted this on the MBworld forum, but for all intensive purposes, I've decided to link to it from my site, and also copy most of the content here, in the case that the post goes missing from the site!

Original Post:

I am making this post because I tried searching about my steering wheel controls not working, and I didn't find much, Basically the controls on the left side of my steering wheel slowly began "not working", I read about other people having the same issue but the only "fix" was to call the dealership find out it costs alot to get fixed and that was about it.

Basically I found a thread that explained to me how to get that Steering wheel torn apart enough that I could do some investigating, I'll write up a "how-to" in this thread when I get home where I have pictures.

Big key, the connector attached to the PCB (printed circuit board) had broken away from the solder, with no solid connection in place the button malfunctioned altogether.

If you are having problems with this in your car I think this is one place to check, I just soldered mine back in and it works like a charm.

Tools needed:
1. A brain.
2. Torx T30, one that will fit between your dash and the steering wheel and can reach in and unscrew the unit that holds the airbag to the steering wheel.
3. Torx T06 (let me double check on that when I get home) to take the control unit apart to get at the connector.
4. Soldering Iron with a fine point and some solder.

* NOTE: I disconnected my battery just to be safe, I recommend the same for anyone else doing this "mod"
1. Remove the airbag unit. Follow the directions located here:
W203 steering-wheel swap how-to

2. Once you have the Airbag/Steering wheel controls unit separated, place the unit facedown on a soft rag (dont want scuffs of course)!
remove the 4 screws (see attached)

3. Between the metal plate in step 2 and the rest of the unit is this piece, remember how you took it out, here it is:

4. Next remove the appropriate steering wheel control from the unit see they are attached by a couple screws in the locations highlighted.

5. The rest of things are detailed in the next picture, but the long and short of it is this,
a. remove the screws holding the unit together
b. pull the circuit board out
c. if you can't tell if it is connected good or not, if you can wiggle it that's
not a good sign
d. I decided to hold the connector on (after I accidentally finished it off)
then heat up the solder on each end and let it cool so it stays on it's
own make sure you do a good job soldering it in, I'm not teaching
soldering in this tutorial. Plus you don't want to have to take it apart
and do it all again.

6. Once it's all finished and you've ohm checked it (checked for continuity a.k.a. no shorts, opens etc) put everything back together in the reverse order you took it apart.

7. Good luck and have fun,

If anyone needs more details or better explanations please let me know, this is really one of the first tutorials i have written and hope it's understandable.

Thank you to Bif Powell from forums, for the info on how to get the stuff apart.

*Note sorry at least one pic is not very clear, I had poor lighting.

Laptop Mouse Button

I was having problems with my left mouse button on my laptop, it seemed to start going not long after I got it, well last December I finally got tired of it, and began searching for a replacement button, that was harder then it sounded, I couldn't find it anywhere. I had taken the touchpad out and looked at the buttons and did a search on Mouser for switches, I searched until I found this switch:
P/N 101-TS4522T2602

When I finally got it it looked like it might not be right, well finally i was SO fed up with my button that I finally took my laptop apart and got hacking, it was pretty easy, I verified how the switch was setup, I then just desoldered the button, and soldered the new one on, it worked like a charm,

It appears to be the perfect replacement.

My secondary mouse button is iffy and I may have to replace it, so I will post a how to take apart guide and what to do.

Good luck to those that still have Dell Inspiron 2200's, take a look at the switch (if you can get the pad out), and verify that it looks like the one I linked to, this might work for more then just the 2200's (I suspect my wife's 1200 has the same switch

I hope this helps anyone out there that might need to fix their button but can't seem to find information about the button.

VB6 Speed Tests II

Continuing from our last post : VB Speed Test I

Lets get to the next section:

for( my $i=0; $i < scalar(@filenames); $i++) { # If we don't have any functions there is no point in writing out our declare or continuing with the file if ($one > 0)
if ($filenames[$i] =~ m/^\s*Attribute VB_Ext_KEY = \"Top_Level\" (\"Yes\"|\"No\")/)
print OUT $filenames[$i];
print OUT "Private Declare Function GetTickCount Lib \"kernel32\" \(\) As Long\n\n";
print OUT $filenames[$i];

So I found that on my particular setup when I inserted the Private Declare right at the beginning (I was expecting before the first function) there was in reality more lines we don't normally see. So in order to get around this I found that the above statement was the "last" line before we really started the "visible" text in Visual Basic. So we insert the line after that.

So next we go with the section we insert the code:
if ($filenames[$i] =~ m/^\s*(Public|Private) (Function|Sub)/)
$insert = "\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n";
print OUT $insert;
$insert = "'The Function will be timed.\n\n";
print OUT $insert;
# we found a function so let's "push" a "dim" line to it that matches the name of the function with _timer on it.
@funcLine = split(/\s+/, $filenames[$i]);
@function = split(/\(/, $funcLine[2]);

$firstVar = @function[0] . "_start_timer";
$insert = "\nDim $firstVar as Long\n";
#pump out insert
print OUT $insert;
$secondVar = @function[0] . "_stop_timer";
$insert = "Dim $secondVar as Long\n";
#pump out insert
print OUT $insert;
$thirdVar = @function[0] . "_final";
$insert = "Dim $thirdVar as Long\n\n";
#pump out insert
print OUT "Dim Tmrfso As New Scripting.FileSystemObject\n";
print OUT "Dim TmrfileWriter As TextStream\n";
print OUT $insert;
$insert = "$firstVar = GetTickCount()\n\n";
#pump out insert
print OUT $insert;

$insert = "'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\n\n";
print OUT $insert;
} # end if

What we have is the text that we put at the beginning of the function, this will initialize the variables, read the current tick count. The nice thing is that the name of the function varibles we created are based on the name of the function they are in, what that means is when we print out our information, we'll be able to determine exactly what functions have been run,

Next post we'll discuss the items at the end of the functions as well as analyzing the data.