Saturday, December 20, 2014

Upgraded to HTC One M8

I upgraded my phone from the original HTC One to the HTC One M8, which was a really clear choice because I just loved the HTC One, but unfortunately this is what mine looked like eventually:


It still works, if you want it for parts!

The M8 is exactly what I was looking for. It feels familiar, like holding a softer edged version of my One that fixes a few of a rare complaints I had, mostly around the purple-tinted sapphire lens camera. This is the first time I have replaced an Android phone without being frustrated by the performance of the previous. My HTC G1 (the first Android phone) and my LG G2 X (the supposed successor flagship) were both great phones when I got them and I still have both, in various levels of “working condition”, but they both showed signs of age as newer and newer applications ran sluggishly or refused to run at all on their dated hardware.

Android hardware skyrocketed for the first few years, but I think we’ve seen it taper off now, and that’s a good thing.

So these days I can buy a phone and just select it based on factors that don’t have much to do with the hardware, because all of it is pretty great. Its hard to buy a bad Android phone these days if you aren’t some kind of hardcode mobile gamer.

Tuesday, December 02, 2014

Handmade Hero



Handmade hero looks like an amazing project.

If you're a long time game developer, new to it, or develop in some other discipline I think you have to respect the goals Casey has laid out for himself here. Developing an old style game from scratch live every weeknight is both a wonderful personal project and a beautiful piece of art.

Check it out!

Codex Vitae

I've come across Buster Benson's attempt at a Codex Vitae, which he got from Robin Sloan's Mr Penumbra's 24-Hour Bookstore and I'm hooked. This is an idea that has come to me on its own, and I've made some personal attempts at it. But having a name for it, seeing others pick up the idea, it makes it feel more validated and more real.

I am not sure what form my own Codex Vitae will take. Will it be public or private? Will I update it ad hoc or develop some rules around when and what to update? What topics are on and off the table for it? But I've got literally the rest of my life to figure that out.

A project I can't finish until the moment I die? This is kind of perfect for me.

Monday, November 17, 2014

NaNoWriMo 2014: Days 9-16

My NaNoWriMo attempt will not complete during the competition dates, but that doesn't mean I count it a failure. Most days I'm getting some words in, some days only a hundred or two and others a couple thousand. I keep at it, and I keep solving problems in my attempt to tell the story before me.

I won't win NaNoWriMo, but I will finish my novel. That's the thing I care about. NaNoWriMo is a great event and I hope to win one day, but right now what it represents for me is a springboard towards my dream of finishing and publishing a novel. I'm not going to let that same inspiration be a weight that drags me down, so not completing my 50,000 words before the end of this month isn't a failure. It is just the reality of finishing this novel.

The truth is, if I don't, it isn't about what I did or didn't do today. The larger factor is how rusty and out of touch I am with writing. It takes practice, like any skill, and I am woefully lacking in that practice. This novel, of course, is providing just that. And I'll continue to practice beyond the month of November. I'll practice by finishing this book no matter how long it takes. I'll practice by writing short stories that fit on a page when they strike me. I'll practice by telling stories that fall into a dozen or two pages when I need to tell them. I'll practice when revise my drafts and turn them into something better and learn from my mistakes.

I won't give up.

Sunday, November 09, 2014

NaNoWriMo 2014: Days 7-8

Day 7 I took a deliberate break, as a gamble. I was feeling some strain and I needed to show myself that I can take a break when I need it, so I spent the evening watching a movie with my son (Honey, I Shrunk the Kids) instead of writing that evening.

I decided to catch up starting this weekend, but slowly instead of trying to do enormous days that would just kill me. 2000 words a day is enough to catch up over the next week without pushing myself too hard, and I do think I can do that. I did 2200 words on November 8th, and they were good words and a scene I was happy with. I'm feeling good.

There are a lot of questions about how to get through some of the "rising action" that needs to happen between now and the planned summit of my story, but I'm feeling ever more confident that I can get there. Not just that I can get there, but that I can get there through an engaging story that someone might enjoy reading. I'm really feeling good about this.

So, plans can change. You need to adapt if what you're doing isn't working. Writing advice from a recent NaNoWriMo update is very fitting.
It is not important that you stay the same writer you are now

Saturday, November 08, 2014

I Miss The Old Google Chrome

I miss the days when Chrome felt like a window onto the Web.

