|
Annapurna1
liberal pussy


Registered: 05/21/02
Posts: 5,646
Loc: innsmouth..MA
|
spaghettification of code...
#8984166 - 09/25/08 12:50 PM (15 years, 4 months ago) |
|
|
i have observed this process first-hand several times..but i still dont quite understand it...if theres any experts on this topic in the audience..then pls enlighten us...thx...
--------------------
"anchor blocks counteract the process of pontiprobation..while omalean globes regulize the pressure"...
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: Annapurna1]
#8984850 - 09/25/08 03:11 PM (15 years, 4 months ago) |
|
|
A bit more information would help. What are you asking? Astrophysics or computer science or something else?
-------------------- Just another spore in the wind.
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: spaghettification of code... [Re: Annapurna1]
#8986603 - 09/25/08 08:39 PM (15 years, 4 months ago) |
|
|
Are you talking obfuscation, or what?
I'll always have a fond place in my heart for GOTO's.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
zouden
Neuroscientist


Registered: 11/12/07
Posts: 7,091
Loc: Australia
Last seen: 14 years, 3 months
|
Re: spaghettification of code... [Re: deCypher]
#8988116 - 09/26/08 03:27 AM (15 years, 4 months ago) |
|
|
My code is pretty horrible because I don't use as much object-oriented stuff as I perhaps should. But if it all works it doesn't matter... right?
-------------------- I know... that just the smallest part of the world belongs to me You know... I'm not a blind man but truth is the hardest thing to see
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: zouden]
#8988140 - 09/26/08 03:41 AM (15 years, 4 months ago) |
|
|
> But if it all works it doesn't matter... right?
Unless you have to maintain it.
-------------------- Just another spore in the wind.
|
zouden
Neuroscientist


Registered: 11/12/07
Posts: 7,091
Loc: Australia
Last seen: 14 years, 3 months
|
Re: spaghettification of code... [Re: Seuss]
#8988144 - 09/26/08 03:44 AM (15 years, 4 months ago) |
|
|
I love it when I see swearing in my own comments.
-------------------- I know... that just the smallest part of the world belongs to me You know... I'm not a blind man but truth is the hardest thing to see
|
Boom
just a tester

Registered: 06/16/04
Posts: 11,252
Loc: Cypress Creek
|
Re: spaghettification of code... [Re: zouden]
#8988287 - 09/26/08 05:51 AM (15 years, 4 months ago) |
|
|
//please fucking work
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: spaghettification of code... [Re: Seuss]
#8988556 - 09/26/08 08:29 AM (15 years, 4 months ago) |
|
|
Quote:
Seuss said: > But if it all works it doesn't matter... right?
Unless you have to maintain it.
Who needs to maintain perfect, immaculately-conceived code?
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
AgingHippy
Flwr Pwr



Registered: 04/19/07
Posts: 15,613
Loc: Necropolis
|
Re: spaghettification of code... [Re: deCypher]
#8989684 - 09/26/08 01:52 PM (15 years, 4 months ago) |
|
|
that would eliminate a lot of programming jobs if code didn't need to be fixed
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: spaghettification of code... [Re: AgingHippy]
#8989718 - 09/26/08 02:04 PM (15 years, 4 months ago) |
|
|
I myself never need to press Backspace.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: deCypher]
#8989739 - 09/26/08 02:11 PM (15 years, 4 months ago) |
|
|
> I myself never need to press Backspace.
I find h works much better. (viva vi)
-------------------- Just another spore in the wind.
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: spaghettification of code... [Re: Seuss]
#8989743 - 09/26/08 02:12 PM (15 years, 4 months ago) |
|
|
h?
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: deCypher]
#8989893 - 09/26/08 02:55 PM (15 years, 4 months ago) |
|
|
Not a vi user, eh?
-------------------- Just another spore in the wind.
|
deCypher



Registered: 02/10/08
Posts: 56,232
|
Re: spaghettification of code... [Re: Seuss]
#8990124 - 09/26/08 04:04 PM (15 years, 4 months ago) |
|
|
Never really trifled with *nix, unfortunately. Need to get around to that.
-------------------- We are all in the gutter, but some of us are looking at the stars.
 
