Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / [LOCKED] About the thread posted on 'remember.exe'

Author
Message
SamKM
14
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 10th Feb 2015 23:54 Edited at: 11th Feb 2015 01:40
Hey people, this post relates to this thread in the Darkbasic Pro forum which was recently locked:
http://forum.thegamecreators.com/?m=forum_view&t=213575&b=1
I just wanted to write this to clear any confusion - I'm the developer of the 'remember.exe' game mentioned in the post, this post was made by my friend, who was requesting I made a program for him which would run in the background and play sounds when specific keys were pressed. I said I wasn't sure if there was any way of capturing keystrokes with DBPro when the program wasn't in focus, and she said she would ask. I didn't realise she was planning on mentioning this game in her post, but since she did, I just want to say, the game is honestly not malicious in any way - it tries in several ways to 'break the 4th wall', by playing with the computer, (opening text documents, playing background sounds, etc), but doesn't cause any harm to the computer. You're welcome to check out the full source code yourself (which is horribly written) here: http://pastebin.com/qrF8mk8H
My friend's been really helpful with letting people know the game isn't intended to be malicious, since there's been some misunderstanding over that, and I'm guessing took this opportunity to try to let more people know - neither of us were trying to promote the game with this post, really sorry it came across that way.
Sorry for wasting your time with this one, it might seem a little pointless to be making this post - I just wanted to let you know there wasn't any intentional wrongdoing here, and (since it got mentioned), remember.exe isn't intended to be malicious in any way.
Thanks

The code never bothered me anyway...
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Feb 2015 23:59
Oh wow it's all one file.
SamKM
14
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 11th Feb 2015 00:12 Edited at: 11th Feb 2015 01:19
Quote: "Oh wow it's all one file."

I'm gonna be honest, I'm not totally sure what you meant by this, but I've got a feeling you're implying that the game is malicious, but the malware isn't in the code itself but in the attached media? I might have that totally wrong, really sorry if I have, but if that IS what you meant - it's honestly very hard for me to offer anyone any kind of definitive proof that there is no malware in the game, so if you choose to believe it is malicious there's not much I can do to convince you otherwise, unfortunately
If you search videos of the game on youtube however, you can find lots of playthroughs by people who have run it on their computers and not experienced any problems or reported having any problems later.
I honestly have no wish to damage anyone's computer/steal their information/do anything else malicious - I do get though that since I'm a random person over the internet, that falls a little flat - the only other thing I can think to show you as evidence that I didn't have bad intentions is that if I was trying to damage people's computers, I probably wouldn't have spent the time writing that much code to do so!
I might've totally misunderstood you, please ignore all that if I have

The code never bothered me anyway...
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 11th Feb 2015 00:26
Quote: "I might've totally misunderstood you, please ignore all that if I have"


Consider it ignored. I'm not accustomed to seeing the entire source code to an application all in the same file.
SamKM
14
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 11th Feb 2015 00:34 Edited at: 11th Feb 2015 01:20
No worries! Most of the source code is terribly written (massive overuse of global variables, no indenting, weird structures), I wasn't that great when I wrote this! I can't claim I am now, but at least I indent stuff

The code never bothered me anyway...
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Feb 2015 09:25
Play with peoples minds in these games, not their computers.

As soon as your program does something that it's not supposed to, like displaying a window with no close button, spamming text documents, or playing random noises - that's considered malicious no matter which way you slice it. The program does things that the end user does not want it to do.

There is a fine line between what is a virus, what is malicious, and what is just harmless fun, because the harmless fun might make someone just decide to switch off their PC if they think it's being hijacked or infected, and that is a problem in itself. I say there's a fine line, but there really isn't in this forum - we don't want TGC products being used like that and will lock any posts about projects that do these things immediately.

Besides - to me the game looks like it has some nice work in it, I don't know why you didn't spend more time on content and jump scares etc and less time trying to annoy the end user.

I am the one who knocks...
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Feb 2015 10:35
It's all part of the "creepypasta culture", if that's what you want to call it. Your game treads in the same tracks as sonic.exe. Some humans love to be scared and will make up crazy stories revolving around the program.

