Collaboration at it's finest

Yesterday I got to participate in a very encouraging experience. I got the opportunity to collaborate on a project I've been working on with another talented developer. Being able to collaborate on this particular project allowed me to work with sql, which has been more in my wheelhouse lately and the other developer got to work with .net technologies, which is where he thrives.

What's so special about collaborating with another developer you say? Well, it was more the way the collaboration took place. We sit right next to each other and we both have some fantastic machines to use. After the problem was explained and we both agreed on a course of action, the collaboration began. It was more like a conversation while simultaneously working away on our keyboards. It's hard to explain but it felt more like talking through a problem while sitting on a park bench on a Sunday afternoon than it did writing software in an office building. Both of our software solutions were written well enough that we could make small tweaks very quickly and easily so the conversation didn't stall out and die. After a couple hours, we had come together to produce a pretty darn good solution to the problem.

It was a breath of fresh air in the midst of an otherwise challenging week.

I wanted to share this experience because I know there are many developers that scratch and claw their way through writing software in a silo and it's ultimately an exhausting and unsatisfying experience. To those I would say: writing software can also be a pleasant conversation with a coworker while writing solid code that solves an interesting problem.

Thanks Keith for providing the experience!

Being rocked...

After almost four and half years, I finally escaped from the world of telemarketing.  
 
I'm now at a place that writes really good code, values testing, does routine code reviews, collaborates with each other so continuously and effectively somebody should make a documentary about it!
 
Today alone, I had two really smart and well respected developers go line by line through my code and show me how to make it better.  Seriously, people pay really good money for something like this and they don't get near the quality of feedback as I got!  
 
+1 for me finally getting to a point in my career where i get to work with some of the best of the best in the software world!
 
I've been rocked by the fact that places like this actually exist.  
 
I've been Rocked by the sheer size, complexity and simplicity of our website.  
 
Most importantly I've been ROCKED by the fact that this many smart people check their egos at the door, gel together and look for ways to make software better than how they found it.  This is how to grow a business with tech... hire great people and watch them go!
 
Seriously, bravo.

Quick Bio

 


    Name - Zac Harlan
    How long have you been coming to CRineta? - off and on for a couple years then got serious about two years ago.
    Where do you work? - J&P Cycles
    What do you do there? - Lead Programmer Analyst

    How old were you when you started programming? - I was a "late bloomer" because i didn't "experience" my first program until i was a freshman in college.  ;-)
    What was your first language? -  C/C++... though I really shouldn't say that because I never got that good with it.
    What was the first real program you wrote? - If you consider college "real" i wrote a pretty neat "High Five" card game in Java.  If first means first paid program it was probably a software licensing tool for Deere which managed just in time scripted installs with available licenses.  It was pretty neat because it used LDAP, classic, SMS, etc...  To my knowledge they still use the thing.
    What languages have you used since you started programming? -  C/C++, Java, Perl, Pascal, ASP, C#, VB.NET, VBA, ABC, XYZ, PDQ, etc...
    What was your first professional programming gig? - I got hired on to work with John Deere at their world headquarters as a software installation script tester, which turned into a script writer.  Wise install master, you complete me!
    If you knew then what you know now, would you have started programming? - Yes, in fact i would have had a more focused interest in it.  I went to school to play football so i haphazardly picked out my degree... which led to a degree in computer networking.  Turned out that after college i could only get a job as a mattress salesman or a computer programmer.  I tried out the programming and the rest is history! (Good history that is)
    If there is one thing you learned along the way that you would tell new developers, what would it be? - Take this stuff seriously.  If you have aspirations to be a 9 to 5er, pick a different profession.  To be good, it's got to come from the guy.
    What's the most fun you've ever had ... programming? - This may sound corny but I have the most fun writing applications that make someone else's job easier.  That and one time i wrote fizz buzz in boo while sky diving...  It's kind of a toss up.  

Overload

I enrolled in the EBMA program at the University of Iowa last fall so i've been extremly busy.  I've decided to take a year off from that program so i can focus on getting my work place up to snuff and my skillset up to snuff.  Just wanted to drop a quick note to let you all know i'll be blogging again.

A little more care.

Before I begin any large undertaking I like to do a little research first. I was reading a lot ofJeff Atwood at the time of the bomb going off so the book Code Complete seemed like a logical place to start. This book was a great read and served as a way to clean up my coding practices. For example, I’d routinely write code like this for a lot of my looping processes:
<Code>
            int x = 0;
            for (x = 0; x < 4; x++ )
            {
                //do stuff
            }
</Code>

