Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:I dunno... (Score 1) 776

I don't understand why it's "needless to say" he didn't get the job. Obviously if he couldn't come up with a more generic solution then that would be an issue but sometimes hard coding is the best way to do things, especially for prototyping work.

Something I wrote in a bored moment after having done an interview with some questions like these:

#include <iostream>

template <int N> class fibonacci
{
    fibonacci<N-1> dataA;
    fibonacci<N-2> dataB;
};

template <> class fibonacci<1> { char data[1]; };
template <> class fibonacci<2> { char data[1]; };

int main()
{
    std::cout << sizeof(fibonacci<1>) << std::endl;
    std::cout << sizeof(fibonacci<2>) << std::endl;
    std::cout << sizeof(fibonacci<3>) << std::endl;
    std::cout << sizeof(fibonacci<4>) << std::endl;
    std::cout << sizeof(fibonacci<5>) << std::endl;
    std::cout << sizeof(fibonacci<6>) << std::endl;
    std::cout << sizeof(fibonacci<7>) << std::endl;
    std::cout << sizeof(fibonacci<8>) << std::endl;
}

I ran the text through sed to get the '<' to appear.

Stupid lameness filter
L. Sergius Catilina, homo patricii generis, magna vi et animi et corporis, sed ingenio malo pravoque, praetorius, qui iam a. u. c. 689 caedem consulum facere eaque facta rerum potiri constituerat, casu autem rem perficere prohibitus erat, ascitis ad consilium rei publicae opprimendae hominibus omnis generis perditissiis atque audacissimis, quos inopia, cupiditas, scelera stimulabant, consulatum in annum 691 p. u. c. petivit, sed cum, quae in animo habebat, perniciosa rei publicae consilia parum occultata essent, studiis bonorum omnium M. Tullius Cicero una cum C. Antonio consul factus est. Qua re commotus L. Catilina M. Cicerone C. Antonio consulibus cupidius etiam sua consilia recepit, quibus maxime Ciceronis consulis diligentia restitit ad quem Catilinae eiusque sociorum consilia a Fulvia, muliere nobili, quae rem habebat cum Q. Curio, qui particeps fuit conspirationis illius, deferebantur. Cum autem ista mala consilia contra salutem rei publicae a coniuratis inita apertius iam agitarentur, senatus consultum factum est, darent operam consules, ne quid res publica detrimenti caperet, effectumque est, ut Catilina spe consulatus, quem in proximum annum petebat, excideret, designarenturque D. Silanus et L. Murena. Quae cum ita essent, L. Catilina, qui iam ante per Italiam ad homines seditiosos, maxime veteres L. Sullae milites, concitandos nuntios miserat, ad C. Manlium, qui Faesulas, in urbem Etruriae munitam, manum armatorum coegerat, proficisci constituit et bellum patriae inferre convocatisque nocte, quae inter VIII et VII Id. Novembres erat, sociis in domum M. Porci Laecae consilium, quod ceperat, aperuit. Qua in congregatione nocturna duo equites Romani Ciceronem consulem illa ipsa nocte ante lucem, cum sicut salutaturi eius domum intrassent, interficiendum receperunt. M. Cicero vitatis insidiis proximo die, qui fuit a. d. VI Id. Novembres, dispositis praesidiis senatum in templum Iovis Statoris convocavit, quo cum Catilina quasi sui purgandi causa venisset, Cicero eam, quae infra legitur, orationem in Catilinam vehementissime invehens habuit.

Comment true ebook (Score 3, Interesting) 142

Couple of hundred of these bound together in a hardback cover, maybe with a processor and memory in the spine, maybe just a connector.

Kindle is great for fiction, which is linear, but less good for reference books where you often want to flip back and forwards etc.

Now you can have the space advantages of ebooks with the UI advantages of a proper book.

Tim.

Comment Re:I agree that programming is not for geeks (Score 2) 317

if(milk.quantity == 0) {
  pick up purse
  put on coat
  put purse in coat pocket
  open front door
  go out of front door
  close front door
  take purse out of coat pocket
  take key out of purse
  lock front door
  put key in purse
  put purse in coat pocket
  walk to car
  take purse out of coat pocket
  take key out of purse
  unlock car door
  open car door ...
  put milk in fridge
  close fridge door
}

Dear computer.
    5 is the good value.

MOM: ABEND. Key does not fit in lock.

Non programmer. Of course I *$%^&ing meant take the front door key out of the purse to lock the front door. What idiot would take a car key out of their purse to do that.

Computer programming requires a pedantry that the vast majority of people are unwilling to tolerate. Even socially well adapted (good) programmers tend to bring a pedantry to social situations that at best, non programmers find quaint and amusing and some find unbearable.

Tim.

Comment Re:What frictionless market? (Score 1) 453

But I wasn't using it as a friendship site. I'm single and I wouldn't mind finding someone who would make me non-single.

But I'm choosy and I'm not desperate. Isn't there something like a "80% rule" - 80% of people you meet once you'd never bother to meet again?

