Once again, I'm working on starting some plants indoors during the Winter. I have been surfing the Internet for ideas on how to grow larger quantities of small vegetables indoors. There are several folks on youtube.com who are using PVC pipe, as well as recycled drinking water bottles, as growing containers. Plastic water bottles are very cheap or even free, and 4" PVC pipe makes a really slick growing trough. Both can be used in high density configurations for growing lots of plants in a small space. Here's the catch: PVC pipe, as well as certain plastics used in food containers, actually leach toxins into the food or liquids they contain. Bisphenol A, or BPA, which is used in certain food and drink containers, has come under scrutiny as far as potentially causing birth defects, sexual abnormalities in small children, reproductive harm in male adults, neurological damage, and possibly even obesity. Chronic exposure to the pthalates found in PVC plastics can cause liver damage and other serious human health problems.
So, What to use?
I checked with a friend and colleague who is quite knowledgeable in chemistry. He recommends polyethylene or polybutylene plastics for gardening or potable water. He added that the plastic bins I bought at Wal-Mart for growing plants in a couple years ago should be safe, since they are made from polyethylene. I checked online regarding the 5-gallon buckets that are commonly used for bulk restaurant foods. These, too, are made from polyethylene - and SHOULD therefore be safe. About Home Depot, Lowes, or Wal-Mart 5 gallon buckets? They APPEAR to be made of the same polyethylene, but one should probably check before using these!!
The links below offer more information regarding which plastics are considered safe and which to avoid. Note that there is some conflicting information on polypropylene - I would avoid it due to some sites talking of it being an endocrine disruptor.
http://www.greenamerica.org/livinggreen/plastics.cfm
http://toxicswatch.blogspot.com/2008/11/toxic-leaching-from-polypropylene.html
http://archive.greenpeace.org/toxics/pvcdatabase/bad.html
A growing container should also be of a light or medium color. I learned the hard way a few years ago that the dark colored pots the nurseries use once and throw away can overheat in the sun and cause the plants' roots to burn. It would look crummy, but perhaps these can be used in a pinch if wrapped with reflective mylar or foil. I'd be wary of painting them due to chemicals in the paint possibly leaching through the bucket into the soil.
Shelves or supports used in a window garden should be sturdy - containers filled with soil are surprisingly heavy and will only get heavier as the plants grow. I use a frame made of 2" x 4" lumber for mine.
Thursday, December 29, 2011
Sunday, December 25, 2011
Cyber-Clouds In My Coffee*
We have all heard all the hoopla about cloud computing, and how it is the greatest thing for mankind since sliced bread. It's been harder than I would expect to get a coherent explanation of what cloud computing really is. Boiled down, it refers to a paradigm in which computing is basically a "service" or a "utility" that you pay a monthly fee to use, rather than as something you buy in a box, take home, setup, and plug in. [I think of it as akin to regularly sending one's laundry to a laundry service as opposed to buying a washer and doing it at home.] Taken to its ultimate end, it could involve having your applications software hosted on a remote server, and also your data stored elsewhere. You would access your applications and data from anywhere there is Internet access via small, relatively cheap commodity devices such as tablet computers and "smart phones".
While it probably does have its place, its widespread implementation has some important and potentially negative ramifications for Joe Average User. Especially in this day of terrorism, government crackdowns, and a general lack of accountability on the part of Big Business. The huge new legal and ethical issues surrounding the use of this technology are unprecedented and could take years to resolve.
Before you swallow all the marketing hype "hook, line, and sinker", check out this article quoting Richard Stallman, activist, privacy advocate, and computer programmer:
http://www.guardian.co.uk/technology/2008/sep/29/cloud.computing.richard.stallman
The article, and the ones linked to at the bottom of this post, do quite a bit to de-mystify the general concept of cloud computing by striping away the marketing mumbo-jumbo to get to its essence.
Here are a few quotes highlighted from the article:
Stallman said "But there has been growing concern that mainstream adoption of cloud computing could present a mixture of privacy and ownership issues, with users potentially being locked out of their own files."
"One reason you should not use web applications to do your computing is that you lose control," he said. "It's just as bad as using a proprietary program. Do your own computing on your own computer with your copy of a freedom-respecting program. If you use a proprietary program or somebody else's web server, you're defenceless. You're putty in the hands of whoever developed that software."
He goes on to tell people "to stay local and stick with their own computers."
He said it more eloquently than I could have. Using my laundry analogy above, one must trust that the laundry service won't lose the wash, spill bleach or dye on it, overcook it in the dryer and shrink it, return it to the wrong person, ...
Here's where it "hits home":
Typically, my ISP is 'down' an average of two days per month. I have few viable options for Internet services in my semi-rural location. It's not that the infrastructure isn't here for more service providers; it's the fact we have one 300# gorilla that has cornered the market and for all practical purposes locked out the competition. I'd be crazy to want my access to my music, school homework, business files, ... contingent upon having access to the Internet. That's just a couple of the 'local issues'. But there are much larger implications.
Having observed the government crackdowns on Internet and phone service in places like Egypt and parts of the Arab World, and the continuing government control of the Internet in places such as China, I have a very cautious and skeptical attitude toward anything in which we as individuals and small businesses are asked to (or told we must) give up any more control over our own data and infrastructure.
* In keeping with giving proper attribution of ideas to their owners, the title of this post makes reference to the song "You're So Vain", by Carly Simon. "Clouds in my coffee" refers to illusions, or having "cloudy" vision so you can't see things clearly.
The following sites will help "part the clouds" surrounding this potentially game-changing technology:
http://www.techtangerine.com/2009/06/02/ten-reasons-why-cloud-computing-is-a-bad-idea/
http://www.guardian.co.uk/technology/blog/2008/aug/06/whengoogleownsyouyourdata
http://www.zdnet.com/blog/london/defense-giant-ditches-microsofts-cloud-citing-patriot-act-fears/1349?tag=nl.e539
A short side bar - but related issue:
The Obama administration and our illustrious congress critters are working to pass a bill that would give the U.S. Government the power to shut down and/or censor Internet and presumably telephone access for US citizens at the slightest whim. Another bill - the so-called "Protect IP Act" - in the works essentially gives large companies such as Microsoft and Hollywood studios carte blanche to censor our access to many websites we use everyday. See the short video at http://vimeo.com/31100268 to understand the far-reaching implications of this legislation.
I've talked about this and related topics in my posts regarding Internet censorship, service interruption, and the need for "grass roots" neighborhood "mesh networks". Judging from my blog stats on those posts, my attempts to reach and warn people of the chilling effect this can have on our basic rights of free speech in the digital age have failed. But please bear in mind that until 911, legislation such as the "USA Patriot Act" would have seemed unthinkable to most Americans. For those interested in more information about Internet Censorship and how to beat it, check out the following:
http://inkarlslab.blogspot.com/2011/10/more-internet-censorship-on-way-in-good.html
http://inkarlslab.blogspot.com/2011/06/wanna-beat-internet-censorship-build.html
While it probably does have its place, its widespread implementation has some important and potentially negative ramifications for Joe Average User. Especially in this day of terrorism, government crackdowns, and a general lack of accountability on the part of Big Business. The huge new legal and ethical issues surrounding the use of this technology are unprecedented and could take years to resolve.
Before you swallow all the marketing hype "hook, line, and sinker", check out this article quoting Richard Stallman, activist, privacy advocate, and computer programmer:
http://www.guardian.co.uk/technology/2008/sep/29/cloud.computing.richard.stallman
The article, and the ones linked to at the bottom of this post, do quite a bit to de-mystify the general concept of cloud computing by striping away the marketing mumbo-jumbo to get to its essence.
Here are a few quotes highlighted from the article:
Stallman said "But there has been growing concern that mainstream adoption of cloud computing could present a mixture of privacy and ownership issues, with users potentially being locked out of their own files."
"One reason you should not use web applications to do your computing is that you lose control," he said. "It's just as bad as using a proprietary program. Do your own computing on your own computer with your copy of a freedom-respecting program. If you use a proprietary program or somebody else's web server, you're defenceless. You're putty in the hands of whoever developed that software."
He goes on to tell people "to stay local and stick with their own computers."
He said it more eloquently than I could have. Using my laundry analogy above, one must trust that the laundry service won't lose the wash, spill bleach or dye on it, overcook it in the dryer and shrink it, return it to the wrong person, ...
Here's where it "hits home":
Typically, my ISP is 'down' an average of two days per month. I have few viable options for Internet services in my semi-rural location. It's not that the infrastructure isn't here for more service providers; it's the fact we have one 300# gorilla that has cornered the market and for all practical purposes locked out the competition. I'd be crazy to want my access to my music, school homework, business files, ... contingent upon having access to the Internet. That's just a couple of the 'local issues'. But there are much larger implications.
Having observed the government crackdowns on Internet and phone service in places like Egypt and parts of the Arab World, and the continuing government control of the Internet in places such as China, I have a very cautious and skeptical attitude toward anything in which we as individuals and small businesses are asked to (or told we must) give up any more control over our own data and infrastructure.
* In keeping with giving proper attribution of ideas to their owners, the title of this post makes reference to the song "You're So Vain", by Carly Simon. "Clouds in my coffee" refers to illusions, or having "cloudy" vision so you can't see things clearly.
The following sites will help "part the clouds" surrounding this potentially game-changing technology:
http://www.techtangerine.com/2009/06/02/ten-reasons-why-cloud-computing-is-a-bad-idea/
http://www.guardian.co.uk/technology/blog/2008/aug/06/whengoogleownsyouyourdata
http://www.zdnet.com/blog/london/defense-giant-ditches-microsofts-cloud-citing-patriot-act-fears/1349?tag=nl.e539
A short side bar - but related issue:
The Obama administration and our illustrious congress critters are working to pass a bill that would give the U.S. Government the power to shut down and/or censor Internet and presumably telephone access for US citizens at the slightest whim. Another bill - the so-called "Protect IP Act" - in the works essentially gives large companies such as Microsoft and Hollywood studios carte blanche to censor our access to many websites we use everyday. See the short video at http://vimeo.com/31100268 to understand the far-reaching implications of this legislation.
I've talked about this and related topics in my posts regarding Internet censorship, service interruption, and the need for "grass roots" neighborhood "mesh networks". Judging from my blog stats on those posts, my attempts to reach and warn people of the chilling effect this can have on our basic rights of free speech in the digital age have failed. But please bear in mind that until 911, legislation such as the "USA Patriot Act" would have seemed unthinkable to most Americans. For those interested in more information about Internet Censorship and how to beat it, check out the following:
http://inkarlslab.blogspot.com/2011/10/more-internet-censorship-on-way-in-good.html
http://inkarlslab.blogspot.com/2011/06/wanna-beat-internet-censorship-build.html
Wednesday, December 14, 2011
MIPS 32 Register Swap Example Using QtSPIM

