HNHacker News
TopNewBestAskShowJobs

compay

1,997 karma · joined July 18, 2008

I program, mostly for the web and mostly with Ruby and Lua.

Me: http://njclarke.com

My code: http://github.com/norman

My blatherings: http://twitter.com/compay

[ my public key: https://keybase.io/compay; my proof: https://keybase.io/compay/sigs/5ghM6xDeYY3U9odHk-2BOd7DxA9AIP5-QcWBkrTOgSQ ]

submissionscomments
compay··on Heavy drinkers outlive nondrinkers
Perhaps it's because the heaviest drinkers spend many evenings safely at home passed out on the couch, while the abstainers are out incurring the normal risks of daily life.
compay··on Ask HN: How to begin contributing to an open source project?
Except when you're a buck novice it can be very intimidating and difficult to make a contribution among people who know WAY more than you. It's unfortunately very common for expert programmers to treat novices with disdain, and this can be extremely discouraging.

I think there's a lot to be said for practicing your skills on your own so that you have a reasonable level of practice before trying to contribute to other projects.

compay··on Ask HN: How to begin contributing to an open source project?
I would recommend in addition to contributing to other projects, to try to start something of your own. Find something small and useful you can work on, and release it. It doesn't matter if it's small - the experience you get maintaining your own project will teach you a lot about how to contribute to other people's projects.

My first open source project was a PHP script called "DBMailer" that I wrote when I had been programming for only a few weeks. I'm sometimes embarrassed that it's still floating around the internet with my name on it, but I learned a lot from the feedback I got from it at the time.

I wrote a blog post a while back with some do's and don't's for both contributors and maintainers, maybe you'll find it interesting:

http://njclarke.com/posts/how-to-do-open-source.html

Good luck, and stay enthusiastic!

compay··on Rails 3.0: Release candidate 2
Until you see an obvious reason to convince you to upgrade your code, don't. I'm starting a couple of longer-term Rails projects for clients right now, happily using 3.0. But I'll be waiting a while longer before upgrading my existing sites. Amid all the hype about 3.0 let's not forget 2.3 isn't half bad either.
compay··on Jack Horkheimer, the "Star Hustler", passes away
I'll miss him. He conveyed such incredible enthusiasm in his TV segments and brightened up so many of my evenings. He was an absolute, unabashed nerd, and I say that with the utmost of admiration and respect. RIP.
compay··on Vim gets support Lua and the latest versions of Perl and Python
Command-T is a pretty popular new plugin for selecting files in and below your current directory; it makes heavy use of the Ruby interface.

http://github.com/wincent/Command-T

It also uses a small C extension to Ruby for speed, because for this particular scenario Ruby is a bit too slow to be comfortable.

Since Lua is so lightweight and fast, I think it should be an alternative worth considering in situations like this one, since it offers a reasonable compromise between the speed of C and the comfort of a high-level language like Ruby or Python.

compay··on Celebrate Whyday
I have no idea what he was thinking about then when he took his stuff down, so you may be right. But having read his work for a few years I don't think it was spite; that just doesn't seem like him.

He worked for years on code and writings with free licenses - so for the most part he didn't really "delete" his work, but rather just stopped distributing it. He must have been aware of this fact when he took his sites/accounts down.

compay··on Celebrate Whyday
Sometimes I find it hard to believe that such a cheerful character has ended up being so polarizing. People both lionize and demonize this guy, and neither one is fair. _Why is not the greatest genius who ever lived, but he inspired a lot of people to get into programming, is a very witty and creative person, and a pretty damn good hacker as well. I could think of far worse people to honor.
compay··on The Great Benefit of Test Driven Development Nobody Talks About
I agree to an extent - I just think it says a lot more about the individuals than the methodology. TDD doesn't magically transform bad solutions to good ones, and nobody should claim or expect that. It's a shame that what is really just a useful technique has been overhyped by people trying to make a buck.
compay··on Larry Ellison (2006): If an open source product gets good enough, we'll take it
And selective quoting is never deceptive or equivalent to editorializing, right? :)
compay··on The Great Benefit of Test Driven Development Nobody Talks About
Simply put, when I first heard about TDD I got very excited and made the mistakes you would expect a well-intentioned but uninformed person would make: spending WAY too much time worrying about how to structure my tests correctly, which sometimes distracted me from the "real" problem at hand.

