Hardy Heron Rocks, but…

February 19th, 2008

Yes, I’m a alpha geek and and early adopter.

Hardy Heron is working great, but the Firefox 3.0 packaging is still undergoing some revision.
I use three applications extensively, Firefox, Thunderbird, and Konsole.
I can’t deal with the extra large fonts that display by default in Firefox 3.0 in Hardy Heron.
So I used this set of instructions to temporarily downgrade the firefox package.

http://www.nowhere.dk/archives/2008/02/14/firefox_3_0_is_now_the_default_browser_in_ubuntu/index.php

Build Latest Linux Kernel for your Distro

October 26th, 2007

I run Linux on my laptop most of the time.
I like to run the latest version, but I don’t want to compile it myself and try to package it up in a deb every time a new kernel comes out.

I just found KernelCheck.

KernelCheck is a project that is designed to easily build the latest kernel for your distribution

The latest BETA even automatically builds in support for the latest NVIDIA proprietary driver.

So far its simple and seems to be working flawlessly.

I’ll let you know how it goes.

Linked-In Freeloading

May 8th, 2007

On Linked-In there are “those people” that mark their connections as private, so that the only connections you can see are people you are already linked-in with.

Linked-In is a community of sharing. Those who mark their connections as private are saying loud and clear, I’m attempting to freeload off others’ willingness to share openly.

It’s no surprise that the common private makers are head hunters, technical recruiters, or other individuals attempting to monetize their network. That being said, I have one technical recruiter in my Linked-In connections that openly shares their connections. Guess who I recommend and go to first when I need to work with a technical recruiter.

I’ve been seriously thinking about dropping people from my Linked-In profile that mark their connections private. So listen up Linked-In, I have a feature request: I want my connections to appear private to other users who mark their connections private. But wait a second, that feature doesn’t follow the golden rule though. Do unto others as you would have others do unto you. On second thought Linked-In, just drop private connections all together. They don’t help build a community.

So, If you find someone who looks interesting in my linked-in connections, that has their connections marked private, send me an email. I probably have some else I would recommend first.

Adobe Flex beats HTML/CSS/Ajax hands down

May 7th, 2007

I’ve been working on a new web application. Initially I started out with Ruby on Rails and HTML/Ajax. I also tried out Jifty, the latest hip Perl5 web framework from Best Practical.

I love puzzles. HTML/CSS/Ajax are always a puzzle. I’ve spend significant time debugging and solving HTML/CSS/Ajax problems. But when I am trying to get something done, and done quickly, the endless puzzles of HTML/CSS/Ajax just serve to frustrate me and leave me with a bitter taste in my mouth.

Complaints
1) Rendering and general application behavior is still inconsistent across browsers vendors.
2) Graphical layout is a hacked up mess compared to the gui toolkits such as SWING, .NET Winforms, or even XUL.
3) (Sarcastically) Wireshark (Ethereal) is my number one debugging tool for the “Browser Platform”.

Well I’ve spent the last couple of days sitting down and working with Flex and ActionScript 3.0. What a welcome relief. I’m starting to get things done and making progress.
Flex isn’t perfect, but Adobe is in process of making the Flex SDK open source.

I’d really prefer to be using the new Silverlight platform from Microsoft, but unfortunately is proprietary, doesn’t have a linux port, it doesn’t currently ship with any gui controls, and its barely been released as an alpha preview.

Bruce Eckel seems to be having similar frustrations.

Update:
Now, I’m not saying that HTML/CSS/Ajax doesn’t have its place. Flex isn’t indexable and searchable by search engines, but if you are building a web application that is username/password protected anyway why waste your time.

I’m using ruby on rails, but this video gives you an idea of what you can do:
Adobe – Developer Center : Video tutorial: Creating a Flex application using the TurboGears framework:

SVG content with Rails 1.2.3

April 21st, 2007

John Taber has been trying to use SVG in his Ruby on Rails app.
Unfortunately, Webrick and Rails have been uncooperative.

From railties/lib/webrick_server.rb we see that rails attempts to serve requests from the public directory before dispatching to controllers.

def service(req, res) #:nodoc:
    unless handle_file(req, res)
      begin
        REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency
        unless handle_dispatch(req, res)
          raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
        end
      ensure
        unless ActionController::Base.allow_concurrency
          REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
        end
      end
    end
end

If you put a svg file in the public directory of a rails app, webrick serves it up, but with the wrong mime type.

$ wget localhost:3000/rect1.svg
--15:54:54--  http://localhost:3000/rect1.svg
           => `rect1.svg.1'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 333 [application/octet-stream]

100%[====================================>] 333           --.--K/s

15:54:54 (12.92 MB/s) - `rect1.svg.1' saved [333/333]

Firefox displays a friendly description based on file extension, but doesn’t display the svg because the mime type is wrong.

SVG download due to bad mime type.

So add a svg mime type entry to webrick

--- /usr/lib/ruby/1.8/webrick/httputils.rb.orig 2007-04-21 16:00:42.000000000 -0600
+++ /usr/lib/ruby/1.8/webrick/httputils.rb      2007-04-21 16:01:03.000000000 -0600
@@ -86,6 +86,7 @@
       "rtf"   => "application/rtf",
       "sgm"   => "text/sgml",
       "sgml"  => "text/sgml",
+      "svg"   => "image/svg+xml",
       "tif"   => "image/tiff",
       "tiff"  => "image/tiff",
       "txt"   => "text/plain",

And presto

