Forgot your password?

typodupeerror

Comment: Re: Am I the only professional C/C++ coder ... (Score 5, Interesting) 179

The reason C++ does not implement format strings is that C libraries work just fine in it.

There are no prizes for most pure usage of <iostream> or any rule saying C++ programmers must use it at all, it is simply a nifty library that exists that you may use when it suits you. If the code you're writing will be simpler, faster and or more comprehensible to later maintainers if you use <cstdio>, then you should use it. If it can be written better with <iostream> then use that.

If you get a chance to do some hardcore IO in C++, you will find two functions at the core of your code: select (or epoll on Linux) and mmap. Neither are in either of those two headers and both work on integer file descriptors, rather than FILE or ostream/istream objects. They are about as un-c++ as you can get, they are kernel syscalls, but you can build some truly excellent C++ around them which looks simple, does a lot and runs more efficiently than <fstream> allows.

C++ is not about purity, Bjarne Stroustrup designed it to allow multiple unrelated paradigms to be used together to allow programmers maximum efficiency and flexibility to write great code, it was never meant to be deconstructivist. Good C++ is not just knowing when to pass by reference, what to declare const, which members to make pure virtual, which STL type to use, which functions and classes should be templates and which shouldn't, etc. Good C++ is also knowing when to use stringstream and when to use strnprintf. And good friend malloc is still there, believe it or not, great C++ programmers know how to use it well in C++ too.

Comment: Re:Hiring assholes is never worth it. (Score 2) 400

