When do you Start over?

About a month ago I posted that I had started on a Ruby on Rails project.  It was my first RoR project and I spent a couple weeks working on it, learning as I went.  One of the things I had deferred working on was User registration.  I had some done some reading and it looked like there were several viable Gems I could integrate fairly easily.

I have gotten into the habbit of taking my iPad to the gym in the morning and reading up on whatever project I am noodling on.  So I’ve done a lot of RoR reading while on the elliptical machine and came to the conclusion that AuthLogic would suit my rather simple needs.  So I kept working on the functionality I needed for the App, deferring User management for a later day.

I had to put my RoR project aside for 3-4 weeks while working on a Tcl based project for work but got back to it over the weekend.  I decided it was time to tackle the User login module.  Initially everything seemed to be ok, I could follow the examples and make things work but I kept running into little issues and I never got it to work reliably.  The lack of Rails 4 examples to use as a reference got me thinking (and concerned).  Maybe I should have picked Devise (the other Gem which seems pretty popular).

I created a simple RoR App solely to test Devise and it will very simple to setup and configure.  Great, let me fold it into the App I am working on.  Uh-oh.  Not so easy.  I am not sure if it was because Authlogic also defines a User model and there were some leftover pieces of it that were confusing Devise or it was something else in my App but after a couple hours of playing with it, I concluded what I was trying to do was a fool’s errand.

This got me thinking – was it time to start over?  Should I consider all of the work I’ve done to date a “learning experience”?  The more I thought about it the more I knew starting again was the right answer.  But I had so much other functionality already working I hated to throw it away.  Decisions, decisions.

In the end I decided to start over and being with the Devise user module.   I decided to make use of the Rails-Devise example application as a starting point as it will walk through a configuration processs where by answering questions it will generate the basis for a Rails App.  It is pretty slick.  I ran it a couple times to understand the impact of some of the choices but settled on a final configuration which has become my starting point.

I was very quickly able to add some of the functionality I had worked out previously so as painful as it was, I am pretty sure that starting over was the right answer in this situation.  Granted my problem was much smaller in scope than many projects and more importantly, it hadn’t been deployed yet so other than a release delay, my decision has not impacted the end user at all.  That isn’t always the case.

Buying a SIM Card in Germany was harder than it SHould Be

A while ago I gave up my AT&T unlimited international data plan (you did what?) to move my family to a Mobile Share plan.  We have 8 phones on a 10GB Mobile Share plan and have only exceeded our limit once so objectively it was the right decision for us.  Having a Verizon MiFi from work certainly helps although it does mean that I need to actually think when I travel internationally.

I am in Munich this week for work and even though work will pay for the international add-on I have to turn on now when I travel out of the US, I decided I would buy a prepaid SIM card for data and put it in an unlocked Moto G which I have (having an unlocked phone comes in handy from time to time) and see if it would be a viable alternative to the $50 I paid AT&T for 500M of international data.

When I went to Poland a couple months ago I connected via Heathrow and picking up a SIM card was trivial.  You put your credit card in a vending machine, picked the SIM plan you wanted and and it was dropped out like a candy bar.  Simple.  Two minute transaction, if that.

I expected the same in Germany if not even easier, because if there is one thing Germany is good at, it is automating processes.  My experience was pretty much the opposite.  Not a SIM card vending machine in site at the Munich airport.  No big deal, there are several stores that appear to be selling them so I stopped in one.  The person in front of me wanted two SIM cards for their iPhones.  I waited at least 10 minutes before I gave up to go meet some co-workers and the cashier hadn’t   even gotten one working.  Odd.

I ventured out from my hotel having seen a number of stores in the general vicinity – Vodafone, O2, T-Mobile, and several independent stores.  I thought I was looking for something relatively simple.  I was looking for 1GB of data for about 20 Euros, less would be better.  It seemed that every store I went into had a different story.  From two different T-Mobile stores I got different answers.  At one I was told 10 Euros for 500MB but I couldn’t add to it if I went over.  At another store I was told that I could get 200MB per day for 10Euros up to 1GB during a week and  it would cut off after 200MB until the next day.  Odd.

