Writings

Confusing UX and the CAN-SPAM Act

I tried to unsubscribe from Lumber Liquidators’ emails today:Screen Shot 2015-03-05 at 9.10.36 AM

There’s a button that says unsubscribe; but unless you notice and click the checkbox above it, you won’t be unsubscribed. Don’t believe me? Proof:

Screen Shot 2015-03-05 at 9.31.57 AM

You’d think this would be illegal under the CAN-SPAM act, however, it isn’t:

5. Tell recipients how to opt out of receiving future email from you. Your message must include a clear and conspicuous explanation of how the recipient can opt out of getting email from you in the future. Craft the notice in a way that’s easy for an ordinary person to recognize, read, and understand. Creative use of type size, color, and location can improve clarity. Give a return email address or another easy Internet-based way to allow people to communicate their choice to you. You may create a menu to allow a recipient to opt out of certain types of messages, but you must include the option to stop all commercial messages from you. Make sure your spam filter doesn’t block these opt-out requests.
6. Honor opt-out requests promptly. Any opt-out mechanism you offer must be able to process opt-out requests for at least 30 days after you send your message. You must honor a recipient’s opt-out request within 10 business days. You can’t charge a fee, require the recipient to give you any personally identifying information beyond an email address, or make the recipient take any step other than sending a reply email or visiting a single page on an Internet website as a condition for honoring an opt-out request. Once people have told you they don’t want to receive more messages from you, you can’t sell or transfer their email addresses, even in the form of a mailing list. The only exception is that you may transfer the addresses to a company you’ve hired to help you comply with the CAN-SPAM Act.

(source: CAN-SPAM Act Business Compliance Guidelines)

The UX may be designed to confuse visitors into staying subscribed; but (using a plain reading) it complies with the letter of the law.

Bonus: The CAN-SPAM act never uses the word ‘unsubscribe’, and only uses the word ‘opt-out’ three times.

On “Minimum Vacation”

Vacation days: Wherever you go, it’s a topic that makes CFOs groan and workers cheer. It’s generally understood as one of the best perks of a company in industries where pay is relatively fixed or there isn’t much competition for talent. In places where there is a lot of competition for talent; it’s a paper benefit usually. Yea, it’s there, but you’ll be working so hard that you won’t even realize you have it.

Thinking about Developers, we tend to work very long hours, even though it empirically hurts us and the company. Extreme Programming tried (and failed, sadly) to introduce the notion of the Eight-Hour burn; a reasonable spin on what programming should be. But with distractions aplenty, it’s hard to justify an eight-hour burn.

Whether we want to admit it or not, programmer culture is destructive both to itself and the businesses that hire us. Some businesses have tried to turn this negative into a positive force, by having Game rooms (Google, Stack Exchange, Twitter, Facebook, Zynga, Dropbox, and a lot of others (I didn’t link individually because I didn’t want Google to think I was a bot, incidentally)). But the unfortunate quality of a gameroom is that if you’re putting in an eight hour burn, you don’t have time to use one. In effect, its presence is a signal you should be putting in more than eight hours a day — unsustainable if you want a happy and healthy workforce.

Some of these same businesses have also tried the concept of ‘unlimited vacation’; the idea that you can take as much time off as you need, so long as you deliver results expected by the business. This requires clear expectations (which isn’t always easy if you don’t have a rigid feedback structure), and trust.

In reality, unlimited vacation really means that depending on who you are and what you’ve done, you either have two weeks off a year or four (still not bad). It also means that if you’re on a team where no one takes time off, you’ll be the odd one out if you do — never a good idea (even if it’s supposedly culturally acceptable). The old adage: “Get in before your boss, leave after” still applies. It’s also a cost-saver for the business: No paying of vacation days when a worker leaves, and no need to pay for costly (and usually bad) PTO tracking software.

Other businesses, recognizing the problems with unlimited vacation; have instituted the idea of a ‘minimum vacation‘, or unlimited vacation with a culturally mandated (and therefore acceptable) floor. The CEO of Travis CI, Mathias Meyer, explains the shift:

When Travis CI turned into a business with employees, one of our ideas was to not constrain people in how much time they take off for vacations. We didn’t track the days people were taking off, and as the people running the company, we didn’t actively encourage people to take times off. In short, we had an open vacation policy.

The cause was intended to be noble, as we didn’t want to get into the way of people taking time off as much time as they need to recharge. I myself am a big fan of disconnecting for a vacation and staying away for more than just a few days to free the mind, gain new energy and fresh insights.

Two years later, this idea turned out to be a failure, and we’re changing our vacation policy.

Deeper into the post, he talks about what Travis CI’s minimum vacation policy actually means:

