By Zed A. Shaw

Mongrel2 v1.7: SSL, Config-From-Anything, Filters, Reloading

This is just a quick blog post announcing a fresh release of Mongrel2 v1.7 that has support for:

  • SSL with a nice configuration system.
  • Config-From-Anything foundations laid and mostly working.
  • Much better reloading support.
  • Lots of bug fixes all around.
  • The beginning of the Filters feature.

You can grab this release at http://mongrel2.org/static/downloads/mongrel2-1.7.tar.bz2 and it has the MD5 3f7ec3fa4cf10d71e6a1ef34b60a8106 just in case.

WARNING: This release is after quite a few upheavals to the project, namely switching to github, problems with griefers on github, major refactoring internally, and other changes, so be warned that it might be as solid as past releases.

Read more...
By Zed A. Shaw

Thanks, Github

I'd like to just do a quick thank you to github for implementing the new Block The Bullies feature, and to actually step up and call it what it is: bullying. They've also been on point to block anyone who griefed my projects over the last day, and they've done it fast, which is awesome. I'll gladly keep my projects there now that I know my project collaborators won't have to deal with abuse from idiots.

This was one of the reasons I didn't want to put my code on github. If I ran my own project services then I could easily control the griefers and trolls. I could just block them. Also, they weren't really smart enough to figure out fossil so I didn't run into them that often. Github however was this large "community" full of mostly Ruby programmers who acted with a mob mentality regarding me. Without any way to block people I knew I'd run into that ever present dark side of community: gangs.

During the day my projects (which means all my collaborators) received more griefing from 3 people, and a total of 10 emails with ASCII dongs in them. Each time, Rick Olson (a man I respect very much) blocked them and banned them for violating the Github Terms of service. They also worked to create a feature that I think was long overdue on such a large social site.

People who don't have a small group of weakling anonymous trolls constantly after them couldn't understand this. I actually had friends email me saying they were really sorry people harass me about my book being on github, and then ask me to join github. To them, community is this great thing they don't mind following because they don't ever do anything adventurous that might piss someone off. They just couldn't understand why I'd be so "contrarian".

Read more...
By Zed A. Shaw

Github's Favorite Joke

This isn't a rant, but more of a warning about ignoring your users and letting other users abuse them when you're trying to build trust and community. WARNING: Not safe for work if you work at ebay or similarily draconian companies.

As some of you may know, I recently switched the Mongrel2 project over to github. Everything's been going alright, except, there's this guy who keeps adding me as a collaborator to his project called "dongml". I didn't really ask to be on the project, but he thinks it's absolutely hilarious to have me on the dongml project.

Now, I think I need to explain a little bit of back story. First, this guy Nick Martini has trolled me in the past on twitter. Back then he went by elotente, which is also potente, and fagatini. Back then he would just try to troll me as elotente, call me homophobic slurs, and other things. So, I hunted him down, found out the three accounts were connected, found his facebook, found his home address, and then pointed a google map at his home address with the tweet, "I can see your house from here."

You see, until that point Nick was hiding behind an anonymous identity trying to troll me, and once he was outed he didn't bother me much after that. That's how anonymous trolls work. I don't mind trolls, but I firmly believe that anonymous trolls are incredibly abusive as they deprive their victims of any valid recourse to their abuses such as the law or direct confrontation. Whenever I find an anonymous troll I try to expose them so that they are forced to act on equal ground with their victims.

Read more...
By Zed A. Shaw

Mongrel2 and Tir Now On Github

The Rapture is upon us, or at least for the Mongrel2 project, because I moved mongrel2 to github officially now, as well as moving Tir. The original fossil repositories will be decommissioned soon and I'll have a new website up in their place. In case you missed the links they are:

Thankfully fossil has a good git export that let me move everything over to github in one day. Also, thanks to all the mongrel2 hackers who helped me today since, holy crap I still hate git and would have never been able to get this done so quick.

Why The Switch? Will The World End?

Read more...
By Zed A. Shaw

Mongrel2 v1.6 Released, Tons Of Improvements

It's been a full 5 months since I released the 1.5 version of Mongrel2 so I'm very pleased to announce version 1.6 of Mongrel2 is ready. This release includes a ton of bug fixes and then new internal features that lay the foundation for some big changes to mongrel2 in the following releases.

You can grab the latest source .tar.bz2 at:

