Wednesday, September 12, 2012

Nerf guns don't matter


Free soda does not a good company culture make

I'm seeing it more and more--job descriptions with perks about nerf gunsand happy hour, or new grads who joined a startup and are bragging aboutping pong tables and free coke. This is apparently something that people see as a fun culture, a sign that this is a place you'd enjoy working at and has people you'd enjoy working with.
This stuff doesn't matter.

A fun distraction is still a distraction

This stuff is all stuff you do when you're not working. When you have a few minutes to spare here and there and are bored and want to have fun. It's recreation. It's a distraction from work. It's not going to make you more productive, or make you happier with the work you have to do, or the people you have to work with.
In fact, it might make you less happy with those things. Suddenly the work you have to do, which could and should be fun and challenging if you're in the right field, is just a necessary evil to spend a few hours on before the next game of ping pong. You're not at work to play around, you're at work to get crap done, but if you spend long enough in an environment like this, then the work becomes the distraction and the nerf guns and happy hour become the thing you look forward to and are excited about.
This will not help your productivity and certainly won't make doing actual work any more enjoyable.

Keeping work and play separate

Lots of people seem to love bragging about working hard and playing hard, and it's a pretty common attitude that working with people you can go play laser tag with and be friends with is a big win. I'm going to disagree.
I'd like for people at work to judge me based on my work, not on how good I am at pool or how well I can handle my alcohol. I'd rather they didn't know any of those things, because it just distracts from what you're there to do. I don't want to have to deal with the drunken argument last Friday night at the bar when I'm working Monday morning. I don't want someone I work with to be bummed out with me because I didn't want to hang out on Saturday since I have a family.
Trying to enforce a culture where people are all friends with each other and go out drinking together and watch movies together does not make anyone any happier when they're working, it just creates more opportunities for drama and biases.

What really matters

It's easy to throw some toys into the office and call it your culture. Actually creating a good, positive, productive culture is much, much harder than that.
Do your employees feel heard when they have suggestions or questions? Do your managers do a good job of keeping track of budgets and focus without micromanaging and getting on everyone's nerves? Do people have a solid method of critiquing each others work and providing helpful feedback without hurting any feelings? Does everyone feel challenged and interested in the work they're doing?
These are the things that produce a good culture, and these are the things to strive for, and these are things that you can't buy at Target or brag about on job descriptions, but they're the things that keep people around and working hard and happy.

Coding skill vs. employee skill


You can get far without being a great coder

At the extremely basic level, there are basically two good qualities that each programmer should strive for: programming skill and employee skill.
Programming skill is basically the ability to write good, solid, performant, maintainable, and all-the-other-desireable-code-adjectives code. This is what coders tend to spend their time harping on and debating about and reading about.
Employee skill is the ability to be a good employee and coworker. This means being responsive, being able to communicate well, hitting deadlines, being open to feedback, being able to explain complex things clearly, stuff like that.

An extreme example

Picture two people:
Rodrigo is an MIT graduate who writes compilers in his spare time. He is a core contributor to Haskell and wrote a few very well known Python packages. He can generally write very solid code that's readable and handles edge cases beautifully. However, he takes days to answer emails, he rarely picks up his phone, he doesn't seem to have much of an understanding of the importance of deadlines, he does things his own way, and you can't get a clear thought out of him without rambling incoherence surrounding it.
Gabriella isn't a very good coder. Her code is obviously written by an amateur. She takes 30 lines to write what should be written in 15 or 20, she introduces bugs that QA has to spend their time on, and she doesn't really grasp the concept of writing code that performs well--"if it works, it works!". However, she's incredibly responsive--she answers emails within minutes and never misses a call, she is a great communicator and is able to explain complex technical issues quite clearly to clients, she has never missed a deadline, she is constantly looking for feedback to improve her work, and she's an easy person to talk to.
So really think about it. Which would you really rather work with on a day to day basis?

What really matters?

In my experience, a programmer would rather work with Rodrigo, and a manager would rather work with Gabriella.
This makes some sense--after all, programmers are the ones who would have to deal with crappy code, and managers are the ones who would have to deal with missed deadlines and crappy team communication, so we all want the person who causes us the least amount of pain.
However, the point is that managers are the people you need to impress to get jobs and promotions and raises and pats on the back, so in this scenario, Gabriella comes out way ahead. And I've seen it happen many times--programmers who are great employees but not great coders move to the top while the great coders but poor communicators stay on the bottom.
Despite what we as programmers like to think, coding skill is not what really matters if you want to find success in a job, or at least in many jobs. Being a good employee is at least as important, sometimes more.

Friday, August 17, 2012

How to Deal with Team Member Personalities



disruptive-behavior
It only takes one difficult personality on a team to make the team unproductive and the team environment unpleasant for everyone else. There are ways to deal with these team members and hopefully get them back to being a constructive member of the team.
With proper guidance and coaching these bad apples can be shined up into good team members. There are always a few who do not turn around and for those there is always progressive discipline.

The Overly Talkative Team Member

This is usually a person who is one of four types.
  1. An “eager beaver”
  2. A show-off
  3. Very knowledgeable and is anxious to show it off
  4. Someone who does not recognize the responses of others in order to check their own behavior, (they can’t take the cue they are annoying).
How to Deal With Them
At times humor can be used to discourage people from dominating a discussion. be sure when the person stops talking you direct the conversation to another person. If the person’s behavior can’t be changed subtly, one member of the group should speak to the person privately and explain that while his/her enthusiasm is appreciated, it’s only fair to the whole group that every person gets an equal amount of air time.

The Quiet Team Member

This person my just be shy, bored, tired or unsure of themselves. Whatever the reason you may have someone who can contribute, but is not.
How to Deal With Them
Make a special effort to draw this person out: ask for their opinion on something; ask them something about themselves; tell the person you appreciate their participation. Slowing drawing them out into the open like this can unleash their potential contributions.

The Arguing Team Member

This is a person who is critical of ideas, the team and other team members. For whatever reason they disrupt the positive flow by arguing points. They may think they are a know-it-all who only thinks their way is the right way. They may feel under appreciated so they put down everyone else.
How to Deal With Them
If the person is critical of ideas, use that response to test the work the team is doing to see if this person is actually providing good feedback. If they are critical of others, tell them the effect that is having on both the team or individual team members. Be explicit about the fact that their behavior is harmful to the overall goals of the team.

The Complaining Team Member

This type of team member seems to have a pet peeve about everything. They may even complain just for the sake of complaining. Whatever deeply seated the roots of their behavior it is disruptive and leads to an unproductive team.
How to Deal With Them
Listen to the person’s complaint and if it is legitimate, set aside time to solve the problem. Point out that part of their work is to learn how to solve problems and that complaining does not offer constructive comment towards solving the problem. Ask the person to join with you to improve whatever is disturbing them.

Take Away

For a team to properly function as a team morale and professionalism are important. Your team does not have to be a bunch of choir boys, but they need to be productive members of the team. It only takes one bad personality type to disrupt the team chemistry.
Dealing with these four types is often as simple as sitting down and talking with them. They may not be aware that their behavior is an issue. You need to confront these people right away before it create a larger issue. Follow-up with coaching to be sure they stay on track.

5 Ways to Stay Positive in Negative Situations


smileyfaceWe all face negative situations in our life. Someone may say something bad about you, or something you’ve worked hard on is rejected.
During these situations it is difficult to keep a positive attitude, but we are judged by our communications so staying positive is the professional way to react to an adverse situations.
Your natural inclination is to release your inner Hulk and bash. This type of negative reaction will only make  the circumstances worse with the those who caused it and you will end up filled with disappointment and anger.
You can beat negative situations by maintaining a positive attitude. The attitude you take when faced with a negative situation is a choice. In the business world maintaining a positive attitude in negative circumstances is a valuable skill to learn. It will keep your professional reputation intact and show you can handle any negative situation.

5 Rules to Help You Stay Positive

The way to beat a negative situation is to maintain a positive attitude. It is not easy and requires discipline on your part, but you can do it. At first you may not succeed every time so consider it a training program. Eventually you will learn to control your reactions out of habit.

Rule # 1 – Control Your Response

The golden rule of staying positive in a negative situation is to control your response. Take a deep breath, count to 10, do whatever it takes to remove yourself from the negativity. Wait until you calm down and have thought clearly about your response.
If you respond out of emotion you will only make things worse. Remember Thumper’s rule. “If you can’t say anything nice, then don’t say anything at all.” This is good advice when you find yourself in a negative situation.
Negative situations are compounded when they cause you stress. Learn how to deal with stress to eliminate the extra negativity.

Rule # 2 – Learn From Negative Situations

Look at a negative situation or event as an opportunity to learn and grow personally. Albert Einstein said “In the middle of difficulty lies opportunity.” Don’t channel your energy into a negative reaction, but into something positive that will make the situation better, not worse.
If you do react in a negatively, note it and the circumstances that caused it. Learn from it by identifying the triggers that caused your reaction so you can watch for them in the future. Train yourself so you control the situation instead of allowing the situation to control your actions.

Rule # 3 – If You Make a Mistake, Admit it

We are human so we all make mistakes from time to time. When you do you need to step up and admit it. One thing I told my boss a long time ago was that if I ever made a mistake he would hear it from me first. If you make a mistake that leads to a negative situation, admit to it, learn from it and move on.

Rule # 4 – Maintain a Positive View

Don’t allow your opinion of someone to become jaded by a negative situation. Keep a positive view about a person or a situation and don’t jump to conclusions. Be proactive in dealing with adverse circumstances, not reactive. If the negativity is true see rule # 3. If not then affirm what you already know about yourself and your work.
When you are working under pressure it is hard to keep a positive attitude, but for a manager often pressure is part of the job. Learning how to work under pressure will help you overcome a source of negative situations.

Rule # 5 – Accentuate The Positive.

Remember that scene in The Jungle Book where Baloo breaks into a song about staying positive?
You’ve got to accentuate the positive
Eliminate the negative
And latch on to the affirmative
Don’t mess with Mister In-Between
Words of wisdom from a dancing bear.
  • Emphasize your positive attitude by your actions and in your words.
  • Eliminate any negative thoughts generated from a negative situation. Nothing good is gained from a negative reaction.
  • Affirm the positive truths you know to be true about yourself and your work.
  • Don’t flip-flop between positive and negative. When negativity comes to you remove yourself from the situation, flip to the positive side and stay there.

Take Away

In the middle of writing this piece I had to put this into practice when the power went out for 2 1/2 hours during a thunderstorm. Rather than get mad because I had lost my writing time, I grabbed a notebook and started writing my to-do list for work tomorrow. A negative reaction to something beyond my control would have wasted time and energy.
Life will continuously present you with negative situations. You choose how you react to them. Rather than waste energy and your reputation by reacting negatively, learn to turn a negative situation into a positive. Don’t let the actions of others or circumstances turn you to the dark side of the workforce.
Keeping a  positive attitude in a negative situation is hard, but if you work at it you will learn to overcome your emotional reactions. Doing so will enhance your professional appearance and show that even under negative circumstances you can maintain control and deal with any issue in a positive way.
As a manager you need to teach these rules to your reports. If you have negativity coming from team members, learn how to deal with team member personalities.

Thursday, August 16, 2012

10 Ways to Boost Work Productivity

12 Things Killer Employees Do Before Noon


12 Things Killer Employees Do Before Noon

The best workers check these things off their to-do lists before lunch

August 8, 2012 RSS Feed Print
Computer programmer
A recent study published in an American Psychological Association journal, Emotion, suggests that early birds are generally happier than night owls. More than 700 respondents, ranging from ages 17 to 79, were surveyed and asked about their emotional state, health, and preferred time of day. Self-professed "morning people" reported feeling happier and healthier than night owls. Researchers hypothesize that one of the reasons could be because society caters to a morning person's schedule.
It's certainly true that the working world does. Working "9-to-5" is more than an expression, but a standard shift for many Americans. It also stands to reason that those who like rising with the sun are also the most productive employees in the office.
Do you want to be more like them? Then take note of the tasks these high-functioning, productive, and more awake employees have completed before lunch:
1. They make a work to-do list the day before. Many swear by having a written to-do list, but not everyone agrees on when you need to compose it. According to Andrew Jensen, a business efficiency consultant with Sozo Firm in Shrewsbury, Pa., the opportune time to plan a day's tasks is the night before. "Some people like to do the to-do schedule in the morning, but then they might have already lost office time writing it out," he says. "It helps to do that to-do schedule the night before. It also will help you sleep better."
2. They get a full night's rest. Speaking of sleeping better ... lack of sleep affects your concentration level, and therefore, your productivity. Whatever your gold standard is for a "good night's rest," strive to meet it every work night. Most health experts advise getting a minimum eight hours of shut-eye each night.
3. They avoid hitting snooze. Petitioning for nine more minutes, then nine more, then another nine is a slippery slope that leads to falling back asleep and falling behind on your morning prep. Ultimately it also leads to lateness. "Anyone can be made into a morning person," Jensen says. "Anyone can make morning their most productive time. It could be that for the entire week, you set your alarm clock a little bit earlier, and you get out of bed on the first alarm. It may be a pain at first, but eventually you'll get to the point where you're getting your seven to eight hours of sleep at night, you're waking up with all your energy, and accomplishing the things around the house you need to before going to the office."
4. They exercise. Schedule your Pilates class for the a.m. instead of after work. "Exercise improves mood and energy levels," Jensen says. Not only that, but "there have been studies done on employees who've exercised before work or during the work day. Those employees have been found to have better time-management skills, and an improved mental sharpness. ... Those same studies found these workers are more patient with their peers."
5. They practice a morning ritual. Jensen also recommends instituting a morning routine aside from your exercise routine. Whether you opt to meditate, read the newspaper, or surf the Web, Jensen says "it's important to have that quiet time with just you."
6. They eat breakfast. Food provides the fuel you'll need to concentrate, and breakfast is particularly important since it recharges you after you've fasted all night. Try munching on something light and healthy in the morning, and avoid processed carbs that could zap your energy.
7. They arrive at the office on time. This one is obvious, right? Getting a full night's rest and keeping your sticky fingers off the snooze button should make No. 7 a cakewalk. If you're not a new employee, then you've already figured out the length of your average commute. Allot a safe amount of time to make it to work on schedule.
8. They check in with their boss and/or employees. We all know the cliche about the whole only being as good as the sum of its parts. In other words, if your closest work associates aren't productive, then neither are you. Good workers set priorities that align with their company's goals, and they're transparent about their progress.


9. They tackle the big projects first. You can dive right into work upon arriving in the office, since you made your to-do list the night before. And Jensen suggests starting with the hardest tasks. "Don't jump into meaningless projects when you're at your mental peak for the day," he says.
10. They avoid morning meetings. If you have any say on meeting times, schedule them in the afternoon. "You should use your prime skills during the prime time of the day. I believe that mornings are the most productive time," Jensen says, also noting that an employer who schedules morning meetings could rob his or her employees of their peak performance, and ultimately cost the company.
The exception to this, he adds, is if your meeting is the most important task of the day. "Sometimes you have to schedule a crucial meeting, or a client meeting, in which case you'd want to plan for a time when employees are at their peak."
11. They allot time for following up on messages. Discern between mindless email/voicemail checking and conducting important business. Jensen's company, Sozo Firm, advises clients that checking their inbox every couple of minutes takes time away from important tasks. Instead, set a schedule to check and respond to email in increments. Consider doing so at the top of each hour, to ensure that clients and colleagues receive prompt responses from you.
12. They take a mid-morning break. Get up and stretch your legs. Or stay seated and indulge in a little Internet surfing. According to Jensen, it's actually good to zone out on Facebook and Twitter or send a personal text message or two. "You should take 10-minute breaks occasionally," he says. "Companies that ban any kind of Facebook [use], texting, or personal calls can find it will be detrimental. Those practices increase employee satisfaction."
Just be sure not to abuse the privilege. "The best employees will respect their employer's time, and the worst-performing employees will find a way to waste time even if the company forbids personal Internet use," Jensen explains.

Wednesday, August 15, 2012

C# developer interview questions and answers


Takeaway: Software development hiring managers and potential interviewees will find these open-ended C# proficiency interview questions and answers useful.

Good help is hard to find. There is an art to finding a developer who fits well in your organization in terms of personality and work ethic; fortunately, it’s more straightforward to determine their technical expertise.
I worked at a couple of places where development managers loved drilling job candidates on syntax while having them write code, and it was clearly a stressful experience for the interviewee. I do not like asking specific syntax questions during interviews since most developers do not know language syntax or class names off the top of their heads.
In terms of the basic interview, I prefer to ask open-ended questions where the candidate can explain concepts and how they would attack problems. Some organizations like to give candidates tests or have them eyeball code snippets to spot problems, and I think those are good evaluation tools.
This is the first installment in our series of programming language-specific development interview questions and answers. Here is a list of questions (and the answers to those questions) that will help you get a feel for a candidate’s proficiency with C#. You can ask follow-up questions based on their replies.

What are namespaces, and how they are used?

Namespaces are used to organize classes within the .NET Framework. They dictate the logical structure of the code. They are analogous to Java packages, with the key difference being Java packages define the physical layout of source files (directory structure) while .NET namespaces do not. However, many developers follow this approach and organize their C# source files in directories that correlate with namespaces. The .NET Framework has namespaces defined for its many classes, such as System.Xml–these are utilized via the using statement. Namespaces are assigned to classes via the namespace keyword.

What is a constructor?

A constructor is a class member executed when an instance of the class is created. The constructor has the same name as the class, and it can be overloaded via different signatures. Constructors are used for initialization chores.

What is the GAC, and where is it located?

The GAC is the Global Assembly Cache. Shared assemblies reside in the GAC; this allows applications to share assemblies instead of having the assembly distributed with each application. Versioning allows multiple assembly versions to exist in the GAC–applications can specify version numbers in the config file. The gacutil command line tool is used to manage the GAC.

Why are strings in C# immutable?

Immutable means string values cannot be changed once they have been created. Any modification to a string value results in a completely new string instance, thus an inefficient use of memory and extraneous garbage collection. The mutable System.Text.StringBuilder class should be used when string values will change.

What is DLL Hell, and how does .NET solve it?

DLL Hell describes the difficulty in managing DLLs on a system; this includes multiple copies of a DLL, different versions, and so forth. When a DLL (or assembly) is loaded in .NET, it is loaded by name, version, and certificate. The assembly contains all of this information via its metadata. The GAC provides the solution, as you can have multiple versions of a DLL side-by-side.

How are methods overloaded?

Methods are overloaded via different signatures (number of parameters and types). Thus, you can overload a method by having different data types, different number of parameters, or a different order of parameters.

How do you prevent a class from being inherited?

The sealed keyword prohibits a class from being inherited.

What is the execution entry point for a C# console application?

The Main method.

How do you initiate a string without escaping each backslash?

You put an @ sign in front of the double-quoted string.
String ex = @"This has a carriage return\r\n"

What is the difference between a struct and a class?

Structs cannot be inherited. Structs are passed by value and not by reference. Structs are stored on the stack not the heap. The result is better performance with Structs.

What is a singleton?

A singleton is a design pattern used when only one instance of an object is created and shared; that is, it only allows one instance of itself to be created. Any attempt to create another instance simply returns a reference to the first one. Singleton classes are created by defining all class constructors as private. In addition, a private static member is created as the same type of the class, along with a public static member that returns an instance of the class. Here is a basic example:
public class SingletonExample {
private static SingletonExample _Instance;
private SingletonExample () { }
public static SingletonExample GetInstance() {
if (_Instance == null)  {
_Instance = new SingletonExample ();
}
return _Instance;
}
}

What is boxing?

Boxing is the process of explicitly converting a value type into a corresponding reference type. Basically, this involves creating a new object on the heap and placing the value there. Reversing the process is just as easy with unboxing, which converts the value in an object reference on the heap into a corresponding value type on the stack. The unboxing process begins by verifying that the recipient value type is equivalent to the boxed type. If the operation is permitted, the value is copied to the stack.