As to playing sounds, this is not possible in vanilla DBPro without a plugin or use of DLLs. The window must be focused or keystrokes are not captured. user32.dll Has some functions that will do what you want, you should read the documentation on that.

The only way to do great work is to love what you do -- Steve Jobs
kelbris
9
Years of Service
User Offline
Joined: 9th Feb 2015
Location: Australia
Posted: 11th Feb 2015 23:09
I believe that samkm got the idea for messing with the players mind through their computer from games like imscared, I see you and the Luna Game. For instance in imscared after you beat a section the game closes and a text document as well as an image appear in the game directory, after one part you think it is over but a few seconds later the game reopens itself. In I See You the game uses windows error messages to try to freak the player out, the luna game takes your computer and somehow gets your real name from it (I played it and it knew my real name without me entering it, freaky) and it's spin-off takes control of your cursor temporarily and one of the games even creates text documents and images too. The one thing all these games have in common is that unless you re-download them or delete certain files they are not re-playable, same as remember.exe, finally, the 4th wall has (in the demo) a giant static hand move out of nowhere towards the screen AFTER the game is closed and then has a png file open. Am I right Samkm?
kelbris
9
Years of Service
User Offline
Joined: 9th Feb 2015
Location: Australia
Posted: 11th Feb 2015 23:27
I would also like to mention that one of the above Luna Game/spin-offs plays sound out of the game after you beat it (mainly Pinkie Pie's laugh for a few seconds) as does alone.exe (it plays a little bit of laughter followed by the fnaf 1 death sound). The reason I was asking for a way to play the sounds when a button was pressed outside of the game is as follows: my brother was recording a fnaf 2 video (I had played remember.exe beforehand), he started up the cupcake challenge, looked left and right a few times using the switches and then pulled up the cameras, just after doing so he heard the Skull Kid's signature laugh (it is in the video that was in the original thread I believe), he then pulled down the camera and was killed by Golden Freddy. This gave me the idea of using the sounds in my LPs to show BEN's happiness with my progress or giving me something to blame any weird occurrences/deaths on (like Amnesia, having the monster appear out of nowhere followed by that laugh or the HMS laugh), basically meaning I am a servant of BEN. My first LP is going to be on remember.exe to try to dispel a lot of the "virus fever" that started after SomeOrdinaryGamer claimed the game ruined his VM (I call BS there, as I said in my thread a lot of players from the Wayward Horizon forum where the original ARG was discussed played it before and after with no ill effects.)

If you want to see my brother's video, look up "fnaf 2 evil laugh" and look for the one by harogaming. Just to show you what I mean
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Feb 2015 07:22
Quote: "Oh wow it's all one file."


What's so strange? I normally program entirely in one file. FPSC is written entirely in one file.

Quote: "that's considered malicious no matter which way you slice it"


I disagree. There is nothing malicious about it.

Quote: "we don't want TGC products being used like that and will lock any posts about projects that do these things immediately."


Seems harsh to me, but I guess I can see your point. If we allow the genuinely non-malicious programs like this to exist freely then sooner or later someone will make a genuinely malicious program. OTOH you could say that about any type of software...

Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 12th Feb 2015 07:26
Quote: "Malware, short for malicious software, is any software used to disrupt computer operation, gather sensitive information, or gain access to private computer systems."
From Wikipedia, the definition of malware. Not sure that the software in question could be considered malware!

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Feb 2015 07:40
Quote: "From Wikipedia, the definition of malware. Not sure that the software in question could be considered malware!"


My point exactly!

However I after more thought, I do mostly agree that we shouldn't allow these sorts of programs on the forum. They'd probably cause too much trouble.

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Feb 2015 09:19
It's funny just how much malware software is out there that does no harm to the computer. So what do we call these programs, like fake virus scanners, registry repair tools, driver update tools if not malware? I fix idiotic PC issues on a daily basis, both caused by malware and the fallout of users actions because of it.

How on earth can we be sure what else a program is doing - I watched the whole remember.exe video and I would not want that program on my PC - simple as that. I'm not saying that remember.exe will harm your PC, I'm saying it does things that the user certainly wont want it to do, and we need to have a zero tolerance for this stuff. The thread was asking for ways to play a sound file on a keypress, after the program had closed! - if anyone thinks that locking that thread was harsh, then they need to consider the implications.

I am the one who knocks...
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 12th Feb 2015 10:01
I still say that a program that does no harm is not malware, but I've actually never heard of fake programs that do nothing, so I have no name for them. "Pointless" immediately leaps to mind.

I do see why you'd want to limit the creation of programs such as these if you have to deal with them every day, however

Quote: "The thread was asking for ways to play a sound file on a keypress, after the program had closed!"


Not closed, just minimised. In other words, it was only asking for a way to detect keypresses without the application having focus. This has a lot of practical and legitimate uses; macros, for example, or global keyboard shortcuts.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2015 10:03
Quote: "The thread was asking for ways to play a sound file on a keypress, after the program had closed!"


"I want to, well, do stuff to your PC, while you don't even know my program exists"

We've had so many threads like this over the years where an unethical intention is dressed up as something more innocent. If you know how to play a sound file (innocent) while the program is hidden then you know how to delete or infect files (malicious) using the same methods. On that basis, it's so much easier to lock the thread, and protect the integrity of TGC's products.

Quidquid latine dictum sit, altum sonatur
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Feb 2015 14:51 Edited at: 12th Feb 2015 15:02
I was going to quote the definiton of malware, but then realised Java dude had posted. This software definitely fits the criteria of " disrupt computer operation".

Quote: "What's so strange? I normally program entirely in one file. FPSC is written entirely in one file."


It's incredibly strange. You're doing it wrong, and FPSC should not be treated as a pillar of fine programming standards. How can anyone think that maintaining a file which is 3k lines is normal? You're spending more time scrolling than writing code.

https://code.google.com/p/fpscreatorengine/source/browse/trunk/FPSC-Game.DBA

Google won't even open the file, that's how stupidly big it is.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Feb 2015 15:08
It is a lot easier to work with multiple files in the newer IDE though... I mean if I'm using the original IDE, my code tends to be just 1 file as well - just because it's such a pain to work with multiple files with that IDE, just needs to screw up once and people end up sticking with 1 file because of it.

At least the AppGameKit IDE is much better, it's practically a given that you'd use included files with that.

I am the one who knocks...
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Feb 2015 15:25
Quote: "I disagree. There is nothing malicious about it."


Nothing malicious? Let's see, the program:
1) Explicitly monitors whether the task manager is open or not, and will try to hide itself if it is.
2) Fakes being closed while continuing to play sounds to intimidate the user.
3) Collects information from your computer (the user name) and uses it to intimidate the user.
4) Spam-opens notepad.exe with intimidating messages.