http://mongrel2.org/static/downloads/mongrel2-1.6.tar.bz2 (MD5: 4b7467c17dcd192e574d4d2c1455997c)

I've been running this release on my sites for a while, so it should be stable, but please report any bugs you find as a new bug ticket so we can fix them.

Read more...
By Zed A. Shaw

Udemy Online LPTHW Course

A quick bit of pimping for a new Learn Python The Hard Way course I'm doing on Udemy.com where I go through the whole book in 4 weeks. It includes 8 videos (4 already done, 4 to come), all the material, and I'll be interacting with the students.

You can signup for the course and should if you've wanted to go through the book but had problems.

Feel free to bring up any problems you have in the forums and the Udemy team will help get it fixed. They're very keen on making it a great experience for everyone.

P.S. Don't put this on HackerNews. They really only like pimping their own startups and anything Ycombinator does. Heaven forbid you tell them about a course teaching non-programmers to code based on a book with 335k downloads from all over the world.

Read more...
By Zed A. Shaw

1 Year Of LPTHW, 335K Downloads?!

On April 27th it'll be about 1 year since I started Learn Python The Hard Way and I thought I'd check the statistics out for downloads. I'm now kicking myself for not having tracked this sooner, because it looks like it's been downloaded 335 thousand times. I totally don't believe those numbers myself. That's insane so I want to share the knowledge with others to get them validated.

I'm putting the access logs for GET requests online for others to verify the numbers and tell me if I'm getting them right. You can download the stats logs in bzip2 format and review them. Feel free to tell me what you think the real download stats are for the .pdf of the book.

I'm doing this because, frankly, I had no idea there was such a huge market for cheap or free books teaching programming. Hell, for teaching programming at all. I just thought that it'd maybe get 10k downloads maximum by the end of the year. That's what I heard was a good run for a programming book. If these download logs are true, then I think everyone is seriously under evaluating the power of online publishing.

I think right now those of us writing tech books are fed numbers from the major publishers, who have incentives to either flat out lie or who simply don't sell that many copies. That means when people like me put a book up for free, we're operating under false assumptions about its reach. I'm hoping that my raw access logs (with ip addresses removed) will give people who want to publish a similar book a bit more information so they can make good decisions.

Read more...
By Zed A. Shaw

Launchpad vs. Github/SysAdmin vs. Coder

I saw this blog post by lvh asking the simple question, "Why do people hate launchpad so much?" It was something I also wondered until I started tinkering with forking NetBSD pkgsrc and went to research various package managers. When I was going through all the various package managers I finally realized that the difference between Launchpad and Github is actually the difference between System Administrators and Software Developers.

Try this out, let's pick a random github project, say gitflow on github, and then Bazaar on Launchpad. You could do this with various random projects, but check out what you see first:

  1. Github starts right off with, the author as the most important thing, followed by the code, commits, and readme.
  2. Launchpad starts off with the project, then the revisions and releases, FAQ, bugs that got closed, and project members.

Now, I'm not saying one way is better or another, I'm saying that depending on what your day job is, you want either Github's focus or Launchpad's focus.

Read more...
By Zed A. Shaw

Edifying.TV Progress, It Can Load Stuff

I've been rolling an idea for a "media browser" in my head for a while, but recently I think I found a small tiny little corner of the idea that I can actually work on. Now I'm tinkering with Edifying.TV which will be a way for students to watch videos from teachers. Basically the same thing, but focused directly on one type of media, and two very narrow users.

The idea came from trying to do videos for an online course I teach, and finding that there is no one video encoding that does this:

  1. Put a link to the raw file in a page.
  2. User clicks that link.
  3. It plays. Period. No stupid nerd freak out about the bizarre matrices of codecs intersecting with encodings intersecting with the Pythagorean derivative of second order legal systems on a Martian sun.
  4. Yes, just play. Like how I can click on a damn .gif and it displays. Or a .txt and it prints out. Or hell, a .mp3 and it plays.
  5. It plays. Get it? Not with Flash. Not with a stupid video HTML5 tag. Just play the damn video file.

Really that's just one requirement, but holy crap is video frustrating. Since I figure there's no way in hell browsers will ever get their act together and make this happen, I might as well take a crack at making a separate program that can do it.

Read more...
By Zed A. Shaw

Wikipedia's Notability Requirements And The Slash

