Uncategorized

Cool Erlang like feature in Ruby

So, in joining the bandwagon, I’ve been reading about Erlang recently.

One of the features I really like is matchers:

    1 many(X) ->
    2   case X of
    3     [] ->
    4       none;
    5     [ _One ] ->
    6       one;
    7     [ _One, _Two ] ->
    8       two;
    9     [ _One, _Two, _Three |_Tail ] ->
   10       many
   11   end.

This code will respond none for an argument array of no elements, 1 for 1 and so on. The two parts of this I like are a) the fact that Erlang matches against the number of variables, without extra syntax, and b) the fact that the underscore variables are discarded.

I just found out that you can discard variables in a parallel assignment in Ruby too!!!

    1 name, _, ext = first.name.spec.split(.)
    2 name # => “first”
    3 ext # => “spec”
    4 

That my friends, is awesome, and could only be made better by allowing me to splat the _ (*_) to allow it to catch an arbitrary number of variables.

Enjoy!

Uncategorized

Comments (0)

Permalink

Three Features

Reganwald had an interesting post about business programming the other day. In it he discussed the idea that business programming is about to become a lot more interesting. He suggests that business programming will require knowledge of the more science-y aspects of computer science, such as “recursion, operations on data structures, code generation, and other topics that are often derided as being “unnecessary” in a business programming context.” I tend to agree, and if I’m (he’s, we’re, something like that) wrong, then I’d venture to say that business is wrong, not us.

He does a better job of explaining it both in that post and in another where he implicitly comments on the state of enterprise programming, and how the “immature” Ruby programmers and their kin are making things difficult for the hypothetical Java programmer.

However, more to the point of this post, is the question at the end.

Name three features from public web ‘sites’ like Google, Amazon, and YouTube (you can pick any site or sites you like) that will make the jump to business applications in 2007.

He asks it in reference to a job opening that someone has, and readers are supposed to e-mail their answer in. I am getting ready to interview for someone else, so I decided against trying for this. However I still wanted to give my answer to the question.

  • Usability
  • User-Generated Content (UGC)
  • Tags

Usability

Users, especially web-savvy users are beginning to see the enjoyment, fun, and usefulness of sites like Gmail, Google Reader, and Flickr. I think that users will start to expect this type of interaction from all applications in their life, and be disturbed by business applications that try to play by different rules.

User-Generated Content

Companies will have to recognize the value and knowledge held by their employees (and possibly users). I imagine it will start with a single company opening up, and then it will become a landslide. Knowledge is too valuable to have it locked up in silos, especially if those silos are free to walk away.

Tags

Tags, keywords, call them what you will. The fact is: they work. Whats best about them, and what separates them from categories and keywords, is that they are defined at publishing and post-publishing. This allows tremendous adaptation that can’t be achieved with structured hierarchical categorizing. If I want to tag something, it just requires a database change, not a folder change. Yes, this is possible with keywords and similar methods, but the attitude is different. I think it is in the same way that Web 2.0 is different than DHTML. Same technology, different feel.

Conclusion

Only time will tell how this will all play out. It’s a cliche, but it’s true. Meanwhile, I think your going to see exciting improvements, and perhaps convergence of business and consumer technology. With that, you’ll probably see changes in thinking from the top to the bottom of companies. If a company doesn’t change, well, there’s always the Titanic.

Uncategorized

Comments (0)

Permalink

Grocist-Your Grocery List Since 2006

Grocist-Your Grocery List Since 2006

Really cool site, and idea. Found again via A Whole Lotta Nothing.

Once this becomes automatic, its gonna be really cool.

Uncategorized

Comments (0)

Permalink

Documentation update

So, I finished the documentation… but is not up… because WP lost it. I went to edit the source, and I lost 3/4 of my post. So I have to redo it…. )#*&$(*)&$(*&@#$@#)(*&

JD

Uncategorized

Comments (0)

Permalink

RadRails textmate templates

I have been inspired by earlier templates for RadRails and by the templates for JEdit, I have created another set of templates. These ones use the same commands as TextMate, and can use the same reference as the ones for JEdit (although I will try to post another reference soon).

To install:

  1. Unzip this file
  2. Open RadRails
  3. Goto Window>Preferences…
  4. Goto the Rails>Editors>RHTML Editor>RHTML Templates section
  5. Import the RHTML file.
  6. Goto the Ruby>Editor>Templates section
  7. Import the Ruby file
  8. Test it
  1. Open a ruby file
  2. Type ‘bt’ followed by Ctl+Space
  3. Choose one of the belongs_to options
  4. Tab between sections to fill in the parameters
  5. Start typing on the next line, cause you’re done!

