Slashdot Mirror


User: khchung

khchung's activity in the archive.

Stories
0
Comments
665
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 665

  1. Re:yawn on Bjarne Stroustrup Reveals All On C++ · · Score: 2, Insightful

    Whenever you want to use a language, you must learn it first. That's true even of Visual Basic. The reason you see those problems of yours as "gotchas" is that you don't understand how the language (and, in the case of C++, the computer) works. If you let the language shape your thoughts instead of trying to cram your crummy thoughts into C++, it would have been much easier and simpler for you. I used to think like that when was still a C++ programmer, until one day I read an FAQ somewhere that details the possible differences between "f(a++)" and "f(a); a++;". That's when I saw the light and seriously switched to Java. I think when a normal person looking at a normal piece of code cannot know what it will do, there is something wrong with the programming language.

    Quick question (which I always used to interview candidates claiming familiarity with C++):

    What, if any, are the differences between 2 programs, one using "f(a++)" and the other "f(a); a++;"? For added fun, also compare "f(++a)" and "++a; f(a);".

    Hint: If you answer "no difference" you don't know enough about C++.

    More hint: there are at least 2-3 ways where the result of the program can differ significantly, depending on the signature of f(), the actual type of a, how is operator ++ defined for that type, etc.

  2. Re:Another way to avoid tickets on New Service Maps Speed Traps By Cell Phone · · Score: 1

    And there are also some other more enlightened countries where the penalty do not go to the police departments, and went to the general government income pool instead, where it becomes insignificant. That completely removes any incentives for the police to setup speed traps in the first place, and focus on actually reducing the number of traffic accidents instead.

  3. Because people are stupid on Student Faces Expulsion for Facebook Study Group · · Score: 1

    I don't quite understand why the media goes into a frenzy every time Facebook or YouTube is mentioned


    In short, because people are stupid.

    The longer version, because the media is not there to give you or anyone useful news. The "media" is here to see your attention to advertisers, and one way they do this is by pretending to give you useful news, and guess what? Most people are stupid enough to believe them. To maximize their advertising income, the "media" will use what headline that catches people's attention, right to the line that people will realize their trick and stop watching such "news".

    So, back to the point, the media goes into a frenzy every time Facebook or YouTube is mentioned is because people, including you and me here, are stupid enough to took notice whenever Facebook or YouTube is mentioned.

    Now, I want my time wasted on this non-news back...
  4. MOD PARENT INSIGHTFUL on Feds Seize $78M of Bogus Chinese Cisco Gear · · Score: 2, Insightful

    The parent post hit it right on. Literally millions of chinese workers left their homes and families in the rural areas, and went to live and work in the cities where the factories are! The simple fact that they are willing to do this while US factory workers won't is what makes it worth the trouble to build factories in China.

    When the workers in China got rich enough (relatively speaking) that they are no longer willing to leave families behind, you will see those factories either spread to the rural areas in China, or move to some other even poorer countries where they can find the workers.

  5. Re:I disagree on Scientist Suggests We Explore 'Universe is a VR Simulation' Theory · · Score: 1

    But given a set of differential equations that describe the system and a set of initial conditions, one can THEN predict the behavior of the system at least numerically.


    Wrong. And that's exactly what people find out which started the whole field about chaotic system, when people find out that a simple weather model composed of a few D.E. will diverge (i.e. results differs drastically) quickly if the initial condition is changed just a tiny bit, in fact so tiny that it correspond to just a flap of wings from a butterfly. That's is where "butterfly effect" comes from.

    The very prominent feature of a chaotic system is extremely tiny differences in the initial conditions, e.g. the rounding errors of floating point calculation in a modern CPU, will cause the results to diverge so much to become useless. For example, I recall one example is a frictionless billiard ball system (so the balls will bounce around non-stop after one shot), even assuming you have the initial condition completely accurate to infinite precision, if you just add/subtract the gravitation influence of an electron on the edge of our galaxy, which is easily around 10^-40 weaker than the gravitation force between the balls, your calculated results will differ completely from the actual results after about 15 minutes. So if your program do not keep at a precision of 40 digits, your program will be completely wrong after a minutes.

    For most systems, a "predictability" that has a horizon of a few minutes is the nearly the same as "unpredictable" for most practical purposes. And that give raise to the interesting definition of a chaotic system being its own faster "computer", as there is no practical way to make another system to predict its behaviour, the only way to see what will happen to the system is to watch it happen.

    The fact that you can calculate the orbits of objects in the solar is because the N-body gravity system is, in most cases at least, NOT chaotic.

    Try asking your weather man to predict the weather accurately for more than a few days, he has intimate experience with a chaotic system, the local weather.
  6. Re:Misconceptions of the ignorant on US FDA Deems Cloned Animals Edible · · Score: 1

    I suggest you try asking how they thought about eating artificially inseminated animals, i.e. conceived using sperms frozen and kept for X months, you know, who knows what kinds of damage/degradation those sperms must have suffered during the long storage! Plus it is obviously not natural! FDA should mandate labeling of such meat!

    Then as their minds are going through such horror, ask them how horrible it would be for human babies to be conceived that way... until someone finally realized that human babies are already being conceived using donate frozen sperms, and nobody would blink an eye at meeting such a person.

    One can hope that one or two of them will realize how stupid it is to fear cloned meat.

  7. Re:I disagree on Scientist Suggests We Explore 'Universe is a VR Simulation' Theory · · Score: 1

    If a system is deterministic, then by definition it is, at least at some level, predictable.


    Er... wrong. You might know more than I do, I learned this over a decade ago, but one definition of a chaotic system is that "For a long enough time frame, watching the system itself evolve is the fastest way you can find out how it will evolve". IOW, it is saying (1) there is no way you can accurately predict the behaviour of a chaotic system, and (2) much less create a simulation that can predict the results faster than the original chaotic system evolve. One of the reasons is since 2 chaotic systems may evolve drastically differently due to very minor difference in the initial condition, and since there is no way one can measure the initial state of a chaotic system to infinite precision, any simulation you made will necessary diverge from the real system very soon.

    So, a chaotic system can be both deterministic but unpredictable.

    Although you can say that any system is unpredictable if you look far enough into the future, chaotic systems are special in that the "far enough in the future" is usually very short in normal human terms.
  8. Re:What are the police really like? on Aqua Teen Art 'Terrorist' Describes His Ordeal · · Score: 1

    It is required in the UK for recordings to be made of all interrogations. Why is this not the case in the US? If the police are following the rules, they would have nothing to hide, would they? Two words: National security

    No matter if it actually has any real or imagined security impact.
  9. Re:War Zone on Stopping Cars With Microwave Radiation · · Score: 1

    At a roadblock in Iraq i think people would appreciate their engine getting shut off a little more the getting shot at. I think, rather, it would be people's engine getting shut off and then getting shot at.
  10. Re:Recommend on Transitioning From Developer To Management? · · Score: 3, Insightful

    Even if she had spent her days bringing the other developers coffee, she would not have cost the company multiples of her salary to keep employed.

    Right on! One of the things I need to do as a team leader is to identify and reduce the damage from incompetent programmers. Incompetent programmers not only have less productivity, often they have negative productivity, the grand parent post is good example. Letting them work on the code creates more work for the rest of the team.

    When firing the incompetents is not an option, due to emotional issues (as the GP post) or otherwise, even putting them to do nothing is better than letting them work on the code. It is tough to explain to higher-ups, you have established a good trusting relationship, sometimes you just have make up some work for them, my favorite is documentation. "Capture all screens of the system and write brief description of them in this document. Have a glossary of every field label displayed." can make them busy for the whole project without endangering a line of code, and you end up with a good document for the almighty thud effect.
  11. Re:The bigger problem on The Science of Bridge Collapse Prevention · · Score: 1

    It seems that no public employee, elected or not, understands that prevention is better than reaction. I think they understand that perfectly, but they also understands that prevention wins you no elections or acclaims, while reaction sometimes does.
  12. Re:good on Comet Probes Given New Duties · · Score: 1

    The problem with this is, the people that start out chasing after the sun and the moon and the stars tend to deliver more than the people that deliver exactly what they promised.


    Perhaps that's because people that start out chasing after the sun and the moon and the stars also got a sky-high budget to start with? While people making down-to-earth promises got only down-to-earth budgets?
  13. Snake oil on Cryptography To Frustrate Printer-Ink Piracy · · Score: 1

    a feature that would thwart someone attempting to reverse-engineer the chip by examining it under a microscope to determine how it works


    Look at the security of smart cards used by TV set-top boxes (e.g. satellite TV), after years of trying and millions of dollars later, they still cannot thwart criminals from reverse-engineering their chip and selling counterfeit smart cards, and have to use a layered approach so that as each feature is cracked, they will wait a while and activate the next to frustrate the buyers, for a few months until it is cracked again.

    If CRI really got "reverse-engineering proof" technology, they would be selling that to smart card manufacturers and the military (think counterfeit proof id cards) for big bucks instead of using it for low cost printers. Their only hope would be that the profit from ink cartridges is not worth the effort to crack their chip, which sets a pretty low upper bound on the actual strength on it security.
  14. Re:The US system is probably worse than you think. on Google Protects Healthcare From Michael Moore · · Score: 1

    If the private sector solution is so efficient then why does it suck so much money out of the system?


    Uh... what are you surprised? For profit companies which are not good at sucking money (aka making profits) go bankrupt or bought out, private sector solutions is efficient precisely at sucking money out of the system.
  15. Re:Given 2 identicle computers on Rutkowska Faces 'Blue Pill' Rootkit Challenge · · Score: 1

    This is informative?!

    1. Result: the 2 images differs, duh. Now go ahead try to figure which one was infect merely from knowing this.

    2. A lot of files are different, duh. Now go ahead and figure how to distinguish between an blue-pill infected file and one infected with a random virus. There are, after all, no restrictions that she can only put in her blue-pill.

  16. Re:You need to have a contract first on Why Is "Design by Contract" Not More Popular? · · Score: 2, Insightful

    Why do you need a complete set of user requirements? If you don't know what the function should do right now, how can you possibly write it?

    How interesting for you to put these 2 questions together! Didn't your 2nd question just answered your first question (at least in theory)?

    Now in practice, we obvious will be start developing before we got a complete set of requirements, which bring us to...

    You might as well complain that you can't do automated unit testing, because the tests may have to change during development, or that you can't write code because that code might have to change during development.

    The big difference between code + unit tests vs contracts (at least from my understanding and experience), is that code and tests are "constructive" in nature, while contracts are mainly "prohibitive" in nature. By "constructive", I mean code and tests tell you something the program will do, vs "prohibitive" which means what the program will not do.

    A piece code to parse a string "1234" into an integer 1234 and with test to call it using "1234" and asserting the result == 1234, now that tells you what the code does. The test does not tell you what other things the code might also do, such as it maybe the code can also handle -ve numbers ("-1234"), or formatted numbers ("1,234"), or even decimals "1,234.56" (if the return type is general enough to support it, such as returning type Number in Java).

    When you put in assert() into the code, however, it tells what the code does not do. assert(result is integer) tells us the parse does not handle decimals, assert(string contains only numbers) tells us the code does not handles formatted strings, etc.

    Comparing the two, code and tests are "constructive" as they give more features to your program, while contracts are "prohibitive" as they restrict what you program can do. More contracts you add, more things you prohibit your code from doing.

    When the requirements change ("we have to handle dollar signs in front too, but no more decimals"), the now unused decimal feature and its tests can be ignored, but any contract ("string only contains [0123456789.,-]") that blocks the new requirement has to be removed. Guess which one, tests or contracts, make more problem for the team as the development progress and requirements change?
  17. You need to have a contract first on Why Is "Design by Contract" Not More Popular? · · Score: 1

    To do DbC, you have to have a contract first. That means you know exactly how your function is supposed to be called and what values are valid, etc. Now trace from one function to its caller, and to it caller's caller, etc, and eventually you either reach the user interface or some business logic. Knowing how the user interface and business logic calls other functions and what values are valid means you have a complete set of user requirements on hand.

    Now, I don't know about you, but I have never seen a project with a set of user requirements at the beginning of the project that remains the same at the end of the project. I.e. either they are incomplete to be begin with, or they change in the course of the project, or both. So that means any "contract" you added into your code is likely to become wrong during the course of the project, rendering it more an development obstacle than a development aid.

    In contrast, XP and other "Agile" approaches recognizes and accepts the fact that requirements change, rather than hoping in vain to nail the requirements down.

  18. In a manager's budget, developers time are free on Management 'Scared' by Open Source · · Score: 2, Interesting

    Developers, though, end up using open source because of its ubiquity and not using it 'puts them at a competitive disadvantage because their competitors are.'


    See the problem here? Using open source give an advantage in the minds of the developers, but not the managers? Why? Because developers' time are free for managers of most in-house IT dept! Developers' salary is fixed cost in the budget, once hired, a manager rarely have to justify it every year. On the contrary, developers viewed as having little to do would have caused more problems for their manager!

    So for a manager, a developer's time is a free resource that happens to have a "use it or lose it" property.

    Now, give him a choice of (1) buying a piece of software for a given price, (2) use a comparable open source software with a license he do not understand so he can (2a) try to understand it himself and thus open himself to any future problems or (2b) send the license to legal dept and gets charged to his budget, or (3) tell his developer to re-implement the software themselves, no further expense claim or budgeting needed. Guess what a lazy manager will do?

    So when the manager chooses option (3), and the developers see months and months of unpaid overtime and endless bug fix headaches coming from re-inventing the wheel, they covertly downloads an open source library and plug it in, with a custom wrapper to hide their tracks. Is that a surprise?

    No amount of education will not cause a manager to take any amount of risk choosing open source instead of using a "free" resource to achieve the same thing (a resource that cannot be saved and use later in any case). The developer's time and effort is an externality in the manager's consideration.

    The only way you can bring the manager to use open source is to add the developer's time into the manager's accounting, either when developers are "pooled" and any effort spent will be charged to the manager's budget, or when the developers have other things to do so there is an opportunity cost to have them do other things.
  19. Re:if it breeds discontent, so be it. on Paying for Better Math and Science Teachers · · Score: 1

    We do have problems issuing grades, in fact. Some of us would prefer narrative evaluations, some prefer objective tests and a rating system (a, b, c, 100, 80, etc), some prefer subjective activities and a rating system. So what's the problem with rating teachers with similarly narrative evaluations? Such as "Joe is good at helping slower students catching up", "Mark is great to inspiring talented kids", etc.

    The rest of the your post is simply based on the (false and baseless) assumption that "paying based on merit" == "paying based on the student's final grades". How would you feel when you propose a simple experiments for your students that they automatically assumed the worst and keep complaining "it cannot be done"? That's what you are doing in your post.

    There are many ways to have paying based on merit. Merit could be based on many things more than just your students' final grades. For example, one measure is the improvements to the students' grade (which means getting a good class is not so great now, as there will be less room for improvement, while the bottom class have much more potential). Given a reasonable mix of measure, different teachers could excel in different aspects and yet still "measure-up" similarly. In any business that survives long, you will find "merit" being measured on multiple fronts like that.

    But the first problem is, you must start measuring first. By refusing to be measured, you are resisting any attempts to identify bad teachers, and in the end, make the whole profession less in the eyes of the society.
  20. Ask them to pay for it on Crazy Non-Compete Contracts? · · Score: 5, Insightful

    Add a clause in the agreement that said the company will pay your full salary for the duration of the non-compete agreement, or until you landed another job, whichever is earlier. Tell them that is also "a standard clause for non-compete agreements".

    If what you know is so important that the company will suffer if you work for a competitor, it makes sense for the company to pay you for it. That's fair.

  21. Re:if it breeds discontent, so be it. on Paying for Better Math and Science Teachers · · Score: 1
    You got the same problem with measuring "performance" in every other field of work, and yet many places still try their best to measure the performance of their staff and reward them accordingly.

    Teachers get rated based on how their students do on standardized tests, so they teach students to be good at the test, regardless of how relevant that information is outside of the test.

    If the test has little relevance to the problems kids will face later in life, then the problem is with the test, no a problem with teacher teaching students to do well in the test. Compare that with tests for professional certifications (accountants, lawyers, engineers, etc), if the test no longer correlates with the their professional needs, do you complain about law schools "only teaching their law students to pass the tests", or do you fix the test?

    This is even worse since the teachers get no choice in their students. How would you feel if your performance was based on your ability to get a bunch of goldfish to do math?

    How many workers get a chance to pick their customers? Do people in helpdesk get to pick callers? Do IT staff get to pick what technical problems they get to solve? Do in-house accountants get to pick which book they get to work on during year-end? Yeah, they do, they could just resign and find another job. Oh... guess what, a teacher can do the same.

    What's more, with such "problems" with rating the performance of teachers, the teachers have no problems rating the performance of their students! Gee, won't the same "problems" apply equally when they try to rate their students? It is "difficult to see the difference between someone who is really good at their job and someone who is good at gaming the system", yet teachers have no problem giving a grade to their students day in and day out.
  22. Re:Micotil on Objections Over Antibiotic Approved for Use in Cattle · · Score: 1

    thinking that it would have been far cheaper in the long term to simply change the set-up, but accountants said too much money.


    I remember reading a book about management that said you should never, ever let accountants decide the direction of your business, because accountants only see what is on the book (that's their job after all) and so they will miss anything not on the book, such as business opportunities and risks. Your case is an example of this situation.
  23. Re:Play by their rules, or else on Sony Blackballs Blog Over PS3 Rumor · · Score: 2, Insightful

    This isn't about rights, it's about relationships.


    Exactly.

    Trust and respect build relationships. Treating everyone as your adversary and see how much you can "score" against them will not make you friends, even though all you did was "legal" and "within your rights".

    For example, if you works in IT dept of a company, and one guy comes to you and ask you about a rumor of a potentially very disruptive new IT policy. Without confirming the rumor, you ask that guy "don't spread such rumor", and then that guy goes about spreading it anyway and caused you a bunch of headaches. Wouldn't you got pissed about it? Are you going to do that guy any special favor from now on?

    The only dumb part about this is Sony goes about it publicly. They should have just written off that guy internally and drop him off from all their invitation lists.
  24. What the law said does not matter to **AA on MPAA Fires Back at AACS Decryption Utility · · Score: 5, Insightful

    I have to wonder why so many post here still talks about how the DMCA do not apply, how the utility is legal, etc.

    Isn't it obvious by now that what DMCA and other laws really said never mattered to **AA? Lawsuits, DMCA notices, etc, are simply hammers to beat down any opposition so the **AA members can keep reaping profits with their outdated business models.

    As long as the hammers are useful, it will be used. Saying that the hammer is not made to hit people is not going to help. As long as DMCA notices can take down stuff they do not like, it will be used and abused. Saying that DMCA is not applicable here is not going to help.

    I don't know what should be done about these **AA tactics. However, I do know that telling a street thug that punching below the belt is unethical will be futile.

  25. 1.3^4 = 2.85, 1.4^4 = 3.84 on Is Switching Jobs Too Often a Bad Thing? · · Score: 1

    That means you are getting around 3x the amount your first job paid you. So unless you have been selling yourself very very cheaply (i.e. 1/2 to 1/3 market rate), you should have reached the higher end of the market pay for people with less than 2 years of experience, so you shouldn't be seeing anymore such offers for a couple years to come.

    So I would say go ahead. As long as the raise is large enough, it is easy to justify this to any future employer.