Get better at C or at Python - Page 1
Forum section: electronics / general

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 07, 2012, 07:03:11 am
content: Im a Comp Eng student, and i have about 2 month of vacation, but i really got nothing to do.. I know C better than python, just wonder if in this 2 months, what you guys recommend i should get better at C or at python?Note: those are the only two languages i know so im open to other recommendations.

author: Psi
author_rank: Super Contributor
timestamp: July 07, 2012, 07:12:02 am
content: C is more useful for business/jobpython is more funI say python, then you can put both on your CV as languages you know well.And its your vacation, so fun programming is relaxing

author: Bored@Work
author_rank: Super Contributor
timestamp: July 07, 2012, 07:34:18 am
content: Learn a third language.

author: tnt
author_rank: Regular Contributor
timestamp: July 07, 2012, 07:36:53 am
content: Learn how to write python module in C if not already done.This way you can have the higer level logic of your project in python but when you need fasts or low level stuff in C, you can still integrate them.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 07, 2012, 12:36:20 pm
content: I agree with B@W. Unless you have a specific reason to become an expert in a specific language you are better off learning about different languages and techniques. Eventually you don't think of learning a new language as a task by itself, you just pick up whatever language is required. There are plenty of languages to choose from, and it doesn't have to be something you ever expect to be useful: the key is to gain new perspectives that will help you in whatever programming language you actually have to use in the future.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 07, 2012, 05:14:19 pm
content: 3rd language? Like???I was thinking c++ or java but not sure if it's worth it

author: ejeffrey
author_rank: Super Contributor
timestamp: July 07, 2012, 05:47:05 pm
content: C++ or Java are fine, but make sure you learn to program them idiomatically, don't just program in C with a bit of extra syntax.

author: IanB
author_rank: Super Contributor
timestamp: July 07, 2012, 05:57:32 pm
content: I don't think you should try to "learn a programming language", but rather you should try to "learn how to program".Many people can speak English, but few can write good literature (novels, short stories, magazine articles, blog articles, technical manuals, whatever).Similarly, knowing one or more programming languages is scarcely the point. If you know one language, that's enough to get started. Now learn how to write good programs. Choose a project and work on it (like, maybe, learn how to create something like the Spice circuit simulator?).Design your project so that it is nicely separated into functional parts. Make sure that each part and each unit has tests so you can verify their correct operation before you assemble them into larger pieces. Investigate programming methods like test driven development. Try to arrange your project so you can start out with bare bones functionality and add to it as you go without needing to redesign the whole thing to add a new feature. Learn about interfaces and abstraction and separation of concerns. Learn how to manage dependencies so you can swap out one component for another that uses the same interface.Given the above thoughts, I suspect you will find Python a better tool to work with than C. It will let you focus more clearly on the functional requirements of your program and less on the laborious details.

author: PedroDiogo
author_rank: Regular Contributor
timestamp: July 07, 2012, 07:55:54 pm
content: I agree with Bored@Work, but I have a suggestion. You should probably learn something different like a Functional Programming language. Something like Haskell, Clojure or Scala can really boost your CV and can differentiate you from other applicants and most importantly will teach you a different way to program.Or you could learn node.js which should be a bit easier.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 07, 2012, 08:19:28 pm
content: Quote from: PedroDiogo on July 07, 2012, 07:55:54 pmCV??I never heard of those languages... what are they used for?

author: IanB
author_rank: Super Contributor
timestamp: July 07, 2012, 08:23:51 pm
content: Quote from: SuperMiguel on July 07, 2012, 08:19:28 pmCV = curriculum vitæ = "the story of my life" = résuméCV is more common outside America.

author: IanB
author_rank: Super Contributor
timestamp: July 07, 2012, 08:29:59 pm
content: Quote from: SuperMiguel on July 07, 2012, 08:19:28 pmThey are specialist languages used by a very small number of people in particular domains, such as the financial and banking industries. Places where people can afford to go off the beaten track and do things differently. They are very intellectual languages that are quite hard to use unless you have a capable mind. They can be fun to play with and can be productive if you are able to master them, but they will bite back if you are not up to the challenge.