$ wget localhost:3000/rect1.svg
--16:17:22--  http://localhost:3000/rect1.svg
           => `rect1.svg.2'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 333 [image/svg+xml]

100%[======================================>] 333           --.--K/s

16:17:22 (22.73 MB/s) - `rect1.svg.2' saved [333/333]

SVG Box

SVG content delivered through a controller works just fine, you just have to set the content disposition to inline.

def index
  data = <<END_D
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<rect width="300" height="100"
style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>

</svg>
END_D
send_data data, :type => 'image/svg+xml', :disposition => 'inline'
end

Now a DSL for SVG creation would be cool, but that is a completely different project.

John Backus (creator of Fortran and Backus Normal Form, BNF) Passes Away

March 20th, 2007

I just read on Lambda the Ultimate that John Backus passed away this past Saturday.

John Backus Receives the Turing Award
John Backus in the 1990s. Courteous IBM.



In his speech accepting the Turing Award, John Backus admonishes developers and computer scientists to look towards functional programing. He states that the composability and mathematical rigor of functional programming empowers programmers to scale and best describe the ever increasing complexity of problems. Interestingly, Backus describes the von Neumann architecture and its associate imperative programming language as obese. Backus continues saying that these obesities encourage micro-managed word at a time computing. Instead of moving data between named locations, we should focus on the larger conceptual units of the problem says Backus.

I see this debilitating behavior every day, both in developers and managers. Most IS/IT managers get caught up in the word at a time or task at a time work flow that cripples teams and organizations. Senior developers and managers must be instructors and mentors in the enterprise. They must be experience practitioners of abstraction and modeling. Their first and most important priority must be to impart the skills of scale, abstraction, modeling, and reuse to those they mentor.

Lightning Talks (Mountain West Ruby Conf)

March 16th, 2007

Ruby Binary Lottery – Mike

WAX (Web Applications X) – Dan Kirkpatrick eparklabs.com

Managing SSH keys with Capistrano or How Jamis Buck made my life easier./- Jay ???

Goldberg Ruby on Rails Generator – Coby Randquist

CruiseControl.rb – ThoughtWorks Continuous Integration Tool written in Ruby.

Why would you want to use JRuby on Rails – Charles Nutter
RailsIntegration part of JRuby Extras Project on RubyForge

LogWatchR – Pat Eyler aggregates logging for 3,000 boxes to a central machine for operation notification.
Initially it handled 600 log entries per second. Right now it notifies via email and a log file. Looking to support nagios, jabber, etc.
Now supports 2250 log entries per second.

Black-boxing with Ruby: Adding Ruby APIs and Front-ends to Existing Software – James Britt (Mountain West Ruby Conf)

March 16th, 2007

Background

Hey! Why not build everything yourself?
That’s insane. No, really. It’s a mouse hole.
Why not use a Ruby app?
Not a good selection of apps.
Why not use what works best?
P* Languages are not the work of Satan.
Big Motivation: “Hey, I wonder if …” “Wow. It never made that sound before. Neat!”

Use case: Trac Project tracking tool

But way too much mousing.
Hey, I wounder if you could use Trac from the command line?
Sure: Use Tracula. I wrote it.
Tracula uses Hpricot & Mechanize to prentend to be a browser.
tracula.neurogami.com

Brittleness gets introduced when going against web pages.
Version updates break things. Trac Plugins break things.
Yes it’s fragile, but it’s easy and it’s easy to get started.

The Django book has a cool commenting system.
Go look at beginningruby.com

Techniques

  • Screen scraping
  • DOM munging
  • Proxies, proxies, proxies

Observations

Most sites offering a real Web API
Proxies offer buffering and separation of concerns and can help avoid tool lock-in.
Robust exception handling.

RubyStuff.com – front end for CafePress
CloudPanel – EC2 admin tool

www.neurogami.com
www.jamesbritt.com

MasterView – Jeff Barczewski (Mountain West Ruby Conf)

March 16th, 2007

Jeff heard Dave Thomas talk at Java – No Fluff Just Stuff and became converted to Ruby. Beyond lightweight frameworks like Spring, Ruby was the answer being preached at NFJS. The famous 10x programmer efficiency increase with Ruby proved true.

WYSIWYG for web development. Rails Erb looks to much like the old ASP/JSP stuff. View stuff was spread across too many files in an extreme attempt to by DRY(Don’t Repeat Yourself).

Goals

  • WYSUWYG (x)html
  • Keep it simple DRY Somple Syntax iwht Ruby Flavor
  • Designed for RoR
  • Utilize Rails layouts, partials, and helpers.
  • Reduce complexity, no extra view (presentation) objects or hashes
  • Production ready scaffold templates or work from html prototype..
  • Redcude number of files. Preview in browser

MasterView has a richer CRUD scaffolding than plain old Rails.

See also

Simple Bayesian Networks – Carl Youngblood (Mountain West Ruby Conf)

March 16th, 2007

Problems with causable Agents

  1. Impotence
  2. Theoretical Ignorance
  3. Pratical Ignorance
  • How to handle uncertainty?
  • Enter Probability Theory
  • Probability provides a way to of summarizing the uncertainty that comes form our laziness and ignorance

Basic Probability Theory

Bayesian Networks

Inference Methods

  1. Exact (potentially exponential)
  2. Approximate (less Accurate) – stochastic or Monte Carlo algorithms

Simple Bayesian Networks with Ruby

SBN – gem install sbn

  • 2003 – Class project
  • 2005 – C++ version
  • 2007 Ruby version

“Premature optimization ois the root of all evil.” Donald Knuth, paraphrasing C.A.R. Hoare