Seems like it could fit the definition of being malicious.

Quote: "What's so strange? I normally program entirely in one file. FPSC is written entirely in one file."


https://fpscreatorengine.googlecode.com/svn/trunk/FPSC-Game.DBA

Huh, you're right. Now that I look at it, FPSC seems incredibly maintainable with everything in one file. I think I will write all of my projects in one file from this day forth, because opening multiple files can be confusing and consumes too much RAM.

The only way to do great work is to love what you do -- Steve Jobs
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2015 17:10
Quote: "FPSC seems incredibly maintainable with everything in one file"


FPSC is maintainable with this one file. But what if you want to reuse code in multiple projects? I have about 20 (unfinished ) projects that all share the same base code for HUDs, effects, high score tables, network connectivity, etc... A bonus is that if I have a bug in one of these modules, I can fix it and all of my projects are fixed in one go.

Quidquid latine dictum sit, altum sonatur
Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 12th Feb 2015 17:35
Quote: "If we allow the genuinely non-malicious programs like this to exist freely then sooner or later someone will make a genuinely malicious program."


This is your argument? It makes absolutely no sense.

I used to make programs like this for DOS when I was a kid... I believe they were called TSRs, which would stay in memory until you restarted the computer. It was funny as a prank, or so I believed, until I got in trouble installing it on the school's computers. This kind of program is annoying and I can't imagine anyone WANTING it on their machine. Please use your talent and put it towards a game or something

