Why I love working for SugarCRM

SugarCRM Chrome Bottle Opener It’s not everyday that a man finds work that he loves. Hell, in today’s economy, a lot of men can’t find work at all, let alone rewarding work that he enjoys. I’m one of the fortunate few who has been very blessed in my career path as it relates to doing work that I enjoy doing, being good at what I do and being able to provide for my family. But I have to say that I have never been quite as happy with my job as I have been since January of this year.

Backstory
In mid-December 2011 I was approached by a recruiter through email. Why I remember this is pretty simple: he didn’t sugar coat his email with a bunch of recruiter mumbo jumbo and buzzwords, nor did he include a job description or any of that. He straight up said he was a headhunter and was looking for a Senior Software Engineer for a well funded, private company in the bay area. After a couple of emails, we setup a time to talk on the phone. That in and of itself is a rare occurrence because I don’t talk to too many recruiters since most bomb out during the email phase. But what made this an especially odd thing was that as we talked, he engaged me very quickly about what I like to do, what I am good at and what I wanted to do with my career. We talked for about a half hour and he asked me if I’d be open to interviewing with his client if he could get me in for an interview. I told him I would be for a couple of reasons, the most prominent being that A) I was looking for work as I wrapped up a short term contract project, and B) the company he was talking about – SugarCRM – was a company I had known about and was interested in for quite some time. This call took place on a Friday. On Saturday he called me to tell me that he had scheduled an interview for me on Monday, December 19 at 2:00 in Cupertino. And from here on begins the real story of why I love working for SugarCRM.

In the beginning
The Monday that I was supposed to interview came around and I hadn’t heard from the recruiter. I thought it was kinda odd but figured that maybe something needed to be hashed out on his end so I went about my business that day. Then, at about 12:30, I got an email from him with the address for SugarCRM and a message saying they were expecting me at 2:00 pm. Since I was still out with the kids I had to hustle home and get myself somewhat presentable for an interview at 2:00 in Cupertino. I did my best, and managed to get some jeans and a golf shirt on before heading out the door. I got to Sugar just before 2:00.

I was given some papers to fill out while I waited for the person that was going to interview me to come get me. Turned out, there were several people that were going to interview me and the first fellow came out pretty quick. As we walked through the halls toward the interview room I began to get a little nervous. But once we sat down and started talking, I had the pleasure of experiencing the funnest interview I had ever been on. I actually interviewed with three different Engineers, all of whom asked me questions that were both challenging but practical. And all of them had a coding exercise that we worked on together to solve. I got a really good vibe from the first three guys but when the fourth person walked in, things changed a little bit. You see, the fourth person was a VP and there really weren’t any technical questions at that point. From there it became more a matter of when I could start and some of the other logistical questions that you might find in the late stages of an interview. And when I left there, just before 5:00, I had an odd sense that it might have gone pretty well. I didn’t know how well until, about 20 minutes later, I got a call from my recruiter telling me they had drafted an offer letter for me.

I started working for SugarCRM on January 9, 2012. My first day at the office was the first day of the 2012 Sales Kickoff week. It was also the first day of an Engineering Sprint featuring a good number of engineers, including all HQ engineers and remote engineers from just about everywhere. It was chaotic to say the least, and the pace in the office that day was absolutely frenetic. In all honesty, I was a little taken aback by it all because I had never been involved in such a large scale engineering effort nor had I ever been part of a large engineering team before. But after spending my first day getting my development environment set up, I was off and running with my first assigned tasks. Looking back on those first few days at work now feels like a big blur because of how fast things went, how much I learned and how many people I met. It was a crazy, fast, amazing week and without a doubt, it was the best first week I’ve ever had at a new gig ever.

Can it really be this good?
Fast forward to today. I’ve been with Sugar for six months now. I’ve learned a lot about our product, our codebase, our engineers, our company and our future plans. I’ve survived the on-boarding process, made it through a couple of team transitions and have made some pretty decent contributions to the application. I’ve made some friends, helped some folks and have essentially become part of the team. But of all the things that the last six months have brought to my life, what stands out to me the most is how much I enjoy going to work everyday.

It might sound strange to hear someone talk about how much they love their job. I know there are a lot of people that are either out of work right now or are working at a job that is killing them slowly. I’m not trying to make anyone jealous, but I am happier in my work now than I have ever been before. And anyone that knows me knows that this is not only a truth but one that I’ve not been able to say for a long, long time.

