Monday, June 22, 2015

I Love Open Plan Offices

It seems like every month there is a story about how open plan offices suck and how private offices are ideal for software developers. Open plan offices make workers sick, developers hate them, and well, they’re “devised by Satan in the deepest caverns of hell.” The comments from tech workers are similarly negative (see here, here, here, and here). People who would know and several studies have said that private offices make the most productive developers.

Some people's view of an open plan office. The open environment ensures close collaboration and teamwork.

Well, I'm a software developer, and I love open plan offices and hate private offices. I’ve worked in open plan offices, shared offices, private offices, and from home. Open plan offices are by far my favorite.

It will sound cliche, but open plans work for me because of the increased collaboration. Discussing work over email, phone, and chat is simply not the same. Developers work in teams, and it's much easier to be effective within easy conversational range. There is also a social aspect that builds team cohesion. Finally, being in the same environment makes people more accountable. It's much easier to stay on task when you see other people working hard towards the same goal -- and much harder to get distracted and browse reddit.

Conversely, private offices don’t work for me because they are stifling and isolating. My private office experience was sitting alone in a room for 8 hours a day with almost no human contact. Sure, maybe I would catch people going to lunch, or someone would stop by to ask a question, but that was rare. The barriers to communication were simply too high. With private offices, communication required getting up, leaving your office, walking around, and knocking on someone’s door. When people had a question, they would first search, then email, then call, and finally walk over to talk in person. And this is all for team members on the same floor. This cycle could take hours. If everyone was in the same room, it would take seconds. And if the person you needed was on a different floor, well, you'd better hope to meet at lunch. The one floor elevator ride was simply too insurmountable, except in the most dire of circumstances.

My view of private offices. No distractions for 23 hours a day, comes with a private bathroom, and even has a window.

For some people, open plan offices really are terrible. The solution isn’t to force everyone into private offices -- they're also terrible. Just like there is no best Pepsi and no best spaghetti sauce, there is no best office space. I’ve met people who love private offices, who love open offices, who will only work from home, and people who think the ideal environment is a shared office. They are all correct. The answer is to stop forcing a single office layout on all employees.

There is no best office, just like there is no best pasta sauce.

When so many companies make it their mantra to hire the best people, why put them into unproductive environments (or make them to move to San Francisco)? Keep some larger offices to share, leave some as private offices, and make a common area an open floor plan. And if people want to, let them work form home. To get and keep the best people, accommodate what makes them productive. It’ll be easier to recruit, and productivity will go up.

Sunday, November 2, 2014

Advertising with Google: It Sucks

Advertising with Google as a small business is much different than using Google as a consumer. Paying Google for ads and calling Google support is a lot like paying Comcast for cable and calling Comcast support

The events described in this post happened about a year ago. I finally decided to make this post for two reasons: to show that Google is exactly like every other large faceless near-monopoly and to show my disappointment with how Google handles paying customers. 

Before this experience, I thought the parts of Google that make money must be amazing. Look at Gmail, Google Docs Drive, Google Calendar, Blogger and even Android. They’re great, and they’re all free. Google makes these services to capture you, the product. If the free stuff is great, then the parts of Google that face advertisers (the customer) and take in billions of dollars in revenue have to be absolutely amazing. Sadly, they’re not.

Lets start with some background. A year ago I had a great idea: start a website that would sort pocket knives by legality to carry. You would pick a city and see knives that are legal to carry in that jurisdiction. The list of knives have Amazon referral links. Everyone would benefit: the customers would stay legal, and I would collect a sales commission. 

The story of the site is long and deserves its own blog post, but in summary... creating product sales sites is hard. The site I made, legalknifeshop.com, is still up. Go and take a look, and if you live in Chicago, order a knife. Also, I know the site has many problems. I’ve been too busy to work on it. If you see something wrong, I’m probably aware of it but don’t have time to fix anything.

But this post is about advertising, so lets get back to the story. The first order of business after making a site is to advertise. There is only one choice in online advertising: Google. I signed up for an AdWords account, selected keywords, and paid money. Legalknifeshop was approved and the ads started. Time to wait for the sales to roll in!  

The ads ran for two days. Then I got the first email. 
Urgent Warning - Your AdWords Account May Get Suspended

That's not good. It turns out that after being approved, legalknifeshop was unapproved, despite no content changes.

The site was in violation of the weapons policy that prohibits dangerous knives. The violation was silly: legalknifeshop only sells explicitly legal knives, and knives legal to carry in Chicago (the only supported location) must have <2.5" blade. Boy scouts handle longer and more dangerous knives. Certainly someone at Google could understand and reinstate the ads. 

I called Google support. After 4 different menu prompts there was a human, to whom I explained the situation. 

She put me on hold for 15 minutes, came back and said that she “had no idea what was going on,” but the site needed to be escalated back to review”. “But what about the previous review,” I asked. “I don’t work in that department,” she answered. 

This was the first sign of what was to come.

Then another email. 
Your AdWords account: Ads not running due to AdWords Advertising Policies.

Maybe the review department wasn’t convinced? Having heard nothing else, I sent a support an email asking why legalknifeshop violated the weapons policy.
Call 1-866-2-GOOGLE* for free expert help reviewing your AdWords ads 

That was the title of the next email. It continued: "Having reviewed your AdWords account XXXXXXXXXX, we can see that so far 549 potential customers have seen your ad, and 4 of them clicked on your ad to view your website. We can help you attract more potential customers to your website or answer any other questions you may have".

Maybe they could start by reinstating my ads?  Really, Google? What world do we live in when a Big Data company like Google can't link their suspended account database to their promotional emails?

I called support again and spent 20 minutes on hold. The reply was "oh, I can't really see what's going on, you'll have to contact the people who you were contacting before". This is when I knew I was in trouble. There isn’t even a coherent customer records management or issue tracking.

During the next few weeks I called, used the online customer chat, and sent emails. Finally, after persevering and explaining that legalknifeshop sold no dangerous knives, someone at Google admitted that no, legalknifeshop does not violate the weapons policy. Victory at last! 

The sweet taste of victory was not to last.

The next day, another suspension email. Now, my site was in violation of the bridge page policy. A policy that was not mentioned once during the many prior discussions with Google support. I appealed again, but it was not to be.

It turns out that legalknifeshop doesn't provide enough value to end users. To provide enough value to advertise with Google requires the following changes:
  • Provide listings for more than one city (doable)
  • and one of:
  • Use more than Amazon as a referral partner. (pretty much impossible)
  • or
  • Sell the knives myself. (impossible)

During my new week of appeals, I received the following promotions from Google:
Reach the right customers by adding negative keywords to your AdWords ad 'Knives Legal In Chicago'

Your AdWords ads have stopped running. Talk to Google to get help. Remember to call 1-866-2-GOOGLE* for a free review of your AdWords ads with a Google expert

There is no way I could meet the bridge page requirements. Google won, they refused to take my money. I really tried to pay, but they just wouldn’t take it.

Two days later, there was one last email:
AdWords Tune-up: Make your 'LegalKnifeShop #1' campaign ad stand out with a longer headline

That was the last straw. Out of pure spite, I advertised with Bing. But that's a story for another blog post.

Sunday, May 18, 2014

What Happens When Your Phone Falls into the Ocean

Short answer: It'll stop working.

But have you wondered, why? What happens to the insides of the phone?

We've all heard that salt water conducts electricity and "fries" your electronics, but what does that mean? Will the phone rust? Will the battery melt? Today we get to find out!

In this blog post we'll look inside my Black 16GB iPhone 5 (yes, that's an affiliate link) that took a swim in the Pacific. Where possible, iFixit's iPhone 5 teardown pictures will model what iPhone 5 internals should look like.

The Initial Opening