|
supra
computerEnthusiast
Registered: 10/26/03
Posts: 6,446
Loc: TEXAS
Last seen: 12 years, 9 months
|
Re: spaghettification of code... [Re: Annapurna1]
#8995653 - 09/27/08 08:07 PM (15 years, 4 months ago) |
|
|
Quote:
Annapurna1 said: i have observed this process first-hand several times..but i still dont quite understand it...if theres any experts on this topic in the audience..then pls enlighten us...thx...
wtf is spaghettification? isn't that what happens to your body when you get sucked into a black hole? how would that have anything to do with code? possibly you mean obfuscation or minification?
peace
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: supra]
#8997116 - 09/28/08 07:04 AM (15 years, 4 months ago) |
|
|
> wtf is spaghettification?
That is why I asked for a better explanation.
> isn't that what happens to your body when you get sucked into a black hole?
Yep, in terms of astrophysics.
In computer science there is obfuscation and spaghetti code. Not sure which was being referred to. Spaghetti code is code that uses a lot of goto (typically) statements resulting in a large non-linear, unreadable mess. It is commonly seen in BASIC programs or languages (such as assembly) that lack structured programming semantics.
-------------------- Just another spore in the wind.
|
ToTheSummit
peregrinus



Registered: 08/22/99
Posts: 9,126
Loc: Las Vegas
Last seen: 7 days, 8 hours
|
Re: spaghettification of code... [Re: Annapurna1]
#8997239 - 09/28/08 08:40 AM (15 years, 4 months ago) |
|
|
spaghettification of code - a term used by a layperson to baffle rather intelligent computer nerds. Probably the only way said person could baffle them.
-------------------- You invented the wheel....You push the motherfucker!!
|
supra
computerEnthusiast
Registered: 10/26/03
Posts: 6,446
Loc: TEXAS
Last seen: 12 years, 9 months
|
Re: spaghettification of code... [Re: Seuss]
#8997474 - 09/28/08 10:19 AM (15 years, 4 months ago) |
|
|
Yeah, ive heard of spaghetti code, but its not a good thing, and I see no reason why anyone would want to make their code worse....Though, usually people call it spaghetti whenever your code is just a general mess from what I have been exposed to. BUt I also have not been in the industry long enough to really mess with any languages that use GOTO statements...
peace
|
flangenips
Batshitinsanse



Registered: 01/20/08
Posts: 1,520
Loc: aotearoa
Last seen: 8 years, 5 months
|
Re: spaghettification of code... [Re: supra]
#9000876 - 09/29/08 12:52 AM (15 years, 3 months ago) |
|
|
I've just finished a module in my course about structured programming concepts and it states the 'spagetti code' is like ridiculous use of goto statements that generally jump all over the place. Thus making a heavy code a bitch to read through and make sense of the logic.
The analogy i can think of is like having a complex wiring setup for a crapload of electronic devices and trying to find which wires go where after they've all been connected all over the show in a disorderly fashion. You can imagine all the entanglement and how one has to follow a wire almost along its entire length in an out of loops and around and through other wires and loops to find which one is having some issues or which output end reaches which input end etc. Lose concentration and you could be end up at the wrong place or have to start again and follow the course.
Yet still all the cables in my room are all disorganised 
With regard to quick-jobs and smaller programs in spaghetti style though, i'm of the opinion that if it doesn't need maintaining and works fine, bleh its still a success in essence of that, i'm sure my tutors wouldn't want to hear that though I personally think the term 'spaggetti' code is quite fitting.
-------------------- All are lunatics, but he who can analyze his delusions is called a philosopher. - Ambrose Bierce
|
delta9
Active Ingredient