So what is it about my job that makes it this good? Well, I’ve been thinking about that as I drive to and from work from time to time (one of the many things I love about my job is the ability to work remotely). So I decided that I’d share the love a little bit. I mean, you never know, you might just be an engineer looking for a new place to call home, right? 🙂 So here are just some of the reasons why I absolutely love working for SugarCRM, in no particular order and not necessarily inclusive of all of the reasons I love this place.

  1. What we’re working on
    I’m not sure if everyone knows yet just what CRM is. I know I didn’t until my last job, and even then, it wasn’t nearly as clear to me as it is now. Customer Relationship Management… it sounds like an industry buzzword used by someone trying to sell you something when you read it like that. But when you listen to our founder – Clint Oram – describe his vision of CRM, and what gave him the idea to develop a CRM application to begin with, you’ll see that what we are working on at Sugar is so much more than an application or a buzzword. We are working toward the success of every organization that chooses our software and services. We are working on the notion that if we can help others become successful we in turn can become successful. And the vision that our company has to ensure the continued success of our users floods our entire engineering organization. There’s just something exciting about working toward a goal that is bigger than you.

  2. How we’re working
    If, as an engineer, you’ve never been involved in agile development you are missing out. I had never been involved in true agile development, although I had employed some of the methodologies in previous jobs, so that was a bit of a shock to my system at first. But it happened that I learned to love it pretty early on and have been able to embrace the speed and iterative nature of it. There is also something to be said about accountability, which agile also necessarily involves, and the freedom to engineer in the way that works best for you while taking full credit for your successes and standing behind your mistakes. Yes, I said mistakes. They happen, even (if not especially) in agile environments. And the best part about that is, when things break, no one flies off the handle or starts panicing. You simply engineer your way through it and let your brilliance flow.

  3. Who’s doing the work
    There’s something to be said for working with absolutely brilliant people, especially when those people are really cool and really friendly while being brilliant. I have the pleasure of going to work everyday with some of the smartest, most intelligent, sharpest minds that a company could put together. These folks are from all over the world as well as right here in the United States (some are even in Cupertino 😉 ). The engineers that I get to work with are never short of ideas, never slow to offer help, are always thinking of new and challenging ideas, and simply do not even consider that something can’t be done. And it seems that there isn’t a single person in Engineering and Development that doesn’t always have some sort of idea, some knowledge that you never even knew existed or some way of doing something that is totally fresh and new.

    Something else that totally amazes me everyday are some of the names within the PHP community that I get to work with. I know that distilling things down to PHP seems a little concrete in nature, but anyone that knows me knows that I am a PHP fanboi to the core. It’s the language I learned on and the language that has led to the career that I enjoy. So for me, getting to mix it up with some of the more well known names in the PHP world on a daily basis is kind of amazing. I won’t spill the beans on these people are out of respect for their privacy, but if you are as in love with the PHP language as I am, then you’d love working here.

  4. What we’re working with
    As much a fanboi as I am of PHP, I am more a fan of doing things the right way and the best way possible. To that end, PHP is NOT the end all, be all of technologies even if it is the core technology of the product we ship. And that right there is another thing I love about Sugar. We use tools from a mixed bag of technologies. We use Ruby applications, Python applications, Java applications… we use different databases, different environments and different platforms. There isn’t anything that is really off limits when it comes to making our jobs more efficient and more effective. And this appeals to me greatly because that means that whatever is the best tool for the job, that’s the tool we get to use, even if we don’t know it that well or it isn’t the same platform as our product is.

  5. Freedom to be creative
    I’m pretty sure that of all the cool qualities of working at Sugar this one right here is the one that speaks the loudest to me. Never before have I been a part of an organization that literally puts you in the driver’s seat. When you’re given a task, you own it. What you build, you stand behind. It’s yours. And whatever it takes to allow you to be able to produce something worthy of putting your name on it, you’re allowed. Need snacks, coffee, red bull or chips? Done. Need beer? Done. Need leather couches to kick back on while you code? Done. Need to take a break and school an intern on what ping pong is really about? Done. Or perhaps you’re feeling like working in the office isn’t the best way to get things done for the day. Perhaps you want to work at a local coffee shop or even work at home. Well, guess what? You can do that to. You are literally put in command of your own destiny and given whatever tools you need to be a successful engineer.

    I don’t think I’ve ever been as productive in my work, and in as enjoyable a fashion, as I have been while at Sugar. For me, there hasn’t really been a way to not be productive because whatever makes me the best programmer I can be for that day is offered to me.

  6. The learning never ends
    Not a week goes by that I don’t learn something new from someone. The experience that our engineers have, the curiosity that we all have, the development we are all doing leads us down a path of continued learning that can only make us better as we progress toward our goals. I mean, just in the last four weeks alone, I’ve learned more about Javascript than I think I had ever known before, I’ve learned about PHPUnit data providers place in the call stack and I’ve learned about Git submodules. In the weeks and months prior I’ve learned about some oddities in the way that Google manipulates email headers when being sent through their SMTP gateway when using credentials that don’t match the sender information, I’ve learned about licensing variations and I’ve learned how to automate some common development tasks by creating macros in my IDE. I am always learning, and at the same time, I am teaching. Which allows our entire team of engineers to continue to sharpen our skills while helping other engineers sharpen theirs.

Wrapping it up
I know it sounds a lot like I’m doting on my company. The truth is, I am. I am quite literally happier in my work now than I have ever been before. I feel a sense of purpose, a sense of determination and a sense of pride in doing what I do. I feel like there is a much bigger effort at play and that, while my contribution to that effort might be small, it is still significant. And even though I’ve laid down probably 2,500 words to describe why I feel this way, those words still fail to capture the essence of why every software engineer should have the experience of working at SugarCRM.

