• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 06:07
CET 11:07
KST 19:07
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
2026 KongFu Cup Announcement2BGE Stara Zagora 2026 cancelled10Blizzard Classic Cup - Tastosis announced as captains13Weekly Cups (March 2-8): ByuN overcomes PvT block4GSL CK - New online series18
StarCraft 2
General
Blizzard Classic Cup - Tastosis announced as captains BGE Stara Zagora 2026 cancelled BGE Stara Zagora 2026 announced ByuL: The Forgotten Master of ZvT Terran AddOns placement
Tourneys
2026 KongFu Cup Announcement [GSL CK] Team Maru vs. Team herO StarCraft Evolution League (SC Evo Biweekly) WardiTV Team League Season 10 Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 516 Specter of Death Mutation # 515 Together Forever Mutation # 514 Ulnar New Year
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Gypsy to Korea ASL21 General Discussion BW General Discussion Are you ready for ASL 21? Hype VIDEO
Tourneys
[Megathread] Daily Proleagues [BSL22] Open Qualifiers & Ladder Tours IPSL Spring 2026 is here! ASL Season 21 Qualifiers March 7-8
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Zealot bombing is no longer popular?
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread PC Games Sales Thread No Man's Sky (PS4 and PC)
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Mexico's Drug War Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread NASA and the Private Sector
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Movie Discussion! [Req][Books] Good Fantasy/SciFi books [Manga] One Piece
Sports
Formula 1 Discussion 2024 - 2026 Football Thread General nutrition recommendations Cricket [SPORT] TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Gaming-Related Deaths
TrAiDoS
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2043 users

The Big Programming Thread - Page 112

Forum Index > General Forum
Post a Reply
Prev 1 110 111 112 113 114 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Abductedonut
Profile Blog Joined December 2010
United States324 Posts
Last Edited: 2012-01-29 09:09:52
January 29 2012 08:54 GMT
#2221
On January 29 2012 17:02 Crazyeyes wrote:
Alright, I've got a little question for you guys. I'm currently in third year university, major in computer science. Before University, I honestly didn't even know what programming was.

So anyways. As I've mentioned, I'm third year. All of my knowledge in computer programming comes from my classes. I'll admit I'm not the best student, but I do pay attention when I can and I'm not exactly failing my way through this. I don't ever program on my free time or read programming-related things that aren't school related.

So far, we've pretty much only learned Java when it comes to useful programmming languages. I did a bit in Scheme, a very small amount in Assembly (I forgot most of it, honestly. It was horrible), some HTML... and I'm currently learning C. Much harder than I expected. Pointers sorta confuse me sometimes.

The thing is, I feel like I don't know anything. I feel like pepole who have way less education than me are more capable than I am. I've never said "I've made a script to do...."
I dont even know what that is.

What I hope is going on is that I'm being given the basic (and hopefully more advanced, too) programming skills and knowledge that can be applied to all computer science, and then the more specific things I'll be able to pick up without too much effort. I'm hoping that when I sit down and am told to do X at some random job, I'll be able to do it and be surprised with how much I know.
I'm just not very sure.

So, to any of you who come from a similar background (learned everything at school), can you shed some light on your situation? Is this normal?


I can say that this is a direct result of learning java first. I know lots of students who come from java without any prior programming experience and C/Assembly is horrible to them and they don't feel like know "anything."

Here's the basic truth.... Computer Science isn't all programming. Programming is how you APPLY the concepts you learn in computer science. To use an analogy, you're learning how to build a car from inside before actually building it ( programming ). Algorithms and data structures and classes like that teach you when to use a V8 engine rather than a V12 engine... etc etc.

So if I were to basically list out languages from lowest level to highest, it would sorta go like this:
- Machine Language
- Assembly
- C
- C++/Java/C#...

Machine Language is pretty useless to learn from what I've seen. Assembly is SUPER important because C/C++ code eventually gets translated to assembly. It's important to learn what happens on the lower levels when you create a function in C. You want to know how C sets up the stack and all that, and that's how knowing Assembly Language helps.

Anyway, I digress. As you learn C, you will realize that you'll slowly become "pro" at programming. No bullshit things like objects and code written for you in C. C really is a no-bullshit language, and you have to know exactly what you're doing or else you'll spend majority of your time fighting the code.