Senior Developer - CBS Interactive Music Group
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Feb 2015 17:53 Edited at: 12th Feb 2015 17:55
Quote: "FPSC is maintainable with this one file."


That is without a doubt the most hilarious thing I've read all day. There's no possible way that code is maintainable. It would take weeks for a newcomer to even begin to understand how it works. It's one gigantic global state of spaghetti code, changing one thing will no doubt break other things. Telling me otherwise will just make me laugh harder.

I wonder why every other software project in the world has their code split up into multiple files? Could it have something to do with maintainability?

The only way to do great work is to love what you do -- Steve Jobs
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2015 20:59
Quote: "That is without a doubt the most hilarious thing I've read all day. There's no possible way that code is maintainable."


That's OK, when you've made something on the scale of FPSC (having also written the underlying language and compiler) I'll go with your opinion .

I work on ERP systems, where single classes are up to 28,000 lines long. They would be longer, but historically that's all the editor could cope with. There are 9,000+ classes in the system, so breaking down programs still further becomes harder to manage.

I have seen programs that are 3,000 lines long with no functions or subs, but a whole series of GOTOs. That is absolutely unmanageable.

My personal preference is for many #includes. My largest programs are about 10 - 12,000 lines long, so up to a dozen files in the project makes sense for me. For others it may be too many.

Time for you to laugh harder

Quidquid latine dictum sit, altum sonatur
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 12th Feb 2015 21:21
Quote: "I work on ERP systems, where single classes are up to 28,000 lines long. They would be longer, but historically that's all the editor could cope with. There are 9,000+ classes in the system, so breaking down programs still further becomes harder to manage."


Does this mean that these systems have over 100 million lines of code? (Taking 14,000 lines as the average class, and 9,000 classes)

If it's a single class that reaches this extraordinarily high number then I'd say it's an exception to the rule, not the rule itself. There's always going to be cases where you need massive files for something, but for an entire application to contained in one file is senseless.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2015 21:32
Probably around 20 million lines of code. There are a large amount of classes between 1,000 and 10,000 lines. 28,000 lines of code is not the rule (I said up to) but there are probably 100 - 200 classes of this size.
When you are processing a complex chart of accounts (with 8 variable dimensions and many of them standardised with unique rules) it gets very complicated very quickly.

As I said, I prefer many include files. But these programs were created by some very experienced developers, who have made a conscious decision to write these programs the way they have.

Quidquid latine dictum sit, altum sonatur
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 12th Feb 2015 21:45 Edited at: 12th Feb 2015 22:02
Quote: "That's OK, when you've made something on the scale of FPSC (having also written the underlying language and compiler) I'll go with your opinion ."


My opinion is invalid based on how many lines of code you think I've written in my own projects? Okay then... It's not like I wrote an RTS game with ~25k lines of code or anything, and it's not like I have any experience with collaborative programming projects, so obviously anything I say is plain wrong.

Quote: "Time for you to laugh harder "


While I am laughing harder at what you've said, the laughing is accompanied with internal crying/screaming. I've seen my fair share of horrible, unmaintainable code and I know what you're talking about.

However, using it as an excuse to write horrible code yourself, just because it's "normal" for a class to have 28k lines, especially when you know better, is a horrible mentality. The existing code is as it is, but you are in control of new code and should definitely avoid writing classes with 28k+ lines of code.

The only way to do great work is to love what you do -- Steve Jobs
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Feb 2015 22:15
Quote: "However, using it as an excuse to write horrible code yourself, just because it's "normal" for a class to have 28k lines, especially when you know better, is a horrible mentality"


I've said twice, I write in many include files. I personally wouldn't write code in one file (I started by professing the advantages of multiple files for reusable code). But I have seen the extremes, and it doesn't have to be as bad as you might first think. These code files are made up of maybe 100 functions, sorted alphabetically in the code map in the IDE, with rigorous standards that mean everything can be found very easily. The IDE is heavily customised Eclipse, and the additional information around the code (information that can only be gathered from individual files) makes the coding environment even easier to use.

