Kod100: Document a very old project

#kod100 is a thing. In Sweden. “Do FOSS stuff for a hundred consecutive days.” Keeping a log of it is optional. So, I’m dusting off WordPress. And trying.

Things experienced in this session:

Use the wp-cli command-line tool to manage WordPress. Until it’s completely package-stable, use it from the Git repository. Fine instructions at their homepage.

And, for ergonomy, I added syntax highlighting in less.

Also began the actual project, by using git-svn to pull a repo copy onto GitHub. The shared Subversion repository for all PHP extensions has quite a few revisions. Too many! A pull from the top will be more effective, I guess.

Goal of project: add some documentation to one of the oldest still-living PHP extensions: stats. Most of it is just hard to understand, since I’m no math head.

Colonist!

I have begun planting vegetables at a good spot called Valdemarsro. My town Malmö owns most of the allotment plots available, around 5000 of them. “Awe-inspiring”, my Canadian friend remarked.

To get your own allotment plot in Malmö, get in line at the municipality’s website. It costs between 450-650 SEK for a year.

This is a quaint PDF map of the Valdemarsro plots.

Allotment plot gardens are full of characters – and I love chatting with them. Two men I spoke to had been on that ground for 24 and 28 years, respectively. They share wisdom and victories happily. All men I talk to are of Eastern European descent, perhaps Polish. Gentlemen, all.

I note that Malmö is the oldest allotment tradition in Sweden. It begun in 1895. The union of allotment plot associations is called Koloniträdgårdsförbundet. (There’s another wonderful union above that! They have their own campaign against snails.)

See also The Victorian Kitchen Garden, a fine piece of Swedish-English collaboration in televisual entertainment of the Olde kind.

http://www.youtube.com/watch?v=XXO4mAY8tGI

Link

If you’ve been plagued by unwanted ad notifications in your Android device, identify the culprit with AirPush Detector. Then you know what to uninstall. Just had a success with it. It’s Open Source, too.

Link

In The working class of computer art GOTO80 talks about demoscene parties:

What is the point? Well, I really like the freedom of the copy party. Think of it as a hackerspace disco with lots of man-beer and old music. There’s no money and no bullshit. You don’t have to network with the right people and explain your work on their terms. It’s an odd soup of CEOs, graffiti writers, headmasters, schizophrenics and academics that is hard to find elsewhere. Some people are just quiet and make music, others are fixing some hardware while the Finnish BBS-d00d is puking in the closet. Then they all crash on the floor, covered in data noise. It’s like being 16 again all over, except for the SD-cards.

Hackerspace disco!

sl and sl: Useless/useful

The command ls lists files in current directory in many ways. Misspelling it as sl is common. Common enough to make an ASCII joke about it. Linux distribution Debian packages sl as this ASCII joke.

Debian's package screenshot

Today, Trivium pointed to a much better and brand-new sl.

sl takes the most common use of Unix ls, to display the files in a directory compactly in multiple columns, and makes it substantially more useful.

Right. Take a look at those screenshots, a long look. More information per square-centimeter.

Steps to get this in your MacOS X machine (which in my case is an old 10.5):

  • get Tcl8.5 installed
  • Installing it would be something like gnumake all; gnumake install
  • download the sl script into your path
  • chmod the sl script to be executable
  • Update: Be really surprised when it looks like ls, finding out it was an alias from Oh My Zsh. Remove the alias in the ~/.oh-my-zsh/lib/aliases.zsh file
  • change the sl shebang script line to the new /usr/local/bin/tclsh

A recipe like this sounds like a package management task. Robots are our friends.

This code is not yet packaged or pull-requested in Mac Homebrew, which also uses the ASCII animation for its sl. Sadly, brew search tcl does nothing useful, either. This is a time for heroes.

Link

This link post is quite irrelevant should you never be using PHP. Therefore, I categorized it.

Published in 2010, Unix manual pages for PHP functions is still a useful tip.

A decade of using Python, and you don’t ask yourself where the argument goes in a function you use daily. Experienced PHP developers look at the php.net website quite a lot. Print cheatsheets (but never look at them, since the php.net website exists).

“There’s a quicker way.” You look up a trick on the Internet. In this case it was long-time PEAR committer cweiske who pointed this out.


pear channel-discover doc.php.net
pear channel-update doc.php.net
pear install doc.php.net/pman

or, if your setup forces you to use sudo (for your copy-and-pasting pleasure):


sudo pear channel-discover doc.php.net
sudo pear channel-update doc.php.net
sudo pear install doc.php.net/pman

This downloads five megabytes of PHP documentation, and a small command-line utility that fires up your text viewer.

Result: any PHP function can be looked up locally, in your viewer: pman strpos

Thanks, Bjori!

TBD Hackathon 2012 participant report

I spent the weekend at TBD 2012 Hackathon in a coffee shop in Malmö. I know part of the organizing team, and it was nearby, so I joined in, for the feeling of the fast-paced making.

Update: If you met me at the hackathon, say hello in the comments. Or on Twitter, I’m olleolleolle. Kthxbye!

Jens describes his experience at his blog. Wired wrote an unrelated but explanatory What is a hackathon? piece, for your understanding pleasure.