To that end, let me say that I am so not ashamed to plug the employment opportunities at Sugar right now. We are growing so fast right now that, even though we are bringing new engineers in regularly, we are still looking for top level talent. So if you’re looking for a change in your career, and you are stellar software engineer, you really should give us a look. Making that choice has been one of the best things I’ve ever done in my life.

FULL DISCLOSURE NOTICE: The links to the open positions at SugarCRM that I’ve added to this post contains information that will associate your click through and subsequent interest in SugarCRM jobs to me. It is yet another perk of the job, getting bonuses for bringing new talent on board. If this troubles you feel free to hit the SugarCRM careers page directly. Just know that if you do that, Cthulhu will invade your sleep and eat all the kittens that you dream about nightly. Ok, that probably won’t happen, but if it does, you can’t say I didn’t warn you.

Pair programming with a child

While driving home today my daughter Alaynah asked me a little bit about what I do. After explaining to her that I am a software engineer and that I write programs, and telling her that my programs run on the internet, she asked me how Google makes that little box “that you type in to look stuff up”. I told her when we got home I’d show her since it was pretty easy to do.

When we got home we got to work. And a coupe of minutes later we had a very simple web “program” that took some text in a text box and wrote it out to the screen a certain number of times, each time making the text bigger. Not a lot of action going on there, but still something she could see that involved a text box and some programming logic. And as uneventful as this little application might have been, what it led to was amazing to say the least.

As we started to look at the words “Awesome Alaynah” explode onto my monitor in ever growing size, Alaynah began to look at the lines and count them to make sure there were as many lines of repeating text as she had selected. So we decided that it would be easier if there were numbers next to each line so we could see just how many lines were on the screen. Then, after she saw that, she asked me “is there a way to make it so if you click on a line, that all of the lines after it just disappear, including the line that you clicked on?”. I told her that I was sure there was, but that we needed a different kind of programming for that (since our original program was all PHP and click events, while potentially served by the server, are better handled on the client). So I went and got us jQuery, included it and wrote the code that made the lines disappear from the line you clicked on.

As she sat in amazement watching the lines disappear when clicked you could see that there was something troubling her. It was almost as if, when the lines were disappearing, that they were gone forever and ever. So I wrote a little bit of code that would bring the lines back if you wanted them back. She loved that. Except for the text to bring the lines back was “Bring them all back”, which works in all cases except if you disappeared the last line, because there aren’t any “all” lines, only “the” line. So she told me that we needed to change it so that if you removed the last line that to bring it back, the program should say “Bring it back” instead. So we fixed that, and after only a few minutes of conceptualizing, programming, testing, using and refactoring, Alaynah and I had put together a little program that we were both pretty proud of. You can view the source of this little program here.

Now aside from the obvious goodness that is my eight year old daughter (who happens to be turning nine tomorrow) taking an interest in the work I do, I have to say that having time to spend with my daughter – just her and me time – was a blessing. I don’t get a whole lot of one on one time with any of my kids. And even though this was only a few minutes, it was a cool few minutes that let me show my daughter what I do, let her do it with me and let us both enjoy some quality time together. I’m certain I would have loved it just as much if we had been talking about dolls, mud, cartoons or our favorite foods, but the fact is, we were talking about programming, my work, her ideas and our time together. There is a lesson in this for any parent. If your child shows any kind of interest in what you do, take the time to show him/her what it is you do. Don’t explain it with words and leave it at that. If you can take the time to allow your kids to connect with you while learning you, take that time. No excuses, no fussing, just do it.

She and I had an awesome time with this, even if it was only a few minutes. It was a great time and I am glad I didn’t pass it up because I was tired, wasn’t interested or was just unavailable.

View the source of our little program
Our original code was a little more rough around the edges than this one. After we got it working the way we wanted it I went through and cleaned things up a bit, added some comments, pulled out duplicated javascript code segments, etc. So the final product is a cleaned up rendition of our original stuff, which we hacked together very quickly in an effort to make it just work.

<?php
// Iterations max limit
$max = 30;
 
// Iterations min limit
$min = 5;
 
// User supplied iterations count
$limit = null;
 
// Handle posted values
if (!empty($_POST['limit'])) {
	$limit = intval($_POST['limit']);
	if ($limit > $max) {
		$limit = $max;
	}
 
	if ($limit < $min) {
		$limit = $min;
	}
}
 
