Skip to content

Ramblings

Musings of Matt Williams
  • Blog
  • About
  • Chibi
  • Ruby Blender
  • Archives
  • Log in
 
Less
More
Trim
Untrim
« Older
Home
Loading
Newer »
Archive for the 'programming' Category
26Aug08 Sometimes More is Just Enough
Just Enough Programming programming
0 Comments

In the quest for simplicity and maintainability, sometimes we need to add components.  It seems counter intuitive, perhaps, but sometimes it’s true.

As an example, I once came across a project which had multiple queries, each of which contained over 40 lines of SQL code.  I don’t know about you, but 40 lines of code for a single query smacks of being overly complex. The query was too long for the database to optimize and far too long for humans to maintain, let alone understand.

In this case, to “simplify”, the queries were perfect candidates for database views and stored procedures.  Thus, by adding components to the architecture, we’ve actually made it simpler and easier to maintain.

26Aug08 Why my code is broken….. (break my code redux)
gotchas programming ruby
0 Comments

Yesterday, I posted an article entitled Break my code, please, wherein I posted a very fragile piece of code, with the challenge to find ways in which to break it.

What follows is a discussion of the code and why it is bad/fragile/easily broken…..

Continue reading ‘Why my code is broken….. (break my code redux)’

25Aug08 Break my code, please
gotchas programming ruby
1 Comment

There’s a number of things we can should take into account when writing code — boundary cases, etc., that can make or break a programme.  Yes, testing is important, but I think that developing good defensive programming practices is even more important.  That said; I present the following, fragile, code.  Just about every line has a case where it can fail.  Can you break my code?  I’ll post some test cases which cause it to fail later.

And for those looking for the next installment of O_RLY?, it’s coming soon; I’ve been embroiled in a hideous move.

Continue reading ‘Break my code, please’

15Aug08 Just Enough Programming: The missing cornerstone
Just Enough Programming programming
0 Comments

I was just speaking with a coworker about JEP. In the course of our conversation I realized that in my list of the foundations of JEP, I had left off what is perhaps the most important one of all — Pragmatism. If I were to sum up and explain JEP in one word it would have to be pragmatism. Pragmatism implies using sensible solutions to solve problems. Pragmatism stresses being practical over principles or ideologies.

In short, are we trying to solve problems, or are we building edifaces to what Neal Ford refers to as the programming priesthood?

14Aug08 Quotes on Simplicity
Just Enough Programming programming
1 Comment

“If a thing can be done adequately by means of one, it is superfluous to do it by means of several; for we observe that nature does not employ two instruments where one suffices.” — Thomas Aquinas

“Simplicity is the ultimate sophistication.” — Leonardo DaVinci

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.

A program should follow the `Law of Least Astonishment’. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least.

A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.

If the program fails in these requirements, it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program.  — The Tao of Programming, 4.1

14Aug08 Foundations of Just Enough Programming
Just Enough Programming programming
1 Comment

The ability to simplify means to eliminate the unnecessary so that the necessary may speak. — Hans Hoffmann

A little while ago I’d come up with the following as a semi-serious description of Just Enough Programming:

Are you tired of over architected applications?  Does infinite scalability imply infinite development time?  Are you surrounded by applications whose sole goal is to be buzzword compliant?  Do you suffer indigestion from the “extra sauce” that makes the management happy?  Do the systems diagrams look like a redneck family tree?

If any or all of these are true, then you need Just Enough Programming™.  JEP makes liberal use of Ockham’s Razor, cutting through the cruft and getting to the crux of the issue.  It slices.  It dices.  It even juliennes.  JEP fosters simplicity and elegance by seeking to make systems as simple as possible, but not simpler.  Its goal is to achieve perfection by reaching the state where we have nothing more to take away.  JEP is not just a methodology; it’s a way of life.

While it’s tongue in cheek I’d like to talk about the foundations of JEP.
Continue reading ‘Foundations of Just Enough Programming’

12Aug08 O_RLY? A Ruby/Rails implementation of snowl (Part I)
programming rails
0 Comments

Recently Mozilla Labs released a prototype of snowl, a rss/atom/twitter feed reader. It is a firefox plugin and provides two views of messages — a “traditional” message view, as well as a “river of news“. I thought that this could be easily “redone” as a rails application. The rest of this article steps through the process of creating it.
Continue reading ‘O_RLY? A Ruby/Rails implementation of snowl (Part I)’

 
Browse Archives »
  • administrivia (6)
  • books (1)
  • Computers (2)
  • css (3)
  • eating crow (1)
  • games (1)
  • glassfish (1)
  • gotchas (18)
  • howto (2)
  • idiocy (3)
  • javascript (4)
  • jboss (6)
  • jruby (7)
  • Just Enough Programming (7)
  • life hacking (2)
  • mini sagas (1)
  • miscellany (1)
  • monitoring (1)
  • mysql (1)
  • philosophy (4)
  • php (1)
  • programming (17)
  • rails (7)
  • rants (2)
  • refactoring (1)
  • ruby (14)
  • tips (9)
  • tools (2)
  • torquebox (1)
  • Uncategorized (9)
  • UNIX (1)
  • utilities (3)
  • web (5)
  • web design (3)
 

Latest

  • JBoss Client Jars for Messaging
  • rsh hates nohup
  • Torquebox and Cygwin: Take I
  • Rails & JRuby in a Jar
  • Fractal Terrain Generation
  • Quick thought on programming and distractions
  • Using jnp as a JBoss heartbeat
  • z-index and events
  • JBoss port confusion
  • SSL Joys

Flickr

layout_newm3headerTerrain Testa

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Search

Browse by Category

  • administrivia (6)
  • books (1)
  • Computers (2)
  • css (3)
  • eating crow (1)
  • games (1)
  • glassfish (1)
  • gotchas (18)
  • howto (2)
  • idiocy (3)
  • javascript (4)
  • jboss (6)
  • jruby (7)
  • Just Enough Programming (7)
  • life hacking (2)
  • mini sagas (1)
  • miscellany (1)
  • monitoring (1)
  • mysql (1)
  • philosophy (4)
  • php (1)
  • programming (17)
  • rails (7)
  • rants (2)
  • refactoring (1)
  • ruby (14)
  • tips (9)
  • tools (2)
  • torquebox (1)
  • Uncategorized (9)
  • UNIX (1)
  • utilities (3)
  • web (5)
  • web design (3)

Browse by Tag

  • 1.2.6
  • 2.1
  • administrivia
  • autotest
  • books
  • controller
  • css
  • feed-normalizer
  • feeds
  • gotchas
  • idiocy
  • irb
  • Java
  • javascript
  • jboss
  • jruby
  • just enough programming
  • mini sagas
  • open-uri
  • philosophy
  • php
  • pragmatism
  • programming
  • quotations
  • rails
  • rants
  • reading
  • restful_authentication
  • rspec
  • rss
  • ruby
  • rubygems
  • scriptaculous
  • setup
  • simplicity
  • sprites
  • statemachine
  • tips
  • treetop
  • utilities
  • web
  • web design
  • websense
  • yaml
  • zentest

Browse by Month

  • November 2010 (1)
  • August 2010 (1)
  • June 2010 (1)
  • March 2010 (1)
  • September 2009 (1)
  • August 2009 (2)
  • July 2009 (2)
  • May 2009 (1)
  • April 2009 (1)
  • February 2009 (4)
  • January 2009 (2)
  • December 2008 (2)
  • November 2008 (5)
  • October 2008 (3)
  • September 2008 (12)
  • August 2008 (28)
 
 
  • Blog
  • About
  • Chibi
  • Ruby Blender
  • Archives
  • Log in
 


Theme Design by Jay Kwong | Powered by WordPress and K2

 

Home Top Archives Entries FeedComments Feed