Jump to content


Photo
- - - - -

Program to watch a program executing it's code?


  • Please log in to reply
15 replies to this topic

#1 Powermaniac7

Powermaniac7

    mad 1337

  • Members
  • 138 posts
  • Country:
  • Gender:Male

Posted 04 November 2012 - 10:26 PM

Hi all, been a while.

I was reading through some threads on here earlier today and after reading a comment about reading/writing code is better then reading a textbook on code. I thought well I wonder if there is a compiler or program (I'm not sure if it would be classified as a compiler) that can run code and show you what is making what happen. So the code that is being executed is highlighted when executed. Which also made me wonder whether you can decompile(?) an already made program to look at the code. I know it is an option with open source programs but I think that code is just available on a website not that you can pull the program apart to look at it.

I was also wondering about AI once again and interested in whether anyone knows of any open source AI. And or just AI programs that are available to use and thus decomplie if that is possible. So I can learn that way how to create my own AI.

So any ideas would be appreciated as this might be a better way for me to learn. I might post another post describing how I am and what is going on with me which may explain why I haven't learnt shit when it comes to actually knowing how to program ever since I joined here about 3 or 4 years ago.

I might also share some other thoughts/ideas I've had philosophy wise etc. Once shared my thoughts here before and got some quite interesting replies which I look forward to getting again.

Thanks everyone.

#2 Bit Viper

Bit Viper

    SCRiPT KiDDie

  • Members
  • 28 posts
  • Country:
  • Gender:Male

Posted 05 November 2012 - 01:06 AM

I think the answer is that it will mostly depend on the language and development environment you're working with. Some IDEs allow you to "step" through the code a line at a time, and may even allow you to display or track the state of different variables or objects.

Decompiling is not usually a viable option. There is no guarantee that you will get an exact copy of the original source; at best, you may get something functionally equivalent but without any sort of human-type logic behind the design. If you want to become an ├╝bergeek, you can run your executable through a debugger and examine the assembly/machine language as it executes. (Of course, you have to have a fighting knowledge of assembly in order to gain any insight from this.)

Scripting languages are a bit easier, since the code is already there for you to review. As you practice writing code, you can leave yourself messages throughout the program execution by either logging waypoints to an external file ("00:31 Entering fooDoSomething() subroutine", "00:38 Exiting fooDoSomething() with exit code 2A") or popping messages up on the screen.

Start with smaller programs, they're a bit easier to conceptually "visualize" your way through as they execute.

#3 tekio

tekio

    5(R1P7 |<1DD13

  • Binrev Financier
  • 1,082 posts
  • Gender:Male
  • Location:The Blue Nowhere

Posted 05 November 2012 - 06:17 PM

Like Bit Viper stated, most high-end IDE's do "code stepping" to show the code and its output. Sometimes using debuggers that have good "code stepping" makes finding logical errors a lot easier than just analyzing code, trying to think how the computer is executing the code.

However, sometimes spending time thinking out the logic helps learn to code better as well. Most good programmers (which I am not) spend time thinking about logic without even programming. That is one reason countries like India and Russia produce some great programmers. Schools don't always have an ample supply of systems for students to experiment with. They teach programming by training themselves to think logically.

It's kind of difficult to explain, but once you've been coding for a while, you'll be able to look at a task or need. Then just develop an outline of the program in your head instantly without even writing any code.

#4 TheFunk

TheFunk

    SUP3R 31337

  • Members
  • 183 posts
  • Country:
  • Gender:Male

Posted 05 November 2012 - 08:53 PM

If you'd like a recommendation, the NetBeans IDE is by far one of my favorites when it comes to debugging. You can place stopping points anywhere you like in your code, and examine output at your leisure. Also the icon for the debugger has a hammer next to a broom. So I refer to it as the hammer-sweeper, world's greatest multi-tool. Back when I was taking a Java course, I once took a dust broom, and duct taped it to a hammer, and then brought it to class with me, just to make hammer-sweeper jokes all day.

But I digress, +1 for NetBeans.

In regards to AI, you'll want to learn one of these languages, but be warned, writing code that's "intelligent" is difficult to say the very least. You'll have to have a strong background in mathematics, recursive thinking (because trying to solve AI problems iteratively might take...a while), and strong organizational skills.

#5 tekio

tekio

    5(R1P7 |<1DD13

  • Binrev Financier
  • 1,082 posts
  • Gender:Male
  • Location:The Blue Nowhere

Posted 05 November 2012 - 10:58 PM

Mis-read The Funk's post. DELETED (kinda)

But, I agree, AI programming is for top-notch programmers and not for the average or slightly above average programming mind....

Edited by tekio, 05 November 2012 - 11:01 PM.


#6 dinscurge

dinscurge

    "I Hack, therefore, I am"

  • Members
  • 935 posts
  • Country:
  • Gender:Male
  • Location:the bunker

Posted 07 November 2012 - 04:07 AM

But, I agree, AI programming is for top-notch programmers and not for the average or slightly above average programming mind....


i agree to a point but depending on the outcome you want, the purpose for it it may not have to be a full blown "ai" as in sifi, like if you just want something that can 'talk' it really only needs to "know" how to reply to phrases correctly, like if you say hi, it reply, hello, whats up, how are you?, sup?, or other replys. it doesnt have to know what hello means just what to reply with. even down to like a parlor trick, which would be, i made one that was it made a file with the word/phrase as the name such as "hello", and inside is the reply, when you type into it hello (press enter) it searches for a file hello if doesnt find anything it makes one, replys, "how would i reply to hello?" (or similar) if the user types in a reasonable response then the end effect is achieved, then another dialog like press 1 to continue the conversation, or press 2 for a different way to reply, and then append the files with a number such as hello1, hello2 then it can generate a number and have a 'random' response. the problems are it takes forever to fill out the database/ "teach" it, and the end effect is a bloated database of thousands/10's 100's thousands of text files with no extensions, which the batch file did use 7za/ also makecab/extrac32 to compress the /database folder where all of the files where stored. but i digress, if you were to brake it down into multiple databases, say verb, noun, descriptor, it would take some doing but it would be someodds doable

#7 tekio

tekio

    5(R1P7 |<1DD13

  • Binrev Financier
  • 1,082 posts
  • Gender:Male
  • Location:The Blue Nowhere

Posted 07 November 2012 - 01:40 PM



But, I agree, AI programming is for top-notch programmers and not for the average or slightly above average programming mind....


i agree to a point but depending on the outcome you want, the purpose for it it may not have to be a full blown "ai" as in sifi, like if you just want something that can 'talk' it really only needs to "know" how to reply to phrases correctly, like if you say hi, it reply, hello, whats up, how are you?, sup?, or other replys. it doesnt have to know what hello means just what to reply with. even down to like a parlor trick, which would be, i made one that was it made a file with the word/phrase as the name such as "hello", and inside is the reply, when you type into it hello (press enter) it searches for a file hello if doesnt find anything it makes one, replys, "how would i reply to hello?" (or similar) if the user types in a reasonable response then the end effect is achieved, then another dialog like press 1 to continue the conversation, or press 2 for a different way to reply, and then append the files with a number such as hello1, hello2 then it can generate a number and have a 'random' response. the problems are it takes forever to fill out the database/ "teach" it, and the end effect is a bloated database of thousands/10's 100's thousands of text files with no extensions, which the batch file did use 7za/ also makecab/extrac32 to compress the /database folder where all of the files where stored. but i digress, if you were to brake it down into multiple databases, say verb, noun, descriptor, it would take some doing but it would be someodds doable


Just out of curiosity, how much AI programming have you done?

#8 dinscurge

dinscurge

    "I Hack, therefore, I am"

  • Members
  • 935 posts
  • Country:
  • Gender:Male
  • Location:the bunker

Posted 07 November 2012 - 09:26 PM

Just out of curiosity, how much AI programming have you done?


none at all :p just trying to make the point that, it doesnt have to be able to recognize a banana with a webcam to be able to reply to you saying that your eating a banana.

#9 tekio

tekio

    5(R1P7 |<1DD13

  • Binrev Financier
  • 1,082 posts
  • Gender:Male
  • Location:The Blue Nowhere

Posted 08 November 2012 - 01:15 AM



Just out of curiosity, how much AI programming have you done?


none at all :p just trying to make the point that, it doesnt have to be able to recognize a banana with a webcam to be able to reply to you saying that your eating a banana.


You just confuse me sometimes. I mention "AI" programming, but you went off stating it may not need to be "full blown AI". Guess I'm just too logical. When I say "AI", I mean "AI". Not "AI" that is not full-blown "AI".

Did that make sense?

#10 Powermaniac7

Powermaniac7

    mad 1337

  • Members
  • 138 posts
  • Country:
  • Gender:Male

Posted 08 November 2012 - 08:47 AM

Thanks guys. The day I posted this I asked a guy I've got added on Steam this same question and was given a similar answer. Although he pointed me in the direction of Stanfords free Java Programming course which I've started doing. It has been the least convoluted course yet and well explained and thus the easiest to follow.

Now I shall go explain why I've had trouble learning in the past and why I'm still finding it hard now.

#11 dinscurge

dinscurge

    "I Hack, therefore, I am"

  • Members
  • 935 posts
  • Country:
  • Gender:Male
  • Location:the bunker

Posted 12 November 2012 - 01:25 AM

You just confuse me sometimes. I mention "AI" programming, but you went off stating it may not need to be "full blown AI". Guess I'm just too logical. When I say "AI", I mean "AI". Not "AI" that is not full-blown "AI".

Did that make sense?

i mean like pseudo-intelligence, like you dont have to actually try to replicate a brain, emulating thought processes nd such, to have an "ai" that could reply to phrases and questions. i would think it would be possible just doing a vocabulary and grammar thing. unlike the science fiction "ai" which is like, trying to recreate emotions and ect.

#12 Powermaniac7

Powermaniac7

    mad 1337

  • Members
  • 138 posts
  • Country:
  • Gender:Male

Posted 12 November 2012 - 01:57 AM


You just confuse me sometimes. I mention "AI" programming, but you went off stating it may not need to be "full blown AI". Guess I'm just too logical. When I say "AI", I mean "AI". Not "AI" that is not full-blown "AI".

Did that make sense?

i mean like pseudo-intelligence, like you dont have to actually try to replicate a brain, emulating thought processes nd such, to have an "ai" that could reply to phrases and questions. i would think it would be possible just doing a vocabulary and grammar thing. unlike the science fiction "ai" which is like, trying to recreate emotions and ect.


Technically your idea of pseudo-intelligence is what now comes under artificial intelligence. Ever heard of the Turing Test? If not: http://en.wikipedia....iki/Turing_test
Large/little (take your pick) excerpt from the above link: The Turing test is a test of a machine's ability to exhibit intelligent behaviour, equivalent to or indistinguishable from, that of an actual human. In the original illustrative example, a human judge engages in a natural language conversation with a human and a machine designed to generate performance indistinguishable from that of a human being. All participants are separated from one another. If the judge cannot reliably tell the machine from the human, the machine is said to have passed the test. The test does not check the ability to give the correct answer; it checks how closely the answer resembles typical human answers. The conversation is limited to a text-only channel such as a computer keyboard and screen so that the result is not dependent on the machine's ability to render words into audio.
The Turing Test has been a large basis of the artificial intelligence world and main goal. Although now thanks to technology the world is branching out into many different directions of artificial intelligence. I can give you some examples if you want.

Edit: Might as well add is anyone able to help me out while I learn Java. If you have Steam add me under Powermaniac. Check out the programming section if you want to know about what the problem is in more depth.

Edited by Powermaniac7, 12 November 2012 - 02:46 AM.


#13 Powermaniac7

Powermaniac7

    mad 1337

  • Members
  • 138 posts
  • Country:
  • Gender:Male

Posted 15 November 2012 - 11:35 PM

Anyone have any idea how to activate the debugger so it shows what script is activating when my code is running in Eclipse Helios version 3.2. It has to be 3.2 as that has the Stanford libraries in it for the course I'm doing.

Thanks.

#14 phoenixrizing26

phoenixrizing26

    Will I break 10 posts?

  • Members
  • 6 posts
  • Country:
  • Gender:Male

Posted 28 November 2012 - 08:21 PM

So technically out of this thread of what im getting is that Siri (iphone) or (ziggy) windows phone is an A.I. in its own way but you must tell it what to do before it can act. last time i looked at anything with "A.I." features it had a crude "thought" process an could act on its own within limits of its programming it just confused me on how it was stated so if im wrong please let me know

#15 TheFunk

TheFunk

    SUP3R 31337

  • Members
  • 183 posts
  • Country:
  • Gender:Male

Posted 29 November 2012 - 03:34 PM

Basically, AI works just as you described. It's programmed to make simple decisions, and based on the outcome of these decisions take some form of action. Try and catch, except much more advanced than that. Modern AI has taken things a step further, and now we have things like neural networks, autonomous systems that can almost mimic human thought. Google for example has a huge unsupervised neural network that taught itself what a cat is. Basically it spent days Googling information about/images of/videos of cats. That's right, Skynet got bored, and is looking at lolcats.

Article: http://www.wired.com...neural-network/

#16 tekio

tekio

    5(R1P7 |<1DD13

  • Binrev Financier
  • 1,082 posts
  • Gender:Male
  • Location:The Blue Nowhere

Posted 03 December 2012 - 02:15 AM


You just confuse me sometimes. I mention "AI" programming, but you went off stating it may not need to be "full blown AI". Guess I'm just too logical. When I say "AI", I mean "AI". Not "AI" that is not full-blown "AI".

Did that make sense?

i mean like pseudo-intelligence, like you dont have to actually try to replicate a brain, emulating thought processes nd such, to have an "ai" that could reply to phrases and questions. i would think it would be possible just doing a vocabulary and grammar thing. unlike the science fiction "ai" which is like, trying to recreate emotions and ect.

pseudo-intelligence? Kiind of like AI, but not? ok......

Replicate the brain? don't think it's possible yet.......




BinRev is hosted by the great people at Lunarpages!