• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:35
CEST 18:35
KST 01:35
  • 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
[ASL22] Ro24 Preview: Summer's End0Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7
Community News
GSTL Returns in 2026!41Weekly Cups (Aug 3-9): Protoss get shut out7RSL goes to London! 2026 Offline Finals Nov 21-2212Weekly Cups (July 27-Aug 2): SHIN's big week0SC4ALL II: Brood War - $2500 - Dec 5-611
StarCraft 2
General
GSTL Returns in 2026! Balance hotfix patch 5.0.16b (July 16) SC4ALL: II Talent Announcement! Protoss AoE skill expression Weekly Cups (Aug 3-9): Protoss get shut out
Tourneys
PIG STY FESTIVAL 8.0! (13 - 23 August) 2026 KungFu Cup Announcement Sparkling Tuna Cup - Weekly Open Tournament 2026 GSTL Announcement Sea Duckling Open (Global, Bronze-Diamond)
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 538 Media Blackout The PondCast: SC2 News & Results Mutation # 537 Hostile Territory Mutation # 536 Railroad Switch
Brood War
General
StarCraft 64 is coming to Philly at SC4ALL II BW General Discussion Best Games Kespa era [ASL22] Ro24 Preview: Summer's End Your past clans
Tourneys
CSLAN 4 is Coming! [ASL22] Ro24 Group A Small VOD Thread 2.0 Escore Tournament - Season 3
Strategy
Odyssey Mineral Stack Saturation Fighting Spirit mining rates Any training maps people recommend? Simple Questions, Simple Answers
Other Games
General Games
General RTS Discussion Thread Nintendo Switch Thread Anyone here play Quakeworld back in the day? Stormgate/Frost Giant Megathread EVE Corporation
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank TL Mafia Community Thread NeO.D_StephenKing vs This Guy From 1 Million Dance
Community
General
US Politics Mega-thread Artificial Intelligence Thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread The Letting Off Steam Thread
Fan Clubs
MarineLorD Fan Club The ShoWTimE Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! Anime Discussion Thread Series you have seen recently... [Req][Books] Good Fantasy/SciFi books
Sports
MLB/Baseball 2023 Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
LOCKPICKING NOOB
LUCKY_NOOB
Chinese Gen Z: Between Dream…
TrAiDoS
Cathedral Of CS And NY pizza a…
FuDDx
Please support my new stand…
Peanutsc
Hello guys!
LIN1s
Customize Sidebar...

Website Feedback

Closed Threads



Active: 9107 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
Hyrule19237 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
IPSL
16:00
CSLAN Day 2
Liquipedia
PiG Sty Festival
12:00
PiGfest 8.0 Group D
PiGStarcraft1559
IntoTheiNu 825
ComeBackTV 639
IndyStarCraft 216
BRAT_OK 137
Rex136
3DClanTV 109
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft1559
IndyStarCraft 216
BRAT_OK 137
Rex 136
SHIN 25
EmSc Tv 22
StarCraft: Brood War
Mong 84
Sexy 81
Free 45
ZZZero.O 44
soO 34
Bale 28
zelot 27
scan(afreeca) 25
Rock 25
NaDa 14
[ Show more ]
Sacsri 11
ivOry 8
Britney 0
Dota 2
qojqva4673
Counter-Strike
fl0m5661
ScreaM1697
Super Smash Bros
Mew2King202
Chillindude26
Other Games
singsing1490
Liquid`RaSZi1240
B2W.Neo838
Beastyqt448
Organizations
StarCraft 2
TaKeTV 400
EmSc Tv 22
EmSc2Tv 22
[ Show 16 non-featured ]
StarCraft 2
• Reevou 3
• intothetv
• IndyKCrew
• AfreecaTV YouTube
• Migwel
• Kozan
StarCraft: Brood War
• Airneanach64
• HerbMon 34
• Michael_bg 7
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1199
League of Legends
• Jankos1995
• Nemesis1442
Other Games
• Shiphtur293
Upcoming Events
OSC
7h 25m
Afreeca Starleague
17h 25m
Rush vs Hm
Bisu vs Shuttle
WardiTV Weekly
18h 25m
The Patches Monday
23h 25m
Afreeca Starleague
1d 17h
Sharp vs Shinee
Action vs Shine
GSL
1d 18h
PiGosaur Cup
2 days
Replay Cast
2 days
Afreeca Starleague
2 days
BeSt vs Paralyze
Jaedong vs Speed
Kung Fu Cup
2 days
[ Show More ]
Replay Cast
3 days
The PondCast
3 days
KCM Race Survival
3 days
Replay Cast
4 days
PiG Sty Festival
4 days
CranKy Ducklings
5 days
PiG Sty Festival
5 days
Sparkling Tuna Cup
6 days
PiG Sty Festival
6 days
Liquipedia Results

Completed

Escore Tournament S3: W7
CranK Gathers Season 4: BW vs SC2 Team League
Eternal Conflict S2 Finale

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
Acropolis #5
CSLAN 4
RSL Revival: Season 6
PiG Sty Festival 8.0
META DYMY #4
Esports World Cup 2026
Esports World Cup 2026: LCQ
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026

Upcoming

ASL Season 22
CSL Season 22: Qualifier 1
Escore Tournament S3: W8
CSL Season 22: Qualifier 2
CSL 2026 AUTUMN (S22)
Acropolis #5 - TRS
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
Big Dog Cup 2026 Div 1
Stake Ranked Episode 5
PGL Masters Bucharest 2026
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 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.