C will introduce you to wildly advanced topics like returning ANY type of data from a function (void pointers), passing entire functions as arguments, or returning entire functions ( function pointers )... hell you'll even learn neat tricks like optimizing switch statements by using function pointers. You'll learn EXACTLY when to pass things by reference and EXACTLY what happens inside your code. No more "let's change this and hope it works!" C is THE nerd's computer language. Most people in this thread will come in here and argue that java, python, whatever language they use is better and it might be true, but you don't "truly" learn to program unless you do so in C.

Once you're completely comfortable with the basics on C, I suggest you work on mastering these topics:

- OS APIs... ( WIN32 API, int 0x80 system calls.. ( basically linux system calls )... dunno what trashSX uses... )
- Network Programming ( Sockets, TCP/UDP ports, sending GET/POST through C for port 80 )
- Multi-threaded Programming
- GUI Programming using OS APIs... Avoid using things like QT's drag and drop GUI builder because you won't learn anything
- * This list in incomplete, but that's all that comes to my mind atm. I could mention things like global keyboard hooks, directX hooks, etc, but you'll discover those as you want to do certain projects. Will add stuff if I can remember it for the future! *

Once you've got all that down, you'll pretty much be able to program "anything." Your CS classes will come back remind you what search algorithms, data structures, and boolean logic to use to make your programs better.

At this point, when you move onto other languages it will be more about syntax. Your questions will shift from "Well how do I connect to a server?" to "Where can i find the socket API to this language?" You'll know what you need, and it will just be a matter of how to find it. I've gotten to a point where I can learn languages in about 2 hours. I learned how to program in matlab to help my friend out in under 20 minutes. I learned javascript programming for Adobe After Effects in about an hour and I was able to help visual effects artists modify various features of their shots by writing scripts for them.

That's my suggestion to you. Learn C, then go back and touch over assembly and you'll be able to program in anything.

Now... if you want to be a TRUE nerd and pwn EVERYONE at programming... start learning how to hack/crack/reverse engineer software. Hacking requires you know everything about everything, and it will open up your eyes to programming like you've never seen before. You'll learn how accidentally using a pointer after freeing it can cause a skilled programmer/hacker to compromise the entire system. Hacking is the CRUX of computers, and the most skilled programmers and computer scientists result from hacking. You can start off with a book called "The Shellcoder's Handbook" if you're interested in touching on the topic. That book is very technical and will really get you thinking about how things inside the computer work...

Ah, and just for some light reading... Here's a post by Linus Torvalds... the creator of the Linux operating system. I think this is hilariously interesting!
+ Show Spoiler +
http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
Crazyeyes
Profile Blog Joined March 2008
Canada1342 Posts
Last Edited: 2012-01-29 18:31:53
January 29 2012 09:56 GMT
#2222
That's extremely helpful, actually, thanks!

Currently I'm taking a Parallel Programming and an Operating Systems class (both of which require me to use C), so I'm already starting on your list.
I had a machine architecture class, but even though that was last year I've pretty much forgot everything. I hope the important things will come back when I need them.

I'm a lot more excited to learn C due to your post. :D

So another question: the hardest class I've taken so far was called "Introduction to Discrete Structures." It was just a math class. Half or more of the students were math majors. It was terrible, and we just learned about data sets and we did a lot of mathematical proofs (which was hard as fuck considering I didn't take a math proofs class until the semester afterwards). Do math-heavy things come in to play a lot?

I'll also stop hijacking the thread after this. :D
WeeEEeeEEEeeEEEeeeEEee!!
morty
Profile Joined July 2010
Germany38 Posts
January 29 2012 10:21 GMT
#2223
Has anyone of the C programmers here tried http://throwtheswitch.org/white-papers/ceedling-intro.html ? I'm mainly doing ruby stuff and the testing/TDD stuff there helps me a lot to keep me motivated to write tests. Now im curious if anyone uses Ceedling or other test-tools for C.
ObliviousNA
Profile Joined March 2011
United States535 Posts
January 29 2012 13:22 GMT
#2224
On January 29 2012 17:54 Abductedonut wrote:
Show nested quote +
On January 29 2012 17:02 Crazyeyes wrote:
Alright, I've got a little question for you guys. I'm currently in third year university, major in computer science. Before University, I honestly didn't even know what programming was.

