Monday, November 25, 2013

Learning is a Fight

I just recently read a blog post by Ritchie Yip about what your mentally going through as you advance through the belt rankings of Brazilian JiuJitsu. You can read that here. As I was reading it, I realize how accurate this was. After spending over a decade doing some form of martial arts, and making the transition to JiuJitsu it is nice to read that the feelings of being incompetent weren't just my own. The more I read the article, the more I felt like it could be translated over to my time in IT. So here is my attempt to translate it over.

So let's start with a breakdown of levels and what you feel like. This part almost copied verbatim from the BJJ blog

Script Kiddie - Unconscious incompetence. You don't know what you don't know.

Entry Level/Intern - Conscious incompetence - You know what you don't know.

Junior Level - Conscious Competence - You know what to do.

Sr. Level - Unconscious Competence. You do what you know.

The Machine - You’re just conscious.  You’re indifferent to competence or incompetence.  You code or script because you love it. Simple or complex isn't a goal anymore.  Just writing becomes its own reward.

Script Kiddie

A lot of people start with an interest in computers or tech. They will be trying different things to make lines of text show up or the system beep. They will find scripts or snippets of code that they will run. You might know what the result is supposed to be, but you it might not always work out the way you want. You will find a Reddit post or something from 4chan to run. It looks cool, might be malicious, you don't care. You just want to make something work. Then you will expand to more things in different places.

You're going to spend a lot of finding something really cool on the internet, that you are going to try without learning the basics. Things like what is the difference between java and javascript? They are same, right? Or maybe at a deeper level, int vs. float vs. decimal vs. double. They are all numbers right? Just use the biggest one always. This is where a lot of people might decide that developing or working with computers just ins't for them.


Entry Level/Intern

I joined these two together because it just seemed like the place to go. I have seen some smart interns, but I have seen some dumb ones too. At this point you know your limits, and that bar is probably pretty low. You are going to be afraid to try a lot of things without someone looking over your shoulder. A big difference between this stage and the script kiddie is that you are getting a little better at the learning the effect of a script or line of code before putting it in. But you are still going to be surprised or afraid to do anything with out something signed off in triplicate.

There is a good chance that you know what a problem is, you may even know what needs to be done to solve it, but you just can't figure it out by yourself. This is expected, but just know that this is one of the shortest lived levels of knowledge. Once you show that you have made a few good decisions in a row, you might notice that people are just going to give you rights to code or servers. Your scripts and code might go through some sort of code review, it might not. When this happens, you have moved on to Jr.

Jr. Level

At this level a lot is expected of you. You should be writing scripts and code pretty much on your own. At a minimum at this level you are doing bug fixes, minor enhancements, and maybe even finishing up an application or migration on your own. This can be the most nerve racking stage in your career. You know what you need to do to fix a problem, and it is expected that you will just do it. If you don't know how to fix a problem then you research it. Research is key in this stage, because anything you don't know you are going to have to learn. This is something that you should have been doing from day one anyway, just now the problems are much more complex.

Now this will shock a lot of you by my next statement. Just as quick as the entry level to Jr. seemed quick moving from Jr. to Sr. isn't much longer, or will be the longest stage ever. At this stage hand holding is gone, you should know how to fix something or figure it out. Within six months to a year, you can no longer hide behind the title of Jr. You should be a Sr. That being said, there are forever Jr's.

These people seem to never find a way to reach that level where they could survive on their own. They show no desire to get there either; That is the worst part. Everybody knows these people in their place of work. They aren't trusted with complex tasks at all. Either from past experience going wrong, or they pass them off on to others. Then to make matters worse, after a certain amount of time, these people are never going to get better. If you don't make it past this part, your growth will be stunted and you will stay here forever.

Sr. Level

At the Sr. Level you are handed a task and a solution is expected. You will be given little to no guidance on how to do this either. It is almost muscle memory when solving tasks. There is almost no problem that you haven't seen at this point. You are most likely, with time permitting, going back updating legacy code to match your new standard. This is where a lot of Sr.'s might struggle too. It is a humbling experience to go back and look at code that is utter shit only to realize it is your own after damning this person to an inner circle of hell. For most this is the top level, you have came to the end of your journey. You learn new things as they appear to keep yourself entertained, but for the most part you have a whole tool box of skills to solve a problem.