Quidquid latine dictum sit, altum sonatur
Indicium
15
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 13th Feb 2015 00:35
Quote: "Probably around 20 million lines of code. There are a large amount of classes between 1,000 and 10,000 lines. 28,000 lines of code is not the rule (I said up to) but there are probably 100 - 200 classes of this size. "


Well, I can't even fathom what a 20 million line application would look like, so I guess I'll shut up.
Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 13th Feb 2015 00:53 Edited at: 13th Feb 2015 00:54
That's about 1 line of code for each pixel in a room with 10 1080p monitors, to put things into perspective.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 13th Feb 2015 01:10
Quote: "Well, I can't even fathom what a 20 million line application would look like, so I guess I'll shut up."


Back in the day my mom(programmer) once showed me a closet filled to the brim with boxes, each with hundreds of IBM punch cards in it...think my mind exploded. That's how the company she working for at the time...stored them...

Dark Java Dude 64
Community Leader
13
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 13th Feb 2015 01:19 Edited at: 13th Feb 2015 01:19
Quote: " That's how the company she working for at the time...stored them..."
Yeup! Not even cassette tapes yet back then. My dad worked at IBM for quite some time. He's told me stories of his college years, working with card stacks. Sometimes you would spend hours writing a program using a card puncher, and your program would end up being a stack of several hundred cards. Then you would walk your stack down to the computer room, where it would wait for the operator to run it through the machine. You would come back the next morning to get your card pile and the printed report, only to discover that there was a sticky note on top of your stack from the operator saying, "Sorry, dropped your stack, could not reorder them".

Didn't happen that often of course, but each college student fell victim to that every now and then. [i][/i]

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Feb 2015 10:01
Quote: "...there was a sticky note on top of your stack from the operator saying, "Sorry, dropped your stack, could not reorder them"."


Ah yes, the good old bogosort algorithm.

My company was cutting edge, we had a card sorter. it was decommisioned when I started, but served as a good table when making coffee in the store room.



Quidquid latine dictum sit, altum sonatur
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Feb 2015 12:31
Quote: "Well, I can't even fathom what a 20 million line application would look like, so I guess I'll shut up."


The linux kernel had 20 million at version 2.6.50, and yet there is not a single file with more than 1000 lines of code in it, and not a single function longer than 100 lines.

The only way to do great work is to love what you do -- Steve Jobs
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 13th Feb 2015 13:00
Quote: "Huh, you're right. Now that I look at it, FPSC seems incredibly maintainable with everything in one file. I think I will write all of my projects in one file from this day forth, because opening multiple files can be confusing and consumes too much RAM."


Come on, all I was saying is that it's not unusual to program entirely in one file.

And for the record, I find it very easy to maintain large programs in a single file. That's what function-lists and code folding is for.

Quote: "This is your argument? It makes absolutely no sense."


Whaaaat. I have literally NO idea what you're talking about. Are you arguing for or against single-file programs? Either way, try re-reading my comment.

Quote: "There's no possible way that code is maintainable."


lol nice joke Heaps of people HAVE already quite successfully maintained that code. What you say is simply not true.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Feb 2015 13:31 Edited at: 13th Feb 2015 13:32
Clonkex, the arguments you're using are what's known as inductive reasoning. Based on your little world in which you program, you put forth your own experiences. Based on these, you extrapolate and generalise the entire world to work the same way.

A simple example of an inductive argument is:
John’s old car won’t start. It’s raining. Therefore, John’s old car won’t start when it’s raining.

While this is a valid form of argument, it is a weak form, and its truth can only be probable at best. Let's examine.

Quote: "Come on, all I was saying is that it's not unusual to program entirely in one file."


I invite you to browse any programming project on github and find one example of a project where everything is in one file.

As opposed to you, I'm using deductive reasoning. By looking at multiple projects, we quickly see that no one has their code in one file.

By establishing that, in general, people do not put all of their code in one file, I can conclude with absolute truth, that it is not common to have everything in one file.