Google Chrome was my favorite browser for a long time, almost since it first was released.

I wasn’t just buying into the Google fanclub, or at least I want to believe it was more than that. What I saw in Chrome was something that I felt was exactly right in the world where I saw the web growing more powerful and able every day.

At one point I recall saying that Firefox was about how much the browser can be for you, while Chrome was about how it can get out of your way and expose the web itself as directly and cleanly as possible.

I was behind this idea of a window into the web full heartedly because I thought it was the best way to promote everything the web could be.

How much has this changed?

Today, I’m not sure if the situation has reversed, but I am certain that my old view of Chrome is no longer something I can stand behind. Chrome has changed a lot and shifts further from its roots as a neutral arbiter of a clean web. Sadly, I don’t suspect this is going to change.

At one point Chrome represented a pure web, which is important because we need a voice that affirms the web is a worthy goal on its own.

This is no longer the feeling you get when looking at Chrome with the host of “Chrome Apps” ready to be installed, built from a platform that was born of the web, but walks its own line. Chrome has different classes of app-citizens, web apps and Chrome apps, and this is a drastic departure from its earlier days when it took those pure web applications and thrust them into the desktop kicking and screaming. I remembered how excited and happy I was to click that “Open as Window” option among the applications that were really nothing more than a bookmark. Suddenly, thousands of amazing web apps became near-first-class citizens that sat right beside my native applications.

I was sure that I was given a peek into the future.

Screenshot+2013-04-16+at+12.25.14+PM.png

Maybe it was inevitable. Embrace, Extend, Extinguish is the mantra that seems to drive Google product decisions. They play the game well.

I’m not saying Chrome apps aren’t a nice thing. I’m not saying they aren’t without merit. But Google made a very calculated and deliberate decision to sunset their support for pure web apps to push their own platform. Browsers always have new APIs that are experimental or that they’ve implemented from a standard first, but Chrome apps don’t represent even that illusion of playing nice. Even Microsoft is doing better with this for the last several releases of Internet Explorer.

It was a nice ride, Chrome, but I don’t think you can be my browser anymore.

Friday, November 07, 2014

NaNoWriMo 2014: Days 5 - 6

Today was my worst day writing yet. I spent two hours writing less than 300 words. What doesn't make sense is I had a better idea what I wanted to write today than I have had on any of the days up to this, so how did I have so much more trouble getting that down? I had the scene I wanted to write all worked out ahead of time, at least the basics. I was making it all up as I went up to here and I was able to write a lot better than this.

Maybe knowing something up front caused me to second guess myself like what I was writng didn't match up? I don't know, but i need to get over it. I still haven't finished the scene.

My plan to catch up is to write 1500 tomorrow and then 3000 on both Saturday and Sunday. I think that will get me where I need to be. On the weekend I'm going to find an hour each day and write out on the porch in the cool air. Some change of scenery would be good.

See all my posts about NaNoWriMo 2014

Wednesday, November 05, 2014

The Range of Content on Planet Python

I've gotten a number of requests lately to contribute only Python related material to the Planet Python feeds and to be honest these requests have both surprised and insulted me, but they've continued. I am pretty sure they've come from a very small number of people, but they have become consistent. This is probably because of my current habit of writing about NaNoWriMo every day and those who aren't interested not looking forward to having the rest of the month reading about my novel.

Planet Python will be getting a feed of only relevant posts in the future, but I'm going to be honest: I am kind of upset about it. I don't care if anyone thinks it is unreasonable of me to be upset about it, because the truth is Planet Python means something to me. It was probably the first thing I did that I considered "being part of the community" when I submitted my meager RSS feed to be added some seven years ago. My blog and my name on the list of authors at Planet Python are both as old my son, who's birth gave me the push I needed back then to focus on my software craft and build the freelancing business that launched my career.

In my mind you can't separate the Python and the personal. So these complaints that any of my posts that aren't explicitly about Python would appear on the feed feel... wrong. And they also feel strange, because if everyone on Planet Python had only contributed Python material to the feed I would have found it boring years ago and unsubscribed.

I never saw it as a place to read Python content, but as a place to read content written by Python developers. We have a lot more to say than our indented language and that's a good thing. The posts about our other interests give the community character and introduce us to each other. To strip the community down to our writings on and only on Python software developments feels so cold and impersonal. Is that really what people prefer?

