Dan Collis-Puro

Tech. Open Source. Stuff that doesn't suck.

Compile Pov-ray on Debian Jessie

Man I’m terrible at keeping this blog up to date. Anyway – I’ve decided to play around with the Persistence of Vision raytracer again (aka “pov-ray”). It’s a pretty old but capable raytracer. It’s got a fairly easy to understand scene description language that gives you some major power, and I’d like to think I’ll be able to auto-generate some interesting stuff via ruby – we’ll see.

Unfortunately, it’s been removed from the debian repos, so you’re left to get it installed yourself. Here’s how I did it on debian testing (currently “jessie”):

sudo aptitude install build-essential libboost-dev libboost-thread-dev zlib1g-dev libpng12-dev libjpeg8-dev libtiff5-dev libopenexr-dev
git clone https://github.com/POV-Ray/povray
cd povray
git co 3.7-stable
# Now we follow the unix/install.txt instructions, sorta.
cd unix
#Need to fix prebuild.sh for the newer version of automake in jessie
sed 's/automake --w/automake --add-missing --w/g' -i prebuild.sh
cd ..
./configure --prefix ~/bin/povray COMPILED_BY='dan@collispuro.cnet' LIBS="-lboost_system -lboost_thread"
make
make check
make install

and it’ll install into ~/bin/povray/.

Thanks to this post for getting me over the automake incompatibility confusion, where an empty Makefile.in was being generated while trying to ./configure.

@ficklehand - a Twitter ‘Bot to Help You Make Meaningless Decisions

How many times are you faced with fundamentally meaningless, but “difficult” to make decisions? Classic examples include choosing what to eat for lunch, which book to start reading or what movie to see.

Inspired by this Freaknomics podcast and conversations around the thoughtbot office, I’ve written a twitter ‘bot to absorb some of that decision fatigue for you.

Tweet @ficklehand a tweet that contains choices separated by “or” or the pipe character (the “|” on your keyboard, for non-programmers). @ficklehand (the “fickle hand of fate”) will decide and reply to your tweet.

Example:

How to Fix Linecache19 Install Problems on Ubuntu

So while attempting to install the linecache19 gem under rvm on ubuntu 12.04 (aka “precise”), I ran into a problem where it took a long, long time to compile.

The fix was fairly simple:

gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p193

where the last bit of that line should match your ruby version. I would imagine this’d work outside RVM with a different source path, too.

Switching Back to Linux From Osx

I am a long time linux user – a developer, sysadmin, and all-arounder that uses open source software to solve problems. Most recently, I’ve worked primarily with ruby and ruby on rails. I recently started a job with thoughtbot, much to my delight.

When I started at thoughtbot, I was given a Macbook Pro Retina, but it was made clear I could always switch back to linux. This is exceptional behavior when you think about it – thoughtbot has a way of doing things and a vast majority of its staff use osx, but they trust their developers to know their needs and loves best.

I figured I would give osx a try, not wanting to be a pain and figuring there are reasons why so many smart people use it. After a month, I can say that osx is not for me.

Things I liked about osx (and the retina laptop):

  • The display is gorgeous. Text is beautiful. This is not that big a deal as most of my real work is done on an external monitor.
  • There is a large community of developers using osx. If you want to do something, chances are you can find help at the end of a google search.
  • homebrew makes life bearable as an open source developer. I am happy it exists, and I don’t see how you could do anything interesting without it.
  • The open source software that I depend on runs fine on it: ruby, rvm, postgres, mongodb, redis, vim, bash, etc. Again, praise be to homebrew and open source in general.
  • I didn’t feel particularly annoyed getting a workable development environment set up, though I do believe it’s significantly easier and more consistent on linux. Our laptop scripts were enormously helpful.
  • There are many slick apps made only for osx that I will never / rarely use – but I get why people like them and need them.
  • copy-and-paste is consistent across all applications.
  • I like two finger “natural scrolling” – you’re “grabbing” the viewport and flinging it around, like you’re on a touch device. I will probably make my linux laptop do the same when I get it.