author: _Sin
author_rank: Regular Contributor
timestamp: July 07, 2012, 08:44:23 pm
content: I agree with pretty much everything IanB said a few posts up. Learn to program, don't worry so much about languages. With the caveat that I don't think it matters whether you go with Python or C.I'd caution about sticking stuff you've spent a couple of months playing with on a CV as if you're fluent in it. Nothing wrong with mentioning you've dabbled in something, but making out like you're an expert could go very wrong in an interview.Plus I personally *hate* reading CVs which are just a lot of bullet-pointed lists of 'things'. Tells me nothing about the candidate other than that they've heard of a bunch of stuff.As for functional languages - they have a reputation for being a bit 'academic', but they're becoming a bit more popular/relevant as things shift towards heavy parallelism. Functional languages lend themselves a bit more to that.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 07, 2012, 08:56:29 pm
content: Quote from: IanB on July 07, 2012, 08:29:59 pmThat is why learning them is useful even if you never use them for anything productive. If a programming language doesn't change the way you think about programming learning it is a waste of time. That said, popular "business" languages like C#, C++, and Java also have plenty to teach you even if they aren't as exotic and fun as haskell or assembly.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 07, 2012, 08:58:31 pm
content: uhm... go on vacation and have fun?Go to the jungles of Brazil... you'll be able to 'C' the pythons.take it from someone who was like you, always working , studying, no fun.... enjoy your life while you're still young !but if you still want to study, then increase your breadth of knowledge like Bored@Work and others have said. Learn a new language.I suggest Haskell or Erlang. I prefer Erlang myself, as it has built-in concurrency, but Haskell has recently got concurrency extensions too, so that point is moot now. There are efforts underway to use these for programming embedded platforms too, and this is where I would like to see them making inroads. Forget C on the embedded devices, we should use a language that actually helps you write good, useable code.Both of these languages are both used extensively in the real world, mostly in the financial sector and anywhere that benefits from thousands of real-time concurrently communicating processes (i.e. data networks, telecoms). Having these on your resume will certainly help you stand out from the rest of the graduates.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 07, 2012, 10:01:56 pm
content: as a broke ass student cant even afford to out sometimes... So instead of stay home crying ill try to get my gf pay if she is broke ill stay home studying or something

author: hlavac
author_rank: Frequent Contributor
timestamp: July 07, 2012, 10:04:44 pm
content: Go with C. Python is a fad that will be gone in a few years.

author: Jad.z
author_rank: Regular Contributor
timestamp: July 07, 2012, 10:18:23 pm
content: Quote from: hlavac on July 07, 2012, 10:04:44 pmTwo words: Completely Disagree.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 07, 2012, 10:21:31 pm
content: Quote from: codeboy2k on July 07, 2012, 08:58:31 pmMost embedded devices use C, why would i forget it?

author: Unknown
author_rank: Unknown
timestamp: July 07, 2012, 10:25:55 pm
content: I agree that the focus should be on learning other paradigms, not just cramming the syntax of another language in your head. A completely different language like Haskell, ML or LISP will teach you much more than learning another procedural language. These ideas will make you a better programmer, regardless of the language.

author: McMonster
author_rank: Frequent Contributor
timestamp: July 08, 2012, 12:21:39 am
content: I'll just repeat what some people said. Learn programming, not programming language. You would be surprised how many different languages share the same common concepts. I don't think you really need a multiparadigm or some odd language to do that, but they help to understand this. Anyone really interested in how this works should try OCaml and stay away from frankenstein languages like Oz. I was programming in more strange languages than I can remember, I would completely fail if I were trying to actually learn each language.And I also disagree, Python will not die in the forseeable future.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 08, 2012, 01:07:58 am
content: Quote from: McMonster on July 08, 2012, 12:21:39 amHow does one learn programming? not learning the language?