Please let me know what you think, on either side of this. Either way, I've been asked to provide a narrow feed and I'll do that. I just wanted to get my feelings out on it and I'd like to know: Am I the only one who would hate to see Planet Python that was nothing but Python posts?

Tuesday, November 04, 2014

NaNoWriMo 2014: Day 4

I ended today with only 6671 words. Staying on par would have been 6667 so I was only four words over, and worse I only wrote 1600 words today. That's technically under goal for the day, but I'm on pace for the month. I made the mistake of not getting even a little writing time in during the morning, before work, so I had everything to do sitting down at night. If I aim to get back on track I need to get in 30 minutes tomorrow morning and the mornings after that, giving myself a head start for the day.

Jory MacKay's How I Forgot to Write was a particularly personally hitting piece to read as my daily writing motivation. If we aren't careful we can let the skills we have wane and that is certainly something I think happened to me at some point in the last five years, and regaining those skills is a big part of what I'm doing NaNoWriMo.

The six-step program outlined is full of gems. Among the two that I hold most closely to my own writing: Find a routine and Learn to love editing. From these two the most important lines I'm carrying away today will help motivate me.
what matters is that you set a schedule and stick to it.
 and
Writing is editing.
 But, really, you should read the whole piece.

See all my posts about NaNoWriMo 2014

Monday, November 03, 2014

NaNoWriMo 2014: Days 2 and 3

Yesterday I did my best to make up some of the time I lost in an opening day that knocked some of my pride out. I wrote a lot slower than I had anticipated on Saturday and I didn't expect that to change, so I took advantage of a Sunday with little plans to take up my time and had three writing sessions.

I wrote around each meal, so three through the day. My son took it upon himself to join me for two of them, and he got a little distracted when he learned what text formatting was in his word processor (Google Docs) but setup upon himself a goal of three sentences a day as a minimum, and more if he more ideas. This is a good goal for an eight year old writer.

There is a line I have to walk where I'm not encouraging him enough on one side and I'm just trying to push him because I want to share writing with him on the other. He didn't want to write on Monday, but I let it slide because of the balance I need to keep on that line.

I ended yesterday above schedule, but I'm basically on par today with 5058 words on a day when 5000 would be the goal. 58 words over barely count, so keeping ahead is going to mean a chance of pace. My plan is a 30 minute writing session in the morning after my morning pages, which can hopefully help me hit 2000 words every day.

Today I sought out a piece in my reading queue on writing and I found an interview with Stephen King on writing first lines. This is good, because I don't have a first line yet.

Open a book in the middle of a dramatic or compelling situation, because right away you engage the reader's interest. This is what we call a "hook," and it's true, to a point.
 I encourage anyone with the interest to read it, and anything else King ever has to say on writing.

See all my posts about NaNoWriMo 2014

Saturday, November 01, 2014

NaNoWriMo 2014: Day 1

Word Count: 2075 / 50,000

Today I began the first writing of my 2014 entry in the popular NaNoWriMo contest. This is my second entry, but I haven't finished the challenge in the past and hope this year is the first i make it. I feel good about it. As part of this, I'm trying to read more and read more about writing, too.

An exerpt from todays piece on writing, This Is Your Brain on Writing by Damien Walter:

During brainstorming, the novice writers activated their visual centers. By contrast, the brains of expert writers showed more activity in regions involved in speech.
Damien continues to lay out three problems caused by this disconnect in mental approach. I recommend reading his post

See all my posts about NaNoWriMo 2014

Wednesday, October 29, 2014

The Curl Pipe

If anything deserves to be called an anti-pattern it is probably the common and worry-inducing practice of documenting your installation process by asking asking users to copy and paste a line into their shell that will snag some file off the internet and pipe its contents directly into your shell to execute.

Sometimes this is even done as root.

This is something known to be awful, but which remains a cornerstone via its use by some of the most important tools in our belts. Homebrew does it. NPM does it, too. And some projects look better, but are they? Pip asks you to download get-pip.py and run it to install, which isn’t practically any different than piping from curl, just less efficient.

But worst of all, we might as well be doing this even more often, because our most depended about tooling is all just as guilty even without doing the curl pipe sh dance. What do you think happens when you pip install your favorite Python package, anyway? Pip downloads a file from the internet and executes it. Simple as that, for the purposes here. Sure, these days we have saner defaults. It has to be HTTPS and it has to be from PyPI by default, but its not like these packages are screened.

