A Nerd's Thoughts

The musings of a budding geek

Skip to: Content | Sidebar | Footer

New Skills

28 February, 2010 (17:35) | Posts | By: Ryan

So, I’ve decided to rededicate myself to learning new tech skills.

Because I’ll be starting a Ph.D. in the fall, I figure one of the best places to start is with statistics. I’ve heard really good things about the R statistical package, so that’s what I’m going with. It’s got a couple really good things going for it. First, it’s free. That means I can always get it. I don’t know if this really happens, but one worry I have is learning something like SPSS or another stats software, then moving to a new school and having to learn a new one. R is also open source, which means updates happen a lot more frequently than with proprietary software. Plus, if I really get ambitious I can monkey around with it myself. Also, it is a programming language, so I can really get my geek on and create programs to do all sorts of cool statistical analysis. So far I haven’t done much beyond T-tests, but I’m getting there slowly. I’m going back through my old stats book, The Statistical Sleuth, and doing the exercises there with R so I can get a feel for how it works.

The other main thing on my list now is to get into Python again. I kinda started learning Python, wrote one program, then abandoned that pursuit. I’m not sure if laziness got in the way or what, but I’ve decided to go at it again. I guess my biggest problem with programming is that I can’t really think of things to program. I want to be a better programmer, but when it comes down to it I just don’t. But I picked up a Python book and a Django book, so hopefully this time around I’ll have the drive to make it happen. It will be really nice to have some web programming skills.

Anyway, so that’s what I’m up to now. Learning R, learning Python, and trying to be a better me than yesterday.

Passing the CCNA

6 February, 2010 (20:10) | Posts | By: Ryan

I’m sure pretty much nobody reads this, but oh well. I’m going to try to start posting more often to keep the world who doesn’t care updated on what I’m doing and thinking technology-wise. I want to be more intense about this, but I don’t think there’s much chance I’ll be making money on this site any time this decade. Plus, it takes so long to write a well-thought-out post that I just don’t do it. So, here goes.

Newest thing tech-wise for me is that I passed the CCNA at the end of last semester. It was a pretty intense test. I think the hardest part was not being able to skip ahead and go back. When I take any multiple choice test, I tend to skip around. The other day I was taking a final and I answered the first 10 or so questions, then skipped to the end and worked backwards to about question 30. Then I skipped ahead and worked forward again. I’m not sure why I do it, but it seems to work for me. I got a 95% on that test, and I finished it in less than 30 minutes. And they said it would take about 3 hours.

Anyway, back to the CCNA. I prepped for it using BYU’s Advanced Datacom class from the I Sys program. It was a great class, and gave me an excuse and an opportunity to play with Cisco gear. It was awesome. I also used Todd Lammle’s CCNA study guide (Available at Amazon.com), which was also amazing. It may not go as in-depth as Cisco’s books, but it covers exactly what you need to know to pass the CCNA. I’m a big fan.

The biggest thing I did was memorize commands. I knew that knowing the IOS commands for routers and switches would be important, so that’s what I focused on. Specifically, I didn’t spend a whole lot of time actually practicing on the gear. Once I’d set up RIPv2 or VTP once, I didn’t really feel like doing it again was going to help me much. I went through the chapters of Lammle’s book and learned every command he mentions. I think that was the biggest thing that helped me pass. Also, spending 4 hours in the car outside the testing center running through commands didn’t hurt.

Anyway, point is, I passed! I am now an official Cisco Certified Network Associate. Who knows if I’ll actually use the things I learned after I leave school, but I certainly hope so. I really enjoy networking and all that jazz.

QA Tool Review: JMeter

2 January, 2010 (18:25) | Review | By: Ryan

Description

Apache JMeter is open source software, a 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

Apache JMeter may be used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more). It can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.

Overview

Pros

  • Free & Open Source
  • Distributed testing

Cons

  • A little buggy
  • Reporting is lacking

Pricing

  • Free and Open Source
  • Programmed in Java

Ease of Use

Ease of Installation

Install Java, download the zip file and unzip it. Run the .bat file to run the program and you’re set.

Setting up a Test

Add a thread group to the test plan. Configure the thread group by determining ramp-up period and how many threads you want running at the end (see Figure 1). Set up a proxy to record your test (Right-click Workbench à Add à Non-test elements à HTTP Proxy server). After the proxy is set up you can tell your browser to route requests through the proxy (default localhost:8080). The proxy will record all requests and store them in the Thread Group as samplers. Add a listener to record your test results and you’re good to go. Overall it’s a very straightforward, well-documented process.

Figure 1 – Create thread group

Running a Test

Run à Start or Ctrl+R. Bam!

Technical Knowledge Needed

