Slashdot Mirror


Is IoT a Reason To Learn C? (cio.com)

itwbennett writes: Whether or not beginning programmers should learn C is a question that has been roundly debated on Slashdot and elsewhere. The general consensus seems to be that learning it will make you a better programmer -- and it looks good on your resume. But now there might be another reason to learn C: the rapid growth of the internet of things (IoT) could cause a spike in demand for C skills, according to Gartner analyst Mark Driver. "For traditional workloads there is no need to be counting the bytes like there used to be. But when it comes to IoT applications there is that need once again..."

12 of 374 comments (clear)

  1. Until by denisbergeron · · Score: 1, Insightful

    Someone create a IOT language!

    --
    Ceci n'est pas une Signature !
    1. Re:Until by Anonymous Coward · · Score: 2, Insightful

      Ugh... Please don't give them any ideas. C is plenty fine for the task.

    2. Re:Until by Z00L00K · · Score: 3, Insightful

      If you really want something unmaintainable you should go for Simulink.

      On the other hand - I have never seen a good reason NOT to learn C. It's one of the basic building block languages that's widely used on almost every platform, so you won't waste your time if you learn C.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    3. Re:Until by Joce640k · · Score: 3, Insightful

      Complete bollocks.

      I use C++ on a day to day basis on Atmel chips. I've written ray tracers in C++ on chips with 4K Flash and 128 bytes of RAM using ordinary "float" data types.

      The entire "Arduino" ecosystem runs on C++, driving 3D printers, robots, etc. on tiny microcontrollers. How do you explain that Pesky Fact?

      Java, Python and VB.net don't have a snowball's chance in hell of running on one of those chips.

      (Most likely you've never even used C++, you're just repeating crap you once read on the Internet)

      --
      No sig today...
    4. Re:Until by Joce640k · · Score: 4, Insightful

      Right, but it's shitty for the programmer to manage it manually, isn't it?

      Not as shitty as having to guess when Java will close the file you just wrote (eg. so you can copy it to a USB stick).

      Resource management is much more than RAM, it's files, network connections, etc. Garbage collectors handle RAM OK but they're really really crap for everything else. In reality languages like Java need just as much manual resource management as C.

      The only language which really doesn't need manual work is C++. C++ has stack unwinding. C++ frees resources immediately when objects go out of scope, not when some garbage collector decides to wake up (which might be "never" - your file might _never_ close unless you quit the program).

      --
      No sig today...
  2. A damn good reason to learn security best practice by haruchai · · Score: 5, Insightful

    and I not sure learning C will help much with that.

    --
    Pain is merely failure leaving the body
  3. Re:A damn good reason to learn security best pract by Opportunist · · Score: 4, Insightful

    Real programmers? As compared to the untrue Scotsman?

    Look around you and see what doubles as "programmer" today. Ask them how a stack overflow happens and why that is a problem. If I get a buck from you every time you get a blank stare and you get ten from me every time you get a sensible answer, your house belongs to me before the week is out.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  4. JavaScript ... and maybe Python by rgbe · · Score: 1, Insightful

    Most mods will probably flag this as trolling. But I believe JavaScript is a great language for IoT. There are a few advantages of using JavaScript, it's actually very easy to get networking to work well and reliably. A programmer will be able to write front-end, server-side/less back-end and IoT back-end all in one language. The code will be portable across all these bases (not always needed, but some functions will be universal). There are now a proliferation of embedded devices that support JavaScript "natively" (ESP32, RedBear Duo, and many more). It might not be as fast as C, but it's fast enough. Here is a project I created using JavaScript at every level: https://www.hackster.io/anemoi...

    1. Re:JavaScript ... and maybe Python by LordWabbit2 · · Score: 4, Insightful

      Good god, just learn C instead of trying to force javascript into everything. It's like my wife trying to drive a nail into a wall with her high heel shoe. Sure, it would probably work eventually, but the right tool for the job is right there in the toolbox. Use it. Step outside your little javascript box and learn something new.

      --
      There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
  5. Simply because... by God+of+Lemmings · · Score: 3, Insightful

    knowing how to program in C and how C works under the hood makes you a better programmer. Even if you don't program in C. That is reason enough.

    --
    Non sequitur: Your facts are uncoordinated.
  6. Re:A damn good reason to learn security best pract by Darinbob · · 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.

  7. No. IoT is a fad. ... by Qbertino · · Score: 4, Insightful

    ... Embedded is a reason to learn C though. And embedded and IoT do have some intersection/overlap. But I IoT itself is mostly a fad involving the slapping together of unsafe preconfection microlinuxes with unsafe overkill websevers/port 80 stuff and adding that to toasters and stuff that really don't need it and won't be used more than ~3 times unless by some bored teenagers wgo wants to screw up your homes heating or AC by surfing on shodan for some lonb forgotten default access to said IoT trinkets.

    Bottom line:
    You shouldn't do anything because of IoT unless it,s avoiding it like the plague (unless you're a hacker that is). OTOH If you want to learn embedded, C with assembler for the basics is the way to go.

    Good luck.

    --
    We suffer more in our imagination than in reality. - Seneca