bAdkOde: An Esoteric Language
I’ve added another project to the projects page. It’s called bAdkOde, an interpreter for an esoteric language that I designed. The very first incarnation of bAdkOde was written in Java and I actually posted it (or made a blog entry about it) over 8 years ago. For some reason I took it down. Probably because I stopped working on it. Anyway, I redesigned the language and wrote an interpreter for it in Perl about 4 or 5 years ago. I finally got around to posting it. Check out the project page for more details. Let me know what you think.
Popularity: unranked [?]
An update to the Grinder testing-framework
Mukesh alerted me to a problem with the Perl conversion script (that converts the XML produced by the Grinder recorder into a Jython file). It wasn’t parsing all the parameters in a GET request properly. I’ve fixed the bug and uploaded a new version of the script. You can download it here.
Popularity: unranked [?]
JSTL, instanceof, and hasProperty
I’ve been doing a little bit of JSTL over the past week, especially custom tags. I’ve written custom tags in Grails before, and there you use actual Groovy code. I guess this was how custom tags used to be written (in Java), but now you can can build your own custom tags using the standard tag library. The standard tag library is still pretty useful when it comes to building custom tags. Since it’s not straight Java, it forces you think really hard about your logic. You don’t want to put any business or application logic in your tag, and you want to restrict everything to view or presentation logic. A side effect of it not being Java is that if you want to do anything extremely complicated, you’re probably better off writing the tag in Java (making sure that you don’t let any business logic creep in).
While writing my own custom tag, I noticed that although instanceof is a reserved word in the JSTL EL (expression language), it is not supported as an operator. The reason I wanted to use the instanceof operator is that I have an attribute that could either be a List or a Map and depending on the type, I wanted to do different things.
Another thing I was trying to do, was to inspect the incoming object to see if it had a certain property (reflection). JSTL uses reflection so that you can access the properties of an object via dot notation, if they follow the JavaBean naming-convention. However, there was no way for me to see if an object had a certain property. To solve both these problems, I wrote my own JSTL functions.
Read more »
Popularity: 9% [?]
Writing Performance Tests in Grinder using a Framework
This project is now available on GitHub.
Before reading this tutorial (if you haven’t already), please took at look at my last two tutorials (Performance Testing using The Grinder and Anatomy of a Grinder test-script). In this tutorial I’ll talk about easily writing Grinder test-scripts using a framework I designed. As a disclaimer, I’d like to point out that I’m not a Python programmer and therefore certain things may not be very python-esque. If that’s the case, I apologize. My personal opinion is that this framework is especially useful (of course, since I wrote it
) for web applications where you have a already have a lot of test data. In that case, you can simply record all your discrete tasks once and then construct different scenarios with them. But if you feel differently and have some constructive criticism, I do look forward to hearing from you! Also, if you’d like to try out the framework I’ve got a tarball and a zip file available for download on the very last page.
Read more »
Popularity: 99% [?]
Anatomy of a Grinder test-script
This is my second post regarding Grinder. In this post I’ll go over the anatomy of a recorder Grinder test-script. If you haven’t read my previous post, please take a look at it. Otherwise this post won’t make much sense!
High-level structure of a Grinder script
The high-level structure of a recorded Grinder-test-script looks like this:
[
...
import statements
...
]
[
...
header definitions
...
]
[
...
url definitions
...
]
[
...
request and test definitions
...
]
class TestRunner:
[
...
method definitions - a method is defined for each recorded page
...
]
def __call__(self):
[
...
calls to defined methods, which actually runs the requests
...
]
[ utility function (I'll go over this later) ]
[
...
calls to utility function to wrap/instrument tests (I'll go over this later)
...
]
Popularity: 20% [?]
Performance testing using The Grinder
About a month ago at work, I was trying out a bunch of different performance-testing tools to figure out which one to use to performance-test our software. I ended up discovering a tool called The Grinder which uses Jython to build performance-testing scripts that you can then use to test your application. I even built a little framework in Jython to make the test scripts more modular and reusable. Over the next few days I’ll be publishing three articles (this one included) that talk about Grinder.
Introduction
In this article I’ll go over installing and setting up Grinder. I am not going to go into too many details since my aim is to provide information that will enable you to have Grinder up and running quickly. If you want more information, you can look at the rather thorough Grinder User Guide. At the end of this guide, you’ll know how to install and set up grinder, record a test, modify (and/or parameterize) it, start running it through the console, and record data from the test. Note: The instructions in this guide relate to a Linux environment. You can run Grinder in Windows; the set-up is not much different. The only differences will be in installation locations and shell scripts. If you want more information about setting up Grinder in a Windows environment, please take a look here.
Read more »
Popularity: 32% [?]
My new T-Mobile G1 Android Phone
So I got my T-Mobile G1 Android phone yesterday, and boy am I excited! I had mixed feelings about it initially because I wasn’t so sure of the form factor. I remember thinking that it looked a little clunky, but now that I have it here, in my hand, I have to say that it feels well-made and rather solid. The exterior is made of plastic, and it feels smooth to the touch and not cheap at all. The keyboard slides out smoothly and I’ve had no problem typing on it. The interface is pretty snappy. I was actually surprised at how smooth and responsive it was. As far as the interface is concerned, the only issue I have is with the zooming. It may just be that I haven’t figured out to activate it reliably. I guess they had to go with this method because Apple is trying to patent the “pinch” motion for zooming. I think that is completely stupid, of course, and the patent office should throw it out.
Anyway, so once I picked up the phone I opened up the package and carefully laid everything out. T-Mobile sent me another SIM card with it, which didn’t work; I guess you have to activate it. But that really wasn’t a problem since I have my old SIM card. Once I put it in the phone and hooked up the new battery, I started up the phone. When it firsts starts up, it asks you for your Google account information so that you can sync everything with your phone. As soon as it synced up (which happened within a matter of seconds), I was good to go. I started off by trying to import my contacts from the SIM card. This is where I came across a problem. Apparently (I could be wrong, I was too impatient to explore more options) you can’t import all your SIM contacts in one go. You have to do it one by one. I found that a little annoying. You can either import your contacts one-by-one, or import them all in one go by hitting the Menu button and then choosing the Import all option. As soon as I had my contacts imported, I started exploring the other options. The home screen is pretty sweet. You can drag and drop icons on there, and swipe left and right to either add more icons or run google search. In addition to GMail, you can add other POP3/IMAP accounts and you can also use other IM networks in addition to GTalk. The G1 also has a music player and a bunch of sample tracks (including Flight of the Conchord’s “The Most Beautiful Girl in the Room”). The phone doesn’t have a headphone jack, so you have to get a USB to 3.5mm converter. The Bluetooth works fine and synced up to the Hands-free Link in my Acura without any problem. Although, like the iPhone, you can’t transfer files via bluetooth. I imagine that they will fix this eventually. The phone also has a feature where you can set up a “pattern” to unlock it. You have to “draw” a pattern on the screen connecting nine dots (laid in a 3×3 grid pattern) to unlock the phone. The other cool thing was the “Compass Mode” in the Google Maps street view. The phone adjusts the street view based on where you’re pointing it, and so the scene on the phone actually moves when you move the phone. It’s pretty neat!
So, my opinion? As far as a phone (or PDA) goes, I think that the G1 is pretty solid. I know that some reviewers claimed that they didn’t think it would really appeal to most people. However, I think that it will. It has a pretty slick interface and a lot of neat features. Additionally, I think the demographic it will appeal to most, is people like me – developers and people who like to play with neat gadgets. I know that once I get some more time on my hands, I’m going to try and develop stuff on it. iPhone killer? I don’t know. But I think the G1′s strength is that it is completely open. In effect, it is the antithesis to the iPhone, or the anti-iPhone. Google doesn’t control the G1 (or Android) as strictly as Apple controls the iPhone, and especially with regard to the SDK. Google seems to want to encourage developers whereas Apple seems to want to encourage them only as long as they play by Apple’s rules. Consider also the fact that if you do want to develop for the iPhone, you can only do it on a Mac. Whereas you can develop apps that will run on Android on Windows, Mac, or Linux. I guess we’ll have to wait and see. But for now, I’m just happy to have a cool new toy er… I mean, phone!
Update
I’ve noticed a lot of queries to this blog post regarding the importing of SIM contacts into the G1. The process is quite simple:
- Swipe the dock at the bottom of the screen upwards to access the G1′s menu.
- Select Contacts from the menu.
- Hit the Menu button and then select Settings
- You should now see “Sync Groups” and “SIM contacts importer”
- Select SIM contacts importer. You should now be able to import your contacts.
- If you want to import them all in one go, hit Menu and then select Import all
As a general rule, if you’re having trouble finding (extra) options, hit the Menu button. It should show you a few more options.

The G1′s outer box

The G1′s inner box

The G1 inside the box

The G1′s accessories and manuals. The accessories you get are a carrying case, battery, headphones, USB cable, and charger. Oh, and you get a SIM card too (if you ordered through T-Mobile’s website)

The G1 inside the box

The T-Mobile Android G1

G1 side view

G1 keyboard flipped out

G1 keyboard flipped out

G1 menu

G1 dialer

G1 displaying Google Maps

G1 displaying Google Maps (side view)

G1 displaying Google Maps Phoenix Satellite View (side view)

G1 displaying Google Maps Street View

G1 displaying vivin.net

The G1 in its case
Popularity: 2% [?]

