HN user

Thrall

55 karma
Posts0
Comments47
View on HN
No posts found.

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...

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.

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).

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?…

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)

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.

You'd have to walk for hours to check all the prices and work out the cheapest from various supermarkets though. Also, the more calories you burn walking across town to find, purchase, and carry home the very cheapest food, the more you need to eat...

> …hopefully they do it in a different way, doing the same thing twice is pointless.

I believe Newton said, "If I have seen further it is by standing on the shoulders of giants.", not, "I have rediscovered everything in a slightly different way because no-one gave me more than a vague method to go on"

It is no bad thing to have several independent implementations of an algorithm. If there is a problem with one, then the others are likely to show that there is a problem. However, without open source code, all you can do is say, "Mmm, something's wrong somewhere" and write another version. You may end up with several papers that agree and one that doesn't, but you still can't draw any conclusions without looking at the code. Ultimately, you get a situation where everyone has to repeat the same work and see what they get, when what they should be doing is poring over the original soources and discussing which bits could/should have been implemented differently and how that affects the result.

The code is part of the method. If you can't show us the code, don't expect me to believe your 'results'. That is science.

In addition to the other answers, don't forget that in the situation described, if you remove the 'thousands of unauthorized copies', you still haven't sold any copies.

In terms of semantics: "Say I write a book but nobody purchases a copy."

In more meaningful terms: If people do not value your book highly enough to pay you for it, then without the thousands of unauthorized copies, you are an unknown writer languishing in obscurity. With the copies, you have at least started to publicise your name and your message.

I think perhaps there is an increasing tendency to design one UI for every platform (touch screen tablets, desktops etc.) and to favour consistency across platforms rather than proper integration within each platform. So if right-click is difficult to emulate on a touch screen, then often the desktop version of a program available for touch-screen devices won't make good use of right-click either.

It is perhaps part of a larger trend to try and solve UI problems for tablets and phones, then push the solutions back to the desktop, despite the fact the desktop didn't suffer from the problem they attempted to solve.

This appears to be trying to solve a problem that doesn't exist with a solution that is more problematic than the problem it attempts to solve.

If my browser can handle pdfs, I probably want to view them using the browser[1].

If my browser can't handle pdfs, it will be forced to download them anyway.

If my browser can handle pdfs, but I want to save it/view it with another program, I can use right-click+save as.

By contrast, a pdf which I want to view in-browser, but which forces the browser to download it instead is just a nuisance. Even if there were a 'right-click+don't save it, just view it in browser', I don't know that I need to use it until I have tried clicking the link.

In general terms: You publish content on the web, I decide how I view it. Try to force my hand and you'll just annoy me into going elsewhere.

[1] If the browser supports pdfs by default, but I prefer to view them with somthing else, there are usually settings to tell the browser how to handle different file types.

Fish 2.0 shell beta 13 years ago

It wouldn't read your .bash_profile, because it cannot. Any variables that are set by your .bash_profile will therefore not be set, and anything that depends on them being set may break.

I noticed this too. Sometimes the simple solutions are the best (compare with the long thread of suggested solutions further down this page).

It's like a master-criminal's subtle and sophisticated plan being foiled by a simpleton because it assumed that the victims would be able to read.

There is a subtle hint that all is not well if you try to select the code using triple-click: it will only select one half at a time, suggesting it is not the one-liner it appears to be...

> There was an attempt to port homebrew to linux, but it didn't go far.

Linux already has more package managers than you can shake a stick at. To gain traction on linux, homebrew would have to offer useful features that other package managers don't have. Even then, people are more likely to copy the features into an existing linux package manager.

I don't think people tend to shop around when it comes to package managers; you use whatever your distro provides. If it sucks, you find a better distro or submit patches, depending how involved you are.

> Many jewelers were confused and incredulous when we asked about one.

Bear in mind that it is in the jeweller's interest to perpetuate such superstitions as it means they can persuade many customers to buy a new ring instead.

Buying a diamonds as a romantic gesture, the buyer is vulnerable for two reasons:

1) They're unlikely to have much experience of buying jewellery; for many, this is the only occasion.

2) They probably feel very strongly about the gesture; it's very important that they get it right. Overspending pales beside the risk of offending the love of their life and/or subjecting them to negative judgement by their peers.

As a result, it is all too easy for jewellers to intimidate the buyer by telling them exactly what is 'expected' and charging absurd prices for it.

Basic advertising is important in that you cannot sell a product without letting people know it exists.

However, I think the advertising industry grossly exaggerates the importance of advertising.

The trouble is, it's impossible to ask, "Does advertising work?" and get a conclusive scientific answer. There are usually far too many other factors in play to be able to look at a company or product and say, "X failed/succeeded because they didn't/did advertise." Is X successful because they advertise? Could they have been more successful if they'd invested their ad-campaign funding elsewhere? Did Y fail because of lack of advertising or simply because they tried to sell a rubbish product? Did they even fail because they devoted too much of their budget to advertising, not leaving enough to properly develop their product?

This was my first thought. If you don't have to chew your food, your jaw muscles will atrophy (and I believe teeth and gums may also suffer from lack of use).

If you have to chew gum to make up for this, you're starting to lose the simplicity which was one of the idea's main selling points. A bit like switching from cycling to work to driving to work to save 10 minutes, then having to spend an hour in the gym to make up for the lack of exercise.

I can't help thinking there will turn out to be many more subtle effects to compensate for. Yes, I am a sceptic.

You personally may not care which term is used. However, if you want to get the law changed, you probably need to get a large number of people interested in the issue. One way to do this would be to force the use of the word 'licensing', so that many oblivious consumers who assumed they were 'buying' goods are made aware of the difference.

I sometimes wonder why languages use sequences like "->". This is clearly meant to represent an arrow, so why has noone ever taken the time to make sure an arrow character is defined, make sure it's possible to type it in most keyboard maps and use it in programming languages.

It can't be because physical keyboards wouldn't have the key, because my keyboard doesn't display a # symbol, but that is widely used.

I can only guess that the character sets and "what characters are easy to type into a computer" became standardised early on, and no individual language has been able to push such a change (Early in development a language has few users, thus no influence; Later in development, the language has been using "->" itself for a while, so it's less easy to change).

Also, proper languages like lisp use parentheses (), not curly braces. :p

It also depends on the amount of revenue you can generate if you hire a professional and get on with your work.

If we assume that the professional's fee is constant (doesn't depend on your income), then someone with very high income can waste only minutes on the task before it would have been cheaper to hire a professional, whereas someone with low income can devote a few hours to learning how to do it themselves and still make up for lost earnings by avoiding the cost of hiring a professional.

I love the comment translated as, "People around the world .. scratch turnip". Without any knowledge of Russian, I can only assume the word for turnip is used informally to mean head. Can anyone who knows Russian confirm/refute this?

In many countries, the amount of government money spent on scientific research is rather low. Therefore a lot of researchers have to attract interest from companies willing to fund them, otherwise they can't afford to do any research at all. Unfortunately, even if the researcher is a good scientist and the data is valid, they won't be able to continue in their field unless they dress it up as the latest great breakthrough and hint that it will enable lots of profitable new technology.