Starting in 2015, we’ve implemented a minimum vacation policy. Rather than giving no guideline on what’s a good number of days to take off, everyone now has a required minimum of 25 (paid) vacation days per year, no matter what country they live in. When people want to take time off beyond that, that’s good, and the minimum policy still allows for that.

[…]

We removed ambiguity of whether or not someone should check in by having explicit guidelines on what constitutes a vacation day and what doesn’t. Our expectation is that when you’re on vacation, you do everything but stuff that’s related to Travis CI.

The whole post is well worth the read.

Vacation will always be a thorny issue, and minimum vacation may not solve the problem of programmer burnout, but it is a good step in the right direction. There are other steps we can take, but it should really start with dropping the keyboard and remembering that there’s a life beyond the compiler.

A more useful hiring metric

I’ve taken part in a lot of interviews. A lot.  I’ve conducted a lot of phone interviews, and read even more resumes. I’ve also had my share of weird interviews. If reading my old blogs posts on the subject tells me anything, it’s that even after doing it for years, I still have no idea what I’m doing.  I know, I should be an expert; but every time I think I’ve got this whole thing figured out, I realize: I don’t.

I’m not sure any of us do.  That isn’t to say that we’re incompetent (far from it) just that interviews aren’t a solved science; they aren’t something where you can change one variable to test what works and what doesn’t.  Every person you interview, every situation you sit in will be so different that it’s hard to draw any meaningful conclusions based on objective metrics.

As an example:

I took part in an interview once where there was this code exercise that was given to me. Originally it was to be given at 8pm at night, and I’d have an hour to do it.  This was after I’d already spent 10 hours working (I took a break, as I always do, to have dinner with my family and put my daughters to bath and bed).  If you’re wondering about the math, I had started working at 7am that morning.  By the time the code test started; it was 8:40pm (already 40 minutes late due to interviewer error) and I was tired.  Since I believe in the 8 hour burn, I should have pulled the rip cord; but I didn’t.

The purpose of the code exercise was to see how well I code.  Here’s the actual text of the exercise (anonymized):

Create a form using bootstrap that has 2 controls: date input & submit button (see video and screenshots below) . Click Submit button should calculate:
1. User’s age based on the selected date (long form date)
2. User’s next birthday (long form date)

Use the following libraries:

My success was determined not by how well I code; but by how well I implement a specific library’s control, with a specific library’s validation; in an hour, after having already spent 10 hours working. My success hinged as much on the documentation available for that library as it did on my own programming prowess. Also:  I can spend an hour mucking with CSS to get it to vertically align something correctly. As you can tell, I failed; but it left me with a realization: interviews reveal as much about the state of the company you’re interviewing at as they reveal whatever the interviewer wants to know about you.  Not necessarily what they vocalize, but what they actually want to know.

These types of interviews make me wonder: Is this what programming is about? Being able to implement a control you’ve never seen in a very specific way with a specific design in an hour? Is this what we’re hiring for as an industry? If so, what’s wrong with us?

On a practical level, I have never been in a situation where if I didn’t implement a new feature in an hour, we’d lose a client.  I have been in situations where I had to quickly fix complex problems in an hour (usually less time than that), but I had a lot of domain knowledge already. I knew the systems involved and could figure out what part to look at.

The more I think about it, the more I think our priorities as an industry are inverted. The evidence seems to bear this out.

We want to see how quickly someone can do something; or how many years of experience they have in a technology.

But does that really matter? Does it matter whether it takes me 1 hour or 2 to implement that control? Does it matter whether I have 3 or 5 years of experience in a framework? I don’t think so, and neither do a lot of other people.

What matters to me is something near and dear to my heart: What mistakes have you made with language/platform x?  With the technologies I’m not a beginner in, I can list out my mistakes all day long. I could tell you multiple stories about how I broke production because of something stupid I did.

It’s embarrassing; but without those mistakes, I wouldn’t know half of what I’ve learned.  It’s even more embarrassing telling someone else (hello internet!) about my mistakes; but ultimately, those mistakes are how we learn.  If someone doesn’t make mistakes, they’re either really really really awesome, or they’re not doing anything.  The latter is far more likely.

I used to think those mistakes meant I was a bad programmer.  I don’t any more.  Now, I take them for what they are: growth.  There’s a (perhaps apocryphal) story being shared on twitter right now along those same lines:

B-9mYFKW4AEEFKd

That story gives me hope. Maybe with the social web stories like this will infect the leadership in business, and change what we look for in an industry.  But for my part; whenever I have the power to do so, I want to work with individuals that are ok with making mistakes; of knowing that they don’t know the answer; but working to figure it out.  I want to work with someone not because they have x years of experience, but because they have made mistakes and learned from them. To me, that seems a far better indicator of someone’s value.

