Fork me on GitHub

Sentient Monkey

I'm just another code monkey.
I work and am married to a talented photographer.

“I hate blogs. Blogs are for angry people who are sitting at their computer with a glass of wine at midnight with nothing better to do. No companies use blogs anymore.”
(via clientsfromhell)

In light of our recently announced Vim for Rubyists course, co-taught by Ben Orenstein, here are more vim tips from those in the trenches all day! For prior tips from us see part one and part two.

Viiiiiiiiiiiiiiiiiim

From Josh:

How does vim help me kick ass at life? It’s simple. I type less.

Vim allows…

Really, amazon?  I can’t image that users’ experiences will be better with IE8.  Unless they are using IE6 or IE7.

Really, amazon? I can’t image that users’ experiences will be better with IE8. Unless they are using IE6 or IE7.

Using Silk for Neural Bioelectronics
Researchers in the US have developed a new way to connect tiny electronic circuits to the human brain. John Rogers of the University of Illinois at Urbana-Champaign and colleagues have developed a high-quality biocompatible interface from silk substrates containing electronic components that can “wrap” itself around biological tissue. The system allows electrical activity of living tissue to be measured with unprecedented precision, without damaging the tissue in any way.

Using Silk for Neural Bioelectronics

Researchers in the US have developed a new way to connect tiny electronic circuits to the human brain. John Rogers of the University of Illinois at Urbana-Champaign and colleagues have developed a high-quality biocompatible interface from silk substrates containing electronic components that can “wrap” itself around biological tissue. The system allows electrical activity of living tissue to be measured with unprecedented precision, without damaging the tissue in any way.

Andy Rooney is a crazy old man. He hates music, watches, kitchen utensils , models, and carrying things.

This is either the best or worst ideas I’ve ever heard.  I need to try it.
thedrunkenmoogle:


T-Virus (Resident Evil Shot)
Ingredients:3/4 shot Silver Rum1/4 shot Everclear1 Blue Twizzler  
Directions: Wind a blue Twizzler around a tall double shot glass.  It should stick to the sides of the glass.  Pour in the silver rum and top with the Everclear.  Drink, then eat the Twizzler for a sweet and tangy aftertaste. You will have to fish out the Twizzler with your finger after you drink, as it will still be stuck to the side of the shot glass.
This is part of a series of Resident Evil drinks I’ve been making.  More to come!(Original drink created and photographed by The Drunken Moogle.)

This is either the best or worst ideas I’ve ever heard. I need to try it.

thedrunkenmoogle:

T-Virus (Resident Evil Shot)

Ingredients:
3/4 shot Silver Rum
1/4 shot Everclear
1 Blue Twizzler  

Directions: Wind a blue Twizzler around a tall double shot glass.  It should stick to the sides of the glass.  Pour in the silver rum and top with the Everclear.  Drink, then eat the Twizzler for a sweet and tangy aftertaste. You will have to fish out the Twizzler with your finger after you drink, as it will still be stuck to the side of the shot glass.

This is part of a series of Resident Evil drinks I’ve been making.  More to come!
(Original drink created and photographed by The Drunken Moogle.)

smelly socks The other day my teammate said, “I finally found something that stinks about Ruby’s core library.”

What was wrinkling his nose? The Dir class gives you no way to ask for files only, or for directories only. He had a point. The Dir.entries is inflexible. And even the flexible

I really disagree with Nils Jonsson’s take on ruby’s standard library and so does matz. Nils claims that Something stinks about Ruby’s Core Library, and goes on to provide an implementation for Dir.files and Dir.directories. Yes, there might be functionality that is missing here, but it’s trival to implement. His solution shells which is both dangerous and non-portable. It’s also unnecessarily complex. The beauty of ruby is that it can be changed in very simple ways to solve your problem - even the core library. Here’s my alternative (and much shorter and portable) solution:

class Dir    
  def self.directories(path)
    Dir.new(path).entries.select do |e|
      File.directory?(File.join(path, e))
    end
  end
  
  def self.files(path)
    Dir.new(path).entries.select do |e|
      File.file?(File.join(path,e))
    end
  end
end

Now, his two main arguments where:

  • if you don’t mind some computing time and space wasted and you want to write as little code as possible
  • if you know the contents of the directory in advance

The computing time and space will be much much worse with forking out to the shell listing all of the files, then gsubing out the items with a trailing slash. The ruby filtering will be much faster. But, if performance is a concern, I’m sure my code could be re-written as ruby C much like the rest of the Dir class, and it would be even faster. In the non-windows example, ‘ls -d’ is begin used to filter. In most POSIX implementations of ls, it uses opendir(), readir(), and stat(). So, ls is looking at each file and determining if it is a directory or not. This could potentially be sped up by using scandir(), but that’s a newer POSIX standard, so it might not be available on older unix systems.

If I just image Lost as Johnny Quest it becomes awesome

thedailywhat:

Reimagination of the Day: Slick, stylish, Saul Bass-inspired Lost title sequence by Hexagonall.

See Also: Saul Bass x Tron.

[/film.]

Ruby Can’t Scale (Don’t Listen to John Metta)!

This is a follow-up to Ruby Can’t Scale! by John Metta

I want everyone to believe that Ruby can’t scale. I want you to think that Ruby is an awkward, weird little academic language that shouldn’t be used in “real” production deployments. I want you to think that it’s slow, memory hungry, full of security holes and breaks the rules of proper programming.

I don’t want everyone to use Ruby. I want to keep it for myself. I want my company to build software faster, easier, and still be able to go home before it’s dark out while outbuilding you and your product. I want to have my pick of small startups and recruiters breathing down my neck to hire me because I know this weird, obtuse, little language. If you learn it, then I’ll have to work even harder to beat out the next guy.

So beware of Ruby! It has lambdas, class evals, blocks, mixins, and all sorts of scary things. These are weird and strange! Stick to what’s tried and true. Java and C++ aren’t going anywhere. They are stable, and besides, that’s what real companies use. Save Ruby for me.

Introducing simplegeo-ruby.  This is a simple ruby client that I wrote for SimpleGeo API.  It’s a pretty cool service that allows you handle all of your geo-spatial queries in the cloud (it’s like twillio for geo services).  Check it out and let me know if you see any bugs!

Introducing simplegeo-ruby. This is a simple ruby client that I wrote for SimpleGeo API. It’s a pretty cool service that allows you handle all of your geo-spatial queries in the cloud (it’s like twillio for geo services). Check it out and let me know if you see any bugs!

Theme by paulstraw.