There's a recent problem with one Chris Mansanto deciding that he's the sole decider in the notability of programming languages on Wikipedia, so he's taking it on himself to delete all the languages that don't meet Wikipedia's Notability requirements. Let's put aside the insanely weird idea that one person has the ability to derail the creation of information unilaterally, without a vote, and without any oversight to focus on the real problem:

Notability Is Avoiding The Slash

Wikipedia's stupid notability page creation rule is effectively working around their software's inability to handle arbitrary paths to sub-pages. Yes, they don't want to create too many pages because they can't handle a nested namespace. Hell I got no idea if the software can or cannot, but they sure don't use it much. There's absolutely no reason you can't have sub-pages under Esoteric programming languages for each and every language on the planet. Wikipedia is just using social rules to solve a technical problem with the slash.

These requirements are entirely stupid for a programming language since they're primarily for people and biographical information and based on "popularity" in the regular press. In a way the entire Notability requirement simply props up the established publishing and music industries. You can literally read these requirements as "some big mega corp my grandma might encounter has mentioned it." This attitude completely eliminates a vast majority of sub-cultures, revolutionary movements, ethnic groups, and just about anything that mainstream media hasn't covered.

Read more...
By Zed A. Shaw

My Python A Starts Tomorrow: With Video

This is a quick announcement that I'm doing another Python course based on my book Learn Python The Hard Way over at Codelesson.com.

The class starts tomorrow so signup for it if you want to get in. It will probably be small, at about 12 students this time around.

Improvements To The Course

The course covers the very first half of the book, exercises 0-24, and lasts 4 weeks. This will be the second time I've taught the class and I'm making the following improvements:

Read more...
By Zed A. Shaw

My Learn Python THW Class At PyCon 2011

It's official, I am teaching Learn Python The Hard Way at PyCon 2011. That means I'll be at PyCon and I'll be teaching total beginners in person out of my book. It's going to be lots of fun, and I have this idea that I may just teach the book the whole time I'm there. I think it'd be fun to just grab one of the rooms they have down in the basement and hang out with people trying to learn Python.

So, here's the deal: If enough people signup to fill up the class, then I'll keep teaching the class during the conference and be the Newbie Conference Guide. The goal will be to get at least 1/2 of the class leaving PyCon with a brain totally introduced to Python, and get everyone into the Python community and enjoying the conference.

How we'll do it, is we'll go through the beginning of the book during the tutorials. When the conference is in session, we'll mix it up and split half of the time doing LPTHW exercises, and the other half going to conference talks that I or the group think are good beginner topics. After each talk we'll then try to apply what we just saw using the book.

I'll basically be your guide throughout the conference so that nobody picks on you and you get to learn the most you can.

Read more...
By Zed A. Shaw

Tir 0.9 Is Out, Hype.la Open Sourced

Today I'm happy to announce that my little Mongrel2+Lua web framework Tir as version 0.9. This release is the product of me using Tir and Mongrel2 for a few months on two real projects: Hype.la and Autho.me. You can read more about Tir, figure out how to install it, and see how to get started.

This release features the following new cool stuff:

  • Refactored code so that everything is in nice little files.
  • Support for forms, including multipart file uploads.
  • Tasks, that let you offload async requests to 0mq backends.
  • Full unit testing for doing interaction tests with handlers.
  • Actual real-world use of the framework and all the features. It's only got features I've actually used.
  • A lot less than 440,000 lines of code. I don't know, for some people that might be a strike against it, but about 1300 is pretty decent.

Hype.la Soon To Be Open Sourced

Read more...
By Zed A. Shaw

Autho.me API And Python Demo

I've managed to get Autho.me working to the point where there's a functioning API and a full Python demonstration web site that uses it. The API is very simple right now, but it should work and the mechanisms should all be solid enough to try out. I've got the SRP javascript code to check all the various failure modes required, and have thrashed it good, so it should hopefully hold up to scrutiny.

If you want to try it, just go to the getting started instructions and they'll tell you how to get setup. It's a single page of docs so to find out more you'll need to look at the code and check it out.

Big Ass Warnings

Do not use this for anything serious yet. I still have to do a few attack decision trees analyzing possible attacks and then handling them. I'm going to work on a spreadsheet that lays out attacks to standard website, autho.me, oauth, and openid. I'll be using this decision tree to figure out what needs to be handled and what can't be handled, and also to make sure that Autho.me is at least as secure as OpenID or well done site login system. This attack tree will also drive the design and UI of Autho.me in the future.