author: Psi
author_rank: Super Contributor
timestamp: July 08, 2012, 04:43:00 am
content: Quote from: SuperMiguel on July 08, 2012, 01:07:58 amWhat he means is learn how to code correctly, which is language independent.Learn how to write code that is modular, readable and easy to debug/upgrade in the future.The language is really just the syntax of how to declare variables, write conditions, loops, function etc..Give a good programmer a A3 sheet showing all the syntax for a new language and they can usual start coding in the new language right away. Obviously they are quite slow at first because they have to keep looking at the sheet to see how to express something in code, but they can write code just fine.That's because coding is about breaking a problem down into logical steps, and the steps are the same in pretty much all languages, they just have different syntax.There are of course a few exceptions, where commands used in one language don't exist in the other, but they are easy to get around by just coding the step in a different way. Also the approach languages take to solving problems can be a little different but it usually doesn't take long to "get" a new language.

author: MikeK
author_rank: Super Contributor
timestamp: July 08, 2012, 04:49:52 am
content: Quote from: hlavac on July 07, 2012, 10:04:44 pmGoogle has a big hardon for it, so it's doubtful.

author: free_electron
author_rank: Super Contributor
timestamp: July 08, 2012, 05:02:20 am
content: Quote from: MikeK on July 08, 2012, 04:49:52 amExcept google uses their own version of python , without giving back to the community and they crosscompile it ti 'C' to jank it through an ANSI c compiler that spits out machine language....In my opinion Python is a big steaming turd of a language, Before you start flaming let me explain why :I look at it from the perspective as writing embedded code on microcontroller , or things like test and measurement automation.1) They broke it between 2.xx and 3.0 to the point you had to rewrite a bunch of code to keep going forward. This is unacceptable for any language ..2) Any modern language that still needs to rely on ; to find the end of a line is not worth it. ; are a relic from the PDP-era. there is a <CR> char there placed by the editor. use that one.if a line needs continuation then use a deliberate charactor to tell the compiler the line goes on. Not the other way around. lines are short anyway3) what is this boneheaded idea of using TAB and indentation to define subroutines. One misplaced space or tab character and the code does not execute as you think it does. Email a chunk of code or send it through another editor and it becomes a mess.4) no enumerated lists ( constants )5) if something doesn't exist the runtime creates an empty object instead of throwing a fit. This makes debugging code very hard. One typo and you are screwed.I really tried using python but i gave up after a few months. Too many problems. Like not having true constants. you need to kludge around with a lot of typing to make a class and then create hidden functions to return ... too much work too cumbersome.Now, python does have its place and that is for any kind of web programming. But for usage as an ambedded programming language ? or general purpose language ? No . Thanks. Too awkward , too much trouble. And who knows what will be broken in Python 4.0 ....

author: Bored@Work
author_rank: Super Contributor
timestamp: July 08, 2012, 05:27:23 am
content: If you really want to vomit look under the hood of Python. The way the Python libs are implemented in Python makes you throwing up. Python has the strange tendency to attract incompetent programmers. Not only for applications (when was the last time you saw a large Python application not writing a bunch of error messages to the console when started? Right, looking at console messages is for old people ...). But the language implementers don't seem to be the sharpest knives in the drawer.Will Python go away? I fear not. To many idiots out there clinging to it as it is the second coming. And to many code is written in it right now that needs to be maintained for a long time.

author: Psi
author_rank: Super Contributor
timestamp: July 08, 2012, 06:31:39 am
content: Quote from: free_electron on July 08, 2012, 05:02:20 amaww, that's one of its awesome features.I really like it, it just feels like the way everything should work.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 08, 2012, 08:30:22 am
content: Quote from: free_electron on July 08, 2012, 05:02:20 amWhat do you use as general purpose language?