At this point I would certainly not consider myself a great expert on testing, but I think I've acquired a bit more intuition on what and how to test things. I don't usually work in a strictly "test first" manner because often times it's easier for me to "sketch" out a few classes and go through a couple attempts at organizing things before I find an approach that works for me. In these cases, testing first is a pain in the butt.

Other times, for example if I'm implementing some kind of tricky data filter, writing the tests first helps me think about the possible problems I might have to deal with in my implementation.

In general though, my projects usually end up with close to 100% code coverage, even if some of the tests are not very granular. Throughout the lifecycle of the code I maintain, I add tests when fixing bugs to avoid regressions. The tests that I write obviously don't catch every bug, but they do usually stop me from making embarrassing, silly mistakes which I think covers a pretty significant percentage of bugs in general. I don't usually have to worry about breaking things when refactoring or adding new features, which is a great feeling that I pretty much never felt in either my "no testing" or "way too much testing" phases.

So basically I have a very pragmatic attitude towards testing which I think would be non-threatening to a skeptic like yourself. :-) Part of the problem is that you might be letting yourself get turned off to valuable and useful techniques, not because of the techniques themselves, but the way in which they are being presented to you.

But at the end of the day, you have to find whatever works best for you to make the best code you can, and don't worry about what other people think.

compay··on The Great Benefit of Test Driven Development Nobody Talks About
Yeah, that was pretty much my point.
compay··on The Great Benefit of Test Driven Development Nobody Talks About
Tests are of course very important, but when the coder begins to fetishize testing and write tests for the sake of writing tests, rather than to help pursue the project's goal, then it becomes a problem. I've been guilty of this earlier in my career and have seen quite a few other people do it too.
compay··on Larry Ellison (2006): If an open source product gets good enough, we'll take it
To all those who read the title and think "OMG Oracle is so evil," by "take it", he means "use it in compliance with its license and build business around supporting it."

I'm not a fan of Oracle but the title given here on HN is kinda deceptive.

compay··on Vim 7.3 released
Looking forward to playing around with the new Lua interface.
compay··on Do you have a different personality when you speak a different language?
First: it's because it's making cultural observations about the people from both places, and trying to somehow say that this is reflected in the language.

For the sake of argument, let's just assume the British are "less emotional" than the Argentines (though attending a football match in each country may disabuse you of that idea). This may affect the way people use language, but it does not affect language. Language is a tool that people use to convey their thoughts. The tool not affected by the thoughts it is used to convey.

Second: sure, English may have lots of one-syllable words for things that are two syllables in Spanish (though the "lol" example you gave above is spurious because in my experience people just write "jaja."). But English requires more use of pronouns, articles and prepositions than Spanish does:

* "No sé" vs. "I don't know"

* "No lo vi" vs. "I didn't see it"

* "vamos" vs. "let's go"

* "saco la mano" "I take out my hand"

What's more "efficient?" It's subjective, and at the end of the day an utterly meaningless thing to analyze because trying to extrapolate cultural behaviors from the way a language uses propositions and articles is about as good science as phrenology or astrology.

Third: let's assume when people say "efficient" they mean "simpler grammar." People often claim that "Latin is more complex than English" because it has nominal declensions. But because of its declensions, word order in Latin is almost irrelevant. In place of declensions, English uses strict word order to distinguish subjects from objects. Which one is simpler? It's subjective, because your answer will depend on whether you're a native speaker of a language more like Latin or more like English.

But if you're writing a program to parse natural language syntax, Latin's "complex" nouns make it a lot easier to parse programmatically than English. What does this say about Roman culture? Nothing. Again, it's the wrong way to look at language - there's no valid reason to draw a connection between grammar and cultural behavior.

compay··on Do you have a different personality when you speak a different language?
I speak 2 languages fluently and a few others adequately. I definitely think my behavior is a little different when speaking Spanish versus English, but I don't think there are any deep-seated psycholinguistic reasons for this - it's more because of cultural differences.

An example: in Colombia, when demonstrating the height of a child, you hold your hand vertically, while when talking about the height of an animal, you hold your hand horizontally. If you do the wrong thing, people may assume you're a foreigner and don't know, or they may assume you're just rude. The fact that I learned to hold my hand a certain way when speaking Spanish with Colombians doesn't mean my personality has changed, it means I've absorbed a cultural lesson and if I do it, I do it because I am trying to fit in.

