Mutable, Changable you

Most people, especally those over about 50, know The Peter Principle: “Employees tend to rise to their level of incompetence.” Recently a post Why People Shouldn’t Love You For Who You Are caught my eye. It was a reminder why hate discussions that assume human behavior is static, and don’t learn and change.

People change constantly. If anything, it’s our adaptablity that makes us such an amazing species. As a developer (and a bit of an engineer) the idea of feedback loops and self-balancing systems makes me happy, since they seem intrinsicly beautiful, and self-managing. Not only are humans dynamic, but the universe itself isn’t static. As old as trees, or rocks, or our planet seems, it’s only because we are so small and live so short a life.

One of my most painful experience with this was during my first job out of college. I breezed through college with a A- average, really not applying myself to much schoolwork outside of one or two classes I dug. I knew how to do enough to get an A-/B+ with little work, and I worked that system. I graduated thinking I was pretty damn good, especially if I could do that well with little work. So it was a rude shock when during my first review the head of the software group told me I was not so good, and pointed out 3-4 major problems with the code I had written that month. It was a major blow to my ego, largly because it was true.

After that I got to thinking about feedback, and using it intellegently. I’ve developed the habit to usually assume that everyone ( even the jackasses) are Agent-Correct. Given their knowledge and experience, I am going to trust they are giving an honest ‘trying to fix things’ opinion. Even if that opinion is given in a brash way. I also try to realize when I, or they, ‘Agent-Wrong’ vs. ‘Global-Wrong’. Given their view/information/experience am I wrong to them? Maybe I’m even wrong overall?

It’s amazing what a downer being wrong can be. I am still amazed when someone who cares about me corrects me, and I get defensive. Why do I have such a negative reaction even when I know they are trying to help me? Why do I get defensive and regretful even when intellectually realize they have a good point? It’s weird, and it’s sometime hard to keep those feelings in check. Sometimes wanting to be right can stand in the way of taking feedback, being correct, and becoming actually right.

Excellent Hacks: Pathfinding

Finding the right feature to cut during an 11th hour rush to shipping in a trick, and a meta-problem that can be result in amazingly rewarding (and time saving) hacks. Code of Honor has a great post on a pathfinding hack to get StarCraft out on time.

TL;DR: They removed collision between harvester units to avoid pathfinding failures. A great hack that causes no gameplay problem, and makes the whole system simpler to manage.

Tags: ,

mea maxima culpa

It is sometimes hard to keep to a charter or agreement one has made without public acknowledgement and feedback.  People are social animals, and we are well built to follow social contracts, but sometime private agreements are forgotten.