author: paf
author_rank: Regular Contributor
timestamp: July 08, 2012, 08:52:41 am
content: The standard line is: "If a programming language doesn't affect the way you think, then it is not worth learning."Some "weird" suggestions:1) Erlang - someone already mentioned it. You compile for one processor, but after if you have 16 processors, your program takes advantage of it.http://learnyousomeerlang.com/2) TCLIt is a very old scripting language, but Tk ( used in Perl and in Python ) for graphics is the original graphics toolkit of Tcl.It is cross platform, and all the big name Electronic CAD/CAE software packages use it as a scripting language.Will you use FPGAs? The software from Xilinx, Altera, Aldec, Lattice can be automated using TCL.Will you work with software from Cadence, Synopsys, Synplicity, Mentor Graphics, Magma ?Some of them have been bought by others, and may be badly spelled, but all use TCL...http://www.tcl.tk/3) ForthA strange very small language, made by old grumpy guys, in the 70s.It is completely different from everything you know, but it can run on very small targets (for instance on an Arduino).At least read this book (one of the best programming books for any language):http://thinking-forth.sourceforge.net/You have also online the book Starting Forth :http://www.forth.com/starting-forth/And Amforth ( forth for Arduino or other AVR boards) can be found at:http://amforth.sourceforge.net/My best regardspaf

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: July 08, 2012, 10:14:08 am
content: QuoteFairly accurate view of Python.Agree with all your points too except maybe 1.I did one embedded project on Python, and it actually did work, but there was a large amount of wasted time due to typos and miss aligned loops discovered at run time.What annoyed me the most was dealing with a weakly typed piece of crap and thinking about that web pagehttp://www.python.org/dev/peps/pep-0020/and the hype that goes along with this language.It's like a fashionable version of vbscript, albeit with more useful libraries.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 08, 2012, 11:29:17 am
content: Quote from: free_electron on July 08, 2012, 05:02:20 amUh, python doesn't require ; to end lines. Not sure where you got that idea. The only thing similar is the ':' that signifies the opening of a block.Quote from: PsiThe indent based blocking works OK if you are working in a decent editor, but it causes all sorts of problems in more chaotic environments. Cut-and-pasting code from web sites, emails, or code inlined in other documents often leads to trouble when those other forms of communication don't respect Python's obsession with whitespace.I understand the motivation for requiring the whitespace to match the indentation -- it does prevent some class of error. The real solution is quite simple. Add an end keyword to designate closing a block, but have the parser reject any code where the whitespace doesn't match the syntax. That way, if the whitespace is corrupted or you mistake a dangling else, you force the programmer to fix the mess.

author: free_electron
author_rank: Super Contributor
timestamp: July 08, 2012, 03:13:55 pm
content: Quote from: SuperMiguel on July 08, 2012, 08:30:22 amIt depends..Note that what i a, saying here may not apply to everyone. I have different goals.Microcontrollers (arm/8051/pic/avr)Either C or assembly PL/M which is optimized and profiled the snot out of it for real work.Or Swordfish basic on Pic, Bascom on , mikroe basic on pic,avr,arm for quick and dirty minimal effort.If i'm on pc ?I don't do full blown applications. Programs for me are something that drive test instruments, collect data and plunk output in excel. They are there to save me time, make life easy make me lazy.Either vba in excel. So all i need to do is open spreadsheet and launch the macro i wrote.Or, for larger setups. Vb express. It's free , any 6 year old can program in it, any non-programmer who can read english can understand it and it has an excellent ide. The autocomplete and intellisense is superb.There is nothing more frustrating than a programming langue with an editor that comes to tell you : you forgot a closing quote here .. Well , since you know exactly where i forgot it .. WHY DONT YOU PUT IT THERE . STUPID PIECE OF COMPILER ! I hate that. Vb saves me from that. Forget to close a string ? It gets closed. Forget a ) in an equation , it tells you or closes it for you. I am a bad and sloppy typist. Never learned typing properly. I got my nose on a board with 50 cables , 10 instruments and a piece of silicon that doesn't behave... I am trying to coax some data out of it. The last thing i need is a smug smartass programming language that tells me i forgot a semicolon . I don't want semicolons, i don't need em . Use the cr character that was placed there when i hit enter at the end of the line. And if the compiler keeps whining about its colon it will be given an enema. Forcefully , by overwriting all the sectors it was installed on. Flush !Plus vb has an interactive environment. I can put the program in break ,minvoke any function or routine from the immediate window , examine or change the content of variables or objects. And in debug i can add lines of code, remove lines of code, change the excution pointer without having to stop and recompile. This is extremely practical. Lets say you have a sequence that sets up the chip and takes 10 minutes to run. And then something happens. I. Break and can interactively test things out. With a traditional compiler this doesn't work.. Its stop, alter code, rerun... And wait another 10 minutes to hit that point of investigation.. Some are better because you can examine data with watchpoints and you can singlestep. But none let's you add code , and try things on the fly. You always need a recompile/restart . Which costs you another 10 minutes....That is why i tried python for a while .. But it kept interfering with its tab obession and other annoyances... So i threw it back out.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: July 08, 2012, 11:30:24 pm
content: QuoteI missread that, I love my semicolons for end statement.Python and VB.net should get some.Much better for cutting and pasting from the web, much better for long lines of long named parameters, better for long string formatting, including SQL queries.And cutting and pasting from the web is fine, it's called reusable code.Code Complete is a good book on high level programminghttp://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670I think Visual Studio is a great tool and a great place to start. There is hardly any difference between C# and VB.net.Python is actually ok on low resouce processors, but finding typos at runtime is very frustrating.Avoid ObjectiveC and Xcode if possible, what a crock of shit.If you want a challenge tryhttp://en.wikipedia.org/wiki/Brainfuck

