Slashdot Mirror


User: grimmjeeper

grimmjeeper's activity in the archive.

Stories
0
Comments
1,033
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,033

  1. Re:Equally stupid dogma on Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful" · · Score: 1

    Once again it depends. I've spent a large part of my life writing code for tiny little processors with limited memory. The general rule, especially for the military stuff, is that you are not allowed to run out of memory while executing. So either your binary image fits on your device after compilation or it doesn't. It must not fit, and then run out of memory days later during execution. The only way to ensure this in a formal manner is to have no malloc or equivalent calls.

    That's a pretty standard rule in any safety critical environment. You see this in civilian avionics, medical devices, etc. Dynamic allocation is nondeterministic so it's not safe. You pre-allocate everything you need and manage it with deterministic management functions with predictable error handling. Of course, one could argue that you can embed your malloc() in good error handling functions that deal with failure in a deterministic way and you're still safe. However, the dogmatic approach to malloc usually means you usually lose that argument.

  2. Re:#1 use for goto in c on Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful" · · Score: 1

    There is a good case for moving that nested loop into its own function. At that point, you put in a return instead of a goto. Though the number of arguments to the new subfunction may be an argument against doing it that way.

    Another thought would be putting the "rest of code" in its own function and calling that function inside the "if(condition4())". Again, it depends on local variables and how many would have to be set up as arguments.

    To be concise, however, I would merge the "if (endloop)" into your while conditionals. i.e. "while(!endloop && condition2())". That condenses the code a little without losing any readability.

  3. Re:Equally stupid dogma and MISRA on Empirical Study On How C Devs Use Goto In Practice Says "Not Harmful" · · Score: 1

    I had to write code that used MISRA standards and even had the standards worked into compiler to generate errors so you couldn't just ignore the stupid.

    It took me about 5 minutes reading through the MISRA standards to figure out that it was written by a committee of bureaucrats who don't actually know how to write software. Sure, there were some good things in the standard to improve readability and things like always using braces with every conditional so you can avoid problems like the Apple "goto fail" screw up. But several standards showed a complete lack of understanding about the definition of the C language. According to one of their rules, you couldn't test for a null pointer and then use the pointer in the same statement. The most notable example I can think of was the very common place ( && ) construct. Even though the && operator is a shortcut operator that absolutely checks the left hand side and kicks out if it is false (i.e. when the pointer is null), the brain trust at MISRA wouldn't let you do that. The language is defined to work correctly and you can't call yourself a C compiler if you break functionality like that. But no, MISRA standards won't let you do that because it "might" cause you to dereference a null pointer. It's a perfect example of good ideas being taken way too far and then turned into rigid dogma run amok.

    Coding standards are good. Encouraging (but not requiring) people to not use GOTO unless they really have to is a "good thing". When you can't use C++ but you've designed your system to mimic destructor behavior and "exception" like error handling (i.e. to mimic RAII behavior), there are times when it's hard to do it any other way. The C language just doesn't give you the tools you need to implement OOD any other way.

    I've been programming for over 35 years now and I remember the disgusting mess that you found yourself in with GOTOs sending yourself all over hell and gone. So I understand what Dijkstra was warning us against. And he has a point. You don't want to use GOTO as your only form of flow control. It quickly devolves into an unreadable mess. But pretty much every language these days has conditionals and loops to keep programs well organized and everyone knows how to use them properly. The GOTO is left to times when it's really necessary, as it should be. Because sometimes it really is necessary.

  4. Re:TL;DR on Elementary OS: Why We Make You Type "$0" · · Score: 1

    You say that as if more than 5% of /. readers actually read TFA. Silly AC...

  5. Re:energy balance doesn't work out on Converting Sunlight Into Liquid Fuel With a Bionic Leaf · · Score: 1

    What does gasoline have to do with the isopropanol they are creating here?

  6. Re:to be honest, we dont have farms anymore. on Farmers Struggling With High-Tech Farm Equipment · · Score: 4, Interesting

    That model has been changing over the last several decades. Both of my parents grew up in rural America in the 40's and 50's. Back then, a family could make a decent living on a quarter section (i.e. 160 acres). As my grandparents' generation started to retire in the 60's and 70's, consolidation had already started. Those four farms on a square mile plot turned into one farm with 3 retired families living in the houses. And consolidation continues. It's getting to the point where "family farms" should be measured in terms of square miles rather than acres. There's just no way to sustain a family on a small plot of land. The "family farms" are increasingly turning into small corporations with many employees managing huge tracts of land. They have to. Without being able to take advantage of economies of scale there's no way to make it.

    They're not losing the tie between land and family. The families that are there are still tied to the land. But the farms are losing families as farms consolidate. Only one of my cousins stayed in farming but all 3 of her kids left as soon as they graduated. And my extended family is pretty typical among modern families. A few of the kids stay on the farm but by in large most of them leave for more promising careers. The few that stay behind are taking over increasingly large farms.

    Last year, my 99 year old grandmother passed away and we went back to her home town in central North Dakota for the funeral. I grew up visiting there all the time so I had many fond memories of the town. I was shocked at how much of a shell of a town it had become. Most of the houses are now abandoned. Of the ones that aren't, most of them are owned by people who use them as hunting cabins a few weeks out of the year. My grandfather's garage where he worked on farm equipment for 63 years stands idle. Not enough business to make it worth keeping open. The K-12 school house on top of the hill once accommodated 50+ kids in my father's day. Now it stands empty. The few kids left go to a neighboring town that houses the consolidated school district. Driving towards town, many of the farm houses and barns I remember have long since been torn down to get access to farm the land underneath them. A few of them remain, with added shops and grain bins to handle the load of running more acres from a central location. The only reason this town is still alive is that the patriarch of a large family farm uses it as his home base. He was a class mate of my father's and has lived there his whole life. He's partially retired now but he built his family farm to cover some thousands of acres. It was the only way to survive. One of the neighboring towns is entirely abandoned. And if it hasn't been bulldozed and turned into more acreage, it's only because no one has gotten through the miles of red tape to get access to the land.

    My point here is that while you're correct that families are still owning and operating farms, the nature of the farms they own and operate is changing. Consolidation is happening. Families are leaving. Population density is decreasing because fewer people are needed to run the farms. And families are increasingly turning to incorporation in order to survive. Sure, they will always feel a kinship with the land. But the quaint notion of the "family farm" is in the distant past. And sure, the family farms aren't just subsidiaries of the corporate ag producers. However, they are corporations in their own right and operate on a scale that would have been unthinkable 100 years ago.

  7. Re:Bound to happen on Google, Amazon, Microsoft Reportedly Paid AdBlock Plus To Unblock · · Score: 1

    I don't know the percentages but I do know that the cable TV and satellite companies kick some of their subscriber fees to the networks they rebroadcast. So ads only partially pay for television. The rest is subscriber fees.

  8. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    The difference is that there are viable minority parties in the UK. That's not the case in the US. The two party system is so heavily entrenched here it would really take a miracle to break through. The propaganda in this country has everyone convinced that they need to make sure the "other party" doesn't take power and has people utterly convinced that they only have two choices.

    The only thing that's going to break that is a fundamental changing of the average mind. And breaking through the deluge of propaganda being spewed by the "news" networks is a herculean task, considering how well financed they are.

  9. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    You'd have to do the impossible.

    You'd have to get the average American to give a shit about something more significant than the latest reality TV show. You'd also have to get them to discard their willful ignorance on the issues and care about more than their own selfish self interest.

    So yeah, I don't see it happening.

  10. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    I didn't say that they were bought out by the same corporations. It may be true that in some cases some corporations do contribute equally to both parties. However, there are many cases where one industry favors one party over the other. But that doesn't change the fact that the two parties pander to the corporations who fund their campaigns while they ignore the wishes of the electorate.

  11. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    So you're suggesting that I need to vote for them in order to break their choke hold on power?

    Wow. Just.... wow.

  12. Yeah, I thought about that right after I posted. That's a very good addition.

  13. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    Distraction is a tool used by both parties. Whatever is wrong, blame it on the other party. Way too many people fall for that schtick.

  14. Only one correction. Regulators aren't too scared to act. They're paid off not to react. Hell, some of the regulators are/were employees of the companies being regulated. If that's not a conflict of interest, nothing is.

  15. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 1

    I do what I can. I spread the gospel. I never vote for either of the two parties.

    What do you do to effect change?

  16. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 3, Insightful

    I fully believe that this did (or at least could) happen in modern America.

    But sadly, the right doesn't have a monopoly on this kind of loony behavior. They tend to be more vocal and rabid right now but the left has it's share of BS flowing from their talking heads. Though to be fair, right now the only thing the left has to do to rally the troops is to point out how crazy the right is right now. There's plenty of material to work with.

    What I wouldn't give for a quality centrist party that's willing to compromise and work out policy that meets somewhere in the middle rather than having notthing but weird fringe parties who are way off to the edge in one extreme or another.

  17. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 5, Insightful

    There are two parties. Plus a few fringe groups that have no power and no way to leverage themselves into political power. You're kidding yourself if you think you can break through the corporate/media/political duopoly/oligarchy that is in power. All they have to do is keep the unwashed masses foaming at the mouth over social issues and they won't notice that they're being completely screwed over by the system. Hell, most people couldn't name their local representatives. Forget them doing enough research to see how their representatives actually vote on their behalf. The only thing the average person cares about is what their representatives tell them during the very well financed campaign. Just take a side (for or against) on gun control, abortion, and gay marriage and your constituency will either line up for you or against you (depending on the district). The average voter doesn't have any time to pay attention to 3rd parties (who are usually extremeists or way out past the outfield bleachers anyway). They care more about making sure the "wrong" candidate doesn't get elected by voting for the "lesser of two evils", not realizing that they're voting for someone who doesn't give two shits about them.

  18. Re:What are the practical results of this? on FCC Officially Approves Change In the Definition of Broadband · · Score: 4, Insightful

    What are you going to accomplish? Both parties in this country are bought and paid for by corporate interests so there's no way to change the status quo until that duopoly is broken up. And good luck getting Joe Sixpack to think beyond the bumper sticker slogans provided to him by the talking heads in the media (who are in the same pockets as the politicians).

  19. Re:Can they do it with corporate code? on Anonymous No More: Your Coding Style Can Give You Away · · Score: 1

    RC doesn't pay me at all. I haven't worked there for over 15 years now.

  20. Re:Demonstrates the need... on Anonymous No More: Your Coding Style Can Give You Away · · Score: 1

    This is why people need to follow style guides, so that all source code is styled the same.

    Why does all code need to be styled the same?

    I can see a need in a safety critical environment like avionics or medical devices that needs strict adherence to rules to ensure that the code has been written correctly and with as few bugs as possible. But what difference does it make outside of that kind of environment? I mean, so what if there's a thousand different coding standards in the Chrome source? What difference does it really make?

  21. Re:Can they do it with corporate code? on Anonymous No More: Your Coding Style Can Give You Away · · Score: 4, Informative

    You obviously haven't had to work in an environment where code has to be certified. I can tell you from first hand experience that coding in an RTCA DO-178B environment or similar has some pretty strict adherence to some very pedantic and strict coding requirements. You'll find this type of development in avionics systems (both civilian and military) as well as other industries like medical electronics where code safety is literally life-and-death.

    Outside of that type of environment, I do agree with you. You'd be lucky if even half of the developers have seen a company coding standard. You'd be hard pressed to find any developers who really adhere to it even when they know the document exists. But in those small niche markets, you'd be surprised at how strictly they adhere to arbitrary coding standards (whether they really impact code quality or safety or not).

  22. Re:Adobe on YouTube Ditches Flash For HTML5 Video By Default · · Score: 1

    And Adobe will become a distant memory. A company that was once on top but failed to keep innovating and fell into irrelevance along with RIM, Compaq, DEC, and the rest...

  23. Re:Adobe on YouTube Ditches Flash For HTML5 Video By Default · · Score: 0

    You took the words right out of my mouth.

  24. Re:Finaly. on YouTube Ditches Flash For HTML5 Video By Default · · Score: 0

    Fine. I suppose the ADD kids hyped up on energy drinks need their stimulation.

    Still, there's no reason you can't do stuff like that on better, more secure platforms.

  25. Re:Finaly. on YouTube Ditches Flash For HTML5 Video By Default · · Score: 0

    Why do websites need to have all sorts of annoying animations on them?