Paul Hudak
Good book on haskell. I grabbed it off amazon a while ago, but it took me a while to get to it. And I just read the book, didn’t do many of the exercises due to the fact that I was reading it to eat time on the soccer bus mostly. I’m kind of mad that Hudak spends so much time on writing an elementary graphics system, because the book is pegged as a kind of multimedia tutorial in haskell, and of all the media that there are graphics is the least interesting to me. It’s got some nice chapters later on about music though, and I actually understand what first class functions are now. (Ruby doesn’t have them, although the constructs available to you there do make a huge difference coming from a language like java, and are fairly powerful.)
Holy shit, ruby rocks. (self-link).
So there isn’t anything harder to take then a subtle bug with little apparent cause. That’s why this sort of thing kills me:
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in `check': cannot rollback - no transaction is active (SQLite3::SQLException)
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:76:in `check'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:68:in `commence'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/resultset.rb:61:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/statement.rb:158:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:211:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:186:in `prepare'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:210:in `execute'
from /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:620:in `rollback'
... 13 levels...
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
from /usr/local/lib/ruby/1.8/test/unit.rb:285
from test/unit/workout_test.rb:10
There are time when I’ll just get fed up with the damn computer, and this caused me to wrap up last night and go try to learn to read music1. There was even less information in that error as there is in musical notation! I can almost deal with sound visually on a staff, but it’s real troubling to deal with a bug that won’t leave the slightest clue.
But I think I’ve got it scrubbed out. Commenting things out strategically leads me to not want fixtures with nil values. Changing this:
invalid_exercise:
id: 4
name:
description:
into this:
invalid_exercise:
id: 4
name: ""
description: ""
mopped things up real well for me. Now there’s just one more thing that is making me want to bash my laptop with a rock, as soon as I can find it, I’ll be for smooth sailing.
1 Quite the feat actually: I quit piano in 6th grade because although I could play whatever anyone threw at me by ear, no way did I have the patience to learn to read those goddamned notes.
Having been a Java programmer will make you a better Ruby or Python or whatever programmer.
Agreed. My first language was ruby, I learned scheme and java this semester (to whatever basic degree). The three languages cover quite the spectrum. I do think ruby is still my favorite, but I know that I’ll find uses for the other two. And no matter how many times I say I hate java, it’s had a good impact on me overall. At least having learned it, I can say I hate it with more than just vitriol.
So I’ve got a rails app up that is handling bigger datasets then I’d imagined it would. It’s not doing so well and now I need to go through and optimize things. Ugh. But check this out:
[kjell@ambrose:~/Sites/quizzer] % cat production.log | wc -l
1541890
That’s a 1.5 million line logfile. Again, Ugh. At least people are using and mostly liking my system. Too bad it looks like it’s ridiculously inefficient. But ah, the joy of computers. Just think about that – it comes close to blowing your mind.
12:38 < xal> sam-: 2 things
12:38 < xal> a) you are nuts. those selectors are pure crack
12:38 < xal> b) could you add them to actionpack so that update_javascripts grabs them?
13:02 < madrobby> c) add more crack
Ruby book sales up 1552% since beginning of year (according to O’Reilly). I got the pickaxe 2 last december. I’m so ahead of the crowd.
Neat ruby block syntaxes.
It’s such a simple thing. But the amount of confidence that it gives you to work on those complex pieces of code is priceless. If you aren’t using unit testing for at least some of your code, you’re really doing yourself a disservice. If anything, it’ll help you sleep better at night.
I’ve been working part time in php lately, and trying to make it as much like ruby as I can. It’s tolerable, but I haven’t had to do anything too hard or complicated yet. Won’t be converting anytime soon.
Behavior driven development:
It
To be a hacker, you have to develop some of these attitudes. But copping an attitude alone won’t make you a hacker, any more than it will make you a champion athlete or a rock star. Becoming a hacker will take intelligence, practice, dedication, and hard work.
Work as intensely as you play and play as intensely as you work. For true hackers, the boundaries between “play”, “work”, “science” and “art” all tend to disappear, or to merge into a high-level creative playfulness.
Find something to hack, and hack it.
...use ruby.
...describes ExtremeProgramming’s philosophy to me. The “right direction” for the project is irrelevant. What matters is that you pay attention, and that you are constantly adjusting. If you do this, there is no externally visible difference between the two.
Who cared about his GPA (or if he even went to college)? Or that he lived in Provo, Utah? Or how many years of experience he had programming? We didn’t. It’s simply unnecessary to rely on secondary factors when the work is available to extract values for the five variables listed above.
It
A look at important skills and how to learn them.
Rails kicks butt.
In much the same way that the web took off because of “View Source”, Rails is taking off because it lowers the barrier to entry and holds nothing back.
Having learned html and css by viewing the source, I can say that rails works much the same. I love open source, and it makes doing things for a kid with little programming experience like myself a piece of cake.
Easy to make money off gpl’d scripts, use directory sites like freshmeat or sourceforge to link back to your site, generating pagerank, and then selling ads. But I hate ads.
And I’m excited to see the numerous projects, but their site is down! At least they stayed up the 24 hours.
Now, on to Rails. Rails is the most well thought-out web development framework I’ve ever used. And that’s in a decade of doing web applications for a living. I’ve built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before.
So rails, starting to get hot, huh?
Here is some real computer code. Explained:
John Wilder: the double-dot is a flip-flop operator when used in a conditional. The flip-flop is turned on by the first expression’s truth and turned off by the second expression’s truth. The tricky thing about the flip-flop is that it keeps the on/off state inside, so once it’s turned on by the opening expression, it says on until the closing expression is proven true. why the lucky stiff
Florian Groß goes over entries into some ruby obfuscation contest, and I don’t understand a word of it. I need to look at this and learn from it à l’avenir.
Nice comprehensive look at lisp – I should read this sometime. Also: hyper-cliki, a lisp wiki.
Kent Beck
A real clear look at what TDD is, and how to go about using it in writing your own software.
“Most of the time this happens the password is some quirky word related to the suspect’s area of interests or hobbies,” Hansen said.
Hansen recalled one case several years ago in which police in the United Kingdom used AccessData’s technology to crack the encryption key of a suspect who frequently worked with horses. Using custom lists of words associated with all things equine, investigators quickly zeroed in on his password, which Hansen says was some obscure word used to describe one component of a stirrup. ??2??
Relying on a word-list approach to crack keys becomes far more complex when dealing with suspects who communicate using a mix of languages and alphabets. In Operation Firewall, for example, several of the suspects routinely communicated online in English, Russian and Ukrainian, as well as a mishmash of the Cyrillic and Roman alphabets. ??3??
...”steganography,” which involves hiding information by embedding messages inside other, seemingly innocuous messages, music files or images. ??3??
A nice rails/ajax howto. Using, of course, the rails goodness that is Hieraki (man thats hard to spell). Here’s some more on rails and ajax, and also a demo of what dave has going on.
Interesting perspective on why ruby isn’t for new programmers – but it’s for me just because I don’t want to deal with C right now, and it’s real nice and quick.
Such a cool addition. I wish everything was as cool as rails.
I ned to get a better grip on javascript – and here looks like a great place to do it.
Nice wikified summary of the ideas/processes behind XP. (the c2 wiki freaking rocks)
A nice look from a beginners standpoint at rails in general.
Address Book and iCal on the web in ruby, anyone?
What javascript is really about.
An excellent book, both at introducing and documenting the language. Incredibly exhaustive, almost everything I’ve ever wondered about reading through bits of ruby got a mention or two and really cleared my head.
Wow – a collection of books available for free over the greatness which is the internet. All kinds of interesting books.