Very little technical knowledge is needed. It does require the ability to learn how to do something from the documentation since it is not very intuitive.

Platforms

JMeter is a Java program, and thus runs wherever Java can. It requires Java 1.4 or greater.

Functionality

Recording a test

JMeter provides a proxy server through which you can record tests (see Figure 2). It’s fairly simple to set up, and it does a good job recording every request sent through it. You can choose which kinds of files to include or exclude in the recording, which is great because you probably don’t need to record all .gif, .png, etc. files as separate requests. Set it up by right-clicking the Workbench and select Add à Non-test elements à HTTP Proxy Server. It can then be configured to group the samplers however you want, and add the instructions for which URL patterns to include or exclude. See Figure 2 for an example set up. Once it is set up, just click start and tell your web browser to direct traffic through the proxy. The samplers will be created and you are well on your way to having your dream test.

Because it uses a proxy, it cannot detect HTTPS traffic, so any secure requests will have to be created manually.

Figure 2 – Set up a Proxy Server

Scripting

JMeter supports BeanShell scripting. I don’t know anything about it, so I can’t really rate its ability, but supposedly it exists.

Reporting

There are several reports that can be viewed within JMeter that provide a moderate level of detail. The data listed below can be recorded in a CSV file after each test. The built-in reports you can view in the GUI during test runs are lacking. Some of them don’t work. Some are useful (see Figure 3). The list below includes all information available in the CSV file:

  • Start time (ms)
  • Load time (ms)
  • Sampler name
  • Response code
  • Response message
  • Thread name
  • Content type (e.g. text, bin)
  • Success
  • Size in bytes
  • Latency

Figure 3 – Distribution Graph

Trend Reporting

JMeter’s listeners do several things, including trend graphing (see Figure 4). In addition, the exported CSV file contains detailed information for each request, including the time that the request started and how long it took. From this, with some Excel magic, it would be possible to create a trend graph.

Figure 4 – Trend graph

Integration

The only integration JMeter supports is exporting test results to CSV.

Data Functions

Using a CSV Data Set config element, you can easily create user defined variables using the information from a CSV file (See Figure 5).

Figure 5. CSV Data Set Config

Load Generation / Distributed Load Generation

JMeter offers distributed testing. I have not tested it, but from reviews it appears that in order to use multiple load generation tools, the GUI must be used. However, it is possible to run tests on one computer without the GUI and just record the results to a file. This minimizes system resource use and allows you to generate a higher load from one machine.

Documentation

The documentation for JMeter is extensive. The JMeter website has a ton of documentation, great tutorials, a great user manual, and clear Javadocs. There are also many other website with great tutorials and documentation for getting started with JMeter.

User Interface

Typical Java Swing GUI. Ugly but functional.

Performance v. Stress Testing

JMeter offers both constant-load performance testing and ramp-up stress testing. The tests are set up to run for a certain number of repetitions.

Bugs/Weirdness

  • Excel problem with JMeter CSV files: When saving test results to a csv, Excel likes to show big numbers (like the start time) in engineering notation (i.e., 1.24E10). If you open the file and save it, it will save it in engineering notation. When you open the file again, several significant digits will be lost, making the start time data essentially useless. This can be overcome by changing the stuff from a CSV to XLSX or by formatting the number as a regular number.
  • You can’t save both the Test Plan and WorkBench at the same time. You have to save each separately. I also couldn’t get them to open together. I could open either the workbench or the test plan file, but if I tried to do both, the second one I opened would overwrite the first.

Project Info

History

Stefano Mazzocchi of the Apache Software Foundation was the original developer of JMeter. He wrote it primarily to test the performance of Apache JServ (a project that has since been replaced by the Apache Tomcat project). JMeter has been redesigned to enhance the GUI and to add functional-testing capabilities.

Frequency of Releases

JMeter has a new release approximately 1-2 times per year. Most of these releases are minor bug-fix versions. The most recent version (2.3.4) was released in June, 2009.

Ohloh.net says that JMeter is experiencing decreasing year-over-year development activity.

Active Forums

Official Forums

Unofficial Forums

Company URL

http://jakarta.apache.org

QA tool review: Watij

18 December, 2009 (10:20) | Review | By: Ryan

Description

Watij (pronounced wattage) stands for Web Application Testing in Java. Watij is a pure Java API created to allow for the automation of web applications. Based on the simplicity of Watir and enhanced by the power of Java, Watij automates functional testing of web applications through a real browser. Currently Watij supports automating Internet Explorer on Windows only. Future plans are in place to support others like Mozilla.

Overview

Pros

  • Automatically waits for new pages to load