A Partial List of Things that Tripped Me up as a New DBA, Part 2.

In an earlier post, I detailed a short list of things that tripped me up starting out as a DBA. Some of these are things that trip up developers, others are things that trip up DBAs. Whether I was the cause or the one that had to fix it, I was involved, somehow.

This continues that list. Again, there are no answers here; only questions.

Why are the pains of using NVarchar(MAX) not shoved down a developer’s throat by SSMS? Developers understand data structures; It’s easy enough to visualize what data can fit on an 8K page (or some representation thereof), so why doesn’t SSMS warn the developer the same way the compiler does? “Hey, using NVarChar(Max) means your pretty little indexes won’t be awesome.”

Why doesn’t NOLOCK generate a similar warning? It’s a bad idea in most cases and doesn’t do what you expect, so why not hit developers over the head with that detail?

Why don’t uses of Table Variables generate warnings about bad statistics?

Why aren’t execution plans and Statistics automatically generated for each query run in “developer” mode? Developers are used to seeing those sorts of metrics; and with a few simple default changes SSMS could get developers to start to pay attention to things that really matter.

Views. Why doesn’t SQL Server complain when you use nested views? Seems like something to tell a developer. I spent two days unraveling nested views just to find out the de-nested view generated a different query execution plan than the nested view.

Shouldn’t SELECT * generate a warning EVERY TIME A DEVELOPER USES IT? It shouldn’t matter if it’s in the query window or not — If we subscribe to the idea that developers need to know this stuff, why aren’t we beating them over the head with it?

Why does SQL Server let you set up a LINKED Server as SA without some sort of “You’re an Idiot” warning? In fact, why does SQL Server let you use SA for anything without some kind of signal that it’s a bad idea?

Why does changing the name of a SQL Server box (to the name of a box that is still in AD/DNS) result in dire delayed pain if you’re using Windows Auth? It works, it works, it works, and then all of a sudden: No one can log in using Windows Auth (I was bitten by this twice before I realized why the renaming did it).

Why doesn’t SQL Server use the Begin/End Transaction pattern by default for SSMS queries? Just put it in the template; don’t give people the option of choosing the implicit transaction settings. Some junior DBA may forget what is implicit and what isn’t, and end up filling the transaction log with uncommitted transactions.

Why does SQL Server throw the principle of least privilege out the window? Why doesn’t it make it hard to do something stupid security-wise? Good software helps its uses fall into the pit of success, not the pit of “We just Got Owned”.

Along the same lines, there should be warnings for unparameterized queries as well; make the DBA turn them off; don’t just let it happen.

For that matter; why doesn’t SQL Server have some generated tables/template scripts for various business needs? I recognize it’s a general purpose Database; but Microsoft doesn’t have some idea about Stored Procedures or tables for User Account Management, or half a dozen other business purposes. You can’t swing a query plan without hitting templates for most Microsoft products, but for SQL Server, they’re conspicuously absent.

Why are our options for importing data into SQL Server to either use SSIS (that you pay for), BCP, or some application code? Why is it so difficult to import a CSV file or XML file into SQL Server? (Unicode will get you every time).

Editor’s Note: Apparently there’s a way to get SSIS for free. It’s also available with the Express version; and the issues I talk about here are available in Express.

Why doesn’t Microsoft provide SQL Server as its own bundle with Windows Server set up to reasonable defaults (like Instant File Initialization; and read/write access to what SQL Server needs)? It’s not like there are people out there that think, “I’d love to use SQL Server, but I’d rather put it on Linux”. Microsoft knows what Windows Server needs to be configured as to use SQL Server; why not bundle it?

Why is it so painful to script SQL Server privileges for Read/Write access to the filesystem? Part of my DR work has been to automatically stand up new servers when needed, and I spent more time on getting privileges to work than any other part of the task (including writing the automated restore code to restore 200+ databases from backup to a single server when the system drive has lost all its data/MSDB is corrupt). I literally spent two days on that code (including unit tests) but a better part of a week trying (and failing) to get user access rights set up through scripting in AWS.

It’s 2015; if it weren’t for AWS, I’d have set up a few dozen more SQL Servers than I’ve had to — why does it take the cloud to make such a thing scriptable?

Why isn’t there a better API for Windows Server + SQL Server administration stuff? Do they still envision a DBA clicking on settings? Really? My options are T-SQL, or PowerShell that emits T-SQL.

Why aren’t there giant warnings on Triggers? Why are they so hard to debug? Sell a bundle; SQL Server + MSMQ or your favorite Queuing service. While you’re at it, give me a better API into SQL Server.

Why did it take until 2014 for Microsoft to have (nearly) sane RAM licenses?