Other vendors had variations of similar things.  I settled on an O2 card of 1GB which was good for a week.  Great, sound just like what I am looking for.  I’ll take it. Give  the clerk my Visa card – uh-oh, only cash for pre-paid SIM cards.  WTF?  I usually have some Euros with me but not an hour earlier I had dropped about 60 Euros for lunch for myself and three co-workers because the restaurant didn’t take credit cards.  That would have been helpful to know before we ate!

So out I go in quest of Euros from an ATM.  While I was out getting Euros I realized the cashier at the cell phone shop still had my passport!  Major panic.  If there is one thing that I worry about traveling it is losing my passport.  I have copies of it but I really don’t want to have to go through that experience.  Fortunately the cashier realized it as soon as I left the shop and put it in a safe place.  Yikes!  Back to find Euros.  For whatever reason the only credit card I can get Euros with is my PayPal debit card. 

So now I have  Euros to pay for the SIM card and this whole experiment is taking way longer than it should but with this much time invested, I press on.  Besides, I need something to keep me occupied until I meet up with my co-workers later this evening.  I need to stay away from the hotel room where it would be too easy to take a nap and be out of sync time wise all week.

As the cashier, a young guy – maybe 20 years old, is completing my transaction three young women come into the shop asking for unlimited Internet SIM cards in English.  After conversing with them in English for a bit he asks if they are Russian and switches to speaking Russian.  At that point his attention is on them and he fails to give me a critical piece of information with my SIM card packet.  The registration number.

I leave the store ready to try my experiment.  The instructions are in German, which I don’t speak but how hard can it be?  It is a SIM card and it has been paid for.  Put it in the phone and it should work.  Right?

Nope.  I have the SIM installed and the phone asks for a SIM activation pin code which is on the package and I enter.  So far so good.  Can I browse the web?  Nope.  An O2 web site comes up, in German of course, which I am clueless as what to do with.  It wants some sort of registration number.  Great.  After futzing around with it for 10 minutes I head back to the O2 store, which fortunately is next door to the hotel, I go back for the third time.

The woman helping me this time asks if I registered it?  No, how would I know what to do or how?  She pulls a scratch card out of the package which apparently my original clerk should have alerted me to and probably would have had he not been distracted by the Russian girls.  10 minutes later I am online and headed back to my hotel.  Oh yeah, one other little caveat.  Prepaid plans only support 3G.  No LTE and no HSUPA.  Bummer.

So in the end was it worth it?  I don’t know.  It was a good learning experience and it kept me busy for a couple hours.  I know a lot more should I or someone in my family, ever need to do this again.  I’ll play with it some more over the course of the week but in summary, it is waaaaaaay harder than it should be and quite a bit harder than in the UK.

Time to learn Ruby on Rails?

Last Friday my manager approached me with a problem.  It is interesting problem, the sort of out of left field problems he likes to throw at me from time to time.  It is one of those problems that there isn’t a good solution for without developing something completely proprietary as it would have zero value to anyone else but the members of our team.

So what is the problem?  We have a bunch of text files that have diagnostic information about one of our products.  There is no way to do any analysis on this data because they are just ASCII text files.  Like lots of companies, we do lots of Pivot Tables and Charts in Excel to analyze data but in this case, I don’t think it is the right answer.  At least not initially.  We want to collect these text reports over time and load them all into a single database so the collective data can be analyzed.  We’re looking for trends in reliability and things like that.  Once all of the data is compiled into a database, we’ll likely extract slices of it for analysis using Excel but I don’t want to build up an “Excel database” – wrong solution to this problem.

I’ve been using WordPress, PHP, and MySQL for years so it is my “go to” solution for problems like this one.  I don’t see any reason to involve WordPress as it is really just a data parsing and database application that needs a minimal UI to upload the data and browse it.  I’ve done things like this in PHP previously but I am thinking this might be a good opportunity to learn something new.

learning_railsI had picked up Learning Rails a couple years ago when I considered Rails, for similar reasons, for another project which never went anywhere.  I dusted off mycopy of Learning Rails and for the last few days I’ve been reading through it while I was at the gym.

So far from what I’ve read it looks like a viable solution to quickly put together a solution which (a) needs a database and (b) will be very low usage.  I think the biggest challenge I’ll face putting something together will be parsing the ASCII file in Ruby (which I’ve never used) but I am sure I will be able to figure it out.  The format of the file is fairly regular with sections of data but each section is slightly different.  Unfortunately it isn’t something simple to parse like a CSV file.

