HAML vs ERB: Keep your emotions out of it

There are tradeoffs in everything we do in life. Everything is relative to your situation. There are no absolutes.

Let's revisit a conversation our team recently had in HipChat. It was the ultimate debate of pros vs cons, and at one point it turned a little bit emotional.

HAML vs ERB

There are already a bunch of debates documented on the web. Just a simple Google search gives you enough to make your head spin: HAML vs ERB vs SLIM in terms of render speed, Haml vs erb, Fashion Runway: ERb vs. Haml, and so on. You get the point.

But, what about the arguments we were making?

We shouldn't be afraid of it.

I sensed a little fear from our team, so I had to say that. Our team isn't exclusively developers. Most of us know our way around HTML & CSS, and since we use ERB most of the time, everyone at least knows what it looks like. But, like anything else, we shouldn't avoid something because we're afraid of it. It's usually good to step out of your comfort zone.

We have an existing code base.

We have an application where we used ERB exclusively. Why should we try to make the switch to HAML? To me, it's a waste of time and a poor decision that wouldn't provide many benefits. While our code would suddenly be cleaner and a little more beautiful in HAML, we'd waste precious hours converting ERB to HAML. We have so many other important things to do, why waste that time on something so pointless in this case?

I can write ugly code in any language.

One of the common arguments for HAML is that it's clean and beautiful. While I agree that a language that depends on whitespace forces you to indent and keep things organized, I guarantee that I can write ugly code in HAML as well. Look what I found: Haml Sucks for Content

That doesn't look pretty and organized to me. If you use a tool like HAML in the wrong way, you'll end up something that looks terrible. Like Chris says in his post about why Haml Sucks for Content:

Haml’s use of CSS syntax for IDs and class names should make it very clear: The markup you write in Haml is intended to be styled by your stylesheets. Conversely, content does not usually have specific styling - it is styled by tags.