I haven't generally found it difficult to find women to "go out" with but I've also not usually been bothered by their "dating status" for want of a better phrase. However, now that I'm single I thought that online dating would be a good opportunity to meet women who were also single. I'd expected to meet one or two a week for coffee or something else simple like that. Most we'd part (hopefully amicably) but never see each other again. One or two per month might lead to a second meeting. Eventually, out of those people something might develop.

OKCupid seems to be a great site if you're looking for sex and worry about deciding if you actually like each other later but it's not so great if you'd like to find someone serious for a long term relationship. Although I receive some lovely complements on my writing style, I'd rather meet face to face, it's harder to fake things. If you have lunch and run out of things to talk about by the time the food is eaten then it's probably not going to work. If your lunch date lasts four hours and only ends because one of you has another appointment in the evening then you'll probably see each other again even if you're not destined for a relationship.

Tim.

Comment Re:What is it with this idea nowadays (Score 1) 317

What proportion of people make it to a "literacy" standard in a second language?

Or in the ability to play music? Most people have done some music at school and have probably been taught the note names. What proportion could even sightread a single line melody on the piano where there's an easy many-1 mapping between the note on the page and the note on the keyboard.

Those who need to be able to pick out a tune on the piano will learn it fairly quickly. There's no use teaching the rest because they'll have forgotten it all again by the time the actually need it.

Tim.

Comment Re:I agree that programming is not for geeks (Score 1) 317

Ambiguity.

The most people do not recognise ambiguity. People say things and then look at you oddly when you point out that what they have said also has a completely different meaning. The meaning they intended is usually obvious from the context but they are so locked on the context that trying to explain the alternative meaning is usually a wasted cause.

That mindset just does not handle programming at all well. "It's obvious" is a usually a disaster when you start thinking about programming because it's only obvious because you obviously aren't worrying about all those other cases. Although I think the mindset is better adjusted to handling interactions with people where "going with the flow" is a good strategy. Sometimes I'll lose the flow because I'll be worrying about whether we're talking about A or B and miss the ongoing conversation while others "knew" it was A and so didn't get distracted.

Tim.

Comment Re:What frictionless market? (Score 2) 453

This isn't my experience. I still have a profile on okcupid although I haven't logged in since September (I am told by one of the people I met via it, I don't remember) and I probably only used it for about three months.

But since then I've had at least three messages from women (that I only got to read the first line of in the email that OKC sent to me)

What I didn't like (and is alluded to in the grandparent) is that it's far too much dating oriented.

Only after you've met and your date hasn't stood you up or canceled at the last minute for no reason are you dating.

Seriously? You're dating if you meet? It's no wonder women don't reply much.

I've made three new friends (at least on the way to being friends) via online dating, one I see and email frequently (I contacted her originally). I'd be interested in more but she, unfortunately, isn't romantically attracted to me. We wouldn't have met other than via online dating but it also lead to unrealistic expectations on both sides which came close to costing a friendship and there are still some rocky places ahead. One I email and see infrequently (she contacted me first) but she's in the process of changing job and retraining and is extremely busy and flat out broke (and the women who I like are extremely reluctant to let me pay their way) and one I've seen and emailed a couple of times and is on my todo list to contact again soon. (She also contacted me first)

However, I like extremely intelligent women and there's a shortage of men who are both intelligent and interesting enough to be able to hold a conversation with them and additionally, who like that sort of woman. (There aren't that many women like that around either but you can only have so many friends)

I keep meaning to log on and disable my profile. I do actually think the friction is too low - but, ironically, I think it's the women who are losing out. Yes, the man has to make most of the running, that's the way it is, but I think online dating is populated with women who think they don't need to do anything at all to attract and keep a man's interest. While there are some genuine women on these sites the vast, vast majority aren't genuinely looking for a date or a boyfriend, they're just waiting for their prince charming to sweep them off their feet.

I know a couple of women who have found boyfriends via OKCupid (both recommended to the site by me) and both employed significant time and effort into searching for someone and both found someone fairly quickly (a few months)

Tim.

Comment Forced medical intervention. (Score 2) 851

I've read through some of the comments with interest. The general consensus seems to be that the employer can demand whatever the employer wants. That probably reflects the US centric nature of the commentators.

However, I have problems with enforced medical intervention. It's been done before, serilization of the mentally ill, forced abortion (china one woman one child policy).

I also have problems with withholding medical intervention - we've recently had a case in the UK courts where a mother didn't want her child treated for a brain tumour. The courts eventually ruled that the operation could go ahead.

I would strongly oppose any measure that required doctors to be involved with euthanasia but at the same time I'm critical of the current rules that require people to refuse food and starve themselves to death because nobody is allowed to help them to die.

I don't know the ins and outs of this particular issue. In the UK we do have the concept of a notifiable disease and, should you contract one, you can have your freedoms limited up to an including being forced to stay in an isolation ward. But I've never heard any suggestion that flu vaccines should be made compulsory for anybody.

