AMPed a Web Dev Adventure blog by amarkpark

Arcana

1001 represents the decimal 9 in binary.

“Any sufficiently advanced technology is indistinguishable from magic.” – Arthur C. Clarke

The magic that conjures the form and function of the modern tech-centric world is an excellent example of Arcane Knowledge. 99% of the users consuming ubiquitous technologies of this age have NO CLUE how or why they work, or how to build them. They open smartphones and browsers and are instantly connected and living augmented reality lives without even knowing what “Augmented Reality” means.

  • Stargazing apps that superimpose constellations upon the night sky…
  • Virtual museum tourguides enhancing the physical collections with interactive digital multimedia tours…
  • Heads Up Displays built in to windshields and glasses…
  • Modern capture-the-flag games that allow you to take over virtual power centers if you are in physical proximity to their virtual geophysical location…

Examples of magic that are everyday realities RIGHT NOW. Most of the users of these technologies have NO FLIPPIN CLUE how they work. Heck, most consumers of modern technology probably don’t know how radio transmissions can make sound come out of a box.

MMXV represents the year 2015 in Roman Numerals.

Though technology is central to the essential infrastructure of much of society today, most folks who use it don’t know how to build it, service it, or advance it. Those skills are elite specializations, the exclusive purview of practitioners of modern magics: engineers, developers and sysadmins. Arcane Knowledge.

The brilliance of living in this modern world is that, while the knowledge may be Arcane, access to that knowledge is no longer limited to a subset of sacred initiates inducted into secret societies. Just as the technologies are ubiquitous, they are oftentimes also transparent. The truth is out there!

Anyone willing to dedicate the time and mental resources to learning the alchemy and spellcasting of conjuring modern technological wonders has almost unlimited access to this Arcana. Not only can you learn it, you can then feed back into the system and build upon and advance the collective knowledgebase. Cooperative perpetuation.

One Mole is 6.022 x 1023 elementary particles. Avogadro’s Number.

As magicians who conjure modern wonders do so by standing on the shoulders of giants, there are whole communities of peer magicians dedicated to helping anyone who approaches those giants to climb up and stand tall. We collectively curate our magical tome. We are all responsible for learning, practicing, and teaching each other. Thus assuring there will always be new giants, and there will always be another wave climbing upon their shoulders.

When Michael Jordan began to play professionally he negotiated a contract to include a "Love of the Game" clause. Essentially he reserved the right to play basketball pick-up games anywhere, any time and with anyone - because he loved to play.

The reality of technology today is that the Arcana is now held in cooperative public trusts by those who love technology rather than antagonistic private vaults. Anyone who WANTS to learn to conjure the form and function of the modern tech-centric world has an open invitation to experience endless wonder. Anyone who thinks they can build it better has the tools and source materials at their disposal. And we all benefit from sharing in and contributing to this public repository of knowledge for love of the game.

Code is an open book. The Arcane is open source. Drink the Kool-Aid, dive down the Rabbit Hole, build a better mouse.1

Just don’t ask me to explain the finer points of an internal combustion engine.

~AMP

1. A bad Apple Computer/1984/Xerox PARC joke.

… Yeah, OK, so I’ve kinda sorta gone off the Rails. Pun intended. Best I can figure is I’m working my way around to tying it all together.

Ode to Coffee

National Coffee Day 2015

I love coffee. There can be no doubt in the minds of any person who has ever met me that I have a raging affinity for the sacred ambrosia: dark, hot, rich, decadent COFFEE.

To illustrate, I have precisely ONE item in my Zombie-Apocalypse-preparedness kit… a hand-crank burr grinder. I have not yet managed to start my own cottage coffee plantation in a greenhouse in my back yard to GROW my own beans to grind IN the grinder, I have not yet solved the problem of how then to ROAST the coffee I will one day grow for myself (I’m sure it can be done in a skillet over an open flame in a pinch) but by all that is holy if I am ever without power I WILL HAVE THE ABILIY TO GRIND MY BEANS.

I acknowledge that this is madness, but it is MY madness.

In the spirit of National Coffee Day I wanted to post the first Gist I ever posted on Github:

And as I was contemplating this special occasion, over a cup of rich medium roast, it occurred to me that every time I edit the Gemfile for a RoR project I see Coffee-Rails.

I have wondered what it was so it seemed like a good time to look into it.

CoffeeScript adapter for the Rails asset pipeline. Also adds support for .coffee views.

And from coffeescript.org

CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

CoffeeScript is to JavaScript what Ruby is to C. Granted, that is a vast oversimplification. But this is an interesting parallel. Take something that, while powerful and functional in its own right, is perhaps convoluted and complex and make it elegant and simple.

“If I have seen further than others, it is by standing upon the shoulders of giants.” – Isaac Newton

Progress is made by advancing the collective knowledge. Ruby makes OOP elegant and simple. CoffeeScript makes JavaScript elegant and simple. These are the tools of the current builders.1

If I want to light a fire I don’t rub two sticks together, I whip out a Blu-flame Zippo. If I want coffee I grab a pack of beans, grind them, and brew them. I didn’t grow the beans, I didn’t build the grinder, but they are the tools I use to make something essential every day.

The tools available to those of us who wish to build Apps are elegant and powerful. Thus we may stand upon the shoulders of giants, coffee in hand, and build the future.

~AMP

P.S. I just want to plug RailsCasts #267 CoffeeScript Basics while I’m at it. Aimed at viewers with prior knowledge of JavaScript.

1. Reoccurring theme(s) may be imminent…

Buffer Overflow

Life has been disrupting my study time a lot in the last week. I finally got some uninterrupted time to power through a lot of lessons and assignments to get caught up yesterday. About 8 hours in I was feeling a lot like that classic Far Side above.

