Hacker Newsnew | past | comments | ask | show | jobs | submit | Thrall's commentslogin

From that article:

"used in my example above where we decided that us meant “unsafe string” and s meant “safe string.” They’re both of type string. The compiler won’t help you if you assign one to the other"

Assuming you have the luxury of a language with a good type system (either because it's designed for the task in hand or it's extensible), the compiler can help you, and you would be much better off having unsafe and safe strings as separate types. Then the encode function simply becomes a function of type unsafe -> safe. I believe Michael Snoymann touches on this in his presentation, "Designing Type-Safe Haskell APIs"[1].

I'm not arguing that Joel's method isn't a good idea. However, if you can it's better to leave hints for the compiler, not just the programmers.

[1] https://docs.google.com/presentation/d/1K7smIeqmca-fY8qgQUKr...


This article is about pre-rendering a webpage to png, so anyone using a text-based browser would actually find the result even less useful than the original page.


I agree that a numpad isn't really necessary. The keys I miss on a laptop keyboard are:

- Home, end, pgup, pgdown

- Delete

- Function keys that are just F-keys, not volume/brightness controls that act as F-keys when you press a 'function' modifier key.


My work provided Lenovo w530 has all these. The F-keys do have volume and brightness controls on them, but you have to hit the Fn key to do that, pressing just F4 gives you 'F4'.

It's not as stylish as a MacBook Pro though.


If you're using the mouse, not having focus follows mouse means you have to click twice to activate something in a window without focus, which from my point of view as someone who uses focus-follows-mouse, is pointless and irksome.

When I'm not using the mouse, I change the focus with the keyboard (In my setup, focus follows mouse only when the mouse moves).


That depends entirely on your window manager. I generally run a customized Fvwm2 setup, so that's all easy to tweak.

In my setup, focus follows mouse only when the mouse moves

That makes much more sense to me.


I found this to be one of git's greatest strengths; Beyond the basics, it doesn't force you to use features you don't need or want. Initially, I just committed snapshots in a single branch. Later, I found I wanted to do something experimental, so I learnt to branch, and so on…

Now, I would miss git's more advanced features if they weren't there, but when I started, I distinctly remember thinking, "For now, I just want to be able to change my code non-destructively, so I can easily revert it if I make mistakes". Git did that, and did it well.


I also round them up, but in doing so, it makes me think about the fact that the price doesn't reflect the 'value' of the product: If they hadn't rounded it to ₤X.99, would it have been more or less? How much of that is profit?…


What's wrong with profit? And what does their cost have to do with value?


Our local libraries recently started an ebook program. However, copyright restrictions mean they aren't allowed to loan a single 'copy' out to more than one person at once. With the relatively small number of ebook copies available compared to the number of library users, last time I checked there was a long waiting list for most books. Perhaps ironically, it is quicker to go to the library and borrow a paper copy. (The irony being that one of the advantages of ebooks over paper books is that you don't have to wait for them to be delivered)


I suspect that as e-books become more popular, libraries are going to license them in larger quantities. They're a big cost saver for libraries since they take no space to store, no labor to re-shelve and can't be damaged or stolen.


The trouble with this is that without legislation in place to control the pricing of e-books as sold to libraries, e-book publishers use a number of tricks, from significantly higher pricing to making each license only valid for a set number of borrows before another license has to be bought, which negates the "they can't be damaged" benefit.

http://www.theguardian.com/books/2011/mar/06/ebooks-on-borro...


There's still a lot of bullshit licensing, like ebooks that can only be checked out a finite number of times, in order to reflect the average shelf life of physical books.


Would it help if they were prepared in such a way as to make them unrecognisable? I know plenty of people who will happily eat mince, chops, etc., but who find it offputting if there are signs of where the meat came from, (e.g. a hog roast, fish/poultry with the heads still on).


> The trick to the author's math

That's the trouble with this article; With the dependence on buying everything in bulk (and somehow using it all up before it goes off), it appears to be more of a fun theoretical calculation than a practical weekly diet.


The better areas are taken by those with money. You can move to a better area, but the police will turn up before long to move you on.


Obviously is not a simple life. Dangers are everywhere from drug dealers to policeman. But to keep this short the fact is the same: For a mentally sane man (or woman) in USA is very difficult die of starvation.


At some point the assumption of sanity breaks down, in this lifestyle.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: