|
Well, this is the problem. In the beginning I tried to solve those problems by myself, but some problems has only one solution that you have to copy anyway. For example Game of life, can you do it just with one loop? No, you have to use 4 loops. You can put them inside methods or create classes but still you have to copy this solution. Same to bubble sort. You can't invent anything new. You have to copy. Because there is only that one solution, because otherwise its not bubble sort. So why bothering even to think? If the result is anyway that same solution. The other thing would be if I made a whole program from scratch... a game or an app. Here I can implement new solutions and really think for myself. I don't have to reimplement other people's ideas, unless I find them useful. This is the main problem.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
The idea of "reinventing the wheel" in producing your own version of the code for a bubble sort for example is that it teaches you how to think about problems, how to approach them, how to break them down and work out how to implement a solution. Copy'n'paste doesn't do that: it teaches you sod all, except to be reliant on other's work - which when you get a "real world problem" that doesn't have a ready chunk of code on SO or CP means you have no idea where to start.
Have a look here: If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^] It goes through a simple problem and shows you how to start thinking about solving it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Well, I have few books on problem solving. But how helpful are they when I have a problem with only one solution? Like Conways game of life. it has only one solution. I can't be creative and maybe use a while-loop or just one loop. No, this problem has only one solution - 4 loops. And what we actually learn as students is to copy these fourr loops, because there is no other way to recreate this game. If the problem was, create a program with such and such funcionality than I could create anything I wanted as long as it had thsi functionality. Let me give you an analogy of food. If someone told you: make a pizza. How creative is that? You have to follow a recipe, copy that recipe, or it's not a pizza. These is how those algorithms work, you have to recreate certain recipe, otherwise you didn't solve the problem. So you memorize all those recipes and you recreate them, and the worst thing is that in the end of the day, you don't even use them because you have huge libraries with all those algorithms prewritten. If I at least have use of them, but I don't. When I create my own programs I solve much complex problems and I don't find it hard at all. Why? because I see meaning in what I do. Here I don't see a meaning besides to pass exams and make the interviewer glad.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
I think you will most likely find in the real world you will never be asked to write Conway's Game of Life. Most business problems are far more complex and require considerable thought. People who try to do it by cut and paste tend to fail quite quickly. Or, worse still, the business fails because the code does not work.
|
|
|
|
|
Member 14971499 wrote: Let me give you an analogy of food. If someone told you: make a pizza. How creative is that? You have to follow a recipe, copy that recipe, or it's not a pizza. I think you summed up the problem quite well, here.
You are a recipe follower - or you'd not be complaining, here, about not being able to use your imagination. You may think you are more, but, solving a problem yourself, even though it's been done, is not just a learning experience but a chance for you to use your imagination.
I think your pizza idea is a perfect one - you think there's only one solution. Have you and idea how many types of pizza there are? NY Style. Chicago Style. Heaven only knows what they eat in Europe.
So, you'll say they're all just basically the same? Well so is every person; so is every car; in fact, so is every day in your way of thinking. Why bother going on to more days when they're all the same?
Damn you must be bored with more than just coding . . .
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
And of course ... the dreaded Ham and Pineapple ...
Truly the VB of pizza!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
(originally) a Hawaii/West Coast thing.
When I heard of it I was to shocked to even gasp.
What next? Washing one's hair and face with Vaseline (petroleum jelly)?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Trust me, ham and pineapple is almost normal. I saw, and ate, in Neapolitan places in Italy, horrors your feeble minds can not even begin to grasp.
Most italians dread of fruit in savoury dishes but that's just dumb traditionalism.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Of course, its a good analogy. You can add a pepperoni to it, but it still follow the same recipe. Just like conways life of game, you can add some function, you can create a class, but you have to implement four for loops, and there is no other solution to the problem, so even if you sit down and come up with that solution on your own is not any different than the code that other people copied from the internet, and the teacher and the interviewer will not see a difference between the code that you fought with for a week and the code someone copied and just learn how it works. Maybe your variable's name in your loops is int row and int column but in his is int i and int j. Just like in pizza, in Ahmed's pizza is pepperoni, in Steven's is chicken but still is made from same recipe. There is no pizza made of rice or made of noodles. The same goes for those common algortihms. You can't invent anything new here. Bubble sort has only one solution, and you can name your variables different and maybe use some function but still it follows only one formula which you have to memorize. It's not the same when you create your own program. Here your imagination is the limit. You can make it whatever you want it to be. You can create your own game, with even more complex logic than Conways game of life. That's why I start to hate programming because I just reinvent people's ideas. I would like to come up with my own ideas not follow someone's formula.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
It appears, in the real scheme of things, you've given up on life.
Back to your pizza. No rice pizza? Wrong! An imaginative person or person(s) made that. And also cauliflower pizza crust - solving the problem for those who can't (or won't) eat gluten. And pizza made with noodles? Wrong again: pizza with ziti as a topping. Or, look at it another way - by various names there are casseroles made with noodles, tomato sauce, and cheese. Well - someone without imagination points out that the noodles are just flour-and-water, so it's just the same.
Did you ever have sex? OK - if so, did you try it a second time? It's always basically the same.
You know what's curious? My coding theme is to do treat things just as you think about them - to try to make everything the same. Solve an extremely generic problem with as much of neither TRUE nor FALSE as decisions, but more of "DON'T CARE". In fact, if you abstract it enough, everything is the same - but then there are the accessories.
But that's not at all how you think. Aside from your outright obsession with "Corway's Game of Life", you think seeing things the same is a bore - I see that as a way to build from the lowest common denominator extreme functionality.
Your problems extend far beyond your CS classes - they just brought them to your attention
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Why do you assume that there is only one solution? There is one algorithm for the GoL, but there are a huge number of different ways to implement it, many of which don't use a single for loop, much less four!
And that before you even start thinking about multithreading solutions, pointer arithmetic, and so forth.
Think about the first "only way to do it" for GoL: why do you want a 2D "board" when you can use a 1D array much more efficiently?
Think about Bubble Sort: there are as many different way to implement it as there are developers actually writing the code! And when you've written it, it's obvious that it's not very efficient for most "real world" collections to be sorted, and that a couple of simple changes would vastly improve the efficiency, and implementing that and a testing framework to measure the improvements.
Going in with the mindset of "it's all been done" is a major limit on how you can think about problems, let alone solutions...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Actually when you are telling me that, it sounds really fun and I would love to try that, but my CS-exercises are not like that. They are like: You have a 2-d array and bla, bla, bla and yes make that game with those ingredients. Well, there is not much space for creativity here. Believe me, I sat few days and try to impress my teacher that I'm really passionate about it, and I'm not like those who just copy and paste and go the easy way... But I looked in my books for some inspiration, but it looks like there is only that one solution - those four for loops... If there is you can do that in different way, if I missed something. Beleive me, I will fight with that program from morning to night to find a better way. Because what I see is that I sweat and sweat and in the end of the day I come up with the same solution that everyone copied, and the teacher doesn't see a difference from my code and theirs anyway... The difference is just that I was stupid and didn't sleep in many days and they just memorize the solution and learned how it works. But thank you fro your answer, it really gives me a hope.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Member 14971499 wrote: But I looked in my books for some inspiration, but it looks like there is only that one solution - those four for loops... I can tell those loops have been driving you crazy!
But despite what you say about "copy and paste", what you say in the quote above is that instead of wanting to copy + paste those four loops, you decided to look in some books for someone else's idea so you could copy and paste that idea instead...
The other thing to remember is that although you might be coming up with the same solutions that others are copy+pasting, you are learning how to write code to solve a problem; the others in your class are learning how to copy + paste, and as soon as they hit a real-world problem that doesn't have a solution on the 'net, they'll be lost - and you'll be soaring away. In the meantime, if the algorithms really hold no challenge for you, then experiment with the syntax; experiment with writing the shortest code, or the fastest, or the most obscure. There are more ways than one to be creative in development.
Good luck, and I hope your tutor sets some more "interesting" tasks for you soon!
|
|
|
|
|
hahahaha you're so right
modified 3-Jun-21 21:01pm.
|
|
|
|
|
By the way. Well, I think they are challanging. They are hard, but I don't like the way they are taught. I simply find those games boring, like the problem itself is very hard but if I could use them in my own game it would be much easier to learn. When I do my projects I love to solve the problems, because I want to see my game work, but because I find those games and examples in the exercises boring, I just want to rush through them so I can sit and work on my own game or program that will do what I find useful. If we had to implement the same logic from Conways game of life in a more fun game than I would enjoy it, but I'm bored by the game itself. The example itself is boring, not the problem itself. It's like those bankaccount projects. Is it the only program that can teach classes and objects? I believe someone can give some more engaging examples than this same bankaccount project that you can find in every book and tutorial. I read a book about game development and the author also implements some of the common algorithms but I think its fun to do it when use it an little rpg game and not this boring Conways game or just this raw bubble sort exercise. What I would like to know is what can I use those algorithms for, because it's easier to learn things when you know why you need to learn something.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Quote: “Its the not the Destination, It's the journey.” Seems from the above that what's winding you up (in part) is that you're not interested in the end result. Big lesson here. When you get a job in IT, 90% of the work you'll do is on deadly boring applications. You know, insurance premium calculations; credit card reconciliations; theatre booking systems; parcel tracking. Not things you'll want to spend your spare time playing with. If you're only into programming because of what it can achieve, you'll struggle to do it commercially. Take it up as a hobby and create wildly exciting games, sure. But if you want to enjoy your work, then learn to enjoy the process of development. Investigation, analysis, design, coding (and testing and documentation )
You said in an earlier post that you're disillusioned not just with CS but with life, that you'll never get to do what you enjoy. Hang around in this forum for a while, and you'll learn that there are a LOT of us here who absolutely love what we do (and it doesn't depend on which industry we're in). For many of us it's a dream come true to actually earn money doing something we enjoy so much. (Of course, no-one is saying it's all perfect 100% of the time!) But if you don't enjoy the activities involved in CS but only the end result, maybe it's not for you.
|
|
|
|
|
I have long complained on here about how CS/programming is taught. I've been programming haphazardly since I was a teenager, professionally for 15 years. I got my bachelor's in CS 2 years ago. I'm working on my master's now. I learned nothing in my classes. The classes/degree tell employers that you 1) have some knowledge, 2) can jump through hoops - both of which are required for ANY job.
I agree with the an above post that the process is most important. Did you start from scratch, debug that code and create a monstrosity that worked? Then you learned something - don't create monstrosities Clean, simple code that is easy to maintain is best for most projects since there is always someone else that will be looking at it. They never teach this in school. A book about code smells (and how to prevent them) would be more helpful.
Also, the point of all those exercises to recreate algorithms is to learn the details of how they work, their pros and cons, differences between them. Schooling is usually more about theory than practice.
In the real world, the creativity is there. I call programming art & science. I hope you enjoy it as a job, even if you don't enjoy the schooling part.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
Thank you
modified 3-Jun-21 21:01pm.
|
|
|
|
|
gah I shoulda read more replies before I posted.
Elephant elephant elephant, sunshine sunshine sunshine
|
|
|
|
|
I actually cook at home myself. You'll find a plethora of recipes for pizza crust alone. You can find all sorts of regular flower based ones, all sorts of keto ones, etc. There is absolutely NOT just one recipe for pizza.
When I use recipes I do what you should do for coding. I look up a recipe and find one close to what I think is a good starting point. I try it once and if it's working I modify it to my liking. If it doesn't work then I either eat it anyway or toss it out and find another recipe.
If you've ever spent time doing code katas (which are pretty much college problems) you'd see that you can do the same problem with several approaches, just like your pizza. Take Gilded Rose for instance. You can solve the problem once looking to practice SOLID principles, again thinking about using functional programming, again with something like javascript where there are other cool techniques you can use. I've used coding katas for company events and I can tell you that the same problem has many solutions.
Sure the basic algorithm may not change in a lot of cases but that doesn't mean the implementation is exactly the same.
You're partially right that we do have some things that are the same. Algorithms and design patterns are there for a reason, but the implementations are not always the same. You can take one algorithm and implement it in wildly different languages. Though the same thing (pizza) is begin accomplished, the recipe and steps are varying.
If you don't learn to solve problems, you're goina have a bad time. If you rely on libraries you'll be using a hammer for you're only tool. Which data structure is best for which situation to implement an algorithm? What do you do if performance or resources becomes an issue if you only know one way to think?
This question seems like it's coming from a position of "I already know what I'm doing so why should I have to learn". I think you need to calm down, let your ego go, and start trying to learn. Otherwise you're going to have an unpleasant time in the field.
Elephant elephant elephant, sunshine sunshine sunshine
|
|
|
|
|
I don't know why people assume that. Maybe big egos are that common in this field that you assume that I think I'm to smart to do those algorithms. No, this is not at all what I meant. I find them hard, and mostly I find them boring becuase of how they are taught, which make them even harder. I don't understand why books on Java focus only on libraries if building algorithms from scratch is that important. Believe me I didn't find yet a book on Java which would even touch on problem solving. I have even an impression that the authors are teaching: "Don't even bother. Here. Look at this library". That's why I'm shocked... becuase if it's so important why do I need to learn Java-libraries? Or do I even need to learn them? Becuase now I'm confused... Besides my message was about creativity in programming field. You can think that you are creative by doing your own version of someones game but this still not a creative job, just as you can come up with your own solution to cleaning a toilet as a housekeeper but still housekeeping is not creative job. Being a musician or a writer is creative careers. Of course there are programmers who are like artists like game or appdevelopers, AI-programmers, people like Bill Gates but an usual programmer is just a walking Scanner and you have to have a big ego if you don't realize that just by sitting and maintaing someone's system, who someone really creative made, makes you creative. No, you just as creative as a housekeeper who choose a different detergent for a different toilet seat. There is no creativity in being an office guy who just follow the instructions from above. This is what I mean that I don't enjoy in programming.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
I think you are getting into the wrong field. You may want to try something else. You are making big assumptions for someone with no knowledge or experience.
Elephant elephant elephant, sunshine sunshine sunshine
|
|
|
|
|
Well, I don't have to have experience or knowledge to feel like programming is not enough creative for me, just as a gay man don't have to have experience and knowledge about women to know that they are not enough attractive for him. For a heterosexual man this can sound like an insult: "How can a woman not be attractive?" But guess what? Yes she can, depending on who you ask. The same with programming, maybe making your own versions of other peoples programs is creative job for you but not for me. I come from creative background so please stop assuming I have a big ego. I made music before CS, that's why I know what creativity is about. When I made music no one told me which genre I have to make and what kind of instruments I am only allowed to play and what musical scale I only am allowed to use and no one forced me to only play other peoples music. Do you understand what I mean by creativity? It's not being bound by other people's instructions and restrictions. Well, I never got paid for my music, maybe if I copied and paste other people's music I would be succesful but still that was called working creatively.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
I think comparing it to sexual attraction is quite a bit of a stretch.
Also what you are describing is just a lack of experience in computer science. That's why you don't know how it is creative. Just like you couldn't make your own songs or music before you learned the theory of music. In fact in order to learn that you must first copy other peoples work and practice it until you get good at it.
Learning music or to play an instrument takes lots of repetitive practice of things people have already done. If you don't have the discipline to get through that then you won't be a good musician. Lots of people play other peoples music but never learn to create their own. Just like programming.
Elephant elephant elephant, sunshine sunshine sunshine
|
|
|
|
|
|