Registered: 10/28/04
Posts: 5,390
Loc: California
Last seen: 13 years, 3 months
|
Re: spaghettification of code... [Re: flangenips]
#9011624 - 10/01/08 01:14 AM (15 years, 3 months ago) |
|
|
The main cause of spaghetti code, if it wasn't already written in such a way, is maintainence. Software tends to get crufty over time, which is why we rewrite it. The most common cause is a small non-perfect basically BOLT ON fix complete with the "// TODO: Fix this soon!" comment. Following that, it is the modification or interaction with code one doesn't fully understand, either because one did not write it, wrote it a long time ago, documentation is lacking, source is missing, or whatever similar circumstance that helps make programs ununderstandable.
There's other issues in relation to "structured programming" specifically, which generally means that you will be testing the results of all functions, using SESE functions, etc. The problem is all that conditional logic can make the code bulkier and more difficult to understand. Forcing Single Entry Single Exit can make some functions less clear and clunky as you add conditionals to force this mode.
According to an older study which helped fuel pair programming, most programmers no matter their skill level make a certain number of minor errors an hour which is supposedly due to their being "too close to the code" so that they miss many things that will make maintainence a problem later that are otherwise caught during pair programming. One such example is declaring variables very far from their point of use or worse, in the case of global variables, spreading their usage around and adding many side effects to your program. Side effects can take a lot of brain power from a programmer to keep track of and they are easily forgotten at a later date and never documented.
-------------------- delta9
|
fushock

Registered: 10/14/07
Posts: 428
|
Re: spaghettification of code... [Re: Annapurna1]
#9020554 - 10/02/08 09:08 PM (15 years, 3 months ago) |
|
|
Same things that make bad code 1. People designing things they should not be designing. 2. Reusing old, bad code and making it do things it wasn't intended to do. 3. Last minute spec changes that significantly change the backed. 4. Specs designed by groups of people. 5. Improper choice in project programming languages. 6. Lack of communication between designers and coders. 7. Unrealistic deadlines. 8. Many different, stubborn people touching the same code and doing things their own way. ... n. Contractors who don't really seem to care about maintainability. My opinion.
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: fushock]
#9022294 - 10/03/08 04:58 AM (15 years, 3 months ago) |
|
|
> 1. People designing things they should not be designing.
Big huge pet peeve of mine. These are usually people that were book smart and able to memorize well, but have never coded a line in their life and wouldn't know big O(x^n) if it hit them on the head. Great, they can draw out use cases, can make pretty pictures with UML, and can point to a pattern in some obscure book that matches. What does functional complexity matter when they have all of this to back up their design?
> 4. Specs designed by groups of people.
Groups aren't necessarily bad. One of the best designs I ever worked on was done by two people. He understood the problem and I understood the programming. We would get into some pretty heated debates about which direction to go, but in the end the design was solid (and the code is still in use today, ten years later). Easy to maintain and scaled well while meeting almost all of the customers needs. Committees that compromise without understanding the implications of the compromise tend to yield broken designs... which are fixed in code, resulting in a mess that no longer matches the design.
> 6. Lack of communication between designers and coders.
Another big one, but is typically caused by #1 above with respect to designers that have never coded and coders that loathe designers that have never coded.
I would add:
n+1: Requiring the coders to write test cases for their own code. Much like proofreading your own writing, it simply doesn't work very well. The designers (or a completely separate group) should be writing the test cases to ensure that the code provided implements the design as specified.
-------------------- Just another spore in the wind.
|
Diploid
Cuban



Registered: 01/09/03
Posts: 19,274
Loc: Rabbit Hole
|
Re: spaghettification of code... [Re: Seuss]
#9027482 - 10/04/08 07:50 AM (15 years, 3 months ago) |
|
|
When I used to write code that ran airliners in real time, bugs of any kind were absolutely unacceptable. Our code was 100% perfect every time. Imagine a misplaced ++ bringing down an airliner!
In that regulated development environment, it was literally illegal for a coder to even discuss the project with a tester, let alone for a coder to test his own code.
It was perfect code, but it did take us two months to produce as much code as most people produces in a day.
-------------------- Republican Values: 1) You can't get married to your spouse who is the same sex as you. 2) You can't have an abortion no matter how much you don't want a child. 3) You can't have a certain plant in your possession or you'll get locked up with a rapist and a murderer. 4) We need a smaller, less-intrusive government.
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: Diploid]
#9027619 - 10/04/08 09:08 AM (15 years, 3 months ago) |
|
|
> Our code was 100% perfect every time.
Did they use formal verification (mathematical proofs) on the design? I would suspect so if it was that mission critical.
-------------------- Just another spore in the wind.
|
Diploid
Cuban



