The Regular Expression Behind Currency Formatting

I came across an interesting requirement today to format a floating number as currency. In the US and many other countries, currency greater than or equal to 1000 units ($1,000.00) is typically broken up into triads via a comma delimiter. My initial reaction was to use a recursive function, but I glanced at the Rails’ ActiveSupport gem to see how their number_with_delimiter method performed this same task. I was surprised to learn that this was handled via a clever regular expression.

View at https://coderwall.com/p/uccfpq

The California of Texas

Austin is a counter-culture in the heart of Texas. I’m not sure what I expected, but vegan friendly restaurants, health food stores, hundreds of miles of bike paths, a city wide ban on plastic bags, and a highly affluent populous was not what I was expecting. So beings my journey.

The Sights

We drove thirteen hours overnight to accomodate our newest passenger, Morrigan and her sleep schedule. As bad as driving all night was, at least we didn’t end up with a screaming toddler in the backseat. We visited some of Kristin’s kin in Houston, which served as our base for the weekend before pushing further West to Austin.

We negotiated a great monthly rate on a condo we found on Airbnb off South Lamar on the South side of the city. (Affiliate link) I’ve been really impressed from the moment we pulled into our new home away from home. The unit is small, but renovated, and well furnished. What we lost in space, we more than made up for in location. Right up the street is a lifetime supply of changing restaurants, and only a 10 minute drive from Zilker park.

Our first weekend we visited a local farmer’s market and bought some Texas grown produce. I never thought I would do what we did next – attend a vegan festival. Sure enough. In the land of BBQ, thousands of health nuts live in this city. Despite being vegan the food samples they had were all delicious. If I hadn’t known, I wouldn’t have tasted any difference. Vegans have masterfully replicated an omnivore’s menu.

The next week brought with it a trip to Fredericksburg, another hour West of Austin (but still not halfway through the state!). It is a German town, and had plenty of beers, wursts, and gut busting treats. The main strip is really quite a marvel, as it goes for over a mile and encompases lots of original architecture. Sunday we visited the Austin Zoo which put a spin on the traditional approach, and opted for a non-profit animal rescue shelter and animal sanctuary. Morrigan loved spotting all the critters, but the Texas heat won out, even in April. I was never so glad to pay $2 for a bottle of Coke.

This week I rented a bike and road around the Lady Bird Johnson trail which follows the river that bisects the city into North and South. It is wonderfully engineered, running past coffeeshops, restaurants, playgrounds, fishing areas, boat ramps, and dog parks. I wish Atlanta had something like this to offer. Maybe when the greenbelt is completed? (And the bikeways protected with police?!)

We have plans to go to San Antonio next weekend to visit Fiesta de los Niños, and plan on visiting my cousins who are lucky enough to live here. Following that will be our last week before the long migration home. We will be spending the last weekend back in Houston where we will visit Kristin’s folks for her mom’s birthday celebration.

Remote Working

Working remotely during this time has been interesting. I’ve learned an important lesson: don’t go anywhere during the launch date for your product! Too much was up in the air to leave beforehand to stay clear, and I was concerned that afterwards we would be scrambling. Turns out ramping up to the last minute before launch can be just as stressful.

For those of you following along who already, or wish to do remote work, ensure that you rent a place that you can have a quiet place to work. I find that mornings are my most productive time, and I try and guard this time for the important tasks. But with a smaller rental unit, and a one year old, I found thata nice pair of headphones is essential. I’ve taken advantage of ROWE several times during the week when we visited the capitol, and visiting parks, and going out for walks with the stroller. It pulls me out of my comfort zone to not be sitting at my desk at 9am, but then I realized the world doesn’t end. I simply make up the time later. Exercising this perk has really boosted my confidence in working for my company. They genuinely care about results and not office hours.

Also, have a backup plan if (when!) the Internet goes out at your rental unit. The maintenance people decided to test the waterproof claim of the rental’s outdoor wireless AP with a pressure washer. I’ll let you guess as to the winner, but I spent the rest of the day at a coffee shop. Also – scope out your coffee shops. I would love to see a website that lists the rating of different places based on workability. Some places don’t give you the vibe (despite having wireless) that they want you hanging around with that laptop of yours. Other places look promising, but offer no connectivity. Grab a cup of coffee or tea beforehand and scope things out.

A few notes on extended vacations: Don’t binge vacation! You are there for a while, so relax. Buy some groceries; every meal doesn’t have to be an experience. We have been aiming for eating out once every few days. It helps with the finances as well.

Don’t wait until the weekends to go exploring – especially when you have ROWE. The weekdays are the best times because the crowds are small, and the traffic is light. Check out your local attractions. One of the most relaxing things has been for me to join Kristin and Morrigan in the mornings for a walk around the neighborhood.

I wasn’t at home with my millions of distractions, so I wasn’t prepared for a “boredom adjustment”. Once I realized its not a pure vacation, and that I had to work, I struggled to find ways to wind down in the evenings. I ended up finding a used bookstore and stocking up on reading materials. I’ve enjoyed reading again instead of falling asleep in front of the TV, or playing video games until the early hours.

Being in a place for a month is certainly better than the binge vacation, but it is just a taste of what living somewhere would be like. Its just enough time in my opinion to really begin to absorb the culture. I find it thrilling to wonder what each day will bring, as everything is new. Maybe you spot a new restaurant (or food truck if you are in Austin), or drive past a park you want to checkout, or see a bike rental shop. I’m really making up my itinerary as I go. I’m glad I strived to find a job that affords me the opportunity to do this, and I wish that everyone who wants the same can achieve their goals. I can tell you its totally worth it!

Welcome to 2010

I broke down. I compromised my moral integrity. I did what I laughed at others for doing. I bought a tablet, and I couldn’t be happier.

What changed? Did my opinion change? Not drastically. I still don’t see them as the future of computing. They are a consumption device, and it would be difficult to do much more with them than that. But that is what I wanted.

Pricing has also changed drastically. When the iPad first came out, it was a 10″ behemoth, and it costed around $500, putting it well outside of my interests. (A high end laptop could be found starting at ~$800.) However, within the last year, some solid contenders have entered the 7″ ~$200 arena. The nVidia Tegra 3 chipset, quad core processing, and the latest Android experience on sale in the Nexus 7 for $155 shipped was too good for me to pass.

I have long said that I could’t justify a tablet when I have a desktop, two laptops, and a smartphone all within reach. My circumstances changed however during our latest vacation, and I found myself draining the battery on my smartphone daily trying to stay connected. I have discovered a few good areas that a tablet excels over other devices

  • Entertaining when space is limited (car, airplane, bed, etc)
  • Reading eBooks
  • Reading technical posts with code examples
  • Games developed for the touchscreen
  • Quick reference during certain table-top activities…

I find my discovery process similar to getting my first smartphone. I remember a few days after I had my smartphone I had the realization that I could get from my location to any other location without ever missing a turn again. I drove to a retail store to make a purchase and realized that I could mitigate buyer’s remorse by price checking while standing in the store! Information is power, and I had the Internet in my pocket. I could check reviews, prices, availability, stock nearby – all without carefully planning my trip beforehand at home.

While that smartphone does some things really well, it is a small form factor. For anyone that has ever upgraded their monitor to a larger size, or their computer to a faster model, you will know the feeling when you migrate from a smartphone to a tablet.

Despite my fears, I don’t think it will quickly become a device that collects dust. I’ve heavily used my smartphone for close to four years now, and there is no sign that this will change in the near future. The tablet is the extension of the smartphone.

I’m not saying to go blindly buy one – you should still have good reasons, and stick to a budget. But if you find yourself running your battery down on your smartphone from overuse, let me recommend a tablet to you.

And welcome to the year 2010!

The Plight of the Used Book Store

I never really considered the situation that used book stores find themselves in this day and age. I just got back from a real gem just down the street from our rental. They aren’t a chain, and are probably family owned and operated. They are getting by, but probably not making tons of cash. From the minute I stepped inside and saw what a neat feel the store had, I wanted to buy something (anything) as my way of saying thanks, and to allow them to keep on doing what they do. The store was almost empty, and I hoped it wasn’t their peak hours.

Walking around, the thought that kept coming to the surface of my mind is that the eBook retailers must be killing them. What can they do to compete against Amazon, Barnes and Noble, Google, Apple, and others? They can’t match their inventory selection, can’t operate a retail location for cheaper overhead costs, or negotiate deals with publishing houses for volume discounts. They can compete on price of individual books however – AND THEY DO! The books I was finding were 50-75% off the retail prices of online book stores. It struck me as odd that people would rather pay twice as much for an electronic copy of the same material, when just down the street they can get a copy made from dead trees for a fraction of the price.

It just isn’t fair. Have we become so lazy that its easier to click the checkout button than it is to go down the street? I’m guilty of it myself. After getting a Barnes and Noble Nook for Christmas a few years back, I’ve been disappointed at how the savings of eBooks over printing paperback books has trickled down to the consumer. Hint: It hasn’t.

I happily bought four books and walked out feeling like I had done the right thing. I wish that shop had an answer, but I don’t see how they can come back from the current situation. The one angle they have to compete mitigated by human laziness. I have a feeling Morrigan won’t be seeing too many book stores when she is my age…