Thoughts on the Infinite

I need a pure mathematician to discuss this with me but I have been having some shower thoughts on infinite numbers and their implications.  I am not a formally trained mathematician and am almost certainly using words like “set” and “infinite” differently than would be properly used by one, but regardless I need to get these out of my head.

First, it seems logical for order sets of infinitely large things, of a defined group, that the nature of their being ordered would mean all possible patterns for that set would occur.  For example the defined group of 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 in the order of “1”, “2”, etc through infinity would always contain any possible finite “number” regardless of the patter if we assume the patter must contain those ten characters.

Second, it seems just as logical for unordered sets of infinitely large things, of a defined group, that the nature of their being unordered would mean all possible patters for that set would NOT occur.  In other words, that because such a set is ordered in a non-exhaustive way that even if the set was used infinitely it would not guarantee all possible discrete sets would be used. For example the defined group of a, b, c, d, e… through z order via “one”, “two”, etc. through infinity would not automatically contain the word “xxxzxxznnnzzz” because such word violates the rules of the English language.  So an infinite number of words would be produced but non of them would be xxxzxxznnnzzz.

The natural implication for this is that for sets that have arbitrary rules that the normal assumptions for infinite breakdown.

A totally different question also comes to mind.   For infinite numbers that (although unordered still contain all possible patters) for example pi.  Do specific patterns in these sets generally appear random (at least within the confines of their set length?)   Is their randomness generally uniform?

OSU Oklahoma City Campus

We are all links in a chain

Another link dump building up over time in my browser history.

Linux

  • Linux Daemon How-To
  • shunit – xUnit test framework for bash
  • bats – bash Tap test framework for bash
  • Roundup – Bug finder and unit test framework for bash
  • ttyrec – Command line recorder, and playback program. Here is the github page.

JavaScript

Software Development

Management

  • Getting Things Done in 15 minutes – Nice guide to getting started with GTD.
  • Cyph – Encrypted private text and video chat.  Perfect for executive teams and foreign dignitaries.
  • Debt Supercycle vs Secular Stagnation – A generalised theory on the cause of global economic slowdowns.  This is NOT a 2 minute bullshit explanation from a politician.
  • Project Management Track – A Cousera Introduction to Project Management track I am looking at for training up some co-workers interested in pursuing a PMP.

Nethack Spoilers

After 15 years of trying to beat this game without using spoilers I have given up.  Here are some of the more useful links I have found.

Rock Creek Road

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 always 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

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

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 that the ends almost 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, 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

2014-08-02 00.01.48

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

All Your Links Are Belong to Us

I have over 200 tabs open between three computers… the insanity must stop. Link dump to follow:

Software Engineering

  • Road to Continuous Delivery – Great article covering the different stages development shops go though to get to continuous delivery.  Provides a great starting checklist of what to work on while improving your software delivery process.
  • Overview of Micro Services – Micro services have become massively popular with the advent of Node.js.  Intro to the concepts are reasoning for using micro services.
  • Continuous Code Coverage with GCC, Hudson, and Googletest– Part of continuous delivery is continuous testing of your code base.
  • Trashing ChromeOS – Guide to building ATOM processor build-chain testing servers from Chromebooks.
  • Don’t Be Afraid of Functional Programming – The parts of JavaScript I actually like are its functional programming capabilities (callbacks and first class functions baby.)  OOP programmers get a little scared of things like Lisp, but they shouldn’t be.
  • Tessel – A JavaScript compatible (via Node.js) microcontroller.  Wow.. just wow.. Includes wifi built-in and shield/breakout board compatability through Node modules.

Source Code

  • DevDocs – Seriously hell yeah!  Online, simple, clean, extensive, software documentation for programming languages and libraries.  Seriously, browser pin this now!
  • Sourcegraph – Search tens of thousands of code examples.
  • Explainshell – Type some bash in, it explains what it is and what it does.  Think man pages for the internet age.
  • LibCurl API Reference – Using Curls powerful web functionality inside of C.

Vim

  • Smart Tabs – Tabs in the leading spaces, spaces for everything else.  The way GOD intended code to be structured!
  • 76 Vim Shortcuts – Some of these I already knew, but like all things Vim… there is always more to learn.
  • Mapping Standard Shortcuts – Things like Ctrl + c for copy.  I don’t actually remap my Vim shortcuts to match but I like the article because it explains what those shortcuts are used for by default.
  • Cheat Sheet – My current favorite Vim cheat sheet.  Simple and easy to search for things… and NO ads.
  • Vim-Adventures – Learn Vim shortcuts while playing an online game.
  • Exuberant CTags – You need more jumping around in your code.  Make it easy to swtich between headers, declarations, and usage locations in your projects.

C Programming

  • JANSSON – JSON in C.  Seriously freaking awesome!
  • Ncurses Programming in C – Another Linux Documentation Project about programming.  Ncurses is a command line interface for gcc.
  • Coding Unit, C Tutorial – Great introduction to C programming.  Simple examples and be sure to check out the comments below each section.
  • TutorialsPoint, The C – Another introductory guide to C development.  Better as a reference guide that the one from Coding Unit.
  • TDD in C – Love test driven development (not so much behavior driven development.) Simply way to due it in C without external dependencies.  Here is a list of tools if you do want to use external libraries for TDD.
  • Beginners Guide to Linkers – When compiling doesn’t kill you, the linker will.
  • Going from C to Go – I really like Go, but am currently doing a fairly serious C project.  Just in case I ever want to port it.