The same things goes for the way in which you express yourself with speech. The way you greet people, how long you make small talk before "getting down to business", how to flirt in a bar; all of these things vary a LOT from country to country and if you want to fit in, then you need to pay attention and learn some things. But again, doing that does not mean that your personality has changed; you're just behaving differently.

One more thing - as somebody who studied theoretical linguistics and speaks the two languages fluently, any time people start making ridiculously subjective claims about a language like "English, a more unemotional and efficient language than Spanish" - keep in mind you're reading complete bullshit.

That's like saying the firewire cable that you use to transfer movies from your video camera is more "artistic" than the USB cable you use to attach your hard drive to your computer. It's confusing the signal with the carrier, and making some pretty subjective claims about the signal too.

compay··on The Great Vim / Textmate Debate: Opinion #56 - How to make Vim more accessible
Everybody uses editors differently, and perhaps for your approach and workflow it doesn't make a significant difference. In my experience using vim has made my work day more enjoyable than other editors did, and while I don't think it directly impacts my code, I sometimes think that the increased happiness probably does have a positive impact on the quality of my work.

And even if it doesn't, the increased happiness is a virtue unto itself. The point is, find the tools that make you happy and use them. They don't have to be the same ones other people are using.

compay··on Oracle shuts down PostgreSQL test servers
I'm a big fan of Postgres and have a hard time overcoming my visceral dislike for Oracle. But I suppose this makes perfect sense for them. Businesses protect themselves from real and potential threats. If I were an Oracle shareholder, this is probably what I would want and expect them to do.
compay··on Top countries by robot density (Graph)
So in a Terminator-like situation, the best bet would apparently be to head for Africa.
compay··on Sometimes you can judge a Country by its Airport
I hate to be "meta," but all of the articles submitted from this domain are basically just a rich guy complaining about his level of comfort and service received by those he deems to be beneath his station. I have no idea why they keep getting voted up, but I´d suspect it´s just his friends voting. The content has absolutely nothing to do with Hacker News. I think this domain should be blacklisted.
compay··on Why is it so hard to avoid premature optimizations?
When you have written lots of code, you remember some of the things you had to optimize in the past, and when you find yourself in a similar situation you're tempted to just do it now so that you don't have to do it later.

The fact that sometimes you're right just reinforces this behavior, but when you get it wrong it tends to blow up in your face.

compay··on CoffeeScript -- You Are Totally Gonna Hate It
I really enjoy working with Lua, though the opportunities have been infrequent. While Node.js looks like a wonderful piece of technology, every time I hear about it I feel a bit bitter that yet another opportunity to popularize Lua has been missed.
compay··on Apple’s Antenna Design and Test Labs
I'd be convinced if I actually held one in my hand and could either reproduce or not reproduce the problem.

I find it crazy how many people leap to either attack or defend Apple without having ever used one of the things.

compay··on New symbol for Indian Rupee
Well, really any decision is going to leave them open to criticism like this. Given that Hindi has more speakers in India than any other language, and is not the only language that uses Devanagari I think it's a pretty defensible choice.
compay··on New symbol for Indian Rupee
It will be interesting to see how this shakes out - the spec for Unicode 6.0 is due in September, theoretically giving them time to add it before the release.
compay··on [dead]
I'm largely ignorant of commercial RDBMS's, having worked almost entirely with open source ones. So I had assumed that LIMIT was part of some SQL standard. Looking into it further, I realize that I've been wrong about that for a long time.

http://troels.arvin.dk/db/rdbms/#select-limit-offset

compay··on Mac Interface Design
I think most of these apps make for great screenshots, but I'm less sure about long term, daily usability. In my (very personal, subjective) opinion I find that apps that use standard widgets make a less exciting first impression but are usually a lot more usable. The best example I can think of offhand would be Twitteriffic vs. Tweetie.
compay··on PIE: Add CSS3 border-radius and multiple backgrounds to IE 6-8
Sure, but then you're writing off CSS3 and continuing to write code as if it were 2006, which I personally don't like having to do.
compay··on PIE: Add CSS3 border-radius and multiple backgrounds to IE 6-8
On many sites, IE 6-8 users account for more than half of visits, and are often the single largest block of visitors by browser. Assuming you have such a site and don't want to just write off 50% of your users design-wise, it's nice to have the ability to use border-radius and other CSS3 advances, because they save you from a lot of time-consuming, repetitive work.

If you are in a situation where you can simply forget about what your site looks like in IE, then I envy you. Most web designers are not.

← PreviousPage 7 of 16Next →