$words = empty($_POST['words']) ? null : $_POST['words'];
?>
<html>
<head>
	<title>Alaynah's program</title>
	<style type="text/css">
		#putitback {
			color: #008;
			cursor: pointer;
			text-decoration: underline;
			margin-top: 20px;
		}
 
		.index {
			display: inline-block; 
			width: 50px;
		}
	</style>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
	<script type="text/javascript">
		$(function() {
			// Set the row prefix
			var rowprefix = 'row-';
 
			// The id of the clicked row to make hide from
			var rowid;
 
			// Row toggler, makes rows appear and disappear
			function toggleRows() {
				for (var i = rowid; i <= <?php echo $limit; ?>; i++) {
					$("#" + rowprefix + i).toggle();
				}
			}
 
			$('.row').click(function() {
				// Get the row id that was just clicked
				rowid = $(this).attr('id').replace(rowprefix, '');
 
				// Handle visibility toggling
				toggleRows();
 
				// Set our message for restoring rows
				var message = 'Put them all back.'
				if (rowid == <?php echo $limit; ?>) {
					// Alaynah was smart enough to see that if you only plucked
					// the last row the message should be singular
					message = 'Put it back';
				}
 
				$('#putitback').text(message);
			});
 
			// Handle restoring "removed" rows
			$('#putitback').click(function() {
				// Handle visibility toggling
				toggleRows();
 
				// Clear out the restore link since everything is back to normal
				$(this).text('');
			});
		});
	</script>
</head>
 
<body>
<h1>Alaynah&apos;s program</h1>
<form action="" method="post">
	<p>What do you want to write? <input type="text" name="words" value="<?php echo $words ?>" /></p>
	<p>How many times do you want to see it? 
		<select name="limit">
			<?php for ($i = $min; $i <= $max; $i++): ?>
			<option value="<?php echo $i ?>"<?php if ($i == $limit) echo ' selected="selected"'; ?>><?php echo $i; ?></option>
			<?php endfor; ?>
		</select>
	</p>
	<p><input type="submit" value="Hit it!" /></p>
</form>
<?php if ($limit && $words): ?>
<hr />
<?php /* Loop $limit times and make the displayed text grow each iteration */ ?>
<?php for ($i = 0; $i < $limit; $i++): $c = $i + 1; ?>
	<div class="row" id="row-<?php echo $c ?>" style="font-size: <?php echo (14 + $i); ?>px;">
		<span class="index"><?php echo $c; ?></span>
		<span><?php echo $words; ?></span>
	</div>
<?php endfor; ?>
<div id="putitback"></div>
<?php endif; ?>
</body>
</html>

Storing singleton objects in PHP sessions

A friend of mine, who is working on a sick little diet and exercise tracking application, asked me today if PHP allowed singleton objects to be stored in a session. My first reaction was absolutely they can be so long as you follow the normal rules of unserializing objects in PHP… namely, making sure the class is in scope before attempting to create an object from it OR having an autoloader that does that for you. But as I thought about it more I began to think that maybe this might not work as expected since singletons generally have no public access to their constructors. However, when an object is unserialized, it is instantiated, for lack of a better term, and populated with the data that was exposed from the serialization process.

Note: for those of you that are unfamiliar with the way PHP handles session data or are just wondering why I am using serialization so much in my examples, the basics are you start a session and PHP assigns a random MD5 hash to it as an id. You write data to the session via the $_SESSION superglobal array and when the script terminates or you call session_write_close(), PHP serializes the $_SESSION array and writes that serialized string to the file system for retrieval on subsequent requests so long as the session time limit has not expired. I really did not want to run this entire session process and inspect what was being written to my file system so I decided to mock that interaction myself by creating an arbitrary array, serializing it, grabbing the serialized string and unserializing it.

As I began to dig into this I started playing with PHP’s magic __sleep() and __wakeup() methods. Those seemed to do what I wanted them to do except in the case of protected and private properties of my class. As soon as I added those in my serialization took a crap all over itself, even when I cloned the singleton object and got the public properties exposed through get_object_vars(). So, thanks to the PHP manual – the most awesome tool in any PHP developer’s arsenal – I discovered the PHP Serializable interface.

This interface defines two methods: serialize() and unserialize(). These methods override the default behavior of __destruct() and __construct() so if you are using these you should keep that in mind and either put your __destruct() and __construct() code into these methods or allow for calls to __destruct() and __construct() from within these methods. Your homework is to decide which is the better implementation. 🙂

Now, back to the lesson at hand… the following object – let’s say it is saved to a file named dummy.php – is a super simple implementation of a basic singleton pattern. It includes both a serialize() and unserialize() method to allow it to be serialized for storage.

<?php
class DummySingleton implements Serializable {
    /**
     * Test properties of various visibility
     * @var string
     */
    public $dProp;
    public $dPropX = 'Nothing to see here folks';
    private $_prop = 'y u try see dis?';
 
    /**
     * Instance holder for this singleton
     * 
     * @var DummySingleton
     */
    private static $_instance = null;
 
    /**
     * Private singleton constructor, simply sets a property
     */
    final private function __construct() {
        $this->dProp = 'I was finally built';
    }
 
    /**
     * Singleton instance getter
     * 
     * @return DummySingleton
     */
    public static function getInstance() {
        if (self::$_instance === null) {
            self::$_instance = new DummySingleton();
        }
 
        return self::$_instance;
    }
 
    /**
     * Implementation of the Serializable interface, called automatically just 
     * before this object is serialized. This will override any calls to a
     * __destruct method, so if you have a destructor you should call it from
     * here.
     * 
     * @return string
     */
    public function serialize() {
        return serialize(get_object_vars($this));
    }
 