High Availability, Disaster Recovery. As part of a startup, my options are: Write it myself, migrate to Postgres, or pay a lot of money for Microsoft to do it. We’ve punted on HA and focused on DR for now; but that’s a similar scene: Write my own or pay a lot of money.

Why doesn’t Microsoft give some sort of guidance about usage patterns for different databases? In a truly multi-tenant environment, it’s almost impossible to find out who the real users are. If it weren’t for the Brent Ozar scripts and an internet full of small utilities it’d be nearly impossible to find that out easily.

Why are all the important DMVs, procedures, and tables hidden from view? Shouldn’t those be part of the default view for a DBA?

Deleting a database is not always a Severity 16 error. Sometimes it’s a non-event, and sometimes it’s a world stopping event.

Pager? Really? It’s 2015; is that really still a thing?
Why doesn’t SQL Server emit a warning when a database in full recovery mode hasn’t had a log backup in a predetermined amount of time (an hour seems reasonable)?

Why aren’t orphaned users front and center when restoring a database? Why doesn’t SQL Server try to restore users if it finds a match?

Wait Stats. SQL Server knows which are bad and which aren’t; or which are indicators of something untoward; but out of the box there is no notification mechanism. Sane defaults, people. Sane Defaults.

If SQL Server fails to compile a query; why doesn’t it send the query to the error log and tell us exactly which query it couldn’t compile? It has the query text!

Why doesn’t SQL Server give an easy option for a user to go in and out of SA mode? Sometimes I want to drop to SA mode (think: sudo), but most of the time, I don’t want my Windows user to be a SysAdmin; and I defintely don’t want to have to execute a custom command to connect to SSMS to log in as a Windows User that has SA.

Why isn’t there the ability to generate an empty database? If you choose to put tables in Model, those tables get created for every Database you create. If you want an empty database, you’d better keep the backup of an empty database before you mess with Model. Don’t delete it, or you may find yourself setting up a new SQL Server instance just so you can have an empty database.

Author’s Note: These are a few more things that have tripped me up as a DBA. In the coming weeks, I’ll have answers for some of these, but I may not. This blog post is mostly a theraputic look at DBA work; I’m really not angry (even though I may come across as such in this series).  DBA work means detective work. It means visualizing the problem with pieces of evidence scattered across a large surface area.  It means having appropriate tools in place before something goes wrong; and above all, it means being able to take a complex system and making it work.

The only thing I can compare it to is to understand the basis of flight, and then be asked to pilot many different types of aircraft  (including helicopters) by instrumentation alone, with all of those instruments hidden from view until you know exactly which one to ask for.

A partial list of things that tripped me up (as a new DBA)

To the untrained eye, Relational Databases are arcane, magical things.  I remember my first realization (as a programmer, mind you) that Databases do follow normal data structures and algorithms that any other program follows.

Wonder and awe.

I wish I were being facetious.

I’m still fresh enough in my exposure to databases that I haven’t turned into a grizzled old guy yelling at the NoSQL kids with their hats on backwards and their ACID washed jeans bearing phrases on their rears like “BASE” or “fault tolerant” (HA), and I haven’t forgotten my own struggles as a DBA. If anything, the mistakes I’ve made are only amplified now; they’re still new enough that I remember them as if they were yesterday (in some cases, they were only yesterday).

This blog post is a list of things that tripped me up. I don’t provide any answers here, only questions.

What are service accounts? Are they the standard NT SERVICE\MSSQLSERVER account types? If not, are they domain accounts?  How are they managed and created?

If Backups shouldn’t all run at the same time, and we should have our databases in FULL Recovery mode,; how do you set up a FULL, DIFF, and LOG database backup to not collide? Do you stagger the FULL/DIFF? The FULL starts at 12:00am and the DIFF at 12:05?

Why are some basic bad things (like the query processor running out of memory) not better catalogued by SQL Server? Why doesn’t it tell me, “Hey, this is the hash of the plan I failed on?” (or at the very least output the query to the error log)

Are transaction log backups supposed to randomly fail with weird messages? (That’s a SQL Backup error. I think I understand the cause, but I’d love to figure out how to stop it)

Why doesn’t SQL Server come with an automated backup/restore tool? Why must we keep reinventing the wheel ?

Why is RECOVERY for when you want your database up right now and NO RECOVERY for when you want to restore more backups? Shouldn’t that be the other way around?

Why do I need to use RESTORE FILELIST ONLY to see what the data and log logical names are for a database before I restore it from a backup? The .bak file obstensibly contains the name of the database I’m trying to restore. It knows. Does it want to know that I know?

And What crazy person decided that a database’s logical name could be totally different from its filename, and that you really do need both pieces of information to restore it? Why not just say ‘screw it’ and let me overwrite the original file name on restore if I don’t provide a logical file name?