With the intensity of some of my study sessions I worry about retention. I promise myself I’ll go back and run through all these basics again to reinforce what I’m learning. Time constraints may make that a difficult proposition. But at least I am reinforcing what I learn as I encounter different concepts in different contexts and can thus build complex interconnections of neural pathways.

In programming for a computer, simple and elegant are ideal. Make things work in the least complex fashion and eliminate potential points of failure through conscious design and careful implementation.

In programming a human brain the more ways you can find to build pointers to new knowledge the better it will stick. Perhaps that’s why I write mental methods to describe processes I encounter in the world. And revisit them when I learn more about Ruby, refining and refactoring.

puts "Number of wags?"
wags = gets.chomp.to_i

def tailwags(wags)
	side = "right"
	wags.times do
	    puts side
    	if side  == "right"
    		side = "left"
    	elsif side == "left"
    		side = "right"
    	end
    end
end

tailwags(wags)

I was watching water boil the other day, trying to picture the code I would write to describe the transformation of thermal to exothermic to kinetic energy that happens when water boils. I don’t have that one yet, perhaps in the future.

Hmm… now I’m relating this back to OOP and trying to decide if I should define a Class for Boil and define Methods for types of energy transformations and for the chemical process of breaking apart the H2O molecule within that Class.

There we have it. Interconnections. Reinforcing each bit of new knowledge I gain about Ruby by connecting it back to other knowledge that is already in my brain. Sometime this takes me off on tangents. (Like when I use the word ‘tangents’ and then flash on writing a method to compute tangents to a circle, and a Method to circumnavigate a circle within a Class for Circle… which takes me back to my Logo days and “down turtle” as I program the computer to draw a circle.)

This trippy programming-of-yore flashback has been brought to you by the letter: ə

See? Buffer Overflow. Perhaps it’s time for a reboot. :-)

And now back to our regularly scheduled programming.

~AMP

Syntax and Context

Wow. I can’t believe it’s been over a week since my last post.

I’ve been finishing up a second Web App and working on the fundamentals of Object Oriented Programming, building a class for playing cards and a class for a deck of cards and making them play well together (pun fully intended.)

Last night when I got home from playing DJ (note: I’m not a DJ, but sometimes I play one on the radio) I got back to the business of studying Ruby. I wanted to at least read through my lesson/challenge for today so that I could let my brain crunch on it over night. All hail unconscious cognition!

Problem was, when I was reading through one of several linked documents on Fun with Arrays I found a mildly confusing line of code using “«” to build a puts output. Aroo?

Learning a new programming language is much like learning any communal human language. Not only do you have to learn the vocabulary, you have to learn the proper sentence structure, syntax and punctuation.

In programming languages that means learning lots of new operators and syntax. Programmers prefer to be, let us say, EFFICIENT by nature (some may call it a tendency towards laziness,) so there are also a lot of contextual shortcuts used in programming languages.

Reading code is very similar to reading pure Physics or pure Math: Comprised of symbolic notations and flagrant abuse of the greek alphabet, it can be intimidating to the uninitiated. Learning to read code can sometimes be the equivalent of learning to read hieroglyphics. If you are caught without your Rosetta Stone it can be confusing at times.

That was certainly the position I found myself in as I was reading a blog post about 2D Arrays. In it there was sample code using a puts statement with an each_index loop to walk through array values and output them to the screen with other characters and spaces to be organized in a meaningful way for the reader.

Working with Arrays, the “«” operator is generally used to push a value on to an array. It was clearly NOT being used to do that in the puts statement.

After much searching and hair-pulling I found that in the context of Strings “«” is a concatenation symbol to append a value to the current string. Granted I could see from the code and expected output that that was the anticipated action of the symbol, but my journey to the supporting documentation led me a merry chase through the land of string-literals and Here Doc notation.

RTFM right?

I don’t know if this was a case of me missing that left turn at Albuquerque or a case of contextual foul. I DO know that multiple functions of the “«” operator are now well-cemented in my brain, specifically BECAUSE it was a point of contention for me that required special attention for clarification.

I’m considering this detour as I would consider taking the scenic, tree-lined, hilly route on my Mean Streak… I’m out to enjoy the ride.

~AMP

Community

Peers. Tribe. Peeps. Pack. Niche. Whatever name is meaningful to you the takeaway is this: It’s good to have Community.

I spent a brief but priceless interval consulting and conversing with the student community at FHP this afternoon. They were generously and eagerly helping me troubleshoot an App up on Heroku. It was an amazing experience for me.

I am a rather self-sufficient sort. Life-long caretaker personally and former Network Specialist/Sysadmin for 14½ years professionally. I am USED to working without a net. Having to figure stuff out for myself because there is nobody else to turn to. That tends to be my Modus Operandi. It’s my ground state. My normal.

The half hour this afternoon where my fellow students and alumni acted as a sounding board for me was magic. I don’t actually mean in the @chat instance scope per se, I mean in the $chat global or universal scope. Today was inspirational, the hint of tomorrow++ was even more so.

Having folks to cooperatively collaborate with me, sharing of their knowledge and taking the time to toss ideas around with me was an immensely positive experience. I can only hope this is what team development will be like. I have always enjoyed brainstorming and group strategizing. Everyone bringing their strengths to the table and building something grander than the sum of its parts.

I’ve spent a lot of time in the last few years contemplating the act of Finding Your Tribe. And while I can’t say I’m quite there just yet (my day-to-day life is still lacking in like-minded individuals) when it comes to being immersed in a supportive community and the power of that experience to help your dreams take flight I can say for certain that the experience is part of my current learning paradigm1 with the Firehose Project. And today that hit home.

Scott talks about Community starting ~10:46. But watch the whole thing, seriously.

~AMP

1. Heh… Paradigm… also known as a Model.