    /**
     * When this object is created from an unserialization this method is called. 
     * It implements the Serializable interface and uses the data from the 
     * serialize() method herein. Since this method overrides the __construct
     * method you should make any accomodations for constructing your object
     * in this method.
     */
    public function unserialize($data) {
        // "Instantiate" our singleton
        self::getInstance();
 
        // Set our values
        if (is_array($data)) {
            foreach ($data as $k => $v) {
                $this->$k = $v;
            }
        }
    }
}
?>

If you build up this object then serialize it, then rebuild it from the serialization, you can see that it remains in tact. Let’s test this by simulating the session array, first creating an array then adding the DummySingleton object to that array, then serializing it:

<?php
// Grab the class
include 'dummy.php';
 
// Get our instance
$o = DummySingleton::getInstance();
 
// Set something into it for testing
$o->setFromOutside = 'What the hell is this madness?';
 
// Make an array of stuff
$a = array();
$a['name'] = 'Robert';
$a['id'] = 23;
 
// Add the singleton
$a['dummy'] = $o;
 
// Serialize it
$s = serialize($a);
?>

The serialized output from this yields:

a:3:{s:4:"name";s:6:"Robert";s:2:"id";i:23;s:5:"dummy";C:14:"DummySingleton":187:{a:4:{s:5:"dProp";s:19:"I was finally built";s:6:"dPropX";s:25:"Nothing to see here folks";s:5:"_prop";s:16:"y u try see dis?";s:14:"setFromOutside";s:30:"What the hell is this madness?";}}}

If you take that string and subsequently load it and unserialize it then inspect it, you’ll see that the singleton object has been restored along with all private properties of it:

<?php
// $s is our serialized string from above
$o = unserialize($s);
var_dump($o);
?>

Output:

array(3) {
  ["name"]=>
  string(6) "Robert"
  ["id"]=>
  int(23)
  ["dummy"]=>
  object(DummySingleton)#1 (3) {
    ["dProp"]=>
    NULL
    ["dPropX"]=>
    string(25) "Nothing to see here folks"
    ["_prop":"DummySingleton":private]=>
    string(16) "y u try see dis?"
  }
}

Since this is, in essence, the process that PHP follows for its default session management it’s safe to say that you can, indeed, store singleton objects in a PHP session. Now onto to bigger and better questions, like…

Why would you ever want to store a singleton object instance in a PHP session?

Javascript, WebKit and ‘closed’

The other day I was playing around with a simple letter scrambler script that I had written to assist my daughter with a birthday party game. The concept is simple enough… enter a phrase, hit a button and the phrase gets “cryptoquoted”, a process where each letter in the phrase is substituted with another letter. One of the things I designed this program to do was hide the input box so that, if you were viewing it on the web, the solution would not be visible to anyone looking at the puzzle. But I also programmed it so that if you click a link, the input box would be revealed. This toggling of the visibility of the input box is simple enough to do. Just add a little jQuery and BAM!, you have a simple revealer.

And this is exactly how this performed until the last time I tried it a couple of days ago. My toggler suddenly stopped working right, but only in Chrome and Safari. All of the javascript was firing in the proper order, and the function I had written was being called but my slider was not sliding. After digging into this a little bit, and doing a bit of debugging, I found out that a variable name I was using the monitor the state of the visibility of the input box was being clobbered in Chrome and Safari. Firefox worked just fine as it always has. The variable name I was using was closed.

// Set the closed flag
var closed = true;
 
/**
 * Toggles visibility of the input box
 */
function toggleSolution() {
	if (closed) {
		closed = false;
		$('#puzzle-key').slideDown();
		$(this).text('Hide solution');
	} else {
		closed = true;
		$('#puzzle-key').slideUp();
		$(this).text('Show solution');
	}
}

When inspecting this code in Chrome Developer Tools, regardless of any actions, events or any other browser interaction, the closed variable always was valued as false. I still don’t know why this is happening, but I do know this is a WebKit issue. And I also know that changing the variable name from closed to _closed solved the issue I was having. Also, as a simple test, without declaring the variable anywhere in my code, I opened up the console on a page without any javascipt at all and, sure enough, the variable was set to the value false.

So if you writing javascript and run across an issue where you are using a variable named closed in your code that always seems to be valued at false, be aware this might be an issue with your browser and simply changing the name of your variable in your code might make things all better for you.

A simple PHP regular expression tester

I love making my own tools for the simple and mundane tasks I face during the day. One of those tasks is the repeated need for testing regular expressions that I am faced with when programming. Yes, there are a multitude of regular expression testers on the web today, and all of them have a laundry list of cool things they do. But none of them are mine, and none of them are necessarily simple. And few of them let you see how they work. So with that, I decided to take one of the many tools I’ve built for myself and offer it here for you.

