February 2012
5 posts
2 tags
Convert Ruby 1.8 to 1.9 hash syntax
In vim, for an entire file:
:%s/:\([^ ]*\)\(\s*\)=>/\1:/g
In the shell, for an entire project:
perl -pi -e 's/:([\w\d_]+)(\s*)=>/\1:/g' **/*.rb
Now, instead of those old-school hashes like this:
get '/', :agent => MOBILE_BROWSERS do
You’ll have new-school hashes like this:
get '/', agent: MOBILE_BROWSERS do
[shared via giant robots smashing into other giant robots]
2 tags
After Years Of Drilling, Antarctic Lake Will Be...
By Katia Moskvitch
Science reporter, BBC News
The first satellite images of Lake Vostok were obtained in the 1990s
Continue reading the main story Related Stories
In Pictures: The hidden lake
New lakes beneath Antarctic ice
Secret rivers found in Antarctic
With only about 50m left to...
2 tags
Neil Young is right — piracy is the new radio
Comments
[shared via Hacker News]
2 tags
Plan 9: The way the future was
Comments
[shared via Hacker News]
2 tags
Study Finds Engineers Far More Likely than MBAs to...
Comments
[shared via Hacker News]
January 2012
29 posts
2 tags
Zsh is your friend.
I don’t know if you know this, but ZShell is your friend, you might not know it
yet, but its true. I know what you are thinking , “whats wrong with Bash?”,
nothing, except its not Zsh.
Its not that Bash is a bad guy, I don’t want to put him down, but if we
were picking teams, Bash would be last picked in gym class.
He isn’t very versatile and he doesn’t do anything particularily great, all in...
2 tags
Codecademy Becomes A Platform: Now Anyone Can...
Comments
[shared via Hacker News]
2 tags
Sorry, this blog post is not available in your...
Comments
[shared via Hacker News]
2 tags
Legal streams are less available for rentals than...
Comments
[shared via Hacker News]
2 tags
The Power of Introverts: A Manifesto for Quiet...
Comments
[shared via Hacker News]
2 tags
Your Users Won't Read
Comments
[shared via Hacker News]
2 tags
Once set, variables are always defined
When you set a variable in a section of code that is never executed, the variable will still be defined.
if false
a = 'whatever'
end
puts a
# => "nil"
# Does NOT raise 'NameError: undefined local variable or method `a' for main:Object'
This post was submitted by Olivier El Mekki. [shared via Ruby Quicktips]
I'm at The Clevelander - C-Level Rooftop Terrace!
http://4sq.com/quRa1X
I'm at Hog's Head!
http://4sq.com/cDdmQR
2 tags
Rails 3.2.0: Faster dev mode & routing,...
So we didn’t quite make the December release date as we intended, but hey, why break a good tradition and start hitting release targets now! In any case, your patience has been worldly rewarded young grasshopper: Rails 3.2 is done, baked, tested, and ready to roll!
I’ve been running on 3-2-stable for a few months working on Basecamp Next and it’s been a real treat. The new faster dev mode in...
I'm at Envy Labs!
http://4sq.com/eu8Ky9
I'm at London Gatwick Airport (LGW)!
http://4sq.com/27d3PN
2 tags
How I Program Stuff
Comments
[shared via Hacker News]
2 tags
Data Mining: Finding Similar Items and Users
Comments
[shared via Hacker News]
2 tags
Getting Started with Sublime Text 2
Comments
[shared via Hacker News]
2 tags
UK Schools ICT to be replaced by computer science...
Comments
[shared via Hacker News]
2 tags
Survival Guide:IRC
Comments
[shared via Hacker News]
2 tags
In 1951 there was a children's U-238 Atomic Energy...
Comments
[shared via Hacker News]
2 tags
This is why I don't believe in remote workers
Comments
[shared via Hacker News]
2 tags
Intelligence is Irrelevant: An MIT Alum’s Advice...
Comments
[shared via Hacker News]
2 tags
Basic Workflow of Excellent Customer Service
Comments
[shared via Hacker News]
2 tags
A simple guide for getting started with git
Comments
[shared via Hacker News]
2 tags
Finnish ISP forced to block access to ThePirateBay...
Comments
[shared via Hacker News]
2 tags
XMPP on heroku with Ruby
Comments
[shared via Hacker News]
2 tags
First Look at Kepler SETI Candidate Signals
Comments
[shared via Hacker News]
2 tags
E-mail is the Universal Platform
Comments
[shared via Hacker News]
2 tags
Could Coding Become the Next Mass Profession?
Comments
[shared via Hacker News]
2 tags
Piracy is not a problem; SOPA is not a solution
Comments
[shared via Hacker News]
2 tags
Fast, easy, realtime metrics using Redis bitmaps
Interesting use of bit sets to determine daily active users.
[shared via Rails Quick Tips]
December 2011
21 posts
2 tags
The reason productivity improvements don't...
GTD, 18 minute plans, organized folders… none of them work as well as you’d like.
The reason is simple: you don’t want to get more done.
You’re afraid. Getting more done would mean exposing yourself to considerable risk, to crossing bridges, to putting things into the world. Which means failure.
The leap the lizard brain takes when confronting the opportunity is a...
2 tags
How Airplanes Fly: A Physical Description of Lift
Comments
[shared via Hacker News]
2 tags
AIDS vaccine wins approval
Comments
[shared via Hacker News]
2 tags
37signals doesn’t like you sorting stuff. Are you...
Comments
[shared via Hacker News]
2 tags
Let’s Build a Simple Video Game with JRuby: A...
Ruby isn’t known for its game development chops despite having a handful of interesting libraries suited to it. Java, on the other hand, has a thriving and popular game development scene flooded with powerful libraries, tutorials and forums. Can we drag some of Java’s thunder kicking and screaming over to the world of Ruby? Yep! - thanks to JRuby. Let’s run through the steps to...
2 tags
TextMate 2 (Public) Alpha
Comments
[shared via Hacker News]
2 tags
Ludum Dare for Rubyists: An Online 48 Hour Game...
Ludum Dare is an online accelerated game development event that focuses on regular 48 hour competitions. Think Rails Rumble but for games! It’s been around since 2002 but has had a big publicity boost recently due to the participation of Notch, the creator of the mind-bogglingly popular indie game Minecraft.
The next Ludum Dare contest is taking place this coming weekend between December...
2 tags
Insulate yourself...
from anonymous angry people
Expose yourself to art you don’t yet understand
Precisely measure the results that are important to you
Stay blind to the metrics that don’t matter
Fail often
Ship
Lead, don’t manage so much
Seek out uncomfortable situations
Make an impact on the people who matter to you
Be better at your baseline skills than anyone else
Copyedit less,...
2 tags
Teachers Don’t Like Creative Students
Comments
[shared via Hacker News]
2 tags
Vim: revisited
Comments
[shared via Hacker News]
2 tags
The key value store we ignored (Postgresql)
Comments
[shared via Hacker News]
2 tags
Spaniards prototype ARM-GPU hybrid supercomputer
Comments
[shared via Hacker News]
2 tags
What children's drawings look like when painted by...
Comments
[shared via Hacker News]
2 tags
Infographic: What Tools Developers Actually Use
Comments
[shared via Hacker News]
2 tags
Moving to Stripe: Fixing the Biggest Mistake I've...
Comments
[shared via Hacker News]
2 tags
Announcing Amber.js
A little over a year ago, I got my first serious glimpse at SproutCore, the JavaScript framework Apple used to build MobileMe (now iCloud). At the time, I had worked extensively with jQuery and Rails on client-side projects, and I had never found the arguments for the “solutions for big apps” very compelling. At the time, most of the arguments (at least within the jQuery community) focused on...