Author Archives: Frank Roberts

I’m finished

The last month and a half has been pretty intense. I wrote the majority of my masters thesis while at the same time TAing CS115 and working on several other miscellaneous things. I successfully defended my thesis on April 19 and the graduate school officially accepted my thesis this afternoon. I’m finished with my degree and with school in general, at least for the time being. I should actually have time now to post here regularly.

I’ve got an internship this summer with SDGblue. I’m not sure precisely what I’ll be doing, but SDGblue provides IT and other services with a strength/focus in security and compliance. I think this work will be interesting and I’m looking forward to it. In my spare time, I will continue work on NodeScape and the web front-end I’ve been working on as part of my masters thesis.

ThinkPad T430s Review (Part 1)

Part 2

I decided at the end of last summer that it was finally time to replace my Dell Latitude D820. I looked at 14″ business laptops from both Dell and Lenovo. I started looking at the T430s, saw a good deal, and jumped on it.

The T430s is thin, light, and sturdy. The build quality on this thing is great. I regularly carry it around open by the corner of the palm rest, and I don’t detect any flex. At just under an inch thick (0.83in – 1.02in), it’s easy to move it around and get it in and out of bags one-handed. The screen is a tad flimsy (it’s maybe a quarter of an inch thick), but this hasn’t really been a problem. The hinges, of course, are indestructible.

Probably the most controversial thing about the Tx30 line is the new keyboard. Lenovo’s recently been switching all of their laptops to a chicklet/island style keyboard. This change rubs some veteran ThinkPad users the wrong way, as ThinkPads are known for their awesome keyboards. I never spent much time using a ThinkPad before this machine, so I can’t compare with the old keyboards. I can say that the keyboard on my ThinkPad is the best keyboard I own. The keys have a fair amount of travel, and their response is satisfyingly crisp. I believe it’s the best laptop keyboard available. Consumer laptops all have mushy keyboards (I recently assessed the state of keyboards at Best Buy), and the keyboards on Dell’s business laptops, while much better than the consumer laptops, still leave something to be desired.

My only keyboard complaints are the Caps Lock, Page Down, and Page Up keys. The Caps Lock key doesn’t have an associated LED, and I regularly find myself brushing it and then wondering if I hit it hard enough to activate Caps Lock. Without an indicator, I’m forced to guess and check. The Page Up/Down keys are tiny and are nestled in above the left and right arrow keys. The arrow key matrix is the only place on the keyboard without much gap between the keys, and I sometimes have problems hitting Page Up when I really meant to hit left arrow.

On a related note, I decided to get the backlight option on the keyboard, and I must say that that was a very good choice. This option pays for itself the first time you try to work in the dark. I hit Fn+Space and I can see my keyboard again. The backlight has two brightness settings. I can change the current setting by tapping Fn+Space. Tapping Fn+Space a third time turns off the backlight and turns on the ThinkLight, which is another great feature (albeit one that’s apparently disappearing on the next generation).

One disadvantage of having a compact 14″ laptop is the loss of depth. The keyboard is roomy, but what I get in keyboard space I give up in touchpad arrangement. The arrangement gives priority to the TrackPoint nub/buttons, which I don’t often use. I prefer to use the touchpad and the Left/Right buttons below the touchpad. Unfortunately, the buttons aren’t very tall (1/3″?) and are situated right on the edge of the chassis. They’re easy to miss.

The touchpad itself is rather large. The size is nice, because it basically gives me more resolution for small gestures. Unfortunately, the size of the touchpad and the lack of a physical delimiter on the pad means that I tend to palm the touchpad when typing. A few generations ago (Tx00?) Lenovo started using textured touchpads. It took some getting used to, but I actually like having the little bumps.

This post pretty well covers my thoughts on the keyboard and other input devices. I’ll talk about other features and give more thoughts in a future post.

 
Part 2

CCSVLIB 20130307

Update 3/7/13: I forgot do a collision search on Google for “csvlib” before releasing this. Apparenlty everyone calls their CSV handling utilities package “csvlib”. I’ve renamed mine CCSVLIB.

I keep finding myself in situations where I’ve got data in spreadsheet form but I want to perform some analysis or transformation on the data beyond my capabilities with LibreOffice Calc or Microsoft Excel. Then sometimes, I want to go the opposite direction, and have my software do output in a format that I can convert into a spreadsheet. Fortunately, both Calc and Excel can read and write comma-separated-values (CSV) files. CSV files are nice to work with. They’re plain text and thus easy to read or write from my own software.

Well, easy in theory. In practice, CSVs that come from different sources may use different formats (quotes vs. no quotes vs. optional quotes, are commas allowed in the data, etc.), which makes reading CSVs a little too painful for use in small one-off scripts and programs. In addition to inconsistent formats, the code necessary to correctly parse a CSV file is often larger than the code that performs whatever analysis or transformation I want.

