Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 01-20-2005, 09:26 PM   #1 (permalink)
Insane
 
cowlick's Avatar
 
Location: Seattle
[C/C++/Java] Confusing Learning To Program With Using Class Libraries

I really am confused about something I've observed.

Whenever I read a message board like this, there's always a novice programmer asking questions about pointers or data structures or the kind of thing that novice programmers are working through. Invariably somebody says, "Why use your own structure - why not use STL". Somebody else says, "You can download some open source code to solve that problem for you".

Why? Why don't people seem to see that learning to use class libraries is not the primary goal of novice programmers? Do these people actually write software with 100% code reuse?

What's the deal here? Am I crazy...
__________________
"It's a long story," says I, and let him up.
cowlick is offline  
Old 01-20-2005, 09:31 PM   #2 (permalink)
Loser
 
Location: McDonald's Playland
i'm right there with you cowlick, people should know that learning to use class libraries is not the primary goal of most novice programmers. You're not crazy, everyone else is, and you're the only sane one.. which means that i'm also crazy, and everything i say is a lie, except for that, and that, and that, and that, and that, etc. and that too
pinoychink790 is offline  
Old 01-20-2005, 09:43 PM   #3 (permalink)
Psycho
 
noodles's Avatar
 
Location: sc
no, you're not

there are a lot of good reasons to not use an openly available library for a data structure. if you need help i'll give what i can

but then again, i'm a primarily c programmer and a computer engineer. i think differently than the CS kids with their OO stuff.
noodles is offline  
Old 01-21-2005, 09:26 AM   #4 (permalink)
Crazy
 
Location: Salt Town, UT
The reasons people try to get you to use a ton of libraries is that this is how it is done in the real world. In 90% of typical programming jobs, nobody cares if you know how to use a linked list, or build a binary tree. You find some library that does what you need it to do and use it. (In the embedded world, you write just about everything from scratch, because you can make a ton of assumptions that the library writers cannot.) This is also the same reason that we would recommend that you use the highest level programming language you can for your particular task, be it PHP, VBScript, Java, Perl or whatever.

Now, for someone that is just learning, reinventing the wheel is a good way to go about it. It is at this stage where you write your own database and everything.

So I think the problem is, is that we can't tell if you are a novice programmer in the workplace, or a novice programmer in the learning side of things. (And I tend to assume workplace, because of my irrational hatred of college kids.)
Rawb is offline  
Old 01-21-2005, 12:47 PM   #5 (permalink)
Crazy
 
Quote:
Originally Posted by cowlick
Why? Why don't people seem to see that learning to use class libraries is not the primary goal of novice programmers? Do these people actually write software with 100% code reuse?

What's the deal here? Am I crazy...
Reuse that which you can't or don't feel like building yourself. Reuse that which you don't have time to build yourself. The rest, build from scrach, and verily, ye shall achieveth l33t skills, my son.

It's that simple.
__________________
I want no escape.
roboshark is offline  
Old 01-23-2005, 05:17 AM   #6 (permalink)
Crazy
 
Location: San Diego, CA
There seems to be a general learning methodology where you can't use any existing tools until you know how to make the tool yourself. A type of ground-up framework.

So, for an example outside of the CS field, in math I learned how to do derivatives the hard way with limits before I was allowed to use tricks/tools that everyone in the real world uses. But does the same type of thing happen in other fields? I guess it depends on the field - in some it's not applicable. Can anyone think of examples that are outside of the math/science fields?
__________________
"Don't believe everything you read on the internet. Except this. Well, including this, I suppose." -- Douglas Adams
Rangsk is offline  
Old 01-23-2005, 08:01 AM   #7 (permalink)
Junkie
 
In my field we know of the STL but it is rarely used. Everything in home grown. This is because we need every ounce of performance we can get. Also because of this we use mostly C instead of C++ or technically "better C" which is C++ after you take out most of the OO.

Everyone should know how to write those STL classes because knowing how those datastructures are created helps you know how to use them better. Knowing the big O for their various operations is a must.

People who just use STL and don't truely understand the datastructures are severly limiting their ability as a coder. I think the biggest benift of coding these up first on your own is they make sure you know pointers like the back of your hand.
Rekna is offline  
Old 01-24-2005, 03:37 AM   #8 (permalink)
Tilted
 
Location: Boston
Quote:
Originally Posted by cowlick
Why? Why don't people seem to see that learning to use class libraries is not the primary goal of novice programmers?
That's not really as clear-cut as you think. Knowing what libraries are available for their language and how to use them is an essential skill for programmers in the "real world" (obviously YMMW depending on where you work). I've had Perl "programmers" come in for interviews who have never heard of CPAN; and for my purposes they couldn't compensate for that by, say, being able to code up a Red-Black tree off the top of their head.

Implementing your own data structures is good practice while you are in school, but I (for one) have been surprised at how little of that translates into the real world. And if I need to pull out the CLR when this stuff does come, it's really not a big deal.
franzelneekburm is offline  
Old 01-26-2005, 06:09 PM   #9 (permalink)
Tilted
 
Or pull out the Yellow card, if it comes to that.
tlimbert is offline  
Old 01-29-2005, 03:55 PM   #10 (permalink)
Upright
 
Personally, I use STL whenever I can. It's a standard practice, and it's been proven to work. It's honestly saved me a TON of time when coding. There have been some headaches with Microsoft's STL implementation, but I am a good enough coder that I can easily deal with them.

Could I write a linked list, map or string class? Sure. But why do it when something as solid and simple as STL already exists?

The bottom linke: when you're learning, you should write as much from scratch as you can. The more you do yourself, the more you will learn and the better you will be. As you learn and know more, you can easily take more liberties with your code.
darkhelmetGT is offline  
Old 01-30-2005, 08:00 PM   #11 (permalink)
Tilted
 
One of the things I know I ran into long ago about learning to program ("how to use pointers") was that a lot of concepts, like pointers, need the right problem to see how they should be used. You can sit around and work on sample code all you want, but it may not help you really understand the why.

The point regarding shared libraries is that for certain cases, like the STL, there is a LOT of work that has gone into them. Many people can write the tools of the stl, but consider:
- The STL is fairly cross platform (I develop on 10+ with the same code)
- It is often fairly well optimized, with memory pooling, tight loops, etc
- It is far more bug free than things you are going to write, in all likelyhood.
- It is a well understood standard. I can write STL code, and other programmers immediately understand it.
ergdork is offline  
 

Tags
c or c, class, confusing, learning, libraries, or java, program


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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:24 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360