Sunday, December 28, 2008

Creating Fake Data - Adding Multiple User Accounts - Rails


A big testing pain in the ass is adding multiple user accounts and the accompanying profile data (etc.) which provides a more realistic user experience and a wider variation in data to allow for potential issues to crop up more quickly. Thus - hopefully better code.

Well, as with most things Rails, someone (or actually more than one person) has come up with a way to create a bunch of data, populate your databases, and give you a break from manually creating hundreds of accounts. Their projects are below. These tools essentially provide random name, address, number, and other generators (colors, passwords, currency) which you can stack together to create bunches of users.

Forgery
Users dictionaries to generate data. You can override theirs with your own.
http://github.com/sevenwire/forgery/tree/master

Faker
A port of Perl‘s Data::Faker library
http://github.com/yyyc514/faker/tree/master

Populator
Populates an Active Record database with a mass insert, very quickly. This library is quite customizable in terms of the data you can have it create.
http://github.com/ryanb/populator/tree/master

Random-Data
Names, numbers, text, grammar, locations, booleans, arrays. Has a bit more to offer than Forgery.
http://random-data.rubyforge.org/

Friday, December 26, 2008

Google It! How To Find What You Want...


I'm stunned, day in and day out, by some of the questions people ask me. It's not that they're asking me the questions (because I'm more than happy to be helpful), it's that they're not finding the answers out for themselves. It would be a lot quicker if they did. As you know, I teach GMAT classes. And people will ask me things like "is 0 an integer?". Totally fair question. One that I would have asked. But they'll wait the entire week between classes to ask. Or people will ask me things like "how do you get from point A to point B?". Shit, I don't know. But Google Maps knows. Or what's this program that keeps running on my machine called xxxx?". Yea I am a software engineer. But I don't know every program that's ever been written. Google does. Or "what's the weather like in Thailand in November?". While that last question is understandable because I used to live there, it's just another case in point. I don't remember. And with weather changing so much, just look it up.

Why don't people use Google for this stuff? I mean, most of the questions people ask me, I just turn around and Google anyway. I wonder why that's not just an absurdly obvious solution? You can ask Google things... you can type in whatever the hell you want, and something will come back. You can ask where to find the cheapest gas in San Francisco. In fact, I can't recall ever typing anything in, that was in English, that didn't have tons of pages returned. One of those pages is bound to have your answer. And likely it will be near the top.

Don't be afraid to search. Look at that cat up there. He kicked a dog's ass, just by knowing how to use Google!

Wednesday, December 24, 2008

Uh-oh! Can Rails (RoR) Handle the Load?


People have always been talking about Rails and its ability to handle scaling (here, here, and here). I was a skeptic of these haters. Because I had always made the assumption that good design would lead to good performance. I might be putting my foot in my mouth shortly.

We ran some preliminary stress tests on our site this past week. And the results were, well, unimpressive to say the least. In fairness, we're not caching everything at this point and haven't done everything we can to tweak performance, but we should have had a better go of it.

The main problem seems to be the sheer volume of database accesses. Rails just loves to talk to the database. In fact, almost everything is in the database, which is the major problem. MySQL has turned out to be our biggest bottleneck, which I guess you can blame on Rails, right?

A few things to note: We're running our DB and our application on the same box for the time being. We're using a server in the cloud, which is not really a dedicated server. So those play into the cards.

We're currently implementing memcache, starling, and workling as ways to help us boost our performance. But implementing caching requires a reworking of a lot of our code. So that's not cool.

All in all, I love developing on Rails. Is it enterprise ready? Jury will remain out on that one - for now. But I tend to think it is if you're a good architect. Twitter seems to have solved their problems. Which I initially thought was probably based on their design rather than RoR. So, did Twitter drop RoR? Nobody seems to know. Again, I remain in the camp that thinks scaling Rails is doable. I'm just not a pro at it yet. And we're going to have some growing pains, as we would with any technology.

Monday, December 22, 2008

That Was Weird.... What To Do When Your Mom or Dad Facebook Friend's You...


I'm sure my mom is going to love reading about this, but it wasn't without thought that I accepted her friend request on FB last week. I mean, it's sorta strange, isn't it? This is a window into my world... a world that my mom doesn't necessarily play around in. Sure, she's the greatest mom around and I share plenty with her, but I'm not sure she's interested in seeing me drunk at a party or the pictures that my friend's tag of me that aren't even me. Or how about my feeds and my friend's feeds (some are less judicious about what they post). Or my relationship status or what I was doing last night. Or explaining why the hell some girl threw a sheep at me? I haven't graduated to the point where I use Facebook for anything other than friends and acquaintances. I used LinkedIn or Doostang for more professional services.

I realized that I couldn't say "no" to my mom and wasn't really sure I'd want to say "no" anyway. I definitely didn't want to deal with the repercussions. I mean, how do you explain that to your mom? "Mom, I had to reject your friend request, because, well, we're not really friends. We're family. And um, well, yea, you're a friend, but I mean, you know... No! You're not old ma. I'm friends with people your age!" You know how it goes.

So I accepted her friend request, wondering what was coming next. Sure, there were a flurry of emails. "Who is that?" "There's a picture that say's it's you and it's not you". But she caught on. And maybe I'm a little...just a little more cautious about what I put on. I was never one for exposing too much about myself on that thing anyway.

