Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:The public is free to participate in Internet t (Score 0) 110

Oh yeah, the Liaoning right?

China buys a crappy 22 year old Soviet bucket, pretending it's a floating casino, puts a new coat of paint on it and calls it a warship.

Suddenly everyone's hangmu this and hangmu that, it's picture (any generic aircraft carrier picture they can find) is stuck on ads for anything a patriotic man might like to buy.

The whole thing is quite bemusing.

Comment Re:this kind of comment system is dead (Score 1) 286

Fine, unique_ptr then. Regardless, auto_ptr was only ever 10 lines of code, if it was to be removed completely, it could still be re-added in 2 minutes. Point is, in C++ you can write pointers that free themselves. Destructors are super useful for everything, I use them to free all kinds of memory, as well as to release mutexes and stop timers when the it returns, breaks or gotos out of a block.

Comment Re:this kind of comment system is dead (Score 1) 286

C++ is indispensable for 3d engine programming for the following reasons.

  • You tend to use a lot of refcounting here and there to manage freeing of resources. C++ through constructors, destructors and operator overloading means it is hard to screw this up unless you try. Even when you don't need refcounting, you can use auto_ptr or something to make sure something's freed when it needs to be. I used to have memory leaks or heap corruptions regularly when using C, with C++ I run into that stuff maybe yearly.
  • A lot of the most time-sensitive inner loops tend to need to work on multiple different types of buffers, like manipulating different vertex formats, different bitdepths/formats of textures, different lengths of index buffers, etc. Template functions let you write this in a way that will execute just as fast as if it was using define macros, but far easier to read and maintain, meaning one no longer has to choose between maintainability and efficiency, the easy way is also the right way.
  • Mostly, the OO model fits really well. An "object" represents something that more or less actually behaves like an actual real world object with various behaviours peculiar to that type of object, that need to fit together in a heterogeneous collection of other objects in the scene graph. You can do this in C, but maintaining vtables and such gets tiresome and problematic. C++ makes this all rather easy.
  • STL once again makes the easy way the right way. Using quicksort to sort a list, using red-black trees to store a dictionary, using a dynamically resizing vector to store an unknown length array is actually easier to implement things in the asymtotically efficient way and safe way than to do things in an inefficient or dangerous way. Stack/heap over/under runs are rare, since buffers can be allocated dynamically without the programmer even thinking about it. Templated functions and classes in the STL allow you to use your fastest data structures and algorithms wherever you like for less effort than it takes to write a bubble sort. You can re-arrange an array of any object you like into a heap in a single line without a single function call or malloc.

Comment Re:Doubt it. (Score 1) 253

Sure, that's exactly why Y-DNA is useful. It's not a problem that a lot of Y gets lost along the way, as long as this happens uniformly you still wind up with a good sample.

Why would it be lost uniformly? Evolution relies on the fact that better chromosomes would be lost from the genepool at a slower rate because they would lead to greater fitness and worse chromosomes would be lost at a faster rate because they would lead to a lesser fitness. Y-chromosomes would be even more sensitive to this effect since men only have one and so (in my admittedly limited knowledge) it is impossible to be merely a carrier of any of the genes on it, meaning the effects of less capable chromosomes would quickly become manifest.

Comment Re:The American Dream (Score 1) 629

At the same time young employees keeps repeating mistakes made already by programmers that were around in the 70's, 80's and 90's.

At some point in their careers, all programmers, after spending a month hunting down a heap corruption, or a race condition, or some other bug nasty like that, come to the realisation that they are spending more time fixing mistakes than writing code. At this moment, most, but not all programmers follow a very logical path of reasoning. They think to themselves, "well, if this code took me 1 week to write, then 4 to fix, that is five weeks, what if I spent 3 weeks writing it carefully, then it would be done right away and I wouldn't have to fix it, I could have been done two weeks earlier!".

From that moment on, this programmer becomes all but useless to their current and future employers.

"Why?" Seasoned veterans may ask. "It saves time in the long run! You are just focussing on the short term results, being distracted by smoke and mirrors and building upon pillars of sand!"

Well, that is occasionally the case, but not usually. What is more often the case is when something is implemented it is either not what we needed or not implemented how it should have been implemented. When something is more or less built, nomatter how badly it is built, it is so clear and obvious what we needed instead and how it should have been made. If you had done that useless feature badly in 1 week, it could have been thrown out and we could have moved on. Sure, your experience might have told you that this was a waste of time, great, could you have told everyone what we really need? Are you going to take the reigns and pull the project in the right direction, or are you just going to be content in doing nothing in preference to doing some useless task?

The thing is, sure, you might do the right thing, in the right way the first time and the twenty year old across the room probably will do the wrong thing, in the wrong way the first and maybe even the second time. However, are you so positive that you will be finished before that twenty year old has finished his third and correct solution? Are you sure that what you build will be better than what the twenty year old builds after two attempts? Is your stable and clean version so much more useful to your team than the twenty year old's buggy first attempt that they will be happy to go without even seeing it for another few weeks, when they could have continued using it as a prototype or placeholder for a less buggy version.

Anyway, a few general maxims to stay relevant as you get older: 1) bad code is not so hard to rewrite 2) useless code is even easier to delete 3) if you're stumped on a problem, just try something, if it's wrong, you'll find out very soon. 4) no amount of experience, no amount of guile, no amount of planning or foresight can compare to a little intuition, a flurry of activity and being willing to make mistakes.

