Archive

Posts Tagged ‘Software development’

Ten Commandments of Egoless Programming

April 27th, 2011 No comments

From Tech Republic

  1. Understand and accept that you will make mistakes. The point is to find them early, before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry, so we can, and should, learn, laugh, and move on.
  2. You are not your code. Remember that the entire point of a review is to find problems, and problems will be found. Don’t take it personally when one is uncovered.
  3. No matter how much "karate" you know, someone else will always know more. Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it’s not needed.
  4. Don’t rewrite code without consultation. There’s a fine line between "fixing code" and "rewriting code." Know the difference, and pursue stylistic changes within the framework of a code review, not as a lone enforcer.
  5. Treat people who know less than you with respect, deference, and patience. Non-technical people who deal with developers on a regular basis almost universally hold the opinion that we are prima donnas at best and crybabies at worst. Don’t reinforce this stereotype with anger and impatience.
  6. The only constant in the world is change.  Be open to it and accept it with a smile. Look at each change to your requirements, platform, or tool as a new challenge, not as some serious inconvenience to be fought.
  7. The only true authority stems from knowledge, not from position. Knowledge engenders authority, and authority engenders respect—so if you want respect in an egoless environment, cultivate knowledge.
  8. Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you do turn out to be right, don’t take revenge or say, "I told you so" more than a few times at most, and don’t make your dearly departed idea a martyr or rallying cry.
  9. Don’t be "the guy in the room." Don’t be the guy coding in the dark office emerging only to buy cola. The guy in the room is out of touch, out of sight, and out of control and has no place in an open, collaborative environment.
  10.   Critique code instead of people—be kind to the coder, not to the code. As much as possible, make all of your comments positive and oriented to improving the code. Relate comments to local standards, program specs, increased performance, etc.

I know I have failed to live up to these ideals.  I fail at #10 quite regularly.  Being astoundingly good at NOT being a people-person, it’s almost second nature. 

After thinking about this for a little while, I guess I’m not good at being nice to people who violate rules #1 – #3.  If you think your code is perfect then we are going to have problems.  No one’s code is perfect.  Not mine.  Not yours.  Get over it.

You have to understand, there are no junior programmers in my world (current contract).  We’re all senior.  We’re all expected to kick ass and take names.  If you can’t live up to that ideal, then you shouldn’t be here.  That’s the nature of the gig.  I do my level best to live up to that ideal.  I expect the same from my peers (especially when they are on my payroll).  If I see a logic flaw or gratuitous code when a one-liner would work, I want the code fixed.  Period. 

Delivering quality matters.  Set your ego aside and get to work.  I’ll do the same.  Maybe we can create something really cool in the process.

 

Footnote:

Yes.  I know I’m an insufferable bastard when it comes to certain things.  I’m not going to change just to suit others.  I can’t make myself not care about the few things that I actually care about.  Code happens to be one of those things. 

Best ever…

November 10th, 2009 No comments

Compiling

How true it is…

Age and 3D glasses or You too can have stereoscopic glasses..

October 21st, 2009 No comments

I just realized something. My new glasses give 2D images a 3D quality.

One downside of my constant computer use is the damage it has done to my eyes. The first time I had problems with my eyes and vision induced headaches was back in college. I was leading a team of drafters drawing floor plans for grocery store end caps. It was a subcontracting gig. We’d get large piles of hand done drawings, done on grid paper. The team would convert the drawings into AutoCAD drawings. My job was to hand-out the daily work items and validate the results. So I spent hours hunched over drawings, comparing line drawings printed from AutoCAD against the hand-drawn field drawings. My eyes suffered. Read more…

Snoop

October 1st, 2009 No comments

I’ve been up to my eye-balls in WPF development lately. It is a bit different from ASP.Net and WinForm development. I found a utility today that helps me understand exactly what is going on with the UI: Snoop. Snoop can “see” all WPF apps running. You can examine the logical tree and even map UI elements to specific items on the UI surface. (Ctrl + Shift + Mouse-Over the UI element)

Snoop:
http://blois.us/Snoop/

Enjoy,

Good Enough?

September 10th, 2009 No comments

Good Enough

Hi. My name is <withheld> and I have a coding problem. I’m an obsessive/compulsive programmer. For every feature request, I can think of 5, No 10! (so-called) improvements.

You say you need a knife to cut a tomato. I think Swiss Army knife with a saw, scissors, tweezers, multiple screwdrivers, leather reamer (yes I’ve actually used it for its intended purpose), can/bottle openers (including wine) and oh yeah a couple blade that could cut up your boring tomato.

Am I thinking ahead?
Am I simply showing off?
Am I getting my nerd on?
Am I ignoring the needs of my users so I can mentally masturbate?

Is there any real difference in any of these questions?

Let the war in my head begin…
Yes. I mean, No! I’d never do that. Well, maybe I would. But it’s cool.

So how does it end?

How do I find the disciple to develop a widget that is good enough without anything extra?

Read more…

To fail, is to suceed.

August 21st, 2009 1 comment

From coding horror: The Only Truly Failed Project

Been there. Done that.

I guess my approach is to not even see failures as such. Failure is an opportunity learn a way to not solve a given problem. 10 failures? Nope. It’s learning 10 ways to do something that doesn’t fix your problem.

Software development is a process that requires continual forward movement. I try to learn something new with each and every line of code that I write, even the bad lines and expressions of much larger bad ideas. I don’t WANT to write bad code, but it happens. And sometimes it takes months before I realize the mistake. It’s all a learning process. And when I do “get it right” the first time, I’m unhappy, paranoid, and unsettled. You never want a successful first test, per TDD. The first pass through should result in a failure condition then when you have a successful test you have confidence that the issue has truly been resolved.

What was that cheese-ball line from Galaxy Quest? “Never give up. Never surrender.”

Dropped the hammer on Zen

July 30th, 2009 No comments

After about a week of playing around with Zen, I finally dropped the hammer and pulled out my credit card. Somewhere in all of this, I learned that having a tool like Zen really simplifies my life. I know that sounds cheesy but it’s true. I can stop trying to remember everything that is going on. If the woman has an infrastructure request like “I need a new mouse.” She can add it to the infrastructure project in Zen. The next time I log into Zen, I’ll see the new request and respond accordingly. The same for bugs. And when she comes up with a new feature, it too can be added to the list. If I think of a new feature or want to force time to refactor my codebase, I just add it to the mix. And when I sit down to start working on stuff, the priorities are defined. I know what she cares about the most because it is on the top of the screen. Simple. Well worth the $9/month that I’m paying at the moment. That may climb as my project list grows, but 3 is a good place to start.

Zen & Sliders

July 22nd, 2009 No comments

Recently, I got turned on to Zen by Nate Kohari. Having used a Kanban-style feature management system (poorly). I can see a real need for what Nate has written. I’ve signed up for the free demo to see if I could really use it. If it does work out for me, I know the $9/month would fit into my budgets. Just allowing the product manager (the significate other) to update the item queue from anywhere would be worth the subscription. 90% of her new feature requests come about during the day, when she’s actually using the application (we are only using one app/Kanban to see if this style works for both of us). As it is, we have to gather and stare at the board in our home office. Remote, anytime updates… Nice.


The frame sliders showed up last night. After reading the instructions, they were a breeze to install. There was a warning about cross threading so I took my time. The only “difficulty” was torquing down the lower slider. The slider assembly replaces the stock lower engine mount with a new rod that fits through the engine case. So far, so good? Well, my arms aren’t long enough to tighten a nut on one side of the bike while holding a similar nut on the other side of the bike. I hadn’t thought about this issue… After waiting for the woman to return from walking the dogs, the problem was solved.

Bonus: She learned how to use a torque wrench and that the Craftsman 1/2″ torque wrench I bought a couple months ago does have a real purpose.

Hanselman Yaks w/ Uncle Bob

July 21st, 2009 No comments

I’ve been listing to the Uncle Bob (Robert Martin) podcasts on Scott Hanselman’s site, http://www.hanselminutes.com/HanselMinutes.com.

Return of…:
http://www.hanselminutes.com/default.aspx?showID=189

SOLID
http://www.hanselminutes.com/default.aspx?showID=163

SOLID: This time with feeling.
http://www.hanselminutes.com/default.aspx?showID=168