Quote: "Heaps of people HAVE already quite successfully maintained that code. What you say is simply not true."


Again, inductive.

Just because some people have been able to maintain that code doesn't automatically make the code in question maintainable. I can make the same argument about Lugaru's source code:
http://hg.icculus.org/icculus/lugaru/file/97b303e79826/Source/GameTick.cpp#l7201

(If you're wondering where the code is, scroll right. That's right, it's so bad it's off the page.)

"Two people have successfully maintained this abomination, therefore I conclude that it is maintainable code".

The only way to do great work is to love what you do -- Steve Jobs
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 13th Feb 2015 14:27 Edited at: 13th Feb 2015 14:34
Quote: "you put forth your own experiences. Based on these"


Exactly! I based my arguments on my experiences. I didn't know my experiences were unusual, and thus was forced to assume they were the norm. I believed I programmed similarly to other people and had no reason to doubt that, and therefore never had any reason to find out for sure.

Quote: "Just because some people have been able to maintain that code doesn't automatically make the code in question maintainable."


Yes it does. Maintainable code is code that can be maintained. Even if you are incapable of doing it, there are people that can. Although, it has occurred to me that by that logic, if there were are a car with only one wheel and the vast majority of people called it "undrivable" because they couldn't drive it, and there were a couple of people that could drive it, I could say it's a drivable car.

The issue here is how literally we take the words. I take "maintainable" fairly literally; i.e. even if only a few people can maintain the code, it's maintainable. I'm not taking the word that literally just to win the argument; that's just how I understand the word. Clearly, you take "maintainable" less literally and understand it to be applicable if most people are able to maintain the code.

Quote: ""Two people have successfully maintained this abomination, therefore I conclude that it is maintainable code"."


Yes, except that I would argue that the code might not actually be an abomination in those people's eyes.

I guess what I'm trying (fairly forcefully) to get across is that it all depends on perspective. What might seem normal to you may be a very strange idea to someone else, and vice versa.

Quote: "(If you're wondering where the code is, scroll right. That's right, it's so bad it's off the page.)"


I have a 1080p screen, I can see the code

For the record, I'm not sure how, if you have to have lots of "if" statements, you could make that code smaller. What would you do if you had to do that? Because in my eyes that's a bad example: it's code that couldn't really be any smaller and wouldn't be helped by using multiple source files.

EDIT: Having said all that, I'm forced to admit I do quite frequently split my more recent code up into lots of files (but still rarely in DBPro). For those now throwing their hands in the air in frustration because was just defending single-file programs, I wasn't doing it to prove that single-file programs are better, I was doing it to point out that if it works for the person doing and it and doesn't hurt anyone else, let them be and don't judge.

MAN I get strongly opinionated on the internet... it's like a disease!

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Feb 2015 14:53 Edited at: 13th Feb 2015 14:55
Quote: "if there were are a car with only one wheel and the vast majority of people called it "undrivable" because they couldn't drive it, and there were a couple of people that could drive it, I could say it's a drivable car."


No, you could not say that. That does not make it generally a drivable car. It makes it a drivable car for the extreme minority who are too stupid to realize what a drivable car looks like, and in their own ignorance they assume - inductively, based on their one-wheeled car - that 4 wheeled cars are just as drivable.

Like I said, you're using inductive reasoning versus my deductive reasoning. Your conclusions are by definition incorrect.

Quote: "For the record, I'm not sure how, if you have to have lots of "if" statements, you could make that code smaller. What would you do if you had to do that? Because in my eyes that's a bad example: it's code that couldn't really be any smaller and wouldn't be helped by using multiple source files."


You refactor your code.

There are decades of knowledge available at your fingertips, explaining how to effectively structure and refactor your code.

http://sourcemaking.com/refactoring

The only way to do great work is to love what you do -- Steve Jobs
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 13th Feb 2015 14:54 Edited at: 13th Feb 2015 14:58
@Clonkex
Let's start off by defining maintainability in the field-accepted way: Maintainability is the ability of a program to be changed and updated by an average programmer easily with a reasonable amount of time to become familiar with the codebase, proportional to the size of the codebase.