At this level you will be guiding the Entry level/Jr.'s through the dark corners of your code that might be confusing. A teaching role, or at least consulting, will be expected. This will range from hand holding, to just pointing in the right direction. This means you have a great understanding of your code or infrastructure, as this is expected.

The Machine

I couldn't think of a good title for this level so I went with The Machine. This level has a lot of different names; architect, guru, the machine, etc. Everybody knows this person in their office. They seem to know the ins and outs of everything. You can find their fingerprints on a lot of the code and servers. Generally speaking these people are who Sr. level's go to for help. Complex problems are simple to this group, and this group loves solving these things. That is their reward. You show them a new language or server and these people seem to just be able to figure it out in under an hour. Entire applications have been wrote by these individuals.

While Sr's have a toolbox full of tools to get a job done, machines make the tools or hand them out. Whether it be deciding to use Hibernate or entity, puppet or chef, git or Hg, or rolling their own toll that they think is better. Usually they have a not only a broad understanding of something, but deep understanding as well. Like upside down pyramids, rather than T Shaped People.


This isn't a perfect translation, I know. I did what I could do with my knowledge or the all the levels. While the JiuJitsu article was wrote by a black belt, I am not a machine yet. So I am sure there are problems or skills that I might have missed. Comment and add your own examples or updates if there is a glaring omission or mistake.

Monday, November 4, 2013

Anything worth doing is worth overdoing!

The advice of make sure you over do something can be good. When it comes to things like safety features, testing, or verification. But what is a good stopping point for application? I was thinking about this tonight as I was changing a headlight. I am sure that somewhere, somebody thought, "Hey, four bolts and six plastic pop rivets will be great for holding the headlight in place! But we better add two more hidden clips just to be safe." And maybe this person was actually thinking this was a good idea, but I shouldn't have to remove 75% of my front end to change a light bulb. They should have just made the back of the light more accessible.

This doesn't just apply to cars either. Let's talk about a project that I have had to help on and a horror story or two. I have always heard the running joke about software being enterprise, hell you can do a quick Google search and find many examples of joke about this. Here, have one! This is the concept of making things over complicated because....reasons! We can discuss the why later, right now let us begin on a story of one of the first "enterprise" applications that I had the fortune of helping write.

Warning! The next paragraph is going to be a long one.

So the first time that I was introduced to this concept was helping with an excel spreadsheet. Yes, even a spreadsheet can be overly complicated. This spreadsheet was used to write contracts for multi MILLION dollar agreements. This spreadsheet had been around for about 15 or so years being updated through the versions of Excel over time. When I got to it the year was 2010, Excel was 2003. Already I am having a bad time. This spreadsheet took a lot of time to learn, it was pretty massive to say the least. The main problem, it didn't need to be, The bulk of the spreadsheet was about 25 columns wide and only 20 rows tall, or so I thought. I began exploring the Macros and found that there were only 2 macros. I thought this would be cake. One macro was to add a new row or column on a button click for more items or a custom field. The second macro was to save. Pretty simple so far. The save button called to run a formula inside of a cell. Let's go look at this cell. This is where dread began to set in, as I realized that I couldn't find the cell. I was looking for R7, the only problem is that my columns went to N...then jumped to BM....fuck. At this point I had no clue what I was about to uncover when I unhid those columns. What was hiding was a monster. A monster that no man could stop as it flew about the room. A monster of such twists and turns one might think it was made of spaghetti. In these columns were all the formulas to calculate payments on these contracts. Each cell was a concatenation of another. Since this was Excell each cell could only hold 256 characters. Not sure if that limit has gone up or not. Anyway, each cell would be calling multiple cells to build out its formula, and each of those cells would do the same. This was how the original developer got around the 256 character limit. By spreading his "code" across 50 columns. This made my small enhancement that should have taken a day or two turn into a week or two. Since I now have to figure out what is all going on in each cell. I ended up just printing out the contents of each of those cells and making a sort of map to figure out what cells talked with each other. I wish I still had my map, but it was taken from me when I left the project. The other developer thought I was a genius for making this map. I thought I was just being punished for kicking a puppy in a past life.

