Slashdot Mirror


User: Darinbob

Darinbob's activity in the archive.

Stories
0
Comments
21,765
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 21,765

  1. Re:Arduino uses C++, Pi uses Linux on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    This is essentially what "Embedded C++" is, it gets rid of the bloat or features that tend to bloat and then relies on programmer discipline after that. So not strictly C++, but highly compatible with it (and even more so with older C++ standards).

    RTTI really is extra fluff that probaby never should have been added, in my opinion (and I used C++ before it was there). It's a high level language feature, and C++ really does hurt itself by trying to simultaneously be a high level language and a low level language.

  2. Re:Arduino uses C++, Pi uses Linux on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    The problem I found with templates is that extra instantiations are *not* thrown away. They may be 99% the same but it doens't know that without actually comparing the code, and if it does know they're the same it is hard to keep that 1% difference and throw away the rest. You really need a C++ oriented linker with hins from the compiler, as opposed to a general purpose linker using name mangling (ie, binutils).

    For instance, a template instantiated with "unsigned int" will result in slightly different code than one for "unsigned long".

    In the past I have written templates that are nothing more than type casting wrappers around a basic type Ie, an collection of "void*" but then a template that lets you have a collection of any pointer type while still being strongly type checked.

  3. Re:snarky: managed languages RulZ! on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    Occasionally for a laugh I will click on a web link to a Yahoo Answers or other such site that asks "How does a computer work?" Invariably it's something like "This is the cpu, it does the thinking" and then moves on to the monitor and keyboard. So simplified even a kindergartener would roll their eyes. And yet the same site when asked about an automobile will mention internal combustion, pistons, gears, etc. For some reason, it's considered normal to treat computers like they're magic.

  4. Re:snarky: managed languages RulZ! on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    While serving as a teaching assistant for a compiler class back in the 80's, I had one student who was ordinarily pretty bright ask me "why do we need to learn how to write a compiler, since we already have a compiler?"

  5. Re:They said the same about mobile on Is IoT a Reason To Learn C? (cio.com) · · Score: 1

    What do you think the higher level languages are written in, or the operating system on those phones? The high level stuff is for the frigging apps writers, not for the engineers building the device. The apps aren't written in C and the radio layer isn't written in Java.

  6. Re:Arduino uses C++, Pi uses Linux on Is IoT a Reason To Learn C? (cio.com) · · Score: 2

    I dunno. There is still significant overhead with C++, which is a big problem with small devices (128KB of code for example). There's the issue of the linker not really figuring out how to share object code for templates to avoid typical bloat. There's the hidden operations behind the scenes that cause problems for novice programmers running out of space or wandering why their code is so slow. There really is no good way to make exceptions both fast and use little code space (a shame since I like them if used properly).

    I do want to use a better-C-than-C. C with classes just for the sake of structuring code more coherently. C with better type checking rules. C where I can release a semaphore on any exit from a function. A stripped down C++ that more resembles Cfront without all the newer fluff.

  7. Re:snarky: managed languages RulZ! on Is IoT a Reason To Learn C? (cio.com) · · Score: 2

    There are a lot of people who say they know C who can't handle some of the simple stuff in C, as I have seen in many interviews.

    I started saying "I'm sorry that I will ask some very simple questions..." because I felt embarrassed asking someone with so much on-paper experience who is applying for a hands on development job to do such simple things. Then so many of them flub it. Now I'm wondering if my apologies that the question is "simple" actually ends up as an insult for someone who can't figure them out.

  8. Re:A damn good reason to learn security best pract on Is IoT a Reason To Learn C? (cio.com) · · Score: 4, Insightful

    Most buffer overflows weren't necessarily because of being sloppy in the original code, but because the code was copied so readily. Someone has a simple routine without all the necessary checks because it's not being used for anything very important, software that doesn't need to be secure, it's a one-off utility (maybe it converts postscript to PCL). Then someone copies that routine into another program, makes that a set-uid program, and poof you've got a security hole. First programmer says "it was not intended to be re-used", second programmer says "re-inventing the wheel is foolish!", and they blame each other.

  9. Re:A damn good reason to learn security best pract on Is IoT a Reason To Learn C? (cio.com) · · Score: 2

    Well, most systems use third party C compilers, gcc or keil or whatever. C is low level enough that the CPU doesn't have to know it's C anyway, it could be Fortran, Pascal, Ada, or whatever as long as it has a basic stack model. They're not supporting any language. Von Neuman isn't even required, there are many embedded systems that are Harvard architecture (separate regions for code and data) which C supports just fine.

  10. I'd just take the money and retire. Most startups FAIL. But there are other benefits too - being your own boss, actually working on stuff instead of endless meetings, and so forth.

  11. Sure, lots of people will gladly quit because of financial security. This is sometimes called "retirement". CEOs don't do this because CEOs are not necessarily normal human beings. A CEO might think that you can incentivize workers by giving out more money (or fake money in the form of stock options). But engineers are pragmatic people, and an extra 10% year end bonus will not necessarily convince them to stick with jobs that they hate doing. So retire, or get a less grueling job, or actually get a fun job, or a job with an easier commute, a job with fewer Google hipsters, a job working from home, a part-time job just to keep from going stir crazy, and so on.

    There ARE indeed CEOs that quit. Often founders of companies get bored of being the CEO because the CEO's job is not necessarily as interesting as being the one who comes up with good ideas and gets to implement them. Once a company gets more than a handful of people the CEO's job is raising money, shaking hands, giving speeches, looking at the financials, and so forth. I had a boss once who used to be the executive VP of the company but he hated doing that work so he went back to being a developer, even though the company was raking in huge profits and the execs were very highly compensated.

  12. Re:Stop complaining you crybabies! on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 1

    Yes, the candidates were not really "evil". It's a figure of speech. It means voting for the candidate that is the least imperfect.

  13. Re:Trump doesn't run borders on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 3, Interesting

    There are laws that the president cannot break. Treaties are laws. He would need congressional approval to break the treaties, including UN treaties. The president cannot increase the number of green card holders without congressional approval. Deportations require review by the courts, as constitutional due process applies to everyone in the US, legally or not. Opposite of that, the president also can't make all illegal immigrants legal by himself. Current immigration law forbids discrimination of immigrant visas on the basis of race, sex, or place of residence; though the president can impose stricter background checks ("extreme vetting"). Of course presidents have often overreached here.

    Congress has the plenary power to regulation naturalization in the constitution, and because the constitution does not mention immigration the supreme court has held that this clause gives congress plenary power to regulation immigration. Nowhere in the constitution is the president granted powers over naturalization or immigration, although the executive does enforce these laws and regulation with some latitude granted by congress.

    Unless you can point to the clause in the constitution that says otherwise, this is the job of congress. Which is one reason everyone was so angry at unilateral action taken by president Obama.

  14. Re:Stop complaining you crybabies! on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 2

    Re-elect? I wasn't talking about that. I was talking about being elected period.

    And if you're voting for the lesser of two evils, then how is it hypocrisy to complain that the lesser evil is still evil?

    Most people these days vote against one candidate by voting for the opponent. They're not usually thinking "I love every single thing this person says" when they cast the vote. For example, Dubya runs against Kerry; should the people who complained about some of the things Dubya gone and voted for Kerry even if they didn't like Kerry? Should the people complaining about Obama have gone and voted for Romney even if they don't like Romney? No. If you prefer candidate A over candidate B then you should vote for candidate A even if that candidate isn't perfect.

  15. Re:Trump doesn't run borders on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 4, Insightful

    They act as legislators only by clarifying laws that are brought before the court during a lawsuit. And yes, the laws are indeed vague many times. They are made vague because it's easier to get them passed that way.

    So for example, someone commits a crime, during the trial the defendant complains that evidence was seized illegally, or that he didn't know about certain rights; this gets brought before the courts to decide. The courts do not seek out these cases on their own. Then there's a conflict at the heart usually; the executive has some authority to do searches and obtain warrants, but the constitution forbids unreasonable searches, both sides have very good points. So the courts have to decide. Very often the conflict is between what current legislators think the meaning should be and what the current executive thinks the meaning should be. It's a tug of war, both sides want to enhance their own power while diminishing the power of the other side.

    Note that almost nothing gets to the supreme court without there being a real solid conflict at the core with complex legal issues involved (except maybe the bush v. gore case). This is because most cases trickle up through the court systems, there have been appeals already and usually a disagreement between different circuit courts. Many of these "activist judges running amok!" cases would have that accusation no matter which way they ruled.

    Citizen's United case is cited as an "activist court" decision, people hate that decision on the left and the right. Politicians love it though so it won't change anytime soon. However it was a real case brought all the way to the court with very good justification on both sides of the issue. Just because the decision was awful (and I think it was) does not mean the supreme court was being activist. Their job was to settle the dispute. And they decided that a group of people has the same rights as a single person, essentially, and that you could not restrict the free speech of a group of people even if that happens to be a corporation. People don't hate that decision because it violates the constitution or various laws, but because it violates how we want the law to be. The only way to fix that is with a constitutional amendment.

    Now if congress does not like how a court rules, then the congress already has the power to override this, if they can get a law passed to clarify rules and enough votes to overcome a veto. But it's easier to just bitch that the courts are out of control because it agrees with the executive branch on occasion. If they don't like the courts then they need to be more clear with the laws and make sure the laws don't conflict with each other or conflict with the constitution. Also, complaining about the courts is an easy way to get re-elected.

    There's a long history here too. Jefferson hated that Marshall did not allow the executive more power and accused that court of being "despotic", the same dispute that started to give the constitution actual weight instead of just a pretty piece of paper that could be ignored when politically convenient.

  16. Re:Stop complaining you crybabies! on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 4, Insightful

    So what? Being a hypocrite is within our rights. Of course you criticize who you vote for! We've done that in the US ever since the very first election; we do it at the presidential level and at the level of the local dog catcher. Even when a president gets a majority vote, in both electoral and popular vote, the president is still accountable to the people and the people are free to express their opinion on the matter.

  17. Re:Trump doesn't run borders on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 2

    The president can not make a ban based on religion, and yet that is what he claimed this was even though the wording in the order itself made it muddled. Thus, put it on hold until the lawsuits go through. This is not judicial activism, this is the courts doing what they are supposed to do - the president does not have the power to dismiss a lawsuit unilaterally and so the courts must get involved.

    So the original judge, appointed to Dubya, is a leftist hack? No one is getting killed over this. If we cared about safety we would have had the ban on Saudi Arabia and Pakistan as well. This is 100% about Trump keeping a poorly thought out campaign promise.

  18. Re:Stop complaining you crybabies! on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 5, Insightful

    Why shut up? One of the few benefits left in this country is that we are allowed to criticize our government. This is actual our moral and civic duty to bitch at the government, otherwise the power goes to their heads and they start turning authoritarian. Democracy is not just something that happens every 2 years after which we go home and put up with whatever bullshit the government spits out.

  19. Re:Factory reset before you get off the plane. on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 1

    Haha, when's the last time you went through the security check point at an airport?

  20. Re:Factory reset before you get off the plane. on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 4, Interesting

    Basically don't make any funny faces, give back any sass, or make eye contact while going through security or customs lines. The only joy in life these guys have is hassling people. It's a boring job, they're never going to get promoted and they know it, so they're going to take out their bullying instinct whenever they can. This is not government policy, these are individuals trying to prove that they have authority over you.

  21. More like undertrained and underpaid bottom rung employee decides to exert his authority.

  22. Re:Trump doesn't run borders on US-Born NASA Scientist Detained At The Border Until He Unlocked His Phone (theverge.com) · · Score: 0

    Have you actually read the constitution? Have you read and understood over 200 years of legal precedent regarding the abilities of the courts when asked to adjudicate a conflict over a law? There is legal precedent that the president does not have carte blanche over border rules. We do not have a dictatorship.

  23. Re: What brand of hammer? on GitHub Commits Reveal The Top 'Weekend Programming' Languages (medium.com) · · Score: 1

    Emacs Lisp is something you do on the weekend too. During the week you can't make the excuse that you're changing how your editor works so the project is on hold. Instead you fix up the editor to your liking when not at work.

  24. Re:A more basic question on Finland's Universal Basic Income Called 'Useless' By Trade Union Economist (bloomberg.com) · · Score: 1

    5% of the GDP is relatively small. Compare to the US GDP spent on the military, which is the largest jobs program in the world.

  25. Re:Lack of talent my ass!!! on CS Professor Argues Silicon Valley Is Exploiting Both H-1B Visas And Workers (huffingtonpost.com) · · Score: 1

    Sorry, some of these aren't very good, so knowledge transfer is useless without skills transfer too.