For all our concerns about security and frets over SHELLSHOCK and POODLE vulnerabilities, doesn’t it seem like the developer community does an awful lot of executing random files off the internet?

Wednesday, October 22, 2014

Dead To Me! DomNomNom

DomNomNom was a toy templating tool for front-end web applications I built during a long ride in the passenger seat. The idea was to build a templating system that required minimal, and in many cases, no template at all. I wanted to see if it was possible to map data directly into markup structures based purely on semantics.


For example, instead of some mark up that rendered a title into the page like {{ title }} we might just map the <h1> tag to the title in the data binding.


$(“body”).domnomnom({
“h1”: “This is the title”,
})


And it was really easy to get this basic setup in place quickly. I began to take it further. I allowed mapping lists of data, which would clone an element instead of simply inserting the text contents into it. Suddenly I could render tables and lists with ease.


“ul”: {
“li”: [“one”, “two”, “three”]
}


And the markup’s original <li> would function as a template to clone for this content. It was very clean to write templates for, because they were just mark-up with dummy data and content in them. This meant a designer could build the templates with whatever tools they wanted and the data could just get pumped into it.


DomNomNom in its final state supports mapping syntax that can handle attributes and properties, so you can map into form fields and the like. There are also controls capable of changing the order cloned elements are inserted and allowing the clone templates to be controlled better. If I removed the empty lines for formatting, the whole thing would come in under 100 lines of Javascript.


I built this on jQuery, but if I re-did this based on modern browsers with querySelector it probably wouldn’t grow by more than a dozen lines, and would be a lot faster.

Check it out, if just to see.

Monday, October 20, 2014

The Problem with Coders' Technology Focus

Coders focus on code. Coders focus on toolchains and development practices. Coders focus on commits and line counts. Coders focus on code, but we don’t focus as well on people.

We need to take a step back and remember why we write code, or possibly re-evaluate why we write code. Many of us might be doing it for the wrong reasons. Maybe you don’t think there can be a wrong reason, and I’m not entirely sure. What I am certain of is that some reasons to code lend themselves to certain attitudes and weights about the code and other motivations might mandate that you take yourself more or less seriously.

We’re taking the wrong motivations seriously and we’re not giving enough attention and weight to the reasons for code that we should.

The most valid and important reason we can code is not what hackers think it is. A good hack isn’t good for its own sake. No programming language or tool is inherently better than another. The technical merits of the approach or of the individual are not the most important factors to consider.

Our impact on people is the only thing that truly matters.

Twitter isn’t great because they developed amazing distributed services internally to support the load requirements of their service, but because they connect millions of voices across the globe.

RSS isn’t great because it encapsulates content in an easily parseable format for client software to consume, but because it connects writers to the readers who care most about their thoughts and feelings and ideas.

The amazing rendering tools built in-house by the likes of Disney aren’t amazing because of their attention to physical based light simulations and the effort required to coordinate the massive render farms churning out frames for new big budget films, but for their ability to tell wonderful stories that touch people.

The next time you find yourself on a forum chastising someone for writing their website in PHP, pause and ask yourself why that was the more important question to ask them than “Does this fulfill something important to you or your users?”

When you are reviewing code and want to stop a merge because you disagree with a technical approach, take a step back and ask yourself if the changes have a positive impact on the people your product serves.

Every time you find yourself valuing the technical contributions of team mates and community members, make sure those contributions translate into enriching and fulfilling the lives of that community and your workplace, before the technical needs.

Nothing that is important can be so without being important for people first.

Sunday, October 19, 2014

Farewell to XMLHttpRequest; Long live window.fetch!

The days of XMLHttpRequest and weird choices for capitalization are numbered. WhatWG has a spec ready for some time now to replace it: window.fetch. Just look at how easy it is.



Just look at how nicer that is all with soon-to-be native APIs. But you don't have to wait, because there is a polyfill available. Start using the Fetch Polyfill in your projects today.

Thursday, October 16, 2014

I Want to Write More Often

I want to write more often. I’ve been writing more lately and I hope to continue that, and I think expressing why this is important to me is valuable so here is that post.

I want to explore my thoughts more concretely and have a record of how I came to my stands on the positions I believe in, and I want to keep track of the ideas for stories I have. Rather than have some bothering me constantly, I want to feel safe that I can forget things.

