ENTRIES TAGGED "ruby on rails"

Four short links: 28 August 2014

Four short links: 28 August 2014

Visual Python, Scraping and Screenshotting, Un-free Speech, IP Law Textbook

  1. PlotDeviceA Python-based graphics language for designers, developers, and tinkerers. More in the easy-to-get-started + visual realm, like Processing. (via Andy Baio)
  2. Scumblr and Sketchy Search — Netflix open sourcing some scraping, screenshot, and workflow tools their security team uses to monitor discussion of themselves.
  3. Should Twitter, Facebook and Google Executives be the Arbiters of What We See and Read? (Glenn Greenwald) — In the digital age, we are nearing the point where an idea banished by Twitter, Facebook and Google all but vanishes from public discourse entirely, and that is only going to become more true as those companies grow even further. Whatever else is true, the implications of having those companies make lists of permitted and prohibited ideas are far more significant than when ordinary private companies do the same thing.
  4. Intellectual Property: Law and the Information Society; Cases and Materials (PDF) — James Boyle and Jennifer Jenkins’ open law textbook on IP (which even explores the question of whether that’s a valid and meaningful term). (via James Boyle)
Comment

Reddish-Greenish-Refactor

Variations in Test-Driven Development

london_traffic_lights“Red-Green-Refactor” is a familiar slogan from test-driven development (TDD), describing a popular approach to writing software. It’s been both popular and controversial since the 2000′s (see the recent heated discussions between David Hansson, Bob Martin, and others). I find that it’s useful but limiting. Here I’ll describe some interesting exceptions to the rule, which have expanded the way I think about tests.

The standard three-step cycle goes like this. After choosing a small improvement, which can be either a feature or a bug fix, you add a failing test which shows that the improvement is missing (“Red”); add production code to make the test pass (“Green”); and clean up the production code while making sure the tests still pass (“Refactor”). It’s a tight loop with minimal changes at each step, so you’re never far from code that runs and has good test coverage.

By the way, to simplify things, I’ll just say “tests” and be vague about whether they’re technically “unit tests”, “specs,” “integration tests,” or “functional tests”; the main thing is that they’re written in code and they run automatically.

Red-Green-Refactor is a very satisfying rhythm when it works. Starting from the test keeps the focus on adding value, and writing a test forces you to clarify where you want to go. Many people say it promotes clean design: it’s just easier to write tests when you have well-separated modules with reasonable interfaces between them. My personal favorite part, though, is not the Red but the Refactor: the support from tests allows you to clean things up with confidence, and worry less about regressions.

Now for the exceptions. Read more…

Comment
Four short links: 1 February 2013

Four short links: 1 February 2013

Icon Font Fun, Rails Security, Indie Economics, and GitHub MITMed in China

  1. Icon Fonts are Awesome — yes, yes they are. (via Fog Creek)
  2. What the Rails Security Issue Means for Your Startup — excellent, clear, emphatic advice on how and why security matters and what it looks like when you take it seriously.
  3. The Indiepocalypse (Andy Baio) — We’re at the beginning of an indiepocalypse — a global shift in how culture is made, from a traditional publisher model to independently produced and distributed works.
  4. China, GitHub, and MITMNo browser would prevent the authorities from using their ultimate tool though: certificates signed by the China Internet Network Information Center. CNNIC is controlled by the government through the Ministry of Industry and Information Technology. They are recognized by all major browsers as a trusted Certificate Authority. If they sign a fake certificate used in a man-in-the-middle attack, no browser will warn of any usual activity. The discussion of how GitHub (or any site) could be MITM’d is fascinating, as is the pros and cons for a national security agency to coopt the certificate-signing NIC.
Comment: 1
Four short links: 30 April 2012

Four short links: 30 April 2012

A/B Testing in Rails, Open Source Groupware, Is the Internet Innovative, and Patent Art

  1. Chanko (Github) — trivial A/B testing from within Rails.
  2. OpenMeetings — Apache project for audio/video conferencing, screen sharing, whiteboard, calendar, and other groupware features.
  3. Low Innovation Internet (Wired) — I disagree, I think this is a Louis CK Nobody’s Happy moment. We renormalize after change and become blind to the amazing things we’re surrounded by. Hundreds of thousands (millions?) of people work from home, collaborate to develop software that has saved the world billions of dollars in licensing fees, provide services, write and share books, make voice and video calls, create movies, fund creative projects, buy and sell used goods, and you’re unhappy because there aren’t “huge changes”? Have you spoken to someone in the publishing, music, TV, film, newspaper, retail, telephone, or indeed any industry that exists outside your cave, you obtuse contrarian pillock? There’s no room on my Internet for weenie whiners.
  4. Context-Free Patent Art — endlessly amusing. (via David Kaneda)
Comment: 1
Four short links: 21 October 2011

Four short links: 21 October 2011

Mozilla's Projects, YouTube Insults, iPhone Ultrasound, RoR Intro

  1. What Mozilla is Up To (Luke Wroblewski) — notes from a talk that Brendan Eich gave at Web 2.0 Summit. The new browser war is between the Web and new walled gardens of native networked apps. Interesting to see the effort Mozilla’s putting into native-alike Web apps.
  2. YouTube Insult Generator (Adrian Holovaty) — mines YouTube for insults of a particular form.
  3. Ultrasound for iPhone (Geekwire) — this personal sensor is $8000 today, but bound to drop. I want personal ultrasound at least once a month. How long until it’s in the $200-500 range? (via BERG London)
  4. Web Applications Class at Stanford OpenClassroom — a Ruby on Rails class taught by John Ousterhout, creator of TCL/Tk and log-structured filesystems.
Comment: 1
Four short links: 16 December 2010

Four short links: 16 December 2010

Compressing Graphs, Authentication Usability, Extreme Design, and Rails Geo

  1. On Compressing Social Networks (PDF) — paper looking at the theory and practice of compressing social network graphs. Our main innovation here is to come up with a quick and useful method for generating an ordering on the social network nodes so that nodes with lots of common neighbors are near each other in the ordering, a property which is useful for compression (via My Biased Coin, via Matt Biddulph on Delicious)
  2. Requiring Email and Passwords for New Accounts (Instapaper blog) — a list of reasons why the simple signup method of “pick a username, passwords are optional” turned out to be trouble in the long run. (via Courtney Johnston’s Instapaper feed)
  3. Extreme Design — building the amazing spacelog.org in an equally-amazing fashion. I want a fort.
  4. rgeo — a new geo library for Rails. (via Daniel Azuma via Glen Barnes on Twitter)
Comment: 1