author: free_electron
author_rank: Super Contributor
timestamp: July 08, 2012, 11:31:54 pm
content: Ook ? Ook !

author: codeboy2k
author_rank: Super Contributor
timestamp: July 08, 2012, 11:44:12 pm
content: I really do like python for whipping something up really quick. I've been writing shell scripts and later bash scripts since the early 80's. I'm one of the few awk and sed experts left on the planetToday, I've moved away from shell scripting for most things more complicated then a few lines of script, as I can usually do what I want to do faster and better in python.But Guido truly blew it when he made white space significant. That's just wrong.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: July 08, 2012, 11:52:09 pm
content: Ook! Ook.Have a bananna,That's awesome, especially when you read it out loud.

author: codeboy2k
author_rank: Super Contributor
timestamp: July 09, 2012, 01:17:33 am
content: Ha! I'd heard of Brainfuck before, never heard about Ook! until today.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 09, 2012, 01:41:33 am
content: Quote from: codeboy2k on July 09, 2012, 01:17:33 ampicture hangers =)http://www.ooks.com/

author: free_electron
author_rank: Super Contributor
timestamp: July 09, 2012, 01:41:55 am
content: Ook! runs perfectly on Hex. But beware , you may need the assistance of the Librarian to check over you code unless you want to get messages like this :+++Error At Address: 14, Treacle Mine Road, Ankh-Morpork++++++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++Hex. Anthill inside (tm)

author: PeteInTexas
author_rank: Frequent Contributor
timestamp: July 09, 2012, 03:43:19 am
content: Quote from: SuperMiguel on July 07, 2012, 07:03:11 amAssembly. Higher level languages are intended for you to forget about the machine being programmed. Which is a shame and a waste for a Comp Eng student, IMHO.

