MySQL JDBC and Streaming Results
// January 14th, 2011 // No Comments » // Databases, Development
So after almost a whole day of banging my head on my desk, I’ve come to realize the error I was getting:
org.apache.solr.handler.dataimport.DataImportHandlerException: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
was related to the old version of the MySQL JDBC connector I was using, 5.0.8. It turns out it doesn’t recognize the netTimeoutForStreamingResults parameter, causing my executions to die a horrible death after 600 seconds, the default setting. Upgrading to the latest connector, 5.1.14, solved the problem and I’m happily importing my million records of data into Solr. Yay.
qs2hash – QueryString to Hash for Ruby
// December 19th, 2010 // No Comments » // Random Stuff
After reading some comments in a friend’s code, I created this function to parse URL querystrings into Ruby hashes. I’m sure there are better ways of doing it, but this is what I came up with in about 20 minutes. Comments welcome.
Lenovo X100e Notebook
// December 11th, 2010 // No Comments » // Random Stuff, Technology
Cyber-Monday was upon us and I was doing my best to fend off the great deals flying around the Internet. I was doing a fantastic job until I saw the Lenovo X100e on sale for $400. I’ve been looking to replace my 7″ Fujitsu Lifebook P1510D tablet and the X100e seemed like the perfect machine to do that. It was known the 11.6″ notebook ate through the 6-cell battery in about 4 hours, and the AMD Neo would certainly keep your lap warm in the Winter. However, the Lifebook would get about 5 hours on its 6-cell and also got hot under heavy use. The considerably higher resolution screen and full-size keyboard were worth the trade-offs in my opinion.
Overall the product has the feel of quality you come to expect from the ThinkPad series. One big deal for me is the TrackPoint system, especially if I’m giving up my touchscreen capability. The keyboard is of a chicklet type, though I’m not sure why there is spacing between the keys. I would have taken a smaller form factor if that meant the keys would be right up against each other. Aside from smaller function keys, there’s also smaller Insert, Delete, Home, End, Page Up, and Page Down keys, the rest are full size, including the two Shift keys.
In terms of system notification you’re only given a power light (backlighting the power button), a battery status, and a sleep/hibernate status. There’s no way to tell if your HDD is working or if you’re wirelessly connected, as you get with the T61. Some people have groaned about the D-SUB (VGA) port and that it should have been an HDMI, but I’m fine with it. All of my HD TVs have a D-SUB, and since this notebook was geared towards the business side of things, who typically find D-SUBs on projectors, not HDMI, it’s no surprise why it’s there.
Windows 7 was the only option available and it certainly held up to my expectations that it would run like a snail. The first order of business was to resize the main hard drive partition and get Xubuntu 10.10 installed. There are two other partitions in addition to the main Windows partition, a ‘boot’ and ‘restore’ partition. Having 3 primary partitions meant that I would have to first set up an Extended partition and inside there create those needed for Linux. The X100e has no disc drive but does boot from a USB stick, so that was my install media. The entire installation took about 1 hour, initial boot to reboot, and was considerably easier than previous Ubuntu-based installs.
And now begins the tedious task of getting the system to a place that I can do ruby development on, work some amateur stations using PSK31, check my mail, and generally use as an everyday device. In my next post I’ll detail the various packages and gems I had to install in order to get everything in a happy place.
Overall I’m quite pleased with the Lenovo X100e, even if it’s light on battery and heavy on heat. I have a feeling it will serve me quite well as a replacement of my tablet.
Ruby ADIF to SQL
// November 9th, 2010 // No Comments » // Amateur Radio, Development, Ruby, Twitter
Saw someone on Twitter need this, so I whipped something up pretty quick. It’s not pretty, but it gets the job done.
You run it with:
ruby adif_to_sql.rb [ADIF_FILENAME] [MYSQL_TABLENAME]
You just specify the ADIF file and the name of the MySQL table name. The script creates an SQL file that can be imported directly into MySQL.
Get the script here: http://www.kritikal.com/ham/adif_to_sql.rb
Cheers!
Frying the bacon – A Q&A site for amateur radio
// July 1st, 2010 // 2 Comments » // Amateur Radio
So I’ve always loved the idea of StackOverflow and other Q&A site clones. They are simple, to the point, and makes it very easy to get an answer to a burning question. I know there are plenty of amateur radio themed forums, but those are really designed for discussion, not really a quick Q&A.
But now, there is a site where you can ask any and all amateur related questions and hopefully get a quick answer: BaconFrying.com.
It’s just getting off the ground so there aren’t too many questions there now, but the hope is that more people use it as another resource to get help quick when working on a project, or settings up an antenna, or even help with getting their license. While these kinds of sites live or die on the fact that people want to post their question there, instead of through another medium, such as Twitter or the various forums out there, they more importantly rely on the fact that people actually get their questions answered.
It can sometimes be a ‘catch 22′: if there are no questions, there’s nothing to answer, and if there are no answers, then people will not post questions. I’m hoping I can lean on the 21-century amateur radio community to help jump start the site and get it moving along.
If you have any questions please post them there, even if you know the answer! There’s no harm in answering your own question, and in fact, tends to be the case with most hams who seek out the community through different avenues. Did you come across a new bit of information that helped you become a better amateur? Just post up the question or problem that it can help solve and then provide the answer.
As is the case with any website that is wholly dependent on user-generated content: the more people that use it, the better it gets!
I’m always open to comments and suggestions about how to make the site better, so please don’t hold back!
Thanks and hope to see your questions on BaconFrying.com!
Here it comes again! Dayton Hamvention 2010
// May 12th, 2010 // 1 Comment » // Amateur Radio, APRS, Dayton, Twitter
Another year has come and gone and mid-May is upon us once again, meaning only one thing: It’s time to give in to my EM addiction at the Dayton Hamvention.
The Crew Grows
This year will be the first time my brother Dave, KD8MZT, will be going and I’m pretty excited to see his face when we arrive. He’s been to several local swaps lately since getting his ticket but I don’t think he understands the sheer magnitude of Hamvention. Of course, this means the drive will be a little tight in the back but I don’t think either of us are going to mind much. As an added bonus, he will get his new vanity call, N8DAH, while we’re down there, so he’ll be due a new name badge.
Shenanigans on the Road
Every year I like to do something different while we trek along I-75 South for four and a half hours. This year will be no different and thanks to my father’s obsession with making his truck more connected than a EmComm command post, we’ll be rocking PSK31 on HF, along with several other digital modes and voice. Perhaps I’ll get my first mobile HF contact!
I suppose I’ll also be connected to the good ol’ Internet for chatting it up with others en route but I really do want to focus on the amateur radio aspect of this and stay away from the web, except of course when posting random tweets or pictures.
Hopefully the rest of the crew will not be too harsh as I try to get some video of the trip, starting bright and early at 4am.
Scavenger List
As with most years, I don’t have any ‘needs’ but certainly a lot of ‘well if I happen to see it for the right price’ items. Lots of magnets, perhaps a used mag-loop antenna, various memory cards, micro-drives, and maybe even a 6-meter radio that’s easy to use on digital. I never really go with anything in mind to get but always come back with a handful of things and a huge grin. I don’t think there’s a single ham who can say they don’t love digging through a box of ‘junk’ looking for great ‘stuff’.
Antenna-Helmet
Oh yeah, it’s back, and this time with twice the radiating power! Not only will I have my TH-F6A attached to the center antenna, but I’ll also have an antenna mounted on the helmet visor for APRS. Using my RadioShack HTX-420, an OpentTracker+ and Argent Data System GPS puck with power supplied by a 12 volt lead acid gel cell battery.
I’d like to see what it would take to trickle charge the battery using solar panels that will be mounted on the side of helmet. Just a little something to put together while I’m there winding down after each day. If I’m feeling very adventurous, I’ll set up my laptop with it so I can RX/TX messages too.
Tweetup!
Yep, I’m trying to get a bunch of people together, but that’s all I’m going to say since it’s a TWEETUP! If you want more info, follow my twitter @kritikal for more info. I suppose you could just watch the lifestream on the right hand side, but where’s the fun in that?
T-minus 4 hours!
I’ve compressed what I wanted to say but I should get some sleep before we venture out on the road.
73, safe travels, and see you there!
Andrew, K8DJK (soon to be W8FI)
Updated KWiXS NCEP Viewer
// April 7th, 2010 // No Comments » // Development, Forecasting, KWiXS, NCEP Viewer, Weather
I’ve gone ahead and removed the unused model that was discontinued last year and added the GEFS and SREF models. I’ve also discovered why some of the valid dates will not stay the same when you hold down ‘shift’ when changing model runs. I’ll have to create a new property for the model that holds how far apart the model runs are from one another, rather than simply using the next hour in the run.
As always, you can check out the latest version at http://www.kwixs.net/ncep/
A Grand Opportunity – Ignite Detroit
// February 19th, 2010 // 3 Comments » // Amateur Radio, Social Media
Earlier this month I submitted my topic, “Hamming it up!”, to the Ignite Detroit organizers, knowing amateur radio was what I was going to talk about, but not a clue on how. With the support of many people I was selected, along with 15 others, to present my topic on February 25th. I am humbled by being given the opportunity to introduce over 200 people to Amateur Radio, and the process of developing my presentation has made me aware of perspectives I would not have otherwise encountered.
As a geek all my life, predisposed by my father and grandfather’s love of electronics and computers, I have analyzed and perceived just about every aspect of my human experience a little differently. While my wife may sometimes get annoyed, I have an uncontrollable urge to point out snafus in television shows, rather than pay attention to the actual character dialog. It’s something subconscious, something I have long given up trying to fight, and instead welcome with open arms.
Perhaps that’s why Amateur Radio, and technology in general, has appealed to me. The people, groups, and organizations that surround these interests are made up of those who see things differently. To me, these are people who see technology as a putty or clay from which they can build their own imagination into reality. If there is one single thing that I’ve learned from fellow amateurs, and the communities they make up, it’s never fearing to ask, “Why not?” The methods and ingenuity hams typically show in an effort to see their ideas realized are nothing short of amazing and awe inspiring.
The chance to share this passion and insight to the rest of the world, at least as I saw it, forced the pride within me to jump and scream, never relenting until I finally hit the ‘submit’ button. I’m pretty sure that same pride had a mild stroke when I received the email that my topic has been chosen.
When I sat down to put together my 20 slides, I initially wanted to inform the audience about why they should get involved. That urgency to bring new people into the hobby is something felt by most anyone passionate about what they love to do on their spare time. If I had gone that route, no doubt it would have sounded like an elevator pitch that was 4 minutes and 45 seconds too long. Lucky for me I suppose that I didn’t know how to start my ‘pitch’. Eventually I took a break, watched some TED presentations, and thought about how I would feel if someone was presenting a pitch about television character dialog.
One of the greatest abilities that humans have is self-discussion. You can call it self-reflection if you’d like a less psychotic sounding term, but really, who doesn’t talk to themselves in their head? We know exactly what does not interest us, and we know why. It could be due to something else present, winning our attention, or an aspect of what we’re perceiving as negative, or something else entirely. But there’s always a reason, and the human mind was built to reason.
In a world where we are continually fed more and more information, our ability to retain attention and interest has decreased drastically. When you add the fact that people are now more than ever capable of accessing specifically sought information, introducing something new to someone has never been a greater challenge. Perhaps that’s why you’re seeing a growing emergence of people rebelling against this constant barrage of typed information. The number of people actively seeking new and foreign information is expanding, as evidenced by TED, TEDx, Ignite, and other conferences.
And that was it.
I didn’t need to ‘pitch’ my audience. I didn’t need to sell them on my hobby or passion. I didn’t need to tell them why they should associate any subjective adjective to what I love. If there is one thing the social media scene here in Detroit has taught me, it’s that smart people are never disinterested in something, they’re simply interested in something else. They crave new and creative ideas so they can better reflect upon and modify their own perspectives. It’s the same fundamental that drives radio amateurs to bounce their signal off the moon, or ‘foxhunt’ rogue radio signals, or play with radio waves 100 times the frequency of your wireless router. It’s the same fundamental that drives people to innovate and invent; to embrace a certain level of chaos to see new order. Simply put, that which we already know is boring, and I’ve yet to meet a boring person at a tweetup or conference.
From that point on, the hardest part about developing my presentation was finding the pictures to convey various aspects of the hobby, even those that I don’t have an interest in…yet. I hope those in attendance learn something new, whether it’s about amateur radio, themselves, or something completely unrelated. I suppose I’d even be happy with the notion you’ve just discovered that the person in front of you has a crinkle in his left ear that’s not in his right. I simply ask that you reflect on why that’s interesting and learn something new about yourself, because in the end that’s what this is really all about.
INSERT IGNORE and DataMapper
// February 18th, 2010 // No Comments » // DataMapper, Development, Ruby
So I needed a way to replicate the ‘INSERT IGNORE’ statement in DataMapper and being that the code documentation is sparse, and I didn’t feel like force feeding an SQL statement into DM, I wrote some ruby code to replicate it.
If anyone has a better, or more refined solution, please let me know!
rescue DataObjects::IntegrityError => e
@logger.error e
unless e.code == 1062
throw e
end
end
Happy Birthday HAL!
// January 12th, 2010 // No Comments » // Music, Random Stuff
To celebrate HAL 9000′s birthday, I present free for download, a track I produced a couple of year ago.
Enjoy!