|
Did you read the title of this forum, or perhaps the short paragraph at the top on the rules for it?
|
|
|
|
|
Try here: Ask a question[^]
But ... think about what you are trying to do. Telling us an error message relating to line 1428 of a file we don't have isn't going to get you an answer - and nor is dumping all 1400+ lines of your monolithic code* on us and saying "help". When you post your question, show us the relevant code fragments, show us exactly which line the error occurs on, show us what you did to get it, what you have tried to find out why. Or it's going to be a very long time before we can actually help...
* It's monolithic because it's 1400+ lines in a single file. And monolithic code is generally also badly written code, because it was either not designed at all, or has grown from a small core of code to a confused pile of spaghetti. I'd strongly suggest that your source should be more modular with much smaller files to improve your code quality.
"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!
|
|
|
|
|
|
Maybe we should have a Wordpress forum?
It is a popular platform after all...
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
I was looking at some of my old code - Glory, a GLR parser generator for .NET - and I'm amazed
A) I was able to pick it up and start maintaining it right away despite me having written it in February
B) I understand how it works, but I still don't understand how I did it.
The code is amazing. What it does is just... The complexity of code like my XbnfConvert.cs file just floors me. It's very very clever to boot.
I must have been in one heck of a zone. I don't know if I could do it again.
It makes me happy to know I can write code like this. Or at least I can sometimes. At the same time, it kind of worries me that the code feels like it was maybe written by a better version of myself.
Does this happen to others, or am I just a lunatic?
Real programmers use butterflies
|
|
|
|
|
|
|
I've done it, and I hate it.
I hate hard-to-understand code. Moreso when I know I wrote it, and then find out a while later can't follow it.
When I'm writing new code and realize I'm going down that path, I try my best to get it to work first, then refactor the living crap out of it with simplicity in mind. That said, these two goals are sometimes at odds with each other...
|
|
|
|
|
Second that!
Wrong is evil and must be defeated. - Jeff Ello
Never stop dreaming - Freddie Kruger
|
|
|
|
|
I am in the middle of refactoring to make a thing simpler to understand and all I end up doing is breaking it. I wrote it a few months ago and now need to add to it so i thought, "Well it's refactoring time!" Apparently, that's a bad idea!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Sometimes code is just complicated because it does something complicated, and division of labor only gets you so far, like LALR table generation, or a compiler for that matter.
Real programmers use butterflies
|
|
|
|
|
On occasion, the requirements are convoluted and there is no simple way to do it. Implementing a system that complies with a law that has been repeatedly amended for years or decades is case in point.
I write comments explaining what is being done and why -- this helps greatly in picking things back up later.
|
|
|
|
|
Agreed. This is why I ended with:
Quote: These two goals are sometimes at odds with each other
...as sometimes it's just impossible to refactor and not break anything. Easy-to-read code is worthless if it doesn't do what it's supposed to.
|
|
|
|
|
I've done this two or three times. I've written something over the course of a few months and been so in the groove by the end that I produced prodigious amounts of amazingly complex code to perform miracles of processing. Then I look at it year later and wonder who wrote this? Me? I can't do that! ....but apparently I did.
I wrote an expert system, in FORTRAN, that was still being used, unchanged, over twenty years later. Apparently someone had ported it from one mainframe to another but hadn't changed it in any basic way; they also said they weren't entirely sure how it worked, it just did.
I am currently looking at some code that I have ported from one platform to another three times since I first wrote the basic system in 1992. I started in Rexx on an IBM mainframe, then ported it to C on a PC, then to C++ as a web-hosted application communicated with via email, then to C# as a heavily interactive web-page. I am now making it a hybrid web/desktop for performance reasons but a lot of the innards (in a DLL) are a mystery to me now! Mostly I am changing and expanding the user interface to it.
There are a couple of other complex projects I have done that I probably would have no idea how I to even start on them now.
Motivation helps.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Ha nice!
Real programmers use butterflies
|
|
|
|
|
|
The workplace of an Internet Spider[^], of course.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
It is a desktop program that uses the same web-service calls as the web-based program uses for a start. As I said, it's a hybrid program.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
February?!??
Try Tuesday!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
What annoys me the most is when I've commented the code but can't even interpret my comments anymore
It does not solve my Problem, but it answers my question
Chemists have exactly one rule: there are only exceptions
modified 19-Jan-21 21:04pm.
|
|
|
|
|
rarely do I look back at my old code and am amazed. More likely I am cussing myself because I was an idiot and if I would have only looked at it differently I could have saved myself so much time.
But there was that one time at 3am drunk coding. Still not sure why it works or how but it does. Also, not sure what it does either.
To err is human to really mess up you need a computer
|
|
|
|
|
This is great, I thought I was alone.
I watched someone using one of my tools once. He would start it and due to the size of the project it would take about 20-30 minutes to complete. He was literally just playing with his phone for 3/4's of his day instead of doing other things.
I got so angry I literally rewrote the whole thing an entirely different way while consuming an entire bottle of scotch. I woke up with no recollection of what I had done, but it worked and that same task only took 30 seconds! Years later I did unravel what I did and still don't understand how I made something relatively nice while hammered drunk.
Clearly my first implementation was not a good one, but in my defense it wasn't meant to be run on excessively large data sets at the time.
|
|
|
|
|
I knew I wasn't the only one. <grin>
To err is human to really mess up you need a computer
|
|
|
|
|
It's call "flow" (when it happens).
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
|
|
|
|
|
honey the codewitch wrote: I was able to pick it up and start maintaining it right away despite me having written it in February
In my case, I look at code from a few years back, think "what turkey wrote this crap?", then discover that it was I.
honey the codewitch wrote: I understand how it works, but I still don't understand how I did it.
Occult powers?
(You are a witch, are you not?)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|