Monday, April 28, 2008
Sunday, April 27, 2008
book
From the aforementioned Lisp meeting blog post:
He points out that Ruby on Rails would never have taken off without the excellent book.
So true. Need book write now.
zed misses the point
Zed Shaw completely misses the point about, Literate Programming. He says that you should have your english and your code in two separate files, and then combine them with a compiler. This is exactly wrong, you want your description of the algorithm right next to the algorithm itself, so that the two don't diverge when you change your code.
When I program, I think about the story that I want to tell, and then I write a small outline or paragraph about what I how I want the code to tell the story, then I write the code, and then I write more documentation about the code.
It would be really nice though if I could just hide the story like collapsing an outline in Emacs, so that I could focus on just the code when I want, or just the documentation, but having the two in different files is just wrong.
blogger adding page elements
I was trying to add a flickr badge and etsy links for my friend Katrina on her Silver Selkie Studio blog, which is hosted on blogger.
I was trying to do it the old-school hardcore way of editting the HTML template directly, but kept getting error messages like:
"The content of elements must consist of well-formed character data or markup."
and
"The reference to entity "zg_person_id" must end with the ';' delimiter."
It turns out that you don't want to edit the HTML directly anymore, instead you want to go to the Layout tab, then select "Page Elements", and then click on "Add a Page Element".
Select "HTML/JavaScript Add third-party functionality or other code to your blog."
And just paste in the code you get. It looks like they do a bunch of sanity checks on your data to make sure it's valid XML, unlike if you paste it directly into the "Edit HTML" link.
literate programming
I just wanted to say that I'm a big fan of Literate Programming, just like Don Knuth. I think that we should write programs to be both a conversation between the author and the computer as well as a conversation between the author and other humans.
knuth
An interview with Don Knuth. I'm really really enjoying reading my set of The Art of Computer Programming. Now I really want to buy Concrete Math by Knuth, and Numerical Recipes.
What is going on! sness is turning into a math guy!
Saturday, April 26, 2008
silver selkie
I just helped my friend Katrina build a website for her business Silver Selkie Studio, it's all dynamic and Ruby on Rails, with gorgeous graphics from my mom, Fern Ness.
Rails was perfect for this project, I used attachment_fu for doing the pictures, the more I use attachment_fu, the more I like it. This time I didn't use S3 storage, but instead used a local file store, and that worked great.
Friday, April 25, 2008
octave
Plotting a simple function with Octave
%first, we create a function with
function [y]=f(x)
y=sin(x);
end
%then we create an array with numbers; for a higher resolution we use 0.1-steps:
x=0:0.1:2*pi;
%feed the function:
[y]=f(x);
%plot it:
plot(x,y);grid;
focus
Steve Yegge talks about focus-follows-mouse on OSX, and all the pain he went through trying to implement it.
For me, this just shows another reason why I will stick with Linux. Freedom to do what I want to do.
Thursday, April 24, 2008
centos mysql gem
To install the mysql gem on Centos, try the following:
gem install mysql -- --with-mysql-dir=/usr/ --with-mysql-lib=/usr/lib/mysql/ --with-mysql-include=/usr/include/mysql/
From datamapper group on google groups.
swhx
swhx
screenweaveHX
A toolkit to let you write desktop applications with haXe and Flash, kinda like Adobe AIR, but better.
Wednesday, April 23, 2008
perl directory
How to read a directory in Perl.
Something like:
#!/usr/bin/perl -w
@files = <*>;
foreach $file (@files) {
print $file . "\n";
}
Tuesday, April 22, 2008
permutations with repetition
A little Perl snippet that generates all the permutations with repetition allowed, using recursion:
#!/usr/bin/perl
$max_length = 3;
@collection = ('A','B','C');
generate('');
sub generate {
my ($val) = $_[0];
my ($add) = $_[1];
$val .= $add;
my $item;
if (length($val) > $max_length - 1) {
print "$val \n";
} else {
foreach $item (@collection) {
generate($val,$item);
}
}
}
Generates:
AAA
AAB
AAC
ABA
ABB
ABC
ACA
ACB
ACC
BAA
BAB
BAC
BBA
BBB
BBC
BCA
BCB
BCC
CAA
CAB
CAC
CBA
CBB
CBC
CCA
CCB
CCC
science 2.0
science 2.0 - an article about the new kinds of scientific collaboration made possible by web 2.0 technologies.
rails
Creating more with less with Rails - An important part about Rails is that there is definitely a "sweet spot", if you stray outside that sweet spot, you might be better off hand coding your site.
humane interface
The Humane Interface - all about the rules of design by Jef Raskin. He's a bit too opinionated for my tastes, but has some interesting things to say.
merbly
Building an app using rspec and merb. I've been using test/spec exclusively, but for the new app I'm building for Orchive I think I might try rspec again. I'm also going to do it all RESTfully.
Monday, April 21, 2008
accessibility
aDesigner is a disability simulator that helps Web designers ensure that their pages are accessible and usable by the visually impaired.
Sunday, April 20, 2008
Saturday, April 19, 2008
pagination
How to pagination
Things you shouldn't do in Rails
Faster pagination
Faster pagination, kill, kill.
paginating_find
err the blog is paginating again with will_paginate
will_paginate
will_paginate plugin
I've had very good luck with code from errtheblog, so I think I'm going to try the will_paginate plugin.
Friday, April 18, 2008
new super
A new class of superconductors based on LaO1-xFxFeAs lanthanum oxygen fluorine iron arsenide - which becomes a superconductor at 26K.
Pairs of electrons travelling through planes of atoms.
blogspot
Creating rss feed for your blogspot blog
For example for barcelonafoodgirl.blogspot.com/ the rss feed would be http://barcelonafoodgirl.blogspot.com/atom.xml
traitsntunes
traitsntunes.com is an online experiment which investigates the relation between music and personality. He's looking for 100 more participants.
Thursday, April 17, 2008
Wednesday, April 16, 2008
super
SuperExceptionNotifier - A plugin for Rails that gives you more control over your exception mails. I use ExceptionNotifier in all my Rails projects, and this looks like an excellent addition.
Tuesday, April 15, 2008
don't blame the elevator
Still, he now sees that it wasn't so much the elevator that changed him as his reaction to it. He has come to terms with the trauma of the experience but not with his decision to pursue a lawsuit instead of returning to work. If anything, it prolonged the entrapment. He won't blame the elevator.
pottery
Mussels and More - Some really neat pottery from up the coast. A dear friend told me about this, wouldn't they make amazing serving dishes?
quote
"Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats." - Howard Aiken
Monday, April 14, 2008
Sunday, April 13, 2008
Saturday, April 12, 2008
interesting DSLs
A couple of interesting DSLs
I love the one by Alan Kay in this article where the programming for the TCP/IP interface is exactly the diagram from the spec:
+-------------+-------------+-------------------------+----------+----------------------------------------+
| 00 01 02 03 | 04 05 06 07 | 08 09 10 11 12 13 14 15 | 16 17 18 | 19 20 21 22 23 24 25 26 27 28 29 30 31 |
+-------------+-------------+-------------------------+----------+----------------------------------------+
| version | headerSize | typeOfService | length |
+-------------+-------------+-------------------------+----------+----------------------------------------+
| identification | flags | offset |
+---------------------------+-------------------------+----------+----------------------------------------+
| timeToLive | protocol | checksum |
+---------------------------+-------------------------+---------------------------------------------------+
| sourceAddress |
+---------------------------------------------------------------------------------------------------------+
| destinationAddress |
+---------------------------------------------------------------------------------------------------------+
Friday, April 11, 2008
ccrma
Just got CCRMA working on the laptop with the realtime kernel and madwifi under Fedora 8. Used the info that I had posted earlier on my blog to figure it out. :)
Also got Marsyas working and playing sounds. I decided to just totally remove the pulseaudio system, it's cool, but I'm not sure if it's ready for primetime, I had major problems with it.
I'm going to use jack instead, and see about hooking up Marsyas with jackd.
mir workshop
A really interesting looking MIR Workshop in 2008. Man, I cannot believe what a cool field I'm getting into.
git
the thing about git. I'm switching to git, just as soon as I'm done these current projects and have some more space in my brain.
sample rate
To convert a mp3 file to a wav file with a different sample rate, for example on my laptop with an Intel chip that plays only at 48KHz:
mplayer -af volume=0,resample=48000:0:1 -ao pcm:waveheader:file="kb.wav" kb.mp3
Another source for info is here at tamu.
mogrify
To convert all the images in a directory from png to jpg:
mogrify -format jpg *.png
Part of ImageMagick.
Thursday, April 10, 2008
yui
Starting with a sound structure ? predictable HTML layouts using the YUI. I use the YUI Grids CSS for all my layout needs now. There are still some issues, like that a yui-gd can't contain a yui-gb, but it's still much better than trying to code things by hand.
Wednesday, April 09, 2008
chi2008
chi2008 - focuses on the balance between art and science, design and research, practical motivation and the process that leads the way to innovative excellence. It is about balance in our rapidly evolving field, the balance between individuals and groups, collocated and remote, stationary and mobile, in both our local and global communities.
CHI 2008 will be held in Florence, Italy, birthplace of the Renaissance, and home to great artists and scientists.
mysong
MySong - Automatic Accompaniment for Vocal Melodies
I just saw this on geekbrief.tv, it's a neat new system from Microsoft Research where you sing a song, and the program provides piano accompaniment to it. Neat!
Tuesday, April 08, 2008
oz
Oz programming language.
Oz contains most of the concepts of the major programming paradigms, including logic, functional (both lazy and eager), imperative, object-oriented, constraint, distributed, and concurrent programming. Oz has both a simple formal semantics (see chapter 13 of the book mentioned below) and an efficient implementation
Monday, April 07, 2008
Sunday, April 06, 2008
francis collins
Francis Collins belives in God. This is the guy behind the public human genome sequencing effort. Neat.
Friday, April 04, 2008
Thursday, April 03, 2008
synth
synthmusician.com is a website to help synthesizer artists to connect with each other and their fans.
Wednesday, April 02, 2008
Subscribe to:
Posts (Atom)