Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 1st, 2005, 1:19 AM   #41
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
jesus...

i always talk about learning c first, but what i failed to mention was that i was also learning c++ concurrently with c. basically i was learning c++ and then referencing c to get a little more detail on some operations. bottom line, when you go to college or the workplace you may be forced into learning a new way to do things, language-wise or other. learn c++ first, but at least look into "c-style strings" and what's really going on when you declare an array. a good c++ book may cover this, but it's common c knowledge.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Nov 1st, 2005, 2:09 PM   #42
Senger
Programmer
 
Join Date: Oct 2005
Location: Vancouver, Canada
Posts: 47
Rep Power: 0 Senger is on a distinguished road
I would agree. Actually, that first course in procedural C++ was basically C with the iostream and fstream libraries. We learned character arrays, and were not even "supposed" to know about the C++ string library. And in the second course, we began creating classes, but had to build our own lists, stacks, queues, etc. rather than rely on what the STL had to offer. I think this approach was good: learning the nuts and bolts before relying on too many tools that abstract away all this stuff.

It means that today, I can leave all the grunt work to APIs, libraries, tools, but at least have an understanding of what's going on "under the hood," and be able to rely on my own resources when necessary. I transferred from college into university; the university students who'd been using Java from day 1 were utterly lost when they got into third-year programming courses.
__________________
It can be proved that you can watch streaming video on a Turing machine. The question is, why would you want to?
Senger is offline   Reply With Quote
Old Nov 1st, 2005, 2:20 PM   #43
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Precisely.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 1st, 2005, 2:40 PM   #44
MBirchmeier
Hobbyist Programmer
 
Join Date: Oct 2005
Posts: 211
Rep Power: 4 MBirchmeier is on a distinguished road
Quote:
Originally Posted by Arevos
I can't say I agree. Yes, Python forces indentation, but if that's what you were doing anyway, what's the problem?
Huge personal problem with python... is the forced indentation for me.

Being a consultant I spend a lot of time on a lot of different computers, with different OS's and text editors. One day I might open a file in emacs, the next in Visual Studio or notepad.

The biggest problem with this the formatting of lines in a more advanced editor (VS) tabs can be insertted automatically or (EMACS) be replaced with spaces. Although this would usually be a minor cosmetic issue, when it comes a compiler issue, making a quick change, then submitting to source control can become a larger hassle than it should be.

-MBirchmeier
MBirchmeier is offline   Reply With Quote
Old Nov 1st, 2005, 3:09 PM   #45
Senger
Programmer
 
Join Date: Oct 2005
Location: Vancouver, Canada
Posts: 47
Rep Power: 0 Senger is on a distinguished road
In terms of inconsitency in spacing, representation, etc., tabs have to be one of the biggest headaches in working with different text editors. Such a trivial thing (except in Python...), and yet such an annoyance.
__________________
It can be proved that you can watch streaming video on a Turing machine. The question is, why would you want to?
Senger is offline   Reply With Quote
Old Nov 1st, 2005, 6:30 PM   #46
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by MBirchmeier
The biggest problem with this the formatting of lines in a more advanced editor (VS) tabs can be insertted automatically or (EMACS) be replaced with spaces. Although this would usually be a minor cosmetic issue, when it comes a compiler issue, making a quick change, then submitting to source control can become a larger hassle than it should be.
Honestly, I think this is more of a theoretical problem than a practical one. If we assume that all good programmers indent blocks consistantly, then the only problem that remains is mixing tabs and spaces. Any decent editor will give you the option of coverting tabs to spaces, which would be sufficient to solve your problem.

And even if you forget, the moment the Python interpreter compiles your code into bytecode, it'll flag up an indentation error. A 10 second search and replace and the problem is corrected. Mixing tabs and spaces in the same block is sufficiently rare (and not good practice anyway), and sufficiently easy to fix, that it becomes a none issue.

Or, to look at it another way, how often do you miss out a semicolon on a line? I can count the number of times I've messed up the indentation in Python on one hand. The number of times I've forgotten a semicolon, or missed off an ending bracket, must number in the hundreds by now
Arevos is offline   Reply With Quote
Old Nov 1st, 2005, 8:46 PM   #47
teencoder
Hobbyist Programmer
 
teencoder's Avatar
 
Join Date: Jul 2005
Posts: 158
Rep Power: 0 teencoder is an unknown quantity at this point
Hey I don't think going under the abstraction layer is necessary to understand how it works. I use the string library and I love it. I can tell you what a C style string is without ever makeing one myself. A C style string is a null terminated array of characters. Why bother you are more likely to make a mistake like straying off the array.
__________________
Geeks may not be cool now but in the long run they prosper.
teencoder is offline   Reply With Quote
Old Nov 1st, 2005, 10:06 PM   #48
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Is your post recommending C++ before C, or avoiding arrays, or staying out from under the hood, or exactly what????
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 2nd, 2005, 1:01 AM   #49
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 6 bl00dninja is on a distinguished road
Quote:
Hey I don't think going under the abstraction layer is necessary to understand how it works.
actually, yeah, by definition it is. you "don't know what the hell is going on" unless you "know what the hell is going on". if you understand how it works, then you have gone under the layer of abstraction. otherwise, you wouldn't know. i believe this is probably an issue in the semantics of the english language. sounds like you're interpreting the statement to mean something it doesn't. any further responses trying to defend your "point" will just make things worse. i'm not disagreeing with your idea, you just don't know how to phrase it properly.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Nov 2nd, 2005, 8:40 AM   #50
BadBit
Programmer
 
BadBit's Avatar
 
Join Date: Oct 2005
Location: UK, South West
Posts: 33
Rep Power: 0 BadBit is on a distinguished road
I started with c++, people learn in diffrent ways, so diffrent books are beter for some people than others. Rather than change your programming languge (This is a good choice). As to the comment about c++ not being very good for specific things like database's theer are extentions to the common libary. I personally find c++ good because it's so versatile. I do alot of socket/ network programming and i wouldent use any other than c/c++ and CORBA to do this. C is also the most comman languge so you will find alot of support.

As i said trie diffrent learning resource rather than change programming language.
__________________
The GNU documentation says that this bit is set when the stream is "unusable". Presumably the intent is that once this bit becomes set, all bets are off on that stream forever.
BadBit is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:40 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC