Slashdot Mirror


Simpler "Hello World" Demonstrated In C

An anonymous reader writes "Wondering where all that bloat comes from, causing even the classic 'Hello world' to weigh in at 11 KB? An MIT programmer decided to make a Linux C program so simple, she could explain every byte of the assembly. She found that gcc was including libc even when you don't ask for it. The blog shows how to compile a much simpler 'Hello world,' using no libraries at all. This takes me back to the days of programming bare-metal on DOS!"

1 of 582 comments (clear)

  1. Re:BTDT by BitZtream · · Score: 0, Flamebait

    Compiling code in your basement doesn't mean you know C.

    Googling random shit on the Internet and getting something to compile doesn't mean you know the language.

    Backing a car out of your drive doesn't mean you can actually drive.

    I'm sorry to burst the bubble you and most of the 'geeks' on the Internet seem to have, but you really don't have a clue if you didn't know this.

    This is something that comes up VERY FREAKING EARLY ON in the education process of learning to program. Given enough time you should be able to infer it on your own.

    My guess is that you think using visual studio wizards, cut and paste, and some primitive ability to cobble something together that compiles and runs makes you believe you know C. This is about the same as people who think because they can make a form in VB that they are programmers and can make production quality software.

    I realize that not knowing much about being a programmer you think that its acceptable to not know something like this because you are learning. The thing is, if you don't know this you really have not put any effort into understanding whats going on when you compile a program. The problem is, for those of us who know what we're doing, people like you who THINK you have a clue, but really have no understanding what so ever of whats going on are EXTREMELY frustrating to us. Your the kind of people that post on the dev mailing lists for something like libxml asking for example code for your specific situation by stating something like 'I'm trying to read xml from a file and manipulate it, can someone give me everything I need to do that ... as an example, but working for me!' to which if you get a response, will be one of two things 'learn to code' or 'read the docs'.

    You'll find doctors have the same sort of reaction when you tell them you've been playing doctor for yourself for years with things you saw on the Internet. Those of us with a clue tend to get annoyed by people with no clue who think because they've been doing it for years (most likely wrongly) they get to be treated like they have a clue.

    Make a statement that makes it clear you don't have a clue when you're hanging out with a bunch of people that DO have a clue tends to get you treated like someone who shouldn't be participating in the conversation.

    To programmers, the statement made here is roughly like this:

    Motivating a car using a gasoline engine or electric motor is a lot easier than pushing it with human.

    Thats the level of statement made here. If someone walked up to you and told you that, you'd say 'uhm ... no shit sherlock, if you didn't know that you don't need to drive a car'

    While that might be useful for a caveman to know, its not useful for anyone who should be driving a car, and anyone who does drive a car, that isn't aware of the facts of the statement shouldn't be driving a car.

    Don't tell us about how long you've been using GCC when you have absolutely no idea how it works, the length of time is irrelevant if you don't bother to educate yourself on how it works.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager