"Smart" Advertising and conflicts of interest
It's true - a balanced diet includes chocolate!
...the biggest cocoa eaters were at half the risk of dying compared to men who did not eat it. (Reuters - Cocoa consumers have lower risk of disease in study)
"Before we can say cocoa can save your life, a larger study would need to be done" - I volunteer for the test group! To eliminate the psychological effects you would need a control group - but what would the control group be given as a chocolate placebo, Laxette?!
Apple, you make me so happy!
For about the last 12 months I've been telling anyone who would listen that I was going to make a home entertainment unit out of a Mac mini. Then it became the Intel Mac mini with Front Row. I was really hoping that this release would include said item, and it did.
http://www.apple.com/macmini/More Mac per square inch
The hard drive interface has been upgraded to Serial ATA which is great for recording video. It uses shared memory for the video however. Normally this would be a kiss of death, but with all these new Intel chips I don't know what's what any more!
Perfect for home entertainment. In the words of Larry Magid, "If I were Sony CEO Sir Howard Stringer, I'd be keeping a very close eye on Steve Jobs." (CBS News)
The other great thing Apple has done is publish a Ruby on Rails tutorial on their developer site:
Sure it's nothing that you couldn't read elsewhere, but it is going to be seen as an endorsement of RoR by Apple - and that's nothing to sneeze at. Expect to see New York Times articles about how RoR is legitimised by Apple and.
Change to RSS feed
This should be in a paragraph by itself.
Please let me know if you notice anything wierd.
Cross-language development [home.cs.tum.edu]
It mostly just relies on the fact that different languages have conveniently different comment characters (eg. #define would be a comment in shell or perl), but it's still kinda cute!
meebo meebo meebo
For maximum pleasure, I suggest the following:
- Install a greasemonkey script to automatically log you in. I modified this script from userscripts.org to actually do the login. See my comment on that page for more details.
- Also install this secure meebo greasemonkey script from userscripts.org
ENIAC co-inventor busts some ENIAC myths [www.computerworld.com]
I had the privilege of seeing UNIVAC when I was at the Melbourne UniversityComputer Science Department (gotta love that they're sticking with their mu.oz.au domain :) Apparently they powered it up sometimes and it worked, but due to lack of spare tubes they didn't do it very often.
Opensource server software will ultimately be better than "enterprise" options
I'm sure it's not worth nearly what we pay for it, but for all my complaints it's quite a capable system.
I'm not that familiar with autosys yet, so I went to look for documentation from the vendor.
That was mistake number one. The Computer associates website is confusing to start with. Many clicks later I was able to find the link to access the pdf manuals for autosys but I had to register. So register I did, but the link that was emailed to me to verify my registration didn't work in firefox! Luckily (for sufficiently small values of luck) I am on a windows machine so I could open the link in MS internet explorer and validate my account. The whole process was futile however, as CA only allow you to download the documentation for the most recent version. This site is running a major version behind, so the manuals that were there were no use.
I managed to track down the relevant version of manual by searching for 'autosys' on our internal wiki - a victory for collaborative distribution of knowledge over the company who should be trying to help me 'leverage our investment in job scheduling infrastructure', whatever that means.
The manual, however, is woeful. It's badly written, verbose in the fluff and disturbingly lacking in detail. I have been unable to find much of the information I need and will have to resort to poking around the database (which thankfully is Sybase not proprietory to the product). If that doesn't answer my questions I'm kinda stuck. I can't read the source code (obviously) and the (non-authorised) mailing lists haven't had any traffic in the one week I've been monitoring them.
Speaking of Sybase, it is also hard to get good documentation on that as well, but let's not get into that here.
The problem is that job scheduling is incredibly boring. Why would CA bother to soend time and money producing good documentation since the people who actually use it don't make the purchasing decisions.
Compare this to a (hypothetical) open source job scheduling project. The people who write the code would be actual users of the system. It will be valuable for them to document it becuase that will help them and their co-workers. A mailing list would have developers and users swapping problems and solutions. If the original authors got bored or went out of business or whatever there would be no problem because the other users can continue the development (or hire someone to do it if they don't have the skills). For the licensing and management costs of these sorts of "enterprise" software products, it would be very viable to hire a developer or two to keep an opensource alternative humming. And when your boss wants you to implement some sort of job schedule not supported, you can add that feature and fold it back in for everyone else.
I know that this is all obvious stuff, and most people in the opensource community knows that it is true, but it is still often thought that the major benefit of opensource is cost and that if you've got money to burn you are probably better off buying a commercial product that will come with support and documentation (and someone to blame).
My experience is that exactly the opposite is true. Now if I can just get some budget to implement an open source job sceheduling tool...
Mysql stupidity and overriding ruby methods
Who knew that by default mysql selects were case insensitive?! I'm not talking about LIKE being case insensitive (although they are case insensitive too, just like in my nemesis Sybase), I'm talking about select * from foo where bar = 'aaa' finding a record where bar = 'AAA'. That's cruel and unusual.
The solution, in this particular incarnation of mysql anyway, is to make the column a "binary varchar" column. I'm not sure how that differs to a normal varchar (perhaps normal varchars are stored as analog vector data instead of binary data) but it works just like a normal varchar, and select matching is case sensitive. Phew, off the hook.
Except... Active Record (from Ruby on Rails) says "aha - it's a binary column, so it must be a blob. I'll pack the data in using some mysql binary quoting syntax that your particular version of mysql doesn't support." And you get this:
.../active_record/connection_adapters/ abstract_adapter.rb:88:in `log': Mysql::Error: You have an error in your SQL syntax near ''333630204465677265657320466f637573' WHERE id = 1' at line 1: UPDATE customers SET `username` = NULL, `password` = NULL, `name` = x'333630204465677265657320466f637573' WHERE id = 1 (ActiveRecord::StatementInvalid)Right... :(
Thankfully, overriding a method in the symbol table (or whatever the ruby runtime nomenclature for the Ruby equivalent is) is just as easy as in Perl. In the model ruby file in question, I just added:
module ActiveRecord module ConnectionAdapters class MysqlAdapter def quote(value, column = nil) super end end end endand all is well. Sigh.
Doing autosys / autorep searches in an emacs buffer
(defun arep (arep-job) "Lookup a JOB with autorep" (interactive "sJob: ") (setq arep-query (concat "%" arep-job "%")) (setq arep-buffer-name (concat "*autorep " arep-query "*")) (pop-to-buffer arep-buffer-name) (setq buffer-read-only nil) (erase-buffer) (call-process "autorep" nil arep-buffer-name t "-j" arep-query) (highlight-regexp "__+" 'hi-red-b) (call-process "autorep" nil arep-buffer-name t "-j" arep-query "-q") (highlight-regexp "----+" 'hi-red-b) (highlight-regexp "^ *[^#: ]+:" 'font-lock-builtin-face) (highlight-regexp "#.*$" 'font-lock-comment-face) (goto-line 1) (setq buffer-read-only t) (set-buffer-modified-p nil) )Update: If you like the above, you'll love jil-mode.el - I should be able to replace the bodgy highlight-regexp with it. I had to make the following change to correctly highlight lines preceded with spaces:
(defconst jil-font-lock-keywords '(("^[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)\\>:" (1 font-lock-constant-face)) ("<\\([^>\t ]+\\)\\([\t ]*\\([^=>]+\\)=\\([^>\t ]+\\)\\)*>" (1 font-lock-builtin-face) (3 font-lock-type-face nil t) (4 font-lock-variable-name-face nil t)) ("\\<\\(SUCCESS\\|FAIL\\|AND\\|EXITCODE\\)\\>" (1 font-lock-function-name-face))) "Additional expressions to highlight in Assembler mode.")
Search ruby docs (ri) in emacs
Note one MAJOR bug is that if you have a buffer called *shell* it will switch there instead of your docs (so rename your shell buffers to something else). What I really need to do is figure out how to use ansi-color.el outside the interactive shell.
(defun ri (ruby-class-name) "Lookup a class in ri and put it into a buffer" (interactive "sClass: ") (let* ((explicit-shell-file-name "ri") (explicit-ri-args '("-T" "-f" "ansi")) (rishell-buffer-name (concat "*ri " ruby-class-name "*"))) (comint-check-proc rishell-buffer-name) ; see shell.el (if (not (get-buffer rishell-buffer-name)) (progn (setq ansi-color-for-comint-mode t) (add-to-list 'explicit-ri-args ruby-class-name) (shell) (rename-buffer rishell-buffer-name) )) (pop-to-buffer (get-buffer rishell-buffer-name)) (setq buffer-read-only t) (setq buffer-modified-p nil) (goto-line '1) ))
Language translation software
The acronym FAM is supposed to stand for File Alteration Monitor but I can only assume that the author mistakenly thought it stood for File Ancestor Monitor, because whatever the German was ended up translated as file old person ration monitor although I have no idea where the ration came from!
Then the author talks about the complicated configuration files for the changedfiles program. Obviously the English phrase "that sucks" is fairly common across nationalities because there is a single word sentance Suction. I Must remember to use that in my writing! Sybase has no support for sequences. Suction. I love it :)
Aerogel that you can buy! [www.unitednuclear.com]
For those who have no idea what I'm raving about, Aerogel is composed of 99.8% air - it's density is just 3 milligrams per cubic centimeter and weighs only three times that of air. Aerogel can support thousands of times its own weight and its melting point is 2,200 degrees F (1,200 degrees C).
It's just plain cool. Or hot, depending on how you look at it.
Bono's remarks to the national prayer day [www.data.org]
George Bush was there, so was King Abdullah and many others.
In a truly awesome and refreshingly puncchy speech, Bono talked about God and justice. Here's a little taster, but go read the whole thing - you won't be disappointed.
That's why I say there's the law of the land... and then there is a higher standard. There's the law of the land, and we can hire experts to write them so they benefit us, so the laws say it's OK to protect our agriculture but it's not OK for African farmers to do the same, to earn a living?
As the laws of man are written, that's what they say.
God will not accept that.
Mine won't, at least. Will yours?
Mythbusters - it's all light and magic [www.starwars.com]
This is a cool interview on the starwars site - now can we see C3PO replace buster ? :)
PS: I bought the Pick Axe book
The Apple Way?
From the back cover:
The Apple Way reveals the secrets and management principles that keep Apple ahead of the curve--including innovative product development, cutting-edge marketing strategies, sleek design and packaging, and a high-performance corporate culture. You'll discover how Apple combines consistency with continuity and follow-through, and balances vision with practicality.
I have read way too many Apple/Steve Jobs books than is healthy, worked in the management of an Apple reseller here in Australia and basically ingested as much Apple as possible. I can tell you that the book is lying! There has been no contiguous strategy at Apple, other than letting smart people do stuff under the influence of the reality distortion field. Unless you count Steve swearing at his staff, there is no "high performance corporate culture". Apple has worked when it has embraced it's geek culture - design geekiness as well as technical geekiness.
I like Apple. There are a lot of good and bad lessons that can be learnt from Apple. I even like what I know about Steve Jobs. Given the chance to work in a Steve Jobs company, I would jump at it.
Having said that, it is precisely by not following reasonable, responsible rules that Apple beats the curve. Be very wary of any book that pupports to tell you "how Apple does it".
User login in 5 minutes flat
Lars always said it was going to be this good :)
ruby-doc.org is down!
Web file uploading the EASY way
file_content = @params["customers_prn_file"].read
It's almost too easy!
Getting Ruby on Rails up on Mac OS X
Here's all it took:
- Have Darwinports already installed (you know you should)
- install a reasonable version of ruby sudo port install ruby
wait a while
- install MySQL (I told you we all need some grit) sudo port install mysql4
wait another while
Well, that was the plan, but the port is refusing to compile, so I have used a MacOS X mysql package
- install ruby gems sudo port install rb-rubygems
- install the mysql ruby driver sudo gem install mysql -- --with-mysql-dir=/opt (or supply /usr/local/mysql if you are using the package installed mysql like me)
- install rails sudo gem install rails --include-dependencies
MacOS X has an older version of ruby installed, so make sure that your path has /opt/bin first, so that you get to use the Darwinports version first.
I thought I would *really* get into the whole Rails vibe and I started downloading the TextMate demo. But thankfully it's a sizeably package and during the download I came to my senses and kept using GNU Emacs under X11.
For the pleasure of emacs users out there, here are the ruby related portions of my .emacs (which could do with some tweaking I'm sure) can be found in my cvs repository: http://cvs.pumptheory.com/viewcvs/viewcvs.cgi/etc/ You can get the .el files from the ruby cvs repository http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/misc/
Ruby on Rails to the Rescue!! (Or to my demise... we shall see)
Ok, so I also have to deal with Sybase, but everyone needs a little grit in their life (otherwise we wouldn't appreciate the pearls!)
But I need to finally release some code that's been stewing in my CVS for 10 months and I don't like how I did it. So I'm going to rewrite the whole stinking thing in Ruby on Rails tonight. You heard me - in one night.
I'll keep you posted :)
Blog Categoriessoftware (41)
..heads up 'tunes (5)
..black and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
Book Review (2)