author: krenzo
author_rank: Regular Contributor
timestamp: July 09, 2012, 04:10:51 am
content: Quote from: PeteInTexas on July 09, 2012, 03:43:19 amI second this. If you don't know assembly, then you don't really know what is going on under the hood, and that's something you need to know, especially if you ever have to do any multithreading. I also suggest learning VHDL or verilog for programming FPGAs.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 09, 2012, 04:14:24 am
content: Your question is not really answerable as stated. You probably won't just "learn" a language. Learning "another language" is meaningless, unless you are picking up a whole new way of thinking as part of the process. Otherwise, you're just learning syntax.If you really want to learn something, pick a challenging project. Something with a challenging software architecture. Something you care about, and are willing to beat your brains out to complete. Perhaps find an internship or a lab at your university working on something interesting, and take on a project. The point will be not to do something someone you are supposed to do, but to bring your own idea in, or find one that mesmerizes you.And then, instead of focusing on using whatever language in the most rudimentary way needed to brute-force your problem into submission, find the language best matched to the problem. I would guess that between C and Python, you may cover 90% of the stuff out there. Whatever language you pick, try to figure out what secret powers that language confers on you in order to make this particular code understandable, concise, and efficient.Say--for the sake of exposition-- that you plan to work on a project for which C is a good mapping. If you know any C, you probably know all of C. It's a pretty simple language. However, that is a far cry from mastering C. That involves the trick of writing clear, easy to understand code that is robust to memory leaks, bad function parameters, unexpected conditions, and random perturbations, and produces clean assembly. It involves knowing when you can use what optimizations and when you can't, or knowing how to figure it out on the fly. And, for embedded systems, it requires knowing the assembly for the target processor, and how the C maps to the call structure, stack structure, registers, and peripherals. By the way, I don't think any assembler would count as a language--It's a code, and you will need to know it for any embedded processor you compile to.You could start by looking at a good coding standard. MISRA C 2004 (or C++ 2008) is with the $20 or so for the PDF. Look it over. It's not gospel--there's plenty in there that's debatable, but the reasoning is all spelled out, and much of it is interesting food for thought. Copy it and write your own coding standard, and then modify it as your career progresses. Write one for every language you use more than casually.A coding standard, BTW is not a style standard. For C, you want to have one of those as well. Browse the net and see what you like, and write up your own. Refine it for the rest of your career. Do that for any language you use more than casually.Learn what it feels like to code to a standard. It will change the way you look at your own code, and anyone else's code.If you don't already do so, pick a version control system (like GIT) and get used to using it for all but throwaway code. Get used to what it feels like to work with a version control system inside your development environment (IDE, Emacs, etc.) and outside (command line). Then learn what it feels like when you don't have it set up.Since you're asking this question in the first place, I'm guessing you'll be around computers a lot in the future, and will need a decent tool language to accomplish tasks from routine scripting crud to durable utilities. Although this forum is skewed towards embedded, the whole software world is not embedded or web programming (only the vast majority of it is.) Pick a general purpose tool, and start using it for all your utility tasks, scripting, etc. You will eventually get pretty good at using it. If you pick one tool and learn it well, you will be able to do almost anything with it quickly.As far as general purpose utility languages go, Python is about as good as any, despite some knocking it has received in this thread. It's a good, powerful, rich language, neat, easy to read, concise, with a wealth of utilities. It has a great facilities for numerical / scientific coding and more. If you use Python, learn how to set up your editor and environment to handle the indentation, etc. for you, let you move easily between your file under development and interactive environment, etc.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 09, 2012, 04:23:09 am
content: Quote from: PeteInTexas on July 09, 2012, 03:43:19 amI looked into assembly i actually tried it few days ago(68k), was able to add few numbers, do some loops and some compares.. But thats about it... Tough it wasnt really worth learning.. Is assembly even used any more? if it is where?btw: that Code Complete 2 book looks interesting

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 09, 2012, 04:43:18 am
content: Quote from: dfnr2 on July 09, 2012, 04:14:24 amThanks, i know what you guys are saying by learn how to program not the syntax.. I agree 100%, C is very small, i know most of it, but most of the time when i look at some one else code i have no idea whats going on, Im at the point in C, where i can make simple games using what i think could be the most complicated things in C (like pointers, structs, anda linked list), but i dont know how to keep going forward, seems like im stuck making simple blackjack/tic tac toe games, and im not sure how to go forward (and start thinking/building something more advance), so i some times think that by learning/going to another language that will make me a better programmer... (thats probably the reason i opened this thread)

author: Bored@Work
author_rank: Super Contributor
timestamp: July 09, 2012, 05:00:09 am
content: Quote from: SuperMiguel on July 09, 2012, 04:23:09 amGuess where all the compiler code-generations come from?And if you need cycle-exact control over some piece of code. Which you typical need when someting needs to be exact or fast, near the limit what the CPU can do.Or if you work with a CPU where there is just not any kind of compiler availiable. Maybe because the CPU is so exotic no one wrote a compiler, or so small no one can write a compiler.Or you need to do something the compiler can't do. Like switching the stack to switch between tasks. Or like writing special CPU registers or IO ports, in case your compiler has no extension for accessing them.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 09, 2012, 05:07:28 am
content: Quote from: Bored@Work on July 09, 2012, 05:00:09 amOr if you *are* using a compiler for an embedded system. But wait until you are, then pull out the manual for that chip. And, "Assembly" is not a language.