There are a number of things wrong here but aside from . I knew about the other looping routines but was able to manipulate almost everything I needed to do with the above syntax. I was a hammer and everything looked like a nail. After reading through Code Complete I was faced with a decision. I could either file the knowledge I had just gained from the reading or I could implement it in my daily coding life and see what happened as a result.
Here is a snippet of code I wrote before reading Code Complete:
        public static void TestMethod2()
        {
            var arrArray1 = System.IO.Directory.GetFiles("c:\\somedir\\");
            int x;
       
            for (x = 0; x <= arrArray1.Length - 1; x++) {
                if (arrArray1[x]== "test.txt")
                {
                    //do stuff
                }
               
            }
        }
*full body shiver*
And after
        public static void TestMethod()
        {
            var logFiles = Directory.GetFiles("c:\\somedir\\");
            foreach (var logfile in logFiles)
            {
                if (logfile == "test.txt")
                {
                    //do stuff
                }
            }
        }
*smiling sigh*
I’m sure there is still room for improvement but I wanted to illustrate how much cleaner and more readable the code looks with just a few tweaks to my coding practices. The second snippet doesn’t have to manage any counters and it’s clear that I’m looping through a collection of log file. 
Nothing fancy or complex, just taking a little more care in what I do.  Turning my occupation into my craft if you will ;-)

Getting started on my journey...

When my “desire bomb” to become a better programmer finally started ticking I was also reading the book Q.B.Q.  The basic premise of the book is changing how you look at situations and how to ask the right questions to solve the problem.  My situation was that I wanted to become a “cracker jack” developer but had a load of excuses why I couldn’t learn the tools I needed.  “I don’t have time to write good code”  *tick, tick, tick* or “Even if I write something well, the customer will change their mind and I’ll have to scrap it anyway so what’s the point” *tick, tick, tick* are thoughts that sometimes run through my head.  As factual as these statements may be, it’s my choice if I let them doom me. *tick, tick, tick*
 
BOOM!!!
 
The bomb went off.  I’ve been taught that when you want to do something well,  you find someone else that does it really well, figure out why they do it that way and do what they do.  I am fortunate enough to know a few very talented developers in the Cedar Rapids area, two of which are Tim Barcz and Chris Sutton.  Hanging out with these folks is very humbling in that they have enough knowledge to pick apart my code and patient enough to  help me figure out a better way of solving the problem.
 
For example:
 
I was writing SQL all day and needed to switch into visual studio for a quick second to hack together some zero padding code.  I sent what I had over to Tim and he suggested I just use the tostring() instead

public void Main()
{
    int inputString = 12345;
   
    //what i did
    var OutputStringZac = Strings.Right("000000" + inputString.ToString, 6);
   
    //what Tim suggested
    var OutputStringTim = inputString.ToString("000000");
}



Both return “012345” so they both technically work.
 
What happens if the inputstring happens to increase in length to 9?
 


public void Main()
{
    int inputString = 12345678;
   
    //what i did
    var OutputStringZac = Strings.Right("000000" + inputString.ToString, 6);
   
    //what Tim suggested
    var OutputStringTim = inputString.ToString("000000");
}End Sub

 
Mine returns “345678” and Tim’s returns “12345678” which is more desirable.
 
A trivial example I know but Tim’s method allows for greater extensibility.  If the input string is changed somewhere else in the app to now be an 8 digit integer my way “breaks”.  If I want the whole number to still be returned, I’ll have to change my code (the length in my Right function has to be an 8 now) where as Tim’s code is still fine.  Since that point I’ve changed my string padding routines to include the tostring() function where appropriate.
 
I figured out why he does string padding like the above and  I’m doing what he does.  O yeah, and it only took me ~3 minutes to learn this so the "i don't have time" myth also got busted.
 
Some of the other things that I’ve found to be relatively common among talented developers are:
1.       reading technical books
2.       getting involved in open source projects
3.       reading other peoples code
4.       not thinking they are the smartest person in the room
5.       going to code camps
6.       asking for a code review from a peer
7.       accepting constructive criticism
8.       being a part of a user group
9.       pair programming
 
Next stop, what to read...

Intro to Zac Harlan's blog

July 5th...  This feels like a good day to start my blog with Geekswithblogs.net!  My name is Zac Harlan and I am a software developer with a drive to turn my occupation into my craft.  I started off with .net being a windows forms, control junkie... a drag and drop man... a "see how fast I can make a site that works" man. 

No more. 

I've committed myself to turning my occupation into my craft.  I am moving from a guy that has managed to get paid to write code to a coding craftsman that solves business problems with eloquent solutions.  I want to learn the ins and outs of how to build an application and move beyond just dropping controls on a page.  I feel like there are a lot of people out there that are in my shoes but are not quite sure where to start so hopefully we can go on this journey together! 

I'm going to use this blog to chronicle my successes and failures in taking my programming skills to the next level.  Thanks in advance to all those that have read and will continue to read my ramblings!

Zac