Comment Re:Porn browsing? (Score 4, Insightful) 415

  • * You can't get STDs from porn.
  • * Pornographic videos and literature are not human, so its distribution cannot be human trafficking.
  • * If your wife catches you watching a bunch of porn, she is unlikely to divorce you.
  • * Porn rarely gets beaten up by pimps and johns.
  • * Almost everyone openly or secretly loves porn, criminalising it would be too hard.

Comment Re:First sandwich (Score -1) 730

Well, this is true, but wasn't the aeroplane, telephone, radio, computer, microwave, steam engine, train, electric motor, light bulb, antibiotics, refrigerator, liquid fueled rocket etc. invented by white middle/upper class males born in the US and UK? Didn't various other types white middle/upper class males also invent the helicopter, auto mobile, internal combustion engine, jet engine and nuclear power? Weren't gunpowder, the printing press, solid fueled rockets, the compass and paper invented Chinese middle/upper class males, who also score highly on these tests?

Nope, all a sexist, racist and classist conspiracy.

Comment Re:Anyone surprised? (Score 2) 213

In fact the only thing that will surprise me is if it later turns out that spying on each others presidents is all these two countries did.

I'd be even more surprised to find out that Australia had a president. Unless the Indonesians mistook the President of the Australian Senate for an important political leader.

Comment Re:You answered yourself. (Score 1) 361

In my experience, the people drawn to startups over large companies, whether they be in engineering, sales, marketing, whatever tend to be those who favour directness and observable results over formality and working in an emotionally calm environment. I think he's right in that you _can_ in fact mostly tell things how they are in such an environment and in fact be appreciated for it.

However, what you cannot do is be unfairly abusive, unfairly critical or unfairly dismissive, since in the same measure that a fair comment is always justified nomatter how blunt, an unfair one is almost impossible to defend nomatter how benignly phrased. Furthermore, in such a small environment, it will always come back at you. Do not criticise what is in fact good or dismiss what is in fact correct, since this is no more accurate or truthful than a yes-man praising rubbish. Do not fail to praise those things done well as emphatically as you denounce what is bad. Try to be fair in word and deed and useful people will never dislike you too deeply.

Beyond fairness, directness must in fact be direct. Going out of your way to assign blame is going out of you way. A spiteful aside is an aside. If what you're saying is not a pleasantry then it must be relevant to the task at hand, one cannot expect others to willingly sit and listen to criticism if it serves no purpose besides your own gratification and emotional release. However if something is both relevant and true but a team member's pride rejects it, then that is their problem, startups have neither the time nor the money for such things.

Comment Re:Default ding. (Score 1) 361

Whenever I have told an underling that his "communication skills need work" it's usually directly after pointing out that if the guy at the next desk had known what he spent the last three hours trying to achieve, he would have been told the answer and would have saved three hours of the company's time.

I don't even bother pointing out such things to the strongest coders, since their workmates tend to have the initiative to ask them clear questions and have the patience to decipher what they have to say. But for those lacking intuition, experience or both, it's a must.

And forget the email, nobody will read it apart from your manager who will read it out of obligation and possibly resent you for it. Just listen more carefully when other people talk to you, pay attention to what others around you are doing and once in a while drop into conversation what you are working on.

Comment Re:First, learn the proper use of "exponentially" (Score 1) 361

I think GP is objecting to "exponentially many", which although is a syntactically legal adverb + adjective combination, the issue is that "many" is not an appropriate adjective since it does not suggest any form of comparison or rate that could have an exponential relationship. I would suggest adjectives "more", "greater", or a participle like "increasing" to sound more natural and logical.

This is one of those things that would sound natural if said in conversation, but stands out as somewhat wrong in written English.

This is one of the few times in Slashdot where critiquing the story's grammar is completely on-topic and productive, since we have little else to judge the submitter's communication skills by.

Comment Re: A synonym of "scourge" is "flagellate" (Score 4, Informative) 114

Not really, hitting someone with a towel or one of those bdsm nylon play whips is flagellation but hardly scourging. There is an accepted difference in degree between those two words and another even more common verb "whipping", which also means flagellation and is also used to refer to effects of wind. Whipping generally means something that will leave welts, flogging is mostly interpreted to mean something that leaves cuts (cat of nine tails, etc), scourging means something that will tear off strips of skin and is often fatal (see roman practices that lead to the term), as so with the effect of different degrees of storm. This storm ripped buildings out of the ground and killed thousands, ergo, scouring is the right word.

Comment Re:Slashdot is cheering for,,,, (Score 2) 183

Past success or failure is a poor indicator of future performance for a CEO.

That's something that incapable senior managers say when looking for a new company to ruin.

Something I've learned is if you have a new CEO that sucked in his last job, find a new job right away, while the company still looks like it means something on your resume.

Comment Re:Not a mistake (Score 1) 262

In practice, though, who they have to satisfy are the governments of the two nations, not the peoples therein.

Which government says Taiwan is not a province of China? The current Republic of China President Ma Yingjiu re-iterated quite clearly that Taiwan IS a province of China during a conference with the Wyoming Governor just 12 days ago. The only objections he's likely to make are about the concessions to the Russians north of the Amur river being legitimised and the fact that Outer Mongolia is not shown as a province of China.

Sure, the DPP is pretty convinced that there is in fact a country called "Taiwan" but they're certainly not in the position to crack down on software promoting opposing views.

Slashdot Top Deals

Computers are useless. They can only give you answers. -- Pablo Picasso

Working...