My Creed

Over the course of the last couple years of I have been putting more thought into some of the core beliefs I hold about things other than faith or family.  How do I see the world and how does such beliefs affect my decisions and opportunities.  Piece by piece I have been writing these down and although I am certainly NOT done, have decided it is time to actually “say” them out loud.

I believe in actions and distrust intentions.  Every man believes in the cause of his behavior even when that behavior brings about pain and suffering.  Those who created socialism believes they were bringing about an egalitarian utopia and inquisitors believed they were saving the souls of men.

Concentrated power is not rendered harmless by the good intentions of those who create it. –Milton Friedman

The evil that is in the world almost always comes of ignorance, and good intentions may do as much harm as malevolence if they lack understanding. –Albert Camus

The logical corollary to my first belief is that I believe that the ends never justify the means.  Partly because, I believe that there is no ultimate good that springs magically from a “necessary” string of injustices and evil.  But also because we become what we do and our actions ultimately sculpt us into the object of our behavior.

…let a prince have the credit of conquering and holding his state, the means will always be considered honest, and he will be praised by everybody because the vulgar are always taken by what a thing seems to be and by what comes of it; and in the world there are only the vulgar, for the few find a place there only when the many have no ground to rest on.  –Niccolò Machiavelli

I believe those who desire to “throw away and start from scratch” dramatically underestimates the complexity of a given problem.  Real change happens through evolution over time, through trail, through error, and through the accumulated power of experience to reinforce decisions.  Throwing away history for no reason other than frustration with having to deal with it, most often causes one to repeat it.

It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time. First of all, you probably don’t even have the same programming team that worked on version one, so you don’t actually have “more experience”. You’re just going to make most of the old mistakes again, and introduce some new problems that weren’t in the original… –Joel Spolsky

I believe people are most truly defined by the parts of ourselves that we say NO to.  I don’t drink, I don’t borrow money, I almost never drive a car, and I won’t have sex until I am married, say more about a person (good or bad) than the 10,000 things everybody does or everybody wants to do. Saying yes implies we are like everyone else, that you capitulate to the will of society.  Saying no is self sacrifice and a dramatic statement of individuality.

Be who you are and say what you feel, because those who mind don’t matter, and those who matter don’t mind.  –Bernard M. Baruch

If then follows that I believe great acts take great sacrifice and the only sacrifice this is truly great is self sacrifice.  While it may sometimes be necessary to force others to sacrifice, there is never anything admirable about it.  No man should be held in esteem for giving something that he took from someone else.  Sacrifice is not sacrifice when forced upon.

A man who was completely innocent, offered himself as a sacrifice for the good of others, including his enemies, and became the ransom of the world. It was a perfect act. –Mahatma Gandhi

The really important kind of freedom involves attention, and awareness, and discipline, and effort, and being able truly to care about other people and to sacrifice for them, over and over, in myriad petty little unsexy ways, every day. –David Foster Wallace

I believe, and can categorically prove, that the free market is the greatest vehicle for eradicating poverty, hunger, and disease that has ever existed.  Nothing, no government program, no charity organization, no religious denomination has come anywhere close to the success that the free market and capitalism has at improving the corporeal lives of the human race.

Commerce [and] entrepreneurial capitalism take more people out of poverty than aid. We need Africa to become an economic powerhouse. –Bono

It is not from the benevolence of the butcher, the brewer, or the baker that we expect our dinner, but from their regard to their own interest. –Adam Smith

Thunder on the Plains

ThunderPlains 2015 is over and overall I was impressed with the quality of the presentations, the overall event, but mostly the OKC community as a whole.  Particularly as this was only the second year of this event.

The day started with a significant announcement, CodeForOKC.org will hold its first meeting later this month.  Most people who know me, know that I am a small government libertarian; but I am a huge fan of local government (government is best when it is closest to the people it represents.)  This will give coders a chance to service their local community.  The first meeting will be on October 27th at 6:00 PM, check out the meetup.

Listed is some of the presentation material, links, and references mentioned by the presenters (at least for the sessions I attended.)

Mobile Applications with JS & Iconic

So Tell Me Again Why We’re not Using Node.js

Supercharge Your Productivity with Ember.js

Building Massive Angular Apps

Your Grandparents Probably Didn’t Have Node

The Importance of Building Developer Communities

Life is what you make of it

The most difficult aspect of software development for new programmers often has nothing to do with algorithm complexity or syntactical quarks; it’s all the other “stuff” associated with building, managing, and testing software systems.  When a developer steps into a existing business that already has a software stack to support the problem can be mitigated by relying on the institutional knowledge that the existing developers have formed over the course of maintaining their software.  I haven’t, in most cases,  had that fortune  in my career because either a) I was the companies first software engineer, or b) the existing software engineers had become proficient at a “alternative” software stack (and honestly, alternative is the kindest word I could come up with for Mainframe/Cobol.)

