Seems like the insertion algorithm could get interesting.
Amen. At work I’m working on testing a C++/SQL script type tool to extract stuff from PST files using MAPI.
I haven’t seen C++ in about 10 years, and have done a lot of 4GL database work and JAVA in the meantime.
C++ astounds me. It’s like they took all the confusing and crappy ways you could do things in C, and object oriented them. I mean, what kind of reasonable OO program uses classes and pointers, yet has no instantiated objects? You can’t even do that in JAVA, but you sure can in C++. Makes the code really hard to follow, let me tell you.
As for the OP: It’s the combination of actually designing and building something and solving problems that appeals to me. It’s like being a carpenter, a mechanic and an architect all at the same time, in many ways.
Blame that one on the programmer, not the language. C++ is definitely a kluge, but it’s also possible to write elegant and easy-to-follow programs in it.
Responding to the OP: Computers are predictable unlike people. Much simpler and easier to work around.
Although,
Why should computers be different?
I wrote an ordered hashtable this afternoon (with guaranteed behavior when you insert at the head or the tail, not just a hashtable with an iterator), and I think it’s spiffy. Skip lists do look pretty cool.
But basically, for me, writing code is as close as anyone in this universe can get to being a wizard. You speak the words of power, and stuff happens. Learning something’s name gives you power over it. Master practictioners tend to have full beards. And so on.
I would say that anything you learn, you do so to use at some point in the future. For instance, I always viewed studying history as being a study of how humans react in different situations, or what management techniques work and such.
But the reason why I like computer sciences (programming) is just because I like making cool stuff–and the more I know, the more cool the things I can make.
I think it should be pointed out that for someone named elfbabe to be going around stating that she’s into data structures is probably any geeks dream come true. (Be afraid. Be very afraid!)
I like tries–never found an application for them where they were the best, but they’re certainly fun to make.
There are tons of reasons… systems have sort of an ant-farm appeal to me. I build it, see how people use it and why… in the process I learn something about the users, about the system, and maybe something about the designer (me).
Then there’s always the love of efficiency. Some people like to make their cars run at the greatest number of miles per hour, I enjoy making a system run at the greatest number of transactions per second. I like trying to figure out how to make things run faster so that there’s more time left for leisure (or for profit, in a business sense).
Classes and pointers but no instantiated objects? Surely you’re joking.
Tell me who does this and where, so that I may never never ever stumble across such a place.
On the other hand, lest we talk about messy languages, I’d like to show you some perl code that I wrote about 4 years ago…
Heheheh. You brought up one of my favorite subjects. I love Perl and use it almost daily. I’ve written everything from one-off one-liners to giant OO systems with over 200 classes in Perl. I find it fascinating how one tool can be capable of such a huge range of uses, and simultaneously allow people to create unrivaled elegance and nightmarish obfuscation. Perl is awesome.
For me, it’s all about control and creation. It’s very hard to describe the satisification you get from getting a project from its planning process to its final build. I would compare it to the ‘urge to create’ that artists have - computer programming is just another medium of expression.
C++ is C with object-oriented bolted on the side.
I prefer Java for OO programming, but a lot of folks in my field want C++, so I’m saavy in that too.
Well, there you go. Most computer science study IS about problem-solving, from programming, to designing new architectures, to troubleshooting why the hell your Windows OS keeps crashing even though you just re-installed the damn thing…
And in programming (and other CS areas), there are a lot of solutions to problems that are the results of creativity and ingenuity, and contain those elements of elegance, and beauty, and used a lot of mathematical logic.
Plus, if you’re the programmer, you’ve got the power, and the control! Muhahahahhahaa!!!
I’ve always liked the hash table. A creative solution to a potentially tricky problem, combining the advantages of vectors (random access, or near it, in the case of the hash table) and linked lists.
That was going to be my answer. I’ve never really understood how people can get so wrapped up in pedantic arguments about languages or algorithms; I just like to get in there and get results, as elegantly as possible. And the “puzzle” of how to split up a problem into component parts and get a result out of it is just neat.
Indeed it is. What’s worse is that I read that and didn’t immediately think, “Gah! How dorky!” but instead thought, “Why, the hash map, of course.”
Me too. Urge to create is a big one.
Also problem solving, love that.
And optimizing, especially when creating an elegant solution with respect to multiple parameters simultaneously.
For example: easy to understand and maintain, performs well, maps back to the problem space without too many exceptions, easily extendable for future requirements, under budget, users are happy, etc. I really enjoy it when I can do all of this at once.
I like Judy Arrays
My first degree is in biology/chemistry. I went back to school to get a degree in chemical engineering, and the first semester I was forced to take a Fortan class (it was 1980). The first time I sat down to write code, a very bright happy light came on in my head, and a voice said, “This is what you were born to do”. I changed my major to computer science at the end of the semester.
Programming and my brain just work together. The world is big and complex and usually incomprehensible, but I can write code that does incredible things perfectly time after time; if it doesn’t work perfectly, there’s always a reason, and ah, how satisfying it can be to find that reason.
When I’m designing or writing code, I go into a world where nothing else exists. It’s a total escape. and it can be a bit of a shock when something forces me back into reality. I sometimes joke that elves write my code, because when it’s done (and it’s always a shock when it is), I really don’t remember doing it. I’m either in that world totally or barely at all.
Frankly, I impress the hell out of myself when I take what is obviously a huge project, start out with a single line of code and somehow wind up with a program(s) that does what I set out to do. I really don’t know how I do it.
Now that I’ve been in the business for close to 20 years, I’ll admit also that I enjoy the power. I have the ability and the opportunity to make some serious things happen.
It’s a good thing I love what I do; if I didn’t, I wouldn’t be able to put up with the unending bullshit of the corporate world.
I agree, there is something quite different about computers compared to other professions.
My computers get put to various uses- art design, video game content, game modifications- and I lose myself in the work much more easily than anything else I do.
I started out as a programming student and I use that to make my computer experience more enjoyable, since I can alter some of the source code and change things in the program without ruining it.
I play a lot of games, but I spend as much time creating game content as I do playing them.
One of my lecturers once said that computer science should really be called informatics - while physics is the study of energy and chemistry is the study of matter, computer science is the study of information, and we need a better name. It’s just that computers are the things that deal in information very well, so we use them.
Reading up on data structures and algorithms is very informative on what makes computer science such an interesting field. The idea that there’s a fundamentally better way to sort a deck of cards than by picking the lowest one in turn (aka selection sort) amazed me at first; you can see the facts before you, they make perfect sense, and yet you know there’s no way you would have the ingenuity to invent that yourself. A caveman with a bunch of different-sized stones could have come up with these ideas - it’s not the gradual progression of technology that’s led to cool stuff like quicksort and whatnot. They’re just amazingly brilliant ideas. I don’t know how else to put it… it’s just so incredibly cool. My algorithms and data structures textbook is one of my favourite books.
Dammit! I was going to start a thread posing that very question not long ago. Ah well, hesitate and you are lost, I guess. My favourite data structure is a 2-3-4 tree. I mean, binary trees are good, but self-balancing trees - how good is that?
Actually, my favourite data structure was the one I used to implement a compiler for a third-year subject called Progamming Language Implementation. It was in C, and it had everything that you could want in a data structure. It was a struct, it was a union, it had bit-packing going on, and - perhaps best of all - it was the node of a tree, with a variable number of children, and they were stored as a pointer-array terminated with a null pointer. It was like a C string, only twisted by the power of evil. Good times. Luckily, that project worked first time I compiled it - if it had required debugging, I think it would have been easier to just start again. This is why I’m in computer science, and not software engineering.
Hey, I just thought of another thing about computer science that is extremely cool. I’m doing my thesis at the moment on genetic algorithms. You can use computers to evolve solutions to problems. That means that you can ‘create’ a solution to a problem, and you don’t know how it works. For example, you could evolve a program to play a game, and it’s like the solution just came from nowhere. No human brain conceived this intellence, and nobody understands how it works - you just grow the AI, and it can beat you. How can that not be cool? Writing an AI that can beat you at a strategic game is quite humbling, too.
So, in conclusion… people enjoy studying computer science because it’s just so cool. How else could I end this post?
~ Isaac
Knowledge is power. It helps you sort of the experts from the bullshit artists.
I remember in 1999, the number of so-called experts predicting doom because of the Y2K problem dealing with the changeover from 1999 to 2000. Most seemed had only a rudimentary, if not nonexistant, grasp of computer programming and electronics. I heard predictions of pacemakers, microwave ovens and clockradios possibly exploding after Decemeber 31, 1999. :smack:
Perhaps, you’ve not been exposed to right kind of computer science. The more abstract branches of computer science are very close to math.
Here’s an example of a problem that is interesting, but for which I see very little utility. Write a program that prints its own source code. (It should not read its source code from a file. I should just run and print to standard out.) See the links for a more difficult variation on this theme.
http://www-2.cs.cmu.edu/~15251/Materials/Assignments/assignment12/assignment12.ps
http://www-2.cs.cmu.edu/~15251/Materials/Assignments/assignment12/assignment12.pdf