I've actually tried to update and change the FPSC code and it was a mess. It doesn't matter that 1 or 2 people managed to hack something out, I very much doubt that an average programmer could easily create something like s4mod without the many years of development and usage that s4real had with FPSC.

Quote: "Yes, except that I would argue that the code might not actually be an abomination in those people's eyes."

It doesn't matter. In the case of software engineering/development, if it doesn't adhere to a coding standard then it can be considered bad code. That code doesn't adhere to a coding standard I've ever seen, and the repository doesn't have one built-in.

EDIT: To clarify, I mean that the code has to be at least consistent with itself with reasonable behaviors otherwise I would consider it "bad code".

Quote: " For the record, I'm not sure how, if you have to have lots of "if" statements, you could make that code smaller. What would you do if you had to do that? Because in my eyes that's a bad example: it's code that couldn't really be any smaller and wouldn't be helped by using multiple source files."

The point isn't about minimizing code size. The point is to make it easily editable which would mean reducing the levels of indentation to be as close to 80-100 characters per line as possible. It turns out that the code in question is a poorly-implemented state machine, so to "fix" it I would have used a proper state machine implementation.

As an aside, I don't blame this guy for coding like that because he managed to get the product out the door. Sometimes sacrificing perfect coding style is necessary but should never be expected or required.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Feb 2015 15:09
If we're getting into the psychology of this, one of the points being missed requires associative reasoning.

The ERP system I refer to is made up of over 9,000 files, so it isn't coded as a single file. Some of those files are up to 28,000 lines in length. Ergo, it isn't unreasonable for a complete program with less lines to be comprised of one file, if this size of file is maintainable.

The argument is about the size of individual files within a project.

The point about single file projects on github is irrelevant. If a project is 100 lines long it probably should be in one file, because it is adequately maintainable.
So in response to maintainable projects on github, it took me 5 minutes to find a project that had a file of 32,000 lines, one with 14,000 lines and a number of files around 10,000 lines.

I've seen IBM-published programs of similar sizes. Whether you like IBM or not, they have made a very successful business of out hardware and software.

TheComet, you have succumbed to inductive reasoning - it's your opinion, therefore it must be right.

Quidquid latine dictum sit, altum sonatur
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 13th Feb 2015 15:51
Quote: " I've seen IBM-published programs of similar sizes. Whether you like IBM or not, they have made a very successful business of out hardware and software. "

IBM's software projects are riddled by bugs and incomplete features as well as poor customer satisfaction. I'm not entirely sure we should be holding up IBM as proper software practice.

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Feb 2015 15:59 Edited at: 13th Feb 2015 16:07
Quote: "TheComet, you have succumbed to inductive reasoning - it's your opinion, therefore it must be right."


Opinion? Where in the blazes did I ever say it was my opinion. Unlike you, who didn't even bother to link the projects they supposedly found, who isn't backing up any of their claims, I'm supporting my arguments with facts.

I would say it is you who has succumbed to inductive reasoning. You're giving one example of some project you've worked on, and extrapolate from there, yet you dismiss the majority of other projects out there. You have 3 examples, I can throw thousands at you showing the opposite is true. How can you possibly claim it is generally acceptable to put all of your code into one file when the vast majority of projects out there don't do this?

I'll repeat what I've said because apparently I wasn't clear enough.

My premises are:
1) In general, the number of files are in proportional a relationship to the number of lines of code.
2) In general, programming projects almost never put all of their code into one file.

It is a fact that lines of code has a proportional relationship to the number of files. I can prove this by examining 100 random projects from github with this program here. For instance, here are the statistics from perl's source code:



Every project will follow this trend.

From this, I construct the following claim:
Having your code organised into multiple files as opposed to having everything in a single file yields more maintainability.

I can support this claim based on the way the vast majority of projects organise their code. I can also support this claim based on the experiences of every programmer who has ever been involved in such a project where code has been organised into multiple files.

I therefore conclude that code is in general more maintainable when organised into multiple files.