Writing ideas can also get them out of your mind. The act of writing about it can often free your mind from the burden of so many thoughts. You can be more confident in an idea, or let it go out of your mind now that you’ve written it somewhere safe and permanent.

I like the idea of turning my thoughts into essays. A thought is ill-defined. A thought is hard to grasp, even inside your own head. Thoughts are connections between so many points in your mind, but a well written essay is a single coherent position. It is a statement at a time and place that expresses a piece of yourself succinctly and I really appreciate that about writing.

Writing makes creative endeavours more accessible and helps keep my brain active and healthy. This practice of expressing thoughts in writing also gives you the practice in patterns of thinking that are better structured. The more of your thoughts find their way onto paper (literally or virtually) the easier they’ll come because your mind will learn to organize them better.

I’ve begun the practice of Morning Pages again after years of allowing the habit to lapse.

Morning Pages are three pages of longhand, stream of consciousness writing done first thing in the morning. *There is no wrong way to do Morning Pages*– they are not high art. They are not even “writing.” They are about anything and everything that crosses your mind– and they are for your eyes only. Morning Pages provoke, clarify, comfort, cajole, prioritize and synchronize the day at hand. Do not over-think Morning Pages: just put three pages of anything on the page…and then do three more pages tomorrow.

I use a version of morning pages called 750words.com which is a fantastic tool that helps you write every day by tracking your words (750 words is roughly three pages) and each month provides a challenge to fill every day with these words.

It has helped a lot. I start every day writing between 750 and 1000 words with as little pausing as I can. In this time I get lots of stressful and worried thoughts out of my mind, or get a chance to think harder about them and settle on decisions that have been bothering me. I begin each day by clearing from my head many of the distractions that would keep me from the things I enjoy and the things I need to focus on.

My work and my happiness have both improved as a result, I believe. I find myself focusing on work easier and I find myself able to enjoy my relaxing and hobby times, as well.

What is most interesting, perhaps, is how much more I have written in this same time. On top of writing every morning, I find myself feeling drawn every day to sit down and write even more and I do. I’ve written, roughly, 20,000 words in the last two weeks. And other creative interests have become easier, as well. I’ve been drawing and (digitally) painting more for the first time in years, and I cannot express how happy that makes me.

monsters.jpgmonsters_jpg___166___color_fill_4_copy__layer_mask_8___-copy.png

I hope that I do not let up on these changes any time soon.

Top Articles

Along the side of my blog, for many years. I've had a section called "Top Articles". I don't remember when I put it there, but I know that it included all of the most popular posts I had written at the time and I wanted to make them more prominent. They were obviously popular topics people wanted to find. These were the things I was writing about that people found most interesting or useful.

I haven't thought a lot about this list for a few years, until I just noticed it today. Top Articles is a time capsule. This was a snapshot of my interests and knowledge from a previous version of myself. It doesn't reflect me as well today. I'm equally interested in the things that no longer worth keeping on that list as I am of the things that are still very important to me.

I'll make a point to clean things up around here. What was on that list so long ago?


Of no surprise, I had a number of posts about Python which still draw a lot of new readers to this day.

And at that time I was spending a lot of time helping people on programming forums, especially IRC. I tried to help explain how people can better reach out for the help they need.

I was also starting to focus a little more broadly on how people learn to code and what we can do better.


I was starting to write less about programming itself and more about managing the world of building projects. My focus was also starting to broaden from just syntax and code to what we're delivering to the user and what they're going to do with it. Signs of the holistic approach to building software that I try to take these days already forming so long ago.


This blog was started in January of 2007. That's over seven and a half years ago, nearly as old as my son, who is a third grader. I'm sure the focus and breadth of my writing has changed since then, as have my opinions and focus. I'm sure over the next seven years they'll continue to do so, and I hope over that time I'll continue to write about it all.

Firefox Users on Linux Deserve Better Downloads

If you download Firefox on a linux machine today what you get from their servers is a pretty unfriendly tarball. What are you supposed to do with this? Maybe you know how to extract a tarball. Maybe you even know what of the many files inside it you're actually supposed to run and how to run it? Maybe.

But does everyone else? Do non-developer users have any clue what they're doing with this thing? They experience is awful.

I want to see that change and followed a ticket that tracks just that. What do you think?

