This post isn’t going to be much use for the majority of my audience, but I am creating this post because I am often referring people to these places, and wanted to create a nice page to send them to.
This is a small list of computer recyclers in my area that I’ll be updating and spreading around. I’m a huge fan of computer recycling and low cost computing, if you’re curious you should look around in your area for some similar non profit recyclers!
Can I use a recycled computer?
The answer to this isn’t always yes. If you’re looking for the latest and greatest, or you play games (real games not Facebook games) you won’t be able to find what you need here. But mostly what I get asked about is: “I need a computer for school but don’t want to pay a lot” and that’s one area where recycled computers shine. Here’s what you can use recycled computers for:
Schoolwork - High School, college etc. Creating documents and reports, etc. A cheap computer running OpenOffice will work just fine.
Programming - A high end machine is nice for programming but not really necessary. You can do web development on just about anything for instance. I do most of the work for this website on a 2004 Powerbook, because it’s basic text editing. My Windows stuff is done on a 2007 Toshiba Laptop.
Office Management - Again using a cheap older computer with OpenOffice and you can do pretty much anything a high dollar new machine will do, only a bit slower. But if you’re saving $1000 it might be worth the price.
Kid Computers - If you want a computer for your kids to browse the internet and play learning games an old computer works great. If you’re ready for the challenge, you can install Linux on it where most versions have TONS of educational software for free. Take Edubuntu for a spin and check out all the awesome stuff they have.
This list could be a lot longer but it’s not the purpose of the article. Basically if you aren’t playing online games, ripping videos or something of that sort you might notice that a new computer isn’t a whole lot better than an older one.
Cheap Computer Recyclers in Oregon
Here is a list of people I’ve dealt with personally and really like. You can walk in with a couple hundred bucks and come out with a decent desktop or laptop that works great. They test their equipment, set it up and don’t try to upsell your or rip you off.
Since this one is closest to my hometown I’ve been sending a lot of people here. The guy running it is great, he’s very knowledgeable and honest. Just tell him what you need to use a computer for and he’ll steer you right. Great prices as well.
For instance, I picked up a 20” LCD flatpanel monitor there recently for $100. Worked great, no scratches or dead pixels. It’s the 3rd or 4th monitor I’ve picked up there that works great.
I just recently discovered this place, and they treated me really well. I picked up a laptop for $100 (the Core2 Toshiba) and an old G4 machine for a server. The dusty old G4 had been sitting a while but he said “yes, it works if not bring it back”. Great policy, but the machine did work exactly as advertised.
Again it’s a good place with knowledgeable people and no sales pressure. It’s family run and they do a great service for the community and their customers.
For those in the Portland Metro area this is another great service you gotta check out. They are a non profit that offers free computers (if you qualify) and free computer classes as well. But if you don’t qualify for a free one or you feel like supporting them you can visit their thrift store and purchase items at a great price. All purchases support their mission.
I will be researching more of these types of companies locally and adding to this list. There’s many reasons getting a recycled computer makes sense, you save money and help keep this stuff from hitting landfills. You support families and volunteers rather than giant corporations.
If you’re not from the Northwest Oregon area, search for some recyclers in your area! Even if you already have your dream machine it may be worth getting a machine to tinker with for projects, media servers etc. Enjoy!
A couple years ago I wrote an app called “FireCom” for the Android phone that’s basically just a listing of active Fire and EMS calls in Washington County, Oregon. I never expected too many people to use it and gave it away so I didn’t put a lot of time into it. As it turned out a lot of people started using it, so lately I decided to put a little more effort into it.
What is FireCom?
I created the application in February 2011, and it spawned from being a volunteer firefighter and looking up calls on our Joint CAD Incident Tracking System which a listing of calls in our local county plotted out on a Google map.
There is also a link to audio there as well, and when I was in the Fire Academy I listened a lot to learn everything from radio etiquette to fireground strategy. Turns out there’s a lot you can learn by listening to this stuff.
But if you tried to look up any of this data on your phone, it was less than great. Sometimes curiosity takes over as well, when you see a speeding ambulance or fire truck you want to know where they are going or what’s going on.
This is why I created the FireCom app, I wanted to make something quick and easy someone could bring up on their phone that would show that information. After some research and digging around I found a script written by Gary Kee that scraped the calls from an RSS feed to post on Twitter. It was the perfect missing link.
How the first FireCom worked.
The first iteration of the FireCom app parsed the XML feed and displayed the results on the screen using Java. I found it to be pretty slow and really unreliable, so it didn’t last very long. I’m not an expert Java or Android programmer and didn’t want to mess with it very much. So instead I decided to stick with what I was good at, and created a PHP page on this site that scraped the data and formatted it into nice little page. Then I created a WebView wrapper that simply brought up the page.
It worked great for a couple years. As I said I didn’t expect many people to use it and I used it myself for quite a while. But after a while I would started getting emails from people about it, and talking to fellow firefighters who were using it all the time. The two complaints I kept hearing were how slow it was sometimes, and how the map function didn’t work well. It took a few seconds to load because it was basically set up like this:
Basically the WebView loaded up a PHP page on my server. The PHP page pulled the data from the output XML in realtime from the WCCCA server. It parsed it and created some HTML for the page formatted for the phone and did some cleanup of the text and station names. I decided using a WebView would be the best way so I could make updates and changes without making someone download the updates constantly.
The biggest problem was it was accessing this XML file every time someone loaded up the app, and sometimes it was quite slow. It’s a large XML file that’s dynamically generated and it puts out a lot of data that had to be parsed, and only a small portion is actually used. There were times when it really took a long time to load, and on a phone that can be even worse. Here was the average load time the night I upgraded the app:
As you can see the time isn’t that great. There are a few reasons, the slow XML process I described, plus the repeat view isn’t going to be any different. I turned off caching on this script because it’s live data that shouldn’t be cached. 4 seconds may not seem like much, but it’s really pretty sluggish and I think folks using the app just got accustomed to pressing the icon and waiting for the results. Could I fix that? I came up with a new way to solve that very problem.
The new, improved FireCom
For the second iteration, I decided to do a few things to speed it up.
Remove excess HTML - Anything that wasn’t absolutely required was removed. Should have done this a long time ago.
Compressed HTML - I removed all returns and whitespace from the file. Just a single line of html was pushed out.
Optimized the WCCCA image - This is a small thing, but on a mobile connection it can make a difference. I also set caching for this image.
Refactored the application - This is the process I’ll detail below.
I refactored the application by changing the way I pulled the data. Instead of accessing the XML file every time a user brought up the app, I created a script to pull the data, and generate the feed.php file.
The feed.php file is now actually only a single line of HTML. But since there are already about 2000 people pointing to that file, it wouldn’t be wise to change it. So now I have a feedloader that reads the xml and generates a static PHP file to read, so the load time is considerably faster:
Over 10 times faster in fact. The repeat view is a little faster as well due to the image caching. So now the app is way faster, and my job is done right? Not exactly.
Now we have a new problem
So if you’ve looked at the new system you’ve figured out that the feedloader does the heavy lifting and just generates a static PHP file for the app. This is where the majority of the speed improvements have come from. But this file has to be run pretty frequently, because with the old system feed.php was in realtime, now it is a static file. If I don’t update it then the users are stuck with old information.
Since I’m hosted on a Windows server, I can’t just whip up a quick CRON job for this. I set up Windows Scheduler to run this file every 2 minutes or so. After watching it very closely and doing some testing I found that it is very spotty. Sometimes it will run every two minutes consistently, and sometimes it will run every 5, or even ten minutes. Since I am not the admin of this server there isn’t much I can do.
Let’s crowd source it!
I was thinking of having it randomly run the feedloader when someone loads the app. Maybe one out of every 100 people visiting would trigger the feedloader and that would refresh the feed.php for everyone. But this seemed like a terrible solution because I’m picking users at random to have a slow experience. While 99 people get a snappy page, that one person is stuck loading the file for the feed. Not a great solution.
I decided to let the scheduled task continue to run in it’s spotty fashion, and I put a “last updated” timestamp into the page. Then I put a “refresh data” button in that runs the feed loader. This also takes 4-5 seconds but at least the user is choosing to take that time in order to see the newest version of the page. I’m not springing it on people expecting people do it without their permission.
In the future I’m likely going to migrate this to a Linux server and set up a cron job. I’ve never really seen those fail, but Windows scheduler is a different story. I may even set up something on my Raspberry Pi to do the job who knows.
Lessons Learned
What I learned from this, is the value of making a WebView app when you can. This way you can do all kinds of stuff behind the scenes without bothering the user with updates all the time. Naturally not every app can be made into a WebView but if you can, it’s worth trying.
I also learned every little bit counts, and while moving feed.php to a static file was the big performance improvement, the little stuff like html compression helps too. When it comes to page speed, every tiny thing counts. When you’re dealing with mobile devices and varying amounts of bandwidth it does a lot of good to cut down the amount of data you’re transferring. For some people it’s even saving them on their bill.
Overall I’m glad people are using this app, and I hope the faster version works better for them.
Want to run and build .Net applications on your Raspberry Pi? In this article I’ll show you how. With Mono you can develop and run .Net applications on your Raspberry Pi. I got a few emails about this, so I decided to create a quick tutorial.
What’s the Purpose here?
If you’re thinking of running your favorite Windows .Net applications, or setup a fancy ASP.NET server, you may be disappointed. While Mono does a great job and the Raspberry Pi performs great for what it is, I wouldn’t say this solution is ready for the big leagues, and definitely not something you want to do in a production or commercial environment.
If you want to tinker around and learn C#, and maybe build a few cool apps this is a great way to do it. The Raspberry Pi is a great tool for learning, and that’s the purpose of this project.
There are tons of MONO applications available in Raspbian but we’re only going to cover some basics.
Install Mono
Mono is an awesome project that brings .Net to Linux. It’s available for the Raspian image, and super easy to set up.
Update your repos:
sudo apt-get update
And install the Mono Runtime:
sudo apt-get install mono-runtime
This one could take a while. It updated a lot of stuff on my system.
sudo apt-get install mono-mcs
Note about MonoDevelop: You can install this on a soft float install of Raspian or Arch but it’s not the best performing application in these conditions. Mono still has a lot of problems with the Pi that need to be ironed out, and MonoDevelop is a long ways off.
Build a quick application.
Load up LeafPad (or whatever your favorite text editor is) and create a file called monotest.cs and save it somewhere where you’ll find it.
Enter the following code:
123456789101112
using System; namespace Test { class Program { public static void Main() { Console.WriteLine("Hello! This is a Mono app running on {0}", Environment.OSVersion); } } }
Now, open up an LX Terminal and go to where this file is located (I just put it in a folder called monotest as well). Type in the following:
mcs monotest.cs
This should only take a couple seconds. Then list the files in your directory (using the ls command) you will see a new file:
monotest.cs monotest.exe
Now, you can run the monotest.exe by typing in:
mono monotest.exe
You will see something like this:
And you’re ready to go! If you see this, that means it worked.
So what can you do now?
You can write basic C# console applications all day with this setup. You can build neat automation items, and even some GUI stuff if you really want to dig into it. You can write .Net 1.0 - 4.0 applications with varying success. The most valuable thing you do is learn some C# basics and experiment like crazy.
C# is one of my favorite languages, so it’s awesome to see options for playing with it without being forced to use Windows and Visual Studio, which are great tools but expensive for hobbyists. As I said this is nowhere near something for production use, but excellent for tinkering and learning which is of course what the Raspberry Pi is all about!