I deal with CSV files enough that I decided to write my own CSV parsing library.  I suppose I could have searched the Internet for someone else’s solution, but I needed a project, and I think parsing is fun. I also decided that if I was going to implement a CSV parsing library then I was going to do it right. I started by looking for a standard for the CSV format and found RFC 4180. After a couple of hours at my keyboard, I had a working parser and a decent data structure for pulling data from RFC 4180 CSVs into memory. My library came up in conversation with my supervisor a few days back (I’m a TA for CS 115 at UK), and she mentioned that she wanted a copy. I decided I wanted to release the software, so I added the capability to write CSV files, polished the API, and wrote some documentation.

What makes CCSVLIB a better choice than any of the other CSV parsing libraries for C/C++? Objectively speaking, nothing, or at least nothing that I know of. I haven’t taken a close look at any of the other stuff that’s available. I can say, based on a cursory Google search, that there aren’t many implementations of RFC 4180. CCSVLIB implements RFC 4180 (well, at least mostly), so it should be able to consume most sane CSV files. Also, CCSVLIB is simple, short, and well documented. The current version is 1051 lines of C, about 400 of which are comments.

I’m releasing CCSVLIB under the BSD license. You can download the source tarball from the link below or from the software page. Documentation and an example are included in the download.

CCSVLIB-20130307.tgz

My Mobile Upgrade

I switched my mobile service to Ting in late March of last year. The experience has been great, and I’m glad I switched. Why did I switch? I’ll get to that. First, let me give you some background.

(OK, so this post turned into a narrative of my journey from feature phone to smartphone. I’ll post my thoughts on Ting in a separate post.)

I had come to the end of my contract with Verizon in 2010 (I think). In the summer of 2011, I began looking at upgrades from my flip-phone (don’t remember why), and saw the Microsoft Kin (I was shopping feature phones, because $30/month data plans are dumb). It had 802.11 wireless, a halfway decent camera, and a crippled browser, so it seemed to be a clear upgrade. I could pay for data at $10/75MB which also seemed reasonable. So I visited a local Verizon reseller. They didn’t have good things to say about the Kin (I don’t think they even had them in stock). I ended up looking at the low-end smartphone options. This was about the time that Verizon was killing their unlimited plans, so there was some uncertainty about exactly what it was going to cost just to have a smartphone. I ended up getting an LG Ally. It took me about a day to reach full-blown buyer’s remorse. I figured out quickly that a) this thing came with a $30/month ball and chain and b) it was never going to be worth $30 per month. I returned the device after about a week.

The Ally was definitely nice (still the best mobile keyboard I’ve ever laid thumbs on), and I still wanted a smartphone. I started doing more research on data plans and the available devices, and began looking at exactly what a smartphone was worth to me per month. I started paying attention to the device market, looking for a device that could have better utility for me.

It was around this time that a number of MVNOs with reasonable data plans started popping up. Their plans were more geared toward someone like me who spends 95% of their waking hours in range of a wireless access point. I was aware of these providers, but I found their phone selection unacceptable (I had two requirements: physical qwerty and at least a 400×800 screen). News of the Droid 4 also leaked in the fall of 2011, and it looked promising. I began biding my time, waiting for Verizon to release the phone. Between a great device and an 18% discount on our family plan (which I had previously been unaware of), the cost of a data plan was acceptable, just barely. December came, it looked like the Droid 4 might release along with the Droid Razr, and I was ready to pull the trigger on an upgrade.

December went, and there was no announcement of the Droid 4. Then, some time in January, one of my lab-mates switched to the Ting beta. I was already aware of Ting at the time, but this kept them in my attention. They had a flexible plan structure, and appeared to be all about providing excellent wireless service. Within the next month or so, Ting ended their beta and started selling to the general public, and I started paying attention to Ting’s blog, along with their Facebook and Twitter presences.

That’s right, they’re a brand new wireless service with presences on Facebook and Twitter. And not just sales and PR drones trying to sell the service. These presences were actually managed by real, living, thinking, feeling human beings. People asked questions, and Ting was obviously trying to be as open as they possibly could in their responses. Some people came to Ting on Facebook and Twitter with problems, and Ting would start troubleshooting right then and there, on the public Internet. This usually ended with a “You’ll need to contact help@ting.com with your personal information. They should be able to fix you up.”, but this is a big step from the way any other service provider interacts with their customers (and potential customers).

Sometime in March, the HTC Detail made it into Ting’s device lineup. Now Ting had a pricing model that worked for me and a device that I found acceptable. By the end of March, I was a Ting customer. I was paying only maybe 30% more than with Verizon, but I had a smartphone and a data connection. If I wanted to contact Ting, I could contact them via email, Facebook, or Twitter, or I could pick up the phone and call them and be talking to a human being in less than 10 seconds. Oh, and did I mention that there was no ball and chain contract involved? Take that Verizon.