It's important to realize that your situation is completely different than everyone else out there. If you're starting a brand new application and you plan on experimenting with some new tools, you can afford to use HAML (and it's usually a good idea to learn something new). But what if you need to stand up an application in a week? Use what you know.

There are plenty of reasons to not use HAML. Maybe, you don't have time to learn it. Maybe, you have some junior developers on your team that only know ERB. Maybe, you have a personal preference against HAML.

It's all relative. You don't need to use HAML. ERB can do all the same things. They are just different tools for the same job.

Software and diminishing returns

It's tempting to believe that everything matters equally. That every detail is as important as the other. It's tempting because when everything matters equally, the difficult labor of making trade-offs doesn't need to happen.

But as with many things that are difficult, the rewards for getting good at making trade-offs, and making the right ones, can be huge.

Making trade-offs is particularly difficult though because the return you get for expending time/energy/resources on something is almost always greater than zero. Very rarely will the answer to the question: "If I spend ___ hours/dollars working on _____, can I make it better?" be a 'no' answer.

But that is the wrong question to ask.

The right question to ask is: "Given the current state of my product and the number of customers I have, is this the best place to spend my time/money?"

Not all returns are equal.

So the challenge is to make the right tradeoffs so that you maximize the return on the energy/time/money you spend on something. And the right trade-off will be different depending on the state of your own product.

What I've realized is that most decisions and disagreements aren't ones of details, timing, design, features, functionality or anything else.

They're all about trade-offs.

Fighting Over Guns

'I have come to believe that the debate around gun control brings out pretty much the worst of everyone in this country.

There are of course crazy people on both sides of the argument, though let's face it, people in support of gun rights sure seem to be a lot crazier. The NRA thinks we need more guns in schools, and for some reason, some people have figured out how to make the gun debate a religious issue.

And on the flip side, we liberals who are usually talking about the importance of science and data when it comes to things like climate change, poverty, education and a host of other issues apparently think data suddenly doesn't matter when it comes to the issue of gun control.

No one has said it better than the authors of Freakonomics.

When hazard is high and outrage is low, people under react. And when hazard is low and outrage is high, they overreact.

Every death is sad and tragic, but especially when it's at the hands of a violent criminal and especially when the victims are children.

But the tone regarding the debate about guns in our country has to change on both sides if we're actually going to accomplish anything. If you ask a gun rights person why anyone needs to shoot 50 rounds in a second they scream at you for hating the constitution.  But I've also dared to ask my liberal friends about certain realities about the data of gun violence (like the fact that there are more victims from drunk driving than there are from gun violence yet we have about the same number of cars and guns per capita) and am spoken back to as if I'm a crazy far right winger because maybe I might disagree about one policy.

This is a shame because the data allows us to see that the violence we experience with guns in this country are a symptom of larger issues.

Maybe if we'd take a moment to stop and look at the data, we'd see that we could probably save more lives by legalizing drugs than we could by taking away guns.

In fact, any attempt to have a discussion about gun control in this country without discussing the war on drugs is completely pointless.

Diane Feinstein is set to introduce legislation that will supposedly be a victory for gun control advocates. Oh and also, she says:

We believe we have (perfected it). We exempt over 900 specific weapons that will not fall under the bill..

Because we'll all feel safer if a lunatic is only able to choose from 900 weapons?

And so here's really the only thing we know we can count on to come out of the debate over gun control.

First, nothing meaningful will actually happen in Washington. After all, these are the same politicians who can't figure out how to get our basic revenue and expense needs in order.

And second, politicians and pundits on both sides of the debate will eventually forget about the children of Newtown and keep fighting as if they're little children arguing over toys, trying to score their political points.

Except we aren't children fighting over toys.

We're adults fighting over guns.

Public? Private? Whatever the government says it is.

You may have heard that Reed Hastings, CEO of Netflix, is in hot water with the SEC over a public facebook post he made back in July about the number of hours that had been viewed on the video streaming service.

The rule he supposedly violated is in place to ensure that individual investors have access to the same information that larger investment houses have. Basically, the SEC thinks Facebook isn't public enough.

Face meet palm.

Here's what's maddening though:

Back in September courts ruled that Twitter could not block an FBI subpoena requesting tweets sent by an Occupy Wall Street protester.

Why?

You guessed it - because according the FBI tweets are public and therefore cannot be protected. When different government agencies can harass and punish its citizens for their behavior on social media, based on conflicting theories of privacy, it's time to worry.

Can we start thinking about an electronic bill of rights now?

 

Lessons from being in business for 6 years

On December 6th, 2006 I filled out the paperwork to officially make Ideal Project Group a business in the State of Illinois. Ideal is different from what it was when I started, has had a few ups and downs, and while I feel I still know a fraction of what I'd like to know, I'm much smarter and more knowledgeable than I was a few years back. Here are a few things I've learned along the way.

Your spouse is your most important business partner

I often write about my wife Maile and my family on this blog. I worry sometimes that I come off a bit too sappy, but I strongly believe that our partners in life become our partners in business and that too many people forget this simple rule. When Ideal started, it was Maile and her job that provided the health insurance. When I hit lows and started questioning things, it was Maile who was there to encourage me. During the upswings it was Maile who let me know we weren't just lucky. When I wanted to take some bigger risks, it was Maile who believed in me most. There's a huge difference between swimming against the current and swimming with the current. I'm fortunate beyond words for all the ways Maile has supported this business.

Build a product

We've built some products that are respectable but only generate a small amount of revenue. We built a product that will support our entire team as long as we continue to execute well. And we've built other products that we ended up shuttering completely. In every case though, something especially positive came out of it. Making things for yourself that express who you are, and show what you can do, when your team is making every decision is so important that it deserves it's own post.

Good clients are worth far more than the money they pay you

Good clients trust you to do the work you're good at. They refer you to other people who need your services. They pay you on time. They are fun to be around. They challenge you to be better but not in a way that questions your abilities. They don't dictate, but they collaborate. We're fortunate that every one of our clients for some time now has been what I would consider a good client. And a good client is worth so much more than just the dollars they pay you with.

Bad clients are never worth what they pay you

We've been extremely fortunate to have worked with some amazing companies and entrepreneurs, and the vast majority of our clients have been what I would call 'good clients'. Over the course of six years though, you're going to run into some lemons. Bad clients suck the life and the creativity out of you. They dictate things they want done without being willing to collaborate. They miss deadlines. They micromanage everything. They pay their bills late. They lead to work that you're not proud of and don't want to put on your portfolio. Worst of all, they suck so much life out of you that they impact the work you're doing for your good clients. Here's a really important secret: you can always tell ahead of time when a client is going to be a bad client. You just need to be willing to trust your intuition.

Limiting your talent search to a geographic location is silly

Talented people are everywhere, and the internet allows us to collaborate across the world with anyone. If you can't clearly communicate with someone that lives in another state or another country, you aren't trying hard enough.

In person interaction is critical and important

As wonderful as remote collaboration and the freedom it provides is, you have to make it a priority to physically get together sometimes. Our team didn't do this enough this past year and we've felt the impact. Balance is important, and sometimes you just need to get in the same room together.

Word of mouth is everything

Clicks are a digital representation of something far more valuable: one human speaking with another human about your product or service. Nothing else even comes close.

You can listen too much

There are so many conferences, and there is so much advice out there now, that you can go crazy trying to listen to it all. At a certain point you need to decide who you are, what you believe in, and stop listening to everyone else for a while. In fact, it's entirely possible you should stop reading this right now and get back to work.

There is extreme value in cash-flow

Payment terms are just as important as the dollar amount you charge, and you should never feel bad about requiring clients to stick to their payment terms. If you charge someone $100/hour and they paid you $90 you would say something. Same holds true for payment terms. There is real value in cash-flow and payment terms should always impact the price you charge.

People matter most

Of all the wonderful things that running your own business can provide, nothing compares to the relationships you form with other human beings. If you look at business as the context through which we form meaningful relationships, it changes the way we define success. I'm fortunate to have met many of the people I now call friends through my business. Friends are way more valuable than money.

There is no finish line

This was the hardest but most important lesson for me to learn. I used to think there was some finish line that existed - where once it was reached you could stop marketing, selling, or having to try hard. There is no finish line. You have to constantly try hard and put in significant effort to build the business you want and make it succeed.

There are however milestones, and I'm pretty proud to be able to say we've been in business for 6 whole years.

To everyone who made it possible, thank you.