Registered: 01/09/03
Posts: 19,274
Loc: Rabbit Hole
|
Re: spaghettification of code... [Re: Seuss]
#9028484 - 10/04/08 01:06 PM (15 years, 3 months ago) |
|
|
Actually, it went farther than that. This was all done according to an FAA standard called DO-178B which strictly defines the entire development environment from requirements to flight testing.
The requirements were written in a structured language that was machine-readable. This was verified by two independent teams who didn't interact. This went on to two new teams who produced the design specs, again in a structured language. And again two teams validated the design plus a comparator algorythm corollated requirements with specs so nothing could be missed by the humans.
Next it went to coders who worked on modules that were effectively black boxes as far as they were concerned.
Finally, a machine generated all the test cases and wrote the test code and human-readable instructions from the initial requirements, which is why they were originally written in a structured language.
All of this was managed by a database and an integrated environment which ITSELF was developed according to the DO-178B standard. Every tool, even the text editors, OS, and physical hardware used had to be DO-178B certified or it couldn't legally be used in the development process. It goes without saying that no Windows machines were used other than for sending email and scheduling meetings.
So the short answer is yes, everything from the structured requirements through the final flight test was mathematically cross-linked so there were never any mistakes possible.
That said, DO-178B is flexible enough that exceptions are allowed at any stage as long as a committee of the relevant engineers signed off on any exceptions and they're carefully accounted for in the final certification.
This human element in the chain is the most risky. The only fatal failure of software in an airliner that I'm aware of occurred about 10 years ago when just such an exception was made and somehow overlooked by dozens of engineers. It lead to the uncommanded deployment of the thrust reverses on a Boeing 767 in flight which killed a bunch of people.
-------------------- Republican Values: 1) You can't get married to your spouse who is the same sex as you. 2) You can't have an abortion no matter how much you don't want a child. 3) You can't have a certain plant in your possession or you'll get locked up with a rapist and a murderer. 4) We need a smaller, less-intrusive government.
|
delta9
Active Ingredient


Registered: 10/28/04
Posts: 5,390
Loc: California
Last seen: 13 years, 3 months
|
Re: spaghettification of code... [Re: Diploid]
#9029615 - 10/04/08 06:26 PM (15 years, 3 months ago) |
|
|
What language was the code written in and did they formally prove the code itself (not just the design)? Some languages/programs are simply easier to prove than others - some are impossible.
-------------------- delta9
|
Diploid
Cuban



Registered: 01/09/03
Posts: 19,274
Loc: Rabbit Hole
|
Re: spaghettification of code... [Re: delta9]
#9029688 - 10/04/08 06:59 PM (15 years, 3 months ago) |
|
|
What language was the code written in
C. Last I heard C++ was nearing approval and should be formally allowed by the end of the decade. The FAA is very conservative.
and did they formally prove the code itself (not just the design)?
Yes. There were code reviews. This too followed strict guidelines. The acronym was SWII (SoftWare Intensive Inspection) and consisted of exactly four people. The coder, a moderator, a secretary (took notes of and submitted any issues found), and a critic. The critic was primarily tasked with line-by-line analysis of the code, though in practice, all four did this.
No SWII session was allowed to exceed 45 minutes. At 45 minutes, everyone was required to take a 15 minute break so everyone was always fresh. Any changes that resulted from the SWII (there rarely were any) were submitted to the defect tracking system, the fix was analyzed, designed, approved, submitted, then reSWIId before it went into the production system.
I'm lucky not to have to work any more, but when I did, that rigor was refreshing compared to how sloppy most software development was at the time (and probably still is).
-------------------- Republican Values: 1) You can't get married to your spouse who is the same sex as you. 2) You can't have an abortion no matter how much you don't want a child. 3) You can't have a certain plant in your possession or you'll get locked up with a rapist and a murderer. 4) We need a smaller, less-intrusive government.
|
delta9
Active Ingredient


