Domain: moertel.com
Stories and comments across the archive that link to moertel.com.
Comments · 18
-
Re:The problem is people
How would you save the passwords? I read an article that argued for never saving passwords in a database: http://blog.moertel.com/articles/2006/12/15/never-store-passwords-in-a-database
-
Re:It's a nice framework
First, I apologize for getting you mixed up with the person who wrote that Rails had implemented PUT and POST backward, which simply isn't the case. That's what I was mainly referring to when I wrote that you were wrong. But do have another issue with the things you wrote.
You equated one or maybe a few specific people with the "Rails community". David Heinemeier Hansson might be the original author of Rails, but he is not -- even remotely -- the "Rails community", nor is 37 Signals. And you made that error not once, but twice.
First, you describe how GET was often used for unsafe operations (a good description of that is available HERE). However, using the link_to method as described is hardly "standard practice". In fact it is anything but, regardless of whether DHH and 37 Signals have used it that way. In general, link_to was designed simply for navigating among web pages. The fact that it allows GET to be used for unsafe operations is unfortunate, but the fact is that I know few people who would ever actually use it that way. As someone else mentioned in one of the replies to that post, any framework can be abused. That is generally the fault of the developer, not the framework.
Further, the "rails developers" you accuse of being immature for complaining about it consisted of -- who else? -- David Heinemeier Hansson. Not the "rails community". If you were not aware of this already, then let me inform you: that was 5 years ago and since then the "rails community" itself, on more than one occasion, has derided DHH for his frequent immature behavior.
Your last point, about the word "professional", was again a reference to DHH personally and not "the rails community". Further yet, what he was referring to was the way the word "professional", like some other phrases, has been abused... he was not insulting professionals. In fact he made no references at all to "professionals" or "professionalism".
In summary, you are guilty of accusing a whole multitude -- thousands of people -- of being immature, almost entirely because of the actions of one person. Remind me again... who is being immature here? -
Re:R sucks as a language
The R language is optimized for writing statistical code. It's going to seem a little weird, especially if you have a traditional programming background. Once you spend some serious time writing R code, however, you will probably begin to appreciate many of the things that initially seemed odd.
For example, consider the way R handles function calls:
- It allows you to pass function arguments by name and abbreviate the names, which is handy during live sessions when you want to call statistical routines that have lots of arguments (which is common).
- During a function call, arguments are bound lazily, which lets you pick apart the expressions behind them and write functions that serve as control-flow constructs. This lets you do things such as pass model expressions as arguments.
- Also, function arguments can have default values, which are again evaluated lazily but can also see values within the scope of the function body. This lets you use computed values as defaults and have those values depend on other arguments, which in most programming languages requires extra work on your part.
All of these "oddities" serve to reduce the amount of boilerplate code you need to write when coding up statistics routines. (Click the link above if you want to see examples and take a more in-depth tour of R's fascinating and time-saving function call behavior.)
-
A Coder's Guide to CoffeeThis was posted to Kuro5hin back in 2002, and I found it rather informative.
Original Kuro5hin article, with subsequent commentary.
Schwab
-
Re:For Joel, it's always about hiring
Joel likes to stroke his ego and promote his company by claiming he always hires the best people.
Why should I believe that someone who thinks Hungarian notation is an adequate substitute for static typing would know how to recognize a good developer? -
Thanks! (And another solution)
Thanks for linking to the problem, which turned out to be very fun to solve. If you want to see my solution, which I wrote in Haskell, I posted it here: Solving the Google Code Jam "countPaths" problem in Haskell. Thanks again for the link.
Cheers,
Tom -
I already get CarTalk w/o ads or Real -- VCR it!I built a simple "VCR" for the radio and set it up to record Car Talk, among my other NPR favorites. Now I can listen to Click and Clack whenever is convenient for me, without having to jump through hoops, download proprietary codes, or bother with streaming. Plus, I get a nice archive of shows that I can take with me on road trips:
car-talk--2004-02-21--Sat--1000.spx
car-talk--2004-02-28--Sat--1000.spx
car-talk--2004-03-06--Sat--1000.spx
car-talk--2004-03-13--Sat--1000.spx
car-talk--2004-03-20--Sat--1000.spx
car-talk--2004-03-27--Sat--1000.spx
car-talk--2004-04-03--Sat--1000.spxAn old radio, a sound card, and a few shell scripts -- that's all it takes.
-
Haskell lets you do bothWaffle Iron wrote:
That's what bothers me about "pure" languages of any form. You're intentionally throwing away some of the available tools to prove a point.
Well, Haskell isn't throwing anything out. You can do both purely functional and imperative programming with Haskell. It's just that Haskell's designers went deep enough into the theory to come up with an elegant way to bring the functional and imperative worlds together (category theory and monads). So you need not give up the benefits of one to have the other.Take a look at this one-page TCP port scanner that I wrote in Haskell. Imperative and functional styles mixed together, with neither sacrificing for the other.
To use your time- and frequency-domain metaphor, Haskell is the well-educated EE who can use both kinds of analysis -- and slide between the two with ease.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
Some more useful Haskell resourcesIf you're interested, I recently gave a short talk about Haskell for the local Perl Mongers. The slides and notes are available online here: Haskell for Perl Hackers.
If you want to see some Haskell code, I have some more concrete examples here:
- PXSL -- Parsimonious XML Shorthand Language, which is implemented in Haskell. (Haskell sources)
- A concurrent port scanner in one page of Haskell
- Cheating Hangman in Literate Haskell (and Perl)
I have written a lot of little projects in Haskell. You can find some of them in links from my user info page.
Also, one of the best resources on Haskell is the HaWiki: HaWiki.
Do give Haskell a try. It is an amazing programming language.
-
I just gave a talk on Asterisk!Nice timing!
:)If you're interested, the slides and notes from the talk are here: Fun with Asterisk and Perl.
The talk was for the Pittsburgh Perl Mongers and shows a four examples:
- text-to-speech
- dial the weather
- web form that sets up a call
- web form that sets up a conference
-
I did post it. See earlier post (or below),Again, here's the link: My new Radio VCR.
Cheers,
Tom -
I made a radio "VCR", and it's easy. Try it!As I described on my wiki, I recently made a "VCR" for the radio. I just hooked up an old radio's headphone output to a Linux box's otherwise unused sound card, installed ALSA on the Linux box, wrote a simple shell script to record and compress shows, and set up some cron jobs to run the script. That's it.
Total cost: $0.
It's been working now for about a week, and already I love it. I can listen to Car Talk and Marketplace whenever I please. I'm saving up a bunch of Fresh Air interviews to listen to on a car trip.
Since a modern hard drive can store about 5 years of compressed talk radio, I don't think I'll need to "change the tape" any time soon.
;-) -
Re:What's wrong with Haskell?
I happen to think that Haskell [haskell.org] is one of the semantically cleanest languages out there
I was going to say in my earlier post that Haskell had the cleanest syntax and semantics, but I figured that regarding the latter some smart-aleck (which I suppose is now going to be me) would respond with a comment like this: Oh, really? Care to provide the clean semantics for Haskell's run-time space-consumption characteristics? At present the semantics are often best described by, "run it, and see what happens," although after a while one does develop a feel for it (which is incorrect more than one would like).For example, consider the expression,
foldl1 (*) [1
which literally means .. 1000](...((((1 * 2) * 3) * 4) * 5)
and, by the way, is equivalent to your (fact 1000). Now, how much space is going to be consumed by its evaluation? ... 1000)Humans can easily see that the expression can be evaluated left to right, treating the operator (*) as strict, and, with the list defined by [1..1000] being built lazily, it is possible to evaluate the expression in constant space:
= foldl1 (*) [1
But is this what Haskell guarantees? Nope. An implementation might also do it like this: .. 1000]
= foldl (*) 1 [2 .. 1000]
= foldl (*) 2 [3 .. 1000]
= foldl (*) 6 [4 .. 1000]
= foldl (*) 24 [4 .. 1000]
= ...= foldl1 (*) [1
In this case the accumulator in foldl builds up a linear chain of thunks, which is evaluated only after the entire list is consumed. .. 1000]
= foldl (*) 1 [2 .. 1000]
= foldl (*) (1*2) [3 .. 1000]
= foldl (*) ((1*2)*3) [4 .. 1000]
= foldl (*) (((1*2)*3)*4) [5 .. 1000]
= ...You and I can see that the second method is wasteful, but the language definition provides no guidance as to whether a Haskell implementation will choose the second or the more-efficient first. (In fact, GHC would until recently choose the second for this expression.)
Don't get me wrong. Haskell is, without a doubt, my favorite language. It's what I used for my entry in this year's ICFP Programming Contest, and I consider it the best hope for a truly great mainstream functional programming language. I love Haskell. But its lack of intuitive space-consumption semantics is a serious weakness.
And, regarding your fact example, it doesn't really show off Haskell's semantics as much as its syntax. Why not show the classic Fibonacci Series implementation, which highlights Haskell's non-strict evaluation semantics?
fibs@(_:fibs') = 1 : 1 : zipWith (+) fibs fibs'
Now, if that isn't a beautiful line of code, I've never seen one.The fastest FFT library out there is in C, but the C code itself was generated by Haskell code
Actually, the FFTW code was generated by code written in O'Caml not Haskell.Cheers,
Tom