Active Topics

 


Reply
Thread Tools
Posts: 1,746 | Thanked: 2,100 times | Joined on Sep 2009
#21
Originally Posted by vivainio View Post
You don't need to know much about data structures - that's why we have class libraries.
You're making the assumption that you will always have said class libraries. Worse yet, without knowing what those data structures do how can you know you pick out the right one?

Compiler theories - do you really need to write compiler? Certainly not for mobile devices.
Compiler theory is extremely helpful when you realize that your compiler can drastically change how your software works (even breaks!)

Operating systems - again, you probably don't need to write one.
Understanding what is going on below your software is essential, even if you aren't going to delve down into it. And hiding up in a VM is not always an option.

Originally Posted by vivainio View Post
Is it even possible to sling code without understanding it?
Certainly. Toss lots of conditionals and evaluations into code running on an A8 and you'll slow things down. Allocate memory or create large chunks of data that aren't multiples of 4K on an x86 system and strange things happen. Even data structure performance is heavily dependent on what the system you're on is doing.

Languages are easy, systems are hard.
 

The Following 4 Users Say Thank You to wmarone For This Useful Post:
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#22
Originally Posted by vivainio View Post
Is it even possible to sling code without understanding it?

(for the sake if discussion I'm ignoring a lot of pre-existing Javascript and Perl code ;-).

For sure it's much easier to sleep at lectures without understanding the subject matter than it is to code without understanding how programming in general works. But, it all depends on your priorities, age, skills and how you want to use your time and/or money.
It's most definitely possible to sling code without understanding how programming actually works.

That's actually one of the biggest problem in my sector: There's a myriad of coders (mostly from a non-programming background - people who were pulled from some other department) who write code that's somehow doing the job, but most definitely don't understand even the basic concepts behind programming.

Does their code work? Somehow...
Is it stable? Barely...
Is it easy to modify? Definitely not!
Is it re-usable? Re-what?
Is it performant? Sure, nesting a dozen loops with database selects always is!
Is it easy to use by the end user? No, but they're used to it.
 

The Following 3 Users Say Thank You to Nathraiben For This Useful Post:
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#23
Originally Posted by vivainio View Post
These days a fairer consideration would be the Qt style C++, which isn't really much harder than Java.
I'd say this has very little to do with what is harder, but all do to with what is easiest to learn while not having to pick up special knowledge to understand the basic functionality of the language that you won't have much use of if you change language later on.

C++ in "Qt style" isn't a good description of what you get if you start to learn C++.

Just for fun, explain how the compiler turns the following snippet into something that can run (in terms of name spaces, types and operator resolving) and, for extra merit, explain how the runtime is involved when it's executed:
Code:
std::cout << "Hello world!" << std::endl;
Sure, you can argue that you don't need to understand nor know any of that, you get your line written to the console, but that simple snippet contains, at least, three points of interest on the purely semantic level and one big one on the compiler level.

And when you leave these "simple" examples behind and start to get object oriented, new problems arise. Like, what's the harm, if any, in not having a virtual destructor in a pure virtual class? This might sound esoteric, but it's not.

There are so many other things to keep in mind when building more complex programs than "Hello world!" that I see no reason to start out with C++ to learn programming.

Last edited by Joorin; 2010-06-27 at 20:40. Reason: Clarification
 
juise-'s Avatar
Posts: 186 | Thanked: 192 times | Joined on Jan 2010 @ Finland
#24
Originally Posted by vivainio View Post
You don't need to know much about data structures - that's why we have class libraries.
Originally Posted by vivainio View Post
Is it even possible to sling code without understanding it?
Somewhat contradicting statements?

Knowing an off-the-shelf solution is much nicer than going ad-hoc every time something fancier is needed. Not to mention how the knowledge of the "official" basics help when you need to communicate with others, even for just reading someone else's code.

That said, programming can be learned without the CS 101 stuff. But if done that way, it will be useful to go back at some point and fill in the gaps. Worked for me, at least.

To OP: I recommend Java or Python for first language. Java probably has a lot of literature available for beginners.

C++, IMHO, requires a lot of practise until you actually get to a level where you can understand other people's code. I wouldn't recommend it for first language. It's helpful if you're allowed to forget some complications like memory management while learning the very basics.
__________________
Trout have underwater weapons.
 
ndi's Avatar
Posts: 2,050 | Thanked: 1,425 times | Joined on Dec 2009 @ Bucharest
#25
Originally Posted by wmarone View Post
Compiler theory is extremely helpful when you realize that your compiler can drastically change how your software works (even breaks!)
Golden words. The best help I ever received as a coder was having access to sources and incredible documentation. No understanding of innards, no optimization, no advanced debugging, no performance. Doomed to sub-standard code.

Originally Posted by wmarone View Post
Understanding what is going on below your software is essential, even if you aren't going to delve down into it. And hiding up in a VM is not always an option.
See above

Originally Posted by wmarone View Post
Certainly. Toss lots of conditionals and evaluations into code running on an A8 and you'll slow things down. Allocate memory or create large chunks of data that aren't multiples of 4K on an x86 system and strange things happen. Even data structure performance is heavily dependent on what the system you're on is doing.
My golden moment was when I was writing for ATMEL a few years ago and I wrote some software (doesn't matter) that compiled to 800 bytes out of the 2K the chip had (2313 IIRC). At some point I got careless and mistakenly typed a slash (division) instead of a DIV (integer division), thus effectively pulling the division code for AT90 into my program. It now weighed at 3.5K. Not only instead of 20.000 procedures per second it would (have done) 5, drastically reducing effectiveness of code, but now it wouldn't even fit, effectively disqualifying me.

A similar effect happens on any platform. Sometimes the compiler sees through your shenanigans and corrects the code. Otherwise, you just end up with sub-standard code.

I'm a wandering a bit off-topic here, but another example:

I usually code in Delphi (Enhanced OO Pascal), and have been part of an argument that C was superior in speed. Someone wrote a chess program in C, and then translated it in Delphi. Code ran at 15% original speed, prompting that person to consider Delphi an amateurish joke. After a while, someone noticed the site and re-wrote the port according to Delphi guidelines. Result was 98+% speed (Delphi has overhead over C).

Why is this here? Because that's how much it matters to know your compiler and your platform. You can go with whatever language you want. There's always going to be a place for you if you're good at it. Plus, knowing your platform is going to help you when you switch languages, and knowing your language is going to help you switch platforms.

Oh, and, I saw C/++ and I immediately knew it WASN'T for me, if that helps
__________________
N900 dead and Nokia no longer replaces them. Thanks for all the fish.

Keep the forums clean: use "Thanks" button instead of the thank you post.
 
coderedcomputing's Avatar
Posts: 152 | Thanked: 53 times | Joined on Dec 2009 @ West Virginia
#26
Originally Posted by vivainio View Post
University & computer science is waste of time if you just want to start programming. You learn it by doing, not sitting at school listening to guys talking about doing it.
I personally don't plan to spend the rest of my life coding. I've been in the IT industry for the last 15 years with a Psych degree and basically want to get a more focused degree so I will make more money at my next job switch. I also want to be more useful by knowing a language and being able to apply it at work, regardless of where I work.

As well, I view university as a needed waste of time and money. Two of my better friends opted to work and skip college, we all ended up in the IT field, but with my degree I was and continue to make more yearly than they do (15k on one, 18k on another). Sadly, I know one of them knows way more than I, but that lack of degree holds him back. *shrug*

...and just to add, if I set a focus on C++ I'll be damn sure doing my own work outside the coursework assigned in class.
 

The Following User Says Thank You to coderedcomputing For This Useful Post:
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#27
C++ has it's place, due to speed mainly, for applications such as gaming. In regards to other industries such as distributing computing, networking, or desktop applications then it has mostly, and rightly, been left behind. Unfortunately this affects the take up of Qt, being c++ centric, whereas the ease of Java has helped Android development explode. Personally, if it wasn't for the Python Qt bindings, I would not have bothered with Qt or n900 development at all. And I say that as the guy who started the n900 coding competition heheh :P

Learning C++ wont do you any harm at all - it's good to learn any language and legacy languages, even Cobol, are always in demand as people move onto newer languages. But Java would be my recommendation.
__________________
Follow me on my neglected twitter @kojacker

Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun
 
Hotshot's Avatar
Posts: 305 | Thanked: 71 times | Joined on Dec 2009 @ 'Nam
#28
I wondered the same thing awhile back so about a month ago I got on amazon and ordered C and C++ programming for beginner training suite ed. 2009 to get me start. It was like $25 so if you don't wont to go the school route than it might be worth checking out.
__________________
I ever tell you about the time......
 
Posts: 307 | Thanked: 157 times | Joined on Jul 2009 @ Illinois, USA
#29
Originally Posted by coderedcomputing View Post
...and just to add, if I set a focus on C++ I'll be damn sure doing my own work outside the coursework assigned in class.
For perspective, I could teach you how to program in C++ in a day. You'd have a few notes and good solid ground to start writing code.

The thing is, C++ doesn't give you very much. Anything you want to do outside of console-restricted "Hello, World!" or "I am an animal" : "I am a cat" inheritance requires a third party library. Most third party libraries are like languages of their own.

Graphics, Networks, IPC, GUI, AI, Database. All these things are topics which you will need to familiarize yourself with and find 3rd party libraries for. C++ just gives you the tool to make them do stuff.

There are literally SO MANY THINGS you need to know to begin to do anything useful with any programming language that learning a programming language is RIDICULOUSLY trivial in comparison.

I don't mean to discourage you. I just want to correct this importance I'm picking up on that you attach to languages. The language isn't that important.

Pick any one of them and go from there. What I absolutely recommend you do after you get comfortable writing little programs and adventuring on your own in that language is to try and code in assembly. Then you'll get an appreciation for how to program. Just remember that EVERY SINGLE programming language you could possibly choose will eventually become a very similar sequence of machine code instructions.
 
Posts: 222 | Thanked: 205 times | Joined on Jul 2009 @ Finland
#30
Originally Posted by coderedcomputing View Post
I also want to be more useful by knowing a language and being able to apply it at work, regardless of where I work.
Then it might be a better idea to look at Python. C++ is more appropriate for 100% programming jobs, while Python is also useful for "softer" jobs like making web sites.

Web development also seems like an area where they don't care about degrees that much.
__________________
'QtDone'. Getting things done (GTD) was never this cheap!

'QmlReddit' reads Reddit!
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:55.