by donscarletti (#43528253) Attached to: Dropcam CEO's Beef With Brogramming and Free Dinners

Assholes is a very subjective term. I know plenty of guys who are frequently labelled "assholes" who write brilliantly clear, extensible code to deadline, mentor others and drive groups of people forward as a team. They are labelled assholes by the people who don't complete tasks, push both work and blame onto others and shirk responsibility. Brilliant and hard working people have very high standards and very rarely afford civility to those who willingly fall short and thus are perceived as assholes by them.

I worked in a company where people would regularly curse a guy who resigned a year before I arrived, saying he's a giant asshole, he wrote unmaintainable code, he used perverted coding conventions, blah blah blah. I thought it was strange since I noticed his name all though the commit log with more than double the work output of everyone else and more or less the same quality code. I met him afterwards and the guy was clever, articulate, polite and we discussed his code. He humbly acknowledged that he had written that code in a rush under pressure and was very surprised that it was still there in its entirety and nobody had bothered to revise it with something more permanent. He also explained to me his slightly unorthodox coding conventions (antonyms having the same number of letters to make definitions line up) and they made a bit of sense too, as much as anyone else's conventions. You see, people didn't like him, not because he was selfish or abusive or whatever, just because he was better than them and he wouldn't waste his time mentally masturbating with them when there was a deadline looming.

I realise now, "asshole" tends to work both ways.

Comment: Re:Microsoft Security Essentials... (Score 3, Interesting) 274

by donscarletti (#43480053) Attached to: Botched Security Update Cripples Thousands of Computers

...is all I use these days.

Of course since Windows is "out of favor" here, one does not necessarily mention that Microsoft's "Security Essentials" is easily as good as most commercial Windows anti-malware packages, and much more "light weight". And free. And yes, everyone knows that Microsoft purchased the original technology (so what?) ...

MSE is good for what it is and what it does, I first tried it after reading unanimous praise of it here on Slashdot. It's the only AV I've ever seen that does not conspicuously cause the system to become slow, unstable and/or quirky.

I am feeling smug about this and is not about Microsoft or Windows itself, I just simply could not understand how a professional sysadmin could ever be in a position where they must run anti-virus on a server, which seems to be common practice amongst Windows admins.

Antivirus is for checking that executables and libraries are free of malicious code. I just cannot possibly fathom why an executable or library could be running on a server if nobody had checked it beforehand. A good admin should scan and monitor tools that come from untrusted sources before putting it on a live server. A great admin should scan and monitor tools, even if they're from trusted sources before putting it on a live server. This is basic stuff and is why almost all servers are infected through network bugs, which can be easily prevented by keeping services up to date and non-essential services shut down or at least firewalled off.

Why then do you need an Anti-Virus? It won't protect your services from buffer overflows or other infection vectors, it won't protect you from new rootkits unless it has wicked-sick heuristic analysis and you get lucky. So what does it guard against? Maybe someone using a zero-day attack vector and installing an old rootkit?

So for a sense of security against unknown threats, you give an autonomous, externally controlled process, that is by design almost impossible to analyse, unfettered administrator access to your entire system. Now this happens, I feel smug.

Comment: Re:Cost (Score 3, Informative) 77

by donscarletti (#43451079) Attached to: Construction of World's Largest Optical Telescope Approved

Actually, strictly speaking you could almost buy two. The average cost per unit of $2.1 billion is mostly born by one time, already sunk development costs, the flyaway cost is a "mere" $0.7 billion.

The reason they're so damn expensive is that the Cold War ended when they were almost finished and most of the money had been spent, meaning instead of building hundreds of the things, they only built 21. A weapon like the B2 is only needed against a well armed and geographically huge opponent, such as the Russia, China or the United States itself, none of which America has the pressing need to bomb in the near future. So they just built a few, made them public as some sort of national prestige stunt for scaring "rogue states" with the threat that a heavy bomber could be flying over their territory without anyone knowing, rather than building en masse to become a credible attack force towards large powers as they were intended.

In contrast fhe F-22 project cost 66 Billion compared to the B-2's 44 Billion, the difference is, they built hundreds of those, so the cost looks lower.

Comment: Re:Ruining it for everyone (Score 1) 288

by donscarletti (#43384595) Attached to: Researcher Evan Booth: How To Weaponize Tax-Free Airport Goods
Plutonium is a strange metal. It has 6 allotropes and is denser when melted than when solid, it is brittle and doesn't conduct heat or electricity. You take this horrid, unworkable metal that an experienced machinist or blacksmith would have trouble making a simple screwdriver or chisel out of and have to make a perfect, hollow, evacuated sphere out of it, surround it with precision trinitrotoluene shaped charges with multiple detonation points and then boom.

Comment: Re:Easy... (Score 1) 1121

We're talking about the sixth day here. According to Genesis 1 God created terrestrial animals and man, male and female. Then according to Genesis 2 God creates Man (male), creates animals to keep him company and finally makes a female. This is the potentially paradoxical bit here, not about the first, second, etc day, which at least is qualitatively congruent with evolution. if not quantitatively (maybe off by a few million to billion days at most).

Anyway, the issue is, if you bothered to read your bible (which, whether you believe it is true and/or like it or not, still shaped western society for 1700 years and incidently you should read the Koran for similar reasons, even if you are a Christian/atheist), Genesis 1 in all English translations seems to pretty blatantly contradicts Genesis 2 in the order of creation between animals, male humans and female humans.

My point is that Genesis 1 apparently does not specify order and time delay between animals, man and woman, even though it looks like that in the NIV, NRSV and KGV and anything else written in English. However, if you're just looking at the days, when is evening and when is morning of the X day, then there is no contradiction to explain at all, 6th day is 6th day and if the work's done when you clock off to go home, nobody much cares in what order you did it. When I was a consultant, I used to write timesheets with work orders that were wildly inaccurate, the guy managing that was Israeli, a native Hebrew speaker and he only cared if the billable time was correct. Sapier-Worf hypothesis in action maybe? Who knows, I personally higly doubt it, but its nice conjecture and Sapier-Worf hypothesis sounds like it's about a Klingon who grew up in Belarus, presumably speaking Russian and turned out weird.

Comment: Re:Easy... (Score 1) 1121

Do you know what "matrilinearly decended" means?

I was incorrect in that the other females of the time merely would have had their unbroken female line die out, rather than strictly mothering any daughters.

Anyway, I was trying to be clever in the context of a silly proposition, I'm not really asserting that there being a single human female at some time in history is a scientifically proven fact.

Comment: Re:Easy... (Score 2) 1121

I cannot read Hebrew myself, but those who can that I have asked have all answered that there is no order implied in Genesis one, it just comes through that way in English.

As for the usage of the word elohim vs adonai vs YHWH, this is common right through the bible, being translated to God, Lord and Yahweh/Jehovah in English respectively. Its roughly interchangeable.

Personally, I think the scientific evidence for natural selection is pretty solid. But I have discovered that creationists have most likely had that particular book in its written form for well over three millenia and generally have had time to think over most of its issues much more than you or I have.

Comment: Re:Easy... (Score 0) 1121

Well, it is generally accepted that we are all matrilinearly decended from the same woman, Mitochondrial Eve, I think this pretty much scientifically disproves there being two women at creation, unless one mothered no daughters.

Lilith only features as Adam's wife in certain Jewish apocryphal texts, nowhere in the Tanakh, meaning that Christian fundimentalists, being by the very definition of the word "fundimentalist" are not likely to consider her to be part of creation. Fundimentalism is about literally interpreting and living by canon (or at least the attempt thereof) and has nothing to do with blowing up things and is only considered a perjoritive by various modernists, liberals and those caught up in the propaganda relating to "Teh War on Terror".

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...