|
|
Eesh, this is why I had to stop making pizza; got tired of copy and pasting pepperoni from other companies.
On the serious side, look at your pizza analogy a different way. Each ingredient is a piece that has already been solved. You might not care how that cheese or pepperoni came to be, and you'll probably not have an improvement on how it's made, but you know it goes on that pizza. At some point, you learned how to use that ingredient, and why you might want it in the first place. You likely know what makes a good pizza topping, and what does not. In some cases, maybe you'll want to make your own dough. Are you going to reinvent dough into something the world has never seen? -of course not, but it can still be satisfying to make, even knowing others have already done so.
At the end of the day, appreciate the learning of why you might want that/a solution, rather than just, "I know where to copy the answer from." Your creativity will certainly not suffer.
modified 21-Oct-20 14:18pm.
|
|
|
|
|
But this is the problem. If I sweat and work on my solution, I usually come with the same solution that many people just memorize and learn how it works and it's not different from my code which make me sit from the early morning to the latly night to write it and in the end of the day, the teacher will probably think that I also copy that from somewhere. Not even at real exams I can prove that my hard work was worth it. When I fight with some problem because I want to come up with my own solution, someone writes down what he/she memorized from a tutorial or a book and he/she gets better grade. This is what I hate about those algorithms, they don't measure your knowledge anyway. Making your own program shows that no one did it, you invented yourself.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Kris Lantz wrote: In some cases, maybe you'll want to make your own dough. Are you going to reinvent dough into something the world has never seen? -of course not What? Are you calling it "making your own pizza" when you are not making your own dough? And are you not experimenting with the dough? Different kinds of flour, adding sesame seeds or nutmeg or shredded coconut meat?
Pizzas invite to experimentation, both in the dough and topping. Woody Allen taught me to use coconut in the topping (although I believe his joke was referring to a whole nut).
I haven't made a pizza according to a "recipe" since I was a schoolboy. I never will. I may glance through lists of ingredients to see new and exciting combinations, just to get some ideas. I never try to copy someone else's work.
|
|
|
|
|
Coconut. On. Pizza. You Madman!
My wife would murder me if I snuck in coconut on a pizza. She hates the stuff. I decided to look at other people's coconut pizza answers, and some actually do look great! I'm a fan of coconut flour in particular, so I may have to give some pizza dough creativity a whirl.
|
|
|
|
|
Member 14971499 wrote: 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. Actually, I never realized that. But if you say so...
So use your creativity to expand the game. Make the board non-flat, but like a cylinder. Or a torus. (Sphere shape is more troublesome!) Se how spaceships behave when they have made the round and return to the base. Or you could make life cells of two colors, and define rules for behaviour when cells of different color meet. Do they ignore each other? Merge into hybrids? Kill each other?
Make some minor adjustments to fertility. Introduce small fluctuations (by a random generator) in fertility. Make a competition by splitting a (finite size) board into two or four equal pieces, maybe with a DMZ between them, and let two or for players set up their artillery to shoot down the others. When the situation stabilizes, the winner is the one having most live cells in his part of the board.
If you are truly creative, you sure can make up a lot more variations on the Game of Life.
|
|
|
|
|
Member 14971499 wrote: Well, I have few books on problem solving. But how helpful are they when I have a problem with only one solution?
If you search for an answer to a problem and copy it, you have learned nothing.
If you solve the problem on your own, you have learned something. It doesn't matter if 100,000 people have already solved that problem -- you used your problem solving abilities to produce a solution. You have expanded your own abilities, at least a bit, and proven that you can think. Plus, you now understand that bubble sort, and possibly why it works and why it's inefficient for large data sets.
You appear to have a complete lack of understanding of what professional programmers do.
The short answer is we solve business problems. It doesn't matter if the program is a game, a commercial web site, a management application, or an esoteric laboratory tool -- it's a business problem in the most basic terms. The programmer is paid to achieve a goal, not to solve complex problems and reach enlightenment.
It's not always cool, it's not always sexy. Mostly it's not. Programming can be grunt work, frustrating grunt work.
Sure, if I need a bubble sort, or a shell or quick sort -- I copy it. Or use a library. Why? Because I'm long past the learning stage and have written dozens of sorts to solve immediate problems. I learned those lessons decades ago and there is no value to my employer for me to write one.
When I make pizza, I don't use a recipe. Why? Because I've made thousands of pizzas and I make one without having to think about what I'm doing. I solve the immediate problem (needing a pizza) using the tools (ingredients) I have at hand utilizing my experience.
|
|
|
|
|
Here's a food analogy for you: Do you expect to be a master chef from the first day? Or a concert violinist? No. First you have to learn to make the standard sauces. First you have to practice scales. There is only one way to do these things, and you have to learn to do them right and repeatably, before anyone will pay to eat your cooking or listen to your performance. That there is only one way to do these things is actually a feature, because it allows you to check that you're doing them right. If you don't think doing them right is important, you are in the wrong degree program. Perhaps sociology...
The library of algorithms in Java will take you only so far, just as a recipe book will only take a master chef so far. Following a recipe makes you a cook, but not a chef. Using only the pre-written algorithms makes you a junior programmer, not a principal engineer.
If you don't like all this learning and practicing, better find a new career path quick, before you have spent too much time and money on CS.
|
|
|
|
|
Even with GoL, there are multiple possible approaches. The 4 loop algorithm you mention doesn't scale to dimensions higher than 2, nor does it work too well for hexagonal packing (where the grid is a honeycomb pattern, rather than a rectilinear layout.
Possible other implementations include using a neighbourhood list, and recursion (to handle arbitrary dimensioned rectilinear layouts).
What are the performance tradeoffs for each of these algorithms?
Etc.
|
|
|
|
|
Undergraduate classes are like having a job where you get sent on courses as part of a training program. Only graduate students get to have ideas of their own. Unless you're Einstein.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
i can see you joined yesterday so there is only one possibility that you are not a troll.
if you are a person who is concerned about his future asking himself did he made a mistake to enlist in CS.
i will try to help by being honest, per my experience.
those problems and algorithms that you learn and examine in school, 99% of the time are going to be THE ONLY interesting stuff about CS in your lifetime. unless you are a very very lucky person to end up working in research of some kind...
as a CS your job will most likely be to maintain/create/repair some insignificant boilerplate class made by God knows who, left, then maintained by some other unknown and a couple of others who left the place before you have arrived to work and make a living out of it.
and by insignificant i don't mean to measure it by size, because believe me it's going to be huge.
insignificant by it's purpose, because the would would been just fine without it and the many millions of classes of that type made by the competitors of your future company. it's just a working place so you have to do something.
truly great software is made very rare, but it is all around us. it's what's makes the world run.
i would enjoy working on the algorithmic problems they teach you at school (be that sorting, searching, AI, encryption, compression, fractals.. ) for the minimum wage, than this corporate stuff of adding new features and repairing bugs in applications that have thousands lines of code that don't solve anybody's problems even if it had been working.
to finish.
imagine that there is another civilization on Mars or Saturn and imagine it any way you like it. another type of society totally different than what we have here (capitalism, socialism, feudalism or whatever).
those algorithms at school are going to be probably the same on Saturn or on Mars. also the programs that would run the supposed rockets from Earth to Mars and theirs from Saturn to Earth.
but the other 99.98% of every day programming work that is done on Earth will be worthless on Mars and Saturn, no matter how much important it makes to feel the people that do it.
best of luck
|
|
|
|
|
Thank's, actually I would be happy if i wouldn't have to do those algorithms, and even worse to come up with my own versions of them by the deadline because otherwise Im done as a programmer.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
The purpose of memorizing algorithms is to give you the tools to solve higher-level problems. In over 99% of the problems that you face while programming, you will find that someone has solved parts of the problem. It is up to you to decide how to string all of these parts together.
As a simple example, assume that part of your requirements involve producing a sorted table of data. The constraints of the problem affect how you will sort the data:
- Do all of the data fit in memory (RAM) at one time?
- Is additional memory available?
- Is additional disk space available (beyond that required to store the data)?
- Performance issues - time, power usage, etc.
Each of these constraints affect the choice of sorting algorithm, and may in turn affect other parts of the design. It is your duty as a designer to choose the best ways to perform the requirements.
The challenge of software engineering is not in writing basic algorithms, but in putting them together to create a working program.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: , but in putting them together to create a working program.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Well, what you described is the real world problem. Now I wonder how you apply bubble sort and Conways game to that? So how you solve the problem you described? Well, you look at the existing libraries or you come up with your own solution. Algorthmic problems? Allways. Reinventing the wheel just to feel like you're intelligent, I think is showing more stupidity than intelligence.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Member 14971499 wrote: Now I wonder how you apply bubble sort and Conways game to that?
You don't.
If I may use an analogy from another field, every carpenter has to know how to drive nails with a hammer. However, building a table requires much more than that: selecting the right sort of wood, measuring, cutting, assembly, finishing etc. Learning how to write bubblesort or Conway's game of life is similar to the toy projects that you are given while learning to be a carpenter. They are not too hard for a beginner, and they teach you something about coding (or carpentry).
If you are self-taught, this sort of approach may be frustrating at first. However, a good course will use even these simple projects to teach good practices such as code factoring, documentation, etc.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
The idea isn't to copy and paste other people's code, but to write it yourself. Things like algorithms for sorting don't require large programs and, by building small ones, you will acquire the skills to build larger ones. That said, it sounds like you've already done a fair bit of coding, so you may find this tedious for a while. If so, it won't stay that way and is just something you have to endure for a year or two. Once you get to your 3rd or 4th year, you will be able to work on more interesting projects, such as compiler or operating system components. If you find things easy right now, you should also have extra time on your hands, in which case there is nothing to prevent you from working on your own projects. Many articles submitted to this site are written by people who do exactly that. Many of them have retired but still code and write about it as a hobby. I'm one of them.
P.S. As an aside, no one wins chess tournaments by memorizing opening lines. I'm an average tournament player and, believe me, it's far from that simple.
|
|
|
|
|
But the question is then, so what are those libraries for? What is the point of reinventing the wheel? I understand if talked about problems in real programs, not some exercises that you will only see on the interview and CS-exam. I feel like I waste my time... Why learn something that you have to forget about after you get your job. Because dont tell me you do bubble sort at your job, when you have all those libraries? Or are making Conways game of life? Why not learn solving problems that I actually meet at my future work? Becase time is money, and I feel like I'm wasting my time...
modified 3-Jun-21 21:01pm.
|
|
|
|
|
You have to be given problems that are simple enough that beginners can do them in a reasonable time: a few hours (because if they can't do it in that time, its' not going to get done at all!)
If you were given as your first task "write the code for an industrial inkjet printing machine for traded- and consumer- units, including the user interface to this 50 page document" you'd go "Urk!" and abandon the course.
Beginners don't have the skills to analyse a problem, design a system, implement it, document it, test and debug (repeat as necessary all previous stages as a result), cope with spec changes on a daily basis, ... all the little bits that "real world" developers have to do all the time. And even if they did, they don't have the time, and teachers don't have the time to mark it effectively for a whole class full.
So teachers set little problems you can do, and work up to more complex problems that build on the basics slowly enough that you don't feel overwhelmed.
"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!
|
|
|
|
|
My impression is that he's in a world of copy-and-paste. He may think of it differently. He may describe himself differently. His first source is to see what someone else has done and copy it.
I'm one of those self-taught types. Wallowing in errors - and the thrill of solving one - and even more, all the stuff learned in solving it. And - like "way back when" with a paper encyclopedia or dictionary: after you look something up, how can you resist looking at some other things that followed it or preceded it since, after all, the book's already opened and before you. In C, I looped through an array using indices. Then I came across someone incrementing a pointer, instead, and using that? Why? It was a tool in my mind for recursive functions (like English-to-Piglatin converter). So much overhead just went away. Ah Ha !
Even his complaint is a rehash of Ecclesiastes. The difference, of course, is that Solomon experimented with changing his views and developed insights.
As you know, I occasionally get harsh - but this guy's so full of himself. It is the one facet of his arguments that is consistent.
Admittedly, I follow the philosophical hubris of Hannibal:
"If I cannot find a way I shall make one!"
(or know the reason why)
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 |
|
|
|
|
|
There is an argument for ignorance being really useful - not only for debugging, where describing a problem to a moron can really help you work out what you did wrong, but also in the sense that if you don't know something can't be done, there is no barrier to your trying. And sometimes, just sometimes, you can get it to work and then it was obvious all along!
I've done that a few times, and it's wonderful when you have the impossible working ... but most of the time you fall flat on your face, or set fire to the desk by accident
But this one comes over as a child: he wants to be handed solutions but he wants to "solve" really complicated problems without the effort of learning how. Sad really - particularly since it's costing him a lot of money to ignore the opportunities he has in front of him.
"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!
|
|
|
|
|
At first, I wasn't going to keep extending this but I happen to probably make my living, to no small extent, off of governance.
I wall readily admit that it would not be difficult to find a "better" programmer than me. I have learned, in a way, a patchwork and much of the theory . . . I don't even know what I don't know. Actually, that was also true in the world of Chemistry.
But in the latter, having never taken a course in catalysis or surface chemistry I came up with the idea of Induced Surface Ensembles on Transition Metal Surfaces. Inspired by a (fired) mathematician that was sitting next to me who told mine (ironically in this current context!) about predator-prey games. Computer modeled (Monte-carlo 2-D surface simulatation), proven experimentally as well, and patented by employer - and Marcel-Decker wanted me to write a book on Computer in Chemistry. All this in a bunch of field in which I was, well, truly ignorant. In grad school, I invented several pieces of equipment (simple stuff) that became staples because they were such an improvement over what had been done (literly, orders of magnitude). &etc. Some rather famous persons, such as Gabor Somorjai[^], wanted to work with me - ignorance on their part !
Same for programming. One of the bosses here, now CEO, once said to me "what does every do here? Some give them some papers, they add something to it and give it to someone else. Everyone is doing the same thing." - hit me like a ton bricks as it soaked in. Especially since, at the time, I was reading about XML - and completely reoriented how I code. Not the fine details of it (a function of experience) but the global view. So - I work for an insurance underwriter. My applications are totally unaware of this. They'd work equally well for a restaurant or garage. Let the actual data accessorize it into distinctions. Why should I care? On the other hand, all else being equal, if you built the same functionality, it would be gang-busters better in organization and probably performance.
So - as I've said before - I'm a paid problem-solver. Everything I know is applied to everything I do. That tired expression "think outside the box" - what box are they talking about?
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 |
|
|
|
|
|
If you have an exercise where you have certain limitation. The teacher want you to make a game that follows strict rules, how can you experiment? Can you experiment when you drive a car? No, a car drives allways in the same manner. You can't experiment and put a gas when want stop the car. The same with Conways game, if you have to use 2d array, make it with one loop. If you make it using only one loop, I will come back here and tell everyone that I'm a clown and I'm sorry. Please, don't compare CS to being self-taught. As self-taught you do whatever program you like to, and read whatever bookm you want to, and you can experiment how much you want. I would love to do that. But when you take a loan and you have to find solution to a problem, where you are restricted by instructions than you can't experiment. Of course, you can sweat and fight with it but the result will be not different from someone who copied it from internet.
modified 3-Jun-21 21:01pm.
|
|
|
|
|
Such a narrow view. If you were a horse they'd call that a result of blinders.
So you re-code that new nemesis of yours, that game. You make the instructor happy. And at the same time, figure out how to enhance it - make it do more - experiment with it. In fact, you could learn how to leave 'stubs' in your code for later additions.
The thing is, the world is full of mindless hacks creating unimaginative code. Where I work, they get that quality whenever they outsource - particularly to "foreign lands". It's just the way it is. It's not that the people in those places are less smart - they just turned a craft into an assembly line and they get to produce products, accordingly.
Myself? I will argue with whomever wants me to build an application (assuming it doesn't fit into the abstract ones that can handle most things as-is). Ultimately, senior management gets my point and agrees - even if one of them is debating with me. I explain why until they understand - and if they still want something, OK. They all understand that it's easier for me to just code sh*t as people request it then to argue so it's done correctly. Loved? Maybe not. Respected.
So, your exercise is only limited by a narrow view of following the instructions to the letter. You can make more of it . . . or continue your path to the assembly line in some field of endeavor.
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 |
|
|
|
|
|
I always try to come with my own solution to a problem in my homeworks, but it always ends up with me being late and looking like an idiot with low IQ becuase everyone already did it, and than I at least try to rush it make it as easy for myself as I can and I end up with the solution that is all over the internet and I look like a fraud. Maybe I'm an idiot? And should come up with something revolutionary in three days, but well I can't... and then I wonder: Why do I even bother? Why not just memorize those algorithms because in the end of the day it doesn't make a difference.
modified 3-Jun-21 21:01pm.
|
|
|
|
|