Wednesday, October 15, 2014

Dead to Me! Trapdoor, Prototyping web-based desktop applications

This is the inaugural post in my Dead to Me! series which I announced.

I’m not gonna lie. I’m pretty proud of this one. To say Trapdoor was ahead of the times might be a stretch, but really only a small stretch.


My project README explains


Trapdoor is a web-based desktop framework. Confused yet? The idea is to leverage how much energy is put into the web today and make developing a desktop application fun again. Again? For the first time?


Trapdoor was an exploration of how to utilize web development skillsets to build desktop tools. I wanted to experiment with how this idea would play out and if it really made any sense. I was never planning Trapdoor to become are solution. I just wanted to play with the idea, but I do think I played with the idea pretty early on and that it was an extremely successful experiment.


At the time I was still a KDE user and had been learning a little bit of Qt via the Python bindings PyQt4. I knew that Qt had a WebKit widget and quickly found that PyQt4 exposed this pretty easily.





This was a simple demo I built with Trapdoor. We have a web-app built, for this simple example, all in Javascript dumping a few simple controls to the DOM. The JS is responsible for window creation and gets access to the DOM in the new window, where it can construct an interface in HTML and use jQuery to wire it up.


What I was most proud of is that, recognizing this would only be useful if the desktop applications being built could do anything a normal desktop app could do, I made it really easy to extend the Javascript APIs with new things.


The Calculator class defined in the above calculator.py file above and registered in the manifest is able to expose methods to the Javascript API it injects into the application. Otherwise, it is just regular everyday Python and can do anything and can use any Python libraries.


I only worked on Trapdoor for three days. Vaguely I recall wondering if I could write an extension that used PyOpenGL to render 3D graphics in my web-based desktop application, a good year before the WebGL spec landed and three and a half years before work would begin on Node Webkit. Trapdoor won’t be worked on by me and shouldn’t be picked up by anyone else, probably. It will continue to sit in my Github for a while, but it stay forever among my favorite personal projects.

Check it out, if you’re curious.

Dead to Me!

Dead to Me! is a new thing I’m doing. This is not a new blog, but it is a specific series of posts within this blog. Dead to Me! is about those projects which I am only looking back on, but will not work on again. These aren’t all failed experiments, but some of them are. In each post I’ll talk about a project I’ve abandoned, sunsetted, or moved on from. Some of them will be recent and others will be things I worked on years ago. Some of them might be related to work, but most will be personal.


I’m also doing something different with this. I don’t know how well this part will work out, but I’ve already gotten some interest in it so we’ll see:


I am soliciting for guest posts to Dead to Me! and welcome anyone who would like to ask to be a part of this. If you have a project you’re no longer working on and would like to write a postmortem for, please drop me a line or a draft.


If you’d like your post to appear here, go ahead and post it on your own blog or anywhere else, as well. Perhaps we can cross-link them.

I think this will be fun. Will you join me?

You can read the first post of the Dead to Me! series right now, about Trapdoor, a prototype platform for web-based desktop application development.

On Atheism Plus

This was originally published on That Liberal Extremist, a blog on social and political issues I began with my wife Heather.

"Atheism Plus" has been making rounds for a while now.

The basic premise seems to be Atheism, plus a lot of social justice movement elements. And, completely, I support that. And I'm glad for the wide support from others I see from that. We should support women in the Atheist community, and gays and bisexuals and the transgendered among us. And those outside of us, who are still marginalized even by religions they're a part of. We should support people of color, and the poor, and immigrants and single mothers more. Intersectionality is the word.

I came across this idea first from Greta Christina's post

But, I don't think we need a label for this. That doesn't mean there isn't a reason for it, and maybe I should phrase it "I don't think we should need it.", so let me explain.

...the rest of the post continues at That Liberal Extremist. Please subscribe if that's the kind of writing from me you're interested in.

Monday, October 13, 2014

Alternate Computer Science History

I'm basically putting a giant sign on me by even saying this in public, but for a while now I've been sketching notes on the side for a series of writing I call Alternate Computer Science History. The idea is to envision alternate histories for how we may have developed computers over the years, both in how those differences would have played out in the past and the impact it would have on what we've built on top of all these things since then.

