Jenni: What do all these numbers and things mean 6 Mbps/512 Kbps Downstream/Upstream? We’re trying to figure out what kind of speed we will need. Mind you we don’t have a home phone, so dial-up may not be the most affordable option.
Narrator: The numbers represent maximum speeds. 1 bit is a 1 or 0. You need 8 bits to send useful information to a computer. 6 Mbps means 6 million bits per second. For those nerds in the audience, it means exactly 6,144,000 bits sent in one second. Divide by 8, and it becomes 768 bytes in one second. So a large MS Word document taking 200 KB (204,800 bytes) would take 267 seconds – or 4 and a half minutes.
There are two directions: data you get from the Internet, and data you send to the Internet. Watching movies, looking at web pages, and reading e-mail gets data from the Internet – at the downstream speed. Upstream matters when you send e-mail to somebody, load a file to a website, or use file sharing. You will use the upstream very little. And stuff like e-mail takes up almost no space (very few bits). In other words, 512 Kbps is perfectly reasonable for home use.
Your options are cable and DSL. Cable, obviously, comes from the cable company. If you have cable TV, call and ask if they have a discounted bundle for TV and Internet. DSL comes through the phone company (like AT&T). DSL is limited by location. It may or may not be available in your area.
Monday, November 22, 2010
Remote Connections
I wrote this explanation for a client. The client had no IT staff. And they relied on the local cable company for their Internet connection. The six hour drive prohibited an on site visit.
Key terms...
You already know that the computers use an IP address when connecting. When I connect with your application server, I supply the server's IP address. The Internet recognizes two "types" of IP addresses: public and internal.
I connect through the public IP address. This is the IP address accessible to the entire world. It is assigned to you by your ISP. The public IP address accesses the router installed by the ISP.
Your office has many computers connected to the Internet - personal computers, the application server, etc. These connect to the router. They too have IP addresses. Their IP address begins with 192.168. 192.168 is a special prefix. It signals an internal IP address.
The router does not allow access to a machine with the 192.168 prefix. This prevents someone on the Internet from accessing the company's computers.
Along with the IP address, I also specify the telnet protocol. The protocol instructs the computers how to communicate. telnet provides commands for interacting with a remote computer as if I were sitting in front of it.
Sadly, computers do not understand neat names like telnet. They understand numbers. My computer translates telnet into a port number - 23. And then contacts your IP address saying I want to talk on port 23 (telnet).
Imagine a ship pulling into New York harbor. It docks at a port for unloading. The ship's captain speaks his lingo (protocol) with the harbor master for instructions. But one of those containers actually goes to Chicago. So the container ends up on a truck redirected to Chicago.
Comcast is doing something similar with your router. The router receives my request for port 23. The router redirects it to the internal IP address of the application server. And now I can remotely log into that machine to work.
In short, the ISP will configure the router to redirect port 23 (telnet) to the internal IP address of the application server.
Key terms...
- IP ADDRESS
- The public, numerical name of a computer.
- PROTOCOL
- The language used when two computers communicate.
- PORT
- A number identifying the protocol to the computer.
- TELNET
- A protocol used for real-time interaction with another computer.
- ROUTER
- Hardware device that connects multiple computers to the Internet.
You already know that the computers use an IP address when connecting. When I connect with your application server, I supply the server's IP address. The Internet recognizes two "types" of IP addresses: public and internal.
I connect through the public IP address. This is the IP address accessible to the entire world. It is assigned to you by your ISP. The public IP address accesses the router installed by the ISP.
Your office has many computers connected to the Internet - personal computers, the application server, etc. These connect to the router. They too have IP addresses. Their IP address begins with 192.168. 192.168 is a special prefix. It signals an internal IP address.
The router does not allow access to a machine with the 192.168 prefix. This prevents someone on the Internet from accessing the company's computers.
Along with the IP address, I also specify the telnet protocol. The protocol instructs the computers how to communicate. telnet provides commands for interacting with a remote computer as if I were sitting in front of it.
Sadly, computers do not understand neat names like telnet. They understand numbers. My computer translates telnet into a port number - 23. And then contacts your IP address saying I want to talk on port 23 (telnet).
Imagine a ship pulling into New York harbor. It docks at a port for unloading. The ship's captain speaks his lingo (protocol) with the harbor master for instructions. But one of those containers actually goes to Chicago. So the container ends up on a truck redirected to Chicago.
Comcast is doing something similar with your router. The router receives my request for port 23. The router redirects it to the internal IP address of the application server. And now I can remotely log into that machine to work.
In short, the ISP will configure the router to redirect port 23 (telnet) to the internal IP address of the application server.
Good, Better, Best
I enjoy reading Rand in Repose. I find his technique of placing people on a continuum very helpful. It describes the analog, complicated way that humans behave. Oddly, a lot of life's decisions fall on a continuum.
We call this weighing the pros and cons. You've probably done this before... Draw a line down the middle of a sheet of paper. On one side goes all of the reasons for the decision. The other side has all of the reasons against. This works well for about two minutes. Invariably, one reason shows up on both sides!
The pro/con list digitally describes the problem. Every thought falls on one side or the other. Problem is, life's analog - not digital. Your problem falls somewhere in between the extremes of all the pros and all the cons. A reason ends up on both sides because the issue lands squarely in the middle of that continuum.
I can accept the low freedom score because of the chance of it biting me is low. Good thing banks don't fail (dripping sarcasm intended).
We call this weighing the pros and cons. You've probably done this before... Draw a line down the middle of a sheet of paper. On one side goes all of the reasons for the decision. The other side has all of the reasons against. This works well for about two minutes. Invariably, one reason shows up on both sides!
The pro/con list digitally describes the problem. Every thought falls on one side or the other. Problem is, life's analog - not digital. Your problem falls somewhere in between the extremes of all the pros and all the cons. A reason ends up on both sides because the issue lands squarely in the middle of that continuum.
Looking At Technology
So what measures do we look at for technology? The first continuum is usefulness. How well does the technology solve your problem? For example, I don't want to waste 30 minutes driving to and from the bank just to transfer money between accounts. On a scale of 0 to 100, the bank's web application receives a 90 (solves the problem). Pretty easy, isn't it?0----1----2----3----4----5----6----7----8----9---100Next we look at popularity. Popular technologies have a lot of support. And their support lasts. You don't worry about it becoming obsolete in six months. In our example, the web application falls in the 90's.
-----> *
0----1----2----3----4----5----6----7----8----9---100Last but not least, we measure freedom. Where does this technology leave me in five years? What happens when the company goes bankrupt? Our banking application plummets into the teens.
-----> *
0----1----2----3----4----5----6----7----8----9---100What!? The teens! Why? Online bill pay is cool. It saves me time. And if the bank drops it, I'm going to spend a day or two cleaning up the mess. They locked me into their service. Don't worry - no diatribes about free versus closed software. It is what it is.
* <-----
Pulling It Together
Is this bank's web application a good technology? Wrong question. I really need to know, is the web application better than the alternatives?0----1----2----3----4----5----6----7----8----9---100In an ideal world, I would use a technology that scores high on all three scales. In the real world, the web application comes out fairly well. It certainly comes out higher than the alternative - driving to the bank.
-----> *
0----1----2----3----4----5----6----7----8----9---100
-----> *
0----1----2----3----4----5----6----7----8----9---100
* <-----
I can accept the low freedom score because of the chance of it biting me is low. Good thing banks don't fail (dripping sarcasm intended).
Saturday, November 20, 2010
Control and Flexibility
The scene opens with a woman crossing the street. This car comes out of nowhere and POW! She rolls off the hood, flung into the middle of the street. CUT!
Our mystery woman stands up and walks over to the director. She's a stuntwoman. Cool! She begins talking about the uncertaintity of stunt work - what's the next job, when will it appear, what risks does it involve. A sense of control matters a lot in her life. She finds that sense of control over her finances using the Chase Slate credit card.
It sounds perfect. Setup individual payment plans for different types of expenses. Pay smaller purchases right away to save on interest. I tell you, the emotion just wells up inside of me.
Narrator: CHEETAH!!!!! Cheetah, cheetah, cheetah! I warned you that the emotion wells up inside - the emotion to scream in terror. Think you have control of your finances? Miss just one payment. Then come back and tell how much control you have.
Guess what? Paying cash also saves on interest - without any risk of missing a due date.
And don't get me started on the tag line - debit card control, credit card flexibility.
So credit cards are more flexible - for borrowing money! See how it always comes down to one question: will you save or borrow? There's no math involved. No comparison of pros or cons. Nothing but that one choice: save or borrow. Which one will you choose?
Our mystery woman stands up and walks over to the director. She's a stuntwoman. Cool! She begins talking about the uncertaintity of stunt work - what's the next job, when will it appear, what risks does it involve. A sense of control matters a lot in her life. She finds that sense of control over her finances using the Chase Slate credit card.
It sounds perfect. Setup individual payment plans for different types of expenses. Pay smaller purchases right away to save on interest. I tell you, the emotion just wells up inside of me.
Narrator: CHEETAH!!!!! Cheetah, cheetah, cheetah! I warned you that the emotion wells up inside - the emotion to scream in terror. Think you have control of your finances? Miss just one payment. Then come back and tell how much control you have.
Guess what? Paying cash also saves on interest - without any risk of missing a due date.
And don't get me started on the tag line - debit card control, credit card flexibility.
Credit Card Flexibility
Okay, what exactly does the Slate Card offer that a debit card doesn't? Debit cards run through the same computer network as credit cards (i.e. you can use them in the same stores). Debit cards have the same fraud protections as credit cards (when used as credit in the store). The only difference is who supplies the money up front: you or Visa.So credit cards are more flexible - for borrowing money! See how it always comes down to one question: will you save or borrow? There's no math involved. No comparison of pros or cons. Nothing but that one choice: save or borrow. Which one will you choose?
Monday, November 8, 2010
GStreamer in Perl
Scott: Is there any way to get a nicer looking recording program? What you wrote works okay. A GUI might be nice. The ability to edit the sermon title would be fantastic.
Narrator: Hmmmm, it may be time for the next version of our church's digital recording software. Okay, this time let's use a graphical interface instead of the console. Easy enough with Glade and Perl. Now how does Perl record from the microphone?
Google and CPAN turned up one module. It worked okay - not great, just okay. Thing was, Ubuntu does not provide a package for that module. I really wanted something that updated with the rest of the system. That led me into the world of GStreamer.
GStreamer's documentation uses C instead of Perl. Their examples involve too much complexity. Perl makes so many things easy - why not this? Turns out that GStreamer works much simpler than it appears.
Start by installing the gstreamer-tools package. The gst-inspect command produces a list of available sources.
The gst-launch manual page then provides examples for testing my own recording pipeline.
Talk into the microphone. HitCtrl-C after a bit. Presto! You have an MP3 recording of whatever you said. We now know that GStreamer can record from the microphone into a file. How does it work in Perl?
Really, that's it. This little script does the same thing as gst-launch above. Pretty simple, huh?
Narrator: Hmmmm, it may be time for the next version of our church's digital recording software. Okay, this time let's use a graphical interface instead of the console. Easy enough with Glade and Perl. Now how does Perl record from the microphone?
Google and CPAN turned up one module. It worked okay - not great, just okay. Thing was, Ubuntu does not provide a package for that module. I really wanted something that updated with the rest of the system. That led me into the world of GStreamer.
GStreamer's documentation uses C instead of Perl. Their examples involve too much complexity. Perl makes so many things easy - why not this? Turns out that GStreamer works much simpler than it appears.
Start by installing the gstreamer-tools package. The gst-inspect command produces a list of available sources.
#gst-inspect | grep src
dvdread: dvdreadsrc: DVD Source
sndfile: sfsrc: Sndfile source
rfbsrc: rfbsrc: Rfb source
dccp: dccpserversrc: DCCP server source
...
pulseaudio: pulsesrc: PulseAudio Audio Source
video4linux: v4lsrc: Video (video4linux/raw) Source
rtsp: rtspsrc: RTSP packet receiver
alsa: alsasrc: Audio source (ALSA)
The gst-launch manual page then provides examples for testing my own recording pipeline.
#gst-launch alsasrc ! lame ! filesink location="test.mp3"
Talk into the microphone. Hit
#!/usr/bin/perl
use GStreamer -init;
my $loop = Glib::MainLoop->new( );
my $play = GStreamer::parse_launch( qq(alsasrc ! lame ! filesink location="test.mp3") );
$play->set_state( 'playing' );
$loop->run( );
Really, that's it. This little script does the same thing as gst-launch above. Pretty simple, huh?
One Exit Per Function
Today's conversation begins with this article about multiple code exit points.
Narrator: What makes you think that spaghetti code is the problem? And if it's not, then why would a rule of one exit point per function help?
Think about it this way - when maintaining or debugging, you're looking how to reach a certain block of code. Early exits reverse that logic. Your brain has to stop and change direction. So that's an interruption.
On the other hand, nesting if's can get hairy. But your mind stays focused on what it takes to reach a block of code. No interruptions. It feels better looking at that code.
I use multiple exits when appropriate - usually a block of if/elseif returning a value.
Exception handling is great. Exceptions don't break the flow of the source code. Again, ignore execution efficiency. Focus on how the source reads to a human being.
Narrator: What makes you think that spaghetti code is the problem? And if it's not, then why would a rule of one exit point per function help?
Think about it this way - when maintaining or debugging, you're looking how to reach a certain block of code. Early exits reverse that logic. Your brain has to stop and change direction. So that's an interruption.
On the other hand, nesting if's can get hairy. But your mind stays focused on what it takes to reach a block of code. No interruptions. It feels better looking at that code.
I use multiple exits when appropriate - usually a block of if/elseif returning a value.
Exception handling is great. Exceptions don't break the flow of the source code. Again, ignore execution efficiency. Focus on how the source reads to a human being.
Tuesday, November 2, 2010
Get Cash Back with Every Purchase!
Dan: I've heard about what Ramsey teaches (in Financial Peace University). I see one problem with cutting up the credit cards.
Narrator: Interesting, what's that?
Dan: I have this gas card. It gives back 5 cents a gallon. Wouldn't it be irresponsible to not save money?
Narrator: That sounds perfectly logical. Proverbs clearly warns us away from debt. The Bible warns the wise away from these enticements. What are we missing?
Let's talk this out from start to finish. Figure about 15 gallons of gas every two weeks. You save 75 cents on every fill-up. Four weeks in a month, and you see $1.50 savings every month. With two cars, that's $3.00 a month savings. 12 months times $3 a month equals $36 a year.
Over the last year, gas ran between $2.00 and $3.00 a gallon in our area. You spent between $1,440 and $3,600 on gas last year. You saved a measly 1% to 2.5% with that gas card. That's less than the margin of error in a household budget.
For that 2.5% in savings, you sold your freedom. You became indebted to someone else - the credit card company. Can you beat these card companies? Sure - if you manage the account properly. That means you know the payment due date. You keep immaculate records of exactly what you owe. You reconcile the statement with your records immediately. And you're never late because you can mail the entire payment without ever receiving a bill from them.
Boy, that's a lot of work for a rounding error. It's a lot of worry over a paltry amount. Is it really worth it?
Proverbs 5 says...
I remember cutting up my credit card in FPU. Honestly, I didn't care for the card or the company behind it. They certainly didn't care for me. It was just business. But giving up the credit meant admitting I had been wrong. My way hadn't worked. God was right, I was wrong. And that hurt. It hurt my pride.
Dan: But,but, but...
Narrator: No but's. Be honest with yourself. Look past the rationalizations. The logic doesn't hold water. You know it. I know it. This was never about logic. Check out the book Leadership and Self Deception - Getting Out of the Box. The book explains that we make decisions then we establish the logic. We choose with our heart, not the mind.
Dave Ramsey points out that personal finance is 80% behavior. God frees our heart. If $36 over one year makes that much difference, then you're truly slave to your money. I failed at budgets because my heart worried about lacking money. When God freed me from that, when He turned my heart towards Himself, then the budget worked. When I let go of my pride and accepted His instruction, then the budget worked.
Narrator: Interesting, what's that?
Dan: I have this gas card. It gives back 5 cents a gallon. Wouldn't it be irresponsible to not save money?
Narrator: That sounds perfectly logical. Proverbs clearly warns us away from debt. The Bible warns the wise away from these enticements. What are we missing?
Let's talk this out from start to finish. Figure about 15 gallons of gas every two weeks. You save 75 cents on every fill-up. Four weeks in a month, and you see $1.50 savings every month. With two cars, that's $3.00 a month savings. 12 months times $3 a month equals $36 a year.
Over the last year, gas ran between $2.00 and $3.00 a gallon in our area. You spent between $1,440 and $3,600 on gas last year. You saved a measly 1% to 2.5% with that gas card. That's less than the margin of error in a household budget.
For that 2.5% in savings, you sold your freedom. You became indebted to someone else - the credit card company. Can you beat these card companies? Sure - if you manage the account properly. That means you know the payment due date. You keep immaculate records of exactly what you owe. You reconcile the statement with your records immediately. And you're never late because you can mail the entire payment without ever receiving a bill from them.
Boy, that's a lot of work for a rounding error. It's a lot of worry over a paltry amount. Is it really worth it?
Proverbs 5 says...
For the lips of an adulteress drip honey, and her speech is smoother than oil; but in the end she is bitter as gall, sharp as a double-edged sword.You don't really object on logical grounds. You're quite intelligent. And logically, the costs outweigh the benefits. The problem isn't logic - it's the heart. You have emotional attachment with the credit card. No, not quite right. You haves an emotional attachment with being right - pride.
I remember cutting up my credit card in FPU. Honestly, I didn't care for the card or the company behind it. They certainly didn't care for me. It was just business. But giving up the credit meant admitting I had been wrong. My way hadn't worked. God was right, I was wrong. And that hurt. It hurt my pride.
Dan: But,but, but...
Narrator: No but's. Be honest with yourself. Look past the rationalizations. The logic doesn't hold water. You know it. I know it. This was never about logic. Check out the book Leadership and Self Deception - Getting Out of the Box. The book explains that we make decisions then we establish the logic. We choose with our heart, not the mind.
Dave Ramsey points out that personal finance is 80% behavior. God frees our heart. If $36 over one year makes that much difference, then you're truly slave to your money. I failed at budgets because my heart worried about lacking money. When God freed me from that, when He turned my heart towards Himself, then the budget worked. When I let go of my pride and accepted His instruction, then the budget worked.
My son, do not forget my teaching, but keep my commands in your heart, for they will prolong your life many years and bring you prosperity. -- Proverbs 3:1-2
Subscribe to:
Posts (Atom)