|
|
This thread is locked; no one can reply to it.
|
1
2
|
| Apparently smart people are the true idiots. |
|
bamccaig
Member #7,536
July 2006
|
RPG Hacker said:
All this talk about copy & paste kinda reminds me of Limbo of the Lost!
It has given me a game idea. One where you have to solve code puzzles using only copy and paste. You'd start out each puzzle with a single text of code and have to modify it to do something else, but your only method of transformation would be copy and paste (and maybe cut). I suppose a more accessible game would be one where you just had to modify text, not code, but perhaps that's where difficulty levels would come in. Seems like a reasonable idea for a mobile game... Bruce Perry said:
I understand a copy and paste error to be where you legitimately copy and paste something but forget to change everything you wanted to change. Since he has done so much copying and pasting, he will be an expert and not forgetting to change things. You're right that he needs to train himself not to copy and paste so much, of course - but once he's done that, at least he'll still copy and paste reliably when he does need to Doing a tedious and painful operation countless times does not make you more reliable at it. We're humans. Meat sacks. We are forever bad at these kinds of tasks. People don't screw it up because they don't know better. Experienced programmers with 10 years of experience will screw up copy-paste operations if they're doing them repeatedly. Particularly if they're lazy and don't review their patches. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
OICW
Member #4,069
November 2003
|
Mark Oates said: Everything you've said is 100% true. The priority of software development is not on code quality, but your ability to ship. Well yes, but on the other hand you have to ask yourself a question whether you can just forget about what you've written after you shipped it. In the previous work our client wanted us to change some functionality in the application that was under constant development. There were some crunches to meet some release deadlines for milestone versions (trying to mix agile development with clients expecting waterfall because you can plan your spending... but that's for another debate). And what happened during these crunches was that some functionality was hacked in. Not to mention that there was a really diverse bunch of programmers. After some time the client, naturally, wanted to change something in the previously hacked part of the code. The hacks have bitten us in the ass quite hard several times. I can tell you, the code debt you introduce into your codebase stacks until one day the project just crubmles under its own weight. bamccaig said: At the end of the day, game software is basically the same program with a bunch of hard-coded logic thrown into specific places. It's hard to really improve upon that anyway. Generally the game state is one big blob. Interactions happen in ways differently than business software. Hm, I don't think so, you can write a game engine elegantly, just like id Software did with most of their engines. It depends on whether you plan just one title game or you plan to use your engine for more products. Right now I work at a company where we are using one such engine in ways unimaginable. It contains some really old legacy code and the whole thing is nightmare to maintain, debug and, heaven forbid, extend. Not to mention that there are some really nasty hardcoded things, the whole codebase uses macro hell for enabling/disabling particular functionality, hot fixes or whole products. The main game loop is a long piece of disgusting code interleaved with conditionally compiled blocks of code everywhere. Just the worst spaghetti bowl you've ever seen So, no games are not ad-hoc pieces of code flicked together. Do not treat them like it, they are first class citizens amongst other codebases. They are no different. [My website][CppReference][Pixelate][Allegators worldwide][Who's online] |
|
Chris Katko
Member #1,881
January 2002
|
I read up about the Limbo of the Lost. Wow, that was quite the rollercoaster of insanity. Also, intelligent design, both preliminary, and as the design evolves, is going to control how much additional complexity is from accidental complexity. I've been reading some interesting stuff lately. There are two kinds of complexity. Accidental and essential. Essential is what's actually going on. The actual problem is X complex. The accidental complexity is what we, in our lack of omniscience to see the problem for what it is and where we're going, is the complexity we add on top of it. Anti-patterns. Doing things that aren't in our best interest because we fail to understand the problem, or the implications of our design choices. Proper design is about reducing accidental complexity, not essential. The C++ community (and others) has brainwashed itself into thinking essential complexity can be removed with hierachies and abstraction but it's actually the opposite. Encapsulation and abstraction actually increase overall complexity, but allows us to organize the complexity into manageable chunks to keep similar issues lumped together. A programmer can only keep so many ideas in his head at a time, and the more you have, the more likely he or she will fail to notice one or more of the requirements and write a bug, or reduce the rate at which code can be written. We've all been there: Looking at a piece of code and taking the smallest baby-step changes because we're afraid of breaking something we don't quite understand because it's so massive and difficult to reason about. Also, shrinking functions as small as they can go can actually increase complexity. You're reducing the amount of function calls per function, but at the same time increasing the vertical depth of your program. So you could be going from a "complex" 1-page function, to a couple of one-liners, but now you've got to track 8 different functions across different source files and it becomes very hard to visualize the call graph. Mike Acton, of Insomniac Games (Rachet and Clank) really struck a chord with me when he did his talk at C++Con about "the software isn't the platform. The hardware is the platform." It was such a different mindset, everyone was either appalled or confused. He said, as an engineer, you have to be able understand how the code you write will be run on the CPU and cache-level. They kept saying "That's complex. We prefer to abstract away the underlying hardware." and he said, [all paraphrased] "That doesn't matter. If the problem is complex, then you deal with the complexity. What you're suggesting is not solving the problem. The problem of the hardware is still there and you're just ignoring it and hoping it doesn't screw you." He basically suggested that if you're not dealing with the entire problem (relying on encapsulation like quick-and-easy STL containers) then you're not an engineer--you're more akin to a mechanic/industrial tech who knows how to use tools but not why they work and how to break out equations and solve them when something "odd" happens outside their experience. http://www.johnnybigert.se/blog/2012/02/sustainable-software-development-managing-complexity/ Quote: Last words from McConnell’s “Keep it simple” article: “Neither hierarchies nor abstractions reduce the total number of details in a program — they might actually increase the total number. Their benefit arises from organizing details in such a way that fewer details have to be considered at any particular time.” This needs to be my new sig. -----sig: |
|
bamccaig
Member #7,536
July 2006
|
OICW said: Hm, I don't think so, you can write a game engine elegantly, just like id Software did with most of their engines. It depends on whether you plan just one title game or you plan to use your engine for more products. Right now I work at a company where we are using one such engine in ways unimaginable. It contains some really old legacy code and the whole thing is nightmare to maintain, debug and, heaven forbid, extend. Not to mention that there are some really nasty hardcoded things, the whole codebase uses macro hell for enabling/disabling particular functionality, hot fixes or whole products. The main game loop is a long piece of disgusting code interleaved with conditionally compiled blocks of code everywhere. Just the worst spaghetti bowl you've ever seen So, no games are not ad-hoc pieces of code flicked together. Do not treat them like it, they are first class citizens amongst other codebases. They are no different.
I'm not sure if you countered my argument or supported it. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Bruce Perry
Member #270
April 2000
|
I just had a copy and paste error in my TINS entry event.mouse.x = (event.mouse.x - pillar) * screenWidth / (displayWidth-2*pillar); event.mouse.y = (event.mouse.y - pillar) * screenHeight / (displayHeight-2*letter);
-- |
|
RPG Hacker
Member #12,492
January 2011
|
Is it the "pillar" in the second line?
|
|
Bruce Perry
Member #270
April 2000
|
Yep -- |
|
RPG Hacker
Member #12,492
January 2011
|
Now that kind of error just too well!
|
|
|
1
2
|