What makes this so fascinating? Legacy. Computers are so steeped in legacy to such a remarkable degree, but they're still so young. What kind of boxes are we putting ourselves in? So I find it fun to explore what could have been different. What we have today, built on so many layers built up over the decades, is really nothing short of accidental. We could have ended up with a lot of other paths these developments could have taken over the years... couldn't we have?

So maybe I'll just keep these private, or maybe I'll publish some of it if I ever polish any bits of it in an interesting format. Have any thoughts? Do you think this sounds fun? Let me know.

Hexel Art: Brain Pulse

I've been playing with "hexels" and doing some <canvas> art this evening.


CARDIAC: The Cardboard Computer

I am just so excited about this.


CARDIAC. The Cardboard Computer. How cool is that? This piece of history is amazing and better than that: it is extremely accessible. This fantastic design was built in 1969 by David Hagelbarger at Bell Labs to explain what computers were to those who would otherwise have no exposure to them. Miraculously, the CARDIAC (CARDboard Interactive Aid to Computation) was able to actually function as a slow and rudimentary computer. 

One of the most fascinating aspects of this gem is that at the time of its publication the scope it was able to demonstrate was actually useful in explaining what a computer was. Could you imagine trying to explain computers today with anything close to the CARDIAC?

It had 100 memory locations and only ten instructions. The memory held signed 3-digit numbers (-999 through 999) and instructions could be encoded such that the first digit was the instruction and the second two digits were the address of memory to operate on. The only register was an accumulator.

The simple instruction set would have made for a very easy understanding of how complex programs are able to be built out of simpler sets of operations and data.

Opcode Mnemonic Operation
0INPRead a card into memory
1CLAClear accumulator and add from memory (load)
2ADDAdd from memory to accumulator
3TACTest accumulator and jump if negative
4SFTShift accumulator
5OUTWrite memory location to output card
6STOStore accumulator to memory
7SUBSubtract memory from accumulator
8JMPJump and save PC
9HRSHalt and reset

There is a much longer write up that anyone interested in the beginnings of computers should take a read over. I am hoping to make up my own DIY CARDIAC and try writing some fun programs and if I do I'm going to be sure to post about it.

Caktus Ship It! Day 2014 Q3 Post-Mortem - Part 2: Playlists and Peers

As of my first hour playing around I was able to share and synchronize play of any MP3 between multiple users with a simple drag and drop interface. Things were going pretty well for my project, but I had some work to do getting from there to the collaborative playlist I had in mind.

I was already just assuming we were only caring about one file, because that worked well to get things up and running fast. My next step was to remove that assumption and start keeping a list of songs. This was pretty easy, in fact. I started writing a simple list of songs as they were downloaded, each with a play button which performed the <audio> tag set and play that previously done automatically. Each user could now play any song that was shared and to restore the previous synchronized playing that happened when they only dealt with a single done I incorporated broadcast changeTrack messages. I added two other broadcasts, pause and play, which would allow any users to pause and play the songs on all users simultaneously.

This was working well, and I had roughly scaled my previous prototype to a multi-song version. Unfortunately, this version was even more rough and bug-ridden than the first. Most importantly among its faults: I couldn't really predict the order different clients would receive each track, so the playlists wouldn't remain in the same order for everyone. I wasn't really ready to tackle the actual collaborative playlist problem. This is probably the most difficult problem the project will face. It is a lot harder because I'm determined to keep the entire thing peer-controlled with no central decided or coordinator.

After banging my head on the simplest way I could provide this editing for the initial version, but coming up short, I realized it was a waste of my time. I didn't really need to do collaborative editing for a prototype, I just needed to make sure they all kept the same order.

So I alphabetized the songs for all users.

The simplest solution to some problems is not to have them

At this stage I could play any song on the shared playlist and hear it on any connected machine. Things continued nicely.

Implementing playlist progression was pretty easier. Along with progression I added highlights on the list to show which song was currently being played.

I decided at this point to do a bit more seriously testing and increased my test set of songs I was drag and dropping from 3 to 8.

I crashed Chrome. How I did that and how much of this work I had to completely throw out the window? Read Part 3 (Coming Soon) to find out.

Part 1: Proof of Concept in Under an Hour

Part 2: Playlists and Reseeding Songs

Part 3: Two Steps Back and Three Steps Forward

Growing Up With Your Long Lost Brother