Hope you all enjoy, this includes both the regular Textmate Templates, plus some that I find useful (like pp which expands to +=, pure laziness, but nice for someone coming from Java/C#/C++ background).

JD

EDIT: So, for the life of me, I realized that I didn’t include habtm in the templates. Why, I don’t know, its not like I enjoy typing that beast, anyways, here is a new zip that includes the new template. If you want just the single template for habtm, let me know and I can post it as well. JD

Uncategorized

Comments (0)

Permalink

Hacking

Hacking is an interesting term. The common definition turns it into a nasty creature:

To use one’s skill in computer programming to gain illegal or unauthorized access to a file or network: hacked into the company’s intranet.“hack.” The American Heritage® Dictionary of the English Language, Fourth Edition. Houghton Mifflin Company, 2004. 01 Oct. 2006.

Computer geeks like me tend to refer to this as “cracking.” And it appears that our definition of the term “hack” in its original sense is coming back in mainstream news as well. Yahoo recently had a 24-hour “Yahoo Hack Day,” and in its press release, they mention that: “Hack is used in its original sense of ‘creative programming’ not illicit sense of breaking into computers.” What has brought about this change? My theory: Mash-ups.

Mash-ups like Frappr are websites that fundamentally require one or more other sites to function. In Frappr’s case, they use Google Maps to create a site where online communities can ‘pin’ their location in the map to show their spread across the globe. It works because Google has an open API that allows other sites to send and request information from Google.

Mash-ups are common in the so-called ‘Web 2.0′ world, where the user is king, and blogging, podcasts, and Flickr are everyday terms. After Digg came out there were mash-ups that combined Digg and Slashdot, later after other copycats of Digg came, there were mash-ups of these new sites.

The mash-up is probably just a step along the way to maturity for web programming. Application programming saw similar trends, which birthed the PC, Apple, Linux, BSD, GNU, and Open Source Software (OSS). Today, it is nearly a harmonic interaction with the rise of OSS coinciding, and building with, the rise of mashups and cheap internet programming. It will be interesting to see where it goes from here.

It could go the way of Microsoft, IBM, Sun and Oracle, the titans of application programming. Or it could be unpredictable, following in Google’s footsteps and beyond in ways that are unimagineable. All that can be said for certain is that while Richard Stallman and his followers were tainted by the taste of freedom in OSS, my generation, including myself, will be tainted by this movement. It may be a trend, but perhaps, just perhaps, it will be more. Perhaps it will lead to a change in the way managements are structured. Perhaps it will lead to a weakening of Global Corporations. Perhaps, just perhaps, it will lead to real Democracy and freedom.

Technorati Tags: , , , , , , ,

powered by performancing firefox

Uncategorized

Comments (0)

Permalink

Prime Obsession

“Prime Obsession” by John Derbyshire (Joseph Henry Press).

Uncategorized

Comments (0)

Permalink

Zooomr Account

Sam and Daddy playing with their favorite toys

So with this post I think I am going to be moving away from the traditional gallery. This is hosted at Zooomr, a new photo hosting site similar to Flickr. I must say that I am so far enjoying the features from Zooomr more. Why am I moving? Simple free Pro account for Bloggers. I plan to post a review on this later.

JD

Uncategorized

Comments (0)

Permalink

My Hacker Key

At work the other day I decided to work out my Hacker Key. It really isn’t that hard, just very geeky. If you don’t know, which you probably don’t, the Hacker Key is derived from the Geek Code, which is best described by them:

The geek code consists of several categories. Each category is labeled with a letter and some qualifiers. Go through each category and determine which set of qualifiers best describes you in that category. By stringing all of these ‘codes’ together, you are able to construct your overall geek code. It is this single line of code that will inform other geeks the world over of what a great geek you actually are.

Geek Code
So if you want to learn more, click on, otherwise…move on.
Continue Reading »

Uncategorized

Comments (0)

Permalink

New Pictures Almost Posted

I have finally uploaded new pictures, and within the next week I should unzip them and make them viewable.

Uncategorized

Comments (0)

Permalink

The 10 faces of innovation

Book: The 10 faces of innovation
Author: Tom Kelly
Refered by: ITC

Uncategorized

Comments (0)

Permalink

Pictures Posted

Hey everyone,

I finally posted more pictures from the past 2 months. You can check them out here.

Uncategorized

Comments (0)

Permalink

oreilly.com — Online Catalog: Building Wireless Community Networks, First Edition

oreilly.com — Online Catalog: “Building Wireless Community Networks
Implementing the Wireless Web”

By Rob Flickenger
First Edition November 2001
ISBN: 0-596-00204-1″

Uncategorized

Comments (0)

Permalink

Information

Book: Information
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

The Myth of the Paperless Office

Book: The Myth of the Paperless Office
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

The Anarchist in the Library

Book: The Anarchist in the Library
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

Hard Drive

Book: Hard Drive
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

The Inmates Are Running the Asylum

Book: The Inmates Are Running the Asylum
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

Free Networks

Book: Free Networks
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink

The Human Factor

Book: The Human Factor
Author:
Refered by:Bookstore

Uncategorized

Comments (0)

Permalink