The longer a programming language has been around the more complex these build & management tools get.  The reasons are pretty simple.  The longer a language has been used, the more complex and more broad the uses of that language become.  Build tools generally start off pretty simple (make was originally an 8 line bash script for gods sake) but they must expand to cover more and more complex setups with more and more non-standard configurations.  In the most extreme cases the support tools even need to consider multiple platforms on multiple hardware configurations.  This problem can be exacerbated when a language needs to be “compiled” (and I use the term loosely) or works on “core” systems, meaning closer to the hardware, network, or data layer.*

C suffers from all of the above listed problems and more.  Having been around for around 40 years, in constant usage, on every platform ever made (super-computer to toasters), used for hardware drivers, operating systems, core network stacks, and even to create other programming languages; means that C can be the most complicated system ever supported by mankind.  I’m really not kidding about this.  More than one person has pointed out that the Linux kernel (95% pure C code) is many orders of magnitude more complex than sending a man to the moon is or even sending a woman to Mars will be.  Anyone who has had to create a Gnu build-chain supported C program from scratch has had to kill themselves learning the intricacies of make, automake, config, autoconfig, m4, autoreconfig, cmake, libtools, and autoheader.  Seriously, a “correct” Gnu C project with 1 header file and 1 c file has 26 buildchain files supporting it on initial setup.

Recently I have been doing some really interesting C development on micro-mobile platforms.  The first language I did significant (i.e. not a GWBasic MadLibs game) development on was C.***  My college experience with C was relegated to a couple hundred lines and using the up arrow to re-compile the program after changes.  Now my annoyance with with the autoconf build tools (and its many many gotchas) is replaced with the need to support cross-compiling, manage external libraries, and automate build deployments.  I have had to learn each of these tools and what it is they accomplish for me so I don’t have to re-invent the wheel.  Here are some of the more useful sources of information I have come across:

  • Gnu Autoconfig, Automake, and Libtools – by Gary V. Vaughan, Ben Elliston, Tom Tromey and Ian Lance Taylor.  Available as a Web Book it covers the entire build chain and practical usage of each of the tools.  Also does a great job of showing how modern technological development owes a huge debt to the flexibility and power these tools gave (and continue to give) C developers.
  • Gnu.org amhello – A “Hello World” tutorial for getting Autotools setup and configured in a simple project.  Great example for getting a full build setup running for C.  The full code of which can be found in the automake doc folder on Linux systems, generally something like /usr/share/doc/automake/amhello-x.x.x.tar.gz.
  • Clemson Automake by Example – Old article (the pages images are all broken) that walks through a simple C program and its build chain.  Excellent tutorial for getting a notice programmer setup with a distributable and effective build environment.
  • Autotools Mythbusters – Practical, if high level, overview of autotools and its associated components.  There is an Appendix with a list of examples that is particularly outstanding.  Think stackoverflow for autotools that has been aggregated into a Cookbook.
  • Simple Makefile Tutorial – A newbie guide to creating Makefiles for building software.  If I include code examples in the project documentation I will generally create a simple Makefile that will build the examples with a “make someexample”.
  • Martin Mann’s HowTo Autotools – The examples are in C++ but the step by step process to add functionality to the autotools build chain is outstanding.  Especially useful if you have figured out some of the basics already.

Finally, because setting up and creating the necessary files for getting a C project started in libtools/automake are so annoying, I decided to create a single file bash script to do the work for me.  You can find it as a gist on github.  You can download and run it by doing a:

wget http://tinyurl.com/brockers-cmaker -O ~/bin/cmaker && chmod +x ~/bin/cmaker

On the Linux command line.  Then create your new C/Autoconf project with cmaker init newprojectname.  My primary concern with the script was that is should need NO outside dependencies besides libtools/automake itself and that it has everything needed to start the autoreconf –install, ./configure, make process.  Hopefully I will add some additional functionality to it soon.

* As an example, look at Perl.  It initially started as a glue language to allow developers to piece together software solutions in a single language instead of having to create divergent sed, awk, and grep scripts in sh**.  Then the WWW took off and the little glue language became the core component of the most powerful websites on the planet.  Perl went from being a support language to the core language of all things http.  The number of tools exploded.  CGI.pm, mod_perl, and DBI gave the developer massive power but managing these libraries in production created a boom of support tools (kids these days forget that cpan was the ruby gems/bundler of its day.)

** As a side note that last sentence sounds more like a caveman grunting then a discussion of software development tools.

*** OK, ttechnically it was C++ but our CS chair was a former NASA Chief Engineer who basically taught us C using a C++ compiler… with a little Class thrown in.  I think my first object was linkedList with methods push and pop.

That’s not writing at all