Things that tipped me back to linux:

  • More hardware choices. Apple hardware is nice and all, but I like that I can optimize my working environment exactly how I want. I understand some people aren’t interested in shouldering this “burden” and want to buy hardware that works with minimal fuss. I am not one of those people. I like choices.
  • There is a large community of developers on linux, and almost all ruby (and other server-side) apps built on osx end up running on linux. The community is just as large (if not larger) and oozing with talent. The open source osx / linux developer communities are largely complimentary.
  • There are many seemingly basic features on osx that require paying money or installing software from outside the app store. Global keyboard shortcuts? Hardware monitoring widgets? Fan control? Almost all open source software? I don’t like managing multiple sources of software (app store, homebrew, dmgs, custom compiles), and it’s a huge step backwards coming from apt. This is a big one.
  • apt is amazing and works a crapton faster (no compiling, no downloading from slow project websites). It integrates installed software into the operating system in a more standard fashion and is just enormous. You rarely need to wander outside apt to get what you need. The same can be said for yum and YaST.
  • I don’t like how osx manages windows. I don’t like command-tab switching between apps but then command-backtick switching between open windows of an app, I’d rather it was all encapsulated into command-tab. I don’t like that apps can be open without any open windows. I don’t like not having virtual desktops. I don’t like the maximize control not actually maximizing apps to the full width of the screen. I’m sure many of these issues can be fixed with software from somewhere, installed somehow, costing some amount and getting updated some way. I can make linux work any way I want, easily and for free.
  • Right click and a middle mouse button. Seriously, I miss them. Yes, I could use an external mouse.
  • command, control, and option keys change function seemingly at random throughout many applications and parts of the os. There is a lot of cognitive investment involved in remember how to, say, tab-switch in many applications, and if you’re lucky you can customize it.
  • Apple scares me. I do not like their vision for the future of computing and the recent Apple v Samsung verdict really bothers me, along with nearly every other legal action they’ve taken. Apple can’t brook any competition and is willing to do WHATEVER to kill it. They scare me more than Microsoft ever did, but fortunately they are still a bit player in desktop computing. The awful things being done to Windows 8 makes me wonder where we’re going: will people choose the pretty, simple, restrictive world of Apple devices or the freedom, flexibility and frontier town feeling that linux provides? I don’t know, but I know which is more attractive to me.
  • I know linux well. I enjoy learning more about it, I like being able to switch desktop environments occasionally, I love the proc filesystem, I don’t mind fixing rare little quirks. I like to tinker.
  • The apple “reality distortion field.” Here’s one small example – the macbook pro retina doesn’t have an external sleep indicator, while all other macbooks do. It’s not missing, it was never there. Take what you’re given.
  • Launchpad and the dashboard are insultingly worthless. They should be buried and forgotten. The fact that apple wastes default keyboard bindings on these turds speaks volumes. I do not like this direction at all, and if this is the future osx is clearly not for me.

This is the end… beautiful friend

I’m glad I had a chance to immerse myself in osx. I don’t feel it impeded my productivity significantly and I understand better now why other developers like it.

It’s not for me, though. I will be happy to be back on linux. Developers afraid that linux is limited or difficult – you might be surprised. The BS quotient seems about the same, honestly: but linux gives you a solid dev environment with a side of freedom and a lot more flexibility to boot.

Update, 9/10 8:35am :

Thanks for pointing out spaces, and the alternative ways to right-click. Helpful, though not key elements of why I’m switching back.

How to Get Good Repair Service From SprintPCS

Don’t go to a non-corporate store. The resellers just don’t seem to care about customers as much as the employees at the corporate stores.

I have been lied to (directly!), gotten repeated lame excuses (You JUST missed our tech!) and generally had clueless service. It’s farther and much more annoying to get to a corporate store for me, but the time and frustration saved is worth it. Lessons learned.

Wrap-up of My First Week at Thoughtbot

Random thoughts about my first week as a developer at thoughtbot:

  • I have much to learn about design patterns. The GoF book will be my close friend for a while.
  • I know more about metaprogramming than I thought, I just needed the terminology.
  • Pairing is an amazing way to transfer knowledge and should be done frequently. I learned a ton during and after because I took notes and then researched and practiced concepts new to me.
  • thoughtbot invests a huge amount of time (and therefore money) improving the skills of its developers. It shows.
  • osx is a fine desktop environment, but the amount of crap you need to wade through to set it up as a ruby development environment (as compared to debian / ubuntu) is kind of hilarious. That said, it’s working fine now and it wasn’t particularly hard, it just didn’t feel “native” like it does on linux.  I could take or leave osx, but it’d be hard to stop using a retina display - text is absolutely gorgeous.
  • I don’t know what I’d do without homebrew.
  • thoughtbot dotfiles are great, and the vim set up was very similar to my own but with significant additional refinements. Use them.