This morning I created a new Ubuntu (also a first for me) Virtual Machine and used this Guide from GoRails to install and configure RoR.  In the course of two hours I have built a new VM, installed Ubuntu, and installed RoR.  I am ready to start playing around and see what I can do.

Depending on how this goes, I’ve got a couple other projects in mind that RoR might be a better solution for than building a WordPress plugin.  We’ll see …

Playing with a Chromebook

For the past few days I have been playing with a Samsung Chromebook,  We got it at work to see how useful it would be as a second device or shared device.  I have been a little skeptical on how useful it would be as I can’t imagine not having my PC.  In reality I couldn’t use a Chromebook exclusively, I need tools like Office, Photoshop, Illustrator, VMware, and others for work.

However, I do a lot of volunteer projects (swim team, basketball, soccer, etc.) where I think something like a ChromeBook could be useful and keeping all of the information “in the cloud” would be really useful for transitioning ownership from one person to another.

For the past couple of months I have been using Google Docs exclusively for the church basketball team I am coaching.  I did it sort of as an experiment – can I do everything I need to do using Google Docs?  Not using Excel is a big step for me – we use Excel at work for a million things and I am pretty proficient with it.  It is my go-to tool for many things including, for the past couple years, managing my basketball roster.  Over the course of two seasons I created a spreadsheet which allows me to set my line up.  I can quickly change which players play when and it keeps track of playing time requirements so I make sure all the players meet the playing time requirements.

This season I moved my spreadsheet to Google Docs.  I wasn’t sure all of the formulas would work but they did as did the data validation I had set up to let me select players from a list.  The data validation from a list works a bit differently than Excel does but it is close enough and it is doing what I need it do.

So for my evaluation of the Chromebook, I am trying to do all of my basketball work with it. So far it has been a non-issue.  Now I haven’t add to do anything more complicated then sending email, updating spreadsheets and creating simple documents.

I thought the Chromebook would be pretty limited in what it can do but it isn’t too bad.  I actually like the Samsung machine quite a bit.  It is light and responsive.  I really like the keyboard, it is actually quite a bit better than the keyboard on my Sony Vaio Z1,

While I have had several people login into using their GMail account (no issues there), it doesn’t seem to switch users very well.  When switching users it seems as though it logs the current user out instead of keeping that user’s state in memory.

I’ll continue to play with it over the next month or so.  I can definitely see a use for it in the education market.  If a school uses Google Docs then it is a no brainer and I’d give each of my kids one.  As it is, my kids seem to like it quite a bit.  They’ll pick it up and login with their email address and use it to browse the web.  It will also come in pretty handy on a family vacation as it will allow everyone to keep up with their email pretty easily.

Less clear is how useful it will be at work.  We have a corporate Google Docs account but very few people use it.  I’ll probably give it a try in the next day or two.  If you have Google Apps for your own domain then a Chromebook is a pretty good solution.  It is too bad Google has eliminated the ability to get Google Apps for free.

That 70's Weekend at the Baltimore Inner Harbor

This past weekend we went to Baltimore for a weekend with my extended family.  My Dad had sent my sisters and I a request to host some sort of birthday celebration for he and my mom since they were both turning 70.  As I am sure many families can attest, coordinating the logistics between five families (total of 18 kids and adults) who live in four different cities (Raleigh, North Virginia (x2), Milwaukee, and San Diego) is a bit of a challenge.

Where to go?  When?  Fly?  Drive?  We thought about the beach, the mountains, skiing, a C&O Canal trip, and many other ideas.  We quickly realized that between school for the kids (some on traditional schedule, some on year round), work for the adults, other obligations, there just weren’t many weekends to choose from so we ended up choosing the period between Christmas and New Years.  With that period falling on a weekend this year, it worked out well.  All the kids were out of school and work is for the most part, pretty quiet.

Once we settled on a weekend, we still needed to decide where to go.  We eliminated a lot of choices by picking a winter time slot.  We had thought a trip to Great Wolf Lodge would be fun and it would be but it is pretty pricey and if you aren’t into water parks, there isn’t a lot else to do unless you leave the resort.  Leaving the resort doesn’t make a lot of sense since that is what you pay for so we ruled that out.  Skiing?  Could be pricey and would divide up the family between skiers – good and fair, and non-skiers which defeated the purpose of getting together.  So we ruled that out too.  My parents live in the DC area and there are ton of things to do there but over the years we have done most of them and we wanted to do something else.  Baltimore is close and the Inner Harbor has lots to do so after checking out a few options, we settled on Baltimore.