Now my dad has signed up. And surely I had to accept that request too. And now he's trying to set me up with a girl who lives in London. Thanks dad.

If I were younger though, I surely wouldn't have accepted these. But, I guess it's alright these days.

What's the Keiretsu Forum All About Anyway?


On Friday I went to the monthly Kieretsu Forum gathering in Palo Alto. So what is Keiretsu? It's the world's largest angel investor forum, with over 750 accredited members in 17 chapters on 3 continents. In other words, it's a group of high worth, well connected people, looking to invest in startups. What's it take to become a member?

A Keiretsu Forum member is:

* An active accredited private equity investor (definition here),
* A trusted, honest and respected member of our business community,
* A contributor of time, wisdom and experience to our funded companies and soon
to be funded companies,
* Someone who enjoys building relationships with other members and companies we
fund.

The Forum was founded by Randy Williams, a Cal guy, back in 2000, as a way to provide structure to private equity investing.

The Forum is pretty straightforward and slightly different than I expected. You arrive, sign-in, and mingle for about half an hour before the meeting starts. There are three tables set up in horseshoe-like fashion, with a screen in front of the open end of the setup. The tables are occupied by the Forum members. Behind the table directly across from the screen are rows of seats, about 8 rows of 10 seats each, where the rest of us sat.

Randy begins with an introduction to some of the members - or at least the members who were in from out of town. There were several people from Ireland, Scotland, Russia, Austria, Germany, and China, who were all prompted for a greeting in their native language. The intro's were very mellow - and you could tell this wasn't some uptight group of people.

Each group had ten minutes to present at which point there was a 10 minute Q&A, which we were allowed to participate in. There were five companies that presented. And it was during the Q&A that you really understood the Forum. Not only did they ask the right questions - not only about revenue forecasts and company growth projections, but also about network security and the broader technology implementation. While informal, it certainly highlighted their understanding of investments.

The biggest gain for participating companies, besides the obvious investment potential, was the contacts that came out of the meeting. At the end of the pitch/Q&A, Randy asked members if they had any contacts who could help these companies. Undoubtedly, someone in the room knew someone who could help and offered the introduction. It was quite a family.

If you'd like to be considered for participation as a presenter, you can do so here.

Thursday, December 18, 2008

iPhone - "We were not able to validate your number." with free WiFi (Starbucks, McDonald's, etc)


As any iPhone user knows, we've been allowed to access free wi-fi hotspots wherever there's an AT&T hotspot (Starbucks, McDonald's, etc). That is, if your phone is hooked up properly. Well, my phone never worked and I've worked with several AT&T customer supports reps about this. This was the error message I kept receiving:

"We were not able to validate your number."

When I first called, they sent me over to Apple support, even though it was obvious that it had nothing to do with Apple - it was an AT&T account validation issue. The usual circus ensued where I was sent back and forth between departments. They opened a case and told me to check back in a month.

Fast forward a month (that was sometime last week). I called back to check in on what they'd found out. While it was nothing, I had the absolute best experience I've ever had with a customer support rep (actually, to be fair, she was tech support). She was obviously very concerned about the issue and wanted to help me find a solution. After we talked she explained that she can't stand leaving issues open - man I wish all tech support was like this.

She did her research and found out what the problem was. First, my phone wasn't in their database as an iPhone. It was an unknown phone. So she changed that. Then using my IMEI number (Settings -> General -> About), she found out that my iPhone wasn't properly registered in the different systems (I'm not sure what these systems are, but I'm assuming billing, activation, etc). So what'd she do? She changed my name in the database. This caused all of the systems to update, pushing the correct IMEI number to all of the systems.

I had to wait about 24hrs, but here I am...online at a Starbucks with my iPhone. Thanks Shannon!

UPDATE: "If you’re posting suggestions on your blog, just tell folks to call AT&T customer service at 800-331-0500, ask for Technical Support, and have the tech support rep to make sure the system that contains the Media Net registration information shows the correct device type. The support rep will then know where to look."

Credit Card Rate Hikes Suck (rate-jacking)! Citibanks and Chase Suck! How Is This Legal?


Twice in the last two weeks I've received notices from my credit card companies. They're hiking my rates even though I have stellar credit. I do have a balance, thanks to this startup, but that would make me think that they're making money off me anyway - so why do they need more? I can opt out, in the fine print, but then they cancel my account. What kind of opt-out clause is that? And what the hell can I do about it?

Apparently it's not uncommon these days, especially from Citibank, one of my credit card provider's. But that doesn't mean it's fair or justifiable. I think it's an abomination in this current economic climate for large financial institutions to prey on people in debt. It's disgusting. This all goes back to my common belief that people need to start taking responsibility for their own actions. If Citi or Chase (the other provider who just notified me) has mismanaged their money, well, that's their damn fault. To pass the buck along to the consumers who can't afford it is the easy option - but one that may not work.

There has been quite a stir in the blogosphere as of late which will hopefully get the stalled bills in the Senate that deal with this issue, kick-started (from CNN).

Check your mail. It probably happened to you.

This reminds me of another disgusting practice. Charging $3 to use another bank's ATM machine. What the hell is that? You can use one of those janky ATM machines in a bar for less money. Screw the customer...seems to be the montage of some select financial institutions.