Quote: "The ERP system I refer to is made up of over 9,000 files, so it isn't coded as a single file. Some of those files are up to 28,000 lines in length. Ergo, it isn't unreasonable for a complete program with less lines to be comprised of one file, if this size of file is maintainable."


The only programs that can be considered "reasonable" in one file are small shell scripts or something.

As already proven with the program above, even small projects are generally organised into multiple files.

Quote: "The point about single file projects on github is irrelevant. "


This is a senseless, baseless allegation and cannot be used to support any of your arguments until you are able to answer the following:
1) Why is it irrelevant?
2) Does github not represent a valid source for a general sense of how the majority of us program? If so, why?

The only way to do great work is to love what you do -- Steve Jobs
Yodaman Jer
User Banned
Posted: 13th Feb 2015 16:32
If I were a mod I would have locked this several posts ago (nudge nudge)

Not because of the argument about programming and maintainability, but because this thread was doomed to devolve from the start since the topic is rather controversial.

I would never download that "game" and I agree with TGC entirely about their products being misused in such a manner. People don't want to be annoyed by a game, they want to play it!

"If you want to make an apple pie from scratch, you must first create the universe." - Carl Sagan
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 13th Feb 2015 17:00
Well I'm not locking it!

I locked the thread that resulted in this thread, and if I lock this thread then it might incite another thread... it's a vicious circle and I want no part in it

Personally, I don't think it matters much beyond the actual programmers preference - you can stare blankly at a long list of functions, or a long list of code files, looking for what it is your looking for - the best option is always what your used to working with, assuming you don't want to change that is. Most of my programs are tiny, like 1000 lines - or SQL database front ends, so I'm spared from the horrors of proper ERP systems and heavy database handling... and other peoples code - GAH! there is nothing worse than looking at the work of a coder who is either too lax, or too stringent with their standards. Anyway, as I lied, I'm staying out of it.

I am the one who knocks...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Feb 2015 17:17
Quote: "Opinion? Where in the blazes did I ever say it was my opinion?"

Quote: "My opinion is invalid based on how many lines of code you think I've written in my own projects?"


Quote: " Unlike you, who didn't even bother to link the projects they supposedly found, who isn't backing up any of their claims, I'm supporting my arguments with facts."

I always make up facts to strengthen my argument, it's an infallible, winning formula. I didn't find the Ruby project on the first page I came to, with the files I referred to. Of course, if I did find it then that would mean you cherry-picked your findings with your tool, otherwise known as picking the facts to suit your argument.

Quote: "1) Why is it irrelevant?"

Because I've never mentioned single file projects. I referred to FPSC once and commented on the negative side of putting it all in one file. I've focused on size of files and manageability.

Quote: "Does github not represent a valid source for a general sense of how the majority of us program? If so, why?"


Please let me know where I said that, I can't seem to locate it.

Quidquid latine dictum sit, altum sonatur
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Feb 2015 17:32 Edited at: 13th Feb 2015 17:33
If you are arguing that putting everything into one file means less maintainability, then why are you arguing at all? That's what I'm saying.

What makes you think I'm cherry picking?

The only way to do great work is to love what you do -- Steve Jobs
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 13th Feb 2015 17:58
Quote: "I didn't find the Ruby project on the first page I came to, with the files I referred to."

Come on, throw us a bone. At least link the project if not the file.

I honestly think you guys agree on the concept and disagree on the scale at which the concept applies. Perhaps there is a point where we can say "agree to disagree"?

@Clonkex
Quote: "I was doing it to point out that if it works for the person doing and it and doesn't hurt anyone else, let them be and don't judge."

The problem with this line of thinking is that if we're seeing it on the forum, then the person is requesting help. The organization of their code would then impact us in our ability to help that user. It isn't common that we need to see the entire project but I have seen it done, and a project that has distinct separation of code into specific files is much easier to quickly parse than a single file with all the code combined in it.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 13th Feb 2015 18:58
Threads straying beyond the realm of time and space! Locking.

Login to post a reply

Server time is: 2024-04-25 12:52:07
Your offset time is: 2024-04-25 12:52:07