Registered: 10/28/04
Posts: 5,390
Loc: California
Last seen: 13 years, 3 months
|
Re: spaghettification of code... [Re: Diploid]
#9031101 - 10/05/08 02:49 AM (15 years, 3 months ago) |
|
|
Quote:
Diploid said: What language was the code written in
C. Last I heard C++ was nearing approval and should be formally allowed by the end of the decade. The FAA is very conservative.
Let's hope they stay away from C++, then. It is terribly fast and loose (far from conservative) and is very difficult to parse without a lot of context and thus very difficult to formally prove.
Quote:
and did they formally prove the code itself (not just the design)?
It sounds like they maintained very rigorous and excellent development and testing practices; however, this is not a formal proof of a program.
Quote:
I'm lucky not to have to work any more, but when I did, that rigor was refreshing compared to how sloppy most software development was at the time (and probably still is).
Yes you were quite lucky to work there because even now there is little to no rigor in implementing and following up with QA, formal proofs, or even security audits.
-------------------- delta9
|
Diploid
Cuban



Registered: 01/09/03
Posts: 19,274
Loc: Rabbit Hole
|
Re: spaghettification of code... [Re: delta9]
#9031464 - 10/05/08 07:29 AM (15 years, 3 months ago) |
|
|
however, this is not a formal proof of a program
I forgot to mention that the automated system combed through the code and formally proved the logic as it generated test cases. For example, every 'if' statement produced at least two tests and an abstract (mathematical model). If the 'if' statement was compound statement like if (a && (b || c) ) then it would generate at least nine test cases, usually more. One for a, b c, another for a, b, not c, another for a, not b, c, and so on. The logic was proved through this testing mechanism and validation of the abstract.
In practice, there are five levels of rigor, A through E. E level is used for things like the toilet, where a fatal flaw will cause only inconvenience to the passengers and crew. Level A was the most critical and applied to navigation systems, engine control computers, and so on. Level B applied to communications radios that had independent backups. Only level A was exhaustively proved.
This proofing requirement is one obstacle to C++ as you mentioned, though they are working on it last I heard.
-------------------- Republican Values: 1) You can't get married to your spouse who is the same sex as you. 2) You can't have an abortion no matter how much you don't want a child. 3) You can't have a certain plant in your possession or you'll get locked up with a rapist and a murderer. 4) We need a smaller, less-intrusive government.
|
delta9
Active Ingredient