So anyways. As I've mentioned, I'm third year. All of my knowledge in computer programming comes from my classes. I'll admit I'm not the best student, but I do pay attention when I can and I'm not exactly failing my way through this. I don't ever program on my free time or read programming-related things that aren't school related.

So far, we've pretty much only learned Java when it comes to useful programmming languages. I did a bit in Scheme, a very small amount in Assembly (I forgot most of it, honestly. It was horrible), some HTML... and I'm currently learning C. Much harder than I expected. Pointers sorta confuse me sometimes.

The thing is, I feel like I don't know anything. I feel like pepole who have way less education than me are more capable than I am. I've never said "I've made a script to do...."
I dont even know what that is.

What I hope is going on is that I'm being given the basic (and hopefully more advanced, too) programming skills and knowledge that can be applied to all computer science, and then the more specific things I'll be able to pick up without too much effort. I'm hoping that when I sit down and am told to do X at some random job, I'll be able to do it and be surprised with how much I know.
I'm just not very sure.

So, to any of you who come from a similar background (learned everything at school), can you shed some light on your situation? Is this normal?


I can say that this is a direct result of learning java first. I know lots of students who come from java without any prior programming experience and C/Assembly is horrible to them and they don't feel like know "anything."

Here's the basic truth.... Computer Science isn't all programming. Programming is how you APPLY the concepts you learn in computer science. To use an analogy, you're learning how to build a car from inside before actually building it ( programming ). Algorithms and data structures and classes like that teach you when to use a V8 engine rather than a V12 engine... etc etc.

So if I were to basically list out languages from lowest level to highest, it would sorta go like this:
- Machine Language
- Assembly
- C
- C++/Java/C#...

Machine Language is pretty useless to learn from what I've seen. Assembly is SUPER important because C/C++ code eventually gets translated to assembly. It's important to learn what happens on the lower levels when you create a function in C. You want to know how C sets up the stack and all that, and that's how knowing Assembly Language helps.

Anyway, I digress. As you learn C, you will realize that you'll slowly become "pro" at programming. No bullshit things like objects and code written for you in C. C really is a no-bullshit language, and you have to know exactly what you're doing or else you'll spend majority of your time fighting the code.

C will introduce you to wildly advanced topics like returning ANY type of data from a function (void pointers), passing entire functions as arguments, or returning entire functions ( function pointers )... hell you'll even learn neat tricks like optimizing switch statements by using function pointers. You'll learn EXACTLY when to pass things by reference and EXACTLY what happens inside your code. No more "let's change this and hope it works!" C is THE nerd's computer language. Most people in this thread will come in here and argue that java, python, whatever language they use is better and it might be true, but you don't "truly" learn to program unless you do so in C.

Once you're completely comfortable with the basics on C, I suggest you work on mastering these topics:

- OS APIs... ( WIN32 API, int 0x80 system calls.. ( basically linux system calls )... dunno what trashSX uses... )
- Network Programming ( Sockets, TCP/UDP ports, sending GET/POST through C for port 80 )
- Multi-threaded Programming
- GUI Programming using OS APIs... Avoid using things like QT's drag and drop GUI builder because you won't learn anything
- * This list in incomplete, but that's all that comes to my mind atm. I could mention things like global keyboard hooks, directX hooks, etc, but you'll discover those as you want to do certain projects. Will add stuff if I can remember it for the future! *

Once you've got all that down, you'll pretty much be able to program "anything." Your CS classes will come back remind you what search algorithms, data structures, and boolean logic to use to make your programs better.

At this point, when you move onto other languages it will be more about syntax. Your questions will shift from "Well how do I connect to a server?" to "Where can i find the socket API to this language?" You'll know what you need, and it will just be a matter of how to find it. I've gotten to a point where I can learn languages in about 2 hours. I learned how to program in matlab to help my friend out in under 20 minutes. I learned javascript programming for Adobe After Effects in about an hour and I was able to help visual effects artists modify various features of their shots by writing scripts for them.

That's my suggestion to you. Learn C, then go back and touch over assembly and you'll be able to program in anything.

Now... if you want to be a TRUE nerd and pwn EVERYONE at programming... start learning how to hack/crack/reverse engineer software. Hacking requires you know everything about everything, and it will open up your eyes to programming like you've never seen before. You'll learn how accidentally using a pointer after freeing it can cause a skilled programmer/hacker to compromise the entire system. Hacking is the CRUX of computers, and the most skilled programmers and computer scientists result from hacking. You can start off with a book called "The Shellcoder's Handbook" if you're interested in touching on the topic. That book is very technical and will really get you thinking about how things inside the computer work...