Terminal/Serial Programming

  • Terminos – C serial interface library for GCC.  The link is to the manpage with function examples.
  • Serial Programming – The Linux Documentation Project examples for serial programming in C.  Also look at the debugging section.
  • QTSerialPort – The Qt Library for Serial port communications.  Qt is easily the best C++ code library in existence.  While most people think of Qt only when coding GUI applications; its libraries are extensive enough to use for ANY application… even from the command line.
  • Stackoverflow Serial Examples in C – Couple good examples and they got me some of my first working C Serial code.
  • RS-232 Library – Works on both Linux and Windows.
  • Serial Programming in Linux – Wikibooks book style tutorial on serial programming in Linux.  Here is the specific section on Terminos.
  • WiringPi – Serial programming interface on the RaspberryPi.  Very nice if you are using the Pi breakout pins.
  • Serial Example – Another quick example by tty1.

Cloud/Web

  • aws – The Amazon Web Service command line tool.  One of the better reference pages I have seen on it.
  • Web Graphs & Visualization – 30 tools for web based data visualization. Both Sas and Open Source tools listed.
  • Let’s Make a Bubble Map – Thematic mapping.  Includes a link to a D3 tutorial for creating bubble map.s
  • Camlistore – A personnel, decentralized, non-heiarchy based storage system that can be synced between cloud, phone, computer, and anything you can think of.
  • JSON Form Editor – Similar to a project I did myself a while back.  Automatically create forms based on simple JSON structures.  Makes it easy to to AJAX requests to build, populate, and check forms.

Cyber Security

SSH

  • Rsync & SSH – Combining two of the most powerful software utilities in existence to make backups.
  • StormSSH – I actually created a series of bash scripts to do SSH bookmarking.  Storm improves on this idea by directly editing your ssh config file with the stored entries. Wish there wasn’t a Python dependency.
  • SSH Kung Fu – Great tutorial covering some of the many of the one-off capabilities of SSH like remote folder mounting, port forwarding, and connection sharing.
  • Simplify With SSH Config – Good overview of some SSH configuration and setup options.  Plays well along side the SSH Kung Fu link above.
  • Autocomplete Hostnames – Process your hosts file under /etc/ as well as your config files for autocomplete.  I used my hosts file as a blacklist so this doesn’t work as well for me but the information was useful for the SSH bookmark system I made.
  • Commandline Fu SSH Autocomplete – A few ways to populate the autocomplete functionality for SSH.

Bash

  • Better Bash – Simple suggestions on making better bash scripts.
  • Command Tips & Tricks — Nice overview of some tip using Bash, Vim, networking, and general command line productivity.
  • Tmux Cheatsheet – If you know what tmux or screen are… then this is pretty helpful.  Otherwise you need to find out what tmux is.
  • Defensive Bash Programming – More and better ways to organize your bash programs.
  • BashGuide – Better bash than the Gnu Bash guide… or at least some people say so.  Evidently it has fewer “bugs” in its code examples.

Linux Bluetooth

  • Bluetooth on Fedora – A number of Bluetooth devices need re-pairing (or at least a user to be logged into the system) before they will connect after restart.  This is particularly frustrating for Bluetooth mice and keyboards.  Following the advice by the selected answer (as root0 solved the problem for me.  This one was annoying and hard to find out.
  • ThinkPad Compact Bluetooth Keyboard – Cannot wait until this keyboard driver is put in the mainline kernel so I don’t have to build it every time.  This keyboard allows me to use the same keyboard when using my Carbon X1 or when at my desk.

Misc

  • Clark DuVall – I don’t know who the guy it, but he has the most freaking amazing website I have ever seen!  Command-line junkie heaven.
  • Bluetooth Deadbolt – Something to keep my from having to carry another key?  Plus it lights up!
  • LibreOffice & Google Docs – Open, edit, and save/upload Google Docs directly in Open/Libre Office.  Also has support for WebDAV.
  • Switching from Photoshop to Gimp –  List of modifications to make the Gimp feel more natural for Photoshop users.
  • Industrial Strength Bubbles – Make person sized bubbles that last for several minutes.  I know what the kids and I are doing this weekend.
  • Open Energy Monitoring – Open source automation and energy monitoring.
  • Free your Android – As in Freedom, not beer.  Useful list of Free Software version of popular software on Android.
  • Shortcut Foo – Tutorials for quickly learning misc programming environment shortcuts.
Kids make things with their whole heart.  When given, they are giving a little bit of themselves to you.

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 @.

Something about Holy Saturday has always felt strange to me; like the whole world is holding its breath after a crime.  We are seeing if it was actually possible that we could get away with killing the creator of the universe.

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

Virtual Private Networking in AWS

Been doing lots of VPN setup and configuration lately, especially inside of Amazon Web Service (AWS) Virtual Private Clouds (VPCs.)  They have a built-in VPN capability using IPSec but it generally seems specifically focused on device-to-device (D2D) configurations.  Depending on the need I have turned up StrongSwan and/or OpenVPN as a solution.

OpenVPN has an advantage of being able to do SSL VPN on 443 making it look exactly like HTTPS web traffic (effectively making it unbreakable by network administrators.)  Things like proxy-servers don’t even know you are creating a VPN tunnel.  However, on Windows OpenVPN client software has to be installed to use it.

StrongSwan is a IPSec VPN option that works well with existing P2P VPN systems.  The native Windows VPN tools work out of the box with a standard StrongSwan configuration (as long as your certs have been signed by a trusted CA.)  Performance is also very good.

So far, I really really like OpenVPN as once it is configured it works everywhere, regardless of network policy or ISP limitations.  Linux Network Manager has built in support for it making is very very easy to configure clients to use it as well.  That said, for IPSec configurations needing to connect to Windows Clients; StrongSwan has been my go-to solution.

Useful links follow:

Linux StrongSwan Server

Workstation StrongSwan Setup/Install Client

OpenVPN on Ubuntu