This is how an iPhone 5 looks like after swimming in the Pacific.
This is how iPhone 5 innards should look like, courtsey of iFixit.

Right away, there's a huge difference. There ocean phone is full of fine sand, salt stains, and a giant rust spot. If you remember chemistry class, then the rust spot makes sense: rust is an electrical process. The biggest rust spot will be at the anode of the battery leads, which is exactly where it is.

The Screen Assembly and Mainboard


The salted, rusty screen assembly. The rust feels like its simply rubbed off from the other part.
The salted, rusty mainboard and battery. The battery is surprisingly intact.
How an iPhone 5 screen assembly and mainboard should look like. Notice the distinct lack of salt, rust, and sand. Courtesy of iFixit.

Once again, the salt stains and rust is the big difference. Surprisingly, the lithium-ion battery is perfectly intact, without holes or burn damage. Why surprising? Lithium and water tend to react vigorously.

Battery Closeup


The battery leads are extra rusty.
An unsalted battery, courtesy of iFixit.

Other than the rusty leads, the battery seems fine from the outside. The phone would not power on, but I am not sure if its related to the battery or other electronics failures. Probably both.

Mainboard and Chassis Closeup


There's a large salt deposit under the mainboard.
The salt water must have pooled there as the phone dried. 
A pristine mainboard, courtesy of iFixit.

Getting to this part was a challenge: some of the screws were so corroded and rusted that unscrewing them stripped the grooves used for unscrewing. I had to resort to force and some prying, which didn't matter since the phone was already broken.

A Zoom on the Mainboard


A zoom on the corroded mainboard.
The front of the camera and mainboard.
A pristine mainboard, courtesy of iFixit.

Almost every connector is rusted or otherwise corroded. This is one of the main reason everything stops working: the small connectors corrode and the mainboard components can't make electrical contact.

Everything


All the rusted components in one glorious photo.
All the pristine components, courtesy of iFixit.

The obligatory "all components in one photo" shot. Mine isn't as nice as iFixit's, but the other differences should be obvious. The one interesting thing to note is the serious corrosion on the SIM card.

Conclusion


If your phone falls into the ocean, its going to have a bad time. Don't let your phone fall into the ocean.

Thursday, May 15, 2014

Bjarne Stroustrup on the Past and Future of C++ (Including Long Template Errors)

Someone on IRC pointed me to Bjarne Stroustrup's talk on C++11 and C++14 at Microsoft's Going Native 2013. If you work with C++ and haven't seen Bjarne's talk yet, go watch it now.

Stop reading this and go. I'll wait. 

An hour into the talk, Bjarne starts discussing templates, long error messages, and the tradeoffs that were made during the design of C++. The long error messages were a conscious decision to preserve performance and expressiveness with the computing power available back in the mid 1980s.

It amazed me that Bjarne admits template error messages are a huge debacle, and he has been working for 20 years to fix the problem. The solution is near: C++14 concepts will finally allow for sane template errors. Messages like "Member must be CopyAssignable" will be possible, and hopefully normal. This isn't just theory: there is an experimental branch of GCC that supports concepts right now.

Other parts of the talk are fascinating in their own right and have given me a lot more respect for C++ and Bjarne Stroustrup. The man could have rested after creating the original C++ spec and compiler, but he has been working for 20 years to improve the language. That dedication has made C++11 much better than C++98.

Bjarne also brings up a good point: many people who dislike C++ are using it the wrong way. The language should only be used when you need a performance and lightweight abstraction at the same time. If you don't care about performance or you need high-level abstraction, C++ is the wrong tool for the job.

The talk has a lot more interesting content. If you haven't watched it yet, go now.

Sunday, May 11, 2014

C++11: better, but still frustrating


Update: jduck pointed out that the before/after code snippets were identical. Oops. Now fixed.

I'd previously given up on C++ due to the many small frustrations: incomprehensible error messages, silly parsing issues (e.g. '>>'), rules to avoid subtle errors, and many other small frustrations that soured me on the language. That was back in the days of C++98 and C++03.

