Jump to content
xisto Community

docduke

Members
  • Content Count

    150
  • Joined

  • Last visited

Everything posted by docduke

  1. Sometimes, one can make up an axiom or a postulate, and see what follows from it. This is how much of abstract math has been developed. The result may prove to be of benefit in physics or engineering, if it seems to make a connection with physical processes. It is said that Albert Einstein wasn't at all interested in manifold geometry until someone explained to him that it was used to describe curved space. He then realized that it could mathematically describe the behavior of gravity. The result was his General Theory of Relativity.This also happens with general observations. Some engineers in Australia, I believe, were trying to get rid of background noise in long-distance microwave transmissions. They noticed that it peaked at a certain time of day, and the time of that peak came 4 minutes earlier each day. Mundane observation, right? Well, it turns out that they were the first observers of the "black-body" remnant of the Big Bang. I believe they got the Nobel Prize for it. Just an observation looking for a theory.Similarly, people have been observing sunspots since not long after Gallileo. They noticed that the "Little Ice Age" coincided with the "Maunder Minimum" in sunspots. Theory: if no sunspots, then it gets cold. Recently, a Scandanavian astrophysicist has offered an explanation in terms of the solar wind (which is present with sunspots) reducing the cosmic ray flux to the Earth, causing fewer clouds, and thus letting the Earth warm. Guess what? The sun has been unusually quiet (1 sunspot per month) recently. It's too early to be certain, but we could be in for another really cold spell. Would that be enough to that embarrass all those "Anthropogenic Global Warming" folks?
  2. The main reason I put this tutorial up was to show how easy it can be to produce Windows code. I'll never forget the first time I got set up to make Windows with Microsoft Visual Studio .NET. I tried to install it on a fresh install of Windows 2000 Pro. Wouldn't go -- said it needed .NET first. I tried installing .NET and got some cryptic error message. It turned out that .NET wouldn't go until I had Windows 2000 updated. It needed Service Release 3 or so, but the error message didn't tell me that. I think it took me 2 days to figure out how to get it done. Even then, the successful formula was to prevent a "reboot" when one of the partial installs asked for it, and proceed with the next install. If I need to make a professional-looking window with all the components in just the right place, something like Visual Studio may be necessary. For just getting windows up with the necessary elements in default locations, Python is very much faster. There are books such as Python and Tkinter Programming that explain how to do detailed layout. Mark Hammond is responsible for really integrating Python into Windows. He is an author of another book, Python programming on Win32, which covers much more general programming on Windows. I remember reading somewhere that his tools are powerful enough that a programmer can fairly easily run a message loop exclusively in Python, and completely take control of a computer away from Microsoft! Finally, the primary author of Python is Guido van Rossum. He was a professor in the Netherlands when he began it. Now he is in the U.S. tasked by Google to produce an improved version, Python 3.0. Python has been used in numerous commercial tasks, including movie-making and Google itself. There was a growing list of testimonials on the Python website, but it has now been replaced by a long, organized list of success stories.
  3. If you follow this tutorial you will: 1. Install Python 2.5.1 on Microsoft Windows 2. Run a one-line "Hello World" interactive program 3. Pop up a "Hello World" Windows Message Box. 4. Pop up a two-button Windows dialog box which interacts with your program. 5. Learn where to find more tutorials and documentation The first 4 of these can be done in 3 minutes if you are focused! This is a cookbook. Before "cooking" the recipe, you need a few ingredients: 1. Get the python installer at Python 2.5.1 Windows installer. 2. Create a folder, and know its location. Mine is at D:\b\Wins 3. Copy the following program, paste it into an editor and save it as a file in the folder. from Tkinter import *class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", bg="yellow", command=master.destroy) self.button.pack(side=LEFT) self.hello = Button(frame, text="Hello", command=self.say_hi) self.hello.pack() def say_hi(self): print "Hello, new Python programmer!"root = Tk()app = App(root)root.mainloop() I saved it as D:\b\Wins\Buttons.py Do the preceding things to prepare for the 3 minutes. There are additional items you may need if you are on an earlier Windows platform. If your platform does not recognize a .msi Windows installer file, you may need Windows Installer 2.0 Redistributable for Windows 95, 98, and Me, or a later version for Windows 2000 or NT. The text editor you use to save the program should not convert blanks to tabs. White space is significant in Python programs, and there is no standard for how many blanks equals one tab. Recipe: Ready to go? Start your stopwatch! 1. Double-click the Python installer. (Take all defaults.) It asks whether to install for just you, or all users. Take the default (all users). It asks whether to install only parts of the package. Take the default (all packages). It asks where to install. Take the default (C:\Python25) Tell it to do the install. Click Finish. Total elapsed time 35 seconds on my computer. 2. Click Start | All Programs | Python 2.5 | Idle (Python GUI). Type the following text into the Python Shell: print "Hello world!" Hit Return. Python will respond by doing what you told it to do. Congratulations, you have run your first Python program! Elapsed time 1 minute. 3. Next, type in the five-line program that appears below this outline. It is case-sensitive! Note the syntax highlighting and argument prompts that occur as you type. When you hit the Enter key after the last line, a window will pop up. It can easily become hidden under the Python Shell window. If so, click on the "tk" item on the task bar. Close it. This will return control to the Shell. Elapsed time 2 minutes. 4. From the Shell menu, select File | Open, navigate to the file you saved before, and select it. In my case, it is D:\b\Wins\Buttons.py Click Open. A new window will open, showing the file. Press the F5 function key on the keyboard. The Shell will come to the top of other windows, and a two-button window will pop up. Explore the two-button window, but first note the time on your watch: Total elapsed time: 3 minutes! This five-line program creates a label window using standard Windows system calls and messages. The iconize, minimize, and close buttons function as usual. Clicking the top-left corner of the window produces the same menu as right-clicking the task bar button. If you want to play with it some more, do the following: Copy the text (from here, not from the Shell). From the menu on the Buttons.py window, select File | New Window and paste the text into that window. Then select File | Save As and give it a File Name ending in ".py". It will be saved in the same folder as Buttons.py. The Buttons.py program puts two buttons in a frame. One, which closes the window, is given unusual colors. The other performs a "call-back," executing the "say_hi" method when it is pressed. I have been programming for 50 years. Python is by far the easiest, most productive, least-error-prone language I have ever used. However, like any language, it must be learned. More complex tasks require more study. Fortunately, there are many excellent tutorials, and comprehensive documentation. Here are a few resources: In any Python window, click Help | Python Docs | Tutorial. Alternatively, when any Python window has focus, press the F1 function key. The tutorial will introduce you to basic, and not-so-basic Python tools. The Global Module Index introduces you to many available resources, like Tkinter. And yes, all of this came in that 10 MB package you installed! For the essentials of pop-up windows on a Microsoft platform, see: An Introduction to Tkinter . Most of these programming tools also work on Linux, Mac, Java, .NET and many other platforms. Enjoy!
  4. There is one other thing to consider. Ubuntu has a twin brother Kubuntu. The two share the operating system, but differ in the user interface. Ubuntu uses a "clean," more Mac-like desktop. Kubuntu uses the KDE desktop, which more closely resembles the Windows desktop (start menu at the bottom left, task bar at the bottom, etc). Ubuntu also comes in both "desktop" and "server" editions. You want the "desktop." The server is for hosting a website. The ubuntu distro (along with an increasing number of other distros) comes as a "live CD." That means if you can boot off a CD, you can try out that particular brand of Linux without installing it on your computer. It is much slower than running off a hard drive, but it lets you try the OS out without going through the hassle of installing it (and maybe uninstalling it).That's how I learned, for example, that the Ubuntu live CD will automatically mount the partitions on your computer if you click on them, while in Kubuntu, you need to go to a console and enter the shell commands to make a path and mount the partition. (Or maybe do something simpler that I haven't been able to guess. )
  5. There have been mixed reports on E-Machines. I have one that is 10 or 11 years old (Win 98), and have never had a problem with it. It lives on my home network, and does email and text editing just fine. There have been complaints more recently about quality control and access to tech support, but it is hard to find a computer manufacturer these days that doesn't have problems providing good, free tech support. Judging from the specs at your link, they are making compromises in reasonable places: they are using 2x 512 MB memory modules, so you would have to replace both if you wanted more than 1 GB. They also "share" some of it for graphics memory, which saves them (and you) money. The video card has just recently dropped off the list of current cards (PDF) at MSI. The 6200, in the same family, is still there. Note in the e-Machine picture: Display sold separately. The monitor in the picture might well set you back as much money as the computer. Unless you got an advanced monitor with your present computer, you may find that today's software is hard to read. You may find a medium-resolution monitor (e.g. 1280x1024 on a 17" or larger screen) necessary for today's software. See: resolution. I don't know what your applications are, but if you are in school, you might be interested in Linux. A 160 GB drive is big enough to dual-boot Windows and Linux. (On the other hand, if you're into music, video or high-resolution photography, nothing will be big enough! As the world economy slows down, look for deals!
  6. Here is an interesting link to somebody who is a skilled programmer, but wanted to decide for himself which language is most useful in general applications. He has done the best job I have seen comparing C++, Java, Python and Ruby. He has chosen a relatively sophisticated computer-science problem, implementing a red-black tree for for maintaining a collection of data elements. He has coded it in all four languages, and constructed a very elegant HTML frame page in which you can compare any two of the languages side-by-side. As a result, you can just look at the different language constructions and get a sense of how the language is written, and what is needed to solve challenging problems. If you are interested in trying them out, he even has the code in a zip file, so you can download it and work with it yourself. His conclusions are presented at the first link. Basically, when a programmer has chosen the relative importance of execution speed, portability, program clarity and ease of debugging, the programmer has probably chosen a language. Take a look!
  7. The one I use most is Arachnophilia. It is html-oriented, free, and written in Java, so it will run on anything that hosts a Java virtual machine. I started with it almost a decade ago. It is now up to version 5.3, and very stable. It automatically located both my browsers (IE, Firefox), and with a single button push, will display the file I am working on in the browser I have selected at that time. So I can edit the file, and at any time get a display of what it will look like in the browser of my choice. Besides, it is fun to look around the rest of the arachnoid website. He has the best explanation around for why the night sky is dark. The answer to Olbers' Paradox is elegantly explained with animated illustrations.
  8. Thanks for the link. I am getting ready to install a virtualizer, and I had tentatively selected VMware, but I was unaware of VirtualBox. I'll check it out.There is one thing I would like to do that I have been told is easy in VMware, but I haven't tried it. That is to take a running program elsewhere on the network, and suck it into a VMware virtual machine. I have a Windows 2000 pro configuration on another computer whose capacitors have become "a little bit pregnant." The computer is 6 years old, I have a lot of highly customized, expensive software on it, and I do not wish to go through the agony of replacing the motherboard and getting Win2K to recognize all the new drivers. VMware is supposed to have an elegant solution to this -- it just sucks the running system on the other computer into a virtual machine on the new host.Before I commit to VMware, I'll see if VirtualBox has anything comparable. If anyone else has information about how to "back up" one computer into a virtual machine on another computer, I would be very interested to hear about it.
  9. It's pretty amazing, but the problem is the speed of light, and of electrons, is too slow! This is why the big supercomputers have very high degrees of parallelism (thousands of processors!) It also means that programs that will take advantage of the multiple processors have to be designed for the task. This is where multi-threaded programs perform well. It is also a natural for servers that are running multiple tasks. The place where major computer science is involved, is where a really large-scale problem, like world weather modeling, needs both massive CPU usage, and coupling of the results from each CPU. Fortunately, "normal" people seldom have to deal with such problems!
  10. In my opinion, the coolest thing with many Linuces is "live CD" or "live DVD" disks. One thing you are very unlikely to see is a proprietary operating system that you can run from an optical disk without installing it. This makes it very easy to try out a new version of Linux without having to install it (and maybe go through the even greater hassle of uninstalling it). An interesting sidelight is in post #3 on the thread you linked to: I remember timing comparisons on mathematical algorithms in DOS, Win 95, Win 98, Win NT, etc. I believe the last one I saw was when Win XP came out. DOS always won! It would be interesting to redo that on a dual-core or quad-core processor. DOS programs have not been designed to run in a multi-threaded environment. Win 2K and XP make extensive use of it. They might finally be able to challenge DOS on the efficient use of the CPU. That is probably also true of the current Mac OS X on a multi-core CPU.
  11. Point granted. And you provided him with multiple links for compilers, which was his first request. Maybe I should have left it at that... But the initial post continued with "Second question: How do you program a GUI?..." Have you ever tried constructing a GUI in C? I actually have, but the effort didn't last very long. Many too many misunderstood structures, incorrect pointers, and other things that are very difficult to find in C, unless you're using and IDE with a debugger, and I haven't found one of those that doesn't cost real money. Have you found a good IDE C system? Your link to DJGPP looks like a possibility, but I've never seen DJGPP before. Is it usable for GUI development? Another possible choice for C is MinGW. I haven't used it for a decade, but it turned up in the google search you posted, and it certainly has a lot of development behind it.
  12. Nothing except what comes with the python installer. It is fully functional as a standalone package. (Of course it requires an operating system.) I just took a look at my Python 2.5 installation. It includes several add-ons, and occupies 49.1 MB on my hard drive. The .msi (compressed) installer of Python 2.5 is just 10.2 MB. If you want one that talks with .NET, IronPython is available. As another alternative, if you want it to generate pure Java code, try Jython. Of course, you can develop free software. Most of the apps are. But you are not forced to. Python used to have a lot of testimonials from people in various businesses. I just did a search and found one: Industrial Light and Magic. There were so many more, including Google, that the Python website has buried them. The original inspiration behind Python was Guido van Rossum. Python is so important to Google that they have currently employed him to extend the development of Py 2.5 to Py 3.0, including extensions that matter very much to them. C++ is a "wrapper" for C. Technically, the C++ engine is a macro processor that takes C++ source code as input, and generates C code, which makes use of a lot of functions from libraries that are used specifically to facilitate higher-level operations for which C++ is intended.
  13. I'll go you one for the "good old days." I still have a daisywheel printer upstairs. Remember those? They were considered blindingly fast compared to an IBM Selectric printer with a plastic ball printhead! I have Brother lasers, but they have a "counter" built-in so that when it has done the amount of toner Brother has declared, it shuts down and will not print until the cartridge is replaced. I get recycled ones from Office Max at around $60, but they still play the "shutdown" game. As I recall, some company tried to defeat that "shutdown" technology in HP printers, and HP sued them out of business. It was an application of the "Digital Millenium Copyright Act."Are you satisfied with the quality of the Samsung printing with refilled cartridges?One other trick for saving money (but paying more for the printer) is to get a printer that will do double-sided printing. That halves the amount of paper you use, and also halves the storage requirements. I have a Brother MF8640D laser and an HP DeskJet 970CXi for color printing. Both print double-sided automatically.
  14. Maybe it's time to consider another language. When Kernighan and Ritchie originally developed C in 1978, it was considered functional, but low level. Now, it is the primary alternative to assembly language. Writing a GUI in it is very error-prone. That is why languages like C++ were developed, but they have complex syntax and a number of "gotchas" that make minor errors very hard to find. I do almost all my programming in Python. It is free, open source and exceptionally easy to learn. It is also licensed so that you can develop software and sell it commercially -- it is not GPLed. It has many GUI Frameworks that will run on Windows and Linux as well. Install the appropriate Python compiler and extensions on your favorite system, and the code you develop on one system will run on others. As an illustration of how Python has major advantages, consider the market application TeleChart. It has a "Developer's Kit" which is intended to be accessed from Visual Basic or Visual C++. I am calling it from Python. My program also spawns GUI subwindows using Tkinter and Python megawidgets. Programming a GUI system in Windows (or Linux for that matter) is very complex, because there are literally thousands of system calls, and mastering them is best avoided by using a toolkit that is adapted to your application. Just mastering the toolkit will require days, if not weeks. Hope this helps!
  15. Lifehacker is a legitimate website, so far as I have seen. Here are some pages I have recently bookmarked: http://lifehacker.com/336991/free-tools-to-manage-new-years-resolutionshttp://lifehacker.com/software/feature/organize-your-money-in-2008-with-wesabe-334283.phphttp://lifehacker.com/336976/how-to-set-up-your-new-computerhttp://lifehacker.com/software/hack-attack/build-a-hackintosh-mac-for-under-800-321913.phphttp://lifehacker.com/software/benchmarks/hackintosh-vs-mac-pro-vs-macbook-pro-benchmarks-322866.phpCopy and paste if you want to check. I don't have his website in my browser bookmarks, but I often find links to him from other websites. The last two are a particularly good illustration of his projects. Transform a PC into a MAC. He bought all the parts (and the software) legitimately, as far as I can tell, but I certainly wouldn't have a clue how to do something like that without help! I find such projects inspirational!
  16. With the "fluent" restriction, I am limited to English. Next, which I like a lot, but don't practice enough, is Esperanto. It uses the Roman alphabet, minus qwyx, plus ĉĝĥĵŝŭ. It is artificial, phonetic, almost completely regular, and very easy to learn. Really. When I first heard of it, I was in my second year of struggling with Russian at MIT, and the president of the Harvard Esperanto Club told me he could have me speaking it in 10 lessons over 10 weekends. Really!? I asked. He did it! That was 41 years ago, and I am still able to read (most of) the Esperanto Wikipedia. I have taken a semester or more of: Latin, Russian, Italian and French, plus self-study of German, Japanese and Chinese. Latin was in High School, and actually proved useful when I was at the Circus Maximus in Rome, and met a Spaniard who spoke no English. At the time, I spoke no Italian. We both spoke Latin, so we got along! I studied all the other languages in preparation for visiting countries where they were spoken, except for Chinese. My son took a class in Chinese, so I studied along with him. Computers have really caused a revolution in the study of Chinese! I spent months learning how to look up Chinese characters in a dictionary by identifying radicals and counting strokes. Now, I just put the UTF-8 representation into a search engine, and immediately get the English translation of that character (in isolation). The most fundamental conclusion I can draw from my experience is: if you don't use it, you'll lose it!
  17. I also agree that Walmart has its limitations, but what it does provide is valuable. I use their online photo entry for prints both when I am in a hurry (1-hour service) and when I am not ($0.09/ 4x6 print), 1-week turnaround. Either way, it costs less than color printing on high-quality paper! I have learned to live with their limitations. For example, their "crop" tool reformats arbitrarily to fit the geometry of 4x6, 8x10, etc. It seldom does what you want. So instead, I use Picasa from Google to do the cropping. It lets you configure the crop exactly as you wish. Then I upload the result to Walmart and the print comes out as I want it.
  18. One more quick check. I have Windows XP SP2 on a computer (plus SuSE Linux in another partition). I booted it and continuously toggled F11 while it was booting. It ignored me and booted normally.
  19. Actually, there is another very important third gas, H2O! Water vapor is by far the dominant "greenhouse gas," and its presence, either as an invisible gas, or as clouds, is the dominant "greenhouse" effect. The politicians espousing "global warming" are misguided, to put it politely. Less politely, they are involved in a major attempt at gaining personal power.
  20. Except MS-DOS may not be easy to find. Microsoft has a Knowledge Base article How to partition and format a hard disk in Windows XP which can be used from the Startup disk. That is hopefully the "bootable CD" the dealer provided.
  21. Comments on this thread: 1. I have used Power Quest Partition Magic for more than a decade. That is the best choice, if your can get it. Unfortunately, they were bought out by Symantec and shut down, because their Drive Image product was the strongest competition to Symantec's Ghost. You may be able to get a copy of it off Ebay or some other reseller. Do that if you can. It'll be around $70, and worth it. 2. I have also used Knoppix, and like it. However, you have to be fluent in Linux commands to use it. "Free" comes with a learning curve. 3. An alternative I've used is Bing (Boot-It Next Generation) by TeraByte. It costs $35, and does a lot more than format drives, but, again, you need to know something about Master Boot Records. That is a smaller learning curve than Linux, but it'll still take a day or two of reading. Terabyte also has a Forum with people who can help you walk through the reformatting process. My advice is: Get PM if you can find it. If not, try Bing. Some time in the future when you don't have an immediate problem, learn Linux. Knoppix is a good place to start, because you can run it off a CD without touching your hard drive!
  22. As a one-time member of the International Brotherhood of Magicians, let me inform you that we prefer to call ourselves "Illusionists!" The issue is not whether to believe it, but whether you have enough dexterity and the ability to distract the attention of the audience. Tom Robbins gave the best reason for belief in magic: âDisbelief in magic can force a poor soul into believing in government and business.â he also said: âThe magician and the politician have much in common: they both have to draw our attention away from what they are really doing.â He expresses my view of government better than I can!
  23. I have the impression, from what you posted, that you may be flexible about the type of repository you are going to install. If you are cloning a CVS repository from someone else, disregard this comment. I have used CVS, SVN, RCS, and some really dark-ages revision control systems on mainframes. In my opinion, SVN is the best. It's also the newest, and was developed specifically because the developers of CVS refused to remove some of the warts on their software design. A comparison of CVS and SVN is here. As you can see at the bottom, the author considers their advantages and disadvantages almost equal. The website for Subversion (SVN) is here. For me, the most compelling advantages of SVN are: Directories, renames, and file meta-data are versioned. Commits are truly atomic. The meaning of these terms is explained on the SVN website. The effect is that most of the things a "reasonable person" would want to do are nearly automatic in SVN. P.S.: The SVN download page reports that: Binary builds of Subversion for SPARC/Solaris 2.5 – 10 and x86/Solaris 8 – 10 are available at: http://www.sunfreeware.com/introduction.html . Maintainer: CollabNet, Inc. CollabNet Subversion is Subversion compiled and tested by CollabNet, and deployed with CollabNet's recommended configuration for the enterprise.
  24. Some people are "visual," others find images a distraction. I fall in the latter category. My Firefox extensions are (I'm checking the Tools | Add-ons as I write this):1. Adblock Plus -- You know what it does2. NoScript -- Turns off Javascript and other stuff. You can re-enable it by website, one-time or permanently3. PDF Downloader -- Lets you separate PDFs from the browser, so it doesn't freeze.4. PopupMaster -- Complementary to Adblock Plus.I have to add a caveat. I have two computers. When I want all the java, video, music, flash, etc. I use one computer. When I want to browse text with peace and quiet, I use the other, with all these plugins active.
  25. The same principal applies around the web, and even outside. Many businesses proudly announce in business since 1999 or whenever. For a commercial enterprise, continued existence means that they are providing a service for which there is a continuing demand. On the web, particularly with open-source software, the folks who have been around a long time are not only providing something for which there is demand, they are providing something that is good! Just today, I ran into an "old friend." It is Arachnophilia, a Web page development workshop and general programming tool. I used a much earlier version of it on a PC nearly a decade ago. Now it is in Java, so that it will run on Windows, Macs, Linux, open-architecture cell phones(?), and anything else that will host Java 1.5. Arachnophilia is something different from pure freeware. It is Careware. I encourage you to click on that link. It is a bit Americocentric, but the concept is ageless! After I have refamiliarized myself with Arach (as its friends call it), I will write a review. But for now, I suggest you click on the main link above, and just look at that page, and others reached from it. They provide an excellent introduction to really good web page design. As another example, look at the Freeware page. Note the pull-down list at the bottom of the page. Arach does naturally, many very nice things that you seldom see on the web.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.