The example GUI application is a simple game, but the methodology could be used for any GUI application.
From the article:
The big question was how to handle all the stuff that would normally be considered GUI code-specifically, the hit-testing: Where do users click, and what should happen when they click there?
I suspected that hit-testing would be the most complex part of the application, so I wanted to ensure that I had tests for it. It also didn't belong in the model, since that should contain only basic game concepts. I needed an intermediary class somewhere: The Swing code would get a mouse event and delegate it to this intermediary class. The intermediary would interpret the mouse coordinates and determine if something had to happen. It would possibly do this by interacting with the model. If anything did happen, an event would be broadcast back to the Swing class.
The author goes on to discover, after searching with Google, that he had developed "a pattern known as Model-View-Presenter (MVP), a variant of Model-View-Controller (MVC)."
In MVP, the View actually serves as both the view and controller (presenting output and managing input). The Model is the Model, as in MVC. The extra middle layer is considered a bridge between the View and the Model. It's specific to the application and is often considered throwaway if the View needs to change (for example) from Swing to HTML. In this situation, the Model would remain unchanged.
At home I run 3 linux servers, 1 linux firewall, 2 linux desktops, and 1 windows desktop PC [games]. My main desktop was a Windows PC running mostly free software so that when we switched to just Linux on the desktop, it would be easy for my wife and kids. We made the switch to Linux on that desktop a year or so ago.
I still have to go back to Windows for printing color photos to different types of photo paper [HPDeskJet712C]. We also have to use Windows for most of the purchased PC games and educational software. My wife misses the HP Copier application [scanner->printer] and PrintMaster [greeting cards].
I mainly like Linux and free software because I am frugal and because I don't believe in pirating software. I also like the filesystem choices and the rock solid stability that Linux systems provide. I also like being immune to the myriad of Windows viruses and worms.
I recently had a trip to Anaheim and chose my hotel based on whether it had free high speed internet access (looked it up at GeekTels before I reserved my room) since I would be doing alot of downloading of documents for committee meetings that I had that week.
I would also plan trips to a particular airport if it had WIFI rather than nearby ones, especially if I have a layover. To fly to my parents house in Pennsylvania, I could fly into Cleveland, Erie, or Pittsburgh. I normally like Cleveland due to the lower fares, but also like Pittsburgh due to the nice shopping area with non-airport pricing and I like the airport train (which I worked on).
This is what I did - although the field change wasn't so dramatic (I moved from electrical engineering). I went to University of Phoenix (they had a local campus in Denver) and got an MS in Computer Information Systems. I really liked their 5 or 10 week long classes, one night a week, a small class size, and a teacher that is from the workforce. I understand they now have online degrees, but my brother (who just got his MBA) tells me it is much harder online.
My son went through Neurotherapy for a year at AnchorPoint. It was amazing the way he was able to use his mind to calm himself and place himself in better control. They monitor the alpha, beta, and theta waves in the brain, and are able to show when he is out of control, etc. They try to basically get the signal to noise ratio better by doing certain computer related exercises.
We found that although my son was able to improve his concentration (less day-dream waves), his diet, The Feingold Diet, actually improved his behavior better by removing known stimulants from his food (artificial colors, flavors, and artificial preservatives BHA, BHT, TBHQ).
On a side note and from a techy perspective, the neurotherapists are using some nifty electronics (ISA cards) that amplify the brain waves. The hardware/software they use (proprietary) will only run on slow PCs (Pentium I class or less) and Windows 95 or 98, and also require a SoundBlaster brand only sound card. They could really use some open-source software!
Descent is a game where you pilot a spaceship through a mine inside an asteroid that has been taken over by robots. The object is to destroy the reactor and exit the mine before the reactor explodes. The Descent projects are the D2X Project and the D1X Project.
IC-Musicmedia is a music-online-community that gives international artists the opportunity to present their music, their band, their label and its releases and other contents online, and every visitor the access ability to it.
I wonder what will happen to sites that lived off mp3.com - such as Liquid Stereo?
Unit testing was the first XP key practice that I started to use. When I would have to make a change in my mature code, I would add a unit test section to the module I was changing (using #define TEST), and add a main() to execute the unit test (using #define TEST_MODULENAME). See examples of this on my software page. I then began using test-first programming by writing the unit test first, seeing it fail, then writing just enough code to make it pass.
Other extreme programming sites that have been useful have been extremeprogramming.org , which has a great tutorial that includes an introduction and overview, and the site Extreme Programming.
The router that implements this evil bit could send the packets to Write-Only-Memory.
"In 1972 Signetics recognized April Fools day by printing a full color datasheet for a Write-Only Memory. This is a chip which accepts data but never reads it back. Suggested uses include a data logger for bombs. Graphs show "number of pins left versus number of insertions" and other useful data. A couple of pins are dedicated to 6.3 volt AC input... for the filaments, of course! A scanned version is here (page 1) and here (page 2) (these are 150k.JPGs)."
I just went searching to buy 12 ISA ethernet cards last week, and was only able to buy 1 NE2000 for US$10 after visiting about 8 stores (Atlanta, GA). However, the 9th store (they carried new and used equipment) offered me 12 for free (3COM Etherlink III and Intel EtherExpress PRO) if I would accept used ones. I did, of course.
The old PC's are also a great value (Used P166 w/floppy, 16MB RAM, video, sound are selling for US$29) and pretty good performers.
Add some software like floppyfw [http://www.zelow.no/floppyfw/], and you have your firewall/router.
To make it quiet and low power:
clip the fan wires on the power supply (with no harddrive, no video or other cards, you should have no problem with overheating, especially in houses that have HVAC systems or climate control).
Activate any BIOS power saving (typically affects HD, video, printer port, etc.), and disable video.
Disconnect the keyboard or mouse.
The good thing about doing it yourself with an old PC is the amount of control that you get - you know what is inside (or at least could find out:-). It also might be fun for you to tinker (although it appears you view this as a hassel).
The best documentation I read was from a Borland C++ 3.0 book which included a CODE EXAMPLE with every function.
Better documentation explains why I would want to use the function/method and has common uses of the function/method.
In the library code that I write, I typically write test-first programming, which serves as an API example of how to use the functions.
The example GUI application is a simple game, but the methodology could be used for any GUI application.
From the article:
The author goes on to discover, after searching with Google, that he had developed "a pattern known as Model-View-Presenter (MVP), a variant of Model-View-Controller (MVC)."
Martin Fowler has a good description of how the Model View Presenter works.
The example source code is available on the site. It utilizes an automated Java test suite called JUnit
Software Development Magazine is a magazine targeted at software developers, and there is no charge to subscribe to it.
The Prairie Home Companion is a hoot to listen to, and they have great archives.
At home I run 3 linux servers, 1 linux firewall, 2 linux desktops, and 1 windows desktop PC [games]. My main desktop was a Windows PC running mostly free software so that when we switched to just Linux on the desktop, it would be easy for my wife and kids. We made the switch to Linux on that desktop a year or so ago.
I still have to go back to Windows for printing color photos to different types of photo paper [HPDeskJet712C]. We also have to use Windows for most of the purchased PC games and educational software. My wife misses the HP Copier application [scanner->printer] and PrintMaster [greeting cards].
I mainly like Linux and free software because I am frugal and because I don't believe in pirating software. I also like the filesystem choices and the rock solid stability that Linux systems provide. I also like being immune to the myriad of Windows viruses and worms.
If the tax exempts food and clothing, then it will not be "disproportionately hard on poor people." Some states already have this (eg Pennsylvania).
I recently had a trip to Anaheim and chose my hotel based on whether it had free high speed internet access (looked it up at GeekTels before I reserved my room) since I would be doing alot of downloading of documents for committee meetings that I had that week.
I would also plan trips to a particular airport if it had WIFI rather than nearby ones, especially if I have a layover. To fly to my parents house in Pennsylvania, I could fly into Cleveland, Erie, or Pittsburgh. I normally like Cleveland due to the lower fares, but also like Pittsburgh due to the nice shopping area with non-airport pricing and I like the airport train (which I worked on).
This is what I did - although the field change wasn't so dramatic (I moved from electrical engineering). I went to University of Phoenix (they had a local campus in Denver) and got an MS in Computer Information Systems. I really liked their 5 or 10 week long classes, one night a week, a small class size, and a teacher that is from the workforce. I understand they now have online degrees, but my brother (who just got his MBA) tells me it is much harder online.
My son went through Neurotherapy for a year at AnchorPoint. It was amazing the way he was able to use his mind to calm himself and place himself in better control. They monitor the alpha, beta, and theta waves in the brain, and are able to show when he is out of control, etc. They try to basically get the signal to noise ratio better by doing certain computer related exercises.
We found that although my son was able to improve his concentration (less day-dream waves), his diet, The Feingold Diet, actually improved his behavior better by removing known stimulants from his food (artificial colors, flavors, and artificial preservatives BHA, BHT, TBHQ).
On a side note and from a techy perspective, the neurotherapists are using some nifty electronics (ISA cards) that amplify the brain waves. The hardware/software they use (proprietary) will only run on slow PCs (Pentium I class or less) and Windows 95 or 98, and also require a SoundBlaster brand only sound card. They could really use some open-source software!
Descent is a game where you pilot a spaceship through a mine inside an asteroid that has been taken over by robots. The object is to destroy the reactor and exit the mine before the reactor explodes. The Descent projects are the D2X Project and the D1X Project.
We play Descent II on a LAN using outdated machines (Pentium 233, Pentium Pro 200) and outdated graphics cards (S3). It is now open source and available for Linux, Mac, and Windows - thanks Matt Toschlog (Outrage Entertainment) and Mike Kulas (Volition Inc.)!
My new favorite multiplayer networked game is BZFlag - but it needs some horsepower (fast CPU and 3D GPU) and won't run right on my outdated machines.
- DMusic is a hosting platform for artists.
- IC-Musicmedia is a music-online-community that gives international artists the opportunity to present their music, their band, their label and its releases and other contents online, and every visitor the access ability to it.
I wonder what will happen to sites that lived off mp3.com - such as Liquid Stereo?I ran across an article a couple of years ago by Chuck Allison in C/C++ Users Journal about the The Simplest Automated Unit Test Framework That Could Possibly Work. It included test frameworks written in C, C++,and Java and opened my eyes to doing best practices to the extreme. It also showed me how I could apply unit testing to my C code. You can download free Test Frameworks (Test Suites) for other languages.
Unit testing was the first XP key practice that I started to use. When I would have to make a change in my mature code, I would add a unit test section to the module I was changing (using #define TEST), and add a main() to execute the unit test (using #define TEST_MODULENAME). See examples of this on my software page. I then began using test-first programming by writing the unit test first, seeing it fail, then writing just enough code to make it pass.
Other extreme programming sites that have been useful have been extremeprogramming.org , which has a great tutorial that includes an introduction and overview, and the site Extreme Programming.
The router that implements this evil bit could send the packets to Write-Only-Memory.
"In 1972 Signetics recognized April Fools day by printing a full color datasheet for a Write-Only Memory. This is a chip which accepts data but never reads it back. Suggested uses include a data logger for bombs. Graphs show "number of pins left versus number of insertions" and other useful data. A couple of pins are dedicated to 6.3 volt AC input... for the filaments, of course! A scanned version is here (page 1) and here (page 2) (these are 150k .JPGs)."
I just went searching to buy 12 ISA ethernet cards last week, and was only able to buy 1 NE2000 for US$10 after visiting about 8 stores (Atlanta, GA). However, the 9th store (they carried new and used equipment) offered me 12 for free (3COM Etherlink III and Intel EtherExpress PRO) if I would accept used ones. I did, of course.
The old PC's are also a great value (Used P166 w/floppy, 16MB RAM, video, sound are selling for US$29) and pretty good performers.
Add some software like floppyfw [http://www.zelow.no/floppyfw/], and you have your firewall/router.
To make it quiet and low power:
clip the fan wires on the power supply (with no harddrive, no video or other cards, you should have no problem with overheating, especially in houses that have HVAC systems or climate control).
Activate any BIOS power saving (typically affects HD, video, printer port, etc.), and disable video.
Disconnect the keyboard or mouse.
The good thing about doing it yourself with an old PC is the amount of control that you get - you know what is inside (or at least could find out :-). It also might be fun for you to tinker (although it appears you view this as a hassel).
Regards,
Steve