Now if you skipped that last paragraph, just know that code was written in an overly complicated way and I hated my life.

So how does something end up like this? Clearly the original developer knew macros were a thing, but chose not to use them here. I like to think that it started with just a few cells because it was quicker to put it there than write a macro and things got out of hand. I have done that myself and understand how that can quickly become a monster. But at a point you have to refactor. I have even heard some people boast at how complicated their code is and all I can think is, "why are you proud of this?" Seriously, I might be alone on this, but I am rarely impressed by complicated code. You want to impress me, show me how to take that 100 lines of code and drop it to 10. Take that 1000 lines and find a way to get it below 200. Then I am impressed. So why do some people think over complication is a good thing?

I can think of two schools of thought on this, and I am sure there are plenty of other anecdotal reasons for this than mine, but I have two;  And they both seem to revolve around job security. You make things so complicated that nobody else can do your job. This will get you so far. Because all it takes is a new developer, and the idea of completely rebuilding a new application and you're out of a job. Or, the more likely the scenario. A new developer who is coding things simpler, and finishing way ahead of schedule because people are used to your slow ass taking for ever. 

The second is "security", I use quotes because it is only security by obscurity. Which is a good process, as long as it isn't your only process. Some people like the idea that it takes a lot of time for a malicious individual to find their way around your application. At the same time, it will take a new guy just as long to learn the code, if not longer. I say longer not because the malicious individual is smarter, but because this person is motivated to learn the code. Meanwhile, new guy is ready to bail on the project and call the recruiter back by day 2. 

So let's wrangle up this post with some key points and give a half assed TL:DR to balance out the post about over assing something..

  • Don't write complicated code if you don't have to
  • Just because you can do something, doesn't mean you should
  • Don't mistake malice with ignorance, and vice versa
  • Make changing a headlight easier than this!

Sunday, October 20, 2013

Confidence is Key

Confidence is important, almost as important as what you wear. As Tim Freund brought up in his blog, found here, people will judge you based on what you wear. Not only that, people will judge you on you confidence and how you carry yourself through a room. The best suit in the world can't cover up scared and nervous. Also don't tell me that confidence is something that you just can't learn, I used to be scared and nervous all the time. People make great careers teaching people skills in order close deals or pick up women, so the skill can be learned. Like most things, it just takes practice, a lot of practice.

So let's start with why I decided to make this my returning post. I just recently attended a Tech Cocktail at Boulevard Brewery. There are a lot of different people that show up to these events from all different companies. As a bonus when you sign up, it lists your name and your company. I then will go down this list and see if there is a company or person that I have been wanting to meet with, and believe me, people are doing the same about you. You are going to be regarded as a face for your company by saying you are there. If you come in dressed like a slob, I am going to imagine that your company doesn't care about appearance. If you have no confidence to talk to a person up close, even after a few drinks, then I want nothing to do with you, or even worse your company. I must have had two or three people this week who just couldn't talk or carry a conversation about what it is they do or what their company did. And you are trying to sell me your startup? Good luck.

Here are a few things you can do to improve your confidence with others. 

  1. Pick your battles: Are you more confident one on one or one on a group? Pick which is easier for you to open up to, and grow from there. Honestly some people thrive when they talk to 4 or more because they can hide behind others if it gets hairy.
  2. Become a new person: When you are at one of these events, unless you make them a habit, you will most likely not see these people again. Become a new person. Unless you are planning on bringing them back to your office, just pretend you are some one else. Think of it like acting. You get yourself ready to perform in front of these people. A lot of comedians do this because they are shy or nervous, so they make alter egos that are loquacious. This is the process I took, pretty soon the alter ego spread into my every day and now you all have the Curtis you know and love.
  3. And lastly, keep trying! This is the same as dating, or any activity. Failure and not trying are the same thing. And you are going to fail, even I still fail when trying to open up to people, it just happens. But you learn and try again. Over time failing gets easier, only because success comes just as easy. You know that you can just try again and you will succeed.