So it’s with a sadface :( that I write this post to publicly admit I failed to stand by the ‘Not to Speak or chair all male panels’ pledge I signed on for.  To be fair, the panel was chaired by a woman (the fantastic Phoenix Wang) and it wasn’t a public event.   But nonetheless,  I took a pledge and dropped the ball. Mea Maxima Culpa.  It was a pledge I signed without talking much about, and I completely forgot I agreed to the pledge until the day after the panel. Interestingly enough, I just took a look back at the pledge page, and I can’t read the pledger to see who else may be slipping up, or defecting. Nor did I see any suggestions on how to make up for a slip-up for pledges that forgot their pledge, or who get stuck in a rock/hard-place and must take a panel without a woman member for some extra-ordinary reason.

If anyone has any good suggestions for a proper Mea Culpa for people that don’t live up the the pledge, drop ‘em in the comments. I’ll be picking one of them, or inventing my own, to make up for failing at that pledge.

Tags:

Hofstede’s cultural dimensions and Developers

Back in the 1960′s and ’70′s a researcher for IBM named Greet Hofstede did some amazing research about culture, and found 7 cultural dimensions that map onto all human cultures, and knowing those dimensions tell a lot about how the culture behaves. Those dimensions are:

  • power distance (PDI)
  • individualism (IDV)
  • uncertainty avoidance (UAI)
  • masculinity (MAS)
  • long term orientation (LTO)

I’ve also gotten into a habit of thinking about how colleges fit into that scale, so I can better understand what they want or expect from a working (or personal) relationship. It’s an interesting and useful lens to use when figuring out how to work with people in an organization that you don’t automatically click with.

So Long, and thanks for all the fish!

This week was my last week with MakerBot.

Two-ish year ago phooky asked me to interview as a lead desktop developer.  I wasn’t really looking for a job, but since I respected him and his incredible hacks, I agreed.  At the time it was a small pre-funding startup. To work with a hacker I respected so much, and on 100% Open Source technology was enough of a draw me from Philadelphia to work in Brooklyn.  Since then I’ve been shuttling back and forth from Philly to Brooklyn most of the week so I could herd the nerds for MakerBot.   It’s been an amazing opportunity, but a recent addition to my family means I need to be in Philly full time.

MakerBot gave me the challenge and honour of building a great department to create a stellar product. I also had the rare joy of a blank slate on which to redesign and implement our new desktop software stack, hand in hand with a group of  brilliant developers.   We created a new slicer, a new tool-chain system, a new device driver, and even a beautiful and simple UI on a tight schedule, with some great partners. Despite the controversy about closing some source access to MakerWare,  it’s a product I am very proud of.  It’s fast, robust.  It ran cleanly on 3 platforms from first day it shipped Without a doubt it is the most impactful product I’ve shipped. The most on-schedule product I’ve shipped too!

It’s quite bitter-sweet to be leaving MarkerBot, and a department I shaped, but c ‘est la vie.  Goodbye Brooklyn, and MakerBot!  It’s been an honour, a challenge, and a joy working with you.   I’ll miss the great humour, the inspired hacks, and the great brainstorming.   Even though you won’t really need it, I wish you all the best of luck.  With the pool of talent still there, I’m sure the company will grow and succeed regardless.  I’ll always look back fondly on the great time and great people I worked with at MakerBot,  and Ilook forward to seeing great products and projects you ship in the years to come.

… but at the same time, Hello Philadelpha!  It’s good to be back full time.  Lets get into some trouble.

Tags: , ,

Fast Data Structures in Python

A blatant repost, mostly so I can easily find this excellent overview of fast python data structures later.

Tags: , ,

What we believe about software development

I came across an excellent (and old) online talk by Greg Wilson on the net today, covering what we believe about software development. It’s a good talk about how little science we use in deciding and reviewing how we plan software, and highlights how many bad or guesstimate numbers computer scientists and engineers throw around when talking about their profession. Watch the video.

The best developers are 28x more effective than the worst

Along with the bad statistics of it, it’s not backed by good data. The studies were long ago with small sample sets, they really don’t apply to modern conditions. Common sense? Not especially. Also, there is the statistical problem of *ever* comparing the best to the worst. It’s a useless measure since ‘worst’ could be someone taught to code an hour ago. Comparing against mean/median/mode is probably a lot smarter.

SCRUM and Sprints keep software from being late

Another good point. As far as I’m concerned, working in a sprint system is what got MakerWare out the door on such a great tight schedule. Iterative design and culling features, as well as allowing for error and error correction during the process. But the plural of anecdotes isn’t data, the plural of anecdotes is rumors. Is there really smarter planning going on? Smarter throwing away features? What is the actual process that makes SCRUM seem or be, better than planning up front?

Until I watched the video, I had not recognized how many software process decisions we as a culture made by anecdote based suggestions, or convinced over beer discussions. If you have time, watch the talk, or add his blog to your RSS reader.

Tags: , , ,

Martin Luther King, Jr Day 2013

On April 4, 1968 a man was assinated to stop the change he was making in the world. A Nobel prize winner, priest, and father of four, cities across the country boiled over into riots when he was killed. Here in January 2013, I see so much of his vision unfinished, I wonder what the world would be if he had not been murdered. I chose the name of this site ‘Creativly Maladjusted’ from MLK’s Transformed Nonconformist. Although I may not be a civil rights leader or a great writer, I try to creativly reshape our world into a better place in my day to day life.

Below is a section from “Transformed Nonconformist” Strength to Love:

This hour in history needs a dedicated circle of transformed non-comformists. Our planet tetters on the bring of atomic anihihation; dangerous pasions of pride, hatred, and selfisheness are enthroned in our lives Truth lies prostrate on hte rugged hissl of nameless calvaries; and men do reverence before the false god of nationalism and materialism. The saving of our world from pending doom will come, not through the complacent adjustment of the conforming majority, but through the creative maladjustment of a nonconforming minority

Human salvation lies in the hands of the creatively maladjusted. We need today maladjusted men like Shadrach, Mesach, and Abedgnego, who, when ordered by King Nebuchadnezzar to bow before a golden image, said in unequivocal terms, “If it be so, our God whom we serve is able to deliver us. But if not…we will not serve thy gods”; like Thomas Jefferson, who in an age adjusted to slavery wrote, “We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty, and the pursuit of Happiness”; like Abraham Lincoln, who had the wisdom to discern that this nation could not survive half slave and half free….Through such maladjustment an already decadent generation may be called to those things which make for peace.”

– Martin Luther King, Jr. “Transformed Nonconformist” Strength to Love. Philadelphia: Fortress Press, 1963/1981: 27-28

Kings words as as true today as they were in the 1960′s. While we have moved forward in many ways, we have far to go. His vision of a better world, and impeccable advice on how to get there is just as relevant today as it was 40 years ago.

Tags: , ,

Testing Python Packages less painfully

If you want to test a python package before you share it with the universe, you can (in theory) use the Python Package Index Test (testpypi) server. In practice, using testpypi is painful, and the hints on the pypi front page don’t give enough details about how to do it. This post is my log of how I get testpypi working for me. This post will walk you through getting your new module up on testpypi and making sure it works right before you post it to the world+cat on Python Package Index (pypi).

setup.py

This post is assuming you already have an awesome setup.py file, and already know how to build a basic package using distribute, or setup_tools. . That work is already covered by some tutorials. Read those guide first if you need an setup.py intro, and come back here when you are done.

Please use distribute

Welcome back. Ok, I lied. I would like to suggest one change to your setup.py file. My request is to ask you to kindly please use distribute_setup. its the new hotsauce,

from distribute_setup import use_setuptools
use_setuptools()

That will use the newer distrbute tool to setup your project.

Register a username on pypi and testpyp

Register for a username and package name at testpypi. I suggest you also grab a matching user name at the main pypi site as well. You will need one of these to log in and update projects you want to post.

Manually create your config file

In theory running python setup.py register will create a proper config file for setup. This failed for me many times, especially when trying to use some -r options to post to testpypi. Instead it’s eaiser to manually create a .pypirc configurat file. On Mac/Linux, it lives at ~/.pypirc If you know where it lives on Windows, please leave a comment. To use testpypi you mostly need to define it as an index server. For speed you can just use the config below, which defines the main pypi server as well as the test server. Edit it to use your own username instead of ‘yourlogin‘.

[distutils]
index-servers =
pypi
pypitest

[pypi]
username:yourlogin

[pypitest]
repository: http://testpypi.python.org/pypi
username:yourlogin

You can also add to each index server a line containing password:yourpassword. That is, if you believe passwords in plaintext files are a good thing!

Register your module name

Almost there. You can now run setup.py commands with the remote option specifying a index server named in your config file. For example adding -r pypitest. Note that you have to put the -r option after each command which contacts a server in the params chain. It’s annoying, but that is what it takes. You can now just register your project with pypitest by running.

python setup.py sdist # create your distribution
python setup.py sdist -r pypitest #register your package name

Upload your module

Now, you can (finally) upload your module to the testpypi server. In the example the command line to do that would be:
python setup.py upload -r pypitest
Of course, once you have done it step-by-step to sort our errors, you can do an all at once command of
python setup.py register -r pypitest sdist upload -r pypitest

Test downloading your module

Module uploaded successfully? No errors, failures, insanities and it shows up on? Can you see it in the list of available testpypi packages? Gratz! But you can’t go home yet. You need to test installing the module from the index server.

The best way to test is to fire up a virtualenv to download your test module into. This will isolate it from messing up your system if something is broken. If you need to learn to use virtualenv, read this virtualenv tutorial and then come back. Once your virtualenv is running. just run pip with the ‘-i testpypi’ options to grab your test package from the testpypi. The command for that (in this example for pypeople) looks like:

pip install --verbose --index-url http://testpypi.python.org/pypi/ pypeople

If you are testing several times in a row, you will need to add –upgrade to trigger a force re-install. Otherwise install will only re-install for a major version number change.
pip install --verbose --upgrade --index-url http://testpypi.python.org/pypi/ pypeople

Success!

Finally, bugs are squashed, and your virtualenv install work. Gratz! You have tested posting your project as a module, and you have tested downloading your module. Now it’s time to push it over to pypi, and post it for the world to see/share.

If you want to read more, check out this Great post at foobar.lu.

Tags: , , ,

cltool: Example command line too in python

I have been hacking at a quick command line tool for python for managing my address book. Being a bit of a over-sharer I’ve been planning to distribute it by Python Package Index (PyPI) to share, in case other folks find it handy. Along the way I’ve run into several problems distributing it, ‘natch.

Rather than dirty up my address book workspace with testing, I created (and distributed) cltool, an example python command line tool. The cltool project is a simple demo of how distribute and setup tools work to create an installer. Here’s a quick overview of it.

setup.py

All of the good sauce of the project is in the setup.py script. Python’s distribute tools are pretty powerful, except the lack of an good uninstall. My first attempt was using just the scripts entry to list what scripts get installed. However after some extra digging, I discovered that you can create an entry point called console_scripts to point directly to python functions to execute.

TESTING.md and READING.md

These two files contain a detailed overview of what the project does, and gets into some of the key points of how setup works. TESTING.md also includes recommendations for local testing of your new package.

If you ever want to deliver a command line tool for easy_install or pip, cltool is a good template to start from

See Also:

Tags: , , , , , ,