I grew up with my long lost brother, but that fact does not make the label any less true. I don't know much about him. There are people I worked with at short retail jobs in my teens who I got to know better than I ever knew my little brother. There was not a drifting apart and there was not any kind of animosity that kept us apart from the start. I care for my brother and love my brother like anyone would.

But I do not know my brother.

If you think it is disingenuous of me to call him a "long lost brother" when we grew up together and I remember him smiling from his crib, please understand. If a man reached my age of thirty and only then learned they had a brother they had never met, never spoken with, never heard of before they would know that brother better than I know mine. They would know at least that he, too, had a long lost brother.

It is not accurate to say that I miss my brother, because you cannot really miss those who you don't know. I missed by brother, the way you miss a fly ball.

Death by Drawing

A while back I joined the effort of my friend Russell Hay to draw more often by way of a blog dedicated just to posting our drawings. I'll be honest and say we haven't made the best habits so far. I'm not giving up, so when I draw it will be posted there. Every now and then I'll post a few things here, just to remind you that I do that.

Tonight I draw a bunch of monsters! Enjoy.


Friday, October 10, 2014

Caktus Ship It! Day 2014 Q3 Post-Mortem - Part 1: Proof of Concept in Under an Hour

Today was one of our very fun Ship It! Day events at Caktus Group and the first in our new office. It snuck up on a lot of us, what with the busy move we're still settling down from, but it also is a great chance to unwind and to really enjoy our new shared workspace.

I'm going to start ending these events with a personal post-mortem on what I worked on. I decided to learn about WebRTC by building a tool I'd love to have with friends: a shared music player. The problem is simple: some of us think the room is to quiet and some of us like quiet. What we need is a way to play music together with headphones.

The goal was a simple app that can play MP3s. Everyone with the app open should be able to play songs and everyone connected would listen at the same time. We all hear the same thing. If someone leaves, they'll take their music with them.

So, I set about this yesterday afternoon (when our Ship It festivities officially begin) and I had a vague idea where I wanted to start. I had seen an interesting proof-of-concept called instant.io which provided file sharing in the browser. What made it novel from other demos was its use of BitTorrent as the sharing mechanism, so it could be used to effectively distribute a large file to a large number of recipients efficiently!

My starting theory was
BitTorrent combined with Winamp, in your Browser
So I set on this task by cloning the instant.io repository and running it locally, which was a little more trouble than I expected. The actual setup of the project was pretty odd, and depended on things specific to the owners machine. What I did learn from instant.io was to find my way to the WebTorrent project, on top of which instant.io was built.

I cleaned up the repository I had cloned to run a bit easier on my machine and started pulling examples from the WebTorrent website. I quickly got the file sharing working locally, dropping files onto one browser and seeing download links appear in the second.

So far, so good!

The next step was rudimentary music playing. I dropped a simple HTML5 audio tag into the page
<audio controls />
And took a look at where the instant.io code was rendering its download links after completing the transfer of a file from one peer to the next. It was easy enough to find where it looped through the files of a completed torrent and wrote the links into the page.

torrent.files.forEach(function (file) {
    file.createReadStream().pipe(concat(function (buf) {
      var a = document.createElement('a')
      a.download = file.name
      a.href = URL.createObjectURL(new Blob([ buf ]))
      a.textContent = 'download ' + file.name
      log.innerHTML += a.outerHTML + '
    }))
  })

A torrent can contain multiple files, and that was a fact that I had neglected, but for the current testing I just assumed that I'm only dropping one file at a time and I just take the first file in the torrent. It was very easy to assign the Data URI being generated here to the audio tag and trigger playback.
  var file = torrent.files[0]
  file.createReadStream().pipe(concat(function (buf) {
    var a = document.querySelector('audio')
    a.src = URL.createObjectURL(new Blob([ buf ]))
    a.play()
  }))

Success! I had, in less than an hour, built a simple tool that lets a bunch of people drop any MP3 into their browser window and all be listening to the same song in just a few seconds. It worked great, but I had a lot of work ahead of me.


Part 1: Proof of Concept in Under an Hour

Part 2: Playlists and Reseeding Songs

Part 3: Two Steps Back and Three Steps Forward

I write here about programming, how to program better, things I think are neat and are related to programming. I might write other things at my personal website.

I am happily employed by the excellent Caktus Group, located in beautiful and friendly Carrboro, NC, where I work with Python, Django, and Javascript.

Blog Archive