Why does a transaction log backup failing for 1 database in 200 (on a single server) mean that finding out which database that failed take an act of congress? (Or really, a custom backup/restore checker) My options are to either spleunk through the log files, or hope the restore tool catches it before we need it.

Why are basic things like compressing the backup not available in Web edition?  This isn’t an expensive feature (Red Gate charges a few thousand a year for the privilege for 4 servers), but you pay out the rear end if you want it (just check the licensing costs between Web edition and Standard Edition).

Why does using Buffer Pool Extensions blow up SQL Server if you put the BPE file on an ephemeral storage volume? TempDB can handle it, why can’t BPE?

Why, in 2014, is Microsoft Guidance to email a database if it’s small enough?

Why are system databases still stored on C:\ if other options are available? Why is moving them such a giant pain once the database is in production?

For that matter, why aren’t Log files automatically pruned out of the box for everything?  Why aren’t there sensible defaults?

Why would you name two completely separate things (the log file, like the error log) and the transaction log file (sometimes just called the log file) named so similarly?  Why are we lazy with our words?

Why aren’t important things for SQL server screaming at you?  If my database is slow, why isn’t there a giant thing that says, “This is why it’s slow?” We all know you can’t trust the activity monitor.

Why are there Users and Logins? Of course, I’d love to create a user that can’t login to the database. Why that makes perfect sense (again, fledgling DBA).  Why do users get orphaned from logins when you restore a database? The names match; in what world would that be two different people? What insanity is this?

Database Mail? Why isn’t that easily scriptable from one Database Server Instance to the next?  Trips me up more than I care to admit.

Why is it when I kill a process, that process doesn’t show as killed?  Sometimes it still shows as “runnable”, and other times it stays in the “rollback/killed” status for a long time (depending on whether I’m using sp_whoisactive or sp_who2).

Why does the backup and restore wizard perform so badly over a network?  Why can’t I use the UNC Path syntax to access other drives?

Why aren’t necessary database metrics shown in their own view?  The DBA should have a necessarily different view than a database developer. Why is SSMS so generally crappy?  Why doesn’t it have better support (in 2014) for Intellisense, or command completion?  (It seems like starting a command off with RESTORE Database should be enough to let SSMS know to start showing you the options)

Why is it infinitely configurable; yet common sense defaults still aren’t set? Why does High DPI support still suck so bad? With as much money as Microsoft makes from SQL Server, they can’t spend time to improve SSMS? Why s the difference between an operational server and a server in RECOVERY (again, NO RECOVERY?) mode a tiny little icon difference?  Shouldn’t stuff like that be in giant bold letters? YOUR DATABASE IS DOWN.

Why doesn’t SQL Server tell you its ebb and flow for SQL Server agent jobs? It knows when it’s busy, it knows when it’s not; why doesn’t it warn you when you try to schedule a job during peak load?

Why are Reporting Services encrypted by default, yet the actual engine does not?  Microsoft went all “Do whatever you want” for SQL Server, but for Reporting Services suddenly got cold feet?

Why doesn’t SQL Server support a TMUX like connection through SSMS? If it does, why isn’t that the default?

Does anyone really create solutions in SQL Server Management Studio?  If we’re closing SQL_QUERY_1.sql -> SQL_QUERY_7.sql, do you really think we know which one is which? Why not make the default file name to show whatever the first 20 characters were of the query?

Why do I feel like an episode of Sherlock whenever something goes wrong in SQL Server? Server is slow… Well, there’s a hung SQL Backup process, could that be causing it? Let me kill it. Things got better! That must be it. Was it it? I HAVE NO IDEA. I know baseline, and I know what it’s like now, but this is like piloting a helicopter in a snowstorm.  I only know which way is down because gravity and death. Everything else? No idea.

Come to think of it, I’d pay for some Star Trek TNG style alerts and dashboards for SQL server. Think of the Brent Ozar scripts (and stuff like SP_WhoIsActive) in a nice view; catalogued and kept track of, with baselines, charts, and warning klaxons. Yea, I’d buy that.

I’m new to this whole DBA thing, for sure.  Maybe at some point it’ll be like looking at the Matrix; for now though it feels like there are grand opportunities to make things a bit less painful for DBAs. Maybe it’s just not profitable to do so?

My First Talk of 2015

In My Epic Life Quest, I went over what my goals for 2015 were. One of those bullets was:

  • Give 3+ Dev talks at work

Two weeks ago, I gave the first talk; an introduction to Git.  This was to the whole dev team, around 15 people.

Part of the leveling up is in the act of preparing the talk, but most of it is in the delivery and feedback cycle after the talk.  Or, as I said on Twitter:

Yea, that’s how I did.

So let’s talk about ‘why’ that was the case:

Initially, I had 25 slides; (all of which would take around 45 seconds a piece to go through) and then I was going to demo Git and show it in different situations.  Since my audience was full of developers that were primarily used to TFVC (Think SVN for TFS;with visual integrations and no command line component), I wanted to take them through the lingo and show how TFS is different from Git before demoing Git.

In practice, however, there were a lot of questions as soon as the talk started, all from one developer.  They started almost immediately with questions about Git’s branching model; or that it isn’t really different from TFS; or whatever. The developer admitted they didn’t have experience with git, and were asking these questions for understanding (in their words “because they didn’t see how it was different than TFS” or “What would we gain by moving to git”) ; but without meaning to, that developer became the heckler in the room.

Instead of asking them to hold all questions until the end; I answered their questions.  That invited more questions, and because I had already opened the door; it effectively sunk the flow of the talk.

In the end, we barely got through the slides (ug, slides) and into the demo ( My rehearsals had 30% slides with 70% demo).

After the talk I sent out an anonymous feedback form, out of 14 people that attended the talk, I received two responses:

“Very informative! Maybe sticking to the flow of the powerpoint more would have made things make a little more sense from a general view, but I understand that other peoples’ questions were the main cause of going a bit tangent at some points.”

“Content was presented in a thoughtful, meaningful way. Demoing helps to clear things up to those who do not have a full grasp on the subject. Perhaps talk about one thing and then demo it right away.”

Both were great responses; and based on those responses and more reflection, here are some of the things I needed to watch out for (and didn’t):

  •  If your talk relies on a flow; and questions interrupt that flow; then make sure to hold all questions until the end
  • a demo is worth a thousand words
  • Never engage one-on-one; always bring it back to your control; at the end of the day the only person who can let you lose the flow of your talk is you
  • Preview your talk by giving it to a smaller group; if you’re giving a talk to the whole dev team, then preview the talk to 2 or 3 people on that team first
  • If you’re lucky enough to know the personalities in your audience, be sure to practice dealing with those personalities.  If you’re giving a dev talk at work; then you know your audience.

Even though I know I bombed the talk, I find it very hard to look at this as a failure.  If Shipping Things is the goal, then this talk was a success.  It’s not easy (even though I’ve done it dozens of times) to give a talk to a group of people, and every time I feel as scared as I did the first time.

Yea, I failed on the outcome, but I didn’t fail from the standpoint of getting up there and doing it — and that’s what matters.  I’ll get better with each talk; I just have to keep getting up there and doing it.

Let’s be Purpose Driven

One thing I’ve struggled with as a developer is working on projects I believe in, with people I believe in, who share a mission I believe in.

It hasn’t happened often enough.

I worked in companies where I liked the people, or thought the work was technically challenging, but the company didn’t fulfill me.  I felt empty.

These business all had something in common: They were chasing the bottom line instead of a higher purpose.  It wasn’t until I joined the Fool that I was able to put words to those feelings.

When I worked at the Fool, Tom Gardner (the CEO) would always remind us what our purpose was: To Help the World Invest. Better. This wasn’t to make money (although that does keep business afloat), it was to show and help people raise their standard of living. Of all the ways to raise your standard of living, saving and investing are probably the best (playing the lottery: Worst). The Fool advocates a ‘Buy and Hold’ philosophy, but more than that, they advocate investing in companies you believe in. He talks about his views more in this interview with the Elephant Journal.

John Mackey calls the approach companies like the Fool are following Conscious Capitalism, and has even dedicated his company, Whole Foods, to that purpose (he also sits on the board of The Motley Fool).

Conscious Capitalism has four principles:

  • Higher Purpose: Don’t exist just to make money, but to further the world in some way. This may mean making decisions that cause you to lose money just because they don’t meet with your purpose.
  • Stakeholder Orientation: Your business should be orientated to your stakeholders: The people that work with you, for you, give you money to run this business, and the people who you’ve asked to help shape your business. This means that you should treat your employees just as well as you treat your customers and investors. Their success is your success.
  • Conscious Leadership: It’s not traditionally considered a virtue to show your weaknesses; but you should. You should be honest in your dealings; in what you know and what you don’t know. Focus on how to enrich the whole team to accomplish the business’s purpose.
  • Conscious Culture: Your culture is the sum of all of your interactions, processes, and outcomes in your company. With a good culture, you can conquer just about any problem. With a mediocre culture, you’re not competitive with companies that have a good culture.

More and more, we’re seeing companies that aren’t just there to make money, but to have a purpose. These companies have the opportunity not only to make money, but to make the world a better place. We need that. As the interview points out, millennials are looking for that in a company. If you had asked me what I wanted four years ago, I would have told you I wanted to find a home. Four years later, I understand what I want that home to look like.

  • I should be proud of everything my company does. If I’m not, that means bringing up the subject and talking about the issues and working to resolve them.
  • My company should be purpose driven. It has to be a purpose I believe in.
  • The internal culture should support fulfilling that purpose,
  • I should be proud to tell people where I work and what we do.
  • Diversity of thought and deed should be paramount to the the company. This means hiring a diverse group of people; not to match some sort of idea of equality (although that has its own benefits), but because diversity of thought and action makes everything better.
  • The second part to diversity is being able to speak up; if the culture doesn’t support speaking up without fear of retaliation, it’s not a diverse culture.

Silicon Valley tries* to pay more than lip service to this ideal, but given that Silicon Valley has a myopic culture, it’s hard to see if they’ll have any real effect in this area (If you’re looking for more evidence of Silicon Valley’s culture problems, spend a day reading Model View Culture).  Another reason Silicon Valley won’t produce these sorts of companies is that on the whole, SV is worried about Exits, not about building a sustainable, purpose-driven business. That isn’t to say a Silicon Valley VC driven business can’t also be a purpose-driven business, just that it’s going to be hard if the VC aren’t on the same page with the founders about the type of business they want.

That means that these purpose-driven companies that developers want to be a part of are going to emerge from places other than Silicon Valley.

I’m excited about the rise of purpose-driven companies. For my part; I’m going to continue to pursue opportunities to be purpose-driven; and for the future of technology, I hope you’ll do the same.

 

 


*While there are lots of companies that believe in diversity and being purpose-driven (like Mozilla); the good companies don’t get nearly the press the bad companies do (Uber, for instance).  Like it or not, the companies that do bad things (again, Uber) are having a bad effect on the perception of every company in Silicon Valley. It may not be fair; but this is my perception as an outsider.

*

What should a Programmer be able to do in an hour?

There have always been different approaches to hiring in tech.

Most famously, How would you move Mount Fiji type questions. In my first professional interview with a really large bank that you know about, I was asked a similar question by other developers who worked on a trading room floor. The interview consisted of various brain teasers and rapid fire questions designed to put a candidate through what it’d be like on a trading floor.

Having just gotten out of the Army during wartime, this seemed more silly than useful to me. Luckily for me, I did not get the job, and a little over a year later, the finance sector crashed and all of those traders/programmers were looking for other work.

Since then, almost 10 years ago now, I’ve been hired and have done my share of hiring. I’ve dealt with interviewers that wanted me to take a personality exam, an online coding quiz, writing a few small web applications (reproducing search, creating a site that showed the weather, and implementing UI features with various frameworks), and even more of those brain teasers everyone loves to hate. I’ve even done practical coding, coding with unit tests, and even a few interviews that focused especially on writing database queries. My success rate isn’t 100% — I’ve failed as many as I’ve passed. But each time, the interview showed me what the company was looking for (or rather, what they thought they were looking for).

In the case of the Trading Floor exam, they were trying to simulate actual live conditions. Why the software would be so crappy that it would fail during trading is beyond me, but apparently that happens enough to hire for it.

In other cases, they just wanted to see if I could code — there are enough programmers (!) out there that can’t that interviewers have to screen candidates somehow.

I know this because I used Fizzbuzz and determining if a string was a palindrome to weed out candidates. I’m somewhat embarrassed to say that even after letting some candidates work on either of these problems for 30 minutes, they couldn’t produce working code.

So I changed tactics; and started to ask candidates to show me some code they were proud of. One candidate produced an entire ream of paper worth of printed out code. I’m not sure what it did; all I can remember is watching the candidate pull out that ream and go “Here.”

Luckily some time after that I was able to interview at The Motley Fool; and their interview really reflected the sort of culture fit they were looking for.

The interview started out with an online quiz taken before the in-person interview was scheduled; essentially asking about parts of the C# language and .NET framework to weed out those that didn’t know it well. It didn’t just include trivia (is a String a value or reference type?), it included parts that would bite you if you had actually used the language or the .NET framework in production.

The in person interview was a little more chaotic — there was an hour of onsite coding in Notepad++; and then four hours of interviews with various members of the team. One person asked me how I’d model a rubik’s cube in code. That was an interesting hour (and by far the scariest).

At the end of it, however, I understood exactly what the Fool wanted; they wanted someone who was smart, could get things done, and (more than anything else) was a culture fit. So much so that they’d have you sacrifice lunch and spend 6 hours interviewing (I don’t think they hire that way any more, but if you are ever interviewing for the Fool, eat a large breakfast).

Each company I have interviewed at showed a bit of what they were looking for during the interview, and the interview itself became a way to understand whether the company was a good fit.