KOAP 20130205

In an effort to sustain momentum going into the semester, I was tentatively scheduled to give a talk about KOAP for our research group Tuesday afternoon. KAOP is my tool for developing OpenCL applications using the C host API. I took the opportunity yesterday afternoon to change a few of the things that were bugging me about KOAP.

First, a little bit about how KOAP works internally (well, how it worked until Tuesday). KOAP takes an input file containing C code, OpenCL code, and KOAP directives as input. KOAP expands the directives into OpenCL API calls and combines all of the OpenCL code into a string for compilation at runtime. KOAP does not use formal parsing methods. The parsing takes place over multiple passes and is very ad-hoc. KOAP reads the input into a single string. KOAP processes comments and KOAP includes (like C preprocessor includes) in this first step. KOAP then separates the OpenCL source from the C source and breaks the source strings into double-ended queues (STL deque) of strings, using newline characters as delimiters. KOAP expands directives one line at a time, building a deque of output lines as it goes.

Why STL deques you ask? At one point, that was the only STL container that supported the methods I needed (or thought I needed). My first modification Tuesday was to replace all deques with STL vectors. Vectors support all of the needed operations, and are better suited to the problem (I’m mostly using the element access operator [] and the push_back method). KOAP has been released for over two years now, and I’ve spent two years thinking it was dumb that KOAP used double-ended queues. That’s not bugging me anymore.

My other modification is actually user visible. KOAP understands a handful of arguments for things like setting the flags passed to the OpenCL compiler, setting the device type to be used (OpenCL works on CPUs, GPUs, and other accelerators), and a few other things. All of the command line arguments came in pairs (-argname argument). I had written a very dumb bit of code to parse the command line arugments and set the necessary internal flags. My old parser required that the KOAP file for processing be the last argument, and would only process one KOAP file. I’ve rewritten the argument parser to be more general. The new parser is smarter about how it parses the arguments and accepts as many KOAP input files as you wish to give it.

The queues and the argument parser were the two things that bugged me the most about KOAP. Now that they’re fixed, I’m reasonably satisfied with how KOAP is structured internally. I’m not quite to the point of being proud of the codebase, but at least now there’s nothing in KOAP that I find embarrassing.

We have a MakerGear M2

M2

The research group I work with ordered a MakerGear M2 back in November, and it finally arrived yesterday. My lab-mates and I took the afternoon to pull it out of the box and become acquainted with it. We ordered the pre-assembled package, so this was mostly a plug-and-play operation.

I arrived in the lab shortly after the unboxing, so I can’t describe the packaging in great detail. I’m told that the box was covered in “fragile” labels, and that the zip ties on the printer were color coded; red for ties that should come off and black for those that are permanent. MakerGear uses high-end chocolates are for packing inspection tokens. I can say from experience that those are very good. Before shipping the assembled printer, the folks at MakerGear printed two test patterns, a bracelet and a gorilla head; both were shipped with the printer.

bracelet bigfoot

We started by fiddling with the motion on the head and the bed. Before printing anything, we brought the head and the bed up to printing temps (185 C and 60 C respectively, for PLA) and ran some filament to clean the head. Finding the right calibration settings took three or four attempts at printing something. Somewhere in the process of learning how to manipulate the machine, we managed to move the bed to the positive limit in Y and the power/sensor cables snagged on the frame. The power connector simply unplugged. Unfortunately, the sensor wire snapped at the solder connection inside its connector. After half an hour of negotiating with the connector housing, we were able to extract the metal contact and re-solder the connection. One more round of leveling and we began printing a Companion Cube. We’ve apparently got some issues with our configuration for the skirt, and I think we probably need to adjust the head clearance, but our first printing looks pretty reasonable.

printing cube

I’m certain I’ll have more to say about our printer in the coming days/weeks. It’s an interesting device, and I expect it to be a good toy (or distraction).

Hello, World.

I think I’ll use this first post to talk a little bit about why I’m starting a blog. I’ve been thinking about it for a while, but the catalyst was my recent shift into job-search mode. I’ll be finishing my degree this spring, so I’ve started polishing my resume and my interviewing skills. I decided I should establish a web presence apart from UK (I’ve had a static site on the College of Engineering’s web server for some time).

I really don’t know how much I’ll be writing, or exactly what I’ll be writing about. I hope to post several things about programming and the projects I’m working on. I’d also like to post some reviews of the tech products I use. I’ve got a ThinkPad, a Raspberry Pi, and a smartphone for starters (I’m really not happy with the term smartphone, I guess that’s a topic for a short post). I’ll probably also talk about the marching arts; I follow Drum Corps International pretty closely and I’ve been involved in the local high school marching circuit since 2003. I’m sure I’ll write about other things that don’t fit into either of these categories.