Personally, I think something like this should be legal issue and not an employment issue. If employers think this is an important intervention then they should lobby their legislators to make it compulsory and then people can have a chance to vote on it. My inclination should anything like this be proposed in the UK is that I would be opposed on moral and ethical grounds regardless of the efficacy of the intervention. I'd be willing to be swayed by a convincing argument though (but because employers should be allowed to enforce it isn't a convincing argument to me)

Tim.

Comment Re:UK as well (Score 4, Informative) 1387

Yes, we drive in miles. Stones and pounds are on the way out, ditto feet and inches which are only used to measure people. Anyone born before about 1960 tends to use stones and feet exclusively, anyone born after about 1980 uses metres and kilos. Those of us on the cusp tend to switch depending on who we are talking to.

Fahrenheit (I even had to go and look up the spelling) has completely disappeared. I have absolutely no idea what the weather in Fahrenheit means other than doing some mental arithmetic.

The mile will probably stay for motoring. Much like the guinea and furlong for horse racing and the chain for cricket. I don't know if the pint will finally disappear in the pub. I suspect not but the gill has gone. L.s.d. is not even on the radar of most people born before about 1980. With the replacement of the shilling coin in 1990 and the florin in 1992 the final links and reminders of our old money system escaped from public consciousness.

Tim.

Comment Re:better explanation (Score 5, Informative) 264

It's a quirk of the way the temperature scale was defined.

One possible definition of temperature:

Put lots of little magnets in a magnetic field. They will line up with the field. At absolute zero there will be no (technically minimal[1]) deviation from them all being perfectly aligned. As you warm them up they will start to be less and less well aligned until at what we call infinite temperature, there is no alignment with the field at all and the alignment is completely random.

But, if instead of warming them up, you flip the magnetic field they will then "cool" through "infinite" temperature.

If we use this definition of temperature then it would make more sense to have absolute zero as negative infinite temperature, infinite as zero and still hotter temperatures as greater than zero.

This makes the unreachability of absolute zero make more sense. "Infinite" temperatures (and greater than infinite) are only unreachable via trying to add more heat.

Lasers utilize population inversion - which is a state that is impossible via naive thermodynamics and also does not have a sensible temperature as a result.

[1] Zero point energy.

Tim.

Comment Re:Obvious answer.. (Score 1) 514

It's not difficult, it's *very very* time consuming. Learning language (even as an adult) comes naturally to us. If it's difficult, you're doing it wrong.

I think it is difficult - many, many things are much more difficult to learn as an adult than as a child. That's not because it's actually more difficult but because your minimum goals are so much higher before you start.

I am trying to learn a foreign language at the moment. I've only been trying for about two months and I've acquired probably about 50-100 words and phrases from listening and practicing for an hour or two a day but I'm a very long way from being able to have even the simplest adult conversation. I can construct some very simple conversations in my head but they're the conversations that a two year old might have.

I play the piano to a reasonable standard. I'm not particularly musical, what ability I have is from sheer hard grind. It's easy for me to say that anyone could play the piano like me (physical disabilities aside) but very few adults with my limited natural ability will be prepared to spend the years and years playing boring simple, non-musical pieces.

My first five years of piano were "compulsory". My parents forced me to learn. After five years I reached a standard where my parents would have allowed to give up if I wanted but after five years I'd just about reached the standard where the pieces I was playing were fun and I could begin to make recognisable attempts at the pieces I wanted to be able to play. So I kept going and thirty years on I'm still practicing anything from a few hours to a few tens of hours per week depending on what time allows.

Tim.

Comment Re:Great... (Score 4, Insightful) 168

As with so many of these forensic tests, what this test can unambiguously be used for is to prove that a recording _HAS_ been tampered with.

If there is no hum, or it appears to be correct then the most you can say is "it might be a genuine recording made at the appropriate time" but if there is hum, and it's obviously discontinuous then you can categorically state that the recording has been tampered with.

Unfortunately, most people, including prosecutors, defence, juries, judges, politicians etc, do not understand the distinction. There are two possible answers to "has this recording been tampered with:" YES and I DON'T KNOW. People like certainty so this gets changed to YES and NO and while in most cases that NO does turn out to be correct, you get miscarriages of justice when it's not the case.

Tim.

Comment Re:Corporate Taxes == Political Favoritism (Score 1) 780

Any profits from sales made in the U.S.

And here is the problem.

If a company in country A gets it's supplies from country B with a lower tax rate how do you decide where the profits should be allocated?

Country B could sell to country A at a huge mark up and then there are no profits from sales in country A. Or Country B could sell to country A at cost in which case there are no profits in country B for the same selling price in A.

Normally this isn't a problem because there's competition on the supplies from country B so the cost of supplies is "fair" but when the company in A and the company in B are the same entity it's purely book keeping to decide where to allocate the profit and, obviously, it's going to be done in as tax efficient manner as possible.

It's hard to fix. Company A might honestly be working on a tiny margin while the supplies from country B are sold with a big markup. It would appear to depend on whether the supplier and the consumer are financially linked other than via the sales whether the taxation allocation is "fair" or "unfair" for the same chain of sales.

Tim.

Slashdot Top Deals

The moon is made of green cheese. -- John Heywood

Working...