Problems with ClickOnce Deployments

June 21st, 2009 No comments

I’ve been fighting problems with my ClickOnce deployment. I’ve got an app that has 23 successful updates. Number 24 didn’t go as well. I started making major changes almost a month ago and I finished up a couple of the last minor fixes yesterday. The deployment uploaded fine, but it would not install on either my XP development machine or my Vista test platform. In the end, it was a couple simple changes to the app.manifest file. A some point, I had played with the ClickOnce settings. This messing about added extra info to the XML file and reverting back to “Full Trust” didn’t remove these edits.

Here’s the mainfest before I found a solution.

<?xml version="1.0" encoding="utf-8"?>
<asmv1 :assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyidentity version="1.0.0.0" name="MyApplication.app" />
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedexecutionlevel level="requireAdministrator" uiAccess="false" />
        <requestedexecutionlevel level="highestAvailable" uiAccess="false" />

            If you want to utilize File and Registry Virtualization for backward
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedexecutionlevel level="asInvoker" uiAccess="false" />
      </requestedprivileges>
      <applicationrequestminimum>
        <defaultassemblyrequest permissionSetReference="Custom" />
        <permissionset class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="none">
          <ipermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.StorePermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Diagnostics.EventLogPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
          <ipermission class="System.Security.Permissions.DataProtectionPermission, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" version="1" Unrestricted="true" />
        </permissionset>
      </applicationrequestminimum>
    </security>
  </trustinfo>
</asmv1>

So here’s the complete working manifest file.

< ?xml version="1.0" encoding="utf-8"?>
<asmv1 :assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyidentity version="1.0.0.0" name="MyApplication.app" />
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedexecutionlevel level="requireAdministrator" uiAccess="false" />
        <requestedexecutionlevel level="highestAvailable" uiAccess="false" />

            If you want to utilize File and Registry Virtualization for backward
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedexecutionlevel level="asInvoker" uiAccess="false" />
      </requestedprivileges>
    </security>
  </trustinfo>
</asmv1>

02:48

May 10th, 2009 No comments

Obviously, I’m not sleeping again. This always comes in spells. Today was a busy day. I worked on the mower, setup/assembled a fan and water cooler at the office, cleaned the gutters, hung some art, patched a bare spot in the yard, sprayed all of the weeds, blah, blah, blah… I should be tired. I didn’t nap today but I did consume 5 glasses of Pepsi. That’s probably why I’m still awake. Read more…

It’s raining in Portland!

April 17th, 2009 No comments

Umm. Yea. It’s spring. What did you expect?

New Music

Paramore: The Final Riot!
Pearl Jam: Ten [Reissue]
Queensryche: American Soldier



Queensryche are playing at the Roseland this weekend. Hopefully the tickets we ordered and received will automagically reappear before 21:00 on Saturday evening. Hopefully…

I’m researching MVC Design patterns at work. I’ve got working code buried in a Excel Ribbon. I need to migrate that code out of the Ribbon in to a new WinForm. It sounds like a simple cut-n-paste. Maybe.
Read more…

…on the run.

April 15th, 2009 No comments

UltraGridGroup group1 = band.Groups.Add();

During a code review this morning, I had one of those crazy moments. I was looking through this rather large block of code written by our team lead, Rob. I was doing the review because I wrote the formatting engine for the Excel UI that we currently use. The team lead is working to port all of that functionality over to a WinForms desktop app. Lee, who sits on the other side of Rob from me, was half-listening working on his own stuff.

So… I’m following along as Rob discusses all of his changes and I see the line I wrote above. On pure impulse, I casually belt out, “Band on the run…” Slightly out of key and with zero context… and everyone in the room starts laughing. A lot. Lee initially grimaced because I had scored a direct hit with the “Can’t get that tune out of my head” assault then he started laughing. Rob was trying to keep a straight face while he continued his monologue. It probably didn’t help that I was humming the melody. Every time Rob would try to even things out Lee and I would look at each other and start cracking up again. This lasted a good 10 minutes.

Shiny Toy Guns is play on Pandora at the moment. It was Dokken and Fleetwood Mac a while ago with some W.A.S.P. throw in. Now if I could just find some Paul McCartney and Wings.