Git for the non-programmer

Wrote this for work. Thought it would be beneficial here.

Preamble

Once upon a time, long ago before the world was civilized, when dragons such as Flash roamed every webpage and MySpace reigned supreme in social media, code was untamed. It lived as an ever-changing chameleon and it was often impossible to know what was where and how it was supposed to execute. There were primitive attempts at guarding against these difficulties. Organizations would store archives of releases, or carefully label things so as to know which document was authoritative. But instead of ensuring security, this only lead to further chaos. How was someone new to a project to know what file was truly the authoritative version? All too often there would be names such as MyClass, MyClassReal, MyClassA, MyClass_123 and so on into a putrid cacophony.

Into this mist stepped the version control system (VCS). This allowed a company to keep a history of a file in a “repository.” No more would suffixes A,B,C,1,2,3 be needed. Instead there would be a canonical history of the document which all could examine and understand. These systems placed light into the heretofore pervasive darkness and there was much rejoicing.

Continue reading

Posted in Best Practices | Tagged , | Leave a comment

Startup is a buzzword

So at one point I commented on the meaningless of the word “startup”. And I think that it might be worth it to look into the issue a tad more.

Now don’t get me wrong, I have no issue whatsoever with people coming together to create a new business. Business is a good thingTM. And if “startup” simply meant, “business which is just starting” then I would be behind it completely. Unfortunately it has nothing to do with that.

I think the most common idea that people try to convey when they say that “they are a startup” is that they have an idea which they think that no one has ever used before/done as well/involved so many pigmy gipsy-moths/&c. Well, I hate to be the bearer of bad news, but there are few businesses which start which don’t believe they somehow meet that qualification. Heck, the gas station in my town is there because it believes that it is the best serving gas for its demographic (in this case, people who need gas and happen to be going somewhere that involves passing their particular corner). Being new definitely isn’t special and being best, honestly, isn’t even very special.

I think another thing that people try to imply when they say that they are a startup is that they happen to have a loose culture, a casual atmosphere, and an XBox in one of the meeting rooms. Well, that’s great, but that doesn’t really cary any particular meaning. If all that it takes to create a startup is a gaming system and casual atmosphere then I think my house should qualify and I should get an angel investor and/or some venture capital.

And I think that brings us to what is the practical definition of a startup. A startup is generally a business which has yet to reach the point of profitability and feels that its equity is justification for lower salary, longer hours, and/or worse working conditions.

Very often these companies will try to supplement bad conditions by giving people things which have little to no immediate cost. One of the more common options is equity. Well, I hate to break it to these people, but programmers can’t eat equity. And even if we could, there is little evidence to suggest that equity will pay out in the long run (and I have heard stories of venture capitalists coming in and making equity as useful as a back pocket on a shirt).

Startup, when it comes down to it, means unproven product which has insufficient assets to meet its overhead. It is almost always a company which is upside down, and chances are good that they will not survive much past the first year, let alone getting to the point where they have a reliable product on the market.

I can’t help but shake the feeling that it really is a bad idea to work for a place which asks for an investment without a tangible investment in return. Perhaps my standards are too high, and perhaps this will cost me work in the future, but I really do believe in just pay for a good day’s work. I’ve seen a lot of people burned by an over-willingness to allow companies to delay payment.

Posted in Business | Leave a comment

on the order of operations

Quick thought:

There is a lot to be said about order of actions and optimization. Obviously, there are situations where B cannot happen unless A is accomplished first: your car can’t drive unless you’ve put gas in the engine. On the other hand there are events which can happen asynchronously or in circumstances where the order is not as apparently important: you can put gas in the engine and start the car in any order you want.

But, this order actually can matter quite a bit. If you’re a tea drinker, you’ll know that adding water to tea will provide a better cup than putting the tea in first. While you’ll still get a warm cup, you’ll find a better result.

If you’re looking for a more technical example, maybe you remember the movie Apollo 13 where Gary Sinise[1] is told that he needs to be able to get the command module to run sufficiently to land it without enough power to run a coffee pot for 9 hours[2]. Hours were spent determining, “If we boot systems X, Y, and Z in order Y-X-Z, is that better or worse than Z-X-Y or X-Y-Z?” (and, apparently, they finally got the right answer).

In a recent case, there was code which went to iterate through a sequence of objects and it did this in PHP. Normally the most efficient route for such an operation is by modifying the SQL: databases are great at sort and filter, programming languages often (though admittedly not necessarily) less so.

A developer went to change this order to what is the normal form but added a comment instead:

In this particular circumstance, querying for a specific ID 
could lead to a performance hit: the queried objects are 
already stored in Memcache.
  1. [1] Really Ken Mattingly
  2. [2] Whether the actual quote is worth it is up for debate, but the actual situation happened
Posted in Code theory | Leave a comment

How to get today’s results in GA

So a bit of an annoyance was that there was an incident on a server earlier today and I needed to track down why. My first stop, the access log, showed nothing suspicious. So I went to check Google Analytics. Unfortunately, this was a bit difficult: the incident had happened several hours in the past and GA’s real time tracker only showed relatively recent history.

Since the most recent article on this topic has to be fetched through the Wayback Machine, I thought I would recreate that information here. Continue reading

Posted in Google | Tagged | Leave a comment

What’s due when

Just as a quick thought, and a bit of a lesson learned. Many times the question, “What do you need?” is very different from, “What do you need right now?”.

Extra time was spent recently on a project trying to come up with a verbose and complete solution to a problem, only to later realize that the entire problem was irrelevant. Time would have been better spent coming up with a solution which would be “good enough” though impermanent.

This pairs with a similar set of questions centered on budget. “What do you want to spend?” is not nearly so simple of a question as, “How are we going to pay for this?” Keeping the immediate cost down might be a much more important priority for a client than keeping overall costs low. And the reverse might also be true: a client might be willing to invest extra resources (man-hours, dollars, infrastructure, etc.) immediately with the goal of keeping costs lower in the long run.

An analysis of options should not fail to take such questions into account.



As a side note: it might be commented that this is very similar to the idea of a minimum viable product, and to a large extent that is correct. The difference is that while a minimum viable product will often necessarily lead to descendant products, the “immediately sufficient” does not have to (and often will not). I’ll leave further discussion on this topic for a later post.

Posted in Business | Tagged , | Leave a comment