My (very) simple regular expression is just that… a simple tester that takes a regular expression and a subject string and gives you back your matches as PHP would see them in your application. There is one small bit of robustness (I had to use robustness… the word is just so cool) added to this tester that will allow you to group your matches together (PREG_SET_ORDER) and allow you to include the string position of the match in the subject (PREG_OFFSET_CAPTURE). But that is where the robustness ends the simple kicks in again.

So if you want a simple little regular expression tester, or just want to see how I’ve coded mine, feel free to use my tester for your own needs. Have fun, stay curious and GO BIG.

Preparing my 2012

As 2011 comes to a close I’ve been looking back on it and trying to find those memorable moments that stand out to me the most. There have been a few moments, some good and some bad, that I can immediately associate with the term ‘2011’, and while I could easily get into all of that mess, my preference is to not look back and instead focus on what lies ahead of me. With that, I figured that to bring some reality and tangibility to my goals for 2012, I would write them down, make them public and leave them here for me to come back to when I am feeling like I need a refresher.

I’ve been thinking for a few months now about what I want my 2012 to be like. In past years I would think in terms of what I don’t want, but something I’ve learned in 2011 is to look at what I do want and pursue that rather than attempt to evade what I don’t want. My thought is, if I know clearly what I am pursuing I will have something clear to aim for as opposed to just trying to outrun what I don’t want to be a part of. That began to make a lot of sense to me in the last half of 2011 and it is something I plan to continue in 2012.

In keeping with that principle, I am also of the mind that if I speak something enough I have to power to see it come to fruition. As I put my thoughts to work and turn them into words I have a chance to put my words to work and turn them into actions. And, the more action I take, the better the chances of my original thoughts becoming reality. So with that in mind, here are some of the things I will do, achieve, accomplish or complete in 2012 and, where feasible, when.

  • January
    • Drink no alcohol
    • Eat no refined sugars
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Sign up for Krav Maga with my daughter Rebekah
    • Get started with CrossFit
    • Lose 10 pounds
  • February
    • Drink no alcohol
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Lose 10 pounds
    • Finish Chalene Johnson’s book PUSH
  • March
    • Start P90X2
    • Start distance running
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Lose 10 pounds
  • April
    • Hike Mission Peak at least once
    • Throw Sarah an awesome 16th birthday party
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Lose 10 pounds
  • May
    • Help the kids give their mom a memorable Mother’s Day
    • Hike Mount Diablo at least once
    • Complete P90X2
    • Start Insanity Asylum
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Lose 10 pounds
  • June
    • Enjoy a family filled Father’s Day
    • Complete Insanity Asylum
    • Exercise six days a week
    • Don’t eat what I can’t accurately measure the nutrition on
    • Get under 200 pounds for the first time since high school
  • July
    • Earn my 32″ waist
    • Give Alaynah her own birthday party
    • Give Rebekah her own awesome birthday party
  • August
    • Take the family to Yosemite
    • Run a Yosemite trail
    • Have all school shopping done
  • September
    • Give Adriannah a great birthday party
    • Run Tough Mudder NorCal
  • October
    • Run Warrior Dash NorCal
  • November
    • Host Thanksgiving
    • Have all my Christmas shopping done
  • December
    • Attend a New Years Party outside of my own city
    • Finish the year under 210 pounds
  • Some time in 2012
    • Pray daily with my family
    • Find a church and become a member
    • Read at least two self improvement books
    • Own a motorcycle
    • Replace my car
    • Complete a 5K
    • Complete a 10K
    • Run a sub-six minute mile
    • Attend a software developer conference
    • Give a talk at a meetup or conference
    • Go to a concert
    • Go to an NFL game
    • Travel out of state
    • Learn a new programming language

I know it seems like a lot of this is wrapped around health. I’m of the opinion that I need to continually work on my health – physically, emotionally and spiritually – so I can continually improve myself. If there is one thing that I gleaned from 2011 it’s that I need to become a better human being. I need to learn to be more patient, more kind, more understanding. I need to improve me. 2012 will be my year for that.

I expect some amazing things this year. And I am determined to see these through completion. My prayer is that I can look back on these things a year from now and be able to say that I’ve done them all. I’m certain that’s possible.

Be grateful in all things

I woke up this morning with a feeling of anxiety. This happens from time to time, but more recently it has happened more often. I’m not talking about clinical anxiety but more the anxiety that comes as a precursor to the culmination of a great journey coupled with major change in the usual surroundings of your life. Like when you’re getting ready to start a new job or when you’re entering into a new relationship.

But as I thought about all that could be causing me anxiety I began to realize that this feeling, this nervous energy that seems to overtake me, stems from the knowledge that where I am in life is simply not good enough. It’s because I want more – I need more – out of life that I seek a higher level.

I’d be the first to tell you that if you are not happy where you are go find your happiness. Seek out with all your might that which you so greatly desire and aggressively pursue it until you’ve acquired what you seek. You only have one life to live and you’re not getting any younger. So stop living your life wondering and wishing and start making the necessary moves to find that place in life you want to be. But today I’ve decided to change my attitude. Today I choose to be grateful.