We ended up making a game out of the weekend and divided the family up into five teams.  We had a series of contests or Clues as we called them, with a winner for each event.  This made the weekend a lot of fun and mixed the families up into groups they normally wouldn’t be in.  Having a series of activities on the agenda also kept us from looking at each other and trying to decide what to do next.

We had activities which could be done at the hotel and some which were done at various attractions,  We had a scavenger hunt at the National Aquarium and another at the B&O Railroad Museum.  We had another around the Inner Harbor itself which involved going all over the place to track down information.  We had a Family Feud inspired trivia contest and a “snack association” game where some sort of snack food was associated with each family member and teams had to figure out who went with which snack.  My sister from Milwaukee lives near the Jelly Belly factory and brought 18 different types of jellybeans to be identified by color and taste.  After you have a couple, they all start to taste the same, except of course, the jalapeno ones which taste terrible!

We stayed at the Residence Inn on Light Street which is about 5 blocks from the Inner Harbor.  I love Residence Inns – they work really well for my family of six.  Breakfast is nice, the extra room is really nice to have, and having a refrigerator to keep food and drinks help us from having to eat out for every meal.  The Light Street Residence Inn is one of the nicer ones I have stayed at – I highly recommend it.  I have added it to my list of list of Hotels that Don’t Suck.

All in all, we had a great weekend, my parents were thrilled and everything came off without a hitch.  About the only thing that was bad was the drive home.  DC traffic is bad.  Really bad.  I simply cannot fathom commuting up and down the I-95 corridor every day like some people do.  I would be insane.  They really need to figure out how to bring the Metro down into Prince William county.  Probably never happen but it would help a lot.

Fog on the lake this morning

We had a very cool evening (about 35 degrees) last night so when I drove to work this morning, the fog over Lake MacGregorIMG_0228 was pretty thick.  I stopped and took this picture.  It was taken with my daughter’s Canon Powershot A530 which is an older camera 5MP that she isn’t using any more.  I thought it was broken but went ahead and put some batteries in it and it works fine so I have kept in my car for about a week now.  It isn’t anything special but it is handy to have something on hand to take pictures like this.

Finished Rock Band Guitar Solo Tour on Easy!

Rock BandI have been playing Rock Band here an there for a couple of months since I split the purchase of it with my son.  We have an Xbox 360 in our house but until we got Rock Band, I didn’t play it much other than some of the Xbox Live Arcade games (Pinball FX being my current favorite).

I don’t have the time or the interest to invest in many of these big video games (e.g. Halo) so the XBLA games which are short and don’t have a long involved story to follow have been more to my liking.  Rock Band has been different though.  My son had purchased Guitar Hero II and I played it a couple of times but even that didn’t do much for me but one day when my son and I were in Best Buy, we played Rock Band together and  had a blast.  So when he asked a few weeks later if he could buy it (one of his friends had received it for Christmas), I offered to split it with him instead of trading in a whole bunch of games for which he would get nominal credit.

Since we got it, he and I have played together here and there, usually not more than 2-3 songs at a time so we are progressing through the World Tour slowly.  After starting on Easy and playing Bass, I now usually play on Medium but I am still the Bass player when I play with him.  I fully expected him to be the drummer since he plays the drums at school but he prefers to play the guitar in Rock Band.

I was interested in playing all of the songs so decided to try go back and work through them on the Solo Tour on Guitar on the Easy level.  Since I don’t have much time to do this, it has taken a while.  This weekend my son was away at a Church Youth Group retreat so the Xbox was available so I finished the last 5-6 songs of the 43available on the Easy level.

Now on to Medium where with the addition of the 4th button and the faster speed of the notes presented, it will take me a while to complete this.  Although I’d like to play at Hard or Expert, I am somewhat realistic in my expectations – I can’t move my old fingers that fast nor do I have the time to invest in getting that good.  As longs as I can hold my own on Medium I am content.  I suspect I’ll do the Bass tour on Medium or the Drums on Easy (I find the drums really hard) before I do Guitar on Hard.