This was the shape of the event:

  • initial 30-second “who I am” introductions from each person in the room,
  • then project pitches to recruit groups,
  • then working on those projects,
  • then working on those projects,
  • and then one hour of demos on Sunday.

I presented myself and mentioned that I had forgot to bring my Arduinos. Turns out, that platform is as popular as its huge mindshare would suggest. I joined a team that already had an electronics gizmo (candy dispenser that you tweet to) and a software prototype running. Cheating? Perhaps. The ground rules need to be more clear on where teams start, I think. Example fix: “No pre-made teams. No pre-existing software.”

The work I did for the project was mostly software quality-related. Moved code, deleted code, renamed things, added a few tests. And I made a very small documentation website using Jekyll and the Twitter Bootstrap CSS. The project presented a how-to document, but not a fully described protocol. We sharpened the prototype.

When Sunday rolled around, and demo time at 17:00 was nearing, our project instigator opened a bottle of champagne, and took some pictures. Psyching other teams? There was a schedule change, and suddenly we could lounge until 18:00, the new demo start time.

It went well: we shared the second place with Jens’ group. The winner was a quite useful project, but it does not yet have any useful web presence.

Cheer: Highlights of the weekend

Met great locals. People were open to talking, and were helpful.

Met great people who were not like me. Graying men in business casual. Generation gap can be a challenge, but this event had no “cost of contact”.

The event had a kid-friendly atmosphere. Kids playing Minecraft, controlling a blimp, et cetera. Participating instead of irritating. Perhaps this explains best: “Dad, can you install the latest beta of the client for me?”

My team was very kind and cheerful, too. I was welcomed into a team of friends as a peer. Thanks.

The place and the logistics and the sponsors made the event feel very privileged. High-functioning.

Challenges: Stuff we need to do better

Here is a short list of stuff I know all new communities have to contend with. I want this to be a successful community, so I share my mild concerns here.

Shyness is real. Enabling shy people to interact on their own terms is hard. Try to think of that when designing a social event.

Avoid popularity contests. I would like your thoughts on how to avoid the popularity contest of choosing teams. Perhaps it is enough to describe the process of Recuiting A Team For Your Problem: “You will have to gather a team, and that’s no walk in the park. Here are the vital information you need to put out in your project pitch.” What do you think?

Don’t be a software ghetto. Actively pursue involvement by groups outside the “existing set of hackers we know”. The ghetto feeling can make the events irrelevant. Danish event Demodag is great at this.

Keep everyone in the loop. If there is a comment track, or a back-channel, make sure everyone knows about it to avoid risking missed opportunities. (I joined the #tbd2012 IRC channel, on freenode, just to see whether anyone else had. They hadn’t, so not a problem there.)

Continuity: I want more of this

I like this event, and I want this community to flourish. Sowing those seeds:

Personal prep: Keep a personal list of hackable problems and technologies, to remain prepared.

Technology radar (here one by ThoughtWorks) are personal, meaningful to a person or to a group, not to a whole culture. So, you tiny list, is useful to you.

On that note, I’m going to try and make one of those, using some mix of technologies I agree with. And, I am going to tell you about the 14th Demodag. Another day. Ciao!

A dated project report

Just found a draft of an electronics project report of mine, made in 2009:

After the construction of the Smapler, I came away with no soldering station. Dlade kept it, he liked it that much. So a few days after that, I went and bought a station kind of like it, at Electrokit in Malmö. I went there primarily to pick up a Motor Shield circuit board.

The kind shop clerk helped me understand and pick up all the components on the partlist I had included in my order. He was there on overtime, and still helped me. Note to non-electronics folk: A partlist is the textfile exported from the circuit construction application. It tells you what the component labeled R3 in the diagram should be in real life. They look cryptic at first glance, but they’re the very essence of informational economy. Tufte would be pleased.

Me and Dlade had been violent to an old inkjet printer, and gutted it for 2 motors, one DC and one stepper. The stepper motor I have here on my desk. Found its datasheet today! Sometimes it’s a gamble finding Asian manufacturers’ documentation, but it went well. Now I know that it’s a 24v stepper motor.

This was some time ago. I fixed a bug in the partlist (one component was listed with a wrong character in the name…)

The world has moved on since this report.

Dlade and I were not working together at that point, but we have worked together as colleagues for a full year between this report and now. We are no longer colleagues.

The local electronics shop, Electrokit, is no longer in the middle of a residential area, but in a far-away industrial zone. That’s sad; people I know used to come there many times a week. This past year I have been to their new shop exactly once. Freezing headwind bike rides discourage even the most motivated buyers.

My town needs more old-fashioned hardware stores. This image evokes the fantasy of a small-business shop. Morguefile user jari snapped this:

A fantasy. OK. Nostalgia-for-times-I-didn’t-have-to-live-through now put aside.

As I built the motor control board, I ran into a circuit description problem. Some of the values were wrong, and I never got that board to run my motors. I was told my the constructor of the circuit board that my version was an in-between one, and that it could never work. That deflated my enthusiasm for motor control.

As I said, the world has moved on, and now there are new versions of that circuit board.