As we enter into the last few days of Christmas and, realistically, the last few days of the year, I am reminded that there is so much for me to be thankful for in my life. I have a beautiful and amazing family. My children are all healthy, brilliant, creative, thriving children who have shown me this past year that they are tough as nails and soft as silk. I have a great relationship with them and they, with me. We live our lives together as harmoniously as a family can and we have shown over time that we are a tight knit family that is capable of withstanding the worst possible situations while still being able to celebrate the best ones.

I have a skillset that is heavily sought after and positions me to be able to take care of my children financially. It’s good to be a tech head in Silicon Valley at this particular time in history. I love what I do and because I’m in a rather niche market, I am actually pretty valuable. This is a good thing.

I have a wonderful home for my children that is warm, inviting, filled with the sounds of playful screams, craftily composed piano tunes and strong voices that are right on pitch. The creativity flows through my house in every aspect but none stronger than music. I am reminded every day just how blessed I am to be surrounded by such musically inclined kids.

The basic necessities of life are always at our disposal. We literally want for nothing. No, we don’t live a high roller lifestyle by any stretch of the imagination but very seldom do we have to tell ourselves “no”. All in all, life is pretty good.

So as the week winds down, and Christmas lists get poured over and things get bought and the “want meter” is showing elevated readings, I want to take a minute to slow down, consider what I really want the most and enjoy the last few days of this year with an attitude of gratitude. Yes, there is going to be an extraordinary amount of change coming very, very soon. I am preparing myself for the coming year because it will open with change right out of the gates. But for now, or at least the next couple of weeks, I will be thankful. I will choose to be happy with what I have and I will choose to enjoy my life exactly as it is.

Simple PHP table maker

A little while ago I was in need of a way to take tab separated data sets and make HTML tables out of them cleanly. Mostly this was from data copied from a spreadsheet, but sometimes copying from web pages or even text documents has brought this need up for me. So in keeping with my mantra of “Why not write a program to do that?” I decided to write a simple HTML table maker that will take in tab separated, structured data and return an HTML table from it, complete with column headings, a caption and a summary (sidenote: I know that table summaries are being deprecated… still, I included it because at the moment they are still in use for pre-HTML5 markup).

So without further ado, I bring you my simple HTML table maker. It isn’t the most robust thing in the world, but it is still pretty neat. Plus? It totally serves my purpose to the tee. So if you don’t like it, why not gank the code for it and make it better?

Happy Thanksgiving 2011

Another thanksgiving is upon us. It seems in recent years that we are cycling through holidays at breakneck speed, never being able enjoy any one particular holiday because the next holiday is already up in stores or being advertised on the Internet. This saddens me, especially at thanksgiving time, since we often times neglect the spirit of giving thanks for the rush of acquiring more crap on the morning after.

Being thankful is something I’ve tried to teach my kids for a while now. It’s also something I’ve tried to live my life by as well, although I am nowhere near perfect at it so inevitably I overlook something I should be thankful for, usually in favor of being cranky about something else. This past 12 months it has been way easier to count my curses than it has been to count my blessings. But I’ve had a quiet last few weeks, time that I’ve been able to spend thinking about my life and the many blessings that surround me daily.

While the past year has been challenging, the blessings in my life have shown themselves to me clearly. Among these blessings are the tangibles and the intangibles, the valuable and the invaluable. Although I’m sure I’m forgetting many, it would be silly of me not to at least try to address the more prominent blessings in my life.

  • My kids – My children have been the greatest blessing to me and continue to be. Not a day goes by that I am not totally and completely amazed by them in some way. Whether it be their creative outward expressions or their tender, sincere, loving hearts toward me and their siblings, I’m reminded everyday of just how powerful a blessing my children are.
  • My family – My family has shown me this past year just what love is and to just what lengths they will go in order to care for me and my kids. When I say “my family” I am most definitely talking about my blood family (my brother, my sister, my cousins, my nieces and my nephews). But I am also talking about my mother-in-law, my father-in-law, my sisters-in-law and my brothers-in-law. My entire family seemed to rally around my immediate family this year and even through the hardest of times have stayed by my side.
  • My friends – I’d like to think that everyone has friends. And although I have a crapload of friends on Facebook and Twitter, I can count the number of close friends I have on one hand. But this year my closest friends really showed themselves. They came out of the woodwork to encourage me, make me laugh and generally just have my back. I don’t know where I’d be on this thanksgiving if not for my friends reaching out to me, talking to me and listening to me. You know who you are. I just hope you know how thankful I am for you.
  • My possessions – I know that stuff is just stuff, but I count among my stuff the basic necessities of life: a house, a car, electricity, running water, etc. Yes, I also include toys and gadgets in my “stuff” (I mean who doesn’t love their phone) but being able to keep my kids warm, fed, clothed and sheltered is a tremendous blessing to me.
  • My skills – I love being a nerd. I’ve said it before and I’ll continue to say it. What started out at a hobby for me has blossomed into a career. A well paying, lucrative career. I’m thankful that I’ve been blessed with an inquisitive mind and a passion for learning, and that I can leverage that into a skill set that continues to provide for my children.
  • My health – I’ve worked hard to get myself healthy. I’ve worked hard to stay healthy. I’m blessed to say that I don’t need medication everyday just to live and that I can experience life with my children with energy, fervor and passion, never missing a thing with them because “daddy doesn’t feel like it today kids”.
  • My struggles – Anyone that knows me knows that I like to push myself to achieve things that I might not be able to achieve under normal circumstances. And most folks that know me know that I’m not one to get smacked on the chin without swinging back. This year has shown this more clearly than any other. The struggles came in droves this year, each one presenting a new challenge, a new problem that needed a new and different way to approach it. To say that this past year was trying would be minimizing what actually took place. Still, through each of the struggles came an equally rewarding victory and a promise of a brighter future. And for that I am immeasurably blessed.
  • My failures – If there was one thing I can say I am more blessed by this year than last year it would have to be my realization of my own imperfection and my coming to grips with many of my behaviors, attitudes and actions that have led to failure in many areas of my life. It’s been said that if you want to continue to get the same results of your actions simply keep doing the same thing. I realized this year that I did not want to keep getting the same results in life I’ve always gotten and that in order to change course I had to take a deep look within myself to identify those areas of myself that may have been preventing my own success. That has been painful to say the least, but it has also been an indescribable blessing in that for the first time in my life I’ve come face to face with many of my shortcomings and have been able to begin rectifying them. Change is good, even if it is uncomfortable.