So there you go. Remember to carry yourself well, dress nice at events(or anywhere you want to look like you are in charge), and have an elevator speech. If you don't know what that is, tune in next week and I will give a run down on that.

Sunday, August 18, 2013

Copy that Floppy

So currently I am in the process of migration of data from one database to another. They are mostly the same so it should be just an export here and an import there...right?

Well let's go over step one of anytime you are going to be migrating anything. Practice locally. If you follow the steps below you can create a working copy of a MS SQL database on your local machine.

The first step is to install SQL server management studio. You can do a Google search for that yourself and get the version you need. In this demo we will be using 2008 R2, old, but that is what we use at work.

It is a basic windows install using a wizard. So if you can't figure this part out, you best stop now. We will be working in the command prompt shortly and I don't want to cause a panic attack.

Alright you installed? Good. The next step is to connect to the database that you need to copy. Find the database and right click on it. Then select the Tasks > Generate Scripts. Now depending on your access you have on the database you might can select all or pick what you need from the check boxes below. I personally select the bottom radio button for "Select specific database objects". From there select Table, Stored Procedures, User-Defined Functions, and users. Yes that is all of the database, yes there is a radio button for select all. For some reason I don't have access to use that button, go figure.

Now select next and you see save to file, save to clipboard, save to query window. Chose save to file, this will be a large file, few hundred MB to a GB depending on the number of rows you will be copying. I'll explain in another step why you must use the file. So make sure the file is named something that you can remember and find it in a minute. I named mine ScriptToCopy.sql

Now here comes the part that I miss every time, part of the reason why I am writing this post is so I don't forget. Click the Advanced button. Most of this will stay as is, but there are a few places we need to update. First is Append to File, make that true. Even though we said to on the last screen, we must do it here as well. Then scroll down to Table/View Options. The field directly above this will be Types of data to script, make sure to select Schema and Data. This way you get your tables and rows. Then below that, you can select your indexes and triggers if you need them. Select OK, then select next, next, and wait for your script to copy.

Alright now that you have your script, it is time to create your local database. Step one is connect to your local database, mine is SQLEXPRESS. You will need to create an empty database locally with the same name as the one that you just copied. So this one was named BlobPostDatabase.

Now here comes the fun part. Open up your command prompt, navigate to the directory where you script is located, and type in the following command.

sqlcmd -S localhost\SQLEXPRESS -i ScriptToCopy.sql

So as you can see, we call the sqlcmd command. -S is the server that your database will be on. So mine is localhost(or you can use your PC name, I suggest localhost)\SQLEXPRESS. -i Stands is the input file command. It tells sqlcmd to run this file.

Now why do I have to do this in the command prompt? Since this file is large, see above for file size, you will run out of memory trying to use the GUI. I Have a machine with 8GB physical and another 8 virtual, so trust me that you will run out. So there you go, you now have a local copy of your database.

Next up will be steps to prepare for a migration. Don't expect this post next week or the following, I am still figuring this out and will be getting help from our DBA on this process. Hopefully I will have some cool tricks to share.

Monday, August 5, 2013

Karma Drives You To Succeed

Every now and again I find some tool that makes life not only simpler, but just better overall.

I know you have seen a million and one adds for free credit reporting. This is another one of those free credit report tools, only this one is actually free and gives great information. If you haven't heard about it yet, you should give creditkarma.com a try.

When you first sign up it asks for some basic information about yourself; name, address, phone number, DOB, last four of you social. Only the last four seemed odd to me. I figured you would need more than that. But then I got the ID verification quiz and it all made sense why they only needed the last four. They were going through a testing service to verify who I was, and that service probably has the rest. Or there is black magic that is unknown to me.

Anyway, on to the cool parts. So it pulls your credit in and list all open accounts that you have attached to your social security number. It found my credit cards, bank accounts, loans, etc. Anything and everything that might be affecting my credit.

It showed me all my open loans which included student loans. Those annoying things that will never go away, trust me they find you. At first I noticed, hey that value is higher than I remember. The second thing I noticed is was that one of these loans had missed a few payments. Mostly because I was unaware that I even had this loan. I thought I had consolidated all of these. So what was this random loan that was dinging my credit? If I wouldn't have signed up I wouldn't have known about this loan.