A more recent trend has been to ask candidates to do *X* in an hour. *X* could be anything, a small application; designing an architecture scheme for a system, whatever. That *X* is important.

Let’s say (hypothetically, of course) you’re looking for a developer and you want them to do something in an hour. What should that thing be?

Should it be some general programming problem where you’ll see what they can do (like implementing a calculator using TDD?)

Or should it be something more proscriptive — like implementing something in a specific framework using specific tools?

The danger with the latter approach is that if you’re too proscriptive, you may actually measure something other than you intend to. Even if my stack is in C#, .NET, Bootstrap, and ASP.NET Webforms (incidentally, that’s the exact system I’m working with now), should I ask a developer to implement Bootstrap for *X*? More over, should I ask them to use specific plugins for the bootstrap framework?

No. If I’m measuring whether a developer can code; I should gear the hour towards problems that can determine if they can write code.

If I’m measuring whether a developer can use Framework X efficiently, then I should interview for that — but be aware that it’s not a fair test of whether or not they’re a good programmer.

So this leaves me with a question for you: What should a programmer be able to do in an hour? Should they be able to take a foreign plugin from a framework they may or may not have intimate knowledge of and implement a trivial/non-trivial feature in it inside an hour?

It’s a question I can’t answer. Some days I can spend an hour on a problem and resolve it, some days I can’t — it just depends on the nature of the problem and its documentation.

With the proliferation of frameworks and problems we attempt to solve, I have a hard time understanding where programming begins and implementing a specific framework ends. Should I hire for the former? Or the latter? Should I hire based on whether a programmer can solve an arbitrary problem in an hour? Are there really times where you only have an hour to solve a problem?

Unsatisfyingly, I have no answers here. I don’t know what a programmer should or shouldn’t be able to do in an hour. Sometimes I feel like I’m a great programmer, other times I’ve wanted to quit programming in my stack completely because of some silly issue.

So I ask you: What do you think a programmer should be able to do in an hour?

Be careful about Takeaways

Late last week, a coworker sent me a blog post on Clustered Indexes and Heaps; titled: Unreasonable Defaults: Primary Key as the Clustering Key.  It’s a blog post that, well.. go ahead and read it, and come back. I’ll wait.

What did you take away from that blog post?  What really jumped out at you?

For the first three reads (yes, I read it more than three times), here’s what jumped out:

  • Primary Keys are bad at being clustering keys because the data that we need is hardly ever sequential by ID (I assume doubly so if the primary key is a GUID).
  • It’s better to make the clustering key something that actually puts the data that would most likely be accessed together on the same page.
  • Heaps are better than having a Clustered Index if you don’t have a covering (Non Clustered) index.

Since I went to the crash course on SQL Server Performance Troubleshooting last May (H/T to the Brent Ozar Unlimited folks), I know a lot more than I did before about SQL Server (I didn’t know very much before, and the 3 day intensive class traded money for time — really worth it), so I’ve got an understanding of what is this blog post is really about — but it clashed with what I know about SQL Server.

The post didn’t really spell out those things that it probably should have, and that worried me:

  • A covering Non Clustered Index is usually the best approach to get data quickly.  The smaller this index (e.g., less columns in index, or smaller data types in the index), the better performance you’ll see.  If you’re retrieving lots of columns with large or unknown sizes (nvarchar(max)) and you’re filtering by your Clustering Key alone, a Clustered Index is going to be fast.
  • Heaps are bad, MMkay?  Well, that’s not entirely accurate.  They’re great when you just need data any old place and don’t really care about retrieval in an orderly (or fast) fashion.
  • SELECT * is bad because it doesn’t allow you to use your beautiful non-clustered index alone; it forces use of the Clustered Index (if one exists) and does not allow for the fastest possible data retrieval (Unless you really need everything, in which case, does your App look like this?)

It mentioned these things, to be sure (well, the first and third bullet), but it didn’t make them the ‘bold face type’ it should have; and didn’t explain it in a way that a non DBA would get the same understanding from it as someone who spends their days tuning SQL.

The takeaway is this: Whenever you’re reading a blog post on performance, context matters.  Authors will assume knowledge you may or may not have.  They will assume context that may not fit your business needs.  The most important takeaway you can have is never move on the basis of a demo alone.

Note: the Brent Ozar Unlimited team is giving the SQL Server Performance Troubleshooting class again this year. I highly recommend it. It doesn’t matter if you’re a fifth year DBA or a Developer trying to level up your SQL Server game — it’s more than worth your time. If you have a conference budget this year, forget a conference — pick a training class and do it.

Full Disclosure: Brent Ozar took a look over this post to make sure I wasn’t talking out of my ass. I thank him for that. I endorsed their class before he agreed to fact-check this post for me.