author: dfnr2
author_rank: Regular Contributor
timestamp: July 09, 2012, 05:12:03 am
content: Quote from: SuperMiguel on July 09, 2012, 04:43:18 amThe point is, you shouldn't be asking yourself how to get beyond tic-tac-toe in C. You should find something you want to do, then figure out what it will take. If you are stumped, then do some research and how others have approached the problem. Then, as you go, load your personal toolkit with more and more techniques.If you can't find anything you actually want to make the computer do, then why are you bothering with any of this in first place?One other option, in addition to my earlier suggestions--Pick an open source project you think is cool. It could be a dead one, or an active one. Pick a minor improvement you would like to do--something that can't be accomplished without understanding how the code works. Then study the code to figure out how the relevant portion works. If you see something that stumps you, try to model it in a simple test routine, then try playing with it. If it's not clear, then try to figure out if it could be written more clearly. Ask a more experience programmer. A lot of the code you will see out there is pretty crappy, but you can still learn from it.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 09, 2012, 06:38:31 pm
content: Quote from: dfnr2 on July 09, 2012, 05:12:03 amWill try, just not sure how to even start, I mean I can go to surgeforce or github and look for c open source projects but not sure if that's the right move

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 01:20:02 am
content: sigh! ok! buy a book on data structure. linked list, trees, table, arrays etc. read it during holiday at your hotel facing the beach. then you'll know why one language is dumber than the other. and why c is the god among the languages.

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 10, 2012, 01:37:49 am
content: Quote from: Mechatrommer on July 10, 2012, 01:20:02 amCan you recommend one?

author: ivan747
author_rank: Super Contributor
timestamp: July 10, 2012, 02:36:23 am
content: Quote from: IanB on July 07, 2012, 05:57:32 pmCan you tell uswherewe can find good resources on how to program? I am about to start a big project and I know C, I just don't know the techniques. If you know of something that is focused on C, it would be perfect.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 02:50:43 am
content: something like this... many choices, prices and languages.http://www.amazon.com/Best-Sellers-Books-Data-Structure-Algorithms/zgbs/books/132570011i used old book not sure if its around anymore. but from the list above, if its me, maybe i'll pick the...http://www.amazon.com/Structures-Their-Algorithms-Harry-Lewis/dp/067339736X/ref=zg_bs_132570011_27i quickly run through the content, quite ok. classical (basic) structure, language independent and positive reviews. you'll learn how to translate psuedo-code to language specific code. but if you're beginner you want to find book with pseudo-code closely resemble your favourite language. i cant comment whether "languange specific" data structure book is good or not, or something that relies on higher level feature of a language such as OOP class or libraries, maybe someone else have clearer view on this.ok i found 1 book that i have (i have 2), here used...http://www.amazon.com/Data-Structures-Algorithm-Analysis-C/dp/0805354433/ref=zg_bs_132570011_92but i cannot say its the best (bad reviews), i'm not sure, but it was helpfull for me.back about languages. based on my lonely experience, try to learn many languages and quickly you'll realize each with their own strength, you'll keep what usefull to you (personal or professional purpose) and throw the others into the abyss. i cannot say anything about phyton, because i dont know phyton except that scarry creature on the land.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 10, 2012, 03:30:26 am
content: ok i quickly run through some phyton code. as my guess, its proven true. i believe phyton is just another "redundant" language just as "pascal" or "basic", meant to look more charmer than C ("basic" is the best on this, but the poorest on data structure). if you are my kid i'll suggest leave that alone, stay on course of C, unless you have a very good reason sticking to it, such as you can build GUI on the fly, or your boss ask you to. may as well better to learn java or C#.

author: j3h4
author_rank: Newbie
timestamp: July 10, 2012, 03:22:03 pm
content: The Art Of Programming (Donald E. Knuth)

author: SuperMiguel
author_rank: Regular Contributor
timestamp: July 11, 2012, 01:40:59 am
content: Quote from: j3h4 on July 10, 2012, 03:22:03 pmThose books are huge!