• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:26
CET 14:26
KST 22:26
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
[BSL21] Ro.16 Group Stage (C->B->A->D)1Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win2RSL Season 3: RO16 results & RO8 bracket13Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge2[TLMC] Fall/Winter 2025 Ladder Map Rotation14
StarCraft 2
General
When will we find out if there are more tournament Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win SC: Evo Complete - Ranked Ladder OPEN ALPHA Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge RSL Season 3: RO16 results & RO8 bracket
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death
Brood War
General
Data analysis on 70 million replays 2v2 maps which are SC2 style with teams together? [BSL21] Ro.16 Group Stage (C->B->A->D) soO on: FanTaSy's Potential Return to StarCraft What happened to TvZ on Retro?
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Should offensive tower rushing be viable in RTS games? Nintendo Switch Thread Clair Obscur - Expedition 33
Dota 2
Official 'what is Dota anymore' discussion
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
Mafia Game Mode Feedback/Ideas
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread YouTube Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2026 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
Hyrule19161 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
Wardi Open
12:00
Qualifier #1
WardiTV696
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko355
StarCraft: Brood War
Sea 5712
actioN 4178
Calm 4013
Horang2 3503
Rain 2196
Bisu 1862
Hyuk 1118
Larva 647
BeSt 551
Soma 522
[ Show more ]
Stork 432
firebathero 365
ZerO 312
Snow 294
Mini 278
Light 275
Hyun 217
Killer 130
Pusan 128
hero 113
Rush 112
PianO 102
Barracks 86
Sea.KH 67
Leta 61
ToSsGirL 58
Sharp 52
soO 45
Backho 38
Mind 37
Terrorterran 27
ajuk12(nOOB) 25
sorry 24
Sacsri 24
zelot 21
Yoon 14
Free 11
SilentControl 10
HiyA 9
Aegong 8
Bale 8
Dota 2
singsing2331
Gorgc2059
qojqva1653
XcaliburYe93
420jenkins42
League of Legends
Reynor90
Trikslyr24
Counter-Strike
olofmeister2160
oskar137
Other Games
B2W.Neo1170
crisheroes376
Fuzer 346
Pyrionflax209
Mew2King118
hiko116
QueenE105
MindelVK18
ArmadaUGS14
ZerO(Twitch)12
Organizations
StarCraft: Brood War
UltimateBattle 1770
Dota 2
PGL Dota 2 - Main Stream258
StarCraft: Brood War
lovetv 3
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Adnapsc2 16
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV372
• lizZardDota234
League of Legends
• Jankos1810
• Nemesis1363
Upcoming Events
PiGosaur Cup
11h 34m
Replay Cast
19h 34m
Wardi Open
22h 34m
OSC
23h 34m
Tenacious Turtle Tussle
1d 10h
The PondCast
1d 20h
Replay Cast
2 days
OSC
3 days
LAN Event
3 days
Replay Cast
3 days
[ Show More ]
Replay Cast
3 days
WardiTV Korean Royale
3 days
Sparkling Tuna Cup
4 days
WardiTV Korean Royale
4 days
Replay Cast
5 days
Wardi Open
5 days
Replay Cast
6 days
Wardi Open
6 days
Liquipedia Results

Completed

SOOP Univ League 2025
RSL Revival: Season 3
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
META Madness #9
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
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 © 2025 TLnet. All Rights Reserved.