Read more...
By Zed A. Shaw

Why I Don't Use Tor

I have this hypothetical question I've been using periodically to talk about the relevance of ad hominem in evaluating software:

What if Hitler gave you a cheese sandwich?

It's a pretty simple question. Imagine you're sitting there and, yeah, Hitler is eating across the table from you. He's got a cheese sandwich and he hands it to you. "Hey, want my grilled cheese?"

Most normal folks would turn him down, politely most likely but they'd definitely not eat a sandwich from a guy who used to slowly increase his doses of arsenic. But also, you're probably thinking, "No way, this guy's an insane mass murderer, I'm not eating that damn sandwich."

Read more...
By Zed A. Shaw

Using Tir's Tasks For Async Photo Uploads

While working on Hype.la I wanted to do some photo scaling/cropping stuff for people's uploaded profile pictures. If there's one thing on the web that sucks more than uploading a photo, it's munging it for efficiency. Usually you're stuck with nasty API's that are written in C and just damn hard to use. Combine that with the range of image types and sizes people can upload and you've got lots additional headaches.

With Tir's new Tasks though I figured I could create a system that did the photo uploading, but did all the processing in async tasks off ZeroMQ. After figuring out how to actually crop photos in Lua with Imalib2 it was about a day of work and now gives me some nice room for the future.

Here's how I did it.

Step 1: Scale And Crop With Imlib2

Read more...
By Zed A. Shaw

Tir 0.8 Out, Works On OSX

Just a very quick announcement that I've put Tir 0.8 online with fixes that make it install on OSX. You can read the Install Guide for more information.

This gets rid of the luauuid requirement, which really only worked on Linux anyway, and falls back to luaposix 5.1.2 since 5.1.7 doesn't compile on OSX. If you installed Tir before you probably want to do:

sudo luarocks remove tir
sudo luarocks remove luaposix

To make sure you've cleaned it out.

Read more...
By Zed A. Shaw

Tir 0.6 Up, With Background Task Goodies

I just uploaded the latest Tir 0.6 for everyone. This version has everything refactored into multiple modules, extensive unit testing, and built-in very easy to use background tasks. If you want to install it then follow the Tir Install guide to get it running.

Built-in Background Tasks

Over on Hype.la people can upload their pictures, which is great, except they usually want to upload monster photos that need to be scaled. There's also things like search indexing, updating their static ads lists, and tons of stuff that really can just be don in a background task rather than hold up the browser.

Tir uses ZeroMQ so I figured, shouldn't be too hard to make a nice little "background task" API. For those not familiar with the concept, a background task is basically a process you start that receives some kind of RPC to do work. You use these to offload long running processes like some of the stuff I mention above.

Read more...
By Zed A. Shaw

Yearly ZedShaw.com Reinvention/2011

tl;dr ZedShaw.com will change to audio only, so move your RSS feed to here or oppugn's feed for my rants.

I like to change up my blog about once every year or so, just to keep with the spirit of the internet and to explore new ideas. Last year I decided that I want to branch my ZedShaw.com blog out into a set of other blogs that covered topics I was interested in. This worked great and now people know they can get technical essays from here, and rants from oppugn.us.

Well, I'm feeling the itch again, so I'm going to change up ZedShaw.com to match a new music related idea, while leaving sheddingbikes.com and oppugn.us alone. I'm going to basically adopt the challenge of turning ZedShaw.com into a "No Writing Zone". The only thing I'll post there is audio files, maybe pictures. All the writing will be done on my other sites.

What this means for all of you is, if you are following the RSS feed on ZedShaw.com then it's time to move!.

Read more...
By Zed A. Shaw

Tir Web Framework Officially Up

This is a quick post announcing that I finally setup the Tir Web Framework Site at http://tir.mongrel2.org. There you will find:

I spent the last month crafting Tir at the same time that I worked on my latest side project Hype.la. During the development I came up with a way to have all your cakes and eat it too. You can have coroutine based handlers, stateless, and evented, and mix and match them in the same application.

I found that this "State Agnostic" approach meant that I could use whatever worked best for each interface. I'll go more into it later when I talk about Hype.la more and show how I used the different state styles to make the application.

Read more...