Wednesday, March 21, 2012

easy_install for PortablePython3 behind a proxy

Do you love Python? Do you have Portable Python(v3) installed on a flash drive somewhere? Do you want easy_install for your Python 3, but you're behind a proxy or a firewall that won't let the good times roll? Well, turns out it's fairly easy to get around that.

 First, download the Distribute installer. If simply running your \App\python script doesn't work, then all you have to do is download the tar.gz file, put it in the same directory as your and run it again. You might need to install the MinGW32 compiler, too, and put that on your path. 

 Once you have these pieces in place then it's usually really easy to install other packages from source, if you're unable to hit the cheeseshop using easy_install.

If this helps you, please leave a comment below!

Saturday, December 31, 2011

Awesome (the window manager you probably should be using)

I'm not so sure how much I like this new blogger interface. It's a little annoying and definitely doesn't work like I'm used to, and so far it's not great in working like I would think it should. Also, my name is completely off the screen - and this is using Google Chrome, so I'm certain they've got some nasty CSS issues there.

But that's not what I came to tell you about. I came to tell you about Awesome, the window manager for X that you should probably be using.

First of all, I'm running a computer that's not terribly impressive. It's an Intel T2400(?) running at 1.83Ghz. It's a dual core, which definitely counts for something but it's only got 500MB of RAM, so that pretty seriously cramps my style. Not to fear, though, for Awesome Window manager is here, which is much nicer than your standard Gnome or KDE - mainly because it's a lot lighter. So I can actually do things that I want to without having to worry about whether I have enough RAM. Well, at least I can browse the 'net.

Also, pretty much all of the nice chrome that comes with Ubuntu is a bit heavy for my tastes and most certainly this machine. So I've taken to disabling it, so now joy and love abound - or something. Also, I'm a pretty big command-line nut, so it's pretty helpful. About the only reason that I feel the need to start up X is if I want to see pretty pictures. And if I knew of a way to do that via command line, I'd probably rarely bother with X.

So, some instructions about what I did. First, I disabled starting gdm by default by changing line 9 of /etc/init/gdm.conf to read
start on runlevel []
Which just tells gdm not to start... ever.

Then I disabled the splash screen on startup following these instructions:
$ sudoedit /etc/default/grub
$ sudo update-grub 
Then I had to setup an .xinitrc file so that I could actually start my awesome session. It's pretty easy:

$ touch ~/.xinitrc
Then I added the following lines:
nm-applet & #Runs the nm-applet so we can use the nice GUI
exec awesome
And that's the current state of my system.

There are a few things on my wishlist that I'll post when I find the answers:

  1. The virtual terminal isn't swapped to at the beginning, so I have to  Ctrl+Alt+F1 after the boot process. Not sure what the issue is there.
  2. I don't like having to have X started for the network stuff. I can connect to open networks fine, but I need to setup some scripts/cron jobs to auto connect to a list of networks. If I don't find a pre-wrapped solution I may roll my own via Python.
  3. Viewing images/video without having to startx. Not that it's a horrible thing, but it would be pretty cool if I didn't have to - or had some way to simply launch programs in X without having a terminal open, that might be acceptable.
I think those are the extent of my problems that I don't already have some knowledge of how to fix.

Friday, July 29, 2011

Review: DIY Bookbinding

DIY Bookbinding
Bind your own book by hand
By Brian Sawyer

is a short (32 pages) article that teaches you how to bind your own books. Whether you find the idea of binding your own books exciting, or you just want a way to preserve your magazines or other printed material, DIY Bookbinding is a book for you.

Brian Sawyer takes you step-by-step through the bookbinding process, from pulling the pages out of a perfect bound book, all the way up through putting in the endsheets. If you're interested in binding your own books, this book has some great information.

The Good
High quality photos and step-by-step instructions make this guide an excellent how-to. The amount of literature available on the internet dealing with book binding is somewhat limited, so the concentrated information here is quite welcome.

The Bad
I wished this article had more illustrations to accompany or replace some of the photographs. The important aspects of the photos ended out obscuring some of the more important details. Of course that means that there are reference images, so that's a good thing.

