I think you need to engage them as to why they want live access, the reason is probably for 1 of 2 reasons: Your support is not fast enough or they want to integrate your data with theirs and do some correlation or unified display. The simple solution is to set up webservices so they can get at the data and you can control the SQL.
Thanks for the info. Seems like all I was missing was tacking a new line character and then a flush of the my output stream (ie the input stream of the exec'd process).
FYI, in java there is no "posix" class. The only way to interact with another process is by using Runtime.exec() and then using the Process Object ( http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ Process.html ) returned to interact with the process. Interacting properly actually requires starting 3 threads. I still seem to have a problem getting the prompt to be sent over the stdout from the other process, say for example, if I launch ssh or ftp. Its not that its buffered, it just never shows up. I guess its not entirely necessary. Ahh well. Thanks for the help.
Interesting... Seems like you are talking about more that just Runtime.exec() in Java, but sending input to other processes in general, regardless of the language. I'm making this assumption based on the 'C' based approach of your comments.
I'll have to try the cat -u, although on my maching (linux) the man page for cat specifies that -u is ignored.
Actually, you won't get any output from that, you need to hook up the InputStream from the Process object to the standard out of your own java process and run it in a separate thread or a while loop. I've also found that running interactive processes (both on windows and Unix in java 1.4) to be nearly impossible, as I can't seem to actually send data on the input stream of the other process. There are also platform dependent differences, which can be a pain. Generally I've found exec to be lacking.
Having learned to program without an IDE, I would have to recommend not using the IDE. Here's why:
An introduction to java course should not only teach about the language, but how to use the default tools (java, javac, javadoc, javap...) as well. Remember that java is more than just a language it is a runtime concept (VM) as well. I also suggest that you show your students the output of "javap -c" for hello world.
Teaching without an IDE is keeping it simple. Students aren't stuck on how to try and use the IDE and are focused on learning the concepts that you want to teach them.
I've found that some people coming out of college today don't really know what's going on behind the scenes because they've been allowed to use an IDE and not forced to use the command line. Using the command line forces students to understand what is going on behind the scenes.
Sometimes you can't use an IDE in real life. I've actually had this problem at work in a couple situations. One - after IT installed an upgrade to our IDE, the IDE had several problems, basically making it impossible to edit or debug code. Since I didn't rely on the IDE, I had no problems completing my work. Two - (well with C++ apps) we would deploy with all debug information removed, to a machine that did not have an IDE or debugger installed, so we only could use logging and other runtime tools for debugging anything that we couldn't reproduce under development conditions. Third time - I decide to do some work while visiting my parents and bring my laptop with me. Unfortunately, it just doesn't have the RAM to support Eclipse. I had no problem dropping that and using ant/vim/javac.
I must say that it probably would have saved me a lot of time using an IDE for my initial developement classes, but I feel that I've gained a much better understanding of what is going on and I'm a better programmer for learning things the "harder" way.
It always seems that someone is saying that their editor is the best (I'd have to side on vim with this one). I think its time for for people to pick up their keyboards and do battle in an editing contest. Of course the big question is how this editing contest should work.
There should be a small set of power users representing each editor.
Certain editors are better at some things, so there must be several differnt tasks that need to be accomplished, for example - write a file from scratch, change these comments (something very few code editors do well), create these data sets from this log file, replace all instances of X across all files that use it, rename class Y..., create a numbered list of Z, edit this Unicode file, you get the idea.
Contestants should be able to operate in the enviorment of their choice (OS, editor configuration...)
All keystrokes/commands must be logged
Final product must be buildable and runnable
Contestants may open multiple instances of their editor
Contestants must use ONLY their editor to complete tasks, If you editor allows you to execute shell commands, then they are allowed, but only if run from within the editor.
Best editor is judged by the total time to complete all tasks, then averaged across the number of representatives for that editor
Finally we can determine what the best text editor is and all the other people can wait till the next year and new releases to do battle!!.
ndiswrapper has some major shortcomings:
1) Does not work on any architecture other than x86
2) Does not and will not ever support Monitor Mode.
3) Relies on (sometimes buggy) windows drivers. This can especially be a problem for those of us who only use Linux. The Manufacturer will provide a driver update in a.exe file. I've not figured out how to extract the actual updated driver (*.inf file) from the executable (although I've not given the exercise serious effor). So for now I've got to stick with an older buggy driver
4) Most distrobutions do not put ndiswrapper in the kernel by default, so you will have to patch. Ubuntu is the only current distrobution I've found that does it, however you still will have to make sure you get the ndiswrapper package installed. Patching tends to be a pain in the butt, espically since you can't just d/l and install the latest kernel RPM for updates.
I would consider ndiswrapper a stepping stone to use until Linux can figure out a better way.
Why not? Did you read the article? This sounds like it emulates the entire x86 layer, not just one process. If that's true, then you could certainly find bugs in concurrent programs. In fact the article specifically mentions stuff like that. This also answers the granparent post about UI interaction.
To make a fully practical solution, there
supporting multiple processors, multiple clock domains, managing
breakpoints and watchpoints, handling large I/O operations, and so
on. Efficiently handling all these challenges is where various patented
secret sauces come into play. As with many things, the idea seems
simple but the devil is in the details.
The idea is that it would look to the developer as if the program really is running backwards. Of course, I could be wrong... Is there anyone who's actually tried this thing?
Is this a "known" issue. After all the developers can't fix something they don't know about. I'd imagine using a KVM switch is not all that common and developers may not even have access to one. If you want your bug fixed, visit the LKML or if you have the money, suggest that you will purchase a KVM switch for the developer in question to use.
I think that's part of the point though. When it is used as a web browser then it should work well as one. So "Up" doesn't make sense for a browser, except maybe for FTP sites. So it really shouldn't even be there. I've attempted to use Konquerer as a browser a couple times and there are just too many irrelavent/rarely used buttons and options. Sometimes buttons that just plain don't work (Cervesa!). Klean it up!
Re:Getters/setters bad?
on
Holub on Patterns
·
· Score: 5, Insightful
In the first case, you don't need getters and setters because the members are already public.
Having public members is generally a bad idea and gives me nightmares of old C structures. Here is the reason that you should use set/get methods:
1. Debugging - Try and trace a variable every time it is set when the variables are public. Wonder why you can't figure where it is going wrong? Adding 100 break points? Using set/get here can save hours of debugging.
2. No loss of Speed - most compilers will optomize your set/get functions if they are inline, so there is no performance penalty (atleast for c++).
3. Maintainance - Suppose that when data member A is updated, now a count needs to be kept. Using a setter function allows you to change code in one 1 place. Also, suppose a variable type changes from an int to a double. You can still keep around the integer setters/getters for older classes and use new accessor for the new methods for objects that need it.
From the article, its not that setters/getters are bad themselves, but that overuse of them is bad. Here is the key quote: Don't ask for the information you need to do the work; ask the object that has the information to do the work for you.
What better way to implement copy protection than using a obscure disk format. Who's gonna have a drive in their PC to copy these things? Not anyone I know in the next 5 years.
They are fixing this (http://dot.kde.org/1061880936/):
"The increased startup performance will be reached through reduced number of symbols, less read/write data and fewer static initiliazers. Fewer mallocs, faster and more optimised tool classes and reduced memory consumption will improve the runtime performance enabling Qt 4 to run on embedded devices that are slower and have less memory than today's desktop computers too.
To back up these statements Matthias gave some numbers about Qt Designer which was ported to Qt 4 with only the necessary changes to make it compile: The libqt size decreased by 5%, Designer num relocs went down by 30%, mallocs use by 51%, and memory use by 15%. The measured Designer startup time went down by 18%. "
Gotta love the fact that this whole comment page is filled with plugs for WxWindows and arguments over licenses that I've heard 100 times. Qt is GPL, get over it, so is the linux kernel. You want a Qt backend for Windows, then visit sourceforge or pay up. I don't think anyone actually read the damn article and discuss the new features. The new paint engine, SVG and Unicode Text layout I'm really excited about. Not so much about the template stuff, although interesting.
The major problem with Y that I see is the rendering of widgets. Most application use some sort of custom widgets (my project uses over 40). GUI toolkits rarely have all of the functionality you need for something other then a simple project. Anyway, how are the developers supposed to add custom widgets to the Y-Server over the network? Upload a lib and have Y-Server dynamically load it? (Oh the Security concerns!!) What if I'm on a different platform?
Unless Y provides a pixmap based rendering scheme, I don't see anything being ported to it (GTK, Qt...) and then once they are, we are back to square one with inconsistent look. Y will be a "neat-o" project, but I don't see it being used anywhere other then some fringe OS that needs a GUI.
Possibly, but would they really want to? The samba group ended up with faster code then MS by reverse engineering the SMB protocol instead of inheriting a bunch of code patched by different people over the years. I would imagine looking at the source would solve a bunch of problems for the short term.
To person of attractive opposite sex:
Me: How about a movie, some drinks and a game of strip poker
Her: I'll be right over.
Click.
I think you need to engage them as to why they want live access, the reason is probably for 1 of 2 reasons: Your support is not fast enough or they want to integrate your data with theirs and do some correlation or unified display. The simple solution is to set up webservices so they can get at the data and you can control the SQL.
Does it look like "666"?
Thanks for the info. Seems like all I was missing was tacking a new line character and then a flush of the my output stream (ie the input stream of the exec'd process).
/ Process.html ) returned to interact with the process. Interacting properly actually requires starting 3 threads. I still seem to have a problem getting the prompt to be sent over the stdout from the other process, say for example, if I launch ssh or ftp. Its not that its buffered, it just never shows up. I guess its not entirely necessary. Ahh well. Thanks for the help.
FYI, in java there is no "posix" class. The only way to interact with another process is by using Runtime.exec() and then using the Process Object ( http://java.sun.com/j2se/1.4.2/docs/api/java/lang
Interesting... Seems like you are talking about more that just Runtime.exec() in Java, but sending input to other processes in general, regardless of the language. I'm making this assumption based on the 'C' based approach of your comments.
I'll have to try the cat -u, although on my maching (linux) the man page for cat specifies that -u is ignored.
Actually, you won't get any output from that, you need to hook up the InputStream from the Process object to the standard out of your own java process and run it in a separate thread or a while loop. I've also found that running interactive processes (both on windows and Unix in java 1.4) to be nearly impossible, as I can't seem to actually send data on the input stream of the other process. There are also platform dependent differences, which can be a pain. Generally I've found exec to be lacking.
How about security problems and lots of money for the cell phone providers as they charge you for bandwidth. That's all I'm really seeing.
- An introduction to java course should not only teach about the language, but how to use the default tools (java, javac, javadoc, javap...) as well. Remember that java is more than just a language it is a runtime concept (VM) as well. I also suggest that you show your students the output of "javap -c" for hello world.
- Teaching without an IDE is keeping it simple. Students aren't stuck on how to try and use the IDE and are focused on learning the concepts that you want to teach them.
- I've found that some people coming out of college today don't really know what's going on behind the scenes because they've been allowed to use an IDE and not forced to use the command line. Using the command line forces students to understand what is going on behind the scenes.
- Sometimes you can't use an IDE in real life. I've actually had this problem at work in a couple situations. One - after IT installed an upgrade to our IDE, the IDE had several problems, basically making it impossible to edit or debug code. Since I didn't rely on the IDE, I had no problems completing my work. Two - (well with C++ apps) we would deploy with all debug information removed, to a machine that did not have an IDE or debugger installed, so we only could use logging and other runtime tools for debugging anything that we couldn't reproduce under development conditions. Third time - I decide to do some work while visiting my parents and bring my laptop with me. Unfortunately, it just doesn't have the RAM to support Eclipse. I had no problem dropping that and using ant/vim/javac.
I must say that it probably would have saved me a lot of time using an IDE for my initial developement classes, but I feel that I've gained a much better understanding of what is going on and I'm a better programmer for learning things the "harder" way.Finally we can determine what the best text editor is and all the other people can wait till the next year and new releases to do battle!!.
Apparently, McNealy is good enough for the Government....
ndiswrapper is fine for most cases.
.exe file. I've not figured out how to extract the actual updated driver (*.inf file) from the executable (although I've not given the exercise serious effor). So for now I've got to stick with an older buggy driver
ndiswrapper has some major shortcomings:
1) Does not work on any architecture other than x86
2) Does not and will not ever support Monitor Mode.
3) Relies on (sometimes buggy) windows drivers. This can especially be a problem for those of us who only use Linux. The Manufacturer will provide a driver update in a
4) Most distrobutions do not put ndiswrapper in the kernel by default, so you will have to patch. Ubuntu is the only current distrobution I've found that does it, however you still will have to make sure you get the ndiswrapper package installed. Patching tends to be a pain in the butt, espically since you can't just d/l and install the latest kernel RPM for updates.
I would consider ndiswrapper a stepping stone to use until Linux can figure out a better way.
Why not? Did you read the article? This sounds like it emulates the entire x86 layer, not just one process. If that's true, then you could certainly find bugs in concurrent programs. In fact the article specifically mentions stuff like that. This also answers the granparent post about UI interaction.
To make a fully practical solution, there supporting multiple processors, multiple clock domains, managing breakpoints and watchpoints, handling large I/O operations, and so on. Efficiently handling all these challenges is where various patented secret sauces come into play. As with many things, the idea seems simple but the devil is in the details.
The idea is that it would look to the developer as if the program really is running backwards. Of course, I could be wrong... Is there anyone who's actually tried this thing?
Well, I'm glad to see that you are pursuing the bug using the proper methods. Good luck.
Is this a "known" issue. After all the developers can't fix something they don't know about. I'd imagine using a KVM switch is not all that common and developers may not even have access to one. If you want your bug fixed, visit the LKML or if you have the money, suggest that you will purchase a KVM switch for the developer in question to use.
Actually, I'd much prefer that systrace be configured for my media player than running a complete instance of UML.
Systrace
I think that's part of the point though. When it is used as a web browser then it should work well as one. So "Up" doesn't make sense for a browser, except maybe for FTP sites. So it really shouldn't even be there. I've attempted to use Konquerer as a browser a couple times and there are just too many irrelavent/rarely used buttons and options. Sometimes buttons that just plain don't work (Cervesa!). Klean it up!
In the first case, you don't need getters and setters because the members are already public.
Having public members is generally a bad idea and gives me nightmares of old C structures. Here is the reason that you should use set/get methods:
1. Debugging - Try and trace a variable every time it is set when the variables are public. Wonder why you can't figure where it is going wrong? Adding 100 break points? Using set/get here can save hours of debugging.
2. No loss of Speed - most compilers will optomize your set/get functions if they are inline, so there is no performance penalty (atleast for c++).
3. Maintainance - Suppose that when data member A is updated, now a count needs to be kept. Using a setter function allows you to change code in one 1 place. Also, suppose a variable type changes from an int to a double. You can still keep around the integer setters/getters for older classes and use new accessor for the new methods for objects that need it.
From the article, its not that setters/getters are bad themselves, but that overuse of them is bad. Here is the key quote: Don't ask for the information you need to do the work; ask the object that has the information to do the work for you.
You might want to check out ZFS when solaris 10 comes out. http://www.sun.com/2004-0914/feature/
What better way to implement copy protection than using a obscure disk format. Who's gonna have a drive in their PC to copy these things? Not anyone I know in the next 5 years.
Did anyone find this funny:
Linux is well known for offering high-level security for both servers and desktops, with the fewest security issues of any operating system.
I nearly fell off my seat. I swear I get atleast 5 security updates a week. I don't think these people have heard of OpenBSD.
They are fixing this (http://dot.kde.org/1061880936/):
"The increased startup performance will be reached through reduced number of symbols, less read/write data and fewer static initiliazers. Fewer mallocs, faster and more optimised tool classes and reduced memory consumption will improve the runtime performance enabling Qt 4 to run on embedded devices that are slower and have less memory than today's desktop computers too.
To back up these statements Matthias gave some numbers about Qt Designer which was ported to Qt 4 with only the necessary changes to make it compile: The libqt size decreased by 5%, Designer num relocs went down by 30%, mallocs use by 51%, and memory use by 15%. The measured Designer startup time went down by 18%. "
Gotta love the fact that this whole comment page is filled with plugs for WxWindows and arguments over licenses that I've heard 100 times. Qt is GPL, get over it, so is the linux kernel. You want a Qt backend for Windows, then visit sourceforge or pay up. I don't think anyone actually read the damn article and discuss the new features. The new paint engine, SVG and Unicode Text layout I'm really excited about. Not so much about the template stuff, although interesting.
Anyone know where a package list is? The one on fedora.redhat.com still lists Fedora Core 1.
The major problem with Y that I see is the rendering of widgets. Most application use some sort of custom widgets (my project uses over 40). GUI toolkits rarely have all of the functionality you need for something other then a simple project. Anyway, how are the developers supposed to add custom widgets to the Y-Server over the network? Upload a lib and have Y-Server dynamically load it? (Oh the Security concerns!!) What if I'm on a different platform?
Unless Y provides a pixmap based rendering scheme, I don't see anything being ported to it (GTK, Qt...) and then once they are, we are back to square one with inconsistent look. Y will be a "neat-o" project, but I don't see it being used anywhere other then some fringe OS that needs a GUI.
Possibly, but would they really want to? The samba group ended up with faster code then MS by reverse engineering the SMB protocol instead of inheriting a bunch of code patched by different people over the years. I would imagine looking at the source would solve a bunch of problems for the short term.
Of course if this turns out to be true and all.