The language has evolved, and recently I found myself working on a project written in C++11. So far my experience has been better, but still frustrating.

A Motivating Example


I'll start with a real example. The project created a lot of Foo objects that were passed by reference to numerous functions. I needed to keep a collection of every Foo object that was passed to a specific function.

My first thought was, "I know, I'll create a vector of Foo&". This thought is simple, elegant, and of course, wrong.

A vector of references isn't possible because references can't be reassigned. That is, references[0] = foo; would update the referenced object, not the zeroth entry of the references vector. More technically, references are not CopyAssignable, a requirement for members of containers.

Errors Galore


But how would someone new to C++ know this? What do compilers say when making a vector of references? Lets find out by compiling this small (and wrong) program.

#include <vector>
#include <iostream>

int main(int argc, const char* argv[])
{
    int a = 1;
    std::vector<int&> test = {a};
    std::cout << "a: " << test[0] << std::endl;
    return 0;
}

Here are the results for Clang, GCC and MSVC:

Compiler Error List Error Count
Clang rextester.com/JMFGP72087 158 lines
GCC rextester.com/HGKFIT84222 187 lines
MSVC rextester.com/UXPG39365 107 lines

In classic C++ style, the error messages are hundreds of error lines from obscure library implementation code. They give no indication of what is wrong, and no indication of the solution. I pity someone who doesn't have C++ experience trying to figure out what is wrong with their code. Pretty much any error would be more helpful, even an obscure message like "Member must be CopyAssignable" -- as long as it pointed out the correct line of code.

The Fix


For reference, the corrected program is:

#include <vector>
#include <iostream>
#include <functional>

int main(int argc, const char* argv[])
{
    int a = 1;
    std::vector<std::reference_wrapper<int>> test = {a};
    std::cout << "a: " << test[0] << std::endl;
    return 0;
}

The fix is to use the std::reference_wrapper utility function when making a container of references.

Conclusion


There's definitely upsides: the '>>' parse has finally been fixed. Classes can now be initialized with initializer lists. There is type inference via 'auto'. For-each style loops exist.

C++11 is a great improvement over C++03, but its still frustrating: the obvious solution (like containers of references) is wrong in subtle ways, and compilers still generate hundreds of obscure error messages for a one-character typo.

Tuesday, May 6, 2014

Do Not Reply Addresses Suck

If you send emails from do not reply addresses, I hate you.
Your customers hate you.
People you've never met also hate you.

Why  you should stop using no reply addresses:
  • Something will go wrong and your customers can't tell you.
  • You will send email to people who aren't your customers. They will have no way to ask you to stop.
Stop hating your current and future customers. Stop using no reply addresses. Only send email from monitored email addresses.

And one more thing...

If you create accounts without validating email addresses, I doubly hate you... and from now on I will be naming and shaming.

The Do Not Reply Hall of Shame


Ask.fm


Ask.fm lets people register without validating their email. The many follow-up emails are all from noreply@ask.fm. Ask.fm, please stop.

As you can guess, nothing was ever done. Ask.fm, I hate you.

DataViz.com


DataViz lets people buy software without verifying their email. Wish I could reply and tell them, but the email is from do-not-reply@dataviz.com.

My name is not Artem Dubov and I did not buy this software.


Saturday, February 8, 2014

Direct Download Link For Adobe Flash Player

Are you tired of seeing this?

"Error: Unable to proceed with the installation". Thats bad. But there's a green checkmark. Thats good? 

Do you find Adobe's toubleshooting page completely useless?
 
Then use this handy direct link and bypass Adobe's broken installer. As a bonus, it wont try to trick you into installing Lightroom or other unwanted products.


Update as of November 2nd, 2014:

Jerry Leichter very helpfully pointed out that Adobe maintains an official redistributable version of Flash player that doesn't use the awful installer. You can get it here:

https://www.adobe.com/products/flashplayer/distribution3.html