The Bottom Line
If you're interested in book binding, whether as a hobby, or just to preserve your magazines or other papers, you should buy this book. With the information in this guide, you can easily make back the $5 cover price, or make presents (journals, personalized books, etc.) of a high enough quality that will make this a good buy.

Thursday, July 14, 2011

Book Review: The Book of Ruby

The Book of Ruby, by Huw Collingbourne, is an interesting introduction to the language of Ruby. And a great choice for the advanced programmer who wants to pick up Ruby.

If you check out the Table of Contents you can see that after the introduction to Ruby, the author provides plenty of instruction on how Ruby deals with classes, and then moves to strings and other common data types. After discussing data types, The Book of Ruby goes on to present different flows (loops, if-else statements) and grouping (blocks, methods) and then drops into a fairly powerful Ruby construct called Symbols. You'll also find information on marshaling data, and storing it to disk either by marshaling or YAML data.

Overall this was an interesting book - I liked having several small programs to work with, which let you focus on a single concept. My biggest issue with this book is jumping straight from an introductory "Hello World!" program into classes. For the novice programmer, this approach is probably like jumping in the deep end and I would have to recommend picking up another book to learn how to program. When reading The Book of Ruby you won't be entertained or bored, merely informed. I'd say this book is best suited for reference material, and would be a great addition to your reference library.

Book Review: The Myths of Innovation

The Myths of Innovation, by Scott Berkun, is an interesting read. In this book he argues that the word innovation is overused, and that true innovation is a hard thing. He provides examples of true innovators, (Ford, Edison, Jobs, Brin and Paige) and explains how we build myths around the men.

I really enjoyed Berkun's take on the term innovation. He does a wonderful job of persuading the reader that innovation isn't just something that you do on a daily basis, but that it's more of a process. I found his arguments compelling. There were many thought provoking points, and I think my favorite was "Creativity has more to do with being fearless than intelligent or any other adjective superficially associated with it." His arguments and examples helped me to sort of "meta-think", or think about the ways that people think about the world. I think the most eye-opening parts of the book are when he tries to shed the aura of mystique from around the innovators of the past and the present. One of the points he made is that there's no magic moment of innovation - as humans we just build up the idea that there was one magic moment when Bell invented the telephone, or Newton discovered gravity, or Copernicus developed his heliocentric theory.

I think that anyone who has ideas should read this book. If you want to invent something, or be the next Mark Zuckerberg, then you should read the Myths of Innovation. If you are a knowledge worker (programmer, artist, etc. - or if you just want to be one), you should read this book. The Myths of Innovation was a good read, and helps pull mythic figures of the past off their pedestals.

Friday, February 4, 2011

ed man! !man ed

ed is the standard editor. And I just wrote my first Python program with ed today. Sure, it was a short one:

num = int(raw_input("Please enter a number: "))
print "%d^2 = " % num, num**2

but by golly, it was a program written in ed!

So... just how geeky does that make me?

Wednesday, January 19, 2011

Book Review - jQuery Pocket Reference

jQuery Pocket Reference, by David Flanagan leads the reader through a lot of the basic jQuery principles. This book is for those who are fairly familiar with JavaScript already, and are interested in the jQuery library, or those who may have some experience with jQuery and want a solid guide to its features, as well as a language reference.

In jQuery Pocket Reference, you will be introduced to the basic concepts of jQuery which includes the some of the what and why behind jQuery. You will also learn how to modify DOM element attributes, add and remove elements from your page, work with events, animate your elements, working with Ajax, some utility functions, how to extend jQuery, and you will also learn some about the jQuery UI library that allows you to automate the building of a user interface. Then, of course, you have the actual language reference.

I was again impressed by Flanagan's writing in this book. I had only heard of jQuery before I got this book, but I have some familiarity with JavaScript (and several years experience with other languages), and this book has been a great introduction to jQuery and I'm sure the reference will come in handy later this semester in my Web Technology class. If you're looking for a great reference for jQuery, you should buy this book.