I've been away from my blog the past several weeks due to term papers, final exams and other mini-emergencies.
During that time I have seen a huge number of hits on my MIPS Example code page. You can find it here:
http://inkarlslab.blogspot.com/2011/09/mips-32-example-program-using-qtspim.html
In case folks would like some more code examples, I've published this piece of code - based loosely on one of my lab assignments this semester.
This code prompts the user to enter two integers through the console, places them into registers, then swaps the contents of those registers. It does so without the use of the MIPS "move" command. As with my previous material, it was run using the SPIM emulator version 9.1.4 - dated September 4, 2011.
CAVEATS: This is not the most elegant way of doing it. It was my first attempt at doing a register swap. This can actually be done using three or four lines of code, rather than my five, but my professors might get a bit angry if I gave away all the answers here. But this code does work and should help folks to get a head start on writing simple MIPS programs.
The complete code is as shown below. Simply copy and save this as "integer_swap.asm", or whatever .asm filename you like, using any convenient text editor such as Windows Notepad or LINUX Gedit.
NOTE: Sorry about the crummy formatting - I'm having trouble with tabs in the blogger interface.
===========================================================
## Program reads variables from console into registers
## then swaps the contents of those registers.
## Prints out contents before and after swap.
##
##
##
## Registers used:
## $v0 - syscall parameter and return value
## $a0 - syscall parameter
## $s1 - holds x
## $s2 - holds y
## $t0 - holds temp value
.text
main: # SPIM starts execution here
## Let's get x
la $a0, enter_x # Print msg for x
li $v0, 4
syscall
## read x into $s1.
li $v0, 5 # syscall 5 = read integer
syscall
move $s1, $v0 # x = Integer just read
## Message for x
la $a0, print_s1 # Prints "$s1 = "
li $v0, 4
syscall
## Let's display initial value of $s1 - so read x into $a0.
move $a0, $s1 # Move contents of $s1 into $a0
li $v0, 1 # Syscall for 'print integer'
syscall # Print value in $a0
## Print carriage return
la $a0, print_ret
li $v0,4
syscall
## Now, let's get y
la $a0, enter_y # Print msg for y
li $v0, 4
syscall
## read y into $s2.
li $v0, 5 # syscall 5 = read integer
syscall
move $s2, $v0 # y = Integer just read
## Message for y
la $a0, print_s2 # Prints "$s1 = "
li $v0, 4
syscall
## Let's display initial value of $s2 - so read y into $a0.
move $a0, $s2 # Move contents of $s2 into $a0
li $v0, 1 # Syscall for 'print integer'
syscall # Print value in $a0
## Print carriage return
la $a0, print_ret
li $v0,4
syscall
## Now, let's try and swap them - WITHOUT using 'move' command!!
addi $t0, $s2, 0 # Add the contents of $s2 into $t0
sub $s2, $s2, $s2 # Subtract the contents of $s2 from itself, thus zeroing it out
addi $s2, $s1, 0 # Add contents of $s1 into $s2
sub $s1, $s1, $s1 # Subtract the contents of $s1 from itself, thus zeroing it out
addi $s1, $t0, 0 # Add contents of $t0, same as former $s2, into $s1
## Now, lets print out the results:
la $a0, print_s1 # Prints "$s1 = "
li $v0, 4
syscall
move $a0, $s1 # Prints contents of $s1
li $v0, 1 # Syscall for printing of variable type integer
syscall
## Print single carriage return
la $a0, print_1ret
li $v0,4
syscall
la $a0, print_s2 # Prints "$s2 = "
li $v0, 4
syscall
move $a0, $s2 # Prints contents of $s2
li $v0, 1 # Syscall for printing of variable type integer
syscall
## Print carriage return
la $a0, print_ret
li $v0,4
syscall
exit:
li $v0, 10 # These two lines here for smooth exit from program
syscall
.data
enter_x: .asciiz "Enter a number for x, and press 'ENTER': " # Console prompt to enter the value for x
enter_y: .asciiz "Enter a number for y, and press 'ENTER': " # Console prompt to enter the value for y
print_s1: .asciiz "$s1 = " # Screen output to console
print_s2: .asciiz "$s2 = " # Screen output to console
print_1ret: .asciiz "\n"
print_ret: .asciiz " \n \n \n"
=======================================================
The picture above shows what should happen when you run the program using SPIM.
A slight variation of the problem asks you to do this without using a third register for temporary storage of one value (as was done here).
This basic algorithm can be modified slightly to permit the integers to be swapped WITHOUT using a third register.
HINTS: You will only need three or four lines of code to do the actual swap. There are basically two ways I know of to do it: 1) Use "add" and "sub" operations or 2) use XOR operations.
Hope this information is of help to someone.
Thursday, November 3, 2011
QtSPIM And MIPS Instructions Using Float And Double Variables
This week, we had a lab assignment in my computer engineering class that required us to perform arithmetic operations on float variables. I quickly learned that the standard add, addi, sub, mov, ... instructions do NOT work properly on float variables. This was not explained in ANY of the literature I had prior to 15 minutes ago. Also, you apparently cannot use the standard $s0 - $s8, $t0 - $t3, ... registers for storing float or double type variables. There are special floating point registers that are used for this but are also not often discussed in the usual MIPs tutorials. So I went to Google and searched terms such as SPIM+"float variables", and SPIM+"float registers". Only then did this other information suddenly appear.
The following link should prove quite useful for anyone trying to do this:
A much more complete listing of MIPS Instructions - Including those using Float Registers
http://www.dsi.unive.it/~arcb/LAB/spim.htm
Look at pages 21 - 23 and note the instructions such as add.s, sub.s, mov.s for manipulating single precision float variables. If you are working with double precision variables, use add.d, sub.d, mov.d, ... MIPS uses a floating point coprocessor - it has special registers numbered $f0 - $f31. So, what I get from this is instead of using the $s0, $s2, and $t0 registers my professor told me to use on integers, I will have to use registers $f2, $f3, $f4, for example. Registers $f0 and $f12 are reserved in QtSPIM for reading and printing floats, respectively - so don't use them for storing/manipulating your arithmetic variables. After you perform an arithmetic operation, you will have to move that result to $f12 before you can print the answer to the console. Likewise, if your program reads a float variable from the console, you will have to fetch that number from f.p. register $f0 and place it into another - such as $f3, or wherever, before manipulating it.
If you are doing this you should get thoroughly acquainted with this document, save a copy to your hard drive, and perhaps print out your own hard copy as I have just done.
The links below show a couple short snippets of code detailing how to use these instructions.
http://stackoverflow.com/questions/2589233/mips-or-spim-loading-floating-point-numbers
http://stackoverflow.com/questions/6515799/use-the-floating-point-instructions-to-get-results-in-decimal
I'll post more information on this site as it becomes available. I sincerely hope my posts on SPIM and MIPS are helping some folks. THESE posts especially have gotten a ton of hits lately - from all over the world at that!
See them at:
http://inkarlslab.blogspot.com/2011/09/mips-32-example-program-using-qtspim.html
http://inkarlslab.blogspot.com/2011/09/spim-in-linux-environment.html
http://inkarlslab.blogspot.com/2011/09/spim-mips-32-bit-simulator.html
The following link should prove quite useful for anyone trying to do this:
A much more complete listing of MIPS Instructions - Including those using Float Registers
http://www.dsi.unive.it/~arcb/LAB/spim.htm
Look at pages 21 - 23 and note the instructions such as add.s, sub.s, mov.s for manipulating single precision float variables. If you are working with double precision variables, use add.d, sub.d, mov.d, ... MIPS uses a floating point coprocessor - it has special registers numbered $f0 - $f31. So, what I get from this is instead of using the $s0, $s2, and $t0 registers my professor told me to use on integers, I will have to use registers $f2, $f3, $f4, for example. Registers $f0 and $f12 are reserved in QtSPIM for reading and printing floats, respectively - so don't use them for storing/manipulating your arithmetic variables. After you perform an arithmetic operation, you will have to move that result to $f12 before you can print the answer to the console. Likewise, if your program reads a float variable from the console, you will have to fetch that number from f.p. register $f0 and place it into another - such as $f3, or wherever, before manipulating it.
If you are doing this you should get thoroughly acquainted with this document, save a copy to your hard drive, and perhaps print out your own hard copy as I have just done.
The links below show a couple short snippets of code detailing how to use these instructions.
http://stackoverflow.com/questions/2589233/mips-or-spim-loading-floating-point-numbers
http://stackoverflow.com/questions/6515799/use-the-floating-point-instructions-to-get-results-in-decimal
I'll post more information on this site as it becomes available. I sincerely hope my posts on SPIM and MIPS are helping some folks. THESE posts especially have gotten a ton of hits lately - from all over the world at that!
See them at:
http://inkarlslab.blogspot.com/2011/09/mips-32-example-program-using-qtspim.html
http://inkarlslab.blogspot.com/2011/09/spim-in-linux-environment.html
http://inkarlslab.blogspot.com/2011/09/spim-mips-32-bit-simulator.html
Tuesday, November 1, 2011
A "real-world" Indicator Of The American Economy - My Observations
We have heard quite a bit lately about how college kids are graduating with mountains of student loan debt and can't find jobs. Case in point: Three days ago I was at a local retail store picking up a "lay-away" purchase. The lady at the lay-away counter was well spoken, middle aged, well-mannered, intelligent, and well educated as it turned out. She explained that she had earned her Bachelor's degree in Geology about a year and a half ago - and hadn't yet found a job in her field. "Welcome to the recession", she said with a grim laugh.
IT Work:
We have all heard about how great a source of employment the IT industry is, and what a huge and growing demand there is for IT workers. In fact, there is supposedly such a high demand for IT workers that, according to industry sources, we must outsource our IT work to India. If so, then how is it that a friend of a friend with a Master's degree in Computer Science can only wrangle a $10/hour (yes, you read correctly) job in his field? He is an intelligent, hard-working, educated, experienced guy with a good work ethic. This does NOT bode well for guys like me who are working on their graduate degrees in related fields.
Granted, these are only two data points. However, they DO conflate with what I have personally observed in my daily interactions and read about online.
Looking around I find MANY examples of industry outsourcing jobs (and 'justifying' it with half-truths and questionable statistics) while millions of qualified Americans who WANT the work go without.
Why, as a society, as we putting up with this? Where is the outrage?
Declining Quality On All Levels:
Generally, during a recession, employees are fearful for their jobs and therefore tend to be on their best behavior. Under such conditions they will tolerate all sorts of things at work they never would in normal times. But this time there is yet another unprecedented change I and others close to me have noticed: MANY people in businesses of all types with whom I come in contact are rude, surly, and don't want to even minimally do the work they are paid to do. And/or they are often just plain incompetent. I've noticed a general coarsening of the business culture in America during the last three years in particular.
We always hear, especially from the 'conservative' side of the political aisle, that recessions "weed out the dead wood", allow the best to rise to the top, provide businesses with the opportunity to make improvements in efficiency, ... If anything, I think the opposite has happened during this latest downturn. Even the IT guy I mentioned earlier has noticed the same thing. We ask ourselves "with all the GOOD employees out there who WANT to work and cannot get jobs, WHY does business continue to keep ones that mistreat paying customers or who don't really want to work?" We hear about how businesses which cater to the middle and lower classes are being hurt by the recession, yet these same businesses keep employees that could be driving away valuable clientele.
I don't get it. It flies in the face of what we are taught in business degree programs and in normal, real-world commerce.
Readers - have you noticed the same thing?? If so, why do you think it is? What is behind it?
I'd love to hear from anyone who can shed light on this!
IT Work:
We have all heard about how great a source of employment the IT industry is, and what a huge and growing demand there is for IT workers. In fact, there is supposedly such a high demand for IT workers that, according to industry sources, we must outsource our IT work to India. If so, then how is it that a friend of a friend with a Master's degree in Computer Science can only wrangle a $10/hour (yes, you read correctly) job in his field? He is an intelligent, hard-working, educated, experienced guy with a good work ethic. This does NOT bode well for guys like me who are working on their graduate degrees in related fields.
Granted, these are only two data points. However, they DO conflate with what I have personally observed in my daily interactions and read about online.
Looking around I find MANY examples of industry outsourcing jobs (and 'justifying' it with half-truths and questionable statistics) while millions of qualified Americans who WANT the work go without.
Why, as a society, as we putting up with this? Where is the outrage?
Declining Quality On All Levels:
Generally, during a recession, employees are fearful for their jobs and therefore tend to be on their best behavior. Under such conditions they will tolerate all sorts of things at work they never would in normal times. But this time there is yet another unprecedented change I and others close to me have noticed: MANY people in businesses of all types with whom I come in contact are rude, surly, and don't want to even minimally do the work they are paid to do. And/or they are often just plain incompetent. I've noticed a general coarsening of the business culture in America during the last three years in particular.
We always hear, especially from the 'conservative' side of the political aisle, that recessions "weed out the dead wood", allow the best to rise to the top, provide businesses with the opportunity to make improvements in efficiency, ... If anything, I think the opposite has happened during this latest downturn. Even the IT guy I mentioned earlier has noticed the same thing. We ask ourselves "with all the GOOD employees out there who WANT to work and cannot get jobs, WHY does business continue to keep ones that mistreat paying customers or who don't really want to work?" We hear about how businesses which cater to the middle and lower classes are being hurt by the recession, yet these same businesses keep employees that could be driving away valuable clientele.
I don't get it. It flies in the face of what we are taught in business degree programs and in normal, real-world commerce.
Readers - have you noticed the same thing?? If so, why do you think it is? What is behind it?
I'd love to hear from anyone who can shed light on this!
Labels:
college,
decline of America,
Great Recession,
IT,
outsourcing,
recession,
student loan debt
Subscribe to:
Posts (Atom)