Ah, and just for some light reading... Here's a post by Linus Torvalds... the creator of the Linux operating system. I think this is hilariously interesting!
+ Show Spoiler +
http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918


Damn, that linux link was interesting. Your response was articulated much better than I could have hoped to do, that was an excellent read.

@Crazyeyes, I was in the exact same boat last year. I was a third year who had only ever done TI-83+ programming, and sort of came to the major by accident. Then I got a job at a career fair, and my confidence soared. Frankly I didn't know jack**** about any of the languages I needed to, but what I did know was the concepts. Learning languages, APIs, etc is surprisingly easy once you've got a decent grasp on your first few.

I did have the advantage of learning C first though, which I didn't really appreciate at the time. (Looking back, I'm very glad I had the low-level overview because I would have been severely lost in several major projects since then if it weren't for the foundation in C).

Anyway, my advice is to get ANY kind of employment, paid, with the school, with a group of friends, or otherwise, and learn from there. I look back and find myself SHOCKED at how utterly unqualified I was for this position 6 months ago. You end up learning a ton through trial and error, but the concepts at college give you a really good foundation. You're learning how to learn, and after that it's up to you to apply it.

One more thing - I used to be intimidated by phrases like 'running scripts', etc. (Lot's of nerdy friends). It's not nearly as impressive as it sounds. Useful, but not difficult.
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
tofucake
Profile Blog Joined October 2009
Hyrule19194 Posts
January 29 2012 17:58 GMT
#2225
Scripts are amazing. Never understate their importance :O

also that's going in the OP. Very good info
Liquipediaasante sana squash banana
KaiserJohan
Profile Joined May 2010
Sweden1808 Posts
January 29 2012 18:20 GMT
#2226
On January 29 2012 17:54 Abductedonut wrote:
Show nested quote +
On January 29 2012 17:02 Crazyeyes wrote:
Alright, I've got a little question for you guys. I'm currently in third year university, major in computer science. Before University, I honestly didn't even know what programming was.

So anyways. As I've mentioned, I'm third year. All of my knowledge in computer programming comes from my classes. I'll admit I'm not the best student, but I do pay attention when I can and I'm not exactly failing my way through this. I don't ever program on my free time or read programming-related things that aren't school related.

So far, we've pretty much only learned Java when it comes to useful programmming languages. I did a bit in Scheme, a very small amount in Assembly (I forgot most of it, honestly. It was horrible), some HTML... and I'm currently learning C. Much harder than I expected. Pointers sorta confuse me sometimes.

The thing is, I feel like I don't know anything. I feel like pepole who have way less education than me are more capable than I am. I've never said "I've made a script to do...."
I dont even know what that is.

What I hope is going on is that I'm being given the basic (and hopefully more advanced, too) programming skills and knowledge that can be applied to all computer science, and then the more specific things I'll be able to pick up without too much effort. I'm hoping that when I sit down and am told to do X at some random job, I'll be able to do it and be surprised with how much I know.
I'm just not very sure.

So, to any of you who come from a similar background (learned everything at school), can you shed some light on your situation? Is this normal?


I can say that this is a direct result of learning java first. I know lots of students who come from java without any prior programming experience and C/Assembly is horrible to them and they don't feel like know "anything."

Here's the basic truth.... Computer Science isn't all programming. Programming is how you APPLY the concepts you learn in computer science. To use an analogy, you're learning how to build a car from inside before actually building it ( programming ). Algorithms and data structures and classes like that teach you when to use a V8 engine rather than a V12 engine... etc etc.

So if I were to basically list out languages from lowest level to highest, it would sorta go like this:
- Machine Language
- Assembly
- C
- C++/Java/C#...

Machine Language is pretty useless to learn from what I've seen. Assembly is SUPER important because C/C++ code eventually gets translated to assembly. It's important to learn what happens on the lower levels when you create a function in C. You want to know how C sets up the stack and all that, and that's how knowing Assembly Language helps.

Anyway, I digress. As you learn C, you will realize that you'll slowly become "pro" at programming. No bullshit things like objects and code written for you in C. C really is a no-bullshit language, and you have to know exactly what you're doing or else you'll spend majority of your time fighting the code.

C will introduce you to wildly advanced topics like returning ANY type of data from a function (void pointers), passing entire functions as arguments, or returning entire functions ( function pointers )... hell you'll even learn neat tricks like optimizing switch statements by using function pointers. You'll learn EXACTLY when to pass things by reference and EXACTLY what happens inside your code. No more "let's change this and hope it works!" C is THE nerd's computer language. Most people in this thread will come in here and argue that java, python, whatever language they use is better and it might be true, but you don't "truly" learn to program unless you do so in C.

Once you're completely comfortable with the basics on C, I suggest you work on mastering these topics:

- OS APIs... ( WIN32 API, int 0x80 system calls.. ( basically linux system calls )... dunno what trashSX uses... )
- Network Programming ( Sockets, TCP/UDP ports, sending GET/POST through C for port 80 )
- Multi-threaded Programming
- GUI Programming using OS APIs... Avoid using things like QT's drag and drop GUI builder because you won't learn anything
- * This list in incomplete, but that's all that comes to my mind atm. I could mention things like global keyboard hooks, directX hooks, etc, but you'll discover those as you want to do certain projects. Will add stuff if I can remember it for the future! *

Once you've got all that down, you'll pretty much be able to program "anything." Your CS classes will come back remind you what search algorithms, data structures, and boolean logic to use to make your programs better.

At this point, when you move onto other languages it will be more about syntax. Your questions will shift from "Well how do I connect to a server?" to "Where can i find the socket API to this language?" You'll know what you need, and it will just be a matter of how to find it. I've gotten to a point where I can learn languages in about 2 hours. I learned how to program in matlab to help my friend out in under 20 minutes. I learned javascript programming for Adobe After Effects in about an hour and I was able to help visual effects artists modify various features of their shots by writing scripts for them.

That's my suggestion to you. Learn C, then go back and touch over assembly and you'll be able to program in anything.

Now... if you want to be a TRUE nerd and pwn EVERYONE at programming... start learning how to hack/crack/reverse engineer software. Hacking requires you know everything about everything, and it will open up your eyes to programming like you've never seen before. You'll learn how accidentally using a pointer after freeing it can cause a skilled programmer/hacker to compromise the entire system. Hacking is the CRUX of computers, and the most skilled programmers and computer scientists result from hacking. You can start off with a book called "The Shellcoder's Handbook" if you're interested in touching on the topic. That book is very technical and will really get you thinking about how things inside the computer work...

Ah, and just for some light reading... Here's a post by Linus Torvalds... the creator of the Linux operating system. I think this is hilariously interesting!
+ Show Spoiler +
http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918


This post is 100% spot on, GOLDEN! The list pretty much sums up everything nicely.

I would like to add opengl/directx programming, but then again its prolly too much math to be useful in other fields, although personally I think graphic programming is amongst the hardest tasks in programming.

If you have no hobby project, you can always try write a basic game engine. Start with stuff like memory, input, audio, etc..
but if you don't have alot of experience (as is sounds like) its prolly to big task
England will fight to the last American
Grndr101
Profile Joined March 2011
Belgium125 Posts
February 02 2012 07:09 GMT
#2227
Hello programming thread,

Allright my current situation is that I have 6 months, which means I have some time to spare. I basically want to be proficient in C before I start.

My question to you is what are good tools for learning C?
I've checked out some youtube tutorials, but most of them don't go too much in depth. If you have any books, videos, or websites to recommend, that would be great.
I checked out cprogramming.com, but it doesn't really help me much, since it provides rather general and useless examples.

My main topic of confusion is pointers, don't know if that helps.

I already have some prior experience (although quite basic) in mainly Scheme and Actionscript(experimented some with flash).
Maynarde
Profile Joined September 2010
Australia1286 Posts
February 02 2012 07:14 GMT
#2228
On February 02 2012 16:09 Grndr101 wrote:
Hello programming thread,

Allright my current situation is that I have 6 months, which means I have some time to spare. I basically want to be proficient in C before I start.

My question to you is what are good tools for learning C?
I've checked out some youtube tutorials, but most of them don't go too much in depth. If you have any books, videos, or websites to recommend, that would be great.
I checked out cprogramming.com, but it doesn't really help me much, since it provides rather general and useless examples.

My main topic of confusion is pointers, don't know if that helps.

I already have some prior experience (although quite basic) in mainly Scheme and Actionscript(experimented some with flash).


Hey dude, the way I taught myself what I know about C is basically by just going through tutorials and videos (which is sounds like you're doing already) and trying out some simple applications. Also learning out to make "Makefiles" is really important. Really, it's just time and persistence and going from one level of difficulty to another.

Most tutorials online are very "step by step" and in order of difficulty. If you really want to make the best of your 6 months and have some spare money, I suggest going for an online course. HEAPS of online Universities / Colleges run C courses and you will have tons of podcast lectures / tutorials / interaction with other students to get you proficient faster.
CommentatorAustralian SC2 Caster | Twitter: @MaynardeSC2 | Twitch: twitch.tv/maynarde
AcTiVillain
Profile Joined November 2010
Australia81 Posts
February 02 2012 07:26 GMT
#2229
Hi Programming thread,

I am an iOS developer (cocos2d mainly).

For those with iPhones, I highly recommend learning objective-C. Its not as hard as say C++ and nothing beats showing off software you develop to your friends on your mobile phone.
Neelia
Profile Joined September 2010
Germany599 Posts
February 02 2012 08:00 GMT
#2230
On February 02 2012 16:09 Grndr101 wrote:
Hello programming thread,

Allright my current situation is that I have 6 months, which means I have some time to spare. I basically want to be proficient in C before I start.

My question to you is what are good tools for learning C?
I've checked out some youtube tutorials, but most of them don't go too much in depth. If you have any books, videos, or websites to recommend, that would be great.
I checked out cprogramming.com, but it doesn't really help me much, since it provides rather general and useless examples.

My main topic of confusion is pointers, don't know if that helps.

I already have some prior experience (although quite basic) in mainly Scheme and Actionscript(experimented some with flash).


I think you can't go wrong with C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie.

As far as I remember (where the hell is my copy :D) it includes lots of exercises and stuff too. If you work through the exercises you should be good to go
jca2 *
Profile Joined March 2006
France52 Posts
February 02 2012 08:15 GMT
#2231
My two cents about programming: if you intend to become a professional software developer, programming is only a mean to achieve a higher goal: produce quality software applications. So all that was said about learning C, C++, Win32, .NET, etc is valid, but it's only step 1 (By the way, you don't need to learn all the programming technologies around. It's better to know a few of them really really well than to be mediocre everywhere).

Step 2 is everything that will help you write good code, solid code, clean code, efficient code, with good architecture, good workflow, good user interface, proper documentation, good planning, etc, because that will lead to good applications and software projects delivered on time. When you design and write code for commercial products, in most cases, all of that matters more than being a wiz at any given technology.

Therefore, I would recommend reading not only programming books but also books about software development. There are many out there. A few immediately come to mind:

Writing Solid Code by Steve Maguire
Code Complete by Steve McConnell

Other authors to look for:

Jim McCarthy
Andrew Hunt
Scott Meyers
Edward yourdon
Edsger Dijkstra

And of course, if you are into C and C++:

Brian Kernighan
Bjarne Stroustrup

Finally, read books, write code, plenty of code, then read more books and write more code. Then get to work on a commercial product, within a decent software team, for a few decades. That's how you get good.

"The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. " Edsger W. Dijkstra

APM? Never heard of it...
Grndr101
Profile Joined March 2011
Belgium125 Posts
February 02 2012 10:04 GMT
#2232
Ok, first I want to say thank you to all of you for your answers. Very helpful to not only get information, but your oppinions on learning to program.

Secondly, I stumbled on THIS blog. Which explains a lot about C functions I didn't know.

However there is a bit of code that leaves me confused.

+ Show Spoiler +
#include <stdio.h>
int main()
{
int v; // value read from scanf
int r; // return value from scanf
int e; // error count
e = 0; // initialize to no errors
do
{
r = scanf("%d", &v);
if (!r) e++; // if error, count it
printf(" %3d Read, return %d \n", v, r);
} while ((v != 0) && (e < 4));
return 0;
}


If you want it's also available in the blog entry in more pleasing format.

Thus my question is:
-how come if my input is '55 66 77', does it print out all 3 integer values?

If I try to read in 3 integers separated by spaces in a scanf() function(without the while loop), it only stores the first one in the variable. Then if I print it out it prints out one.

If I'm being imprecise please say so. And thanks again.
ObliviousNA
Profile Joined March 2011
United States535 Posts
February 02 2012 16:59 GMT
#2233
The %d in the function scanf is saying "I expect to be given an integer". It parses the user input until it receives a non-integer character (like a space), then stores the number that it just scanned into the variable v. If i'm understanding you correctly, you have a single scanf() function, and it's storing 55 into the variable v when given the input '55 66 77'.
This behavior is correct, because it read your input until the first non integer character (space). Without the while loop, it doesn't even read the 66 and 77 characters.

Perhaps if you gave a second code sample we could tell you why it's behaving that way.
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
Grndr101
Profile Joined March 2011
Belgium125 Posts
Last Edited: 2012-02-02 17:17:40
February 02 2012 17:15 GMT
#2234
Hm I'll try to explain more clearly

The input is '55 66 77'

Meaning you type 55, space, 66, space and 77 and hit enter.

Code 1
+ Show Spoiler +

#include <stdio.h>
int main()
{
int v; // value read from scanf
int r; // return value from scanf
int e; // error count
e = 0; // initialize to no errors
do
{
r = scanf("%d", &v);
if (!r) e++; // if error, count it
printf(" %3d Read, return %d \n", v, r);
} while ((v != 0) && (e < 4));
return 0;
}


output :
55 Read, return 1
66 Read, return 1
77 Read, return 1

Code 2:

+ Show Spoiler +


#include <stdio.h>
int main()
{


int v; // value read from scanf
int r; // return value from scanf

r = scanf("%d", &v);
printf(" %3d Read, return %d \n", v, r);
return 0;
}


Output:
55 Read, return 1

Hence my question why both behave differently. The first one outputs the 3 ints while the second one outputs 1 int.
Maybe I'm reading the loop wrong, but in my eyes it should store the value in v, print read 55, return 1 and then overwrite that value with the r= scanf("%d", &v); statement.

Thanks for your patience, lol.
ObliviousNA
Profile Joined March 2011
United States535 Posts
Last Edited: 2012-02-02 17:24:35
February 02 2012 17:24 GMT
#2235
No problem, the reason the behavior is different is because of the 'while' loop. In code 1, you'll notice
do{
...
}while((v!=0)&&(e<4))

This statement will continue to execute whatever is in the do-while loop (in your case, scanf and printf) AS LONG AS the conditions within while() are met.

When v is zero (i.e. you enter 0 as an input integer) OR you make 4 errors, it breaks out of the loop. The reason 55 66 77 scans and prints 3 integers is that it goes through 3 iterations of the while loop. It never detects the 'exit condition', so it loops through that bit of code.

simple example:

int count = 0;
count += 1;
printf("%d",count); //prints 1


int count = 0;
do{
count += 1
}while(count < 5);
printf("%d",count); //prints 5

Essentially, his code is calling scanf three separate times because it loops through the while-loop without reaching an exit condition. Your code has no loop, so scanf is called a single time.

Makes sense?
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
Grndr101
Profile Joined March 2011
Belgium125 Posts
February 02 2012 18:15 GMT
#2236
I'm confused.

Let me explain what I have in my head.

In the do.. while loop the loop will execute the statements one time(to at least get input once). Then it will check the condition and run trough the loop again if it is true.

So let me explain what I think should happen each iteration.

1.r = scanf("%d", &v); the loop runs the scanf function, assigning the value of the input to v, then stores the returned value in variable r. In the case of the input I mentioned this should be 55.

2. if (!r) e++; if error, count it

3. printf(" %3d Read, return %d \n", v, r); return the formatted value of v and r.

So I don't get why with the input I gave it it could print the 3 values of 55, 66 and 77
In my mind it should print the value 55, then overwrite this value in the next loop with a user input (ie: you enter 93).
At work not much time.
ObliviousNA
Profile Joined March 2011
United States535 Posts
February 02 2012 20:06 GMT
#2237
Ok I think I get it.
http://en.wikipedia.org/wiki/Scanf_format_string

check out the first code example here. Essentially, scanf treats whitespace of ANY kind as a delimiter - so when you press enter and your input is '55 66 77', it consumes input until it reaches, whitespace, but it DOESN'T throw away the rest of the input - that's still waiting in the stdin buffer. When you go through the next loop iteration, it consumes the 66 that is waiting.

Essentially, pressing enter sends whatever text is on the commandline into the stdin buffer. Scanf parses the first int, then the loop calls scanf again until the input buffer is empty.
Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. In our lab, theory and practice are combined: nothing works and no one knows why.
mmp
Profile Blog Joined April 2009
United States2130 Posts
February 02 2012 20:27 GMT
#2238
On February 02 2012 17:00 Neelia wrote:
Show nested quote +
On February 02 2012 16:09 Grndr101 wrote:
Hello programming thread,

Allright my current situation is that I have 6 months, which means I have some time to spare. I basically want to be proficient in C before I start.

My question to you is what are good tools for learning C?
I've checked out some youtube tutorials, but most of them don't go too much in depth. If you have any books, videos, or websites to recommend, that would be great.
I checked out cprogramming.com, but it doesn't really help me much, since it provides rather general and useless examples.

My main topic of confusion is pointers, don't know if that helps.

I already have some prior experience (although quite basic) in mainly Scheme and Actionscript(experimented some with flash).


I think you can't go wrong with C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie.

As far as I remember (where the hell is my copy :D) it includes lots of exercises and stuff too. If you work through the exercises you should be good to go

A practical online reference: http://www.acm.uiuc.edu/webmonkeys/book/c_guide/index.html
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
mmp
Profile Blog Joined April 2009
United States2130 Posts
February 02 2012 20:53 GMT
#2239
I'm looking for programmers interested in C, abstract algebra, cryptography, or distributed systems to help with a FOSS project. Great for math/CS undergrads or high-school students who want to pad their resume.

pm for details.

User was warned for this post
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
mmp
Profile Blog Joined April 2009
United States2130 Posts
Last Edited: 2012-02-02 23:40:26
February 02 2012 20:57 GMT
#2240
I'm looking for programmers interested in web design, graphics, animation, and free software to help design & develop a FOSS web toolkit.

pm for details.

User was warned for this post
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
Prev 1 110 111 112 113 114 1032 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 4: Group B
MaxPax vs Rogue
Clem vs Bunny
LiquipediaDiscussion
CranKy Ducklings
10:00
Master Swan Open #101
CranKy Ducklings12
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Tasteless 288
SortOf 197
Rex 23
StarCraft: Brood War
Sea 78817
Calm 20843
BeSt 547
actioN 509
Larva 330
EffOrt 206
Stork 176
Dewaltoss 82
ToSsGirL 76
Backho 57
[ Show more ]
Mind 36
IntoTheRainbow 30
sSak 25
GoRush 22
JulyZerg 19
Bale 8
SilentControl 8
Dota 2
NeuroSwarm109
resolut1ontv 79
ODPixel54
XcaliburYe44
canceldota36
febbydoto9
League of Legends
JimRising 457
Counter-Strike
zeus191
Super Smash Bros
Mew2King65
Heroes of the Storm
Khaldor78
Other Games
Fuzer 173
Organizations
Dota 2
PGL Dota 2 - Main Stream17908
Other Games
gamesdonequick1195
ComeBackTV 211
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• LUISG 26
• CranKy Ducklings SOOP1
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1696
• Stunt586
Upcoming Events
WardiTV Team League
1h 53m
uThermal 2v2 Circuit
6h 53m
BSL
9h 53m
Sparkling Tuna Cup
23h 53m
RSL Revival
23h 53m
ByuN vs SHIN
Maru vs Krystianer
WardiTV Team League
1d 1h
Patches Events
1d 6h
BSL
1d 9h
Replay Cast
1d 13h
Replay Cast
1d 22h
[ Show More ]
Wardi Open
2 days
Monday Night Weeklies
2 days
OSC
2 days
WardiTV Team League
3 days
GSL
3 days
The PondCast
4 days
WardiTV Team League
5 days
Replay Cast
5 days
WardiTV Team League
6 days
Korean StarCraft League
6 days
Liquipedia Results

Completed

Proleague 2026-03-13
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
RSL Revival: Season 4
Nations Cup 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

CSL Elite League 2026
ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
Acropolis #4
IPSL Spring 2026
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
NationLESS Cup
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Disclosure: This page contains affiliate marketing links that support TLnet.

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.