The next thing is that it gives you tips on how to make your credit look better. Trust me, if I could just put a bow on my score to make it better, I would. Things like your credit to debt ratio. I thought that as long as I used my credit card and payed it off at the end of the month would be fine, well sorta. As long as you are not using more than 30% of your available credit, you get a higher score. Any more than that, and your score starts going down.

Honestly though, the best part of the application is the dashboard. The dashboard allows me to link all my accounts into one screen. This makes life easier as I only have to log into one place to see all of my bank accounts and credit cards. The next thing I need to figure out it how to link my retirement and stock purchases into this tool and I will be set.

Also side note. If you request information on a loan, Credit Karma does not screw around. I request information on a loan to get a down payment on a car. About a dozen emails and actual pieces of mail later, I'm still getting letters from banks telling me rates and payment schedules if I wanted to get a loan from them. So be prepared to have applications for loans to become automated.

Combine this tool with http://www.iwillteachyoutoberich.com/ and you will be set for awhile. Do yourself a favor and stay ahead of this shit early. 1 year of being stupid is now costing me 5 years of catching up. 

Monday, July 8, 2013

A Taste of Things to Come

So I have been putting more time into my personal site than before. Which is to say, I started to work on it for once. The big reason I haven't worked on it is I had no idea what to do with it, other than link to some open source projects, if I ever worked on any. Then like a bolt of lightning, I had an image pop into my head. The logo for CCockerhamKC.com.


This is just version 1.0 of my logo so far. Something I threw together using paint.NET using only a track pad. Once I get a chance, I will redo this with my mouse and maybe something a little more, ummm, professional than paint.net I figure if my unofficial title at work is "Code Warrior" why not go with it? This will need some tweaking before I go live, but it is a start. As for content on the site, I will start documenting my workouts, races, and hopefully soon some grappling tournaments. I might even start a second blog to focus on those things that will help feed my site. For the time being there isn't much other than a template, some pictures, and a dream. Once it goes live I will do a technical post on the fun stuff making it work. I am thinking that my site will be strictly HTML5, CSS3, and some JS, but you never know what technology will catch my eye to try as I dig in.

Monday, June 24, 2013

Let's start this thing up

So last week we competed in the HackTheMidwest hackathon. It was a lot of fun, and we accomplished a lot. I can't wait for the next event.

After doing the event it got me thinking about how much fun it could be creating my own startup. Coming up with an idea, creating a demo, fleshing it out, testing, polishing, and repeating. This change of pace was very welcomed. As working day in and day out on the same project in two week chunks, while it pays the bills, gets boring from time to time. Hence why you do these things in the first place. Hackathons allow creativity to flow as well dust off parts of your brain that haven't been activated in a while.

Now what does it take to create a startup? I have no idea, but I don't think anybody really does. I figure it is much like running a race; you can prepare and have done them in the past, but they are all different. So let's just assume that I was going to have a startup tomorrow, I think this is how I would begin.

First off before you begin, you need an idea. Something that will either make money, or get a lot of people to invest in you. Look at things like instagram, vine, and facebook. These things were built before they had a way to generate revenue. But somebody saw potential and bankrolls or just buys your idea.

Secondly, you need a team. I would start with your developers first. You want to get something out the door as quickly as possible. The longer it takes to get your idea into something that investors can see, the longer you might go without a paycheck. Which you might be ok with, but your team certainly might not be. As your idea gets backers, you might start looking into some sort of management role, unless you feel that someone is already stepping up into that role.

Your last step, you need someone with a sales/marketing background. This will be key when you idea is up and running. You need people to buy into your product and drink your kool-aide. That is the idea right? I mean, some ideas sell themselves. Others need a little push. I mean if you told me years ago that an app that allowed you to put sepia filters over pictures would get $1 Billion, that is with a B, for their idea I would have called you nuts. But these things happen. You need somebody who can explain to people with a lot of money why some their money should become yours.

Well that would be enough to get started. I hope that sometime in the future I can do a follow up of how close I was to being right.