Cons

  • No record function to record/playback test scripts
  • No support for drag/drop in websites
  • IE-only

    Read more »

Set up Postfix to send from Gmail

11 December, 2009 (23:15) | How to | By: Ryan

Alternate title: How to send 9,000 emails from a Gmail address

To preface this, I want to say that I am currently in charge of online activity for an honor society at school. As part of those responsibilities, I needed to send emails to over 9,000 prospective members to invite them to join the organization. We use Gmail addresses for our organizations email, but Google shuts off an email address after sending about 500 emails, and it shuts off an IP address after you send about 1,500 (using three different accounts).

To solve this problem, I installed an SMTP server (Postfix) on my computer at home so I could send that many emails. I couldn’t find any free email provider who allows that many emails. Here are the steps to create the server:

Read more »

On Fatherhood, Windows 7, and the Motorola Droid

1 November, 2009 (20:22) | Uncategorized | By: Ryan

Okay, it’s been a busy semester, so it’s been a long time since I’ve posted anything here. I’d just like to give some updates:

1) I had a baby. He was born October 2, 2009 at 7:41 PM. He is awesome, and very well-behaved. He’s not even a month old (well, he will be tomorrow) and he already sleeps 6-hour stretches at night. Amazing.

2) Windows 7 is out now. Of course, you already knew that, but what the hey.

Read more »

QA Tool Review: Selenium

23 August, 2009 (16:15) | Review | By: Ryan

This will be the first in a series of reviews of various software testing tools. These were done over the past few weeks and cover the tool’s usage from a new QA tester’s perspective.

Selenium 1.0.1 Evaluation

Description
Selenium is a functional testing tool designed to automate tests on web applications. Tests can be recorded or created using the Selenium IDE or using Selenium RC. With Selenium RC, tests can be written in Java, C#, Perl, PHP, Python, and Ruby. Selenium IDE is available from either the Firefox add-ons page or the Selenium homepage, though I recommend the Selenium page because the Firefox add-ons version is sometimes out-of-date. Selenium RC is only available from the Selenium downloads page.

Pros

  • IDE allows easy recording and playback of tests, plus translation into other programming languages.
  • Tests can be played in any browser

    Read more »

Twitter: Getting started tips

20 July, 2009 (17:31) | Uncategorized | By: Ryan

I think I have procrastinated long enough in trying out the whole Twitter phenomenon, so I’m giving it a try. It’s been all over the news lately, apparently receiving $48 million worth of free publicity in the last month. So far, here are my impressions

  • It’s super easy to use, and really easy to get set up with an account. I love the fact that your entire life must be reduced to a 160-character bio.
  • A Twitter client is the way to go. I haven’t settled on any one particular client yet, but I can tell that it is a much easier way to use Twitter than through the web interface. So far I’ve used Seesmic Desktop, TweetDeck, and Tweetie (Mac only).
  • Spammers are everywhere, so don’t automatically following everyone who follows you. My first follower was some “girl” from a dating site of some kind. Check out a person’s page before you follow them. It is way to easy to fill up your homepage with a bunch of updates you don’t actually care about.
  • Don’t obsess over getting people to follow you. All you can do is post about what you are interested in, and hope that others are interested. “If you build it, [they] will come.”
  • Something I learned from using Facebook: Don’t use Twitter to update your facebook status more than about 2x per day. You’ll start to flood people’s newsfeeds and that’s just annoying. Twitter is supposed to be updated that frequently. Facebook really isn’t.

So, I’ve only been on for a few days, but those are my tidbits of wisdom for anyone looking to start along the Twitter path.

Free Pandora Desktop with Mozilla Prism

17 June, 2009 (20:04) | How to | By: Ryan

So, I would say I’m kind of obsessive about which programs I keep running on my computer. When I started using Pandora Radio at work last week, I got kinda frustrated that I always had to keep one window of Firefox open. Always. I would often accidentally close the window just because that’s what I do.

Naturally, the first thing I did was look for a Pandora desktop application. I’m not fortunate enough to have an iPhone or fancy smartphone that has a Pandora application I can run. Pandora has a desktop application, but it is only available for $36/year with their Pandora One service. I considered it, but I don’t know if I’ll use the service after this summer, so I wasn’t ready to shell out money for it.

Read more »

First Python Program – Wake on Wan

17 June, 2009 (20:04) | Posts | By: Ryan

So, I decided to start learning Python because I feel the need to get better at programming and I was kinda tired of Java’s bulkiness, especially when writing simple things. For example, I decided that I wanted to write a script to wake my home computer from the Internet. There are a bunch of programs out there for Windows, but I couldn’t find anything good for Mac. I also don’t really like the idea of using a web interface. So, I learned Python and built this:

Read more »