Skip to main content

Posts

Showing posts from 2015

You don't know what you don't know

I've been programming since I was little.  I'm not just someone who wrote some code once when I was 15.  I code all the time because I enjoy it.  This industry is both very deep and very wide.  The ocean of available knowledge is what attracts me to it.  I bore easily, and the idea that I can always be learning something new is extremely appealing.  But, though it may change, at this point in time, I'm the exception, not the rule.Not every programmer started as a kid.  Not every programmer does in for the sake of programming.  Most do it for the ego trip, or worse, the money.  But having the level of passion that I have for programming is something to be proud of.  That means that many people who do this job for other reasons--well, they fake it.But it's complicatedLike I said, the industry is a vast ocean of information.  This means that the tiniest amount of knowledge in an obscure enough area (it doesn't even have to be that deep) can give a person the appearanc…

Moar Dependencies!

I write a lot of code. I go to work and I code. I come home and I code. I code for charities in my freetime. I code for custom electronics when I’m bored. I code video game playing programs when I need a break from, you know, coding.The thing is, because I code for a living, not everything I write can be open sourced. And a lot of it might have private information in it that I don’t want to publish to the public. I like to give back to the community. I sometimes donate to open source projects. I pay for the software I use. And occasionally, I manage to give away some code to the open source community.Code is hardI get it. Believe me. Code is hard to write, and even harder to read. People are afraid of being judged because programmers (and I include myself for sure) are jerks. And worse than a bunch of people saying nasty things about your project is the prospect that no one may ever care to even look at it. Ever.But I gotta codeI don’t care. I’m going to code anyway, a…

Software Development Environments

Over my years in software development, the one topic that comes up a lot and is often ignored is environments. So here, based purely on anecdotal evidence, is what I know about software environments.There are seven environmentsI know about seven environments that software can run in. Are all seven necessary? Probably not. In some cases they even serve similar purposes. The truth is, you only ever need ONE environment. The others serve the purpose of improving the one. That one? Production.ProductionBetaStagingQuality Assurance (QA)TestDevelopmentLocalProductionProduction is the one and only environment that matters. Production is where your code sits when people are interacting with it. Whether production is a webserver, or a distribution channel where people download and install your application locally. What matters is, your production code is the code that people rely on, bug report on, and request features on.BetaBeta is a form of production. A beta environment is the e…

The construction parable

I talk a lot about testing on this site. Part of that’s because I don’t know what I’m doing all the time, and part of it’s because I’m an egotistical developer and getting things right is important to me. The problem here is that tests aren’t what I want. They’re an attempt at a solution to a bigger problem. So this post is about that much bigger problem.Metrics suckLet me start by pointing out that there are 0 good metrics in this industry. If you built sometoolthatdoesmetrics, you might not like hearing it, but it’s completely true. Part of it is our fault, and part of it is a general lack of education. Here’s how this works in another industry where we build things.The construction parableSay you hire a construction contractor to build your home. You’re a savvy buyer and you shop around, so you get a really good deal. Along the way you notice that buying the most expensive contractor costs 3 times as much as you’re paying and you wonder how he gets any business at all. Th…

Dev v Ops

When we think about programming, we think about source code. Scenes from the matrix come to mind, with streaming source code everywhere. We think about files, and databases. We think about architecture diagrams and class structures. We think about good practices and code patterns.We rarely think about deploymentAs a developer who has routinely deployed his own applications I know what it means to be in the Operations role. I know that sometimes hardware breaks. Sometimes time-zones are incorrect. Sometimes processors get overloaded. Sometimes (nearly always) your test environment isn’t the same as your production environment. Sometimes permissions break (ACL) or your middleware goes down (IIS) or your infrastructure has to be moved to the cloud (AWS) on the weekend.It’s crazy being an Ops guy. I don’t envy the challenges they face. In fact, I hold their skill in high regard. But that’s not something I see a lot of developers do. In fact, more often than not, due to their …

wildstring

I needed a wildcard processing tool for an application I was working on.  I didn't want to use regular expressions, because the wildcard values were going in a configuration file, and regex would basically render them unreadable.  So I looked around for a wildcard library for JS and couldn't find a decent one.  In fact, when people asked for one, they generally were told "Learn Regular Expressions".  While I completely agree that knowledge of regular expressions is an incredible boon to a programming career, my response to a problem is not to tell someone it can't be solved, so I wrote a library of may own

Introducing wildstring wildstring does simple wildcard processing without any dependencies.  It works both on the client and in the server, so you can use it anywhere.  wildstring handles wildcard string processing simply.  Here are some examples
wildstring.match('Wild*', 'Wild Thing'); // returns true, because ' Thing' is matched by '…

Stop Forum Spam

For years, I've used StopForumSpam.com to find and prevent spammers from signing up for my web forums.  I love the tool, and have almost a gigabyte of stored usernames, emails, and ip addresses in my personal download of their database stored over the years.  Needless to say, I'm a huge fan.


So I made an API for it
Introducing stopforumspam, a nodejs wrapper for the REST API.  I'm really happy to have made it, and I plan to use it myself very soon.

Just do it MoreOn!

A few weeks ago, I wanted to start a robotics project that would require close monitoring and realized...I didn't have any decent monitoring tools on my network.  So I looked around at the monitoring tool ecosystem, and the only halfway decent tool was Nagios.  I wanted something that would sit on my existing stack (with MongoDB as a backend) and wouldn't have to run on the servers it was monitoring.  Moreover, I needed it to be able to run on a Raspberrry Pi.  So I built it myself.
Introducing MoreOn MoreOn is a tool for Monitoring Remotely Over your Network.  It uses SSH to tunnel into any server it can connect to and execute a command at a configurable interval.  It runs on the MEANstack, making it super lightweight, and it has a fully functional REST API to access the data programmatically.
It installs easily too, letting you run it on any computer with NodeJS and MongoDB.  This means you can spin it up on your computer just to check on data on your servers, or host it som…

One Heck of a Week

So I've had one heck of a week.  I had computer issues.  Now, I'm a programmer, so computer issues for me are usually a shrug and fixed, but this took me a whole week, so I decided to share the kind of horrendous things that happened.

The lesson to be learned
First, there is a bit of explanation required.  Over my years of programming, my main asset has been that I can get into "learning mode" where I follow instructions explicitly and don't worry so much about what each instruction is doing until it works and I can go back over it and figure out what the instructions had me do.  This experience seems to have served to teach me that there is an inherent flaw in following instructions without thinking.  In the future, while following instructions, I will try to remember to do so with caution.

How it all started
So it started with a rookie mistake.  I was setting up a raspberry pi 2 with arch linux, and the instructions require you to use fdisk.  What did I do?  I …

Programmers Don't Need to Know SOLID

A recent comment on a fairly old post was very adamant:

As a PROGRAMMER YOU MUST KNOW SOLID 
This is completely and utterly wrong, in my opinion.  I was simply going to reply, but I spent a lot of time trying to locate a blog post and the reply started to grow, so I decided to put it here.

SOLID is just a set of principles
The SOLID principles were created based on things good programmers were already doing.  The principles in SOLID are a result of people trying to write good code; they are not a precursor to it.  In other words, clean code comes naturally.  SOLID is a good concept to understand, certainly, but there's a lot more out there than one acronym to know about, and whether or not you can memorize the principles that each of the letters represents has little effect on the quality of your code.

Don't get me wrong, learning about them may help you to understand some concepts that make your code better, but memorizing anything in the programming world is....almost always …

angular-multistagebox

I was working on some character sheets for my gaming obsession recently and in trying to mimic the paper sheets I noticed that some boxes could be partially checked, then completely checked.  This just wasn't possible anywhere I could find.  I searched the internet for someone who had done this before, but alas I didn't find any...so...

I wrote one myself!
Introducing angular-multistagebox It's like a checkbox, but it has more than two states.  You can see a demo at the link above, and download via bower. bower install angular-multistagebox Enjoy!