There is so much more that I should be thankful for. But as I sit behind the keys staring at the emptiness of what will soon become the last few lines of this post, I’m reminded that I have a house full of kids that need their daddy’s attention and affection. And that is a blessing I can no longer pass up.

Happy thanksgiving. May this holiday season be a blessing to you and may it open you up to be a blessing to others.

Yet more change is afoot

A little over a year ago I posted about an upcoming career change that I was embarking on. I’m not at all the kind of person that likes to bounce around from job to job nor am I a huge risk taker when it comes to matters of finance, career growth and personal change. However, sometimes life happens, and sometimes things happen beyond your control that put you into a position of having to pull back the reins and get things in order once again, even if you have to take a risk to do it. To that end, I am heading down a path that I’ve not even so much as entertained the idea of let alone had the guts to pursue. I am changing jobs again.

This change is much needed for various reasons which I don’t need to go into here. But let me just say that while I look back on the last year of my work with mixed emotions, when I look forward I look on with excitement, butterflies and a determination to make some magic happen. I am leaving the comfort of something stable for the vast wonderland of something that is far from proven. I am taking a risk. A big risk. But one I absolutely need to take at this point in my life.

Starting next week I will be the lead architect and head engineer of a niche marketing company in Concord. I will be working a short term contact with long term potential and will be able to make an immediate, very visible impact of the business operations of the company. I will be a part owner and I will be responsible for making business, technology, architecture, implementation and deployment decisions the likes of which I’ve yet to do in my career. I’m more than a little nervous about that. But I am also more than a little excited about that.

There is just something about looking out over the great expanse of the unknown and seeing for yourself what that landscape looks like. Then stepping off the ledge of safety into that unknown, preparing to face all sorts of unexpected happenings and trusting in yourself to not only get through it but kick ass along the way to a major victory in your life. Yeah, I feel like a boxer throwing punches in the locker room just before a title fight. This is going to be freaking awesome and I am looking forward to it.

I do have to say however that there are some people I will miss from my current employer. While I’ve only been here a year I have had a chance to develop some strong professional and personal relationships with some amazing people that do some amazing things day in and day out. I’ve had to work with these folks daily, supporting them, being challenged by them and working with them collaboratively to achieve common goals and mutual awesomeness:

  • Ravi – Dude, I don’t know how you manage to do what you do every day without blowing a gasket. You only have two hands yet you work like an army of employees daily, getting things done by yourself that I’ve seen entire teams not get done at all.
  • Jay – I’ve had more fun working with you, talking with you, debating with you and collaborating with you than anyone else in the office. You are a great developer and I see big things for your future. Also? Competing in triathlons? Bad. Ass.
  • Fai – You are a gifted and talented front end designer and developer. Don’t let anyone ever tell you otherwise. You have an eye for style, color, relationships of objects… all of it. You were an asset to our company from the day you came on board.
  • Kim – What can I say dude, you are just bad ass from top to bottom. You get things done, you handle your business, you see a need before the client does and have an amazing work ethic. Any company would be blessed to have you on their team. It has been a tremendous pleasure working with you. And don’t cover up those tattoos. If there isn’t a handbook saying you have to there isn’t a rule saying you have to.
  • Adrian – Bro, you made my job so much more bearable, so much more sane. I’m glad we had a chance to work together, and I am glad you always brought a positive spin to the table every single day. Even if things were awful in my office, you coming over made things better. I hope you realize what an asset you are. Thanks for making my job as wonderful as you did bro.

And there you have it… news of yet another change in my life. So many changes in such a short period of time… and they aren’t done yet. Just you wait and see. 😉