Thursday, October 7, 2010
Sorry 'bout the RSS spam
Alas, as even Microsoft has come to recently realize, Live Spaces was a terrible blogging platform. Lacking easy customization features and a kludgy editing interface made me less than interested in writing posts and it just slowed me down. Microsoft has corrected this by simply admitting that this isn't their core competency, and there's no shame in that, and moving everyone to Wordpress instead. I like this move as we use Wordpress to managed the TEDxRochester, so I'm familiar with it and it does seem to be a good platform. Time will tell, I suppose.
Anyway, on to the apology: as I wrote about in a series of earlier posts, I use Yahoo Pipes to merge all of my online writing into a single RSS feed that I can then insert into other streams like my Linked In profile or at Facebook. Unfortunately, I didn't think ahead about this and when I changed the URL from the old Live Spaces to this new blog, my vanity feed re-pulled everything I've posted to date and I inadvertently spammed those profiles, etc. So, I apologize to everyone for not taking that into account. I'll keep a closer eye on things going forward!
Monday, August 23, 2010
Geek My Ride - Part 2: The Tools
Or, I really am an narcissist. :)
So, to start out, let's talk about the hardware. As mentioned in my last post, it's Arduino. Also as mentioned last post, I'm sure there are much better platforms out there to start dabbling in microcontrollers, but Arduino's got a nice, large following and a large repository of projects that are also well documented. I'm looking to put things into production, not reinvent the wheel. If I accidentally learn something along the way, so much the better. Since I did have a number of projects I wanted to put together, I decided to eschew purchasing a pre-made board and followed some instructions I found on building your own (warning, link is to a PDF, I couldn't find a link on the site).
My thinking was that I'd put some extra money into putting together a dev board that could then be pulled off a bread board en masse and moved elsewhere. In the end, I think this will be a bit cheaper for me as I'll only need to purchase chips going forward. As I had most of the parts I needed, I just had to pick up some caps and the AtMega chips. The end result:
Yeah, it's a bit unimpressive especially when you consider the only thing it does at the moment is blink the LED on the left every second. But, it's a start. It's up and it's working. Not bad for a first try!
As for other tools, there's a couple that will come in handy over the long haul. The first, believe it or not, is Dropbox. I will warn you, that link is a referral link. If you click it and install Dropbox I get an extra 250M of free space. But, you ALSO get an extra 250M, so it's win-win! Dropbox is a great way to keep files in sync across multiple computers. As I sometimes like to work on my projects during my lunch hour at work, it's convenient to have access to the Arduino programming environment there, too. But, I also need any libraries I might've installed, not to mention my sketches. As the IDE amounts to a whopping 250M when unzipped, and self-contained within a directory, it's the perfect way to ensure my environment's the same at work and at home. No more "but it works on my machine..."
I've etched PCBs in the past, but the reality is it's a messy, dangerous thing to do at home. With a 2-year-old running around, I have no real interest in keeping those kinds of chemicals around, so I've decided that when I DO need a PCB etched, I'm going to have it done professionally. I've already found a couple of places that look like they'll be cheap enough to use. But, in order to create a PCB, I need a design and so I've settled on FreePCB to do them in. Another Open Source solution, it helps keeps those costs low! It doesn't do autorouting, but it can use a web-based autorouter for the task, and I'm fine with that.
That's it for the tools I'll be using for now. I'd like to give props to our local electronics store, Goldcrest. Only place in the city I cold find picofarad caps! Next week, I'll talk about the first project which is already about 90% done. I've got it wired and programmed, I just need the spiffy LCD I've ordered for it. What is it? It's a surprise, of course! But, I'll give you a hint: remember this is a car project, and I decided the first project should be one that helps me save enough money to pay for any remaining projects!
Thursday, August 19, 2010
Geek My Ride - Part 1: The Ride
I've recently moved into a new position that's more of a management-type role, and so don't have much action solving problems for which I can document solutions (although I was pleased to learn recently that one of my coworkers was having issues similar to the one documented in the article "Resolving difficulties with using certs" and in searching for a solution he came up with mine!) So, my mental energies being not so completely drained each day, I decided that I should probably give this whole "hobby" thing a try. It's been a very long time since I've had the time or energy to try getting involved with a hobby, so for me it's a very new thing!
Being an IT/science/parenting geek, I settled on some criteria I figured I could use in deciding where to put my efforts. First, it would have to be fun. Obviously. Secondly, I felt it should also be "productive" to some extent. If I was going to devote time to a hobby, it meant time would have to come away from my chores and spending time with my family. I felt that it should somehow contribute back to them in some way, even if it ended up being tangentially. Third, it needed to be relatively inexpensive. We don't have a lot of disposable income, so by definition I couldn't dispose of a lot of income on it. Fourth, it needed to be something that I could use to engage my daughter in eventually and get her interested in some kind of sciencey/techie things.
I finally decided that something that I'd wanted to do for a LOOONG time was dabble in electronics. How long? Well, when I was five years old, I took apart a radio that belonged to my mother. I carefully pulled each component off of the circuit board inside and meticulously laid each one out on a retaining wall in our back yard. I've always been fascinated by the field, and have a collection of electronics hobbyist magazines I've gathered over the years. And, depending on how much I did, it could be done relatively inexpensively.
I knew, also, that I wanted to get into playing around with microcontrollers. Electronics are fun, but electronics you can build and then program gives you two bangs for your buck! Having followed its development for a while, as well as seeing a significant number of projects out there to whet my appetite with, I knew I'd be going with the Arduino platform. It's relatively inexpensive, has a wealth of information available from the community and is easy to build on. Is it the best microcontroller platform? Probably not, but it would give me a number of quick and easy successes early on to help keep my interest.
But, what kinds of projects to start with? It's easy to say "I want to build projects using a microcontroller", it's another to actually decide on which ones to do. Fortunately, the decision was made for me. My old daily driver beater, a 1989 Buick LeSabre that was originally my wife's (I ended up using it as I have a long drive to the office and it got GREAT gas mileage), died. It was a good car, but in the last year it had really (and literally) started to fall apart around me. Since we couldn't get by on a single vehicle, we went into a mad press to find a replacement.
We found a couple of options, and the one we settled on was this spiffy silver 2001 Chevy Impala. It's a bit of an old man's car, but sporty enough to not be totally embarrassing to be seen in. It's roomy and comfortable to drive, and actually gets reasonable miles per gallon. This was important...if I really kept myself to a reasonable speed, the Buick typically got 30-32 MPG. Obviously any significant drop in mileage would end up making it a costly investment. But, I've been checking it at each fill, and have been averaging between 27-29 MPG (I do mostly highway driving), so no real complaints. Also, that's been with A/C which the Buick didn't have (another serious plus for this car!)
I've always been a car guy. In the past, it was all about muscle cars and performance, but I've come to appreciate the bells and whistles that come with more modern rides. Now being a father, the idea of extreme performance has become anathema to me (and, really, you're limited to at most 65 MPH anyway. What does all that performance buy you?) So, that settled it, I was going to use my new car for the base of my electronics projects. There's a few that I've had rolling around in my head for a few years, but I never had a car worth putting that kind of effort into. Since I spend over an hour a day in my car, it made sense to put the effort into making the car more comfortable and user-friendly.
With all of the above in mind, I've settled on a framework on which to design my projects around....When my wife and I were in Las Vegas to get married a couple of years back, we were fortunate in that the rental car place ran out of sedans of the type we'd registered for. We thus had to settle on getting around town in a fresh-off-the-truck, only 500 miles on it, brand new Infinity G35. Man, that was a nice car! At one point, while climbing out of it I noticed the Nissan emblem on the door jam. I realized that the body of the car was almost exactly the same shape as an Altima, and it finally made sense to me: a 2010 Infinity is nothing more than a 2015 Nissan!
The Infinity owners pay through the nose for the privilege of "beta testing" all of the new features that will eventually be old news and put in as standard on the "lower quality" cars. Big dummies. But, as long as the luxury features work, they get some really nice perks: touch screen navigation and vehicle control, high performance, low fuel consumption engines, quiet, comfortable rides, etc, etc...In thinking about some of the features I liked in that Infinity, I decided that what I was going to do was build a low-cost luxury car using the Impala as a basis.
So, that's what this series of articles will be about: the journey of my car from family sedan to home-brew luxury beast. And, since these modifications revolve around an Arduino-based control system, the next article will be about my first steps in using that platform...
Thursday, April 22, 2010
Maximizing storage in the cloud
So, that means I won't be talking as much about technical stuff, I have other ideas in mind. But, for now, I wanted to talk a little bit about some services that have been around for some time now that I'm just getting around to exploring: cloud storage. Like a lot of people these days, I've got a USB flash drive I carry everywhere. Actually, I've got two: a 4G one and a 1Gigger. Sometimes it's very useful to get files back and forth to the office, and it's a whole lot easier carrying a USB stick than taking my whole laptop home with me. The big problem, though, is making sure the files you need on there actually ARE on there. Recently, my company has implemented desktop drive encryption, with it being forced for removable drives. If I want to copy from my computer to the USB drive, it has to be encrypted (there's no such restriction for USB -> Computer transfers).
Recently, my friends and I have started up a PBeM game of Trail of Cthulhu. For a while, I had been storing the rule books, which are in digital format, in my e-mail, but it started to become cumbersome with the number of files I had to maintain, plus notes files, etc. It was looking like a flash drive was the way to go when I remembered about companies like Dropbox, iDriveSync and Box.net. For a reasonable monthly fee, these companies will give you fairly large amounts of storage space that you can use however you want. For free, the first two give you 2G and Box.net gives you one. 2G is a nice chunk of space, so I decided to sign up for Dropbox and see if I might get some use out of it.
That was last Friday. Since then I've used the hell out of these things! Firstly, the first two offer extensions you can install on your computer that will match an ordinary folder on your computer with the online storage. This means managing files is as easy as it already is in Explorer. Drag files into the special folder, they're automatically synced with your storage. If you've got the client installed on multiple machines, all of them are synced simultaneously. Now, if I need to get a file to the office, I just drop it into my Dropbox folder at home and it'll be on my office PC before I get there.
But, the real beauty of these services lies beyond their ability to assist you in moving files. They're a great way of getting large files to other people. I had a digital copy of a video a friend of mine wanted to see, but it was way too big to send via e-mail. No problem, I copied it into to my Dropbox folder. I right-clicked the file in Explorer and selected "Copy Public URL". This placed in my clipboard a URL I could send my friend who could then just click the link and download the file. No fuss, no muss, no setting things up. And, since the file was downloading from Dropbox' servers, it was fast! A whole lot faster than if I'd tried to setup an FTP site on my home computer or something.
You get all of that, plus you can access those files yourself at any time, from any computer, by just logging into the website. Keep a copy of an anti-virus program you like to have available for when you go to a friend's house, but forgot your USB drive? No problem. I really have gotten a lot of use out of these services in just the last week alone, and highly recommend them to anyone who works with files in multiple locations. A few tips, though:
- Dropbox has a referral program. If you click the link in the preceding sentence, you'll be able to sign up for the service using me as a referral. Doing so means you and I will each get an extra 250M of storage space. It's not much, but you can go up to a full 8G of free additional space if you get enough referrals. That's not too shabby!
- I'm not a fan of having personal stuff on my work computer. That's not to say I don't, just that I don't like it. At any time, my computer could get audited, and I don't think I'd get a lot of crap for having Trail of Cthulhu rulebooks on it, but why take that chance? What I did was installed Truecrypt. I then created a 2G volume and pointed Dropbox at that. Now, whatever is in my Dropbox is encrypted when on my work PC. This has the added benefit in that when mounted, the volume shows up as a drive. All I have to do is look at how much free space is available on that drive and I know instantly how much free space I have in Dropbox. Of course, I now have a couple of referrals, so I'll have to create a new volume to match the size.
- Within my Dropbox, I've got a folder called "Move Off". I have a script that runs once an hour on my machine at home that monitors that folder. If something shows up in it, it's moved off into another location. I use my Dropbox for non-private, but still personal data. If, for example, I want to get the pictures off my iPhone while in the office, I can do so. I just put them into Move Off and they're whisked away soon after.
These companies provide a great service to you and I and I highly recommend checking them out. I'm even considering paying for one of them, once I've decided who gives most consistently high level of availability! Oh, and did I mention that some have iPhone apps that allow you to view and manage your files on the road, too?
Friday, January 8, 2010
Resolving difficulties with using certs
Friday, January 1, 2010
My first iPhone Webapp
At work, I am a serious scripter. I try to use VBscripts for almost every repetitive task I do for the simple reason that I make mistakes, computers don't. If I have to edit the properties for 200+ Citrix-published applications (a task I've had to do numerous times), the chances of my breaking things is much greater than if I just get it scripted and tested once and let the script do the heavy lifting.
But, VBscripts just haven't been cutting the mustard for some of the more onerous tasks in recent months, and so I took advantage of the fact that Microsoft offers Express editions of Visual Studio 2008 as free downloads. (Recently, my company got everyone in my group MSDN subscriptions, so I was able to get VS2008 Pro to use!) I had been wanting to get more familiar with Visual Studio and app development in general as I had a couple of things I wanted to try doing. Figuring the best way to learn was to find a project I wanted to do and dive it, I thought about it for a while until I came up with...
For years my home has been controlled via a home automation system called HomeSeer. HomeSeer's a great product, put out by a company that stands firmly behind their products, with a great user community that's always ready to help. One of the pieces of HomeSeer I've played around with over the years is its scriptability. It has its own .Net-based webserver built in and will run fairly standard ASPX pages as well as VBscripts. By just adding some references into your project, you can also control it via other languages as well.
And then, of course, there's my ubiquitous iPhone. Last year I decided to give iPhone development a try and so got a cheap Mac, downloaded the SDK and gave it a shot...and realized after looking at the docs for about 10 minutes that Objective-C is not an easy transition for a VB guy to make. So, I put it on the sidelines for a while. Recently, though, I came across iUI. This is a framework put together by the founder of Facebook that allows developers to very easily create iPhone-based Webapps. Since it's agnostic to the underlying development framework, I had found my project: I would create my own iPhone interface to HomeSeer.
I see that others have done this, but I had some specific needs I wanted to accommodate. And, I wanted to learn. Creating this from scratch would give me a lot of experience with so many different areas, it was too good to pass up. And, so, I give you....
Looks pretty cool, right? It doesn't actually do anything yet, but it's got a lot of stuff going on behind it. First, it connects to HomeSeer and enumerates all of the devices and gets their status. Then, it generates this nifty page with a button that's named the opposite of the device's status. Eventually, the plan is that you'll be able to tap one of those buttons and turn lights off and on. But, since HomeSeer is very extensible and can be used to control almost anything, so too will this app be able to do a whole lot more.
Not too bad for an hour's worth of fiddling. In coming installments, I'll document what I did to get everything setup and in place to make the magic happen because a lot was either poorly documented or the documentation was spread over multiple locations.
Friday, December 18, 2009
Diagnosing side by side errors on x64 Windows 2008 R2
I recently migrated the machine on the right from Windows 2003 Server to Windows 2008 Server R2, 64-bit Edition. Since Synergy+ actually had a 64-bit build, I figured I'd give it a shot. My left machine already runs Windows 2008, 64-Bit Edition and Synergy+ works just fine. Unfortunately, it did not on my new build. For those who know, 2008 R2 is not just the latest release of 2008. It's essentially a whole new OS, akin to Windows 7. We have run into a couple of packages that simply won't work with the R2 release because of this, and I thought Synergy+ was one of them.
On launching the configurator, I'd get an error "The application has failed to start because its side-by-side configuration is incorrect". A quick Google of this error lead to some good information on what causes it, and how to fix it. The Wikipedia article on SxS gives a good overview of how Side by Side works. The issue that generates the error message I was looking to resolve then is due to the manifest for the Synergy + executable being wrong or pointing to the wrong location. So, now all I had to do was find out what it was pointing to and I should be able to resolve it.
The OS provides a tool called sxstrace.exe for diagnosing these kinds of issues. First, we run it in trace mode and have it capture SxS information:
sxstrace trace -logfile:trace.log
Then, launch the offending executable, in this case Synergs.exe. This produces a binary log file that we have to translate into a text file so we can read it.
sxstrace parse -logfile:trace.log -outfile:trace.txt
The highlighted line below shows what we're missing. It's the VC 9 runtime redistributable.
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = AMD64
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files (x86)\Synergy+\bin\launcher.exe
AssemblyDirectory = C:\Program Files (x86)\Synergy+\bin\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files (x86)\Synergy+\bin\launcher.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_64\Microsoft.VC90.CRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\Synergy+\bin\Microsoft.VC90.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\Synergy+\bin\Microsoft.VC90.CRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files (x86)\Synergy+\bin\Microsoft.VC90.CRT\Microsoft.VC90.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\Synergy+\bin\Microsoft.VC90.CRT\Microsoft.VC90.CRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.
At this point, all I had left to do was to simply head over to Microsoft's site and download the SP1 version of the 64-bit redistributable and Synergy+ launched right up. A quick solution to a simple problem.