Cheatsheet of some of the more useful vim commands I have run into lately:

  • ci(, ci{, ci<, ci", ci' – Delete and insert into text between (, {, <, “, etc.. brackets.  Really useful for things like function arguments and quoted text.
  • ca(, ca{, ca<, etc... - Same as above but removed the "bracket" as well.
  • yi(, di{, va<, .. – Yank content between ( and ), delete content betwen { and }, select content between < and > including brackets, etc..
  • ZZ – Quick same/close, works the same as :x.
  • * – Search for word under the cursor.
  • gv – Re-select previous selection block
  • q<letter> @<same letter> – Record a macro with q (named letter) and play it back with @.

Always Remember…

The Bill of Rights is a literal and absolute document. The First
Amendment doesn’t say you have a right to speak out unless the
government has a ‘compelling interest’ in censoring the Internet. The
Second Amendment doesn’t say you have the right to keep and bear arms
until some madman plants a bomb. The Fourth Amendment doesn’t say you
have the right to be secure from search and seizure unless some FBI
agent thinks you fit the profile of a terrorist. The government has no
right to interfere with any of these freedoms under any circumstances.
–Harry Browne

drift toward unparalleled catastrophe

My home configuration has two Planar 20″ monitors as my primary display.  They have worked fairly well with the exception that any sudden change in input signal seems to cause them to freak out and changed their sync levels to non-standard ranges.  Resetting them is the fix but Planar is kind enough to NOT mention how to do that in any of their documentation.  So, for the benifit of mankind here is the process for resetting a Planar PL2010MW to factory default>

Unplug the monitor.  Counting from the left, there are five buttons on the bottom of the monitor (the right most being the power button.)  Press the second and fourth buttons from the left and hold them down while plugging the monitor back in.  Count to five, and release.

Other models of Planar use the second and third buttons with variations of releasing immediately after plugging in; or waiting until the main power light turns green.  In addition, if you are using some versions of Linux you may have to restart X before you see the minor in your hardware setup.

This is how the world end

I have a family member who recently said to me that if I posted pictures of them on Facebook, they would stop speaking to me.  This, entirely understandable, concern stems from their conscious concern that personnel information collection by large companies has a tendency to be abused.  Once you have surrender your privacy it is nearly impossible to get back.

What made the conversation stand out to me wasn’t their “fear” of business; but that this particular family member is one that inherently trusts government to solve this (and many other) issues.  There seems to be a fundamental disconnect between the perceived danger from business and the real danger of government.

Coca-cola cannot force my soda consumption (or limit the size of my cup.)  Google cannot regulate which sites I am allowed to visit, or what the content of those sites can be.  Phillip-Morris is entirely unable to limit the extent of my free speech by defining who is, or is not, a “legitimate” reporter.  And while Facebook may want to use your personnel information to sell you crap, or profile you activities; it doesn’t have the ability levy punitive damages, listen in on any phone conversation you have ever had, or target you with a drone strike.

One’s personnel privacy should certainly be safeguarded, but a healthy fear of the abuse of capitalism should always be tempered with a real fear of the only institution that has the ability to use force against us.  An institution that has demonstrated time and time again that it abuses that force to the detriment of both our privacy and our liberty.

Unless you continue to remember it

The dynamic device interface for Linux is called udev.  Generally it works without complaint or frustration but it does have some interesting side effects if you are doing more involved system configuration.  The one that tripped me up today is that udev keeps a record of every nic card that has been dynamically created during it’s lifetime.  For example, if you are using wireless USB nic (see my post yesterday) and you plug in a different one than you used before; the new nic ID is going to be wlan1 instead of wlan0.  Generally nobody would care; but in this case I did.  Thankfully modifying these records is pretty easy.  The device history is stored in /etc/udev/rules.d/70-persistent-net.rules and can be modified by hand.  Just change the wlan1 to wlan0 and delete the other entry.

Once again, text file configuration is FREAKING AWESOME!

The gap between the ones and the zeroes

Wireless configuration on embedded Linux systems has been pretty well documented for a while now.  If you are running a Desktop version of Linux then the probability of your wireless device being supported (either natively or through the WindowXP visualization layer NDIS) is likely to be transparent to you.  The situation is slightly different when you enter the embedded side of Linux where non-native driver support is really not an option.  That said, I have fallen in love with the Edimax Technology wireless USB nic (it uses the RealTek chipset) because they are smaller than my thumbnail, work with any Linux distribution you can think of (even Raspberry Pi), and  cost about  10 bucks.  Heck, they even support 802.11n.  To get this thing enabled/working on Debian from the command-line has been pretty simple.

apt-get install firmware-realtek
modprobe rt18192cu
ifconfig wlan0 up

Then iwlist wlan0 scan will show you a list of the available wireless networks.  Basically apt-get download the drivers, modprobe installs the the drivers, ifconfig turns on the wireless device (otherwise you get a wlan0 Interface doesn’t support scanning : Network is down when you try to scan the.  Not exactly the best error message, but anyway…