|
Post by ironhold on Dec 21, 2012 23:02:25 GMT
This is something for a series I was looking at doing.
One of the characters is a free-lance computer expert. Although he's skilled with modern programming languages, he's actually an expert in "antique" programming languages from the 1950s - 1990s. This gives him an edge on the competition, as few people in his neck of the woods know both.
As part of it, I had the idea that his signature is his unique ability to blend all sorts of different programming codes together into a single unified body. That means if he writes something, you could, say, see languages from the 1980s working alongside languages from today.
The idea behind it is that he's got a number of buried check sums in there that *specifically* look for all of the different programming languages. If someone tries to steal his code as-is, he can point out all of the blended programming languages as proof of his own signature. If someone tries to "clean up" his programming language so that it looks more presentable, it'd trigger the check sums and so the program wouldn't work.
Would something like these even be feasible in the real world?
Thanks.
|
|
|
Post by memeengine on Dec 22, 2012 0:02:37 GMT
I don't know of any complier that would allow you to blend code from different languages in the same functions/objects/procedures, without it being explicit (such as embedding SQL statements). It would certainly be theoretically possible but I can't see any practical advantage to doing it and there would be almost no commercial value to producing one.
Where programmers mix and match different languages within projects, it's because different languages have different strengths. For example, some languages are quick to code (but at the price of reduced performance) while others allow you to get every last bit of performance (but are time consuming to code). Some languages are tied very closely to particular platforms or applications (javascript for web development, for example), while others are more general purpose.
Would there be much of an advantage to being expert in "antique" languages? Not really. The basics of programming, the logic and flow control, are pretty much the same regardless of the programming language (with a few exceptions). So being an expert in an "antique" languages, would mean that you've pretty much mastered the basics required for more modern OO languages but any expert in a modern language would have the same knowledge.
I spent a large part of my early programming career using what (even at the time) was considered an "antique" language, namely IBM's RPG/II (and then RPG/400). Today, I program in Visual Basic and C#. I can't say that anything I learned back then, specific to RPG, comes in useful today. It was a cumbersome language to use, and the limitations, compared to the languages I now code with, would put me off going back.
With regard to your character, who does he free-lance for? I now work as a software development manager (having worked as a freelancer myself) and I occasionally employ outside contractors for projects. However, if I discovered a programmer deliberately booby-trapping his code, I'd get rid of him very quickly.
If your programmer has been paid to produce an application and has handed over the code, he no longer owns it. If the client wants to clean up the code, or modify it, or just fix the bugs, then the client should be able to do that. A good programmer will pride himself on writing easily maintainable code - something that another programmer can easily pick up and modify without to much effort. Programmers who deliberately produce arcane code usually end up with an entirely different sort of reputation and find it difficult to get work.
And then there's the difficulty of actually being able to hide those check sums. If the client has the source code, then any proficient programmer with the appropriate development & debugging tools, would find the problem code fairly quickly.
|
|
|
Post by ironhold on Dec 22, 2012 0:45:20 GMT
I don't know of any complier that would allow you to blend code from different languages in the same functions/objects/procedures, without it being explicit (such as embedding SQL statements). It would certainly be theoretically possible but I can't see any practical advantage to doing it and there would be almost no commercial value to producing one. Where programmers mix and match different languages within projects, it's because different languages have different strengths. For example, some languages are quick to code (but at the price of reduced performance) while others allow you to get every last bit of performance (but are time consuming to code). Some languages are tied very closely to particular platforms or applications (javascript for web development, for example), while others are more general purpose. Would there be much of an advantage to being expert in "antique" languages? Not really. The basics of programming, the logic and flow control, are pretty much the same regardless of the programming language (with a few exceptions). So being an expert in an "antique" languages, would mean that you've pretty much mastered the basics required for more modern OO languages but any expert in a modern language would have the same knowledge. I spent a large part of my early programming career using what (even at the time) was considered an "antique" language, namely IBM's RPG/II (and then RPG/400). Today, I program in Visual Basic and C#. I can't say that anything I learned back then, specific to RPG, comes in useful today. It was a cumbersome language to use, and the limitations, compared to the languages I now code with, would put me off going back. With regard to your character, who does he free-lance for? I now work as a software development manager (having worked as a freelancer myself) and I occasionally employ outside contractors for projects. However, if I discovered a programmer deliberately booby-trapping his code, I'd get rid of him very quickly. If your programmer has been paid to produce an application and has handed over the code, he no longer owns it. If the client wants to clean up the code, or modify it, or just fix the bugs, then the client should be able to do that. A good programmer will pride himself on writing easily maintainable code - something that another programmer can easily pick up and modify without to much effort. Programmers who deliberately produce arcane code usually end up with an entirely different sort of reputation and find it difficult to get work. And then there's the difficulty of actually being able to hide those check sums. If the client has the source code, then any proficient programmer with the appropriate development & debugging tools, would find the problem code fairly quickly. The story is that the character is actually a private detective and bounty hunter. The first "chapter" has him hired to investigate a software firm. Some of the software that the firm has been tasked to write for clients over the past little while has shown up in the hands of people who *aren't* their clients, raising the prospect that they're making additional money on the side by knocking off their own software. Given his skill with computer programming and the company's constantly hiring temp workers to help with projects, he was hired to get in and find evidence. Not only did he produce the booby-trapped software code, he also backdoor'd a program onto all of the office computers (yes, they're networked; that should tell you what kind of firm this is) so that he could monitor what people did with his software. Cue the #2 woman in the company "cleaning up" his code for sale to someone that isn't the client of record. Once he's got the data, it's just a matter of exposing her - and her partner in crime, the boyfriend of the woman who runs the firm - as being the people behind the matter... and then subtly pinning the whole shebang on the #2 for the fact that the now-altered code is useless. It costs the firm the contract, but it saves them from legal action since in the process he proves that the owner of the firm and the rest of her employees had no involvement in what happened. ( Of course, the plot's even more convoluted than that. The real reason why he took the job was because he was trying to sabotage the project he was hired to work on. The long and short of it is this is actually a sci-fi series; had the project gone through, it would have shattered a "masquerade" that he's helping to maintain.
Turns out that aliens are real, and that a civil war between members of one race have spilled out into the solar system. He's agreed to help the good guys in the conflict against the bad guys, both in prosecuting the war and in helping to keep it a secret. The program was meant to operate a piece of equipment that would have detected and unscrambled the broadcasts that the good guys use to communicate with each other, meaning that the project had to go.
"Actually solving the case" and "getting the opportunity to put the moves on the woman in charge of the company" were added perks; yes, he's a jerk. The incident also winds up altering the whole course of the war, as the employees of the firm and their significant others wind up getting dragged into it.)
|
|
|
Post by memeengine on Dec 22, 2012 1:12:59 GMT
Cue the #2 woman in the company "cleaning up" his code for sale to someone that isn't the client of record. Once he's got the data, it's just a matter of exposing her - and her partner in crime, the boyfriend of the woman who runs the firm - as being the people behind the matter... and then subtly pinning the whole shebang on the #2 for the fact that the now-altered code is useless. Presumbly the code works, as advertised, in its original form so why does #2 need to "clean" the code at all in order to sell it to the non-clients? Isn't there a real risk that the cleaning process would remove some or all of the check-sum logic bomb code (rendering it useless)? After all, the arcane portions of the code, would probably need to look redundant or the programmer would see very quickly what it was doing. If the code breaks when it's changed in any way, surely that should come to light as soon as the code is run in executable form, i.e. before it reaches its new owner? The debugging process would then bring to light the logic bomb(s) and then either allow #2 to remove them or get the protagonist fired for including them in the code in the first place.
|
|
|
Post by ironhold on Dec 22, 2012 2:30:08 GMT
Cue the #2 woman in the company "cleaning up" his code for sale to someone that isn't the client of record. Once he's got the data, it's just a matter of exposing her - and her partner in crime, the boyfriend of the woman who runs the firm - as being the people behind the matter... and then subtly pinning the whole shebang on the #2 for the fact that the now-altered code is useless. Presumbly the code works, as advertised, in its original form so why does #2 need to "clean" the code at all in order to sell it to the non-clients? Isn't there a real risk that the cleaning process would remove some or all of the check-sum logic bomb code (rendering it useless)? After all, the arcane portions of the code, would probably need to look redundant or the programmer would see very quickly what it was doing. If the code breaks when it's changed in any way, surely that should come to light as soon as the code is run in executable form, i.e. before it reaches its new owner? The debugging process would then bring to light the logic bomb(s) and then either allow #2 to remove them or get the protagonist fired for including them in the code in the first place. The entire reason *why* he'd be able to pull it off - if it could even work in real life - is because the the firm is just that sloppy. You know the stories about people who put together companies consisting of "bottom of the barrel" employees that still somehow manage to best larger, more established firms? The software company in question is what happens when someone bets on that and loses. Of the six regular employees (not counting the person who was selling everything), only two are legitimately competent; the rest are mediocre at best. They have the drive, but limited actual collective programming skill and virtually no actual knowledge of how to run an organization. As for the crook herself, "stealing other peoples' work" is actually how she got through college. I was actually looking at doing a gag in which it's revealed that one of the workers was so naive as to think nothing of a redbird occasionally flying into the office, grabbing his own personal coffee mug, helping himself to the office coffee pot, and then rinsing out his own mug in the sink. (Said redbird is actually a robot drone the good guys are using to keep tabs on the company as a favor to the computer guy; caffeine is an acceptable alternate energy source for said robot.) That's how borked things are there. The incident would be the final kick in the rear needed for the programmers to actually get serious... a process that comes to fruition just in time for them to help the computer guy save the world. Yeah.
|
|
|
Post by memeengine on Dec 22, 2012 12:45:30 GMT
The entire reason *why* he'd be able to pull it off - if it could even work in real life - is because the the firm is just that sloppy. You know the stories about people who put together companies consisting of "bottom of the barrel" employees that still somehow manage to best larger, more established firms? The software company in question is what happens when someone bets on that and loses. Of the six regular employees (not counting the person who was selling everything), only two are legitimately competent; the rest are mediocre at best. They have the drive, but limited actual collective programming skill and virtually no actual knowledge of how to run an organization. As for the crook herself, "stealing other peoples' work" is actually how she got through college. In that case, I would think that your protagonist's plan is unnecessarily convoluted. It would be simpler for him to write clean code in the first place and simply hide the logic bomb in plain sight, disguised as a housekeeping routine. If the code looks clean then baddie has no reason to go through it to clean it up and so won't find the payload (should they have a temporary moment of competence). He could issue different versions of the code to each of the other employees. When the program finds itself running in an unauthorised environment, it mails back its version number and the network address so the protagonist knows who sold it and who it was sold to.
|
|
|
Post by Cybermortis on Dec 22, 2012 16:49:45 GMT
The only situation I can think of where being able to 'mix' old and new programming codes together, would be if you had important data that was stored in a obsolete format you wanted or needed to access. (I guess that you might also want/need to mix and match if you were dealing with an old system you couldn't replace for some reason.) This is not as far fetched as you might thing. Back in the mid 1980's the BBC undertook a 'doomsday' project where they stored as much information about the United Kingdom as they could on laser-disks*. By 2002 there were almost no machines left capable of reading the format that had been used; en.wikipedia.org/wiki/BBC_Domesday_Project#Format
|
|
|
Post by silverdragon on Dec 23, 2012 8:13:12 GMT
Using an existing language and translating one to the other...That would be code wasted. If you start running a language that looks out for OTHER languages and has to translate them, its almost the same as talking to someone using a translator, say Chinese to English. This takes time. Any program that works like that is not efficient.
Yes it would work, can be programmed to work, but, the code would be slow and almost unworkable. Plus, older languages had specific purposes... there were things you could do in one language that were not available in other languages, if you trigger one of those, having to do the "Work-around" to get that to work in a modern language would be hugely inefficient.....
HOWEVER....Unique **NEW** language
You COULD have this character invent a whole NEW language that accepts code instructions from all the languages new and old in history?....
Compiling a totally new language is not completely unacceptable, after all, all computers are more or less the same in Binary code, it just the high-level language that distinguishes one from another.... My computer does not complain if I boot Windows, but will also accept readily Linux....
If I invented Lindows, I suggest it would work.
|
|
|
Post by ironhold on Dec 23, 2012 12:49:56 GMT
Thank you.
|
|
|
Post by wvengineer on Dec 23, 2012 15:05:33 GMT
I'm not sure about combining different programing languages within the same file, but it is farily common to mix programing languages though a 3rd party.
In machine automation it is quite common to have multiple programing languages running the same piece of equipment. For example: an Allen Bradley PLC (the main processor of an automation system) running RSLogix 5000 will have to talk to a operator interface computer that runs RSView32. Despite the names sounding similar, they are completely different programing languages and they need to be able to talk to each other in order to run the machine.
The most common way that they do the communication is that they will have a 3rd party hold the data so that both of them can access it and can pass info back and forth. Sometimes that 3rd party is a file on the computer's operating system that both programs have access to. More commonly they use a shared block of memory that both can access. For larger automation systems they will use a network address as the common point.
There are actually hardware based devices that are designed to translate data from one automation platform to another. Both system share the network address of that devices and it handles the communication while it acts like a bridge between the two systems.
A couple years ago I helped startup a line that was mainly controlled by AB, but we had a heater system that ran Automation Direct (shutter...), cure stations that ran Modicon and a couple machining centers that ran Fanuc CNC controls. All the communications ran though one ProSoft module.
|
|
|
Post by c64 on Dec 25, 2012 1:20:54 GMT
Computer programs don't work that way!
There are two kinds of programs. Compiled ones and interpreted ones.
In case of an interpreter like BASIC, the plain, human readable source code is phrased and the commands analysed and if a valid command is detected, the interpreter takes the parameters from the command, puts them into a stack and then runs a binary from its library which represents the command and makes use of the parameters in the stack.
In case of a compiler, the code is run through an interpreter by the compiler and the code from the library is then copied into an executable file to be run later when you start the compiled ready to use program.
So either you need to pass an interpreter which can handle the mix of old programming languages to the customer or you need a compiler which can build you an executable which is then independent from the original language since it's plain binary machine language, controlling the CPU of the computer where you start it.
Companies which make money with selling programs never hand out the source code, only the compiled executables which are independent of the kind of language they were written in.
In the good old days of early computing, it was common that you mixed Pascal for complex maths and assembler for real fast running code into your C programs. The result is an all binary which is just handling complex maths or dealing with special tasks real quickly.
Also before a program is really compiled, there is a so called "linker" analysing the program and combining many similar commands into just one with a set of different parameters so if your program contains e.g. a hundred "printf()" commands, the result is just one time the code but a big pack of things to print as a parameter and just a JUMP command at each time of the program you use this command. Also "silly" code which is much easier to read for a human but unnecessary difficult for a machine can be converted into something much more complex but faster running code. The style of programming of the author is lost in this process. Of course, as a good programmer, you can write your programs in a way which helps the compiler and linker so see where it can cut corners and produce a much more efficient code. But the outcome is always different from the original style of coding!
And you can't include any traps you can't just copy to make the code do the very same! In fact when the executable is started, it will be put into a random part of the memory so counting addresses and stuff will give you random results!
There are two main ways of copy protection you cannot break that easily. The hardest ones are the hardware dongles. Here, you can either ask the dongle a question it answers in a way the program expects, e.g. "42? -> GAIESL". If the response of the dongle is wrong, the program stops. This is easy to break if you find the code which decides which is wrong and which is right to make it decide between right and right so no matter what the dongle will answer, the program is happy and continues working. A lot harder is a smart dongle which receives some important data to process. If the cracker is unable to find out how the data is processed, the program can't properly work without the dongle. The second method is the license key which is then used to receive a missing but very important part of the program from the server of the maker of the program.
Mixing old computer languages is pointless. You can take any program, no matter how it was written and then reverse compile it to a C source code which usually has numbered variables (can't know the original variable names) and pretty complicated to read by humans since the de-compiler can only guess which command might behind a piece of code and often it needs to express single high-level commands of the original source as hundreds of low-level commands. Then run it through a sophisticated C compiler again and the program is fully different but does exactly the same, might even run a bit faster though!
|
|
|
Post by c64 on Dec 25, 2012 1:25:43 GMT
And by the way, JAVA is almost like C but unlike C, your JAVA programs run through an interpreter of the "customer". This makes the program run very, very slow but the advantage is that each computer it runs on has its own library matching the kind of OS and kind of hardware so unlike a C program which has to be compiled and generates an executable which only works on one kind of OS and computer, JAVA can run on all kinds of OS and platforms. That's why JAVA was invented, for the internet where you can't know what the guy browsing your site uses as a platform.
|
|
|
Post by Lokifan on Dec 25, 2012 3:41:26 GMT
Oddly enough, I knew someone back in the 90s that made a good living out of translating obsolete languages and formats. He had a wide collection of media devices, e.g.: disk drives, drum drives, magnetic and paper tape drives, etc., and companies would hire him to convert their old media into something better. He would either simply return them their code on a newer media or, for an additional fee, help them set up a system that would let them do it themselves.
In some cases, they had all the data, but the program or system that created it was gone. In this case he had working knowledge of a large number of obsolete languages so he could create custom translation programs for newer applications.
One problem he had was that occasionally customers would try to stiff him once he got the program working. He showed me his solution--a logic bomb that would take down the system irreparably if they didn't contact him for the password.
They only saw the bomb if they didn't pay him, because he never told them about it, and would disable it once the check cleared. It was hard ball, but no one cheated him.
One other consultant I know had a contract that required him to deliver source code to the customer that would compile on the user's machine. As this person didn't want to give away years of his work cheaply, he used a code obfuscator on his finished product. A code obfuscator goes through a file and replaces all the symbols and easily human readable structure with a mess of gobbledegook that is virtually unreadable and extremely difficult to reverse engineer. It can be done, but it's usually easier to start over from scratch.
The customer was happy as they just wanted to make modifications to sections of the program my friend didn't work on, and accepted delivery.
You can tie object formats together, but it's more work than it's worth, and not easy at all. Debugging would be a nightmare and likely take more effort than writing the project itself. It overly complicates a simple task.
|
|
|
Post by wvengineer on Dec 25, 2012 19:42:02 GMT
Companies which make money with selling programs never hand out the source code, only the compiled executables which are independent of the kind of language they were written in. Not so. It depends on how you word the contract when you order the program. I do it all the time. I will contract out for a company to develop a program for my company and as part of the contract, we include the provision that any software, including code, that they develop under this contract become the property of the the company I work for, because we are the ones paying for it. They are required to give us the source code as part of their delivery package. That way we can modify it as we see fit later. Failure to deliver the source code means that we don't pay them. There have been a few times where a company will balk at the source code requirement when they bid on a job. But if they do, I simply reject their offer and there are plenty of other companies who are willing to comply.
|
|
|
Post by c64 on Dec 25, 2012 21:04:27 GMT
There is a fine difference between selling programs and selling the service to write programs!
So you are either selling programs or source code!
|
|
|
Post by memeengine on Dec 26, 2012 10:21:40 GMT
There is a fine difference between selling programs and selling the service to write programs! So you are either selling programs or source code! No, not necessarily. I've worked for a sizable international software house that wrote CRM/MMS software. The customers could buy just the executable programs or, at additional cost, they could license the source code and modify the code themselves. I also worked for a smaller software house that wrote systems for the international shipping & transportation market, who operated in a very similar way. In both cases, the license stipulated that the customer-modified code (and executables built from it) could not be re-sold, but otherwise the customers were free to change the code in any way they liked.
|
|
|
Post by c64 on Dec 26, 2012 18:53:00 GMT
There is a fine difference between selling programs and selling the service to write programs! So you are either selling programs or source code! No, not necessarily. I've worked for a sizable international software house that wrote CRM/MMS software. The customers could buy just the executable programs or, at additional cost, they could license the source code and modify the code themselves. I also worked for a smaller software house that wrote systems for the international shipping & transportation market, who operated in a very similar way. In both cases, the license stipulated that the customer-modified code (and executables built from it) could not be re-sold, but otherwise the customers were free to change the code in any way they liked. this is the exception that proves the rule...
|
|
|
Post by paulsee on Dec 29, 2012 10:44:17 GMT
Hmmm.... I remember times where assembly code was written as procedures in C. I wonder if that would qualify as two languages compiled and linked together.
Another is batch processing where a COBOL program outputs data files that a C program uses as input for computational analysis and outputs a text file. Then another Cobol program uses the text file as data for a formatted printing routine.
For the hidden checksum suggestion, I seem to remember a macro programming technique in the very old ancient Lotus 123 spreadsheet where you can actually modify or assemble a macro code in a cell and execute the assembled or modified code of the cell.
Hope these contributions help
|
|
|
Post by silverdragon on Jan 2, 2013 10:24:02 GMT
Gave me a headache... it had a maximum 180 character limit, and several times I had to "Think sideways" to get round that.
|
|
|
Post by c64 on Jan 5, 2013 3:20:53 GMT
Gave me a headache... it had a maximum 180 character limit, and several times I had to "Think sideways" to get round that. Or just think out of the box (cell) and use several of them set to white on white ;')
|
|