Registered: 10/28/04
Posts: 5,390
Loc: California
Last seen: 13 years, 3 months
|
Re: spaghettification of code... [Re: Diploid]
#9040065 - 10/06/08 11:46 PM (15 years, 3 months ago) |
|
|
That is truly epic! I, for one, am in awe. Actually ENGINEERING programs! Just think if more software was held to higher standards... C++ is held to a moving and loose standard that makes things very difficult to work with in a provable and portable manner. Hopefully they figure out there is little to no benefit to using C++ over C for what they are doing. Managers caught up in marketing!
-------------------- delta9
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: delta9]
#9040639 - 10/07/08 04:06 AM (15 years, 3 months ago) |
|
|
All of the above, based upon my limited understanding (I'm not a formals person), still doesn't prove the validity of the design. It certainly ensures that the code implements the design correctly.
An example would be with the C++ language. There are a couple of places in the semantic definitions that leave ambiguity and can be implemented differently and still meet the design criteria of the specification correctly. Given the statement "i=5, func(i, ++i)", func might receive the values of 5 and 5 or 5 and 6 depending upon the implementation of the compiler. Both are correct by the definitions provided in the specification for the language (because of ambiguity, not intent).
Regardless, a very impressive system they have and amazingly complex. It must suck having to recertify the compiler every time a new hardware type/processor is added. Do they use other languages to interface to the low level hardware (forth), or implement through library calls within C? Even then, they would need assembly, which opens a new round of verification problems. Ick.
-------------------- Just another spore in the wind.
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: Seuss]
#9040761 - 10/07/08 05:38 AM (15 years, 3 months ago) |
|
|
Regarding the accident that Diploid mentioned above (I think)...
http://catless.ncl.ac.uk/Risks/12.69.html:
Quote:
Smith said he told Boeing officials the software could trigger a rogue signal that would cause the plane's computer-driven systems to malfunction. But Smith said Boeing officials in charge of the troubleshooting program told him they "didn't want to get anybody excited" and ordered him to omit any mention of potential system-wide problems resulting from the flawed software from his formal report.
...
Quote:
Smith, ..., said he told Boeing officials the software contained an "architectural flaw" that could lead the unit to send a random signal to other electronic systems within a jetliner, providing them with false information. So poorly designed was the PSEU software, he said, that he recommended that it be completely redesigned.
...
Quote:
For example, Smith said, the control unit could notify the rest of the electronic subsystems that the plane's landing gear was down while the plane was still in flight. That would cause the auto-restow to switch to a ground-speed mode check, Smith said. The system would then "see that the aircraft was going too fast, and kick in the reverse thrusters -- while the aircraft was really in flight.
...
Quote:
Smith said that Boeing passed on the report to Eldec Corp. of Lynnwood, which wrote the software for the company, and the findings were independently verified by other Boeing computer experts. The report says Eldec's software violated seven of Boeing's own software specification.. "This problem ... is a very real and serious impediment to the correct operation of the PSEU," it concludes.
-------------------- Just another spore in the wind.
|
supra
computerEnthusiast
Registered: 10/26/03
Posts: 6,446
Loc: TEXAS
Last seen: 12 years, 9 months
|
Re: spaghettification of code... [Re: Seuss]
#9045505 - 10/07/08 10:38 PM (15 years, 3 months ago) |
|
|
Quote:
Seuss said: All of the above, based upon my limited understanding (I'm not a formals person), still doesn't prove the validity of the design. It certainly ensures that the code implements the design correctly.
An example would be with the C++ language. There are a couple of places in the semantic definitions that leave ambiguity and can be implemented differently and still meet the design criteria of the specification correctly. Given the statement "i=5, func(i, ++i)", func might receive the values of 5 and 5 or 5 and 6 depending upon the implementation of the compiler. Both are correct by the definitions provided in the specification for the language (because of ambiguity, not intent).
Regardless, a very impressive system they have and amazingly complex. It must suck having to recertify the compiler every time a new hardware type/processor is added. Do they use other languages to interface to the low level hardware (forth), or implement through library calls within C? Even then, they would need assembly, which opens a new round of verification problems. Ick.
hmmm...i wonder why they didn't go ahead and implement (well, not implement, but specify in design) the pre-increment ( ++i ) and post-increment ( i++ ) more strictly?
peace
|
Seuss
Error: divide byzero



Registered: 04/27/01
Posts: 23,480
Loc: Caribbean
Last seen: 2 months, 19 days
|
Re: spaghettification of code... [Re: supra]
#9046483 - 10/08/08 05:57 AM (15 years, 3 months ago) |
|
|
> i wonder why they didn't go ahead and implement (well, not implement, but specify in design)
I suspect it was an oversight, but don't really know. When you are dealing with something as complex as the C++ language, it is very difficult to design it without missing something... this was just one example of several that are in the language specification. A formal proof of the language would (in theory) catch these mistakes, but formal proofs are insanely difficult and time consuming, especially for something this large, thus very expensive.
-------------------- Just another spore in the wind.
|
ExplosiveMango
HallucinogenusDigitallus


Registered: 07/12/05
Posts: 3,222
Last seen: 14 years, 2 months
|
Re: spaghettification of code... [Re: zouden]
#9048615 - 10/08/08 04:12 PM (15 years, 3 months ago) |
|
|
Quote:
zouden said: I love it when I see swearing in my own comments.
void DO_YOUR_DAMN_JOB(char *data, int correction);
I was once asked for advice on some code. After seeing this function declaration all I could to tell the guy was "rewrite it."
-------------------- Know your self. Know your substance. Know your source. The most distorted perspective possible is the perspective that yours is not distorted.
|
|